polotno-node 2.11.11 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/assets/index-_DmbJQIF.js +611 -0
- package/dist/assets/{index.es-IW0gGbW7.js → index.es-CltenCKk.js} +1 -1
- package/dist/index.html +1 -1
- package/index.js +2 -0
- package/instance.js +11 -4
- package/package.json +7 -7
- package/dist/assets/index-GYIcgqgy.js +0 -561
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=t(a);fetch(a.href,i)}})();var wh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kc(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var B0={exports:{}},Br={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var hy;function J_(){if(hy)return Br;hy=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function w(G){return G===null||typeof G!="object"?null:(G=p&&G[p]||G["@@iterator"],typeof G=="function"?G:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function S(G,z,D){this.props=G,this.context=z,this.refs=E,this.updater=D||d}S.prototype.isReactComponent={},S.prototype.setState=function(G,z){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,z,"setState")},S.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function m(){}m.prototype=S.prototype;function g(G,z,D){this.props=G,this.context=z,this.refs=E,this.updater=D||d}var v=g.prototype=new m;v.constructor=g,_(v,S.prototype),v.isPureReactComponent=!0;var b=Array.isArray,O=Object.prototype.hasOwnProperty,I={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function M(G,z,D){var K,ne={},Q=null,ee=null;if(z!=null)for(K in z.ref!==void 0&&(ee=z.ref),z.key!==void 0&&(Q=""+z.key),z)O.call(z,K)&&!T.hasOwnProperty(K)&&(ne[K]=z[K]);var ae=arguments.length-2;if(ae===1)ne.children=D;else if(1<ae){for(var se=Array(ae),ce=0;ce<ae;ce++)se[ce]=arguments[ce+2];ne.children=se}if(G&&G.defaultProps)for(K in ae=G.defaultProps,ae)ne[K]===void 0&&(ne[K]=ae[K]);return{$$typeof:e,type:G,key:Q,ref:ee,props:ne,_owner:I.current}}function j(G,z){return{$$typeof:e,type:G.type,key:z,ref:G.ref,props:G.props,_owner:G._owner}}function C(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function x(G){var z={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(D){return z[D]})}var L=/\/+/g;function A(G,z){return typeof G=="object"&&G!==null&&G.key!=null?x(""+G.key):z.toString(36)}function N(G,z,D,K,ne){var Q=typeof G;(Q==="undefined"||Q==="boolean")&&(G=null);var ee=!1;if(G===null)ee=!0;else switch(Q){case"string":case"number":ee=!0;break;case"object":switch(G.$$typeof){case e:case r:ee=!0}}if(ee)return ee=G,ne=ne(ee),G=K===""?"."+A(ee,0):K,b(ne)?(D="",G!=null&&(D=G.replace(L,"$&/")+"/"),N(ne,z,D,"",function(ce){return ce})):ne!=null&&(C(ne)&&(ne=j(ne,D+(!ne.key||ee&&ee.key===ne.key?"":(""+ne.key).replace(L,"$&/")+"/")+G)),z.push(ne)),1;if(ee=0,K=K===""?".":K+":",b(G))for(var ae=0;ae<G.length;ae++){Q=G[ae];var se=K+A(Q,ae);ee+=N(Q,z,D,se,ne)}else if(se=w(G),typeof se=="function")for(G=se.call(G),ae=0;!(Q=G.next()).done;)Q=Q.value,se=K+A(Q,ae++),ee+=N(Q,z,D,se,ne);else if(Q==="object")throw z=String(G),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return ee}function F(G,z,D){if(G==null)return G;var K=[],ne=0;return N(G,K,"","",function(Q){return z.call(D,Q,ne++)}),K}function U(G){if(G._status===-1){var z=G._result;z=z(),z.then(function(D){(G._status===0||G._status===-1)&&(G._status=1,G._result=D)},function(D){(G._status===0||G._status===-1)&&(G._status=2,G._result=D)}),G._status===-1&&(G._status=0,G._result=z)}if(G._status===1)return G._result.default;throw G._result}var W={current:null},$={transition:null},Z={ReactCurrentDispatcher:W,ReactCurrentBatchConfig:$,ReactCurrentOwner:I};function V(){throw Error("act(...) is not supported in production builds of React.")}return Br.Children={map:F,forEach:function(G,z,D){F(G,function(){z.apply(this,arguments)},D)},count:function(G){var z=0;return F(G,function(){z++}),z},toArray:function(G){return F(G,function(z){return z})||[]},only:function(G){if(!C(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},Br.Component=S,Br.Fragment=t,Br.Profiler=a,Br.PureComponent=g,Br.StrictMode=n,Br.Suspense=u,Br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Br.act=V,Br.cloneElement=function(G,z,D){if(G==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+G+".");var K=_({},G.props),ne=G.key,Q=G.ref,ee=G._owner;if(z!=null){if(z.ref!==void 0&&(Q=z.ref,ee=I.current),z.key!==void 0&&(ne=""+z.key),G.type&&G.type.defaultProps)var ae=G.type.defaultProps;for(se in z)O.call(z,se)&&!T.hasOwnProperty(se)&&(K[se]=z[se]===void 0&&ae!==void 0?ae[se]:z[se])}var se=arguments.length-2;if(se===1)K.children=D;else if(1<se){ae=Array(se);for(var ce=0;ce<se;ce++)ae[ce]=arguments[ce+2];K.children=ae}return{$$typeof:e,type:G.type,key:ne,ref:Q,props:K,_owner:ee}},Br.createContext=function(G){return G={$$typeof:o,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},G.Provider={$$typeof:i,_context:G},G.Consumer=G},Br.createElement=M,Br.createFactory=function(G){var z=M.bind(null,G);return z.type=G,z},Br.createRef=function(){return{current:null}},Br.forwardRef=function(G){return{$$typeof:l,render:G}},Br.isValidElement=C,Br.lazy=function(G){return{$$typeof:h,_payload:{_status:-1,_result:G},_init:U}},Br.memo=function(G,z){return{$$typeof:c,type:G,compare:z===void 0?null:z}},Br.startTransition=function(G){var z=$.transition;$.transition={};try{G()}finally{$.transition=z}},Br.unstable_act=V,Br.useCallback=function(G,z){return W.current.useCallback(G,z)},Br.useContext=function(G){return W.current.useContext(G)},Br.useDebugValue=function(){},Br.useDeferredValue=function(G){return W.current.useDeferredValue(G)},Br.useEffect=function(G,z){return W.current.useEffect(G,z)},Br.useId=function(){return W.current.useId()},Br.useImperativeHandle=function(G,z,D){return W.current.useImperativeHandle(G,z,D)},Br.useInsertionEffect=function(G,z){return W.current.useInsertionEffect(G,z)},Br.useLayoutEffect=function(G,z){return W.current.useLayoutEffect(G,z)},Br.useMemo=function(G,z){return W.current.useMemo(G,z)},Br.useReducer=function(G,z,D){return W.current.useReducer(G,z,D)},Br.useRef=function(G){return W.current.useRef(G)},Br.useState=function(G){return W.current.useState(G)},Br.useSyncExternalStore=function(G,z,D){return W.current.useSyncExternalStore(G,z,D)},Br.useTransition=function(){return W.current.useTransition()},Br.version="18.3.1",Br}var dy;function di(){return dy||(dy=1,B0.exports=J_()),B0.exports}var ni=di();const Vr=mp(ni);var r1={},q0={exports:{}},hs={},z0={exports:{}},U0={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var py;function e7(){return py||(py=1,function(e){function r($,Z){var V=$.length;$.push(Z);e:for(;0<V;){var G=V-1>>>1,z=$[G];if(0<a(z,Z))$[G]=Z,$[V]=z,V=G;else break e}}function t($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var Z=$[0],V=$.pop();if(V!==Z){$[0]=V;e:for(var G=0,z=$.length,D=z>>>1;G<D;){var K=2*(G+1)-1,ne=$[K],Q=K+1,ee=$[Q];if(0>a(ne,V))Q<z&&0>a(ee,ne)?($[G]=ee,$[Q]=V,G=Q):($[G]=ne,$[K]=V,G=K);else if(Q<z&&0>a(ee,V))$[G]=ee,$[Q]=V,G=Q;else break e}}return Z}function a($,Z){var V=$.sortIndex-Z.sortIndex;return V!==0?V:$.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],c=[],h=1,p=null,w=3,d=!1,_=!1,E=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v($){for(var Z=t(c);Z!==null;){if(Z.callback===null)n(c);else if(Z.startTime<=$)n(c),Z.sortIndex=Z.expirationTime,r(u,Z);else break;Z=t(c)}}function b($){if(E=!1,v($),!_)if(t(u)!==null)_=!0,U(O);else{var Z=t(c);Z!==null&&W(b,Z.startTime-$)}}function O($,Z){_=!1,E&&(E=!1,m(M),M=-1),d=!0;var V=w;try{for(v(Z),p=t(u);p!==null&&(!(p.expirationTime>Z)||$&&!x());){var G=p.callback;if(typeof G=="function"){p.callback=null,w=p.priorityLevel;var z=G(p.expirationTime<=Z);Z=e.unstable_now(),typeof z=="function"?p.callback=z:p===t(u)&&n(u),v(Z)}else n(u);p=t(u)}if(p!==null)var D=!0;else{var K=t(c);K!==null&&W(b,K.startTime-Z),D=!1}return D}finally{p=null,w=V,d=!1}}var I=!1,T=null,M=-1,j=5,C=-1;function x(){return!(e.unstable_now()-C<j)}function L(){if(T!==null){var $=e.unstable_now();C=$;var Z=!0;try{Z=T(!0,$)}finally{Z?A():(I=!1,T=null)}}else I=!1}var A;if(typeof g=="function")A=function(){g(L)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,F=N.port2;N.port1.onmessage=L,A=function(){F.postMessage(null)}}else A=function(){S(L,0)};function U($){T=$,I||(I=!0,A())}function W($,Z){M=S(function(){$(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){_||d||(_=!0,U(O))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return t(u)},e.unstable_next=function($){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var V=w;w=Z;try{return $()}finally{w=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,Z){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var V=w;w=$;try{return Z()}finally{w=V}},e.unstable_scheduleCallback=function($,Z,V){var G=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?G+V:G):V=G,$){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=V+z,$={id:h++,callback:Z,priorityLevel:$,startTime:V,expirationTime:z,sortIndex:-1},V>G?($.sortIndex=V,r(c,$),t(u)===null&&$===t(c)&&(E?(m(M),M=-1):E=!0,W(b,V-G))):($.sortIndex=z,r(u,$),_||d||(_=!0,U(O))),$},e.unstable_shouldYield=x,e.unstable_wrapCallback=function($){var Z=w;return function(){var V=w;w=Z;try{return $.apply(this,arguments)}finally{w=V}}}}(U0)),U0}var gy;function D2(){return gy||(gy=1,z0.exports=e7()),z0.exports}/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var vy;function t7(){if(vy)return hs;vy=1;var e=di(),r=D2();function t(s){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+s,k=1;k<arguments.length;k++)f+="&args[]="+encodeURIComponent(arguments[k]);return"Minified React error #"+s+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function i(s,f){o(s,f),o(s+"Capture",f)}function o(s,f){for(a[s]=f,s=0;s<f.length;s++)n.add(f[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,c=/^[: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][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function w(s){return u.call(p,s)?!0:u.call(h,s)?!1:c.test(s)?p[s]=!0:(h[s]=!0,!1)}function d(s,f,k,q){if(k!==null&&k.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":return q?!1:k!==null?!k.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function _(s,f,k,q){if(f===null||typeof f>"u"||d(s,f,k,q))return!0;if(q)return!1;if(k!==null)switch(k.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function E(s,f,k,q,J,ie,pe){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=q,this.attributeNamespace=J,this.mustUseProperty=k,this.propertyName=s,this.type=f,this.sanitizeURL=ie,this.removeEmptyString=pe}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){S[s]=new E(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var f=s[0];S[f]=new E(f,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){S[s]=new E(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){S[s]=new E(s,2,!1,s,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".split(" ").forEach(function(s){S[s]=new E(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){S[s]=new E(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){S[s]=new E(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){S[s]=new E(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){S[s]=new E(s,5,!1,s.toLowerCase(),null,!1,!1)});var m=/[\-:]([a-z])/g;function g(s){return s[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".split(" ").forEach(function(s){var f=s.replace(m,g);S[f]=new E(f,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var f=s.replace(m,g);S[f]=new E(f,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var f=s.replace(m,g);S[f]=new E(f,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){S[s]=new E(s,1,!1,s.toLowerCase(),null,!1,!1)}),S.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){S[s]=new E(s,1,!1,s.toLowerCase(),null,!0,!0)});function v(s,f,k,q){var J=S.hasOwnProperty(f)?S[f]:null;(J!==null?J.type!==0:q||!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(_(f,k,J,q)&&(k=null),q||J===null?w(f)&&(k===null?s.removeAttribute(f):s.setAttribute(f,""+k)):J.mustUseProperty?s[J.propertyName]=k===null?J.type===3?!1:"":k:(f=J.attributeName,q=J.attributeNamespace,k===null?s.removeAttribute(f):(J=J.type,k=J===3||J===4&&k===!0?"":""+k,q?s.setAttributeNS(q,f,k):s.setAttribute(f,k))))}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),I=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),x=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),$=Symbol.iterator;function Z(s){return s===null||typeof s!="object"?null:(s=$&&s[$]||s["@@iterator"],typeof s=="function"?s:null)}var V=Object.assign,G;function z(s){if(G===void 0)try{throw Error()}catch(k){var f=k.stack.trim().match(/\n( *(at )?)/);G=f&&f[1]||""}return`
|
|
26
|
-
`+G+s}var D=!1;function K(s,f){if(!s||D)return"";D=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(st){var q=st}Reflect.construct(s,[],f)}else{try{f.call()}catch(st){q=st}s.call(f.prototype)}else{try{throw Error()}catch(st){q=st}s()}}catch(st){if(st&&q&&typeof st.stack=="string"){for(var J=st.stack.split(`
|
|
27
|
-
`),ie=q.stack.split(`
|
|
28
|
-
`),pe=J.length-1,Te=ie.length-1;1<=pe&&0<=Te&&J[pe]!==ie[Te];)Te--;for(;1<=pe&&0<=Te;pe--,Te--)if(J[pe]!==ie[Te]){if(pe!==1||Te!==1)do if(pe--,Te--,0>Te||J[pe]!==ie[Te]){var Be=`
|
|
29
|
-
`+J[pe].replace(" at new "," at ");return s.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",s.displayName)),Be}while(1<=pe&&0<=Te);break}}}finally{D=!1,Error.prepareStackTrace=k}return(s=s?s.displayName||s.name:"")?z(s):""}function ne(s){switch(s.tag){case 5:return z(s.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return s=K(s.type,!1),s;case 11:return s=K(s.type.render,!1),s;case 1:return s=K(s.type,!0),s;default:return""}}function Q(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case T:return"Fragment";case I:return"Portal";case j:return"Profiler";case M:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case x:return(s.displayName||"Context")+".Consumer";case C:return(s._context.displayName||"Context")+".Provider";case L:var f=s.render;return s=s.displayName,s||(s=f.displayName||f.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case F:return f=s.displayName||null,f!==null?f:Q(s.type)||"Memo";case U:f=s._payload,s=s._init;try{return Q(s(f))}catch{}}return null}function ee(s){var f=s.type;switch(s.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=f.render,s=s.displayName||s.name||"",f.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Q(f);case 8:return f===M?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function ae(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function se(s){var f=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function ce(s){var f=se(s)?"checked":"value",k=Object.getOwnPropertyDescriptor(s.constructor.prototype,f),q=""+s[f];if(!s.hasOwnProperty(f)&&typeof k<"u"&&typeof k.get=="function"&&typeof k.set=="function"){var J=k.get,ie=k.set;return Object.defineProperty(s,f,{configurable:!0,get:function(){return J.call(this)},set:function(pe){q=""+pe,ie.call(this,pe)}}),Object.defineProperty(s,f,{enumerable:k.enumerable}),{getValue:function(){return q},setValue:function(pe){q=""+pe},stopTracking:function(){s._valueTracker=null,delete s[f]}}}}function me(s){s._valueTracker||(s._valueTracker=ce(s))}function Se(s){if(!s)return!1;var f=s._valueTracker;if(!f)return!0;var k=f.getValue(),q="";return s&&(q=se(s)?s.checked?"true":"false":s.value),s=q,s!==k?(f.setValue(s),!0):!1}function Oe(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ne(s,f){var k=f.checked;return V({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:k??s._wrapperState.initialChecked})}function xe(s,f){var k=f.defaultValue==null?"":f.defaultValue,q=f.checked!=null?f.checked:f.defaultChecked;k=ae(f.value!=null?f.value:k),s._wrapperState={initialChecked:q,initialValue:k,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function ve(s,f){f=f.checked,f!=null&&v(s,"checked",f,!1)}function Xe(s,f){ve(s,f);var k=ae(f.value),q=f.type;if(k!=null)q==="number"?(k===0&&s.value===""||s.value!=k)&&(s.value=""+k):s.value!==""+k&&(s.value=""+k);else if(q==="submit"||q==="reset"){s.removeAttribute("value");return}f.hasOwnProperty("value")?Ae(s,f.type,k):f.hasOwnProperty("defaultValue")&&Ae(s,f.type,ae(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(s.defaultChecked=!!f.defaultChecked)}function be(s,f,k){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var q=f.type;if(!(q!=="submit"&&q!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+s._wrapperState.initialValue,k||f===s.value||(s.value=f),s.defaultValue=f}k=s.name,k!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,k!==""&&(s.name=k)}function Ae(s,f,k){(f!=="number"||Oe(s.ownerDocument)!==s)&&(k==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+k&&(s.defaultValue=""+k))}var Ee=Array.isArray;function Le(s,f,k,q){if(s=s.options,f){f={};for(var J=0;J<k.length;J++)f["$"+k[J]]=!0;for(k=0;k<s.length;k++)J=f.hasOwnProperty("$"+s[k].value),s[k].selected!==J&&(s[k].selected=J),J&&q&&(s[k].defaultSelected=!0)}else{for(k=""+ae(k),f=null,J=0;J<s.length;J++){if(s[J].value===k){s[J].selected=!0,q&&(s[J].defaultSelected=!0);return}f!==null||s[J].disabled||(f=s[J])}f!==null&&(f.selected=!0)}}function he(s,f){if(f.dangerouslySetInnerHTML!=null)throw Error(t(91));return V({},f,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function ke(s,f){var k=f.value;if(k==null){if(k=f.children,f=f.defaultValue,k!=null){if(f!=null)throw Error(t(92));if(Ee(k)){if(1<k.length)throw Error(t(93));k=k[0]}f=k}f==null&&(f=""),k=f}s._wrapperState={initialValue:ae(k)}}function Re(s,f){var k=ae(f.value),q=ae(f.defaultValue);k!=null&&(k=""+k,k!==s.value&&(s.value=k),f.defaultValue==null&&s.defaultValue!==k&&(s.defaultValue=k)),q!=null&&(s.defaultValue=""+q)}function $e(s){var f=s.textContent;f===s._wrapperState.initialValue&&f!==""&&f!==null&&(s.value=f)}function vt(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wt(s,f){return s==null||s==="http://www.w3.org/1999/xhtml"?vt(f):s==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var at,mt=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,k,q,J){MSApp.execUnsafeLocalFunction(function(){return s(f,k,q,J)})}:s}(function(s,f){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=f;else{for(at=at||document.createElement("div"),at.innerHTML="<svg>"+f.valueOf().toString()+"</svg>",f=at.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}});function Je(s,f){if(f){var k=s.firstChild;if(k&&k===s.lastChild&&k.nodeType===3){k.nodeValue=f;return}}s.textContent=f}var nt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qt=["Webkit","ms","Moz","O"];Object.keys(nt).forEach(function(s){qt.forEach(function(f){f=f+s.charAt(0).toUpperCase()+s.substring(1),nt[f]=nt[s]})});function At(s,f,k){return f==null||typeof f=="boolean"||f===""?"":k||typeof f!="number"||f===0||nt.hasOwnProperty(s)&&nt[s]?(""+f).trim():f+"px"}function Ht(s,f){s=s.style;for(var k in f)if(f.hasOwnProperty(k)){var q=k.indexOf("--")===0,J=At(k,f[k],q);k==="float"&&(k="cssFloat"),q?s.setProperty(k,J):s[k]=J}}var zt=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ie(s,f){if(f){if(zt[s]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(t(137,s));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(t(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(t(61))}if(f.style!=null&&typeof f.style!="object")throw Error(t(62))}}function He(s,f){if(s.indexOf("-")===-1)return typeof f.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Nt=null;function ht(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var gt=null,_t=null,rr=null;function Wt(s){if(s=vu(s)){if(typeof gt!="function")throw Error(t(280));var f=s.stateNode;f&&(f=wi(f),gt(s.stateNode,s.type,f))}}function St(s){_t?rr?rr.push(s):rr=[s]:_t=s}function it(){if(_t){var s=_t,f=rr;if(rr=_t=null,Wt(s),f)for(s=0;s<f.length;s++)Wt(f[s])}}function Bt(s,f){return s(f)}function Ue(){}var De=!1;function bt(s,f,k){if(De)return s(f,k);De=!0;try{return Bt(s,f,k)}finally{De=!1,(_t!==null||rr!==null)&&(Ue(),it())}}function ze(s,f){var k=s.stateNode;if(k===null)return null;var q=wi(k);if(q===null)return null;k=q[f];e:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(q=!q.disabled)||(s=s.type,q=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!q;break e;default:s=!1}if(s)return null;if(k&&typeof k!="function")throw Error(t(231,f,typeof k));return k}var xt=!1;if(l)try{var kt={};Object.defineProperty(kt,"passive",{get:function(){xt=!0}}),window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{xt=!1}function Ft(s,f,k,q,J,ie,pe,Te,Be){var st=Array.prototype.slice.call(arguments,3);try{f.apply(k,st)}catch(Ot){this.onError(Ot)}}var Ut=!1,Yt=null,_r=!1,kr=null,Lr={onError:function(s){Ut=!0,Yt=s}};function Nr(s,f,k,q,J,ie,pe,Te,Be){Ut=!1,Yt=null,Ft.apply(Lr,arguments)}function Wn(s,f,k,q,J,ie,pe,Te,Be){if(Nr.apply(this,arguments),Ut){if(Ut){var st=Yt;Ut=!1,Yt=null}else throw Error(t(198));_r||(_r=!0,kr=st)}}function en(s){var f=s,k=s;if(s.alternate)for(;f.return;)f=f.return;else{s=f;do f=s,(f.flags&4098)!==0&&(k=f.return),s=f.return;while(s)}return f.tag===3?k:null}function Qn(s){if(s.tag===13){var f=s.memoizedState;if(f===null&&(s=s.alternate,s!==null&&(f=s.memoizedState)),f!==null)return f.dehydrated}return null}function _i(s){if(en(s)!==s)throw Error(t(188))}function Ni(s){var f=s.alternate;if(!f){if(f=en(s),f===null)throw Error(t(188));return f!==s?null:s}for(var k=s,q=f;;){var J=k.return;if(J===null)break;var ie=J.alternate;if(ie===null){if(q=J.return,q!==null){k=q;continue}break}if(J.child===ie.child){for(ie=J.child;ie;){if(ie===k)return _i(J),s;if(ie===q)return _i(J),f;ie=ie.sibling}throw Error(t(188))}if(k.return!==q.return)k=J,q=ie;else{for(var pe=!1,Te=J.child;Te;){if(Te===k){pe=!0,k=J,q=ie;break}if(Te===q){pe=!0,q=J,k=ie;break}Te=Te.sibling}if(!pe){for(Te=ie.child;Te;){if(Te===k){pe=!0,k=ie,q=J;break}if(Te===q){pe=!0,q=ie,k=J;break}Te=Te.sibling}if(!pe)throw Error(t(189))}}if(k.alternate!==q)throw Error(t(190))}if(k.tag!==3)throw Error(t(188));return k.stateNode.current===k?s:f}function Si(s){return s=Ni(s),s!==null?fa(s):null}function fa(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var f=fa(s);if(f!==null)return f;s=s.sibling}return null}var ws=r.unstable_scheduleCallback,Vo=r.unstable_cancelCallback,tu=r.unstable_shouldYield,vc=r.unstable_requestPaint,Mn=r.unstable_now,Bu=r.unstable_getCurrentPriorityLevel,oo=r.unstable_ImmediatePriority,dl=r.unstable_UserBlockingPriority,Hs=r.unstable_NormalPriority,qu=r.unstable_LowPriority,ru=r.unstable_IdlePriority,so=null,pi=null;function Kr(s){if(pi&&typeof pi.onCommitFiberRoot=="function")try{pi.onCommitFiberRoot(so,s,void 0,(s.current.flags&128)===128)}catch{}}var Ar=Math.clz32?Math.clz32:Ti,ln=Math.log,gi=Math.LN2;function Ti(s){return s>>>=0,s===0?32:31-(ln(s)/gi|0)|0}var Ia=64,ja=4194304;function ii(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Ri(s,f){var k=s.pendingLanes;if(k===0)return 0;var q=0,J=s.suspendedLanes,ie=s.pingedLanes,pe=k&268435455;if(pe!==0){var Te=pe&~J;Te!==0?q=ii(Te):(ie&=pe,ie!==0&&(q=ii(ie)))}else pe=k&~J,pe!==0?q=ii(pe):ie!==0&&(q=ii(ie));if(q===0)return 0;if(f!==0&&f!==q&&(f&J)===0&&(J=q&-q,ie=f&-f,J>=ie||J===16&&(ie&4194240)!==0))return f;if((q&4)!==0&&(q|=k&16),f=s.entangledLanes,f!==0)for(s=s.entanglements,f&=q;0<f;)k=31-Ar(f),J=1<<k,q|=s[k],f&=~J;return q}function pl(s,f){switch(s){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ha(s,f){for(var k=s.suspendedLanes,q=s.pingedLanes,J=s.expirationTimes,ie=s.pendingLanes;0<ie;){var pe=31-Ar(ie),Te=1<<pe,Be=J[pe];Be===-1?((Te&k)===0||(Te&q)!==0)&&(J[pe]=pl(Te,f)):Be<=f&&(s.expiredLanes|=Te),ie&=~Te}}function Wo(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function nu(){var s=Ia;return Ia<<=1,(Ia&4194240)===0&&(Ia=64),s}function da(s){for(var f=[],k=0;31>k;k++)f.push(s);return f}function Gs(s,f,k){s.pendingLanes|=f,f!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,f=31-Ar(f),s[f]=k}function af(s,f){var k=s.pendingLanes&~f;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=f,s.mutableReadLanes&=f,s.entangledLanes&=f,f=s.entanglements;var q=s.eventTimes;for(s=s.expirationTimes;0<k;){var J=31-Ar(k),ie=1<<J;f[J]=0,q[J]=-1,s[J]=-1,k&=~ie}}function iu(s,f){var k=s.entangledLanes|=f;for(s=s.entanglements;k;){var q=31-Ar(k),J=1<<q;J&f|s[q]&f&&(s[q]|=f),k&=~J}}var Ir=0;function _s(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Vs,Ws,mc,$o,Ss,xs=!1,Es=[],gn=null,Yo=null,Fa=null,It=new Map,$s=new Map,lo=[],Oo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zu(s,f){switch(s){case"focusin":case"focusout":gn=null;break;case"dragenter":case"dragleave":Yo=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":It.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(f.pointerId)}}function Ys(s,f,k,q,J,ie){return s===null||s.nativeEvent!==ie?(s={blockedOn:f,domEventName:k,eventSystemFlags:q,nativeEvent:ie,targetContainers:[J]},f!==null&&(f=vu(f),f!==null&&Ws(f)),s):(s.eventSystemFlags|=q,f=s.targetContainers,J!==null&&f.indexOf(J)===-1&&f.push(J),s)}function In(s,f,k,q,J){switch(f){case"focusin":return gn=Ys(gn,s,f,k,q,J),!0;case"dragenter":return Yo=Ys(Yo,s,f,k,q,J),!0;case"mouseover":return Fa=Ys(Fa,s,f,k,q,J),!0;case"pointerover":var ie=J.pointerId;return It.set(ie,Ys(It.get(ie)||null,s,f,k,q,J)),!0;case"gotpointercapture":return ie=J.pointerId,$s.set(ie,Ys($s.get(ie)||null,s,f,k,q,J)),!0}return!1}function Xs(s){var f=Ls(s.target);if(f!==null){var k=en(f);if(k!==null){if(f=k.tag,f===13){if(f=Qn(k),f!==null){s.blockedOn=f,Ss(s.priority,function(){mc(k)});return}}else if(f===3&&k.stateNode.current.memoizedState.isDehydrated){s.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}s.blockedOn=null}function au(s){if(s.blockedOn!==null)return!1;for(var f=s.targetContainers;0<f.length;){var k=gl(s.domEventName,s.eventSystemFlags,f[0],s.nativeEvent);if(k===null){k=s.nativeEvent;var q=new k.constructor(k.type,k);Nt=q,k.target.dispatchEvent(q),Nt=null}else return f=vu(k),f!==null&&Ws(f),s.blockedOn=k,!1;f.shift()}return!0}function ou(s,f,k){au(s)&&k.delete(f)}function of(){xs=!1,gn!==null&&au(gn)&&(gn=null),Yo!==null&&au(Yo)&&(Yo=null),Fa!==null&&au(Fa)&&(Fa=null),It.forEach(ou),$s.forEach(ou)}function uo(s,f){s.blockedOn===f&&(s.blockedOn=null,xs||(xs=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,of)))}function ai(s){function f(J){return uo(J,s)}if(0<Es.length){uo(Es[0],s);for(var k=1;k<Es.length;k++){var q=Es[k];q.blockedOn===s&&(q.blockedOn=null)}}for(gn!==null&&uo(gn,s),Yo!==null&&uo(Yo,s),Fa!==null&&uo(Fa,s),It.forEach(f),$s.forEach(f),k=0;k<lo.length;k++)q=lo[k],q.blockedOn===s&&(q.blockedOn=null);for(;0<lo.length&&(k=lo[0],k.blockedOn===null);)Xs(k),k.blockedOn===null&&lo.shift()}var Da=b.ReactCurrentBatchConfig,su=!0;function Mi(s,f,k,q){var J=Ir,ie=Da.transition;Da.transition=null;try{Ir=1,Ao(s,f,k,q)}finally{Ir=J,Da.transition=ie}}function Ba(s,f,k,q){var J=Ir,ie=Da.transition;Da.transition=null;try{Ir=4,Ao(s,f,k,q)}finally{Ir=J,Da.transition=ie}}function Ao(s,f,k,q){if(su){var J=gl(s,f,k,q);if(J===null)du(s,f,q,Ps,k),zu(s,q);else if(In(J,s,f,k,q))q.stopPropagation();else if(zu(s,q),f&4&&-1<Oo.indexOf(s)){for(;J!==null;){var ie=vu(J);if(ie!==null&&Vs(ie),ie=gl(s,f,k,q),ie===null&&du(s,f,q,Ps,k),ie===J)break;J=ie}J!==null&&q.stopPropagation()}else du(s,f,q,null,k)}}var Ps=null;function gl(s,f,k,q){if(Ps=null,s=ht(q),s=Ls(s),s!==null)if(f=en(s),f===null)s=null;else if(k=f.tag,k===13){if(s=Qn(f),s!==null)return s;s=null}else if(k===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;s=null}else f!==s&&(s=null);return Ps=s,null}function Uu(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bu()){case oo:return 1;case dl:return 4;case Hs:case qu:return 16;case ru:return 536870912;default:return 16}default:return 16}}var oi=null,Ii=null,ji=null;function vl(){if(ji)return ji;var s,f=Ii,k=f.length,q,J="value"in oi?oi.value:oi.textContent,ie=J.length;for(s=0;s<k&&f[s]===J[s];s++);var pe=k-s;for(q=1;q<=pe&&f[k-q]===J[ie-q];q++);return ji=J.slice(s,1<q?1-q:void 0)}function xa(s){var f=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&f===13&&(s=13)):s=f,s===10&&(s=13),32<=s||s===13?s:0}function wn(){return!0}function Fi(){return!1}function _n(s){function f(k,q,J,ie,pe){this._reactName=k,this._targetInst=J,this.type=q,this.nativeEvent=ie,this.target=pe,this.currentTarget=null;for(var Te in s)s.hasOwnProperty(Te)&&(k=s[Te],this[Te]=k?k(ie):ie[Te]);return this.isDefaultPrevented=(ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue===!1)?wn:Fi,this.isPropagationStopped=Fi,this}return V(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),f}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ta=_n(ea),qa=V({},ea,{view:0,detail:0}),lu=_n(qa),Os,Ks,$n,vi=V({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dt,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==$n&&($n&&s.type==="mousemove"?(Os=s.screenX-$n.screenX,Ks=s.screenY-$n.screenY):Ks=Os=0,$n=s),Os)},movementY:function(s){return"movementY"in s?s.movementY:Ks}}),tn=_n(vi),Zs=V({},vi,{dataTransfer:0}),za=_n(Zs),ml=V({},qa,{relatedTarget:0}),Xo=_n(ml),yl=V({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),Ko=_n(yl),uu=V({},ea,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Y=_n(uu),fe=V({},ea,{data:0}),Ce=_n(fe),je={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},et={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ft={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Et(s){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(s):(s=ft[s])?!!f[s]:!1}function Dt(){return Et}var ir=V({},qa,{key:function(s){if(s.key){var f=je[s.key]||s.key;if(f!=="Unidentified")return f}return s.type==="keypress"?(s=xa(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?et[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dt,charCode:function(s){return s.type==="keypress"?xa(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?xa(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),gr=_n(ir),dr=V({},vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sr=_n(dr),Cn=V({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dt}),Sn=_n(Cn),jn=V({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jn=_n(jn),si=V({},vi,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Ua=_n(si),Ea=[9,13,27,32],Pa=l&&"CompositionEvent"in window,Zo=null;l&&"documentMode"in document&&(Zo=document.documentMode);var Qo=l&&"TextEvent"in window&&!Zo,Di=l&&(!Pa||Zo&&8<Zo&&11>=Zo),Ha=" ",Qs=!1;function bl(s,f){switch(s){case"keyup":return Ea.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ra(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var rn=!1;function Js(s,f){switch(s){case"compositionend":return ra(f);case"keypress":return f.which!==32?null:(Qs=!0,Ha);case"textInput":return s=f.data,s===Ha&&Qs?null:s;default:return null}}function wl(s,f){if(rn)return s==="compositionend"||!Pa&&bl(s,f)?(s=vl(),ji=Ii=oi=null,rn=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return Di&&f.locale!=="ko"?null:f.data;default:return null}}var Oa={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ga(s){var f=s&&s.nodeName&&s.nodeName.toLowerCase();return f==="input"?!!Oa[s.type]:f==="textarea"}function xi(s,f,k,q){St(q),f=yc(f,"onChange"),0<f.length&&(k=new ta("onChange","change",null,k,q),s.push({event:k,listeners:f}))}var el=null,co=null;function Hu(s){fu(s,0)}function mi(s){var f=ui(s);if(Se(f))return s}function Bi(s,f){if(s==="change")return f}var As=!1;if(l){var Co;if(l){var yi="oninput"in document;if(!yi){var Jo=document.createElement("div");Jo.setAttribute("oninput","return;"),yi=typeof Jo.oninput=="function"}Co=yi}else Co=!1;As=Co&&(!document.documentMode||9<document.documentMode)}function li(){el&&(el.detachEvent("onpropertychange",qi),co=el=null)}function qi(s){if(s.propertyName==="value"&&mi(co)){var f=[];xi(f,co,s,ht(s)),bt(Hu,f)}}function es(s,f,k){s==="focusin"?(li(),el=f,co=k,el.attachEvent("onpropertychange",qi)):s==="focusout"&&li()}function $r(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return mi(co)}function fo(s,f){if(s==="click")return mi(f)}function tl(s,f){if(s==="input"||s==="change")return mi(f)}function ko(s,f){return s===f&&(s!==0||1/s===1/f)||s!==s&&f!==f}var jr=typeof Object.is=="function"?Object.is:ko;function Lo(s,f){if(jr(s,f))return!0;if(typeof s!="object"||s===null||typeof f!="object"||f===null)return!1;var k=Object.keys(s),q=Object.keys(f);if(k.length!==q.length)return!1;for(q=0;q<k.length;q++){var J=k[q];if(!u.call(f,J)||!jr(s[J],f[J]))return!1}return!0}function Yn(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Tr(s,f){var k=Yn(s);s=0;for(var q;k;){if(k.nodeType===3){if(q=s+k.textContent.length,s<=f&&q>=f)return{node:k,offset:f-s};s=q}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=Yn(k)}}function xn(s,f){return s&&f?s===f?!0:s&&s.nodeType===3?!1:f&&f.nodeType===3?xn(s,f.parentNode):"contains"in s?s.contains(f):s.compareDocumentPosition?!!(s.compareDocumentPosition(f)&16):!1:!1}function Xn(){for(var s=window,f=Oe();f instanceof s.HTMLIFrameElement;){try{var k=typeof f.contentWindow.location.href=="string"}catch{k=!1}if(k)s=f.contentWindow;else break;f=Oe(s.document)}return f}function ts(s){var f=s&&s.nodeName&&s.nodeName.toLowerCase();return f&&(f==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||f==="textarea"||s.contentEditable==="true")}function No(s){var f=Xn(),k=s.focusedElem,q=s.selectionRange;if(f!==k&&k&&k.ownerDocument&&xn(k.ownerDocument.documentElement,k)){if(q!==null&&ts(k)){if(f=q.start,s=q.end,s===void 0&&(s=f),"selectionStart"in k)k.selectionStart=f,k.selectionEnd=Math.min(s,k.value.length);else if(s=(f=k.ownerDocument||document)&&f.defaultView||window,s.getSelection){s=s.getSelection();var J=k.textContent.length,ie=Math.min(q.start,J);q=q.end===void 0?ie:Math.min(q.end,J),!s.extend&&ie>q&&(J=q,q=ie,ie=J),J=Tr(k,ie);var pe=Tr(k,q);J&&pe&&(s.rangeCount!==1||s.anchorNode!==J.node||s.anchorOffset!==J.offset||s.focusNode!==pe.node||s.focusOffset!==pe.offset)&&(f=f.createRange(),f.setStart(J.node,J.offset),s.removeAllRanges(),ie>q?(s.addRange(f),s.extend(pe.node,pe.offset)):(f.setEnd(pe.node,pe.offset),s.addRange(f)))}}for(f=[],s=k;s=s.parentNode;)s.nodeType===1&&f.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<f.length;k++)s=f[k],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var To=l&&"documentMode"in document&&11>=document.documentMode,Va=null,kn=null,ho=null,Ro=!1;function Mo(s,f,k){var q=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;Ro||Va==null||Va!==Oe(q)||(q=Va,"selectionStart"in q&&ts(q)?q={start:q.selectionStart,end:q.selectionEnd}:(q=(q.ownerDocument&&q.ownerDocument.defaultView||window).getSelection(),q={anchorNode:q.anchorNode,anchorOffset:q.anchorOffset,focusNode:q.focusNode,focusOffset:q.focusOffset}),ho&&Lo(ho,q)||(ho=q,q=yc(kn,"onSelect"),0<q.length&&(f=new ta("onSelect","select",null,f,k),s.push({event:f,listeners:q}),f.target=Va)))}function zi(s,f){var k={};return k[s.toLowerCase()]=f.toLowerCase(),k["Webkit"+s]="webkit"+f,k["Moz"+s]="moz"+f,k}var un={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionend:zi("Transition","TransitionEnd")},Ei={},nn={};l&&(nn=document.createElement("div").style,"AnimationEvent"in window||(delete un.animationend.animation,delete un.animationiteration.animation,delete un.animationstart.animation),"TransitionEvent"in window||delete un.transitionend.transition);function Yr(s){if(Ei[s])return Ei[s];if(!un[s])return s;var f=un[s],k;for(k in f)if(f.hasOwnProperty(k)&&k in nn)return Ei[s]=f[k];return s}var Fn=Yr("animationend"),ei=Yr("animationiteration"),Io=Yr("animationstart"),_l=Yr("transitionend"),rl=new Map,cu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jo(s,f){rl.set(s,f),i(f,[s])}for(var Sl=0;Sl<cu.length;Sl++){var bi=cu[Sl],Wa=bi.toLowerCase(),xl=bi[0].toUpperCase()+bi.slice(1);jo(Wa,"on"+xl)}jo(Fn,"onAnimationEnd"),jo(ei,"onAnimationIteration"),jo(Io,"onAnimationStart"),jo("dblclick","onDoubleClick"),jo("focusin","onFocus"),jo("focusout","onBlur"),jo(_l,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function El(s,f,k){var q=s.type||"unknown-event";s.currentTarget=k,Wn(q,f,void 0,s),s.currentTarget=null}function fu(s,f){f=(f&4)!==0;for(var k=0;k<s.length;k++){var q=s[k],J=q.event;q=q.listeners;e:{var ie=void 0;if(f)for(var pe=q.length-1;0<=pe;pe--){var Te=q[pe],Be=Te.instance,st=Te.currentTarget;if(Te=Te.listener,Be!==ie&&J.isPropagationStopped())break e;El(J,Te,st),ie=Be}else for(pe=0;pe<q.length;pe++){if(Te=q[pe],Be=Te.instance,st=Te.currentTarget,Te=Te.listener,Be!==ie&&J.isPropagationStopped())break e;El(J,Te,st),ie=Be}}}if(_r)throw s=kr,_r=!1,kr=null,s}function cn(s,f){var k=f[pa];k===void 0&&(k=f[pa]=new Set);var q=s+"__bubble";k.has(q)||(hu(f,s,2,!1),k.add(q))}function Gu(s,f,k){var q=0;f&&(q|=4),hu(k,s,q,f)}var Pl="_reactListening"+Math.random().toString(36).slice(2);function Cs(s){if(!s[Pl]){s[Pl]=!0,n.forEach(function(k){k!=="selectionchange"&&(sf.has(k)||Gu(k,!1,s),Gu(k,!0,s))});var f=s.nodeType===9?s:s.ownerDocument;f===null||f[Pl]||(f[Pl]=!0,Gu("selectionchange",!1,f))}}function hu(s,f,k,q){switch(Uu(f)){case 1:var J=Mi;break;case 4:J=Ba;break;default:J=Ao}k=J.bind(null,f,k,s),J=void 0,!xt||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(J=!0),q?J!==void 0?s.addEventListener(f,k,{capture:!0,passive:J}):s.addEventListener(f,k,!0):J!==void 0?s.addEventListener(f,k,{passive:J}):s.addEventListener(f,k,!1)}function du(s,f,k,q,J){var ie=q;if((f&1)===0&&(f&2)===0&&q!==null)e:for(;;){if(q===null)return;var pe=q.tag;if(pe===3||pe===4){var Te=q.stateNode.containerInfo;if(Te===J||Te.nodeType===8&&Te.parentNode===J)break;if(pe===4)for(pe=q.return;pe!==null;){var Be=pe.tag;if((Be===3||Be===4)&&(Be=pe.stateNode.containerInfo,Be===J||Be.nodeType===8&&Be.parentNode===J))return;pe=pe.return}for(;Te!==null;){if(pe=Ls(Te),pe===null)return;if(Be=pe.tag,Be===5||Be===6){q=ie=pe;continue e}Te=Te.parentNode}}q=q.return}bt(function(){var st=ie,Ot=ht(k),Ct=[];e:{var Pt=rl.get(s);if(Pt!==void 0){var Xt=ta,er=s;switch(s){case"keypress":if(xa(k)===0)break e;case"keydown":case"keyup":Xt=gr;break;case"focusin":er="focus",Xt=Xo;break;case"focusout":er="blur",Xt=Xo;break;case"beforeblur":case"afterblur":Xt=Xo;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Xt=tn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Xt=za;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Xt=Sn;break;case Fn:case ei:case Io:Xt=Ko;break;case _l:Xt=Jn;break;case"scroll":Xt=lu;break;case"wheel":Xt=Ua;break;case"copy":case"cut":case"paste":Xt=Y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Xt=Sr}var or=(f&4)!==0,Yi=!or&&s==="scroll",tt=or?Pt!==null?Pt+"Capture":null:Pt;or=[];for(var Ve=st,rt;Ve!==null;){rt=Ve;var Tt=rt.stateNode;if(rt.tag===5&&Tt!==null&&(rt=Tt,tt!==null&&(Tt=ze(Ve,tt),Tt!=null&&or.push(pu(Ve,Tt,rt)))),Yi)break;Ve=Ve.return}0<or.length&&(Pt=new Xt(Pt,er,null,k,Ot),Ct.push({event:Pt,listeners:or}))}}if((f&7)===0){e:{if(Pt=s==="mouseover"||s==="pointerover",Xt=s==="mouseout"||s==="pointerout",Pt&&k!==Nt&&(er=k.relatedTarget||k.fromElement)&&(Ls(er)||er[Gi]))break e;if((Xt||Pt)&&(Pt=Ot.window===Ot?Ot:(Pt=Ot.ownerDocument)?Pt.defaultView||Pt.parentWindow:window,Xt?(er=k.relatedTarget||k.toElement,Xt=st,er=er?Ls(er):null,er!==null&&(Yi=en(er),er!==Yi||er.tag!==5&&er.tag!==6)&&(er=null)):(Xt=null,er=st),Xt!==er)){if(or=tn,Tt="onMouseLeave",tt="onMouseEnter",Ve="mouse",(s==="pointerout"||s==="pointerover")&&(or=Sr,Tt="onPointerLeave",tt="onPointerEnter",Ve="pointer"),Yi=Xt==null?Pt:ui(Xt),rt=er==null?Pt:ui(er),Pt=new or(Tt,Ve+"leave",Xt,k,Ot),Pt.target=Yi,Pt.relatedTarget=rt,Tt=null,Ls(Ot)===st&&(or=new or(tt,Ve+"enter",er,k,Ot),or.target=rt,or.relatedTarget=Yi,Tt=or),Yi=Tt,Xt&&er)t:{for(or=Xt,tt=er,Ve=0,rt=or;rt;rt=nl(rt))Ve++;for(rt=0,Tt=tt;Tt;Tt=nl(Tt))rt++;for(;0<Ve-rt;)or=nl(or),Ve--;for(;0<rt-Ve;)tt=nl(tt),rt--;for(;Ve--;){if(or===tt||tt!==null&&or===tt.alternate)break t;or=nl(or),tt=nl(tt)}or=null}else or=null;Xt!==null&&qf(Ct,Pt,Xt,or,!1),er!==null&&Yi!==null&&qf(Ct,Yi,er,or,!0)}}e:{if(Pt=st?ui(st):window,Xt=Pt.nodeName&&Pt.nodeName.toLowerCase(),Xt==="select"||Xt==="input"&&Pt.type==="file")var sr=Bi;else if(Ga(Pt))if(As)sr=tl;else{sr=$r;var cr=es}else(Xt=Pt.nodeName)&&Xt.toLowerCase()==="input"&&(Pt.type==="checkbox"||Pt.type==="radio")&&(sr=fo);if(sr&&(sr=sr(s,st))){xi(Ct,sr,k,Ot);break e}cr&&cr(s,Pt,st),s==="focusout"&&(cr=Pt._wrapperState)&&cr.controlled&&Pt.type==="number"&&Ae(Pt,"number",Pt.value)}switch(cr=st?ui(st):window,s){case"focusin":(Ga(cr)||cr.contentEditable==="true")&&(Va=cr,kn=st,ho=null);break;case"focusout":ho=kn=Va=null;break;case"mousedown":Ro=!0;break;case"contextmenu":case"mouseup":case"dragend":Ro=!1,Mo(Ct,k,Ot);break;case"selectionchange":if(To)break;case"keydown":case"keyup":Mo(Ct,k,Ot)}var fr;if(Pa)e:{switch(s){case"compositionstart":var mr="onCompositionStart";break e;case"compositionend":mr="onCompositionEnd";break e;case"compositionupdate":mr="onCompositionUpdate";break e}mr=void 0}else rn?bl(s,k)&&(mr="onCompositionEnd"):s==="keydown"&&k.keyCode===229&&(mr="onCompositionStart");mr&&(Di&&k.locale!=="ko"&&(rn||mr!=="onCompositionStart"?mr==="onCompositionEnd"&&rn&&(fr=vl()):(oi=Ot,Ii="value"in oi?oi.value:oi.textContent,rn=!0)),cr=yc(st,mr),0<cr.length&&(mr=new Ce(mr,s,null,k,Ot),Ct.push({event:mr,listeners:cr}),fr?mr.data=fr:(fr=ra(k),fr!==null&&(mr.data=fr)))),(fr=Qo?Js(s,k):wl(s,k))&&(st=yc(st,"onBeforeInput"),0<st.length&&(Ot=new Ce("onBeforeInput","beforeinput",null,k,Ot),Ct.push({event:Ot,listeners:st}),Ot.data=fr))}fu(Ct,f)})}function pu(s,f,k){return{instance:s,listener:f,currentTarget:k}}function yc(s,f){for(var k=f+"Capture",q=[];s!==null;){var J=s,ie=J.stateNode;J.tag===5&&ie!==null&&(J=ie,ie=ze(s,k),ie!=null&&q.unshift(pu(s,ie,J)),ie=ze(s,f),ie!=null&&q.push(pu(s,ie,J))),s=s.return}return q}function nl(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function qf(s,f,k,q,J){for(var ie=f._reactName,pe=[];k!==null&&k!==q;){var Te=k,Be=Te.alternate,st=Te.stateNode;if(Be!==null&&Be===q)break;Te.tag===5&&st!==null&&(Te=st,J?(Be=ze(k,ie),Be!=null&&pe.unshift(pu(k,Be,Te))):J||(Be=ze(k,ie),Be!=null&&pe.push(pu(k,Be,Te)))),k=k.return}pe.length!==0&&s.push({event:f,listeners:pe})}var Bh=/\r\n?/g,zf=/\u0000|\uFFFD/g;function lf(s){return(typeof s=="string"?s:""+s).replace(Bh,`
|
|
30
|
-
`).replace(zf,"")}function Vu(s,f,k){if(f=lf(f),lf(s)!==f&&k)throw Error(t(425))}function ks(){}var Wu=null,Ol=null;function uf(s,f){return s==="textarea"||s==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var $a=typeof setTimeout=="function"?setTimeout:void 0,bc=typeof clearTimeout=="function"?clearTimeout:void 0,$u=typeof Promise=="function"?Promise:void 0,Uf=typeof queueMicrotask=="function"?queueMicrotask:typeof $u<"u"?function(s){return $u.resolve(null).then(s).catch(Hf)}:$a;function Hf(s){setTimeout(function(){throw s})}function wc(s,f){var k=f,q=0;do{var J=k.nextSibling;if(s.removeChild(k),J&&J.nodeType===8)if(k=J.data,k==="/$"){if(q===0){s.removeChild(J),ai(f);return}q--}else k!=="$"&&k!=="$?"&&k!=="$!"||q++;k=J}while(k);ai(f)}function Ui(s){for(;s!=null;s=s.nextSibling){var f=s.nodeType;if(f===1||f===3)break;if(f===8){if(f=s.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return s}function Hi(s){s=s.previousSibling;for(var f=0;s;){if(s.nodeType===8){var k=s.data;if(k==="$"||k==="$!"||k==="$?"){if(f===0)return s;f--}else k==="/$"&&f++}s=s.previousSibling}return null}var na=Math.random().toString(36).slice(2),po="__reactFiber$"+na,gu="__reactProps$"+na,Gi="__reactContainer$"+na,pa="__reactEvents$"+na,Gf="__reactListeners$"+na,Vf="__reactHandles$"+na;function Ls(s){var f=s[po];if(f)return f;for(var k=s.parentNode;k;){if(f=k[Gi]||k[po]){if(k=f.alternate,f.child!==null||k!==null&&k.child!==null)for(s=Hi(s);s!==null;){if(k=s[po])return k;s=Hi(s)}return f}s=k,k=s.parentNode}return null}function vu(s){return s=s[po]||s[Gi],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ui(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(t(33))}function wi(s){return s[gu]||null}var _c=[],rs=-1;function go(s){return{current:s}}function Zr(s){0>rs||(s.current=_c[rs],_c[rs]=null,rs--)}function an(s,f){rs++,_c[rs]=s.current,s.current=f}var ns={},Pi=go(ns),ia=go(!1),il=ns;function Al(s,f){var k=s.type.contextTypes;if(!k)return ns;var q=s.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===f)return q.__reactInternalMemoizedMaskedChildContext;var J={},ie;for(ie in k)J[ie]=f[ie];return q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=f,s.__reactInternalMemoizedMaskedChildContext=J),J}function aa(s){return s=s.childContextTypes,s!=null}function mu(){Zr(ia),Zr(Pi)}function cf(s,f,k){if(Pi.current!==ns)throw Error(t(168));an(Pi,f),an(ia,k)}function Yu(s,f,k){var q=s.stateNode;if(f=f.childContextTypes,typeof q.getChildContext!="function")return k;q=q.getChildContext();for(var J in q)if(!(J in f))throw Error(t(108,ee(s)||"Unknown",J));return V({},k,q)}function is(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||ns,il=Pi.current,an(Pi,s),an(ia,ia.current),!0}function Wf(s,f,k){var q=s.stateNode;if(!q)throw Error(t(169));k?(s=Yu(s,f,il),q.__reactInternalMemoizedMergedChildContext=s,Zr(ia),Zr(Pi),an(Pi,s)):Zr(ia),an(ia,k)}var as=null,Cl=!1,R=!1;function H(s){as===null?as=[s]:as.push(s)}function te(s){Cl=!0,H(s)}function oe(){if(!R&&as!==null){R=!0;var s=0,f=Ir;try{var k=as;for(Ir=1;s<k.length;s++){var q=k[s];do q=q(!0);while(q!==null)}as=null,Cl=!1}catch(J){throw as!==null&&(as=as.slice(s+1)),ws(oo,oe),J}finally{Ir=f,R=!1}}return null}var ue=[],de=0,ge=null,ye=0,we=[],Pe=0,Fe=null,Qe=1,Ye="";function We(s,f){ue[de++]=ye,ue[de++]=ge,ge=s,ye=f}function yt(s,f,k){we[Pe++]=Qe,we[Pe++]=Ye,we[Pe++]=Fe,Fe=s;var q=Qe;s=Ye;var J=32-Ar(q)-1;q&=~(1<<J),k+=1;var ie=32-Ar(f)+J;if(30<ie){var pe=J-J%5;ie=(q&(1<<pe)-1).toString(32),q>>=pe,J-=pe,Qe=1<<32-Ar(f)+J|k<<J|q,Ye=ie+s}else Qe=1<<ie|k<<J|q,Ye=s}function lt(s){s.return!==null&&(We(s,1),yt(s,1,0))}function Me(s){for(;s===ge;)ge=ue[--de],ue[de]=null,ye=ue[--de],ue[de]=null;for(;s===Fe;)Fe=we[--Pe],we[Pe]=null,Ye=we[--Pe],we[Pe]=null,Qe=we[--Pe],we[Pe]=null}var qe=null,Ge=null,ct=!1,pt=null;function Gt(s,f){var k=ll(5,null,null,0);k.elementType="DELETED",k.stateNode=f,k.return=s,f=s.deletions,f===null?(s.deletions=[k],s.flags|=16):f.push(k)}function jt(s,f){switch(s.tag){case 5:var k=s.type;return f=f.nodeType!==1||k.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(s.stateNode=f,qe=s,Ge=Ui(f.firstChild),!0):!1;case 6:return f=s.pendingProps===""||f.nodeType!==3?null:f,f!==null?(s.stateNode=f,qe=s,Ge=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?(k=Fe!==null?{id:Qe,overflow:Ye}:null,s.memoizedState={dehydrated:f,treeContext:k,retryLane:1073741824},k=ll(18,null,null,0),k.stateNode=f,k.return=s,s.child=k,qe=s,Ge=null,!0):!1;default:return!1}}function ar(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Mt(s){if(ct){var f=Ge;if(f){var k=f;if(!jt(s,f)){if(ar(s))throw Error(t(418));f=Ui(k.nextSibling);var q=qe;f&&jt(s,f)?Gt(q,k):(s.flags=s.flags&-4097|2,ct=!1,qe=s)}}else{if(ar(s))throw Error(t(418));s.flags=s.flags&-4097|2,ct=!1,qe=s}}}function Fr(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;qe=s}function qr(s){if(s!==qe)return!1;if(!ct)return Fr(s),ct=!0,!1;var f;if((f=s.tag!==3)&&!(f=s.tag!==5)&&(f=s.type,f=f!=="head"&&f!=="body"&&!uf(s.type,s.memoizedProps)),f&&(f=Ge)){if(ar(s))throw Rr(),Error(t(418));for(;f;)Gt(s,f),f=Ui(f.nextSibling)}if(Fr(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(t(317));e:{for(s=s.nextSibling,f=0;s;){if(s.nodeType===8){var k=s.data;if(k==="/$"){if(f===0){Ge=Ui(s.nextSibling);break e}f--}else k!=="$"&&k!=="$!"&&k!=="$?"||f++}s=s.nextSibling}Ge=null}}else Ge=qe?Ui(s.stateNode.nextSibling):null;return!0}function Rr(){for(var s=Ge;s;)s=Ui(s.nextSibling)}function yr(){Ge=qe=null,ct=!1}function Xr(s){pt===null?pt=[s]:pt.push(s)}var Qr=b.ReactCurrentBatchConfig;function Qt(s,f,k){if(s=k.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(k._owner){if(k=k._owner,k){if(k.tag!==1)throw Error(t(309));var q=k.stateNode}if(!q)throw Error(t(147,s));var J=q,ie=""+s;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===ie?f.ref:(f=function(pe){var Te=J.refs;pe===null?delete Te[ie]:Te[ie]=pe},f._stringRef=ie,f)}if(typeof s!="string")throw Error(t(284));if(!k._owner)throw Error(t(290,s))}return s}function zr(s,f){throw s=Object.prototype.toString.call(f),Error(t(31,s==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":s))}function Ln(s){var f=s._init;return f(s._payload)}function Dn(s){function f(tt,Ve){if(s){var rt=tt.deletions;rt===null?(tt.deletions=[Ve],tt.flags|=16):rt.push(Ve)}}function k(tt,Ve){if(!s)return null;for(;Ve!==null;)f(tt,Ve),Ve=Ve.sibling;return null}function q(tt,Ve){for(tt=new Map;Ve!==null;)Ve.key!==null?tt.set(Ve.key,Ve):tt.set(Ve.index,Ve),Ve=Ve.sibling;return tt}function J(tt,Ve){return tt=Ic(tt,Ve),tt.index=0,tt.sibling=null,tt}function ie(tt,Ve,rt){return tt.index=rt,s?(rt=tt.alternate,rt!==null?(rt=rt.index,rt<Ve?(tt.flags|=2,Ve):rt):(tt.flags|=2,Ve)):(tt.flags|=1048576,Ve)}function pe(tt){return s&&tt.alternate===null&&(tt.flags|=2),tt}function Te(tt,Ve,rt,Tt){return Ve===null||Ve.tag!==6?(Ve=R0(rt,tt.mode,Tt),Ve.return=tt,Ve):(Ve=J(Ve,rt),Ve.return=tt,Ve)}function Be(tt,Ve,rt,Tt){var sr=rt.type;return sr===T?Ot(tt,Ve,rt.props.children,Tt,rt.key):Ve!==null&&(Ve.elementType===sr||typeof sr=="object"&&sr!==null&&sr.$$typeof===U&&Ln(sr)===Ve.type)?(Tt=J(Ve,rt.props),Tt.ref=Qt(tt,Ve,rt),Tt.return=tt,Tt):(Tt=Yp(rt.type,rt.key,rt.props,null,tt.mode,Tt),Tt.ref=Qt(tt,Ve,rt),Tt.return=tt,Tt)}function st(tt,Ve,rt,Tt){return Ve===null||Ve.tag!==4||Ve.stateNode.containerInfo!==rt.containerInfo||Ve.stateNode.implementation!==rt.implementation?(Ve=M0(rt,tt.mode,Tt),Ve.return=tt,Ve):(Ve=J(Ve,rt.children||[]),Ve.return=tt,Ve)}function Ot(tt,Ve,rt,Tt,sr){return Ve===null||Ve.tag!==7?(Ve=mf(rt,tt.mode,Tt,sr),Ve.return=tt,Ve):(Ve=J(Ve,rt),Ve.return=tt,Ve)}function Ct(tt,Ve,rt){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return Ve=R0(""+Ve,tt.mode,rt),Ve.return=tt,Ve;if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case O:return rt=Yp(Ve.type,Ve.key,Ve.props,null,tt.mode,rt),rt.ref=Qt(tt,null,Ve),rt.return=tt,rt;case I:return Ve=M0(Ve,tt.mode,rt),Ve.return=tt,Ve;case U:var Tt=Ve._init;return Ct(tt,Tt(Ve._payload),rt)}if(Ee(Ve)||Z(Ve))return Ve=mf(Ve,tt.mode,rt,null),Ve.return=tt,Ve;zr(tt,Ve)}return null}function Pt(tt,Ve,rt,Tt){var sr=Ve!==null?Ve.key:null;if(typeof rt=="string"&&rt!==""||typeof rt=="number")return sr!==null?null:Te(tt,Ve,""+rt,Tt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case O:return rt.key===sr?Be(tt,Ve,rt,Tt):null;case I:return rt.key===sr?st(tt,Ve,rt,Tt):null;case U:return sr=rt._init,Pt(tt,Ve,sr(rt._payload),Tt)}if(Ee(rt)||Z(rt))return sr!==null?null:Ot(tt,Ve,rt,Tt,null);zr(tt,rt)}return null}function Xt(tt,Ve,rt,Tt,sr){if(typeof Tt=="string"&&Tt!==""||typeof Tt=="number")return tt=tt.get(rt)||null,Te(Ve,tt,""+Tt,sr);if(typeof Tt=="object"&&Tt!==null){switch(Tt.$$typeof){case O:return tt=tt.get(Tt.key===null?rt:Tt.key)||null,Be(Ve,tt,Tt,sr);case I:return tt=tt.get(Tt.key===null?rt:Tt.key)||null,st(Ve,tt,Tt,sr);case U:var cr=Tt._init;return Xt(tt,Ve,rt,cr(Tt._payload),sr)}if(Ee(Tt)||Z(Tt))return tt=tt.get(rt)||null,Ot(Ve,tt,Tt,sr,null);zr(Ve,Tt)}return null}function er(tt,Ve,rt,Tt){for(var sr=null,cr=null,fr=Ve,mr=Ve=0,Na=null;fr!==null&&mr<rt.length;mr++){fr.index>mr?(Na=fr,fr=null):Na=fr.sibling;var dn=Pt(tt,fr,rt[mr],Tt);if(dn===null){fr===null&&(fr=Na);break}s&&fr&&dn.alternate===null&&f(tt,fr),Ve=ie(dn,Ve,mr),cr===null?sr=dn:cr.sibling=dn,cr=dn,fr=Na}if(mr===rt.length)return k(tt,fr),ct&&We(tt,mr),sr;if(fr===null){for(;mr<rt.length;mr++)fr=Ct(tt,rt[mr],Tt),fr!==null&&(Ve=ie(fr,Ve,mr),cr===null?sr=fr:cr.sibling=fr,cr=fr);return ct&&We(tt,mr),sr}for(fr=q(tt,fr);mr<rt.length;mr++)Na=Xt(fr,tt,mr,rt[mr],Tt),Na!==null&&(s&&Na.alternate!==null&&fr.delete(Na.key===null?mr:Na.key),Ve=ie(Na,Ve,mr),cr===null?sr=Na:cr.sibling=Na,cr=Na);return s&&fr.forEach(function(jc){return f(tt,jc)}),ct&&We(tt,mr),sr}function or(tt,Ve,rt,Tt){var sr=Z(rt);if(typeof sr!="function")throw Error(t(150));if(rt=sr.call(rt),rt==null)throw Error(t(151));for(var cr=sr=null,fr=Ve,mr=Ve=0,Na=null,dn=rt.next();fr!==null&&!dn.done;mr++,dn=rt.next()){fr.index>mr?(Na=fr,fr=null):Na=fr.sibling;var jc=Pt(tt,fr,dn.value,Tt);if(jc===null){fr===null&&(fr=Na);break}s&&fr&&jc.alternate===null&&f(tt,fr),Ve=ie(jc,Ve,mr),cr===null?sr=jc:cr.sibling=jc,cr=jc,fr=Na}if(dn.done)return k(tt,fr),ct&&We(tt,mr),sr;if(fr===null){for(;!dn.done;mr++,dn=rt.next())dn=Ct(tt,dn.value,Tt),dn!==null&&(Ve=ie(dn,Ve,mr),cr===null?sr=dn:cr.sibling=dn,cr=dn);return ct&&We(tt,mr),sr}for(fr=q(tt,fr);!dn.done;mr++,dn=rt.next())dn=Xt(fr,tt,mr,dn.value,Tt),dn!==null&&(s&&dn.alternate!==null&&fr.delete(dn.key===null?mr:dn.key),Ve=ie(dn,Ve,mr),cr===null?sr=dn:cr.sibling=dn,cr=dn);return s&&fr.forEach(function(Q_){return f(tt,Q_)}),ct&&We(tt,mr),sr}function Yi(tt,Ve,rt,Tt){if(typeof rt=="object"&&rt!==null&&rt.type===T&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case O:e:{for(var sr=rt.key,cr=Ve;cr!==null;){if(cr.key===sr){if(sr=rt.type,sr===T){if(cr.tag===7){k(tt,cr.sibling),Ve=J(cr,rt.props.children),Ve.return=tt,tt=Ve;break e}}else if(cr.elementType===sr||typeof sr=="object"&&sr!==null&&sr.$$typeof===U&&Ln(sr)===cr.type){k(tt,cr.sibling),Ve=J(cr,rt.props),Ve.ref=Qt(tt,cr,rt),Ve.return=tt,tt=Ve;break e}k(tt,cr);break}else f(tt,cr);cr=cr.sibling}rt.type===T?(Ve=mf(rt.props.children,tt.mode,Tt,rt.key),Ve.return=tt,tt=Ve):(Tt=Yp(rt.type,rt.key,rt.props,null,tt.mode,Tt),Tt.ref=Qt(tt,Ve,rt),Tt.return=tt,tt=Tt)}return pe(tt);case I:e:{for(cr=rt.key;Ve!==null;){if(Ve.key===cr)if(Ve.tag===4&&Ve.stateNode.containerInfo===rt.containerInfo&&Ve.stateNode.implementation===rt.implementation){k(tt,Ve.sibling),Ve=J(Ve,rt.children||[]),Ve.return=tt,tt=Ve;break e}else{k(tt,Ve);break}else f(tt,Ve);Ve=Ve.sibling}Ve=M0(rt,tt.mode,Tt),Ve.return=tt,tt=Ve}return pe(tt);case U:return cr=rt._init,Yi(tt,Ve,cr(rt._payload),Tt)}if(Ee(rt))return er(tt,Ve,rt,Tt);if(Z(rt))return or(tt,Ve,rt,Tt);zr(tt,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"?(rt=""+rt,Ve!==null&&Ve.tag===6?(k(tt,Ve.sibling),Ve=J(Ve,rt),Ve.return=tt,tt=Ve):(k(tt,Ve),Ve=R0(rt,tt.mode,Tt),Ve.return=tt,tt=Ve),pe(tt)):k(tt,Ve)}return Yi}var ci=Dn(!0),xr=Dn(!1),Vi=go(null),En=null,Bn=null,fi=null;function Oi(){fi=Bn=En=null}function ga(s){var f=Vi.current;Zr(Vi),s._currentValue=f}function Ya(s,f,k){for(;s!==null;){var q=s.alternate;if((s.childLanes&f)!==f?(s.childLanes|=f,q!==null&&(q.childLanes|=f)):q!==null&&(q.childLanes&f)!==f&&(q.childLanes|=f),s===k)break;s=s.return}}function yn(s,f){En=s,fi=Bn=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&f)!==0&&(le=!0),s.firstContext=null)}function qn(s){var f=s._currentValue;if(fi!==s)if(s={context:s,memoizedValue:f,next:null},Bn===null){if(En===null)throw Error(t(308));Bn=s,En.dependencies={lanes:0,firstContext:s}}else Bn=Bn.next=s;return f}var oa=null;function Do(s){oa===null?oa=[s]:oa.push(s)}function vo(s,f,k,q){var J=f.interleaved;return J===null?(k.next=k,Do(f)):(k.next=J.next,J.next=k),f.interleaved=k,Dr(s,q)}function Dr(s,f){s.lanes|=f;var k=s.alternate;for(k!==null&&(k.lanes|=f),k=s,s=s.return;s!==null;)s.childLanes|=f,k=s.alternate,k!==null&&(k.childLanes|=f),k=s,s=s.return;return k.tag===3?k.stateNode:null}var mo=!1;function yu(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xu(s,f){s=s.updateQueue,f.updateQueue===s&&(f.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Xa(s,f){return{eventTime:s,lane:f,tag:0,payload:null,callback:null,next:null}}function Aa(s,f,k){var q=s.updateQueue;if(q===null)return null;if(q=q.shared,(sn&2)!==0){var J=q.pending;return J===null?f.next=f:(f.next=J.next,J.next=f),q.pending=f,Dr(s,k)}return J=q.interleaved,J===null?(f.next=f,Do(q)):(f.next=J.next,J.next=f),q.interleaved=f,Dr(s,k)}function kl(s,f,k){if(f=f.updateQueue,f!==null&&(f=f.shared,(k&4194240)!==0)){var q=f.lanes;q&=s.pendingLanes,k|=q,f.lanes=k,iu(s,k)}}function va(s,f){var k=s.updateQueue,q=s.alternate;if(q!==null&&(q=q.updateQueue,k===q)){var J=null,ie=null;if(k=k.firstBaseUpdate,k!==null){do{var pe={eventTime:k.eventTime,lane:k.lane,tag:k.tag,payload:k.payload,callback:k.callback,next:null};ie===null?J=ie=pe:ie=ie.next=pe,k=k.next}while(k!==null);ie===null?J=ie=f:ie=ie.next=f}else J=ie=f;k={baseState:q.baseState,firstBaseUpdate:J,lastBaseUpdate:ie,shared:q.shared,effects:q.effects},s.updateQueue=k;return}s=k.lastBaseUpdate,s===null?k.firstBaseUpdate=f:s.next=f,k.lastBaseUpdate=f}function Bo(s,f,k,q){var J=s.updateQueue;mo=!1;var ie=J.firstBaseUpdate,pe=J.lastBaseUpdate,Te=J.shared.pending;if(Te!==null){J.shared.pending=null;var Be=Te,st=Be.next;Be.next=null,pe===null?ie=st:pe.next=st,pe=Be;var Ot=s.alternate;Ot!==null&&(Ot=Ot.updateQueue,Te=Ot.lastBaseUpdate,Te!==pe&&(Te===null?Ot.firstBaseUpdate=st:Te.next=st,Ot.lastBaseUpdate=Be))}if(ie!==null){var Ct=J.baseState;pe=0,Ot=st=Be=null,Te=ie;do{var Pt=Te.lane,Xt=Te.eventTime;if((q&Pt)===Pt){Ot!==null&&(Ot=Ot.next={eventTime:Xt,lane:0,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null});e:{var er=s,or=Te;switch(Pt=f,Xt=k,or.tag){case 1:if(er=or.payload,typeof er=="function"){Ct=er.call(Xt,Ct,Pt);break e}Ct=er;break e;case 3:er.flags=er.flags&-65537|128;case 0:if(er=or.payload,Pt=typeof er=="function"?er.call(Xt,Ct,Pt):er,Pt==null)break e;Ct=V({},Ct,Pt);break e;case 2:mo=!0}}Te.callback!==null&&Te.lane!==0&&(s.flags|=64,Pt=J.effects,Pt===null?J.effects=[Te]:Pt.push(Te))}else Xt={eventTime:Xt,lane:Pt,tag:Te.tag,payload:Te.payload,callback:Te.callback,next:null},Ot===null?(st=Ot=Xt,Be=Ct):Ot=Ot.next=Xt,pe|=Pt;if(Te=Te.next,Te===null){if(Te=J.shared.pending,Te===null)break;Pt=Te,Te=Pt.next,Pt.next=null,J.lastBaseUpdate=Pt,J.shared.pending=null}}while(!0);if(Ot===null&&(Be=Ct),J.baseState=Be,J.firstBaseUpdate=st,J.lastBaseUpdate=Ot,f=J.shared.interleaved,f!==null){J=f;do pe|=J.lane,J=J.next;while(J!==f)}else ie===null&&(J.shared.lanes=0);df|=pe,s.lanes=pe,s.memoizedState=Ct}}function vn(s,f,k){if(s=f.effects,f.effects=null,s!==null)for(f=0;f<s.length;f++){var q=s[f],J=q.callback;if(J!==null){if(q.callback=null,q=k,typeof J!="function")throw Error(t(191,J));J.call(q)}}}var vr={},Jr=go(vr),Pn=go(vr),Nn=go(vr);function ti(s){if(s===vr)throw Error(t(174));return s}function qo(s,f){switch(an(Nn,f),an(Pn,s),an(Jr,vr),s=f.nodeType,s){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:wt(null,"");break;default:s=s===8?f.parentNode:f,f=s.namespaceURI||null,s=s.tagName,f=wt(f,s)}Zr(Jr),an(Jr,f)}function fn(){Zr(Jr),Zr(Pn),Zr(Nn)}function bu(s){ti(Nn.current);var f=ti(Jr.current),k=wt(f,s.type);f!==k&&(an(Pn,s),an(Jr,k))}function Ns(s){Pn.current===s&&(Zr(Jr),Zr(Pn))}var hn=go(0);function Ka(s){for(var f=s;f!==null;){if(f.tag===13){var k=f.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||k.data==="$?"||k.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Ll=[];function sa(){for(var s=0;s<Ll.length;s++)Ll[s]._workInProgressVersionPrimary=null;Ll.length=0}var wu=b.ReactCurrentDispatcher,_u=b.ReactCurrentBatchConfig,Ai=0,on=null,zn=null,Un=null,Za=!1,yo=!1,Qa=0,Sc=0;function Hn(){throw Error(t(321))}function Su(s,f){if(f===null)return!1;for(var k=0;k<f.length&&k<s.length;k++)if(!jr(s[k],f[k]))return!1;return!0}function al(s,f,k,q,J,ie){if(Ai=ie,on=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,wu.current=s===null||s.memoizedState===null?p0:Eu,s=k(q,J),yo){ie=0;do{if(yo=!1,Qa=0,25<=ie)throw Error(t(301));ie+=1,Un=zn=null,f.updateQueue=null,wu.current=Yf,s=k(q,J)}while(yo)}if(wu.current=Oc,f=zn!==null&&zn.next!==null,Ai=0,Un=zn=on=null,Za=!1,f)throw Error(t(300));return s}function Ja(){var s=Qa!==0;return Qa=0,s}function bn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Un===null?on.memoizedState=Un=s:Un=Un.next=s,Un}function hi(){if(zn===null){var s=on.alternate;s=s!==null?s.memoizedState:null}else s=zn.next;var f=Un===null?on.memoizedState:Un.next;if(f!==null)Un=f,zn=s;else{if(s===null)throw Error(t(310));zn=s,s={memoizedState:zn.memoizedState,baseState:zn.baseState,baseQueue:zn.baseQueue,queue:zn.queue,next:null},Un===null?on.memoizedState=Un=s:Un=Un.next=s}return Un}function la(s,f){return typeof f=="function"?f(s):f}function Wi(s){var f=hi(),k=f.queue;if(k===null)throw Error(t(311));k.lastRenderedReducer=s;var q=zn,J=q.baseQueue,ie=k.pending;if(ie!==null){if(J!==null){var pe=J.next;J.next=ie.next,ie.next=pe}q.baseQueue=J=ie,k.pending=null}if(J!==null){ie=J.next,q=q.baseState;var Te=pe=null,Be=null,st=ie;do{var Ot=st.lane;if((Ai&Ot)===Ot)Be!==null&&(Be=Be.next={lane:0,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null}),q=st.hasEagerState?st.eagerState:s(q,st.action);else{var Ct={lane:Ot,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null};Be===null?(Te=Be=Ct,pe=q):Be=Be.next=Ct,on.lanes|=Ot,df|=Ot}st=st.next}while(st!==null&&st!==ie);Be===null?pe=q:Be.next=Te,jr(q,f.memoizedState)||(le=!0),f.memoizedState=q,f.baseState=pe,f.baseQueue=Be,k.lastRenderedState=q}if(s=k.interleaved,s!==null){J=s;do ie=J.lane,on.lanes|=ie,df|=ie,J=J.next;while(J!==s)}else J===null&&(k.lanes=0);return[f.memoizedState,k.dispatch]}function Ts(s){var f=hi(),k=f.queue;if(k===null)throw Error(t(311));k.lastRenderedReducer=s;var q=k.dispatch,J=k.pending,ie=f.memoizedState;if(J!==null){k.pending=null;var pe=J=J.next;do ie=s(ie,pe.action),pe=pe.next;while(pe!==J);jr(ie,f.memoizedState)||(le=!0),f.memoizedState=ie,f.baseQueue===null&&(f.baseState=ie),k.lastRenderedState=ie}return[ie,q]}function xc(){}function Ku(s,f){var k=on,q=hi(),J=f(),ie=!jr(q.memoizedState,J);if(ie&&(q.memoizedState=J,le=!0),q=q.queue,Pc(ff.bind(null,k,q,s),[s]),q.getSnapshot!==f||ie||Un!==null&&Un.memoizedState.tag&1){if(k.flags|=2048,Ca(9,os.bind(null,k,q,J,f),void 0,null),La===null)throw Error(t(349));(Ai&30)!==0||$f(k,f,J)}return J}function $f(s,f,k){s.flags|=16384,s={getSnapshot:f,value:k},f=on.updateQueue,f===null?(f={lastEffect:null,stores:null},on.updateQueue=f,f.stores=[s]):(k=f.stores,k===null?f.stores=[s]:k.push(s))}function os(s,f,k,q){f.value=k,f.getSnapshot=q,Nl(f)&&xu(s)}function ff(s,f,k){return k(function(){Nl(f)&&xu(s)})}function Nl(s){var f=s.getSnapshot;s=s.value;try{var k=f();return!jr(s,k)}catch{return!0}}function xu(s){var f=Dr(s,1);f!==null&&Il(f,s,1,-1)}function zo(s){var f=bn();return typeof s=="function"&&(s=s()),f.memoizedState=f.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:s},f.queue=s,s=s.dispatch=Mp.bind(null,on,s),[f.memoizedState,s]}function Ca(s,f,k,q){return s={tag:s,create:f,destroy:k,deps:q,next:null},f=on.updateQueue,f===null?(f={lastEffect:null,stores:null},on.updateQueue=f,f.lastEffect=s.next=s):(k=f.lastEffect,k===null?f.lastEffect=s.next=s:(q=k.next,k.next=s,s.next=q,f.lastEffect=s)),s}function ss(){return hi().memoizedState}function eo(s,f,k,q){var J=bn();on.flags|=s,J.memoizedState=Ca(1|f,k,void 0,q===void 0?null:q)}function ls(s,f,k,q){var J=hi();q=q===void 0?null:q;var ie=void 0;if(zn!==null){var pe=zn.memoizedState;if(ie=pe.destroy,q!==null&&Su(q,pe.deps)){J.memoizedState=Ca(f,k,ie,q);return}}on.flags|=s,J.memoizedState=Ca(1|f,k,ie,q)}function Ec(s,f){return eo(8390656,8,s,f)}function Pc(s,f){return ls(2048,8,s,f)}function hf(s,f){return ls(4,2,s,f)}function Zu(s,f){return ls(4,4,s,f)}function us(s,f){if(typeof f=="function")return s=s(),f(s),function(){f(null)};if(f!=null)return s=s(),f.current=s,function(){f.current=null}}function Lp(s,f,k){return k=k!=null?k.concat([s]):null,ls(4,4,us.bind(null,f,s),k)}function Tl(){}function qh(s,f){var k=hi();f=f===void 0?null:f;var q=k.memoizedState;return q!==null&&f!==null&&Su(f,q[1])?q[0]:(k.memoizedState=[s,f],s)}function Gn(s,f){var k=hi();f=f===void 0?null:f;var q=k.memoizedState;return q!==null&&f!==null&&Su(f,q[1])?q[0]:(s=s(),k.memoizedState=[s,f],s)}function Np(s,f,k){return(Ai&21)===0?(s.baseState&&(s.baseState=!1,le=!0),s.memoizedState=k):(jr(k,f)||(k=nu(),on.lanes|=k,df|=k,s.baseState=!0),f)}function Tp(s,f){var k=Ir;Ir=k!==0&&4>k?k:4,s(!0);var q=_u.transition;_u.transition={};try{s(!1),f()}finally{Ir=k,_u.transition=q}}function Rp(){return hi().memoizedState}function d0(s,f,k){var q=Rc(s);if(k={lane:q,action:k,hasEagerState:!1,eagerState:null,next:null},zh(s))Ip(f,k);else if(k=vo(s,f,k,q),k!==null){var J=Ho();Il(k,s,q,J),Uo(k,f,q)}}function Mp(s,f,k){var q=Rc(s),J={lane:q,action:k,hasEagerState:!1,eagerState:null,next:null};if(zh(s))Ip(f,J);else{var ie=s.alternate;if(s.lanes===0&&(ie===null||ie.lanes===0)&&(ie=f.lastRenderedReducer,ie!==null))try{var pe=f.lastRenderedState,Te=ie(pe,k);if(J.hasEagerState=!0,J.eagerState=Te,jr(Te,pe)){var Be=f.interleaved;Be===null?(J.next=J,Do(f)):(J.next=Be.next,Be.next=J),f.interleaved=J;return}}catch{}finally{}k=vo(s,f,J,q),k!==null&&(J=Ho(),Il(k,s,q,J),Uo(k,f,q))}}function zh(s){var f=s.alternate;return s===on||f!==null&&f===on}function Ip(s,f){yo=Za=!0;var k=s.pending;k===null?f.next=f:(f.next=k.next,k.next=f),s.pending=f}function Uo(s,f,k){if((k&4194240)!==0){var q=f.lanes;q&=s.pendingLanes,k|=q,f.lanes=k,iu(s,k)}}var Oc={readContext:qn,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},p0={readContext:qn,useCallback:function(s,f){return bn().memoizedState=[s,f===void 0?null:f],s},useContext:qn,useEffect:Ec,useImperativeHandle:function(s,f,k){return k=k!=null?k.concat([s]):null,eo(4194308,4,us.bind(null,f,s),k)},useLayoutEffect:function(s,f){return eo(4194308,4,s,f)},useInsertionEffect:function(s,f){return eo(4,2,s,f)},useMemo:function(s,f){var k=bn();return f=f===void 0?null:f,s=s(),k.memoizedState=[s,f],s},useReducer:function(s,f,k){var q=bn();return f=k!==void 0?k(f):f,q.memoizedState=q.baseState=f,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:f},q.queue=s,s=s.dispatch=d0.bind(null,on,s),[q.memoizedState,s]},useRef:function(s){var f=bn();return s={current:s},f.memoizedState=s},useState:zo,useDebugValue:Tl,useDeferredValue:function(s){return bn().memoizedState=s},useTransition:function(){var s=zo(!1),f=s[0];return s=Tp.bind(null,s[1]),bn().memoizedState=s,[f,s]},useMutableSource:function(){},useSyncExternalStore:function(s,f,k){var q=on,J=bn();if(ct){if(k===void 0)throw Error(t(407));k=k()}else{if(k=f(),La===null)throw Error(t(349));(Ai&30)!==0||$f(q,f,k)}J.memoizedState=k;var ie={value:k,getSnapshot:f};return J.queue=ie,Ec(ff.bind(null,q,ie,s),[s]),q.flags|=2048,Ca(9,os.bind(null,q,ie,k,f),void 0,null),k},useId:function(){var s=bn(),f=La.identifierPrefix;if(ct){var k=Ye,q=Qe;k=(q&~(1<<32-Ar(q)-1)).toString(32)+k,f=":"+f+"R"+k,k=Qa++,0<k&&(f+="H"+k.toString(32)),f+=":"}else k=Sc++,f=":"+f+"r"+k.toString(32)+":";return s.memoizedState=f},unstable_isNewReconciler:!1},Eu={readContext:qn,useCallback:qh,useContext:qn,useEffect:Pc,useImperativeHandle:Lp,useInsertionEffect:hf,useLayoutEffect:Zu,useMemo:Gn,useReducer:Wi,useRef:ss,useState:function(){return Wi(la)},useDebugValue:Tl,useDeferredValue:function(s){var f=hi();return Np(f,zn.memoizedState,s)},useTransition:function(){var s=Wi(la)[0],f=hi().memoizedState;return[s,f]},useMutableSource:xc,useSyncExternalStore:Ku,useId:Rp,unstable_isNewReconciler:!1},Yf={readContext:qn,useCallback:qh,useContext:qn,useEffect:Pc,useImperativeHandle:Lp,useInsertionEffect:hf,useLayoutEffect:Zu,useMemo:Gn,useReducer:Ts,useRef:ss,useState:function(){return Ts(la)},useDebugValue:Tl,useDeferredValue:function(s){var f=hi();return zn===null?f.memoizedState=s:Np(f,zn.memoizedState,s)},useTransition:function(){var s=Ts(la)[0],f=hi().memoizedState;return[s,f]},useMutableSource:xc,useSyncExternalStore:Ku,useId:Rp,unstable_isNewReconciler:!1};function ma(s,f){if(s&&s.defaultProps){f=V({},f),s=s.defaultProps;for(var k in s)f[k]===void 0&&(f[k]=s[k]);return f}return f}function Ac(s,f,k,q){f=s.memoizedState,k=k(q,f),k=k==null?f:V({},f,k),s.memoizedState=k,s.lanes===0&&(s.updateQueue.baseState=k)}var Cc={isMounted:function(s){return(s=s._reactInternals)?en(s)===s:!1},enqueueSetState:function(s,f,k){s=s._reactInternals;var q=Ho(),J=Rc(s),ie=Xa(q,J);ie.payload=f,k!=null&&(ie.callback=k),f=Aa(s,ie,J),f!==null&&(Il(f,s,J,q),kl(f,s,J))},enqueueReplaceState:function(s,f,k){s=s._reactInternals;var q=Ho(),J=Rc(s),ie=Xa(q,J);ie.tag=1,ie.payload=f,k!=null&&(ie.callback=k),f=Aa(s,ie,J),f!==null&&(Il(f,s,J,q),kl(f,s,J))},enqueueForceUpdate:function(s,f){s=s._reactInternals;var k=Ho(),q=Rc(s),J=Xa(k,q);J.tag=2,f!=null&&(J.callback=f),f=Aa(s,J,q),f!==null&&(Il(f,s,q,k),kl(f,s,q))}};function Xf(s,f,k,q,J,ie,pe){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(q,ie,pe):f.prototype&&f.prototype.isPureReactComponent?!Lo(k,q)||!Lo(J,ie):!0}function jp(s,f,k){var q=!1,J=ns,ie=f.contextType;return typeof ie=="object"&&ie!==null?ie=qn(ie):(J=aa(f)?il:Pi.current,q=f.contextTypes,ie=(q=q!=null)?Al(s,J):ns),f=new f(k,ie),s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Cc,s.stateNode=f,f._reactInternals=s,q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=J,s.__reactInternalMemoizedMaskedChildContext=ie),f}function Uh(s,f,k,q){s=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(k,q),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(k,q),f.state!==s&&Cc.enqueueReplaceState(f,f.state,null)}function Kf(s,f,k,q){var J=s.stateNode;J.props=k,J.state=s.memoizedState,J.refs={},yu(s);var ie=f.contextType;typeof ie=="object"&&ie!==null?J.context=qn(ie):(ie=aa(f)?il:Pi.current,J.context=Al(s,ie)),J.state=s.memoizedState,ie=f.getDerivedStateFromProps,typeof ie=="function"&&(Ac(s,f,ie,k),J.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof J.getSnapshotBeforeUpdate=="function"||typeof J.UNSAFE_componentWillMount!="function"&&typeof J.componentWillMount!="function"||(f=J.state,typeof J.componentWillMount=="function"&&J.componentWillMount(),typeof J.UNSAFE_componentWillMount=="function"&&J.UNSAFE_componentWillMount(),f!==J.state&&Cc.enqueueReplaceState(J,J.state,null),Bo(s,k,J,q),J.state=s.memoizedState),typeof J.componentDidMount=="function"&&(s.flags|=4194308)}function Qu(s,f){try{var k="",q=f;do k+=ne(q),q=q.return;while(q);var J=k}catch(ie){J=`
|
|
31
|
-
Error generating stack: `+ie.message+`
|
|
32
|
-
`+ie.stack}return{value:s,source:f,stack:J,digest:null}}function Zf(s,f,k){return{value:s,source:null,stack:k??null,digest:f??null}}function kc(s,f){try{console.error(f.value)}catch(k){setTimeout(function(){throw k})}}var g0=typeof WeakMap=="function"?WeakMap:Map;function Fp(s,f,k){k=Xa(-1,k),k.tag=3,k.payload={element:null};var q=f.value;return k.callback=function(){Up||(Up=!0,P0=q),kc(s,f)},k}function y(s,f,k){k=Xa(-1,k),k.tag=3;var q=s.type.getDerivedStateFromError;if(typeof q=="function"){var J=f.value;k.payload=function(){return q(J)},k.callback=function(){kc(s,f)}}var ie=s.stateNode;return ie!==null&&typeof ie.componentDidCatch=="function"&&(k.callback=function(){kc(s,f),typeof q!="function"&&(Nc===null?Nc=new Set([this]):Nc.add(this));var pe=f.stack;this.componentDidCatch(f.value,{componentStack:pe!==null?pe:""})}),k}function P(s,f,k){var q=s.pingCache;if(q===null){q=s.pingCache=new g0;var J=new Set;q.set(f,J)}else J=q.get(f),J===void 0&&(J=new Set,q.set(f,J));J.has(k)||(J.add(k),s=z_.bind(null,s,f,k),f.then(s,s))}function B(s){do{var f;if((f=s.tag===13)&&(f=s.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return s;s=s.return}while(s!==null);return null}function X(s,f,k,q,J){return(s.mode&1)===0?(s===f?s.flags|=65536:(s.flags|=128,k.flags|=131072,k.flags&=-52805,k.tag===1&&(k.alternate===null?k.tag=17:(f=Xa(-1,1),f.tag=2,Aa(k,f,1))),k.lanes|=1),s):(s.flags|=65536,s.lanes=J,s)}var re=b.ReactCurrentOwner,le=!1;function _e(s,f,k,q){f.child=s===null?xr(f,null,k,q):ci(f,s.child,k,q)}function Ke(s,f,k,q,J){k=k.render;var ie=f.ref;return yn(f,J),q=al(s,f,k,q,ie,J),k=Ja(),s!==null&&!le?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~J,ka(s,f,J)):(ct&&k&<(f),f.flags|=1,_e(s,f,q,J),f.child)}function ut(s,f,k,q,J){if(s===null){var ie=k.type;return typeof ie=="function"&&!T0(ie)&&ie.defaultProps===void 0&&k.compare===null&&k.defaultProps===void 0?(f.tag=15,f.type=ie,Lt(s,f,ie,q,J)):(s=Yp(k.type,null,q,f,f.mode,J),s.ref=f.ref,s.return=f,f.child=s)}if(ie=s.child,(s.lanes&J)===0){var pe=ie.memoizedProps;if(k=k.compare,k=k!==null?k:Lo,k(pe,q)&&s.ref===f.ref)return ka(s,f,J)}return f.flags|=1,s=Ic(ie,q),s.ref=f.ref,s.return=f,f.child=s}function Lt(s,f,k,q,J){if(s!==null){var ie=s.memoizedProps;if(Lo(ie,q)&&s.ref===f.ref)if(le=!1,f.pendingProps=q=ie,(s.lanes&J)!==0)(s.flags&131072)!==0&&(le=!0);else return f.lanes=s.lanes,ka(s,f,J)}return Vt(s,f,k,q,J)}function Zt(s,f,k){var q=f.pendingProps,J=q.children,ie=s!==null?s.memoizedState:null;if(q.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},an(Jf,Rs),Rs|=k;else{if((k&1073741824)===0)return s=ie!==null?ie.baseLanes|k:k,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:s,cachePool:null,transitions:null},f.updateQueue=null,an(Jf,Rs),Rs|=s,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},q=ie!==null?ie.baseLanes:k,an(Jf,Rs),Rs|=q}else ie!==null?(q=ie.baseLanes|k,f.memoizedState=null):q=k,an(Jf,Rs),Rs|=q;return _e(s,f,J,k),f.child}function br(s,f){var k=f.ref;(s===null&&k!==null||s!==null&&s.ref!==k)&&(f.flags|=512,f.flags|=2097152)}function Vt(s,f,k,q,J){var ie=aa(k)?il:Pi.current;return ie=Al(f,ie),yn(f,J),k=al(s,f,k,q,ie,J),q=Ja(),s!==null&&!le?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~J,ka(s,f,J)):(ct&&q&<(f),f.flags|=1,_e(s,f,k,J),f.child)}function Tn(s,f,k,q,J){if(aa(k)){var ie=!0;is(f)}else ie=!1;if(yn(f,J),f.stateNode===null)Ur(s,f),jp(f,k,q),Kf(f,k,q,J),q=!0;else if(s===null){var pe=f.stateNode,Te=f.memoizedProps;pe.props=Te;var Be=pe.context,st=k.contextType;typeof st=="object"&&st!==null?st=qn(st):(st=aa(k)?il:Pi.current,st=Al(f,st));var Ot=k.getDerivedStateFromProps,Ct=typeof Ot=="function"||typeof pe.getSnapshotBeforeUpdate=="function";Ct||typeof pe.UNSAFE_componentWillReceiveProps!="function"&&typeof pe.componentWillReceiveProps!="function"||(Te!==q||Be!==st)&&Uh(f,pe,q,st),mo=!1;var Pt=f.memoizedState;pe.state=Pt,Bo(f,q,pe,J),Be=f.memoizedState,Te!==q||Pt!==Be||ia.current||mo?(typeof Ot=="function"&&(Ac(f,k,Ot,q),Be=f.memoizedState),(Te=mo||Xf(f,k,Te,q,Pt,Be,st))?(Ct||typeof pe.UNSAFE_componentWillMount!="function"&&typeof pe.componentWillMount!="function"||(typeof pe.componentWillMount=="function"&&pe.componentWillMount(),typeof pe.UNSAFE_componentWillMount=="function"&&pe.UNSAFE_componentWillMount()),typeof pe.componentDidMount=="function"&&(f.flags|=4194308)):(typeof pe.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=q,f.memoizedState=Be),pe.props=q,pe.state=Be,pe.context=st,q=Te):(typeof pe.componentDidMount=="function"&&(f.flags|=4194308),q=!1)}else{pe=f.stateNode,Xu(s,f),Te=f.memoizedProps,st=f.type===f.elementType?Te:ma(f.type,Te),pe.props=st,Ct=f.pendingProps,Pt=pe.context,Be=k.contextType,typeof Be=="object"&&Be!==null?Be=qn(Be):(Be=aa(k)?il:Pi.current,Be=Al(f,Be));var Xt=k.getDerivedStateFromProps;(Ot=typeof Xt=="function"||typeof pe.getSnapshotBeforeUpdate=="function")||typeof pe.UNSAFE_componentWillReceiveProps!="function"&&typeof pe.componentWillReceiveProps!="function"||(Te!==Ct||Pt!==Be)&&Uh(f,pe,q,Be),mo=!1,Pt=f.memoizedState,pe.state=Pt,Bo(f,q,pe,J);var er=f.memoizedState;Te!==Ct||Pt!==er||ia.current||mo?(typeof Xt=="function"&&(Ac(f,k,Xt,q),er=f.memoizedState),(st=mo||Xf(f,k,st,q,Pt,er,Be)||!1)?(Ot||typeof pe.UNSAFE_componentWillUpdate!="function"&&typeof pe.componentWillUpdate!="function"||(typeof pe.componentWillUpdate=="function"&&pe.componentWillUpdate(q,er,Be),typeof pe.UNSAFE_componentWillUpdate=="function"&&pe.UNSAFE_componentWillUpdate(q,er,Be)),typeof pe.componentDidUpdate=="function"&&(f.flags|=4),typeof pe.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof pe.componentDidUpdate!="function"||Te===s.memoizedProps&&Pt===s.memoizedState||(f.flags|=4),typeof pe.getSnapshotBeforeUpdate!="function"||Te===s.memoizedProps&&Pt===s.memoizedState||(f.flags|=1024),f.memoizedProps=q,f.memoizedState=er),pe.props=q,pe.state=er,pe.context=Be,q=st):(typeof pe.componentDidUpdate!="function"||Te===s.memoizedProps&&Pt===s.memoizedState||(f.flags|=4),typeof pe.getSnapshotBeforeUpdate!="function"||Te===s.memoizedProps&&Pt===s.memoizedState||(f.flags|=1024),q=!1)}return mn(s,f,k,q,ie,J)}function mn(s,f,k,q,J,ie){br(s,f);var pe=(f.flags&128)!==0;if(!q&&!pe)return J&&Wf(f,k,!1),ka(s,f,ie);q=f.stateNode,re.current=f;var Te=pe&&typeof k.getDerivedStateFromError!="function"?null:q.render();return f.flags|=1,s!==null&&pe?(f.child=ci(f,s.child,null,ie),f.child=ci(f,null,Te,ie)):_e(s,f,Te,ie),f.memoizedState=q.state,J&&Wf(f,k,!0),f.child}function to(s){var f=s.stateNode;f.pendingContext?cf(s,f.pendingContext,f.pendingContext!==f.context):f.context&&cf(s,f.context,!1),qo(s,f.containerInfo)}function ol(s,f,k,q,J){return yr(),Xr(J),f.flags|=256,_e(s,f,k,q),f.child}var ot={dehydrated:null,treeContext:null,retryLane:0};function Ze(s){return{baseLanes:s,cachePool:null,transitions:null}}function dt(s,f,k){var q=f.pendingProps,J=hn.current,ie=!1,pe=(f.flags&128)!==0,Te;if((Te=pe)||(Te=s!==null&&s.memoizedState===null?!1:(J&2)!==0),Te?(ie=!0,f.flags&=-129):(s===null||s.memoizedState!==null)&&(J|=1),an(hn,J&1),s===null)return Mt(f),s=f.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((f.mode&1)===0?f.lanes=1:s.data==="$!"?f.lanes=8:f.lanes=1073741824,null):(pe=q.children,s=q.fallback,ie?(q=f.mode,ie=f.child,pe={mode:"hidden",children:pe},(q&1)===0&&ie!==null?(ie.childLanes=0,ie.pendingProps=pe):ie=Xp(pe,q,0,null),s=mf(s,q,k,null),ie.return=f,s.return=f,ie.sibling=s,f.child=ie,f.child.memoizedState=Ze(k),f.memoizedState=ot,s):$t(f,pe));if(J=s.memoizedState,J!==null&&(Te=J.dehydrated,Te!==null))return Cr(s,f,pe,q,Te,J,k);if(ie){ie=q.fallback,pe=f.mode,J=s.child,Te=J.sibling;var Be={mode:"hidden",children:q.children};return(pe&1)===0&&f.child!==J?(q=f.child,q.childLanes=0,q.pendingProps=Be,f.deletions=null):(q=Ic(J,Be),q.subtreeFlags=J.subtreeFlags&14680064),Te!==null?ie=Ic(Te,ie):(ie=mf(ie,pe,k,null),ie.flags|=2),ie.return=f,q.return=f,q.sibling=ie,f.child=q,q=ie,ie=f.child,pe=s.child.memoizedState,pe=pe===null?Ze(k):{baseLanes:pe.baseLanes|k,cachePool:null,transitions:pe.transitions},ie.memoizedState=pe,ie.childLanes=s.childLanes&~k,f.memoizedState=ot,q}return ie=s.child,s=ie.sibling,q=Ic(ie,{mode:"visible",children:q.children}),(f.mode&1)===0&&(q.lanes=k),q.return=f,q.sibling=null,s!==null&&(k=f.deletions,k===null?(f.deletions=[s],f.flags|=16):k.push(s)),f.child=q,f.memoizedState=null,q}function $t(s,f){return f=Xp({mode:"visible",children:f},s.mode,0,null),f.return=s,s.child=f}function ur(s,f,k,q){return q!==null&&Xr(q),ci(f,s.child,null,k),s=$t(f,f.pendingProps.children),s.flags|=2,f.memoizedState=null,s}function Cr(s,f,k,q,J,ie,pe){if(k)return f.flags&256?(f.flags&=-257,q=Zf(Error(t(422))),ur(s,f,pe,q)):f.memoizedState!==null?(f.child=s.child,f.flags|=128,null):(ie=q.fallback,J=f.mode,q=Xp({mode:"visible",children:q.children},J,0,null),ie=mf(ie,J,pe,null),ie.flags|=2,q.return=f,ie.return=f,q.sibling=ie,f.child=q,(f.mode&1)!==0&&ci(f,s.child,null,pe),f.child.memoizedState=Ze(pe),f.memoizedState=ot,ie);if((f.mode&1)===0)return ur(s,f,pe,null);if(J.data==="$!"){if(q=J.nextSibling&&J.nextSibling.dataset,q)var Te=q.dgst;return q=Te,ie=Error(t(419)),q=Zf(ie,q,void 0),ur(s,f,pe,q)}if(Te=(pe&s.childLanes)!==0,le||Te){if(q=La,q!==null){switch(pe&-pe){case 4:J=2;break;case 16:J=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:J=32;break;case 536870912:J=268435456;break;default:J=0}J=(J&(q.suspendedLanes|pe))!==0?0:J,J!==0&&J!==ie.retryLane&&(ie.retryLane=J,Dr(s,J),Il(q,s,J,-1))}return N0(),q=Zf(Error(t(421))),ur(s,f,pe,q)}return J.data==="$?"?(f.flags|=128,f.child=s.child,f=U_.bind(null,s),J._reactRetry=f,null):(s=ie.treeContext,Ge=Ui(J.nextSibling),qe=f,ct=!0,pt=null,s!==null&&(we[Pe++]=Qe,we[Pe++]=Ye,we[Pe++]=Fe,Qe=s.id,Ye=s.overflow,Fe=f),f=$t(f,q.children),f.flags|=4096,f)}function wr(s,f,k){s.lanes|=f;var q=s.alternate;q!==null&&(q.lanes|=f),Ya(s.return,f,k)}function Gr(s,f,k,q,J){var ie=s.memoizedState;ie===null?s.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:q,tail:k,tailMode:J}:(ie.isBackwards=f,ie.rendering=null,ie.renderingStartTime=0,ie.last=q,ie.tail=k,ie.tailMode=J)}function $i(s,f,k){var q=f.pendingProps,J=q.revealOrder,ie=q.tail;if(_e(s,f,q.children,k),q=hn.current,(q&2)!==0)q=q&1|2,f.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=f.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&wr(s,k,f);else if(s.tag===19)wr(s,k,f);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===f)break e;for(;s.sibling===null;){if(s.return===null||s.return===f)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}q&=1}if(an(hn,q),(f.mode&1)===0)f.memoizedState=null;else switch(J){case"forwards":for(k=f.child,J=null;k!==null;)s=k.alternate,s!==null&&Ka(s)===null&&(J=k),k=k.sibling;k=J,k===null?(J=f.child,f.child=null):(J=k.sibling,k.sibling=null),Gr(f,!1,J,k,ie);break;case"backwards":for(k=null,J=f.child,f.child=null;J!==null;){if(s=J.alternate,s!==null&&Ka(s)===null){f.child=J;break}s=J.sibling,J.sibling=k,k=J,J=s}Gr(f,!0,k,null,ie);break;case"together":Gr(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Ur(s,f){(f.mode&1)===0&&s!==null&&(s.alternate=null,f.alternate=null,f.flags|=2)}function ka(s,f,k){if(s!==null&&(f.dependencies=s.dependencies),df|=f.lanes,(k&f.childLanes)===0)return null;if(s!==null&&f.child!==s.child)throw Error(t(153));if(f.child!==null){for(s=f.child,k=Ic(s,s.pendingProps),f.child=k,k.return=f;s.sibling!==null;)s=s.sibling,k=k.sibling=Ic(s,s.pendingProps),k.return=f;k.sibling=null}return f.child}function v0(s,f,k){switch(f.tag){case 3:to(f),yr();break;case 5:bu(f);break;case 1:aa(f.type)&&is(f);break;case 4:qo(f,f.stateNode.containerInfo);break;case 10:var q=f.type._context,J=f.memoizedProps.value;an(Vi,q._currentValue),q._currentValue=J;break;case 13:if(q=f.memoizedState,q!==null)return q.dehydrated!==null?(an(hn,hn.current&1),f.flags|=128,null):(k&f.child.childLanes)!==0?dt(s,f,k):(an(hn,hn.current&1),s=ka(s,f,k),s!==null?s.sibling:null);an(hn,hn.current&1);break;case 19:if(q=(k&f.childLanes)!==0,(s.flags&128)!==0){if(q)return $i(s,f,k);f.flags|=128}if(J=f.memoizedState,J!==null&&(J.rendering=null,J.tail=null,J.lastEffect=null),an(hn,hn.current),q)break;return null;case 22:case 23:return f.lanes=0,Zt(s,f,k)}return ka(s,f,k)}var Fm,m0,Dm,Bm;Fm=function(s,f){for(var k=f.child;k!==null;){if(k.tag===5||k.tag===6)s.appendChild(k.stateNode);else if(k.tag!==4&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===f)break;for(;k.sibling===null;){if(k.return===null||k.return===f)return;k=k.return}k.sibling.return=k.return,k=k.sibling}},m0=function(){},Dm=function(s,f,k,q){var J=s.memoizedProps;if(J!==q){s=f.stateNode,ti(Jr.current);var ie=null;switch(k){case"input":J=Ne(s,J),q=Ne(s,q),ie=[];break;case"select":J=V({},J,{value:void 0}),q=V({},q,{value:void 0}),ie=[];break;case"textarea":J=he(s,J),q=he(s,q),ie=[];break;default:typeof J.onClick!="function"&&typeof q.onClick=="function"&&(s.onclick=ks)}Ie(k,q);var pe;k=null;for(st in J)if(!q.hasOwnProperty(st)&&J.hasOwnProperty(st)&&J[st]!=null)if(st==="style"){var Te=J[st];for(pe in Te)Te.hasOwnProperty(pe)&&(k||(k={}),k[pe]="")}else st!=="dangerouslySetInnerHTML"&&st!=="children"&&st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&st!=="autoFocus"&&(a.hasOwnProperty(st)?ie||(ie=[]):(ie=ie||[]).push(st,null));for(st in q){var Be=q[st];if(Te=J!=null?J[st]:void 0,q.hasOwnProperty(st)&&Be!==Te&&(Be!=null||Te!=null))if(st==="style")if(Te){for(pe in Te)!Te.hasOwnProperty(pe)||Be&&Be.hasOwnProperty(pe)||(k||(k={}),k[pe]="");for(pe in Be)Be.hasOwnProperty(pe)&&Te[pe]!==Be[pe]&&(k||(k={}),k[pe]=Be[pe])}else k||(ie||(ie=[]),ie.push(st,k)),k=Be;else st==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Te=Te?Te.__html:void 0,Be!=null&&Te!==Be&&(ie=ie||[]).push(st,Be)):st==="children"?typeof Be!="string"&&typeof Be!="number"||(ie=ie||[]).push(st,""+Be):st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&(a.hasOwnProperty(st)?(Be!=null&&st==="onScroll"&&cn("scroll",s),ie||Te===Be||(ie=[])):(ie=ie||[]).push(st,Be))}k&&(ie=ie||[]).push("style",k);var st=ie;(f.updateQueue=st)&&(f.flags|=4)}},Bm=function(s,f,k,q){k!==q&&(f.flags|=4)};function Hh(s,f){if(!ct)switch(s.tailMode){case"hidden":f=s.tail;for(var k=null;f!==null;)f.alternate!==null&&(k=f),f=f.sibling;k===null?s.tail=null:k.sibling=null;break;case"collapsed":k=s.tail;for(var q=null;k!==null;)k.alternate!==null&&(q=k),k=k.sibling;q===null?f||s.tail===null?s.tail=null:s.tail.sibling=null:q.sibling=null}}function bo(s){var f=s.alternate!==null&&s.alternate.child===s.child,k=0,q=0;if(f)for(var J=s.child;J!==null;)k|=J.lanes|J.childLanes,q|=J.subtreeFlags&14680064,q|=J.flags&14680064,J.return=s,J=J.sibling;else for(J=s.child;J!==null;)k|=J.lanes|J.childLanes,q|=J.subtreeFlags,q|=J.flags,J.return=s,J=J.sibling;return s.subtreeFlags|=q,s.childLanes=k,f}function N_(s,f,k){var q=f.pendingProps;switch(Me(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bo(f),null;case 1:return aa(f.type)&&mu(),bo(f),null;case 3:return q=f.stateNode,fn(),Zr(ia),Zr(Pi),sa(),q.pendingContext&&(q.context=q.pendingContext,q.pendingContext=null),(s===null||s.child===null)&&(qr(f)?f.flags|=4:s===null||s.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,pt!==null&&(C0(pt),pt=null))),m0(s,f),bo(f),null;case 5:Ns(f);var J=ti(Nn.current);if(k=f.type,s!==null&&f.stateNode!=null)Dm(s,f,k,q,J),s.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!q){if(f.stateNode===null)throw Error(t(166));return bo(f),null}if(s=ti(Jr.current),qr(f)){q=f.stateNode,k=f.type;var ie=f.memoizedProps;switch(q[po]=f,q[gu]=ie,s=(f.mode&1)!==0,k){case"dialog":cn("cancel",q),cn("close",q);break;case"iframe":case"object":case"embed":cn("load",q);break;case"video":case"audio":for(J=0;J<Fo.length;J++)cn(Fo[J],q);break;case"source":cn("error",q);break;case"img":case"image":case"link":cn("error",q),cn("load",q);break;case"details":cn("toggle",q);break;case"input":xe(q,ie),cn("invalid",q);break;case"select":q._wrapperState={wasMultiple:!!ie.multiple},cn("invalid",q);break;case"textarea":ke(q,ie),cn("invalid",q)}Ie(k,ie),J=null;for(var pe in ie)if(ie.hasOwnProperty(pe)){var Te=ie[pe];pe==="children"?typeof Te=="string"?q.textContent!==Te&&(ie.suppressHydrationWarning!==!0&&Vu(q.textContent,Te,s),J=["children",Te]):typeof Te=="number"&&q.textContent!==""+Te&&(ie.suppressHydrationWarning!==!0&&Vu(q.textContent,Te,s),J=["children",""+Te]):a.hasOwnProperty(pe)&&Te!=null&&pe==="onScroll"&&cn("scroll",q)}switch(k){case"input":me(q),be(q,ie,!0);break;case"textarea":me(q),$e(q);break;case"select":case"option":break;default:typeof ie.onClick=="function"&&(q.onclick=ks)}q=J,f.updateQueue=q,q!==null&&(f.flags|=4)}else{pe=J.nodeType===9?J:J.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=vt(k)),s==="http://www.w3.org/1999/xhtml"?k==="script"?(s=pe.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof q.is=="string"?s=pe.createElement(k,{is:q.is}):(s=pe.createElement(k),k==="select"&&(pe=s,q.multiple?pe.multiple=!0:q.size&&(pe.size=q.size))):s=pe.createElementNS(s,k),s[po]=f,s[gu]=q,Fm(s,f,!1,!1),f.stateNode=s;e:{switch(pe=He(k,q),k){case"dialog":cn("cancel",s),cn("close",s),J=q;break;case"iframe":case"object":case"embed":cn("load",s),J=q;break;case"video":case"audio":for(J=0;J<Fo.length;J++)cn(Fo[J],s);J=q;break;case"source":cn("error",s),J=q;break;case"img":case"image":case"link":cn("error",s),cn("load",s),J=q;break;case"details":cn("toggle",s),J=q;break;case"input":xe(s,q),J=Ne(s,q),cn("invalid",s);break;case"option":J=q;break;case"select":s._wrapperState={wasMultiple:!!q.multiple},J=V({},q,{value:void 0}),cn("invalid",s);break;case"textarea":ke(s,q),J=he(s,q),cn("invalid",s);break;default:J=q}Ie(k,J),Te=J;for(ie in Te)if(Te.hasOwnProperty(ie)){var Be=Te[ie];ie==="style"?Ht(s,Be):ie==="dangerouslySetInnerHTML"?(Be=Be?Be.__html:void 0,Be!=null&&mt(s,Be)):ie==="children"?typeof Be=="string"?(k!=="textarea"||Be!=="")&&Je(s,Be):typeof Be=="number"&&Je(s,""+Be):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(a.hasOwnProperty(ie)?Be!=null&&ie==="onScroll"&&cn("scroll",s):Be!=null&&v(s,ie,Be,pe))}switch(k){case"input":me(s),be(s,q,!1);break;case"textarea":me(s),$e(s);break;case"option":q.value!=null&&s.setAttribute("value",""+ae(q.value));break;case"select":s.multiple=!!q.multiple,ie=q.value,ie!=null?Le(s,!!q.multiple,ie,!1):q.defaultValue!=null&&Le(s,!!q.multiple,q.defaultValue,!0);break;default:typeof J.onClick=="function"&&(s.onclick=ks)}switch(k){case"button":case"input":case"select":case"textarea":q=!!q.autoFocus;break e;case"img":q=!0;break e;default:q=!1}}q&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return bo(f),null;case 6:if(s&&f.stateNode!=null)Bm(s,f,s.memoizedProps,q);else{if(typeof q!="string"&&f.stateNode===null)throw Error(t(166));if(k=ti(Nn.current),ti(Jr.current),qr(f)){if(q=f.stateNode,k=f.memoizedProps,q[po]=f,(ie=q.nodeValue!==k)&&(s=qe,s!==null))switch(s.tag){case 3:Vu(q.nodeValue,k,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Vu(q.nodeValue,k,(s.mode&1)!==0)}ie&&(f.flags|=4)}else q=(k.nodeType===9?k:k.ownerDocument).createTextNode(q),q[po]=f,f.stateNode=q}return bo(f),null;case 13:if(Zr(hn),q=f.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(ct&&Ge!==null&&(f.mode&1)!==0&&(f.flags&128)===0)Rr(),yr(),f.flags|=98560,ie=!1;else if(ie=qr(f),q!==null&&q.dehydrated!==null){if(s===null){if(!ie)throw Error(t(318));if(ie=f.memoizedState,ie=ie!==null?ie.dehydrated:null,!ie)throw Error(t(317));ie[po]=f}else yr(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;bo(f),ie=!1}else pt!==null&&(C0(pt),pt=null),ie=!0;if(!ie)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=k,f):(q=q!==null,q!==(s!==null&&s.memoizedState!==null)&&q&&(f.child.flags|=8192,(f.mode&1)!==0&&(s===null||(hn.current&1)!==0?ya===0&&(ya=3):N0())),f.updateQueue!==null&&(f.flags|=4),bo(f),null);case 4:return fn(),m0(s,f),s===null&&Cs(f.stateNode.containerInfo),bo(f),null;case 10:return ga(f.type._context),bo(f),null;case 17:return aa(f.type)&&mu(),bo(f),null;case 19:if(Zr(hn),ie=f.memoizedState,ie===null)return bo(f),null;if(q=(f.flags&128)!==0,pe=ie.rendering,pe===null)if(q)Hh(ie,!1);else{if(ya!==0||s!==null&&(s.flags&128)!==0)for(s=f.child;s!==null;){if(pe=Ka(s),pe!==null){for(f.flags|=128,Hh(ie,!1),q=pe.updateQueue,q!==null&&(f.updateQueue=q,f.flags|=4),f.subtreeFlags=0,q=k,k=f.child;k!==null;)ie=k,s=q,ie.flags&=14680066,pe=ie.alternate,pe===null?(ie.childLanes=0,ie.lanes=s,ie.child=null,ie.subtreeFlags=0,ie.memoizedProps=null,ie.memoizedState=null,ie.updateQueue=null,ie.dependencies=null,ie.stateNode=null):(ie.childLanes=pe.childLanes,ie.lanes=pe.lanes,ie.child=pe.child,ie.subtreeFlags=0,ie.deletions=null,ie.memoizedProps=pe.memoizedProps,ie.memoizedState=pe.memoizedState,ie.updateQueue=pe.updateQueue,ie.type=pe.type,s=pe.dependencies,ie.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),k=k.sibling;return an(hn,hn.current&1|2),f.child}s=s.sibling}ie.tail!==null&&Mn()>eh&&(f.flags|=128,q=!0,Hh(ie,!1),f.lanes=4194304)}else{if(!q)if(s=Ka(pe),s!==null){if(f.flags|=128,q=!0,k=s.updateQueue,k!==null&&(f.updateQueue=k,f.flags|=4),Hh(ie,!0),ie.tail===null&&ie.tailMode==="hidden"&&!pe.alternate&&!ct)return bo(f),null}else 2*Mn()-ie.renderingStartTime>eh&&k!==1073741824&&(f.flags|=128,q=!0,Hh(ie,!1),f.lanes=4194304);ie.isBackwards?(pe.sibling=f.child,f.child=pe):(k=ie.last,k!==null?k.sibling=pe:f.child=pe,ie.last=pe)}return ie.tail!==null?(f=ie.tail,ie.rendering=f,ie.tail=f.sibling,ie.renderingStartTime=Mn(),f.sibling=null,k=hn.current,an(hn,q?k&1|2:k&1),f):(bo(f),null);case 22:case 23:return L0(),q=f.memoizedState!==null,s!==null&&s.memoizedState!==null!==q&&(f.flags|=8192),q&&(f.mode&1)!==0?(Rs&1073741824)!==0&&(bo(f),f.subtreeFlags&6&&(f.flags|=8192)):bo(f),null;case 24:return null;case 25:return null}throw Error(t(156,f.tag))}function T_(s,f){switch(Me(f),f.tag){case 1:return aa(f.type)&&mu(),s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 3:return fn(),Zr(ia),Zr(Pi),sa(),s=f.flags,(s&65536)!==0&&(s&128)===0?(f.flags=s&-65537|128,f):null;case 5:return Ns(f),null;case 13:if(Zr(hn),s=f.memoizedState,s!==null&&s.dehydrated!==null){if(f.alternate===null)throw Error(t(340));yr()}return s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 19:return Zr(hn),null;case 4:return fn(),null;case 10:return ga(f.type._context),null;case 22:case 23:return L0(),null;case 24:return null;default:return null}}var Dp=!1,wo=!1,R_=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function Qf(s,f){var k=s.ref;if(k!==null)if(typeof k=="function")try{k(null)}catch(q){Ci(s,f,q)}else k.current=null}function y0(s,f,k){try{k()}catch(q){Ci(s,f,q)}}var qm=!1;function M_(s,f){if(Wu=su,s=Xn(),ts(s)){if("selectionStart"in s)var k={start:s.selectionStart,end:s.selectionEnd};else e:{k=(k=s.ownerDocument)&&k.defaultView||window;var q=k.getSelection&&k.getSelection();if(q&&q.rangeCount!==0){k=q.anchorNode;var J=q.anchorOffset,ie=q.focusNode;q=q.focusOffset;try{k.nodeType,ie.nodeType}catch{k=null;break e}var pe=0,Te=-1,Be=-1,st=0,Ot=0,Ct=s,Pt=null;t:for(;;){for(var Xt;Ct!==k||J!==0&&Ct.nodeType!==3||(Te=pe+J),Ct!==ie||q!==0&&Ct.nodeType!==3||(Be=pe+q),Ct.nodeType===3&&(pe+=Ct.nodeValue.length),(Xt=Ct.firstChild)!==null;)Pt=Ct,Ct=Xt;for(;;){if(Ct===s)break t;if(Pt===k&&++st===J&&(Te=pe),Pt===ie&&++Ot===q&&(Be=pe),(Xt=Ct.nextSibling)!==null)break;Ct=Pt,Pt=Ct.parentNode}Ct=Xt}k=Te===-1||Be===-1?null:{start:Te,end:Be}}else k=null}k=k||{start:0,end:0}}else k=null;for(Ol={focusedElem:s,selectionRange:k},su=!1,Jt=f;Jt!==null;)if(f=Jt,s=f.child,(f.subtreeFlags&1028)!==0&&s!==null)s.return=f,Jt=s;else for(;Jt!==null;){f=Jt;try{var er=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(er!==null){var or=er.memoizedProps,Yi=er.memoizedState,tt=f.stateNode,Ve=tt.getSnapshotBeforeUpdate(f.elementType===f.type?or:ma(f.type,or),Yi);tt.__reactInternalSnapshotBeforeUpdate=Ve}break;case 3:var rt=f.stateNode.containerInfo;rt.nodeType===1?rt.textContent="":rt.nodeType===9&&rt.documentElement&&rt.removeChild(rt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Tt){Ci(f,f.return,Tt)}if(s=f.sibling,s!==null){s.return=f.return,Jt=s;break}Jt=f.return}return er=qm,qm=!1,er}function Gh(s,f,k){var q=f.updateQueue;if(q=q!==null?q.lastEffect:null,q!==null){var J=q=q.next;do{if((J.tag&s)===s){var ie=J.destroy;J.destroy=void 0,ie!==void 0&&y0(f,k,ie)}J=J.next}while(J!==q)}}function Bp(s,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var k=f=f.next;do{if((k.tag&s)===s){var q=k.create;k.destroy=q()}k=k.next}while(k!==f)}}function b0(s){var f=s.ref;if(f!==null){var k=s.stateNode;switch(s.tag){case 5:s=k;break;default:s=k}typeof f=="function"?f(s):f.current=s}}function zm(s){var f=s.alternate;f!==null&&(s.alternate=null,zm(f)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(f=s.stateNode,f!==null&&(delete f[po],delete f[gu],delete f[pa],delete f[Gf],delete f[Vf])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Um(s){return s.tag===5||s.tag===3||s.tag===4}function Hm(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Um(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function w0(s,f,k){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?k.nodeType===8?k.parentNode.insertBefore(s,f):k.insertBefore(s,f):(k.nodeType===8?(f=k.parentNode,f.insertBefore(s,k)):(f=k,f.appendChild(s)),k=k._reactRootContainer,k!=null||f.onclick!==null||(f.onclick=ks));else if(q!==4&&(s=s.child,s!==null))for(w0(s,f,k),s=s.sibling;s!==null;)w0(s,f,k),s=s.sibling}function _0(s,f,k){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?k.insertBefore(s,f):k.appendChild(s);else if(q!==4&&(s=s.child,s!==null))for(_0(s,f,k),s=s.sibling;s!==null;)_0(s,f,k),s=s.sibling}var ro=null,Rl=!1;function Lc(s,f,k){for(k=k.child;k!==null;)Gm(s,f,k),k=k.sibling}function Gm(s,f,k){if(pi&&typeof pi.onCommitFiberUnmount=="function")try{pi.onCommitFiberUnmount(so,k)}catch{}switch(k.tag){case 5:wo||Qf(k,f);case 6:var q=ro,J=Rl;ro=null,Lc(s,f,k),ro=q,Rl=J,ro!==null&&(Rl?(s=ro,k=k.stateNode,s.nodeType===8?s.parentNode.removeChild(k):s.removeChild(k)):ro.removeChild(k.stateNode));break;case 18:ro!==null&&(Rl?(s=ro,k=k.stateNode,s.nodeType===8?wc(s.parentNode,k):s.nodeType===1&&wc(s,k),ai(s)):wc(ro,k.stateNode));break;case 4:q=ro,J=Rl,ro=k.stateNode.containerInfo,Rl=!0,Lc(s,f,k),ro=q,Rl=J;break;case 0:case 11:case 14:case 15:if(!wo&&(q=k.updateQueue,q!==null&&(q=q.lastEffect,q!==null))){J=q=q.next;do{var ie=J,pe=ie.destroy;ie=ie.tag,pe!==void 0&&((ie&2)!==0||(ie&4)!==0)&&y0(k,f,pe),J=J.next}while(J!==q)}Lc(s,f,k);break;case 1:if(!wo&&(Qf(k,f),q=k.stateNode,typeof q.componentWillUnmount=="function"))try{q.props=k.memoizedProps,q.state=k.memoizedState,q.componentWillUnmount()}catch(Te){Ci(k,f,Te)}Lc(s,f,k);break;case 21:Lc(s,f,k);break;case 22:k.mode&1?(wo=(q=wo)||k.memoizedState!==null,Lc(s,f,k),wo=q):Lc(s,f,k);break;default:Lc(s,f,k)}}function Vm(s){var f=s.updateQueue;if(f!==null){s.updateQueue=null;var k=s.stateNode;k===null&&(k=s.stateNode=new R_),f.forEach(function(q){var J=H_.bind(null,s,q);k.has(q)||(k.add(q),q.then(J,J))})}}function Ml(s,f){var k=f.deletions;if(k!==null)for(var q=0;q<k.length;q++){var J=k[q];try{var ie=s,pe=f,Te=pe;e:for(;Te!==null;){switch(Te.tag){case 5:ro=Te.stateNode,Rl=!1;break e;case 3:ro=Te.stateNode.containerInfo,Rl=!0;break e;case 4:ro=Te.stateNode.containerInfo,Rl=!0;break e}Te=Te.return}if(ro===null)throw Error(t(160));Gm(ie,pe,J),ro=null,Rl=!1;var Be=J.alternate;Be!==null&&(Be.return=null),J.return=null}catch(st){Ci(J,f,st)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Wm(f,s),f=f.sibling}function Wm(s,f){var k=s.alternate,q=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Ml(f,s),Pu(s),q&4){try{Gh(3,s,s.return),Bp(3,s)}catch(or){Ci(s,s.return,or)}try{Gh(5,s,s.return)}catch(or){Ci(s,s.return,or)}}break;case 1:Ml(f,s),Pu(s),q&512&&k!==null&&Qf(k,k.return);break;case 5:if(Ml(f,s),Pu(s),q&512&&k!==null&&Qf(k,k.return),s.flags&32){var J=s.stateNode;try{Je(J,"")}catch(or){Ci(s,s.return,or)}}if(q&4&&(J=s.stateNode,J!=null)){var ie=s.memoizedProps,pe=k!==null?k.memoizedProps:ie,Te=s.type,Be=s.updateQueue;if(s.updateQueue=null,Be!==null)try{Te==="input"&&ie.type==="radio"&&ie.name!=null&&ve(J,ie),He(Te,pe);var st=He(Te,ie);for(pe=0;pe<Be.length;pe+=2){var Ot=Be[pe],Ct=Be[pe+1];Ot==="style"?Ht(J,Ct):Ot==="dangerouslySetInnerHTML"?mt(J,Ct):Ot==="children"?Je(J,Ct):v(J,Ot,Ct,st)}switch(Te){case"input":Xe(J,ie);break;case"textarea":Re(J,ie);break;case"select":var Pt=J._wrapperState.wasMultiple;J._wrapperState.wasMultiple=!!ie.multiple;var Xt=ie.value;Xt!=null?Le(J,!!ie.multiple,Xt,!1):Pt!==!!ie.multiple&&(ie.defaultValue!=null?Le(J,!!ie.multiple,ie.defaultValue,!0):Le(J,!!ie.multiple,ie.multiple?[]:"",!1))}J[gu]=ie}catch(or){Ci(s,s.return,or)}}break;case 6:if(Ml(f,s),Pu(s),q&4){if(s.stateNode===null)throw Error(t(162));J=s.stateNode,ie=s.memoizedProps;try{J.nodeValue=ie}catch(or){Ci(s,s.return,or)}}break;case 3:if(Ml(f,s),Pu(s),q&4&&k!==null&&k.memoizedState.isDehydrated)try{ai(f.containerInfo)}catch(or){Ci(s,s.return,or)}break;case 4:Ml(f,s),Pu(s);break;case 13:Ml(f,s),Pu(s),J=s.child,J.flags&8192&&(ie=J.memoizedState!==null,J.stateNode.isHidden=ie,!ie||J.alternate!==null&&J.alternate.memoizedState!==null||(E0=Mn())),q&4&&Vm(s);break;case 22:if(Ot=k!==null&&k.memoizedState!==null,s.mode&1?(wo=(st=wo)||Ot,Ml(f,s),wo=st):Ml(f,s),Pu(s),q&8192){if(st=s.memoizedState!==null,(s.stateNode.isHidden=st)&&!Ot&&(s.mode&1)!==0)for(Jt=s,Ot=s.child;Ot!==null;){for(Ct=Jt=Ot;Jt!==null;){switch(Pt=Jt,Xt=Pt.child,Pt.tag){case 0:case 11:case 14:case 15:Gh(4,Pt,Pt.return);break;case 1:Qf(Pt,Pt.return);var er=Pt.stateNode;if(typeof er.componentWillUnmount=="function"){q=Pt,k=Pt.return;try{f=q,er.props=f.memoizedProps,er.state=f.memoizedState,er.componentWillUnmount()}catch(or){Ci(q,k,or)}}break;case 5:Qf(Pt,Pt.return);break;case 22:if(Pt.memoizedState!==null){Xm(Ct);continue}}Xt!==null?(Xt.return=Pt,Jt=Xt):Xm(Ct)}Ot=Ot.sibling}e:for(Ot=null,Ct=s;;){if(Ct.tag===5){if(Ot===null){Ot=Ct;try{J=Ct.stateNode,st?(ie=J.style,typeof ie.setProperty=="function"?ie.setProperty("display","none","important"):ie.display="none"):(Te=Ct.stateNode,Be=Ct.memoizedProps.style,pe=Be!=null&&Be.hasOwnProperty("display")?Be.display:null,Te.style.display=At("display",pe))}catch(or){Ci(s,s.return,or)}}}else if(Ct.tag===6){if(Ot===null)try{Ct.stateNode.nodeValue=st?"":Ct.memoizedProps}catch(or){Ci(s,s.return,or)}}else if((Ct.tag!==22&&Ct.tag!==23||Ct.memoizedState===null||Ct===s)&&Ct.child!==null){Ct.child.return=Ct,Ct=Ct.child;continue}if(Ct===s)break e;for(;Ct.sibling===null;){if(Ct.return===null||Ct.return===s)break e;Ot===Ct&&(Ot=null),Ct=Ct.return}Ot===Ct&&(Ot=null),Ct.sibling.return=Ct.return,Ct=Ct.sibling}}break;case 19:Ml(f,s),Pu(s),q&4&&Vm(s);break;case 21:break;default:Ml(f,s),Pu(s)}}function Pu(s){var f=s.flags;if(f&2){try{e:{for(var k=s.return;k!==null;){if(Um(k)){var q=k;break e}k=k.return}throw Error(t(160))}switch(q.tag){case 5:var J=q.stateNode;q.flags&32&&(Je(J,""),q.flags&=-33);var ie=Hm(s);_0(s,ie,J);break;case 3:case 4:var pe=q.stateNode.containerInfo,Te=Hm(s);w0(s,Te,pe);break;default:throw Error(t(161))}}catch(Be){Ci(s,s.return,Be)}s.flags&=-3}f&4096&&(s.flags&=-4097)}function I_(s,f,k){Jt=s,$m(s)}function $m(s,f,k){for(var q=(s.mode&1)!==0;Jt!==null;){var J=Jt,ie=J.child;if(J.tag===22&&q){var pe=J.memoizedState!==null||Dp;if(!pe){var Te=J.alternate,Be=Te!==null&&Te.memoizedState!==null||wo;Te=Dp;var st=wo;if(Dp=pe,(wo=Be)&&!st)for(Jt=J;Jt!==null;)pe=Jt,Be=pe.child,pe.tag===22&&pe.memoizedState!==null?Km(J):Be!==null?(Be.return=pe,Jt=Be):Km(J);for(;ie!==null;)Jt=ie,$m(ie),ie=ie.sibling;Jt=J,Dp=Te,wo=st}Ym(s)}else(J.subtreeFlags&8772)!==0&&ie!==null?(ie.return=J,Jt=ie):Ym(s)}}function Ym(s){for(;Jt!==null;){var f=Jt;if((f.flags&8772)!==0){var k=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:wo||Bp(5,f);break;case 1:var q=f.stateNode;if(f.flags&4&&!wo)if(k===null)q.componentDidMount();else{var J=f.elementType===f.type?k.memoizedProps:ma(f.type,k.memoizedProps);q.componentDidUpdate(J,k.memoizedState,q.__reactInternalSnapshotBeforeUpdate)}var ie=f.updateQueue;ie!==null&&vn(f,ie,q);break;case 3:var pe=f.updateQueue;if(pe!==null){if(k=null,f.child!==null)switch(f.child.tag){case 5:k=f.child.stateNode;break;case 1:k=f.child.stateNode}vn(f,pe,k)}break;case 5:var Te=f.stateNode;if(k===null&&f.flags&4){k=Te;var Be=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":Be.autoFocus&&k.focus();break;case"img":Be.src&&(k.src=Be.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var st=f.alternate;if(st!==null){var Ot=st.memoizedState;if(Ot!==null){var Ct=Ot.dehydrated;Ct!==null&&ai(Ct)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}wo||f.flags&512&&b0(f)}catch(Pt){Ci(f,f.return,Pt)}}if(f===s){Jt=null;break}if(k=f.sibling,k!==null){k.return=f.return,Jt=k;break}Jt=f.return}}function Xm(s){for(;Jt!==null;){var f=Jt;if(f===s){Jt=null;break}var k=f.sibling;if(k!==null){k.return=f.return,Jt=k;break}Jt=f.return}}function Km(s){for(;Jt!==null;){var f=Jt;try{switch(f.tag){case 0:case 11:case 15:var k=f.return;try{Bp(4,f)}catch(Be){Ci(f,k,Be)}break;case 1:var q=f.stateNode;if(typeof q.componentDidMount=="function"){var J=f.return;try{q.componentDidMount()}catch(Be){Ci(f,J,Be)}}var ie=f.return;try{b0(f)}catch(Be){Ci(f,ie,Be)}break;case 5:var pe=f.return;try{b0(f)}catch(Be){Ci(f,pe,Be)}}}catch(Be){Ci(f,f.return,Be)}if(f===s){Jt=null;break}var Te=f.sibling;if(Te!==null){Te.return=f.return,Jt=Te;break}Jt=f.return}}var j_=Math.ceil,qp=b.ReactCurrentDispatcher,S0=b.ReactCurrentOwner,sl=b.ReactCurrentBatchConfig,sn=0,La=null,ua=null,no=0,Rs=0,Jf=go(0),ya=0,Vh=null,df=0,zp=0,x0=0,Wh=null,cs=null,E0=0,eh=1/0,Ju=null,Up=!1,P0=null,Nc=null,Hp=!1,Tc=null,Gp=0,$h=0,O0=null,Vp=-1,Wp=0;function Ho(){return(sn&6)!==0?Mn():Vp!==-1?Vp:Vp=Mn()}function Rc(s){return(s.mode&1)===0?1:(sn&2)!==0&&no!==0?no&-no:Qr.transition!==null?(Wp===0&&(Wp=nu()),Wp):(s=Ir,s!==0||(s=window.event,s=s===void 0?16:Uu(s.type)),s)}function Il(s,f,k,q){if(50<$h)throw $h=0,O0=null,Error(t(185));Gs(s,k,q),((sn&2)===0||s!==La)&&(s===La&&((sn&2)===0&&(zp|=k),ya===4&&Mc(s,no)),fs(s,q),k===1&&sn===0&&(f.mode&1)===0&&(eh=Mn()+500,Cl&&oe()))}function fs(s,f){var k=s.callbackNode;ha(s,f);var q=Ri(s,s===La?no:0);if(q===0)k!==null&&Vo(k),s.callbackNode=null,s.callbackPriority=0;else if(f=q&-q,s.callbackPriority!==f){if(k!=null&&Vo(k),f===1)s.tag===0?te(Qm.bind(null,s)):H(Qm.bind(null,s)),Uf(function(){(sn&6)===0&&oe()}),k=null;else{switch(_s(q)){case 1:k=oo;break;case 4:k=dl;break;case 16:k=Hs;break;case 536870912:k=ru;break;default:k=Hs}k=oy(k,Zm.bind(null,s))}s.callbackPriority=f,s.callbackNode=k}}function Zm(s,f){if(Vp=-1,Wp=0,(sn&6)!==0)throw Error(t(327));var k=s.callbackNode;if(th()&&s.callbackNode!==k)return null;var q=Ri(s,s===La?no:0);if(q===0)return null;if((q&30)!==0||(q&s.expiredLanes)!==0||f)f=$p(s,q);else{f=q;var J=sn;sn|=2;var ie=ey();(La!==s||no!==f)&&(Ju=null,eh=Mn()+500,gf(s,f));do try{B_();break}catch(Te){Jm(s,Te)}while(!0);Oi(),qp.current=ie,sn=J,ua!==null?f=0:(La=null,no=0,f=ya)}if(f!==0){if(f===2&&(J=Wo(s),J!==0&&(q=J,f=A0(s,J))),f===1)throw k=Vh,gf(s,0),Mc(s,q),fs(s,Mn()),k;if(f===6)Mc(s,q);else{if(J=s.current.alternate,(q&30)===0&&!F_(J)&&(f=$p(s,q),f===2&&(ie=Wo(s),ie!==0&&(q=ie,f=A0(s,ie))),f===1))throw k=Vh,gf(s,0),Mc(s,q),fs(s,Mn()),k;switch(s.finishedWork=J,s.finishedLanes=q,f){case 0:case 1:throw Error(t(345));case 2:vf(s,cs,Ju);break;case 3:if(Mc(s,q),(q&130023424)===q&&(f=E0+500-Mn(),10<f)){if(Ri(s,0)!==0)break;if(J=s.suspendedLanes,(J&q)!==q){Ho(),s.pingedLanes|=s.suspendedLanes&J;break}s.timeoutHandle=$a(vf.bind(null,s,cs,Ju),f);break}vf(s,cs,Ju);break;case 4:if(Mc(s,q),(q&4194240)===q)break;for(f=s.eventTimes,J=-1;0<q;){var pe=31-Ar(q);ie=1<<pe,pe=f[pe],pe>J&&(J=pe),q&=~ie}if(q=J,q=Mn()-q,q=(120>q?120:480>q?480:1080>q?1080:1920>q?1920:3e3>q?3e3:4320>q?4320:1960*j_(q/1960))-q,10<q){s.timeoutHandle=$a(vf.bind(null,s,cs,Ju),q);break}vf(s,cs,Ju);break;case 5:vf(s,cs,Ju);break;default:throw Error(t(329))}}}return fs(s,Mn()),s.callbackNode===k?Zm.bind(null,s):null}function A0(s,f){var k=Wh;return s.current.memoizedState.isDehydrated&&(gf(s,f).flags|=256),s=$p(s,f),s!==2&&(f=cs,cs=k,f!==null&&C0(f)),s}function C0(s){cs===null?cs=s:cs.push.apply(cs,s)}function F_(s){for(var f=s;;){if(f.flags&16384){var k=f.updateQueue;if(k!==null&&(k=k.stores,k!==null))for(var q=0;q<k.length;q++){var J=k[q],ie=J.getSnapshot;J=J.value;try{if(!jr(ie(),J))return!1}catch{return!1}}}if(k=f.child,f.subtreeFlags&16384&&k!==null)k.return=f,f=k;else{if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Mc(s,f){for(f&=~x0,f&=~zp,s.suspendedLanes|=f,s.pingedLanes&=~f,s=s.expirationTimes;0<f;){var k=31-Ar(f),q=1<<k;s[k]=-1,f&=~q}}function Qm(s){if((sn&6)!==0)throw Error(t(327));th();var f=Ri(s,0);if((f&1)===0)return fs(s,Mn()),null;var k=$p(s,f);if(s.tag!==0&&k===2){var q=Wo(s);q!==0&&(f=q,k=A0(s,q))}if(k===1)throw k=Vh,gf(s,0),Mc(s,f),fs(s,Mn()),k;if(k===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=f,vf(s,cs,Ju),fs(s,Mn()),null}function k0(s,f){var k=sn;sn|=1;try{return s(f)}finally{sn=k,sn===0&&(eh=Mn()+500,Cl&&oe())}}function pf(s){Tc!==null&&Tc.tag===0&&(sn&6)===0&&th();var f=sn;sn|=1;var k=sl.transition,q=Ir;try{if(sl.transition=null,Ir=1,s)return s()}finally{Ir=q,sl.transition=k,sn=f,(sn&6)===0&&oe()}}function L0(){Rs=Jf.current,Zr(Jf)}function gf(s,f){s.finishedWork=null,s.finishedLanes=0;var k=s.timeoutHandle;if(k!==-1&&(s.timeoutHandle=-1,bc(k)),ua!==null)for(k=ua.return;k!==null;){var q=k;switch(Me(q),q.tag){case 1:q=q.type.childContextTypes,q!=null&&mu();break;case 3:fn(),Zr(ia),Zr(Pi),sa();break;case 5:Ns(q);break;case 4:fn();break;case 13:Zr(hn);break;case 19:Zr(hn);break;case 10:ga(q.type._context);break;case 22:case 23:L0()}k=k.return}if(La=s,ua=s=Ic(s.current,null),no=Rs=f,ya=0,Vh=null,x0=zp=df=0,cs=Wh=null,oa!==null){for(f=0;f<oa.length;f++)if(k=oa[f],q=k.interleaved,q!==null){k.interleaved=null;var J=q.next,ie=k.pending;if(ie!==null){var pe=ie.next;ie.next=J,q.next=pe}k.pending=q}oa=null}return s}function Jm(s,f){do{var k=ua;try{if(Oi(),wu.current=Oc,Za){for(var q=on.memoizedState;q!==null;){var J=q.queue;J!==null&&(J.pending=null),q=q.next}Za=!1}if(Ai=0,Un=zn=on=null,yo=!1,Qa=0,S0.current=null,k===null||k.return===null){ya=1,Vh=f,ua=null;break}e:{var ie=s,pe=k.return,Te=k,Be=f;if(f=no,Te.flags|=32768,Be!==null&&typeof Be=="object"&&typeof Be.then=="function"){var st=Be,Ot=Te,Ct=Ot.tag;if((Ot.mode&1)===0&&(Ct===0||Ct===11||Ct===15)){var Pt=Ot.alternate;Pt?(Ot.updateQueue=Pt.updateQueue,Ot.memoizedState=Pt.memoizedState,Ot.lanes=Pt.lanes):(Ot.updateQueue=null,Ot.memoizedState=null)}var Xt=B(pe);if(Xt!==null){Xt.flags&=-257,X(Xt,pe,Te,ie,f),Xt.mode&1&&P(ie,st,f),f=Xt,Be=st;var er=f.updateQueue;if(er===null){var or=new Set;or.add(Be),f.updateQueue=or}else er.add(Be);break e}else{if((f&1)===0){P(ie,st,f),N0();break e}Be=Error(t(426))}}else if(ct&&Te.mode&1){var Yi=B(pe);if(Yi!==null){(Yi.flags&65536)===0&&(Yi.flags|=256),X(Yi,pe,Te,ie,f),Xr(Qu(Be,Te));break e}}ie=Be=Qu(Be,Te),ya!==4&&(ya=2),Wh===null?Wh=[ie]:Wh.push(ie),ie=pe;do{switch(ie.tag){case 3:ie.flags|=65536,f&=-f,ie.lanes|=f;var tt=Fp(ie,Be,f);va(ie,tt);break e;case 1:Te=Be;var Ve=ie.type,rt=ie.stateNode;if((ie.flags&128)===0&&(typeof Ve.getDerivedStateFromError=="function"||rt!==null&&typeof rt.componentDidCatch=="function"&&(Nc===null||!Nc.has(rt)))){ie.flags|=65536,f&=-f,ie.lanes|=f;var Tt=y(ie,Te,f);va(ie,Tt);break e}}ie=ie.return}while(ie!==null)}ry(k)}catch(sr){f=sr,ua===k&&k!==null&&(ua=k=k.return);continue}break}while(!0)}function ey(){var s=qp.current;return qp.current=Oc,s===null?Oc:s}function N0(){(ya===0||ya===3||ya===2)&&(ya=4),La===null||(df&268435455)===0&&(zp&268435455)===0||Mc(La,no)}function $p(s,f){var k=sn;sn|=2;var q=ey();(La!==s||no!==f)&&(Ju=null,gf(s,f));do try{D_();break}catch(J){Jm(s,J)}while(!0);if(Oi(),sn=k,qp.current=q,ua!==null)throw Error(t(261));return La=null,no=0,ya}function D_(){for(;ua!==null;)ty(ua)}function B_(){for(;ua!==null&&!tu();)ty(ua)}function ty(s){var f=ay(s.alternate,s,Rs);s.memoizedProps=s.pendingProps,f===null?ry(s):ua=f,S0.current=null}function ry(s){var f=s;do{var k=f.alternate;if(s=f.return,(f.flags&32768)===0){if(k=N_(k,f,Rs),k!==null){ua=k;return}}else{if(k=T_(k,f),k!==null){k.flags&=32767,ua=k;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{ya=6,ua=null;return}}if(f=f.sibling,f!==null){ua=f;return}ua=f=s}while(f!==null);ya===0&&(ya=5)}function vf(s,f,k){var q=Ir,J=sl.transition;try{sl.transition=null,Ir=1,q_(s,f,k,q)}finally{sl.transition=J,Ir=q}return null}function q_(s,f,k,q){do th();while(Tc!==null);if((sn&6)!==0)throw Error(t(327));k=s.finishedWork;var J=s.finishedLanes;if(k===null)return null;if(s.finishedWork=null,s.finishedLanes=0,k===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var ie=k.lanes|k.childLanes;if(af(s,ie),s===La&&(ua=La=null,no=0),(k.subtreeFlags&2064)===0&&(k.flags&2064)===0||Hp||(Hp=!0,oy(Hs,function(){return th(),null})),ie=(k.flags&15990)!==0,(k.subtreeFlags&15990)!==0||ie){ie=sl.transition,sl.transition=null;var pe=Ir;Ir=1;var Te=sn;sn|=4,S0.current=null,M_(s,k),Wm(k,s),No(Ol),su=!!Wu,Ol=Wu=null,s.current=k,I_(k),vc(),sn=Te,Ir=pe,sl.transition=ie}else s.current=k;if(Hp&&(Hp=!1,Tc=s,Gp=J),ie=s.pendingLanes,ie===0&&(Nc=null),Kr(k.stateNode),fs(s,Mn()),f!==null)for(q=s.onRecoverableError,k=0;k<f.length;k++)J=f[k],q(J.value,{componentStack:J.stack,digest:J.digest});if(Up)throw Up=!1,s=P0,P0=null,s;return(Gp&1)!==0&&s.tag!==0&&th(),ie=s.pendingLanes,(ie&1)!==0?s===O0?$h++:($h=0,O0=s):$h=0,oe(),null}function th(){if(Tc!==null){var s=_s(Gp),f=sl.transition,k=Ir;try{if(sl.transition=null,Ir=16>s?16:s,Tc===null)var q=!1;else{if(s=Tc,Tc=null,Gp=0,(sn&6)!==0)throw Error(t(331));var J=sn;for(sn|=4,Jt=s.current;Jt!==null;){var ie=Jt,pe=ie.child;if((Jt.flags&16)!==0){var Te=ie.deletions;if(Te!==null){for(var Be=0;Be<Te.length;Be++){var st=Te[Be];for(Jt=st;Jt!==null;){var Ot=Jt;switch(Ot.tag){case 0:case 11:case 15:Gh(8,Ot,ie)}var Ct=Ot.child;if(Ct!==null)Ct.return=Ot,Jt=Ct;else for(;Jt!==null;){Ot=Jt;var Pt=Ot.sibling,Xt=Ot.return;if(zm(Ot),Ot===st){Jt=null;break}if(Pt!==null){Pt.return=Xt,Jt=Pt;break}Jt=Xt}}}var er=ie.alternate;if(er!==null){var or=er.child;if(or!==null){er.child=null;do{var Yi=or.sibling;or.sibling=null,or=Yi}while(or!==null)}}Jt=ie}}if((ie.subtreeFlags&2064)!==0&&pe!==null)pe.return=ie,Jt=pe;else e:for(;Jt!==null;){if(ie=Jt,(ie.flags&2048)!==0)switch(ie.tag){case 0:case 11:case 15:Gh(9,ie,ie.return)}var tt=ie.sibling;if(tt!==null){tt.return=ie.return,Jt=tt;break e}Jt=ie.return}}var Ve=s.current;for(Jt=Ve;Jt!==null;){pe=Jt;var rt=pe.child;if((pe.subtreeFlags&2064)!==0&&rt!==null)rt.return=pe,Jt=rt;else e:for(pe=Ve;Jt!==null;){if(Te=Jt,(Te.flags&2048)!==0)try{switch(Te.tag){case 0:case 11:case 15:Bp(9,Te)}}catch(sr){Ci(Te,Te.return,sr)}if(Te===pe){Jt=null;break e}var Tt=Te.sibling;if(Tt!==null){Tt.return=Te.return,Jt=Tt;break e}Jt=Te.return}}if(sn=J,oe(),pi&&typeof pi.onPostCommitFiberRoot=="function")try{pi.onPostCommitFiberRoot(so,s)}catch{}q=!0}return q}finally{Ir=k,sl.transition=f}}return!1}function ny(s,f,k){f=Qu(k,f),f=Fp(s,f,1),s=Aa(s,f,1),f=Ho(),s!==null&&(Gs(s,1,f),fs(s,f))}function Ci(s,f,k){if(s.tag===3)ny(s,s,k);else for(;f!==null;){if(f.tag===3){ny(f,s,k);break}else if(f.tag===1){var q=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof q.componentDidCatch=="function"&&(Nc===null||!Nc.has(q))){s=Qu(k,s),s=y(f,s,1),f=Aa(f,s,1),s=Ho(),f!==null&&(Gs(f,1,s),fs(f,s));break}}f=f.return}}function z_(s,f,k){var q=s.pingCache;q!==null&&q.delete(f),f=Ho(),s.pingedLanes|=s.suspendedLanes&k,La===s&&(no&k)===k&&(ya===4||ya===3&&(no&130023424)===no&&500>Mn()-E0?gf(s,0):x0|=k),fs(s,f)}function iy(s,f){f===0&&((s.mode&1)===0?f=1:(f=ja,ja<<=1,(ja&130023424)===0&&(ja=4194304)));var k=Ho();s=Dr(s,f),s!==null&&(Gs(s,f,k),fs(s,k))}function U_(s){var f=s.memoizedState,k=0;f!==null&&(k=f.retryLane),iy(s,k)}function H_(s,f){var k=0;switch(s.tag){case 13:var q=s.stateNode,J=s.memoizedState;J!==null&&(k=J.retryLane);break;case 19:q=s.stateNode;break;default:throw Error(t(314))}q!==null&&q.delete(f),iy(s,k)}var ay;ay=function(s,f,k){if(s!==null)if(s.memoizedProps!==f.pendingProps||ia.current)le=!0;else{if((s.lanes&k)===0&&(f.flags&128)===0)return le=!1,v0(s,f,k);le=(s.flags&131072)!==0}else le=!1,ct&&(f.flags&1048576)!==0&&yt(f,ye,f.index);switch(f.lanes=0,f.tag){case 2:var q=f.type;Ur(s,f),s=f.pendingProps;var J=Al(f,Pi.current);yn(f,k),J=al(null,f,q,s,J,k);var ie=Ja();return f.flags|=1,typeof J=="object"&&J!==null&&typeof J.render=="function"&&J.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,aa(q)?(ie=!0,is(f)):ie=!1,f.memoizedState=J.state!==null&&J.state!==void 0?J.state:null,yu(f),J.updater=Cc,f.stateNode=J,J._reactInternals=f,Kf(f,q,s,k),f=mn(null,f,q,!0,ie,k)):(f.tag=0,ct&&ie&<(f),_e(null,f,J,k),f=f.child),f;case 16:q=f.elementType;e:{switch(Ur(s,f),s=f.pendingProps,J=q._init,q=J(q._payload),f.type=q,J=f.tag=V_(q),s=ma(q,s),J){case 0:f=Vt(null,f,q,s,k);break e;case 1:f=Tn(null,f,q,s,k);break e;case 11:f=Ke(null,f,q,s,k);break e;case 14:f=ut(null,f,q,ma(q.type,s),k);break e}throw Error(t(306,q,""))}return f;case 0:return q=f.type,J=f.pendingProps,J=f.elementType===q?J:ma(q,J),Vt(s,f,q,J,k);case 1:return q=f.type,J=f.pendingProps,J=f.elementType===q?J:ma(q,J),Tn(s,f,q,J,k);case 3:e:{if(to(f),s===null)throw Error(t(387));q=f.pendingProps,ie=f.memoizedState,J=ie.element,Xu(s,f),Bo(f,q,null,k);var pe=f.memoizedState;if(q=pe.element,ie.isDehydrated)if(ie={element:q,isDehydrated:!1,cache:pe.cache,pendingSuspenseBoundaries:pe.pendingSuspenseBoundaries,transitions:pe.transitions},f.updateQueue.baseState=ie,f.memoizedState=ie,f.flags&256){J=Qu(Error(t(423)),f),f=ol(s,f,q,k,J);break e}else if(q!==J){J=Qu(Error(t(424)),f),f=ol(s,f,q,k,J);break e}else for(Ge=Ui(f.stateNode.containerInfo.firstChild),qe=f,ct=!0,pt=null,k=xr(f,null,q,k),f.child=k;k;)k.flags=k.flags&-3|4096,k=k.sibling;else{if(yr(),q===J){f=ka(s,f,k);break e}_e(s,f,q,k)}f=f.child}return f;case 5:return bu(f),s===null&&Mt(f),q=f.type,J=f.pendingProps,ie=s!==null?s.memoizedProps:null,pe=J.children,uf(q,J)?pe=null:ie!==null&&uf(q,ie)&&(f.flags|=32),br(s,f),_e(s,f,pe,k),f.child;case 6:return s===null&&Mt(f),null;case 13:return dt(s,f,k);case 4:return qo(f,f.stateNode.containerInfo),q=f.pendingProps,s===null?f.child=ci(f,null,q,k):_e(s,f,q,k),f.child;case 11:return q=f.type,J=f.pendingProps,J=f.elementType===q?J:ma(q,J),Ke(s,f,q,J,k);case 7:return _e(s,f,f.pendingProps,k),f.child;case 8:return _e(s,f,f.pendingProps.children,k),f.child;case 12:return _e(s,f,f.pendingProps.children,k),f.child;case 10:e:{if(q=f.type._context,J=f.pendingProps,ie=f.memoizedProps,pe=J.value,an(Vi,q._currentValue),q._currentValue=pe,ie!==null)if(jr(ie.value,pe)){if(ie.children===J.children&&!ia.current){f=ka(s,f,k);break e}}else for(ie=f.child,ie!==null&&(ie.return=f);ie!==null;){var Te=ie.dependencies;if(Te!==null){pe=ie.child;for(var Be=Te.firstContext;Be!==null;){if(Be.context===q){if(ie.tag===1){Be=Xa(-1,k&-k),Be.tag=2;var st=ie.updateQueue;if(st!==null){st=st.shared;var Ot=st.pending;Ot===null?Be.next=Be:(Be.next=Ot.next,Ot.next=Be),st.pending=Be}}ie.lanes|=k,Be=ie.alternate,Be!==null&&(Be.lanes|=k),Ya(ie.return,k,f),Te.lanes|=k;break}Be=Be.next}}else if(ie.tag===10)pe=ie.type===f.type?null:ie.child;else if(ie.tag===18){if(pe=ie.return,pe===null)throw Error(t(341));pe.lanes|=k,Te=pe.alternate,Te!==null&&(Te.lanes|=k),Ya(pe,k,f),pe=ie.sibling}else pe=ie.child;if(pe!==null)pe.return=ie;else for(pe=ie;pe!==null;){if(pe===f){pe=null;break}if(ie=pe.sibling,ie!==null){ie.return=pe.return,pe=ie;break}pe=pe.return}ie=pe}_e(s,f,J.children,k),f=f.child}return f;case 9:return J=f.type,q=f.pendingProps.children,yn(f,k),J=qn(J),q=q(J),f.flags|=1,_e(s,f,q,k),f.child;case 14:return q=f.type,J=ma(q,f.pendingProps),J=ma(q.type,J),ut(s,f,q,J,k);case 15:return Lt(s,f,f.type,f.pendingProps,k);case 17:return q=f.type,J=f.pendingProps,J=f.elementType===q?J:ma(q,J),Ur(s,f),f.tag=1,aa(q)?(s=!0,is(f)):s=!1,yn(f,k),jp(f,q,J),Kf(f,q,J,k),mn(null,f,q,!0,s,k);case 19:return $i(s,f,k);case 22:return Zt(s,f,k)}throw Error(t(156,f.tag))};function oy(s,f){return ws(s,f)}function G_(s,f,k,q){this.tag=s,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ll(s,f,k,q){return new G_(s,f,k,q)}function T0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function V_(s){if(typeof s=="function")return T0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===L)return 11;if(s===F)return 14}return 2}function Ic(s,f){var k=s.alternate;return k===null?(k=ll(s.tag,f,s.key,s.mode),k.elementType=s.elementType,k.type=s.type,k.stateNode=s.stateNode,k.alternate=s,s.alternate=k):(k.pendingProps=f,k.type=s.type,k.flags=0,k.subtreeFlags=0,k.deletions=null),k.flags=s.flags&14680064,k.childLanes=s.childLanes,k.lanes=s.lanes,k.child=s.child,k.memoizedProps=s.memoizedProps,k.memoizedState=s.memoizedState,k.updateQueue=s.updateQueue,f=s.dependencies,k.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},k.sibling=s.sibling,k.index=s.index,k.ref=s.ref,k}function Yp(s,f,k,q,J,ie){var pe=2;if(q=s,typeof s=="function")T0(s)&&(pe=1);else if(typeof s=="string")pe=5;else e:switch(s){case T:return mf(k.children,J,ie,f);case M:pe=8,J|=8;break;case j:return s=ll(12,k,f,J|2),s.elementType=j,s.lanes=ie,s;case A:return s=ll(13,k,f,J),s.elementType=A,s.lanes=ie,s;case N:return s=ll(19,k,f,J),s.elementType=N,s.lanes=ie,s;case W:return Xp(k,J,ie,f);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case C:pe=10;break e;case x:pe=9;break e;case L:pe=11;break e;case F:pe=14;break e;case U:pe=16,q=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return f=ll(pe,k,f,J),f.elementType=s,f.type=q,f.lanes=ie,f}function mf(s,f,k,q){return s=ll(7,s,q,f),s.lanes=k,s}function Xp(s,f,k,q){return s=ll(22,s,q,f),s.elementType=W,s.lanes=k,s.stateNode={isHidden:!1},s}function R0(s,f,k){return s=ll(6,s,null,f),s.lanes=k,s}function M0(s,f,k){return f=ll(4,s.children!==null?s.children:[],s.key,f),f.lanes=k,f.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},f}function W_(s,f,k,q,J){this.tag=f,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=da(0),this.expirationTimes=da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.identifierPrefix=q,this.onRecoverableError=J,this.mutableSourceEagerHydrationData=null}function I0(s,f,k,q,J,ie,pe,Te,Be){return s=new W_(s,f,k,Te,Be),f===1?(f=1,ie===!0&&(f|=8)):f=0,ie=ll(3,null,null,f),s.current=ie,ie.stateNode=s,ie.memoizedState={element:q,isDehydrated:k,cache:null,transitions:null,pendingSuspenseBoundaries:null},yu(ie),s}function $_(s,f,k){var q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:q==null?null:""+q,children:s,containerInfo:f,implementation:k}}function sy(s){if(!s)return ns;s=s._reactInternals;e:{if(en(s)!==s||s.tag!==1)throw Error(t(170));var f=s;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(aa(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(t(171))}if(s.tag===1){var k=s.type;if(aa(k))return Yu(s,k,f)}return f}function ly(s,f,k,q,J,ie,pe,Te,Be){return s=I0(k,q,!0,s,J,ie,pe,Te,Be),s.context=sy(null),k=s.current,q=Ho(),J=Rc(k),ie=Xa(q,J),ie.callback=f??null,Aa(k,ie,J),s.current.lanes=J,Gs(s,J,q),fs(s,q),s}function Kp(s,f,k,q){var J=f.current,ie=Ho(),pe=Rc(J);return k=sy(k),f.context===null?f.context=k:f.pendingContext=k,f=Xa(ie,pe),f.payload={element:s},q=q===void 0?null:q,q!==null&&(f.callback=q),s=Aa(J,f,pe),s!==null&&(Il(s,J,pe,ie),kl(s,J,pe)),pe}function Zp(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function uy(s,f){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var k=s.retryLane;s.retryLane=k!==0&&k<f?k:f}}function j0(s,f){uy(s,f),(s=s.alternate)&&uy(s,f)}function Y_(){return null}var cy=typeof reportError=="function"?reportError:function(s){console.error(s)};function F0(s){this._internalRoot=s}Qp.prototype.render=F0.prototype.render=function(s){var f=this._internalRoot;if(f===null)throw Error(t(409));Kp(s,f,null,null)},Qp.prototype.unmount=F0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var f=s.containerInfo;pf(function(){Kp(null,s,null,null)}),f[Gi]=null}};function Qp(s){this._internalRoot=s}Qp.prototype.unstable_scheduleHydration=function(s){if(s){var f=$o();s={blockedOn:null,target:s,priority:f};for(var k=0;k<lo.length&&f!==0&&f<lo[k].priority;k++);lo.splice(k,0,s),k===0&&Xs(s)}};function D0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Jp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function fy(){}function X_(s,f,k,q,J){if(J){if(typeof q=="function"){var ie=q;q=function(){var st=Zp(pe);ie.call(st)}}var pe=ly(f,q,s,0,null,!1,!1,"",fy);return s._reactRootContainer=pe,s[Gi]=pe.current,Cs(s.nodeType===8?s.parentNode:s),pf(),pe}for(;J=s.lastChild;)s.removeChild(J);if(typeof q=="function"){var Te=q;q=function(){var st=Zp(Be);Te.call(st)}}var Be=I0(s,0,!1,null,null,!1,!1,"",fy);return s._reactRootContainer=Be,s[Gi]=Be.current,Cs(s.nodeType===8?s.parentNode:s),pf(function(){Kp(f,Be,k,q)}),Be}function e1(s,f,k,q,J){var ie=k._reactRootContainer;if(ie){var pe=ie;if(typeof J=="function"){var Te=J;J=function(){var Be=Zp(pe);Te.call(Be)}}Kp(f,pe,s,J)}else pe=X_(k,f,s,J,q);return Zp(pe)}Vs=function(s){switch(s.tag){case 3:var f=s.stateNode;if(f.current.memoizedState.isDehydrated){var k=ii(f.pendingLanes);k!==0&&(iu(f,k|1),fs(f,Mn()),(sn&6)===0&&(eh=Mn()+500,oe()))}break;case 13:pf(function(){var q=Dr(s,1);if(q!==null){var J=Ho();Il(q,s,1,J)}}),j0(s,1)}},Ws=function(s){if(s.tag===13){var f=Dr(s,134217728);if(f!==null){var k=Ho();Il(f,s,134217728,k)}j0(s,134217728)}},mc=function(s){if(s.tag===13){var f=Rc(s),k=Dr(s,f);if(k!==null){var q=Ho();Il(k,s,f,q)}j0(s,f)}},$o=function(){return Ir},Ss=function(s,f){var k=Ir;try{return Ir=s,f()}finally{Ir=k}},gt=function(s,f,k){switch(f){case"input":if(Xe(s,k),f=k.name,k.type==="radio"&&f!=null){for(k=s;k.parentNode;)k=k.parentNode;for(k=k.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),f=0;f<k.length;f++){var q=k[f];if(q!==s&&q.form===s.form){var J=wi(q);if(!J)throw Error(t(90));Se(q),Xe(q,J)}}}break;case"textarea":Re(s,k);break;case"select":f=k.value,f!=null&&Le(s,!!k.multiple,f,!1)}},Bt=k0,Ue=pf;var K_={usingClientEntryPoint:!1,Events:[vu,ui,wi,St,it,k0]},Yh={findFiberByHostInstance:Ls,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Z_={bundleType:Yh.bundleType,version:Yh.version,rendererPackageName:Yh.rendererPackageName,rendererConfig:Yh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Si(s),s===null?null:s.stateNode},findFiberByHostInstance:Yh.findFiberByHostInstance||Y_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var t1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t1.isDisabled&&t1.supportsFiber)try{so=t1.inject(Z_),pi=t1}catch{}}return hs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K_,hs.createPortal=function(s,f){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!D0(f))throw Error(t(200));return $_(s,f,null,k)},hs.createRoot=function(s,f){if(!D0(s))throw Error(t(299));var k=!1,q="",J=cy;return f!=null&&(f.unstable_strictMode===!0&&(k=!0),f.identifierPrefix!==void 0&&(q=f.identifierPrefix),f.onRecoverableError!==void 0&&(J=f.onRecoverableError)),f=I0(s,1,!1,null,null,k,!1,q,J),s[Gi]=f.current,Cs(s.nodeType===8?s.parentNode:s),new F0(f)},hs.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var f=s._reactInternals;if(f===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=Si(f),s=s===null?null:s.stateNode,s},hs.flushSync=function(s){return pf(s)},hs.hydrate=function(s,f,k){if(!Jp(f))throw Error(t(200));return e1(null,s,f,!0,k)},hs.hydrateRoot=function(s,f,k){if(!D0(s))throw Error(t(405));var q=k!=null&&k.hydratedSources||null,J=!1,ie="",pe=cy;if(k!=null&&(k.unstable_strictMode===!0&&(J=!0),k.identifierPrefix!==void 0&&(ie=k.identifierPrefix),k.onRecoverableError!==void 0&&(pe=k.onRecoverableError)),f=ly(f,null,s,1,k??null,J,!1,ie,pe),s[Gi]=f.current,Cs(s),q)for(s=0;s<q.length;s++)k=q[s],J=k._getVersion,J=J(k._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[k,J]:f.mutableSourceEagerHydrationData.push(k,J);return new Qp(f)},hs.render=function(s,f,k){if(!Jp(f))throw Error(t(200));return e1(null,s,f,!1,k)},hs.unmountComponentAtNode=function(s){if(!Jp(s))throw Error(t(40));return s._reactRootContainer?(pf(function(){e1(null,null,s,!1,function(){s._reactRootContainer=null,s[Gi]=null})}),!0):!1},hs.unstable_batchedUpdates=k0,hs.unstable_renderSubtreeIntoContainer=function(s,f,k,q){if(!Jp(k))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return e1(s,f,k,!1,q)},hs.version="18.3.1-next-f1338f8080-20240426",hs}var my;function cw(){if(my)return q0.exports;my=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),q0.exports=t7(),q0.exports}var yy;function r7(){if(yy)return r1;yy=1;var e=cw();return r1.createRoot=e.createRoot,r1.hydrateRoot=e.hydrateRoot,r1}var n7=r7();const fw=mp(n7);var Xh={};function Pr(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var i7={};function z1(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:i7}var hw=Object.assign,P1=Object.getOwnPropertyDescriptor,Nu=Object.defineProperty,yp=Object.prototype,f2=[];Object.freeze(f2);var B2={};Object.freeze(B2);var a7=typeof Proxy<"u",o7=Object.toString();function dw(){a7||Pr("Proxy not available")}function pw(e){var r=!1;return function(){if(!r)return r=!0,e.apply(this,arguments)}}var fh=function(){};function Bs(e){return typeof e=="function"}function Af(e){var r=typeof e;switch(r){case"string":case"symbol":case"number":return!0}return!1}function U1(e){return e!==null&&typeof e=="object"}function dc(e){if(!U1(e))return!1;var r=Object.getPrototypeOf(e);if(r==null)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t.toString()===o7}function gw(e){var r=e==null?void 0:e.constructor;return r?r.name==="GeneratorFunction"||r.displayName==="GeneratorFunction":!1}function bp(e,r,t){Nu(e,r,{enumerable:!1,writable:!0,configurable:!0,value:t})}function vw(e,r,t){Nu(e,r,{enumerable:!1,writable:!1,configurable:!0,value:t})}function Zc(e,r){var t="isMobX"+e;return r.prototype[t]=!0,function(n){return U1(n)&&n[t]===!0}}function Th(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function s7(e){var r=Object.getPrototypeOf(e),t=Object.getPrototypeOf(r),n=Object.getPrototypeOf(t);return n===null}function uc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var mw=typeof Object.getOwnPropertySymbols<"u";function l7(e){var r=Object.keys(e);if(!mw)return r;var t=Object.getOwnPropertySymbols(e);return t.length?[].concat(r,t.filter(function(n){return yp.propertyIsEnumerable.call(e,n)})):r}var _h=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:mw?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function yw(e){return e===null?null:typeof e=="object"?""+e:e}function cc(e,r){return yp.hasOwnProperty.call(e,r)}var u7=Object.getOwnPropertyDescriptors||function(r){var t={};return _h(r).forEach(function(n){t[n]=P1(r,n)}),t};function js(e,r){return!!(e&r)}function Fs(e,r,t){return t?e|=r:e&=~r,e}function by(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function c7(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h7(n.key),n)}}function Rh(e,r,t){return r&&c7(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function hh(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=d7(e))||r){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Wc.apply(null,arguments)}function bw(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,h2(e,r)}function h2(e,r){return h2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},h2(e,r)}function f7(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function h7(e){var r=f7(e,"string");return typeof r=="symbol"?r:r+""}function d7(e,r){if(e){if(typeof e=="string")return by(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?by(e,r):void 0}}var ku=Symbol("mobx-stored-annotations");function Wl(e){function r(t,n){if(_p(n))return e.decorate_20223_(t,n);wp(t,n,e)}return Object.assign(r,e)}function wp(e,r,t){cc(e,ku)||bp(e,ku,Wc({},e[ku])),S7(t)||(e[ku][r]=t)}function p7(e){return cc(e,ku)||bp(e,ku,Wc({},e[ku])),e[ku]}function _p(e){return typeof e=="object"&&typeof e.kind=="string"}var lr=Symbol("mobx administration"),Qc=function(){function e(t){t===void 0&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=pn.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var r=e.prototype;return r.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},r.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},r.reportObserved=function(){return Dw(this)},r.reportChanged=function(){ps(),Bw(this),gs()},r.toString=function(){return this.name_},Rh(e,[{key:"isBeingObserved",get:function(){return js(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return js(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Qc.isBeingObservedMask_=1;Qc.isPendingUnobservationMask_=2;Qc.diffValueMask_=4;var q2=Zc("Atom",Qc);function up(e,r,t){r===void 0&&(r=fh),t===void 0&&(t=fh);var n=new Qc(e);return r!==fh&&Yw(n,r),t!==fh&&W2(n,t),n}function g7(e,r){return e===r}function v7(e,r){return rm(e,r)}function m7(e,r){return rm(e,r,1)}function y7(e,r){return Object.is?Object.is(e,r):e===r?e!==0||1/e===1/r:e!==e&&r!==r}var Cf={identity:g7,structural:v7,default:y7,shallow:m7};function kf(e,r,t){return K1(e)?e:Array.isArray(e)?Rn.array(e,{name:t}):dc(e)?Rn.object(e,void 0,{name:t}):Th(e)?Rn.map(e,{name:t}):uc(e)?Rn.set(e,{name:t}):typeof e=="function"&&!Eh(e)&&!Ph(e)?gw(e)?Nf(e):Sh(t,e):e}function b7(e,r,t){if(e==null||Ra(e)||Go(e)||ao(e)||ba(e))return e;if(Array.isArray(e))return Rn.array(e,{name:t,deep:!1});if(dc(e))return Rn.object(e,void 0,{name:t,deep:!1});if(Th(e))return Rn.map(e,{name:t,deep:!1});if(uc(e))return Rn.set(e,{name:t,deep:!1})}function H1(e){return e}function w7(e,r){return rm(e,r)?r:e}var ww="override",_7=Wl({annotationType_:ww,make_:x7,extend_:E7,decorate_20223_:P7});function S7(e){return e.annotationType_===ww}function x7(e,r){return 0}function E7(e,r,t,n){Pr("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function P7(e,r){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Sp(e,r){return{annotationType_:e,options_:r,make_:O7,extend_:A7,decorate_20223_:C7}}function O7(e,r,t,n){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,r,t,!1)===null?0:1;if(n===e.target_)return this.extend_(e,r,t,!1)===null?0:2;if(Eh(t.value))return 1;var i=_w(e,this,r,t,!1);return Nu(n,r,i),2}function A7(e,r,t,n){var a=_w(e,this,r,t);return e.defineProperty_(r,a,n)}function C7(e,r){var t=r.kind,n=r.name,a=r.addInitializer,i=this,o=function(c){var h,p,w,d;return $c((h=(p=i.options_)==null?void 0:p.name)!=null?h:n.toString(),c,(w=(d=i.options_)==null?void 0:d.autoAction)!=null?w:!1)};if(t=="field")return function(u){var c,h=u;return Eh(h)||(h=o(h)),(c=i.options_)!=null&&c.bound&&(h=h.bind(this),h.isMobxAction=!0),h};if(t=="method"){var l;return Eh(e)||(e=o(e)),(l=this.options_)!=null&&l.bound&&a(function(){var u=this,c=u[n].bind(u);c.isMobxAction=!0,u[n]=c}),e}Pr("Cannot apply '"+i.annotationType_+"' to '"+String(n)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+i.annotationType_+"' can only be used on properties with a function value."))}function k7(e,r,t,n){r.annotationType_,n.value}function _w(e,r,t,n,a){var i,o,l,u,c,h,p;a===void 0&&(a=Rt.safeDescriptors),k7(e,r,t,n);var w=n.value;if((i=r.options_)!=null&&i.bound){var d;w=w.bind((d=e.proxy_)!=null?d:e.target_)}return{value:$c((o=(l=r.options_)==null?void 0:l.name)!=null?o:t.toString(),w,(u=(c=r.options_)==null?void 0:c.autoAction)!=null?u:!1,(h=r.options_)!=null&&h.bound?(p=e.proxy_)!=null?p:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Sw(e,r){return{annotationType_:e,options_:r,make_:L7,extend_:N7,decorate_20223_:T7}}function L7(e,r,t,n){var a;if(n===e.target_)return this.extend_(e,r,t,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!cc(e.target_,r)||!Ph(e.target_[r]))&&this.extend_(e,r,t,!1)===null)return 0;if(Ph(t.value))return 1;var i=xw(e,this,r,t,!1,!1);return Nu(n,r,i),2}function N7(e,r,t,n){var a,i=xw(e,this,r,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(r,i,n)}function T7(e,r){var t,n=r.name,a=r.addInitializer;return Ph(e)||(e=Nf(e)),(t=this.options_)!=null&&t.bound&&a(function(){var i=this,o=i[n].bind(i);o.isMobXFlow=!0,i[n]=o}),e}function R7(e,r,t,n){r.annotationType_,n.value}function xw(e,r,t,n,a,i){i===void 0&&(i=Rt.safeDescriptors),R7(e,r,t,n);var o=n.value;if(Ph(o)||(o=Nf(o)),a){var l;o=o.bind((l=e.proxy_)!=null?l:e.target_),o.isMobXFlow=!0}return{value:o,configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function z2(e,r){return{annotationType_:e,options_:r,make_:M7,extend_:I7,decorate_20223_:j7}}function M7(e,r,t){return this.extend_(e,r,t,!1)===null?0:1}function I7(e,r,t,n){return F7(e,this,r,t),e.defineComputedProperty_(r,Wc({},this.options_,{get:t.get,set:t.set}),n)}function j7(e,r){var t=this,n=r.name,a=r.addInitializer;return a(function(){var i=Mf(this)[lr],o=Wc({},t.options_,{get:e,context:this});o.name||(o.name="ObservableObject."+n.toString()),i.values_.set(n,new Xl(o))}),function(){return this[lr].getObservablePropValue_(n)}}function F7(e,r,t,n){r.annotationType_,n.get}function G1(e,r){return{annotationType_:e,options_:r,make_:D7,extend_:B7,decorate_20223_:q7}}function D7(e,r,t){return this.extend_(e,r,t,!1)===null?0:1}function B7(e,r,t,n){var a,i;return z7(e,this),e.defineObservableProperty_(r,t.value,(a=(i=this.options_)==null?void 0:i.enhancer)!=null?a:kf,n)}function q7(e,r){var t=this,n=r.kind,a=r.name,i=new WeakSet;function o(l,u){var c,h,p=Mf(l)[lr],w=new Gc(u,(c=(h=t.options_)==null?void 0:h.enhancer)!=null?c:kf,"ObservableObject."+a.toString(),!1);p.values_.set(a,w),i.add(l)}if(n=="accessor")return{get:function(){return i.has(this)||o(this,e.get.call(this)),this[lr].getObservablePropValue_(a)},set:function(u){return i.has(this)||o(this,u),this[lr].setObservablePropValue_(a,u)},init:function(u){return i.has(this)||o(this,u),u}}}function z7(e,r,t,n){r.annotationType_}var U7="true",H7=Ew();function Ew(e){return{annotationType_:U7,options_:e,make_:G7,extend_:V7,decorate_20223_:W7}}function G7(e,r,t,n){var a,i;if(t.get)return Tf.make_(e,r,t,n);if(t.set){var o=$c(r.toString(),t.set);return n===e.target_?e.defineProperty_(r,{configurable:Rt.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(Nu(n,r,{configurable:!0,set:o}),2)}if(n!==e.target_&&typeof t.value=="function"){var l;if(gw(t.value)){var u,c=(u=this.options_)!=null&&u.autoBind?Nf.bound:Nf;return c.make_(e,r,t,n)}var h=(l=this.options_)!=null&&l.autoBind?Sh.bound:Sh;return h.make_(e,r,t,n)}var p=((a=this.options_)==null?void 0:a.deep)===!1?Rn.ref:Rn;if(typeof t.value=="function"&&(i=this.options_)!=null&&i.autoBind){var w;t.value=t.value.bind((w=e.proxy_)!=null?w:e.target_)}return p.make_(e,r,t,n)}function V7(e,r,t,n){var a,i;if(t.get)return Tf.extend_(e,r,t,n);if(t.set)return e.defineProperty_(r,{configurable:Rt.safeDescriptors?e.isPlainObject_:!0,set:$c(r.toString(),t.set)},n);if(typeof t.value=="function"&&(a=this.options_)!=null&&a.autoBind){var o;t.value=t.value.bind((o=e.proxy_)!=null?o:e.target_)}var l=((i=this.options_)==null?void 0:i.deep)===!1?Rn.ref:Rn;return l.extend_(e,r,t,n)}function W7(e,r){Pr("'"+this.annotationType_+"' cannot be used as a decorator")}var $7="observable",Y7="observable.ref",X7="observable.shallow",K7="observable.struct",Pw={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Pw);function n1(e){return e||Pw}var d2=G1($7),Z7=G1(Y7,{enhancer:H1}),Q7=G1(X7,{enhancer:b7}),J7=G1(K7,{enhancer:w7}),Ow=Wl(d2);function i1(e){return e.deep===!0?kf:e.deep===!1?H1:t9(e.defaultDecorator)}function e9(e){var r;return e?(r=e.defaultDecorator)!=null?r:Ew(e):void 0}function t9(e){var r,t;return e&&(r=(t=e.options_)==null?void 0:t.enhancer)!=null?r:kf}function Aw(e,r,t){if(_p(r))return d2.decorate_20223_(e,r);if(Af(r)){wp(e,r,d2);return}return K1(e)?e:dc(e)?Rn.object(e,r,t):Array.isArray(e)?Rn.array(e,r):Th(e)?Rn.map(e,r):uc(e)?Rn.set(e,r):typeof e=="object"&&e!==null?e:Rn.box(e,r)}hw(Aw,Ow);var r9={box:function(r,t){var n=n1(t);return new Gc(r,i1(n),n.name,!0,n.equals)},array:function(r,t){var n=n1(t);return(Rt.useProxies===!1||n.proxy===!1?lS:Q9)(r,i1(n),n.name)},map:function(r,t){var n=n1(t);return new Q1(r,i1(n),n.name)},set:function(r,t){var n=n1(t);return new em(r,i1(n),n.name)},object:function(r,t,n){return Jc(function(){return $2(Rt.useProxies===!1||(n==null?void 0:n.proxy)===!1?Mf({},n):Y9({},n),r,t)})},ref:Wl(Z7),shallow:Wl(Q7),deep:Ow,struct:Wl(J7)},Rn=hw(Aw,r9),Cw="computed",n9="computed.struct",p2=z2(Cw),i9=z2(n9,{equals:Cf.structural}),Tf=function(r,t){if(_p(t))return p2.decorate_20223_(r,t);if(Af(t))return wp(r,t,p2);if(dc(r))return Wl(z2(Cw,r));var n=dc(t)?t:{};return n.get=r,n.name||(n.name=r.name||""),new Xl(n)};Object.assign(Tf,p2);Tf.struct=Wl(i9);var wy,_y,O1=0,a9=1,o9=(wy=(_y=P1(function(){},"name"))==null?void 0:_y.configurable)!=null?wy:!1,Sy={value:"action",configurable:!0,writable:!1,enumerable:!1};function $c(e,r,t,n){t===void 0&&(t=!1);function a(){return kw(e,t,r,n||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return r.toString()},o9&&(Sy.value=e,Nu(a,"name",Sy)),a}function kw(e,r,t,n,a){var i=Lw(e,r);try{return t.apply(n,a)}catch(o){throw i.error_=o,o}finally{Nw(i)}}function Lw(e,r,t,n){var a=!1,i=0,o=Rt.trackingDerivation,l=!r||!o;ps();var u=Rt.allowStateChanges;l&&(Rf(),u=V1(!0));var c=$1(!0),h={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:a,startTime_:i,actionId_:a9++,parentActionId_:O1};return O1=h.actionId_,h}function Nw(e){O1!==e.actionId_&&Pr(30),O1=e.parentActionId_,e.error_!==void 0&&(Rt.suppressReactionErrors=!0),W1(e.prevAllowStateChanges_),gh(e.prevAllowStateReads_),gs(),e.runAsAction_&&fc(e.prevDerivation_),Rt.suppressReactionErrors=!1}function U2(e,r){var t=V1(e);try{return r()}finally{W1(t)}}function V1(e){var r=Rt.allowStateChanges;return Rt.allowStateChanges=e,r}function W1(e){Rt.allowStateChanges=e}var Gc=function(e){function r(n,a,i,o,l){var u;return i===void 0&&(i="ObservableValue"),l===void 0&&(l=Cf.default),u=e.call(this,i)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=a,u.name_=i,u.equals=l,u.value_=a(n,void 0,i),u}bw(r,e);var t=r.prototype;return t.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},t.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==Rt.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(ul(this)){var i=cl(this,{object:this,type:Tu,newValue:a});if(!i)return Rt.UNCHANGED;a=i.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?Rt.UNCHANGED:a},t.setNewValue_=function(a){var i=this.value_;this.value_=a,this.reportChanged(),$l(this)&&Yl(this,{type:Tu,object:this,newValue:a,oldValue:i})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(a){return xp(this,a)},t.observe_=function(a,i){return i&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:Tu,newValue:this.value_,oldValue:void 0}),Ep(this,a)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return yw(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},r}(Qc),H2=Zc("ObservableValue",Gc),Xl=function(){function e(t){this.dependenciesState_=pn.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=pn.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new C1(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=A1.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||Pr(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=$c("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?Cf.structural:Cf.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var r=e.prototype;return r.onBecomeStale_=function(){v9(this)},r.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},r.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},r.get=function(){if(this.isComputing&&Pr(32,this.name_,this.derivation),Rt.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)g2(this)&&(this.warnAboutUntrackedRead_(),ps(),this.value_=this.computeValue_(!1),gs());else if(Dw(this),g2(this)){var n=Rt.trackingContext;this.keepAlive_&&!n&&(Rt.trackingContext=this),this.trackAndCompute()&&g9(this),Rt.trackingContext=n}var a=this.value_;if(g1(a))throw a.cause;return a},r.set=function(n){if(this.setter_){this.isRunningSetter&&Pr(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else Pr(34,this.name_)},r.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===pn.NOT_TRACKING_,i=this.computeValue_(!0),o=a||g1(n)||g1(i)||!this.equals_(n,i);return o&&(this.value_=i),o},r.computeValue_=function(n){this.isComputing=!0;var a=V1(!1),i;if(n)i=Tw(this,this.derivation,this.scope_);else if(Rt.disableErrorBoundaries===!0)i=this.derivation.call(this.scope_);else try{i=this.derivation.call(this.scope_)}catch(o){i=new C1(o)}return W1(a),this.isComputing=!1,i},r.suspend_=function(){this.keepAlive_||(v2(this),this.value_=void 0)},r.observe_=function(n,a){var i=this,o=!0,l=void 0;return V2(function(){var u=i.get();if(!o||a){var c=Rf();n({observableKind:"computed",debugObjectName:i.name_,type:Tu,object:i,newValue:u,oldValue:l}),fc(c)}o=!1,l=u})},r.warnAboutUntrackedRead_=function(){},r.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},r.valueOf=function(){return yw(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},Rh(e,[{key:"isComputing",get:function(){return js(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return js(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return js(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return js(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Xl.isComputingMask_=1;Xl.isRunningSetterMask_=2;Xl.isBeingObservedMask_=4;Xl.isPendingUnobservationMask_=8;Xl.diffValueMask_=16;var Lf=Zc("ComputedValue",Xl),pn;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(pn||(pn={}));var A1;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(A1||(A1={}));var C1=function(r){this.cause=void 0,this.cause=r};function g1(e){return e instanceof C1}function g2(e){switch(e.dependenciesState_){case pn.UP_TO_DATE_:return!1;case pn.NOT_TRACKING_:case pn.STALE_:return!0;case pn.POSSIBLY_STALE_:{for(var r=$1(!0),t=Rf(),n=e.observing_,a=n.length,i=0;i<a;i++){var o=n[i];if(Lf(o)){if(Rt.disableErrorBoundaries)o.get();else try{o.get()}catch{return fc(t),gh(r),!0}if(e.dependenciesState_===pn.STALE_)return fc(t),gh(r),!0}}return Rw(e),fc(t),gh(r),!1}}}function s9(){return Rt.trackingDerivation!==null}function Tw(e,r,t){var n=$1(!0);Rw(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Rt.runId;var a=Rt.trackingDerivation;Rt.trackingDerivation=e,Rt.inBatch++;var i;if(Rt.disableErrorBoundaries===!0)i=r.call(t);else try{i=r.call(t)}catch(o){i=new C1(o)}return Rt.inBatch--,Rt.trackingDerivation=a,l9(e),gh(n),i}function l9(e){for(var r=e.observing_,t=e.observing_=e.newObserving_,n=pn.UP_TO_DATE_,a=0,i=e.unboundDepsCount_,o=0;o<i;o++){var l=t[o];l.diffValue===0&&(l.diffValue=1,a!==o&&(t[a]=l),a++),l.dependenciesState_>n&&(n=l.dependenciesState_)}for(t.length=a,e.newObserving_=null,i=r.length;i--;){var u=r[i];u.diffValue===0&&jw(u,e),u.diffValue=0}for(;a--;){var c=t[a];c.diffValue===1&&(c.diffValue=0,p9(c,e))}n!==pn.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function v2(e){var r=e.observing_;e.observing_=[];for(var t=r.length;t--;)jw(r[t],e);e.dependenciesState_=pn.NOT_TRACKING_}function G2(e){var r=Rf();try{return e()}finally{fc(r)}}function Rf(){var e=Rt.trackingDerivation;return Rt.trackingDerivation=null,e}function fc(e){Rt.trackingDerivation=e}function $1(e){var r=Rt.allowStateReads;return Rt.allowStateReads=e,r}function gh(e){Rt.allowStateReads=e}function Rw(e){if(e.dependenciesState_!==pn.UP_TO_DATE_){e.dependenciesState_=pn.UP_TO_DATE_;for(var r=e.observing_,t=r.length;t--;)r[t].lowestObserverState_=pn.UP_TO_DATE_}}var u9=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],ip=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},v1=!0,Mw=!1,Rt=function(){var e=z1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(v1=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ip().version&&(v1=!1),v1?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ip):(setTimeout(function(){Mw||Pr(35)},1),new ip)}();function c9(){if((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&Pr(36),Mw=!0,v1){var e=z1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),Rt=new ip}}function Iw(){return Rt}function f9(){var e=new ip;for(var r in e)u9.indexOf(r)===-1&&(Rt[r]=e[r]);Rt.allowStateChanges=!Rt.enforceActions}function h9(e){return e.observers_&&e.observers_.size>0}function d9(e){return e.observers_}function p9(e,r){e.observers_.add(r),e.lowestObserverState_>r.dependenciesState_&&(e.lowestObserverState_=r.dependenciesState_)}function jw(e,r){e.observers_.delete(r),e.observers_.size===0&&Fw(e)}function Fw(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,Rt.pendingUnobservations.push(e))}function ps(){Rt.inBatch++}function gs(){if(--Rt.inBatch===0){qw();for(var e=Rt.pendingUnobservations,r=0;r<e.length;r++){var t=e[r];t.isPendingUnobservation=!1,t.observers_.size===0&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof Xl&&t.suspend_())}Rt.pendingUnobservations=[]}}function Dw(e){var r=Rt.trackingDerivation;return r!==null?(r.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=r.runId_,r.newObserving_[r.unboundDepsCount_++]=e,!e.isBeingObserved&&Rt.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&Rt.inBatch>0&&Fw(e),!1)}function Bw(e){e.lowestObserverState_!==pn.STALE_&&(e.lowestObserverState_=pn.STALE_,e.observers_.forEach(function(r){r.dependenciesState_===pn.UP_TO_DATE_&&r.onBecomeStale_(),r.dependenciesState_=pn.STALE_}))}function g9(e){e.lowestObserverState_!==pn.STALE_&&(e.lowestObserverState_=pn.STALE_,e.observers_.forEach(function(r){r.dependenciesState_===pn.POSSIBLY_STALE_?r.dependenciesState_=pn.STALE_:r.dependenciesState_===pn.UP_TO_DATE_&&(e.lowestObserverState_=pn.UP_TO_DATE_)}))}function v9(e){e.lowestObserverState_===pn.UP_TO_DATE_&&(e.lowestObserverState_=pn.POSSIBLY_STALE_,e.observers_.forEach(function(r){r.dependenciesState_===pn.UP_TO_DATE_&&(r.dependenciesState_=pn.POSSIBLY_STALE_,r.onBecomeStale_())}))}var Kl=function(){function e(t,n,a,i){t===void 0&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=pn.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=A1.NONE,this.name_=t,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var r=e.prototype;return r.onBecomeStale_=function(){this.schedule_()},r.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Rt.pendingReactions.push(this),qw())},r.runReaction_=function(){if(!this.isDisposed){ps(),this.isScheduled=!1;var n=Rt.trackingContext;if(Rt.trackingContext=this,g2(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}Rt.trackingContext=n,gs()}},r.track=function(n){if(!this.isDisposed){ps(),this.isRunning=!0;var a=Rt.trackingContext;Rt.trackingContext=this;var i=Tw(this,n,void 0);Rt.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&v2(this),g1(i)&&this.reportExceptionInDerivation_(i.cause),gs()}},r.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(Rt.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";Rt.suppressReactionErrors||console.error(i,n),Rt.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},r.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ps(),v2(this),gs()))},r.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[lr]=this,i},r.toString=function(){return"Reaction["+this.name_+"]"},r.trace=function(n){},Rh(e,[{key:"isDisposed",get:function(){return js(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return js(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return js(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return js(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Kl.isDisposedMask_=1;Kl.isScheduledMask_=2;Kl.isTrackPendingMask_=4;Kl.isRunningMask_=8;Kl.diffValueMask_=16;function m9(e){return Rt.globalReactionErrorHandlers.push(e),function(){var r=Rt.globalReactionErrorHandlers.indexOf(e);r>=0&&Rt.globalReactionErrorHandlers.splice(r,1)}}var y9=100,m2=function(r){return r()};function qw(){Rt.inBatch>0||Rt.isRunningReactions||m2(b9)}function b9(){Rt.isRunningReactions=!0;for(var e=Rt.pendingReactions,r=0;e.length>0;){++r===y9&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var t=e.splice(0),n=0,a=t.length;n<a;n++)t[n].runReaction_()}Rt.isRunningReactions=!1}var k1=Zc("Reaction",Kl);function w9(e){var r=m2;m2=function(n){return e(function(){return r(n)})}}function ap(){return!1}function zw(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Uw="action",_9="action.bound",Hw="autoAction",S9="autoAction.bound",Gw="<unnamed action>",y2=Sp(Uw),x9=Sp(_9,{bound:!0}),b2=Sp(Hw,{autoAction:!0}),E9=Sp(S9,{autoAction:!0,bound:!0});function Vw(e){var r=function(n,a){if(Bs(n))return $c(n.name||Gw,n,e);if(Bs(a))return $c(n,a,e);if(_p(a))return(e?b2:y2).decorate_20223_(n,a);if(Af(a))return wp(n,a,e?b2:y2);if(Af(n))return Wl(Sp(e?Hw:Uw,{name:n,autoAction:e}))};return r}var ca=Vw(!1);Object.assign(ca,y2);var Sh=Vw(!0);Object.assign(Sh,b2);ca.bound=Wl(x9);Sh.bound=Wl(E9);function xh(e){return kw(e.name||Gw,!1,e,this,void 0)}function Eh(e){return Bs(e)&&e.isMobxAction===!0}function V2(e,r){var t,n,a,i;r===void 0&&(r=B2);var o=(t=(n=r)==null?void 0:n.name)!=null?t:"Autorun",l=!r.scheduler&&!r.delay,u;if(l)u=new Kl(o,function(){this.track(p)},r.onError,r.requiresObservable);else{var c=Ww(r),h=!1;u=new Kl(o,function(){h||(h=!0,c(function(){h=!1,u.isDisposed||u.track(p)}))},r.onError,r.requiresObservable)}function p(){e(u)}return(a=r)!=null&&(a=a.signal)!=null&&a.aborted||u.schedule_(),u.getDisposer_((i=r)==null?void 0:i.signal)}var P9=function(r){return r()};function Ww(e){return e.scheduler?e.scheduler:e.delay?function(r){return setTimeout(r,e.delay)}:P9}function $w(e,r,t){var n,a,i;t===void 0&&(t=B2);var o=(n=t.name)!=null?n:"Reaction",l=ca(o,t.onError?O9(t.onError,r):r),u=!t.scheduler&&!t.delay,c=Ww(t),h=!0,p=!1,w,d=t.compareStructural?Cf.structural:t.equals||Cf.default,_=new Kl(o,function(){h||u?E():p||(p=!0,c(E))},t.onError,t.requiresObservable);function E(){if(p=!1,!_.isDisposed){var S=!1,m=w;_.track(function(){var g=U2(!1,function(){return e(_)});S=h||!d(w,g),w=g}),(h&&t.fireImmediately||!h&&S)&&l(w,m,_),h=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||_.schedule_(),_.getDisposer_((i=t)==null?void 0:i.signal)}function O9(e,r){return function(){try{return r.apply(this,arguments)}catch(t){e.call(this,t)}}}var A9="onBO",C9="onBUO";function Yw(e,r,t){return Xw(A9,e,r,t)}function W2(e,r,t){return Xw(C9,e,r,t)}function Xw(e,r,t,n){var a=typeof n=="function"?Mu(r,t):Mu(r),i=Bs(n)?n:t,o=e+"L";return a[o]?a[o].add(i):a[o]=new Set([i]),function(){var l=a[o];l&&(l.delete(i),l.size===0&&delete a[o])}}var k9="never",a1="always",L9="observed";function Kw(e){e.isolateGlobalState===!0&&c9();var r=e.useProxies,t=e.enforceActions;if(r!==void 0&&(Rt.useProxies=r===a1?!0:r===k9?!1:typeof Proxy<"u"),r==="ifavailable"&&(Rt.verifyProxies=!0),t!==void 0){var n=t===a1?a1:t===L9;Rt.enforceActions=n,Rt.allowStateChanges=!(n===!0||n===a1)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(Rt[a]=!!e[a])}),Rt.allowStateReads=!Rt.observableRequiresReaction,e.reactionScheduler&&w9(e.reactionScheduler)}function $2(e,r,t,n){var a=u7(r);return Jc(function(){var i=Mf(e,n)[lr];_h(a).forEach(function(o){i.extend_(o,a[o],t&&o in t?t[o]:!0)})}),e}function Zw(e,r){return Qw(Mu(e,r))}function Qw(e){var r={name:e.name_};return e.observing_&&e.observing_.length>0&&(r.dependencies=T9(e.observing_).map(Qw)),r}function N9(e,r){return Jw(Mu(e,r))}function Jw(e){var r={name:e.name_};return h9(e)&&(r.observers=Array.from(d9(e)).map(Jw)),r}function T9(e){return Array.from(new Set(e))}var R9=0;function Y1(){this.message="FLOW_CANCELLED"}Y1.prototype=Object.create(Error.prototype);function M9(e){return e instanceof Y1}var H0=Sw("flow"),I9=Sw("flow.bound",{bound:!0}),Nf=Object.assign(function(r,t){if(_p(t))return H0.decorate_20223_(r,t);if(Af(t))return wp(r,t,H0);var n=r,a=n.name||"<unnamed flow>",i=function(){var l=this,u=arguments,c=++R9,h=ca(a+" - runid: "+c+" - init",n).apply(l,u),p,w=void 0,d=new Promise(function(_,E){var S=0;p=E;function m(b){w=void 0;var O;try{O=ca(a+" - runid: "+c+" - yield "+S++,h.next).call(h,b)}catch(I){return E(I)}v(O)}function g(b){w=void 0;var O;try{O=ca(a+" - runid: "+c+" - yield "+S++,h.throw).call(h,b)}catch(I){return E(I)}v(O)}function v(b){if(Bs(b==null?void 0:b.then)){b.then(v,E);return}return b.done?_(b.value):(w=Promise.resolve(b.value),w.then(m,g))}m(void 0)});return d.cancel=ca(a+" - runid: "+c+" - cancel",function(){try{w&&xy(w);var _=h.return(void 0),E=Promise.resolve(_.value);E.then(fh,fh),xy(E),p(new Y1)}catch(S){p(S)}}),d};return i.isMobXFlow=!0,i},H0);Nf.bound=Wl(I9);function xy(e){Bs(e.cancel)&&e.cancel()}function j9(e){return e}function Ph(e){return(e==null?void 0:e.isMobXFlow)===!0}function Y2(e,r,t){var n;return ao(e)||Go(e)||H2(e)?n=Zl(e):Ra(e)&&(n=Zl(e,r)),n.dehancer=typeof r=="function"?r:t,function(){n.dehancer=void 0}}function X1(e,r,t){return Bs(t)?D9(e,r,t):F9(e,r)}function F9(e,r){return Zl(e).intercept_(r)}function D9(e,r,t){return Zl(e,r).intercept_(t)}function e6(e,r){if(r===void 0)return Lf(e);if(Ra(e)===!1||!e[lr].values_.has(r))return!1;var t=Mu(e,r);return Lf(t)}function B9(e){return e6(e)}function t6(e,r){return e6(e,r)}function r6(e,r){return e?r!==void 0?Ra(e)?e[lr].values_.has(r):!1:Ra(e)||!!e[lr]||q2(e)||k1(e)||Lf(e):!1}function K1(e){return r6(e)}function n6(e,r){return r6(e,r)}function cp(e){if(Ra(e))return e[lr].keys_();if(ao(e)||ba(e))return Array.from(e.keys());if(Go(e))return e.map(function(r,t){return t});Pr(5)}function X2(e){if(Ra(e))return cp(e).map(function(r){return e[r]});if(ao(e))return cp(e).map(function(r){return e.get(r)});if(ba(e))return Array.from(e.values());if(Go(e))return e.slice();Pr(6)}function i6(e){if(Ra(e))return cp(e).map(function(r){return[r,e[r]]});if(ao(e))return cp(e).map(function(r){return[r,e.get(r)]});if(ba(e))return Array.from(e.entries());if(Go(e))return e.map(function(r,t){return[t,r]});Pr(7)}function K2(e,r,t){if(arguments.length===2&&!ba(e)){ps();var n=r;try{for(var a in n)K2(e,a,n[a])}finally{gs()}return}Ra(e)?e[lr].set_(r,t):ao(e)?e.set(r,t):ba(e)?e.add(r):Go(e)?(typeof r!="number"&&(r=parseInt(r,10)),r<0&&Pr("Invalid index: '"+r+"'"),ps(),r>=e.length&&(e.length=r+1),e[r]=t,gs()):Pr(8)}function q9(e,r){Ra(e)?e[lr].delete_(r):ao(e)||ba(e)?e.delete(r):Go(e)?(typeof r!="number"&&(r=parseInt(r,10)),e.splice(r,1)):Pr(9)}function a6(e,r){if(Ra(e))return e[lr].has_(r);if(ao(e))return e.has(r);if(ba(e))return e.has(r);if(Go(e))return r>=0&&r<e.length;Pr(10)}function z9(e,r){if(a6(e,r)){if(Ra(e))return e[lr].get_(r);if(ao(e))return e.get(r);if(Go(e))return e[r];Pr(11)}}function Z2(e,r,t){if(Ra(e))return e[lr].defineProperty_(r,t);Pr(39)}function o6(e){if(Ra(e))return e[lr].ownKeys_();Pr(38)}function Z1(e,r,t,n){return Bs(t)?H9(e,r,t,n):U9(e,r,t)}function U9(e,r,t){return Zl(e).observe_(r,t)}function H9(e,r,t,n){return Zl(e,r).observe_(t,n)}function o1(e,r,t){return e.set(r,t),t}function sh(e,r){if(e==null||typeof e!="object"||e instanceof Date||!K1(e))return e;if(H2(e)||Lf(e))return sh(e.get(),r);if(r.has(e))return r.get(e);if(Go(e)){var t=o1(r,e,new Array(e.length));return e.forEach(function(o,l){t[l]=sh(o,r)}),t}if(ba(e)){var n=o1(r,e,new Set);return e.forEach(function(o){n.add(sh(o,r))}),n}if(ao(e)){var a=o1(r,e,new Map);return e.forEach(function(o,l){a.set(l,sh(o,r))}),a}else{var i=o1(r,e,{});return o6(e).forEach(function(o){yp.propertyIsEnumerable.call(e,o)&&(i[o]=sh(e[o],r))}),i}}function G9(e,r){return sh(e,new Map)}function V9(){}function Cu(e,r){r===void 0&&(r=void 0),ps();try{return e.apply(r)}finally{gs()}}function w2(e,r,t){return arguments.length===1||r&&typeof r=="object"?W9(e,r):s6(e,r,t||{})}function s6(e,r,t){var n;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!o[lr].isDisposed)if(o(),t.onError)t.onError(a);else throw a},t.timeout)}t.name="When";var i=$c("When-effect",r),o=V2(function(l){var u=U2(!1,e);u&&(l.dispose(),n&&clearTimeout(n),i())},t);return o}function W9(e,r){var t;if(r!=null&&(t=r.signal)!=null&&t.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,a,i=new Promise(function(o,l){var u,c=s6(e,o,Wc({},r,{onError:l}));n=function(){c(),l(new Error("WHEN_CANCELLED"))},a=function(){c(),l(new Error("WHEN_ABORTED"))},r==null||(u=r.signal)==null||u.addEventListener==null||u.addEventListener("abort",a)}).finally(function(){var o;return r==null||(o=r.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",a)});return i.cancel=n,i}function rh(e){return e[lr]}var $9={has:function(r,t){return rh(r).has_(t)},get:function(r,t){return rh(r).get_(t)},set:function(r,t,n){var a;return Af(t)?(a=rh(r).set_(t,n,!0))!=null?a:!0:!1},deleteProperty:function(r,t){var n;return Af(t)?(n=rh(r).delete_(t,!0))!=null?n:!0:!1},defineProperty:function(r,t,n){var a;return(a=rh(r).defineProperty_(t,n))!=null?a:!0},ownKeys:function(r){return rh(r).ownKeys_()},preventExtensions:function(r){Pr(13)}};function Y9(e,r){var t,n;return dw(),e=Mf(e,r),(n=(t=e[lr]).proxy_)!=null?n:t.proxy_=new Proxy(e,$9)}function ul(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function xp(e,r){var t=e.interceptors_||(e.interceptors_=[]);return t.push(r),pw(function(){var n=t.indexOf(r);n!==-1&&t.splice(n,1)})}function cl(e,r){var t=Rf();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a<i&&(r=n[a](r),r&&!r.type&&Pr(14),!!r);a++);return r}finally{fc(t)}}function $l(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Ep(e,r){var t=e.changeListeners_||(e.changeListeners_=[]);return t.push(r),pw(function(){var n=t.indexOf(r);n!==-1&&t.splice(n,1)})}function Yl(e,r){var t=Rf(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a<i;a++)n[a](r);fc(t)}}function Q2(e,r,t){return Jc(function(){var n,a=Mf(e,t)[lr];(n=r)!=null||(r=p7(e)),_h(r).forEach(function(i){return a.make_(i,r[i])})}),e}var G0=Symbol("mobx-keys");function X9(e,r,t){return dc(e)?$2(e,e,r,t):(Jc(function(){var n=Mf(e,t)[lr];if(!e[G0]){var a=Object.getPrototypeOf(e),i=new Set([].concat(_h(e),_h(a)));i.delete("constructor"),i.delete(lr),bp(a,G0,i)}e[G0].forEach(function(o){return n.make_(o,r&&o in r?r[o]:!0)})}),e)}var Ey="splice",Tu="update",K9=1e4,Z9={get:function(r,t){var n=r[lr];return t===lr?n:t==="length"?n.getArrayLength_():typeof t=="string"&&!isNaN(t)?n.get_(parseInt(t)):cc(L1,t)?L1[t]:r[t]},set:function(r,t,n){var a=r[lr];return t==="length"&&a.setArrayLength_(n),typeof t=="symbol"||isNaN(t)?r[t]=n:a.set_(parseInt(t),n),!0},preventExtensions:function(){Pr(15)}},J2=function(){function e(t,n,a,i){t===void 0&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=a,this.legacyMode_=i,this.atom_=new Qc(t),this.enhancer_=function(o,l){return n(o,l,"ObservableArray[..]")}}var r=e.prototype;return r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},r.intercept_=function(n){return xp(this,n)},r.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Ep(this,n)},r.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},r.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Pr("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o<n-a;o++)i[o]=void 0;this.spliceWithArray_(a,0,i)}else this.spliceWithArray_(n,a-n)},r.updateArrayLength_=function(n,a){n!==this.lastKnownLength_&&Pr(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&h6(n+a+1)},r.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var l=this.values_.length;if(n===void 0?n=0:n>l?n=l:n<0&&(n=Math.max(0,l+n)),arguments.length===1?a=l-n:a==null?a=0:a=Math.max(0,Math.min(a,l-n)),i===void 0&&(i=f2),ul(this)){var u=cl(this,{object:this.proxy_,type:Ey,index:n,removedCount:a,added:i});if(!u)return f2;a=u.removedCount,i=u.added}if(i=i.length===0?i:i.map(function(p){return o.enhancer_(p,void 0)}),this.legacyMode_){var c=i.length-a;this.updateArrayLength_(l,c)}var h=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,h),this.dehanceValues_(h)},r.spliceItemsIntoValues_=function(n,a,i){if(i.length<K9){var o;return(o=this.values_).splice.apply(o,[n,a].concat(i))}else{var l=this.values_.slice(n,n+a),u=this.values_.slice(n+a);this.values_.length+=i.length-a;for(var c=0;c<i.length;c++)this.values_[n+c]=i[c];for(var h=0;h<u.length;h++)this.values_[n+i.length+h]=u[h];return l}},r.notifyArrayChildUpdate_=function(n,a,i){var o=!this.owned_&&ap(),l=$l(this),u=l||o?{observableKind:"array",object:this.proxy_,type:Tu,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:i}:null;this.atom_.reportChanged(),l&&Yl(this,u)},r.notifyArraySplice_=function(n,a,i){var o=!this.owned_&&ap(),l=$l(this),u=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Ey,index:n,removed:i,added:a,removedCount:i.length,addedCount:a.length}:null;this.atom_.reportChanged(),l&&Yl(this,u)},r.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},r.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&Pr(17,n,i.length),n<i.length){this.atom_;var o=i[n];if(ul(this)){var l=cl(this,{type:Tu,object:this.proxy_,index:n,newValue:a});if(!l)return;a=l.newValue}a=this.enhancer_(a,o);var u=a!==o;u&&(i[n]=a,this.notifyArrayChildUpdate_(n,a,o))}else{for(var c=new Array(n+1-i.length),h=0;h<c.length-1;h++)c[h]=void 0;c[c.length-1]=a,this.spliceWithArray_(i.length,0,c)}},e}();function Q9(e,r,t,n){return t===void 0&&(t="ObservableArray"),n===void 0&&(n=!1),dw(),Jc(function(){var a=new J2(t,r,n,!1);vw(a.values_,lr,a);var i=new Proxy(a.values_,Z9);return a.proxy_=i,e&&e.length&&a.spliceWithArray_(0,0,e),i})}var L1={clear:function(){return this.splice(0)},replace:function(r){var t=this[lr];return t.spliceWithArray_(0,t.values_.length,r)},toJSON:function(){return this.slice()},splice:function(r,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];var o=this[lr];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(r);case 2:return o.spliceWithArray_(r,t)}return o.spliceWithArray_(r,t,a)},spliceWithArray:function(r,t,n){return this[lr].spliceWithArray_(r,t,n)},push:function(){for(var r=this[lr],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r.spliceWithArray_(r.values_.length,0,n),r.values_.length},pop:function(){return this.splice(Math.max(this[lr].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var r=this[lr],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r.spliceWithArray_(0,0,n),r.values_.length},reverse:function(){return Rt.trackingDerivation&&Pr(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Rt.trackingDerivation&&Pr(37,"sort");var r=this.slice();return r.sort.apply(r,arguments),this.replace(r),this},remove:function(r){var t=this[lr],n=t.dehanceValues_(t.values_).indexOf(r);return n>-1?(this.splice(n,1),!0):!1}};Kn("at",qs);Kn("concat",qs);Kn("flat",qs);Kn("includes",qs);Kn("indexOf",qs);Kn("join",qs);Kn("lastIndexOf",qs);Kn("slice",qs);Kn("toString",qs);Kn("toLocaleString",qs);Kn("toSorted",qs);Kn("toSpliced",qs);Kn("with",qs);Kn("every",Ql);Kn("filter",Ql);Kn("find",Ql);Kn("findIndex",Ql);Kn("findLast",Ql);Kn("findLastIndex",Ql);Kn("flatMap",Ql);Kn("forEach",Ql);Kn("map",Ql);Kn("some",Ql);Kn("toReversed",Ql);Kn("reduce",l6);Kn("reduceRight",l6);function Kn(e,r){typeof Array.prototype[e]=="function"&&(L1[e]=r(e))}function qs(e){return function(){var r=this[lr];r.atom_.reportObserved();var t=r.dehanceValues_(r.values_);return t[e].apply(t,arguments)}}function Ql(e){return function(r,t){var n=this,a=this[lr];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,l){return r.call(t,o,l,n)})}}function l6(e){return function(){var r=this,t=this[lr];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=function(i,o,l){return a(i,o,l,r)},n[e].apply(n,arguments)}}var J9=Zc("ObservableArrayAdministration",J2);function Go(e){return U1(e)&&J9(e[lr])}var eS={},Uc="add",N1="delete",Q1=function(){function e(t,n,a){var i=this;n===void 0&&(n=kf),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[lr]=eS,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Bs(Map)||Pr(18),Jc(function(){i.keysAtom_=up("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,t&&i.merge(t)})}var r=e.prototype;return r.has_=function(n){return this.data_.has(n)},r.has=function(n){var a=this;if(!Rt.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new Gc(this.has_(n),H1,"ObservableMap.key?",!1);this.hasMap_.set(n,o),W2(o,function(){return a.hasMap_.delete(n)})}return i.get()},r.set=function(n,a){var i=this.has_(n);if(ul(this)){var o=cl(this,{type:i?Tu:Uc,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},r.delete=function(n){var a=this;if(this.keysAtom_,ul(this)){var i=cl(this,{type:N1,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=ap(),l=$l(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:N1,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return Cu(function(){var c;a.keysAtom_.reportChanged(),(c=a.hasMap_.get(n))==null||c.setNewValue_(!1);var h=a.data_.get(n);h.setNewValue_(void 0),a.data_.delete(n)}),l&&Yl(this,u),!0}return!1},r.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==Rt.UNCHANGED){var o=ap(),l=$l(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:Tu,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),l&&Yl(this,u)}},r.addValue_=function(n,a){var i=this;this.keysAtom_,Cu(function(){var c,h=new Gc(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,h),a=h.value_,(c=i.hasMap_.get(n))==null||c.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=ap(),l=$l(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:Uc,object:this,name:n,newValue:a}:null;l&&Yl(this,u)},r.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},r.values=function(){var n=this,a=this.keys();return Py({next:function(){var o=a.next(),l=o.done,u=o.value;return{done:l,value:l?void 0:n.get(u)}}})},r.entries=function(){var n=this,a=this.keys();return Py({next:function(){var o=a.next(),l=o.done,u=o.value;return{done:l,value:l?void 0:[u,n.get(u)]}}})},r[Symbol.iterator]=function(){return this.entries()},r.forEach=function(n,a){for(var i=hh(this),o;!(o=i()).done;){var l=o.value,u=l[0],c=l[1];n.call(a,c,u,this)}},r.merge=function(n){var a=this;return ao(n)&&(n=new Map(n)),Cu(function(){dc(n)?l7(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],l=i[1];return a.set(o,l)}):Th(n)?(s7(n)||Pr(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&Pr(20,n)}),this},r.clear=function(){var n=this;Cu(function(){G2(function(){for(var a=hh(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},r.replace=function(n){var a=this;return Cu(function(){for(var i=tS(n),o=new Map,l=!1,u=hh(a.data_.keys()),c;!(c=u()).done;){var h=c.value;if(!i.has(h)){var p=a.delete(h);if(p)l=!0;else{var w=a.data_.get(h);o.set(h,w)}}}for(var d=hh(i.entries()),_;!(_=d()).done;){var E=_.value,S=E[0],m=E[1],g=a.data_.has(S);if(a.set(S,m),a.data_.has(S)){var v=a.data_.get(S);o.set(S,v),g||(l=!0)}}if(!l)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var b=a.data_.keys(),O=o.keys(),I=b.next(),T=O.next();!I.done;){if(I.value!==T.value){a.keysAtom_.reportChanged();break}I=b.next(),T=O.next()}a.data_=o}),this},r.toString=function(){return"[object ObservableMap]"},r.toJSON=function(){return Array.from(this)},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},Rh(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),ao=Zc("ObservableMap",Q1);function Py(e){return e[Symbol.toStringTag]="MapIterator",nm(e)}function tS(e){if(Th(e)||ao(e))return e;if(Array.isArray(e))return new Map(e);if(dc(e)){var r=new Map;for(var t in e)r.set(t,e[t]);return r}else return Pr(21,e)}var rS={},em=function(){function e(t,n,a){var i=this;n===void 0&&(n=kf),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[lr]=rS,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Bs(Set)||Pr(22),this.enhancer_=function(o,l){return n(o,l,a)},Jc(function(){i.atom_=up(i.name_),t&&i.replace(t)})}var r=e.prototype;return r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.clear=function(){var n=this;Cu(function(){G2(function(){for(var a=hh(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},r.forEach=function(n,a){for(var i=hh(this),o;!(o=i()).done;){var l=o.value;n.call(a,l,l,this)}},r.add=function(n){var a=this;if(this.atom_,ul(this)){var i=cl(this,{type:Uc,object:this,newValue:n});if(!i)return this;n=i.newValue}if(!this.has(n)){Cu(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,l=$l(this),u=l||o?{observableKind:"set",debugObjectName:this.name_,type:Uc,object:this,newValue:n}:null;l&&Yl(this,u)}return this},r.delete=function(n){var a=this;if(ul(this)){var i=cl(this,{type:N1,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,l=$l(this),u=l||o?{observableKind:"set",debugObjectName:this.name_,type:N1,object:this,oldValue:n}:null;return Cu(function(){a.atom_.reportChanged(),a.data_.delete(n)}),l&&Yl(this,u),!0}return!1},r.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},r.entries=function(){var n=this.values();return Oy({next:function(){var i=n.next(),o=i.value,l=i.done;return l?{value:void 0,done:l}:{value:[o,o],done:l}}})},r.keys=function(){return this.values()},r.values=function(){this.atom_.reportObserved();var n=this,a=this.data_.values();return Oy({next:function(){var o=a.next(),l=o.value,u=o.done;return u?{value:void 0,done:u}:{value:n.dehanceValue_(l),done:u}}})},r.intersection=function(n){if(uc(n)&&!ba(n))return n.intersection(this);var a=new Set(this);return a.intersection(n)},r.union=function(n){if(uc(n)&&!ba(n))return n.union(this);var a=new Set(this);return a.union(n)},r.difference=function(n){return new Set(this).difference(n)},r.symmetricDifference=function(n){if(uc(n)&&!ba(n))return n.symmetricDifference(this);var a=new Set(this);return a.symmetricDifference(n)},r.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},r.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},r.isDisjointFrom=function(n){if(uc(n)&&!ba(n))return n.isDisjointFrom(this);var a=new Set(this);return a.isDisjointFrom(n)},r.replace=function(n){var a=this;return ba(n)&&(n=new Set(n)),Cu(function(){Array.isArray(n)?(a.clear(),n.forEach(function(i){return a.add(i)})):uc(n)?(a.clear(),n.forEach(function(i){return a.add(i)})):n!=null&&Pr("Cannot initialize set from "+n)}),this},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},r.toJSON=function(){return Array.from(this)},r.toString=function(){return"[object ObservableSet]"},r[Symbol.iterator]=function(){return this.values()},Rh(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),ba=Zc("ObservableSet",em);function Oy(e){return e[Symbol.toStringTag]="SetIterator",nm(e)}var Ay=Object.create(null),Cy="remove",u6=function(){function e(t,n,a,i){n===void 0&&(n=new Map),i===void 0&&(i=H7),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=n,this.name_=a,this.defaultAnnotation_=i,this.keysAtom_=new Qc("ObservableObject.keys"),this.isPlainObject_=dc(this.target_)}var r=e.prototype;return r.getObservablePropValue_=function(n){return this.values_.get(n).get()},r.setObservablePropValue_=function(n,a){var i=this.values_.get(n);if(i instanceof Xl)return i.set(a),!0;if(ul(this)){var o=cl(this,{type:Tu,object:this.proxy_||this.target_,name:n,newValue:a});if(!o)return null;a=o.newValue}if(a=i.prepareNewValue_(a),a!==Rt.UNCHANGED){var l=$l(this),u=!1,c=l||u?{type:Tu,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),l&&Yl(this,c)}return!0},r.get_=function(n){return Rt.trackingDerivation&&!cc(this.target_,n)&&this.has_(n),this.target_[n]},r.set_=function(n,a,i){return i===void 0&&(i=!1),cc(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,a):i?Reflect.set(this.target_,n,a):(this.target_[n]=a,!0):this.extend_(n,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,i)},r.has_=function(n){if(!Rt.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(n);return a||(a=new Gc(n in this.target_,H1,"ObservableObject.key?",!1),this.pendingKeys_.set(n,a)),a.get()},r.make_=function(n,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(n in this.target_)){var i;if((i=this.target_[ku])!=null&&i[n])return;Pr(1,a.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==yp;){var l=P1(o,n);if(l){var u=a.make_(this,n,l,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}Ly(this,a,n)}},r.extend_=function(n,a,i,o){if(o===void 0&&(o=!1),i===!0&&(i=this.defaultAnnotation_),i===!1)return this.defineProperty_(n,a,o);var l=i.extend_(this,n,a,o);return l&&Ly(this,i,n),l},r.defineProperty_=function(n,a,i){i===void 0&&(i=!1),this.keysAtom_;try{ps();var o=this.delete_(n);if(!o)return o;if(ul(this)){var l=cl(this,{object:this.proxy_||this.target_,name:n,type:Uc,newValue:a.value});if(!l)return null;var u=l.newValue;a.value!==u&&(a=Wc({},a,{value:u}))}if(i){if(!Reflect.defineProperty(this.target_,n,a))return!1}else Nu(this.target_,n,a);this.notifyPropertyAddition_(n,a.value)}finally{gs()}return!0},r.defineObservableProperty_=function(n,a,i,o){o===void 0&&(o=!1),this.keysAtom_;try{ps();var l=this.delete_(n);if(!l)return l;if(ul(this)){var u=cl(this,{object:this.proxy_||this.target_,name:n,type:Uc,newValue:a});if(!u)return null;a=u.newValue}var c=ky(n),h={configurable:Rt.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:c.get,set:c.set};if(o){if(!Reflect.defineProperty(this.target_,n,h))return!1}else Nu(this.target_,n,h);var p=new Gc(a,i,"ObservableObject.key",!1);this.values_.set(n,p),this.notifyPropertyAddition_(n,p.value_)}finally{gs()}return!0},r.defineComputedProperty_=function(n,a,i){i===void 0&&(i=!1),this.keysAtom_;try{ps();var o=this.delete_(n);if(!o)return o;if(ul(this)){var l=cl(this,{object:this.proxy_||this.target_,name:n,type:Uc,newValue:void 0});if(!l)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var u=ky(n),c={configurable:Rt.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(i){if(!Reflect.defineProperty(this.target_,n,c))return!1}else Nu(this.target_,n,c);this.values_.set(n,new Xl(a)),this.notifyPropertyAddition_(n,void 0)}finally{gs()}return!0},r.delete_=function(n,a){if(a===void 0&&(a=!1),this.keysAtom_,!cc(this.target_,n))return!0;if(ul(this)){var i=cl(this,{object:this.proxy_||this.target_,name:n,type:Cy});if(!i)return null}try{var o;ps();var l=$l(this),u=!1,c=this.values_.get(n),h=void 0;if(!c&&(l||u)){var p;h=(p=P1(this.target_,n))==null?void 0:p.value}if(a){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(c&&(this.values_.delete(n),c instanceof Gc&&(h=c.value_),Bw(c)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(n))==null||o.set(n in this.target_),l||u){var w={type:Cy,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:h,name:n};l&&Yl(this,w)}}finally{gs()}return!0},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},r.notifyPropertyAddition_=function(n,a){var i,o=$l(this),l=!1;if(o||l){var u=o||l?{type:Uc,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;o&&Yl(this,u)}(i=this.pendingKeys_)==null||(i=i.get(n))==null||i.set(!0),this.keysAtom_.reportChanged()},r.ownKeys_=function(){return this.keysAtom_.reportObserved(),_h(this.target_)},r.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Mf(e,r){var t;if(cc(e,lr))return e;var n=(t=r==null?void 0:r.name)!=null?t:"ObservableObject",a=new u6(e,new Map,String(n),e9(r));return bp(e,lr,a),e}var nS=Zc("ObservableObjectAdministration",u6);function ky(e){return Ay[e]||(Ay[e]={get:function(){return this[lr].getObservablePropValue_(e)},set:function(t){return this[lr].setObservablePropValue_(e,t)}})}function Ra(e){return U1(e)?nS(e[lr]):!1}function Ly(e,r,t){var n;(n=e.target_[ku])==null||delete n[t]}var iS=f6(0),aS=function(){var e=!1,r={};return Object.defineProperty(r,"0",{set:function(){e=!0}}),Object.create(r)[0]=1,e===!1}(),V0=0,c6=function(){};function oS(e,r){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,r):e.prototype.__proto__!==void 0?e.prototype.__proto__=r:e.prototype=r}oS(c6,Array.prototype);var tm=function(e){function r(n,a,i,o){var l;return i===void 0&&(i="ObservableArray"),o===void 0&&(o=!1),l=e.call(this)||this,Jc(function(){var u=new J2(i,a,o,!0);u.proxy_=l,vw(l,lr,u),n&&n.length&&l.spliceWithArray(0,0,n),aS&&Object.defineProperty(l,"0",iS)}),l}bw(r,e);var t=r.prototype;return t.concat=function(){this[lr].atom_.reportObserved();for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),i.map(function(l){return Go(l)?l.slice():l}))},t[Symbol.iterator]=function(){var n=this,a=0;return nm({next:function(){return a<n.length?{value:n[a++],done:!1}:{done:!0,value:void 0}}})},Rh(r,[{key:"length",get:function(){return this[lr].getArrayLength_()},set:function(a){this[lr].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(c6);Object.entries(L1).forEach(function(e){var r=e[0],t=e[1];r!=="concat"&&bp(tm.prototype,r,t)});function f6(e){return{enumerable:!1,configurable:!0,get:function(){return this[lr].get_(e)},set:function(t){this[lr].set_(e,t)}}}function sS(e){Nu(tm.prototype,""+e,f6(e))}function h6(e){if(e>V0){for(var r=V0;r<e+100;r++)sS(r);V0=e}}h6(1e3);function lS(e,r,t){return new tm(e,r,t)}function Mu(e,r){if(typeof e=="object"&&e!==null){if(Go(e))return r!==void 0&&Pr(23),e[lr].atom_;if(ba(e))return e.atom_;if(ao(e)){if(r===void 0)return e.keysAtom_;var t=e.data_.get(r)||e.hasMap_.get(r);return t||Pr(25,r,T1(e)),t}if(Ra(e)){if(!r)return Pr(26);var n=e[lr].values_.get(r);return n||Pr(27,r,T1(e)),n}if(q2(e)||Lf(e)||k1(e))return e}else if(Bs(e)&&k1(e[lr]))return e[lr];Pr(28)}function Zl(e,r){if(e||Pr(29),r!==void 0)return Zl(Mu(e,r));if(q2(e)||Lf(e)||k1(e)||ao(e)||ba(e))return e;if(e[lr])return e[lr];Pr(24,e)}function T1(e,r){var t;if(r!==void 0)t=Mu(e,r);else{if(Eh(e))return e.name;Ra(e)||ao(e)||ba(e)?t=Zl(e):t=Mu(e)}return t.name_}function Jc(e){var r=Rf(),t=V1(!0);ps();try{return e()}finally{gs(),W1(t),fc(r)}}var Ny=yp.toString;function rm(e,r,t){return t===void 0&&(t=-1),_2(e,r,t)}function _2(e,r,t,n,a){if(e===r)return e!==0||1/e===1/r;if(e==null||r==null)return!1;if(e!==e)return r!==r;var i=typeof e;if(i!=="function"&&i!=="object"&&typeof r!="object")return!1;var o=Ny.call(e);if(o!==Ny.call(r))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:+e==0?1/+e===1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Ty(e),r=Ty(r);var l=o==="[object Array]";if(!l){if(typeof e!="object"||typeof r!="object")return!1;var u=e.constructor,c=r.constructor;if(u!==c&&!(Bs(u)&&u instanceof u&&Bs(c)&&c instanceof c)&&"constructor"in e&&"constructor"in r)return!1}if(t===0)return!1;t<0&&(t=-1),n=n||[],a=a||[];for(var h=n.length;h--;)if(n[h]===e)return a[h]===r;if(n.push(e),a.push(r),l){if(h=e.length,h!==r.length)return!1;for(;h--;)if(!_2(e[h],r[h],t-1,n,a))return!1}else{var p=Object.keys(e),w=p.length;if(Object.keys(r).length!==w)return!1;for(var d=0;d<w;d++){var _=p[d];if(!(cc(r,_)&&_2(e[_],r[_],t-1,n,a)))return!1}}return n.pop(),a.pop(),!0}function Ty(e){return Go(e)?e.slice():Th(e)||ao(e)||uc(e)||ba(e)?Array.from(e.entries()):e}var Ry,uS=((Ry=z1().Iterator)==null?void 0:Ry.prototype)||{};function nm(e){return e[Symbol.iterator]=cS,Object.assign(Object.create(uS),e)}function cS(){return this}["Symbol","Map","Set"].forEach(function(e){var r=z1();typeof r[e]>"u"&&Pr("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:zw,extras:{getDebugName:T1},$mobx:lr});const fS=Object.freeze(Object.defineProperty({__proto__:null,$mobx:lr,FlowCancellationError:Y1,ObservableMap:Q1,ObservableSet:em,Reaction:Kl,_allowStateChanges:U2,_allowStateChangesInsideComputed:xh,_allowStateReadsEnd:gh,_allowStateReadsStart:$1,_autoAction:Sh,_endAction:Nw,_getAdministration:Zl,_getGlobalState:Iw,_interceptReads:Y2,_isComputingDerivation:s9,_resetGlobalState:f9,_startAction:Lw,action:ca,autorun:V2,comparer:Cf,computed:Tf,configure:Kw,createAtom:up,defineProperty:Z2,entries:i6,extendObservable:$2,flow:Nf,flowResult:j9,get:z9,getAtom:Mu,getDebugName:T1,getDependencyTree:Zw,getObserverTree:N9,has:a6,intercept:X1,isAction:Eh,isBoxedObservable:H2,isComputed:B9,isComputedProp:t6,isFlow:Ph,isFlowCancellationError:M9,isObservable:K1,isObservableArray:Go,isObservableMap:ao,isObservableObject:Ra,isObservableProp:n6,isObservableSet:ba,keys:cp,makeAutoObservable:X9,makeObservable:Q2,observable:Rn,observe:Z1,onBecomeObserved:Yw,onBecomeUnobserved:W2,onReactionError:m9,override:_7,ownKeys:o6,reaction:$w,remove:q9,runInAction:xh,set:K2,spy:zw,toJS:G9,trace:V9,transaction:Cu,untracked:G2,values:X2,when:w2},Symbol.toStringTag,{value:"Module"}));if(!ni.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Q2)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var hS=cw();function dS(e){e()}function d6(e){e||(e=dS),Kw({reactionScheduler:e})}var pS=function(){return!0};function gS(e){return Zw(e)}var p6=!1;function g6(e){p6=e}function im(){return p6}var vS=1e4,mS=1e4,yS=function(){function e(r){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=vS),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var a=Date.now();t.registrations.forEach(function(i,o){a-i.registeredAt>=n&&(t.finalize(i.value),t.registrations.delete(o))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.registrations.delete(r)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,mS))}}),e}(),bS=typeof FinalizationRegistry<"u"?FinalizationRegistry:yS,R1=new bS(function(e){var r;(r=e.reaction)===null||r===void 0||r.dispose(),e.reaction=null}),W0={exports:{}},$0={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var My;function wS(){if(My)return $0;My=1;var e=di();function r(p,w){return p===w&&(p!==0||1/p===1/w)||p!==p&&w!==w}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,a=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function l(p,w){var d=w(),_=n({inst:{value:d,getSnapshot:w}}),E=_[0].inst,S=_[1];return i(function(){E.value=d,E.getSnapshot=w,u(E)&&S({inst:E})},[p,d,w]),a(function(){return u(E)&&S({inst:E}),p(function(){u(E)&&S({inst:E})})},[p]),o(d),d}function u(p){var w=p.getSnapshot;p=p.value;try{var d=w();return!t(p,d)}catch{return!0}}function c(p,w){return w()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:l;return $0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,$0}var Iy;function _S(){return Iy||(Iy=1,W0.exports=wS()),W0.exports}var SS=_S();function jy(e){e.reaction=new Kl("observer".concat(e.name),function(){var r;e.stateVersion=Symbol(),(r=e.onStoreChange)===null||r===void 0||r.call(e)})}function am(e,r){if(r===void 0&&(r="observed"),im())return e();var t=Vr.useRef(null);if(!t.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:r,subscribe:function(l){return R1.unregister(n),n.onStoreChange=l,n.reaction||(jy(n),n.stateVersion=Symbol()),function(){var u;n.onStoreChange=null,(u=n.reaction)===null||u===void 0||u.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};t.current=n}var a=t.current;a.reaction||(jy(a),R1.register(t,a,a)),Vr.useDebugValue(a.reaction,gS),SS.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);var i,o;if(a.reaction.track(function(){try{i=e()}catch(l){o=l}}),o)throw o;return i}var Y0,X0,v6=typeof Symbol=="function"&&Symbol.for,xS=(X0=(Y0=Object.getOwnPropertyDescriptor(function(){},"name"))===null||Y0===void 0?void 0:Y0.configurable)!==null&&X0!==void 0?X0:!1,Fy=v6?Symbol.for("react.forward_ref"):typeof ni.forwardRef=="function"&&ni.forwardRef(function(e){return null}).$$typeof,Dy=v6?Symbol.for("react.memo"):typeof ni.memo=="function"&&ni.memo(function(e){return null}).$$typeof;function ES(e,r){var t;if(Dy&&e.$$typeof===Dy)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(im())return e;var n=(t=r==null?void 0:r.forwardRef)!==null&&t!==void 0?t:!1,a=e,i=e.displayName||e.name;if(Fy&&e.$$typeof===Fy&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(l,u){return am(function(){return a(l,u)},i)};return o.displayName=e.displayName,xS&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=ni.forwardRef(o)),o=ni.memo(o),OS(e,o),o}var PS={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function OS(e,r){Object.keys(e).forEach(function(t){PS[t]||Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}function m6(e){var r=e.children,t=e.render;r&&t&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var n=r||t;return typeof n!="function"?null:am(n)}m6.displayName="Observer";function AS(e,r){return ni.useState(function(){return Rn(e(),r,{autoBind:!0})})[0]}function y6(e){var r=ni.useState(function(){return Rn(e,{},{deep:!1})})[0];return xh(function(){Object.assign(r,e)}),r}function CS(e,r){var t=r&&y6(r);return ni.useState(function(){return Rn(e(t),void 0,{autoBind:!0})})[0]}var K0;d6(hS.unstable_batchedUpdates);var kS=(K0=R1.finalizeAllImmediately)!==null&&K0!==void 0?K0:function(){};function LS(e,r){return r===void 0&&(r="observed"),am(e,r)}function NS(e){g6(e)}const TS=Object.freeze(Object.defineProperty({__proto__:null,Observer:m6,_observerFinalizationRegistry:R1,clearTimers:kS,enableStaticRendering:g6,isObserverBatched:pS,isUsingStaticRendering:im,observer:ES,observerBatching:d6,useAsObservableSource:y6,useLocalObservable:AS,useLocalStore:CS,useObserver:LS,useStaticRendering:NS},Symbol.toStringTag,{value:"Module"})),zs=Kc(TS);var yf={};const fl=Kc(fS);var m1={exports:{}},Kh={},Z0={},Q0={},By;function Mr(){return By||(By=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const r=Math.PI/180;function t(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof wh<"u"?wh:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.20",isBrowser:t(),isUnminified:/param/.test((function(a){}).toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*r:a},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const n=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=n,e.Konva._injectGlobal(e.Konva)}(Q0)),Q0}var J0={},qy;function Li(){return qy||(qy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const r=Mr();class t{constructor(b=[1,0,0,1,0,0]){this.dirty=!1,this.m=b&&b.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(b){b.m[0]=this.m[0],b.m[1]=this.m[1],b.m[2]=this.m[2],b.m[3]=this.m[3],b.m[4]=this.m[4],b.m[5]=this.m[5]}point(b){const O=this.m;return{x:O[0]*b.x+O[2]*b.y+O[4],y:O[1]*b.x+O[3]*b.y+O[5]}}translate(b,O){return this.m[4]+=this.m[0]*b+this.m[2]*O,this.m[5]+=this.m[1]*b+this.m[3]*O,this}scale(b,O){return this.m[0]*=b,this.m[1]*=b,this.m[2]*=O,this.m[3]*=O,this}rotate(b){const O=Math.cos(b),I=Math.sin(b),T=this.m[0]*O+this.m[2]*I,M=this.m[1]*O+this.m[3]*I,j=this.m[0]*-I+this.m[2]*O,C=this.m[1]*-I+this.m[3]*O;return this.m[0]=T,this.m[1]=M,this.m[2]=j,this.m[3]=C,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(b,O){const I=this.m[0]+this.m[2]*O,T=this.m[1]+this.m[3]*O,M=this.m[2]+this.m[0]*b,j=this.m[3]+this.m[1]*b;return this.m[0]=I,this.m[1]=T,this.m[2]=M,this.m[3]=j,this}multiply(b){const O=this.m[0]*b.m[0]+this.m[2]*b.m[1],I=this.m[1]*b.m[0]+this.m[3]*b.m[1],T=this.m[0]*b.m[2]+this.m[2]*b.m[3],M=this.m[1]*b.m[2]+this.m[3]*b.m[3],j=this.m[0]*b.m[4]+this.m[2]*b.m[5]+this.m[4],C=this.m[1]*b.m[4]+this.m[3]*b.m[5]+this.m[5];return this.m[0]=O,this.m[1]=I,this.m[2]=T,this.m[3]=M,this.m[4]=j,this.m[5]=C,this}invert(){const b=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),O=this.m[3]*b,I=-this.m[1]*b,T=-this.m[2]*b,M=this.m[0]*b,j=b*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),C=b*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=O,this.m[1]=I,this.m[2]=T,this.m[3]=M,this.m[4]=j,this.m[5]=C,this}getMatrix(){return this.m}decompose(){const b=this.m[0],O=this.m[1],I=this.m[2],T=this.m[3],M=this.m[4],j=this.m[5],C=b*T-O*I,x={x:M,y:j,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(b!=0||O!=0){const L=Math.sqrt(b*b+O*O);x.rotation=O>0?Math.acos(b/L):-Math.acos(b/L),x.scaleX=L,x.scaleY=C/L,x.skewX=(b*I+O*T)/C,x.skewY=0}else if(I!=0||T!=0){const L=Math.sqrt(I*I+T*T);x.rotation=Math.PI/2-(T>0?Math.acos(-I/L):-Math.acos(I/L)),x.scaleX=C/L,x.scaleY=L,x.skewX=0,x.skewY=(b*I+O*T)/C}return x.rotation=e.Util._getRotation(x.rotation),x}}e.Transform=t;const n="[object Array]",a="[object Number]",i="[object String]",o="[object Boolean]",l=Math.PI/180,u=180/Math.PI,c="#",h="",p="0",w="Konva warning: ",d="Konva error: ",_="rgb(",E={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},S=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let m=[];const g=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(v){setTimeout(v,60)};e.Util={_isElement(v){return!!(v&&v.nodeType==1)},_isFunction(v){return!!(v&&v.constructor&&v.call&&v.apply)},_isPlainObject(v){return!!v&&v.constructor===Object},_isArray(v){return Object.prototype.toString.call(v)===n},_isNumber(v){return Object.prototype.toString.call(v)===a&&!isNaN(v)&&isFinite(v)},_isString(v){return Object.prototype.toString.call(v)===i},_isBoolean(v){return Object.prototype.toString.call(v)===o},isObject(v){return v instanceof Object},isValidSelector(v){if(typeof v!="string")return!1;const b=v[0];return b==="#"||b==="."||b===b.toUpperCase()},_sign(v){return v===0||v>0?1:-1},requestAnimFrame(v){m.push(v),m.length===1&&g(function(){const b=m;m=[],b.forEach(function(O){O()})})},createCanvasElement(){const v=document.createElement("canvas");try{v.style=v.style||{}}catch{}return v},createImageElement(){return document.createElement("img")},_isInDocument(v){for(;v=v.parentNode;)if(v==document)return!0;return!1},_urlToImage(v,b){const O=e.Util.createImageElement();O.onload=function(){b(O)},O.src=v},_rgbToHex(v,b,O){return((1<<24)+(v<<16)+(b<<8)+O).toString(16).slice(1)},_hexToRgb(v){v=v.replace(c,h);const b=parseInt(v,16);return{r:b>>16&255,g:b>>8&255,b:b&255}},getRandomColor(){let v=(Math.random()*16777215<<0).toString(16);for(;v.length<6;)v=p+v;return c+v},getRGB(v){let b;return v in E?(b=E[v],{r:b[0],g:b[1],b:b[2]}):v[0]===c?this._hexToRgb(v.substring(1)):v.substr(0,4)===_?(b=S.exec(v.replace(/ /g,"")),{r:parseInt(b[1],10),g:parseInt(b[2],10),b:parseInt(b[3],10)}):{r:0,g:0,b:0}},colorToRGBA(v){return v=v||"black",e.Util._namedColorToRBA(v)||e.Util._hex3ColorToRGBA(v)||e.Util._hex4ColorToRGBA(v)||e.Util._hex6ColorToRGBA(v)||e.Util._hex8ColorToRGBA(v)||e.Util._rgbColorToRGBA(v)||e.Util._rgbaColorToRGBA(v)||e.Util._hslColorToRGBA(v)},_namedColorToRBA(v){const b=E[v.toLowerCase()];return b?{r:b[0],g:b[1],b:b[2],a:1}:null},_rgbColorToRGBA(v){if(v.indexOf("rgb(")===0){v=v.match(/rgb\(([^)]+)\)/)[1];const b=v.split(/ *, */).map(Number);return{r:b[0],g:b[1],b:b[2],a:1}}},_rgbaColorToRGBA(v){if(v.indexOf("rgba(")===0){v=v.match(/rgba\(([^)]+)\)/)[1];const b=v.split(/ *, */).map((O,I)=>O.slice(-1)==="%"?I===3?parseInt(O)/100:parseInt(O)/100*255:Number(O));return{r:b[0],g:b[1],b:b[2],a:b[3]}}},_hex8ColorToRGBA(v){if(v[0]==="#"&&v.length===9)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:parseInt(v.slice(7,9),16)/255}},_hex6ColorToRGBA(v){if(v[0]==="#"&&v.length===7)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:1}},_hex4ColorToRGBA(v){if(v[0]==="#"&&v.length===5)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:parseInt(v[4]+v[4],16)/255}},_hex3ColorToRGBA(v){if(v[0]==="#"&&v.length===4)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:1}},_hslColorToRGBA(v){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(v)){const[b,...O]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(v),I=Number(O[0])/360,T=Number(O[1])/100,M=Number(O[2])/100;let j,C,x;if(T===0)return x=M*255,{r:Math.round(x),g:Math.round(x),b:Math.round(x),a:1};M<.5?j=M*(1+T):j=M+T-M*T;const L=2*M-j,A=[0,0,0];for(let N=0;N<3;N++)C=I+1/3*-(N-1),C<0&&C++,C>1&&C--,6*C<1?x=L+(j-L)*6*C:2*C<1?x=j:3*C<2?x=L+(j-L)*(2/3-C)*6:x=L,A[N]=x*255;return{r:Math.round(A[0]),g:Math.round(A[1]),b:Math.round(A[2]),a:1}}},haveIntersection(v,b){return!(b.x>v.x+v.width||b.x+b.width<v.x||b.y>v.y+v.height||b.y+b.height<v.y)},cloneObject(v){const b={};for(const O in v)this._isPlainObject(v[O])?b[O]=this.cloneObject(v[O]):this._isArray(v[O])?b[O]=this.cloneArray(v[O]):b[O]=v[O];return b},cloneArray(v){return v.slice(0)},degToRad(v){return v*l},radToDeg(v){return v*u},_degToRad(v){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(v)},_radToDeg(v){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(v)},_getRotation(v){return r.Konva.angleDeg?e.Util.radToDeg(v):v},_capitalize(v){return v.charAt(0).toUpperCase()+v.slice(1)},throw(v){throw new Error(d+v)},error(v){console.error(d+v)},warn(v){r.Konva.showWarnings&&console.warn(w+v)},each(v,b){for(const O in v)b(O,v[O])},_inRange(v,b,O){return b<=v&&v<O},_getProjectionToSegment(v,b,O,I,T,M){let j,C,x;const L=(v-O)*(v-O)+(b-I)*(b-I);if(L==0)j=v,C=b,x=(T-O)*(T-O)+(M-I)*(M-I);else{const A=((T-v)*(O-v)+(M-b)*(I-b))/L;A<0?(j=v,C=b,x=(v-T)*(v-T)+(b-M)*(b-M)):A>1?(j=O,C=I,x=(O-T)*(O-T)+(I-M)*(I-M)):(j=v+A*(O-v),C=b+A*(I-b),x=(j-T)*(j-T)+(C-M)*(C-M))}return[j,C,x]},_getProjectionToLine(v,b,O){const I=e.Util.cloneObject(v);let T=Number.MAX_VALUE;return b.forEach(function(M,j){if(!O&&j===b.length-1)return;const C=b[(j+1)%b.length],x=e.Util._getProjectionToSegment(M.x,M.y,C.x,C.y,v.x,v.y),L=x[0],A=x[1],N=x[2];N<T&&(I.x=L,I.y=A,T=N)}),I},_prepareArrayForTween(v,b,O){const I=[],T=[];if(v.length>b.length){const j=b;b=v,v=j}for(let j=0;j<v.length;j+=2)I.push({x:v[j],y:v[j+1]});for(let j=0;j<b.length;j+=2)T.push({x:b[j],y:b[j+1]});const M=[];return T.forEach(function(j){const C=e.Util._getProjectionToLine(j,I,O);M.push(C.x),M.push(C.y)}),M},_prepareToStringify(v){let b;v.visitedByCircularReferenceRemoval=!0;for(const O in v)if(v.hasOwnProperty(O)&&v[O]&&typeof v[O]=="object"){if(b=Object.getOwnPropertyDescriptor(v,O),v[O].visitedByCircularReferenceRemoval||e.Util._isElement(v[O]))if(b.configurable)delete v[O];else return null;else if(e.Util._prepareToStringify(v[O])===null)if(b.configurable)delete v[O];else return null}return delete v.visitedByCircularReferenceRemoval,v},_assign(v,b){for(const O in b)v[O]=b[O];return v},_getFirstPointerId(v){return v.touches?v.changedTouches[0].identifier:v.pointerId||999},releaseCanvas(...v){r.Konva.releaseCanvasOnDestroy&&v.forEach(b=>{b.width=0,b.height=0})},drawRoundedRectPath(v,b,O,I){let T=0,M=0,j=0,C=0;typeof I=="number"?T=M=j=C=Math.min(I,b/2,O/2):(T=Math.min(I[0]||0,b/2,O/2),M=Math.min(I[1]||0,b/2,O/2),C=Math.min(I[2]||0,b/2,O/2),j=Math.min(I[3]||0,b/2,O/2)),v.moveTo(T,0),v.lineTo(b-M,0),v.arc(b-M,M,M,Math.PI*3/2,0,!1),v.lineTo(b,O-C),v.arc(b-C,O-C,C,0,Math.PI/2,!1),v.lineTo(j,O),v.arc(j,O-j,j,Math.PI/2,Math.PI,!1),v.lineTo(0,T),v.arc(T,T,T,Math.PI,Math.PI*3/2,!1)}}}(J0)),J0}var Zh={},eg={},ds={},zy;function Wr(){if(zy)return ds;zy=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.RGBComponent=n,ds.alphaComponent=a,ds.getNumberValidator=i,ds.getNumberOrArrayOfNumbersValidator=o,ds.getNumberOrAutoValidator=l,ds.getStringValidator=u,ds.getStringOrGradientValidator=c,ds.getFunctionValidator=h,ds.getNumberArrayValidator=p,ds.getBooleanValidator=w,ds.getComponentValidator=d;const e=Mr(),r=Li();function t(_){return r.Util._isString(_)?'"'+_+'"':Object.prototype.toString.call(_)==="[object Number]"||r.Util._isBoolean(_)?_:Object.prototype.toString.call(_)}function n(_){return _>255?255:_<0?0:Math.round(_)}function a(_){return _>1?1:_<1e-4?1e-4:_}function i(){if(e.Konva.isUnminified)return function(_,E){return r.Util._isNumber(_)||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a number.'),_}}function o(_){if(e.Konva.isUnminified)return function(E,S){let m=r.Util._isNumber(E),g=r.Util._isArray(E)&&E.length==_;return!m&&!g&&r.Util.warn(t(E)+' is a not valid value for "'+S+'" attribute. The value should be a number or Array<number>('+_+")"),E}}function l(){if(e.Konva.isUnminified)return function(_,E){var S=r.Util._isNumber(_),m=_==="auto";return S||m||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a number or "auto".'),_}}function u(){if(e.Konva.isUnminified)return function(_,E){return r.Util._isString(_)||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a string.'),_}}function c(){if(e.Konva.isUnminified)return function(_,E){const S=r.Util._isString(_),m=Object.prototype.toString.call(_)==="[object CanvasGradient]"||_&&_.addColorStop;return S||m||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a string or a native gradient.'),_}}function h(){if(e.Konva.isUnminified)return function(_,E){return r.Util._isFunction(_)||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a function.'),_}}function p(){if(e.Konva.isUnminified)return function(_,E){const S=Int8Array?Object.getPrototypeOf(Int8Array):null;return S&&_ instanceof S||(r.Util._isArray(_)?_.forEach(function(m){r.Util._isNumber(m)||r.Util.warn('"'+E+'" attribute has non numeric element '+m+". Make sure that all elements are numbers.")}):r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a array of numbers.')),_}}function w(){if(e.Konva.isUnminified)return function(_,E){var S=_===!0||_===!1;return S||r.Util.warn(t(_)+' is a not valid value for "'+E+'" attribute. The value should be a boolean.'),_}}function d(_){if(e.Konva.isUnminified)return function(E,S){return E==null||r.Util.isObject(E)||r.Util.warn(t(E)+' is a not valid value for "'+S+'" attribute. The value should be an object with properties '+_),E}}return ds}var Uy;function Hr(){return Uy||(Uy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const r=Li(),t=Wr(),n="get",a="set";e.Factory={addGetterSetter(i,o,l,u,c){e.Factory.addGetter(i,o,l),e.Factory.addSetter(i,o,u,c),e.Factory.addOverloadedGetterSetter(i,o)},addGetter(i,o,l){var u=n+r.Util._capitalize(o);i.prototype[u]=i.prototype[u]||function(){const c=this.attrs[o];return c===void 0?l:c}},addSetter(i,o,l,u){var c=a+r.Util._capitalize(o);i.prototype[c]||e.Factory.overWriteSetter(i,o,l,u)},overWriteSetter(i,o,l,u){var c=a+r.Util._capitalize(o);i.prototype[c]=function(h){return l&&h!==void 0&&h!==null&&(h=l.call(this,h,o)),this._setAttr(o,h),u&&u.call(this),this}},addComponentsGetterSetter(i,o,l,u,c){const h=l.length,p=r.Util._capitalize,w=n+p(o),d=a+p(o);i.prototype[w]=function(){const E={};for(let S=0;S<h;S++){const m=l[S];E[m]=this.getAttr(o+p(m))}return E};const _=(0,t.getComponentValidator)(l);i.prototype[d]=function(E){const S=this.attrs[o];u&&(E=u.call(this,E,o)),_&&_.call(this,E,o);for(const m in E)E.hasOwnProperty(m)&&this._setAttr(o+p(m),E[m]);return E||l.forEach(m=>{this._setAttr(o+p(m),void 0)}),this._fireChangeEvent(o,S,E),c&&c.call(this),this},e.Factory.addOverloadedGetterSetter(i,o)},addOverloadedGetterSetter(i,o){var l=r.Util._capitalize(o),u=a+l,c=n+l;i.prototype[o]=function(){return arguments.length?(this[u](arguments[0]),this):this[c]()}},addDeprecatedGetterSetter(i,o,l,u){r.Util.error("Adding deprecated "+o);const c=n+r.Util._capitalize(o),h=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[c]=function(){r.Util.error(h);const p=this.attrs[o];return p===void 0?l:p},e.Factory.addSetter(i,o,u,function(){r.Util.error(h)}),e.Factory.addOverloadedGetterSetter(i,o)},backCompat(i,o){r.Util.each(o,function(l,u){const c=i.prototype[u],h=n+r.Util._capitalize(l),p=a+r.Util._capitalize(l);function w(){c.apply(this,arguments),r.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+u+'" instead.')}i.prototype[l]=w,i.prototype[h]=w,i.prototype[p]=w})},afterSetFilter(){this._filterUpToDate=!1}}}(eg)),eg}var ec={},tc={},Hy;function b6(){if(Hy)return tc;Hy=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.HitContext=tc.SceneContext=tc.Context=void 0;const e=Li(),r=Mr();function t(m){const g=[],v=m.length,b=e.Util;for(let O=0;O<v;O++){let I=m[O];b._isNumber(I)?I=Math.round(I*1e3)/1e3:b._isString(I)||(I=I+""),g.push(I)}return g}const n=",",a="(",i=")",o="([",l="])",u=";",c="()",h="=",p=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],w=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],d=100;let _=class{constructor(g){this.canvas=g,r.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(g){g.fillEnabled()&&this._fill(g)}_fill(g){}strokeShape(g){g.hasStroke()&&this._stroke(g)}_stroke(g){}fillStrokeShape(g){g.attrs.fillAfterStrokeEnabled?(this.strokeShape(g),this.fillShape(g)):(this.fillShape(g),this.strokeShape(g))}getTrace(g,v){let b=this.traceArr,O=b.length,I="",T,M,j,C;for(T=0;T<O;T++)M=b[T],j=M.method,j?(C=M.args,I+=j,g?I+=c:e.Util._isArray(C[0])?I+=o+C.join(n)+l:(v&&(C=C.map(x=>typeof x=="number"?Math.floor(x):x)),I+=a+C.join(n)+i)):(I+=M.property,g||(I+=h+M.val)),I+=u;return I}clearTrace(){this.traceArr=[]}_trace(g){let v=this.traceArr,b;v.push(g),b=v.length,b>=d&&v.shift()}reset(){const g=this.getCanvas().getPixelRatio();this.setTransform(1*g,0,0,1*g,0,0)}getCanvas(){return this.canvas}clear(g){const v=this.getCanvas();g?this.clearRect(g.x||0,g.y||0,g.width||0,g.height||0):this.clearRect(0,0,v.getWidth()/v.pixelRatio,v.getHeight()/v.pixelRatio)}_applyLineCap(g){const v=g.attrs.lineCap;v&&this.setAttr("lineCap",v)}_applyOpacity(g){const v=g.getAbsoluteOpacity();v!==1&&this.setAttr("globalAlpha",v)}_applyLineJoin(g){const v=g.attrs.lineJoin;v&&this.setAttr("lineJoin",v)}setAttr(g,v){this._context[g]=v}arc(g,v,b,O,I,T){this._context.arc(g,v,b,O,I,T)}arcTo(g,v,b,O,I){this._context.arcTo(g,v,b,O,I)}beginPath(){this._context.beginPath()}bezierCurveTo(g,v,b,O,I,T){this._context.bezierCurveTo(g,v,b,O,I,T)}clearRect(g,v,b,O){this._context.clearRect(g,v,b,O)}clip(...g){this._context.clip.apply(this._context,g)}closePath(){this._context.closePath()}createImageData(g,v){const b=arguments;if(b.length===2)return this._context.createImageData(g,v);if(b.length===1)return this._context.createImageData(g)}createLinearGradient(g,v,b,O){return this._context.createLinearGradient(g,v,b,O)}createPattern(g,v){return this._context.createPattern(g,v)}createRadialGradient(g,v,b,O,I,T){return this._context.createRadialGradient(g,v,b,O,I,T)}drawImage(g,v,b,O,I,T,M,j,C){const x=arguments,L=this._context;x.length===3?L.drawImage(g,v,b):x.length===5?L.drawImage(g,v,b,O,I):x.length===9&&L.drawImage(g,v,b,O,I,T,M,j,C)}ellipse(g,v,b,O,I,T,M,j){this._context.ellipse(g,v,b,O,I,T,M,j)}isPointInPath(g,v,b,O){return b?this._context.isPointInPath(b,g,v,O):this._context.isPointInPath(g,v,O)}fill(...g){this._context.fill.apply(this._context,g)}fillRect(g,v,b,O){this._context.fillRect(g,v,b,O)}strokeRect(g,v,b,O){this._context.strokeRect(g,v,b,O)}fillText(g,v,b,O){O?this._context.fillText(g,v,b,O):this._context.fillText(g,v,b)}measureText(g){return this._context.measureText(g)}getImageData(g,v,b,O){return this._context.getImageData(g,v,b,O)}lineTo(g,v){this._context.lineTo(g,v)}moveTo(g,v){this._context.moveTo(g,v)}rect(g,v,b,O){this._context.rect(g,v,b,O)}roundRect(g,v,b,O,I){this._context.roundRect(g,v,b,O,I)}putImageData(g,v,b){this._context.putImageData(g,v,b)}quadraticCurveTo(g,v,b,O){this._context.quadraticCurveTo(g,v,b,O)}restore(){this._context.restore()}rotate(g){this._context.rotate(g)}save(){this._context.save()}scale(g,v){this._context.scale(g,v)}setLineDash(g){this._context.setLineDash?this._context.setLineDash(g):"mozDash"in this._context?this._context.mozDash=g:"webkitLineDash"in this._context&&(this._context.webkitLineDash=g)}getLineDash(){return this._context.getLineDash()}setTransform(g,v,b,O,I,T){this._context.setTransform(g,v,b,O,I,T)}stroke(g){g?this._context.stroke(g):this._context.stroke()}strokeText(g,v,b,O){this._context.strokeText(g,v,b,O)}transform(g,v,b,O,I,T){this._context.transform(g,v,b,O,I,T)}translate(g,v){this._context.translate(g,v)}_enableTrace(){let g=this,v=p.length,b=this.setAttr,O,I;const T=function(M){let j=g[M],C;g[M]=function(){return I=t(Array.prototype.slice.call(arguments,0)),C=j.apply(g,arguments),g._trace({method:M,args:I}),C}};for(O=0;O<v;O++)T(p[O]);g.setAttr=function(){b.apply(g,arguments);const M=arguments[0];let j=arguments[1];(M==="shadowOffsetX"||M==="shadowOffsetY"||M==="shadowBlur")&&(j=j/this.canvas.getPixelRatio()),g._trace({property:M,val:j})}}_applyGlobalCompositeOperation(g){const v=g.attrs.globalCompositeOperation;!v||v==="source-over"||this.setAttr("globalCompositeOperation",v)}};tc.Context=_,w.forEach(function(m){Object.defineProperty(_.prototype,m,{get(){return this._context[m]},set(g){this._context[m]=g}})});class E extends _{constructor(g,{willReadFrequently:v=!1}={}){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:v})}_fillColor(g){const v=g.fill();this.setAttr("fillStyle",v),g._fillFunc(this)}_fillPattern(g){this.setAttr("fillStyle",g._getFillPattern()),g._fillFunc(this)}_fillLinearGradient(g){const v=g._getLinearGradient();v&&(this.setAttr("fillStyle",v),g._fillFunc(this))}_fillRadialGradient(g){const v=g._getRadialGradient();v&&(this.setAttr("fillStyle",v),g._fillFunc(this))}_fill(g){const v=g.fill(),b=g.getFillPriority();if(v&&b==="color"){this._fillColor(g);return}const O=g.getFillPatternImage();if(O&&b==="pattern"){this._fillPattern(g);return}const I=g.getFillLinearGradientColorStops();if(I&&b==="linear-gradient"){this._fillLinearGradient(g);return}const T=g.getFillRadialGradientColorStops();if(T&&b==="radial-gradient"){this._fillRadialGradient(g);return}v?this._fillColor(g):O?this._fillPattern(g):I?this._fillLinearGradient(g):T&&this._fillRadialGradient(g)}_strokeLinearGradient(g){const v=g.getStrokeLinearGradientStartPoint(),b=g.getStrokeLinearGradientEndPoint(),O=g.getStrokeLinearGradientColorStops(),I=this.createLinearGradient(v.x,v.y,b.x,b.y);if(O){for(let T=0;T<O.length;T+=2)I.addColorStop(O[T],O[T+1]);this.setAttr("strokeStyle",I)}}_stroke(g){const v=g.dash(),b=g.getStrokeScaleEnabled();if(g.hasStroke()){if(!b){this.save();const I=this.getCanvas().getPixelRatio();this.setTransform(I,0,0,I,0,0)}this._applyLineCap(g),v&&g.dashEnabled()&&(this.setLineDash(v),this.setAttr("lineDashOffset",g.dashOffset())),this.setAttr("lineWidth",g.strokeWidth()),g.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),g.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(g):this.setAttr("strokeStyle",g.stroke()),g._strokeFunc(this),b||this.restore()}}_applyShadow(g){var v,b,O;const I=(v=g.getShadowRGBA())!==null&&v!==void 0?v:"black",T=(b=g.getShadowBlur())!==null&&b!==void 0?b:5,M=(O=g.getShadowOffset())!==null&&O!==void 0?O:{x:0,y:0},j=g.getAbsoluteScale(),C=this.canvas.getPixelRatio(),x=j.x*C,L=j.y*C;this.setAttr("shadowColor",I),this.setAttr("shadowBlur",T*Math.min(Math.abs(x),Math.abs(L))),this.setAttr("shadowOffsetX",M.x*x),this.setAttr("shadowOffsetY",M.y*L)}}tc.SceneContext=E;class S extends _{constructor(g){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:!0})}_fill(g){this.save(),this.setAttr("fillStyle",g.colorKey),g._fillFuncHit(this),this.restore()}strokeShape(g){g.hasHitStroke()&&this._stroke(g)}_stroke(g){if(g.hasHitStroke()){const v=g.getStrokeScaleEnabled();if(!v){this.save();const I=this.getCanvas().getPixelRatio();this.setTransform(I,0,0,I,0,0)}this._applyLineCap(g);const b=g.hitStrokeWidth(),O=b==="auto"?g.strokeWidth():b;this.setAttr("lineWidth",O),this.setAttr("strokeStyle",g.colorKey),g._strokeFuncHit(this),v||this.restore()}}}return tc.HitContext=S,tc}var Gy;function J1(){if(Gy)return ec;Gy=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.HitCanvas=ec.SceneCanvas=ec.Canvas=void 0;const e=Li(),r=b6(),t=Mr();let n;function a(){if(n)return n;const u=e.Util.createCanvasElement(),c=u.getContext("2d");return n=function(){const h=t.Konva._global.devicePixelRatio||1,p=c.webkitBackingStorePixelRatio||c.mozBackingStorePixelRatio||c.msBackingStorePixelRatio||c.oBackingStorePixelRatio||c.backingStorePixelRatio||1;return h/p}(),e.Util.releaseCanvas(u),n}let i=class{constructor(c){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const p=(c||{}).pixelRatio||t.Konva.pixelRatio||a();this.pixelRatio=p,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(c){const h=this.pixelRatio;this.pixelRatio=c,this.setSize(this.getWidth()/h,this.getHeight()/h)}setWidth(c){this.width=this._canvas.width=c*this.pixelRatio,this._canvas.style.width=c+"px";const h=this.pixelRatio;this.getContext()._context.scale(h,h)}setHeight(c){this.height=this._canvas.height=c*this.pixelRatio,this._canvas.style.height=c+"px";const h=this.pixelRatio;this.getContext()._context.scale(h,h)}getWidth(){return this.width}getHeight(){return this.height}setSize(c,h){this.setWidth(c||0),this.setHeight(h||0)}toDataURL(c,h){try{return this._canvas.toDataURL(c,h)}catch{try{return this._canvas.toDataURL()}catch(w){return e.Util.error("Unable to get data URL. "+w.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};ec.Canvas=i;class o extends i{constructor(c={width:0,height:0,willReadFrequently:!1}){super(c),this.context=new r.SceneContext(this,{willReadFrequently:c.willReadFrequently}),this.setSize(c.width,c.height)}}ec.SceneCanvas=o;class l extends i{constructor(c={width:0,height:0}){super(c),this.hitCanvas=!0,this.context=new r.HitContext(this),this.setSize(c.width,c.height)}}return ec.HitCanvas=l,ec}var tg={},Vy;function om(){return Vy||(Vy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const r=Mr(),t=Li();e.DD={get isDragging(){let n=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return e.DD._dragElements.forEach(a=>{n=a.node}),n},_dragElements:new Map,_drag(n){const a=[];e.DD._dragElements.forEach((i,o)=>{const{node:l}=i,u=l.getStage();u.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=t.Util._getFirstPointerId(n));const c=u._changedPointerPositions.find(h=>h.id===i.pointerId);if(c){if(i.dragStatus!=="dragging"){const h=l.dragDistance();if(Math.max(Math.abs(c.x-i.startPointerPos.x),Math.abs(c.y-i.startPointerPos.y))<h||(l.startDrag({evt:n}),!l.isDragging()))return}l._setDragPosition(n,i),a.push(l)}}),a.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const a=[];e.DD._dragElements.forEach(i=>{const{node:o}=i,l=o.getStage();if(n&&l.setPointersPositions(n),!l._changedPointerPositions.find(h=>h.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,i.dragStatus="stopped");const c=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;c&&a.indexOf(c)===-1&&a.push(c)}),a.forEach(i=>{i.draw()})},_endDragAfter(n){e.DD._dragElements.forEach((a,i)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:n},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},r.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(tg)),tg}var Wy;function Ji(){if(Wy)return Zh;Wy=1,Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.Node=void 0;const e=Li(),r=Hr(),t=J1(),n=Mr(),a=om(),i=Wr(),o="absoluteOpacity",l="allEventListeners",u="absoluteTransform",c="absoluteScale",h="canvas",p="Change",w="children",d="konva",_="listening",E="mouseenter",S="mouseleave",m="set",g="Shape",v=" ",b="stage",O="transform",I="Stage",T="visible",M=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(v);let j=1;class C{constructor(A){this._id=j++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(A),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(A){(A===O||A===u)&&this._cache.get(A)?this._cache.get(A).dirty=!0:A?this._cache.delete(A):this._cache.clear()}_getCache(A,N){let F=this._cache.get(A);return(F===void 0||(A===O||A===u)&&F.dirty===!0)&&(F=N.call(this),this._cache.set(A,F)),F}_calculate(A,N,F){if(!this._attachedDepsListeners.get(A)){const U=N.map(W=>W+"Change.konva").join(v);this.on(U,()=>{this._clearCache(A)}),this._attachedDepsListeners.set(A,!0)}return this._getCache(A,F)}_getCanvasCache(){return this._cache.get(h)}_clearSelfAndDescendantCache(A){this._clearCache(A),A===u&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(h)){const{scene:A,filter:N,hit:F}=this._cache.get(h);e.Util.releaseCanvas(A,N,F),this._cache.delete(h)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(A){const N=A||{};let F={};(N.x===void 0||N.y===void 0||N.width===void 0||N.height===void 0)&&(F=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let U=Math.ceil(N.width||F.width),W=Math.ceil(N.height||F.height),$=N.pixelRatio,Z=N.x===void 0?Math.floor(F.x):N.x,V=N.y===void 0?Math.floor(F.y):N.y,G=N.offset||0,z=N.drawBorder||!1,D=N.hitCanvasPixelRatio||1;if(!U||!W){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const K=Math.abs(Math.round(F.x)-Z)>.5?1:0,ne=Math.abs(Math.round(F.y)-V)>.5?1:0;U+=G*2+K,W+=G*2+ne,Z-=G,V-=G;const Q=new t.SceneCanvas({pixelRatio:$,width:U,height:W}),ee=new t.SceneCanvas({pixelRatio:$,width:0,height:0,willReadFrequently:!0}),ae=new t.HitCanvas({pixelRatio:D,width:U,height:W}),se=Q.getContext(),ce=ae.getContext();return ae.isCache=!0,Q.isCache=!0,this._cache.delete(h),this._filterUpToDate=!1,N.imageSmoothingEnabled===!1&&(Q.getContext()._context.imageSmoothingEnabled=!1,ee.getContext()._context.imageSmoothingEnabled=!1),se.save(),ce.save(),se.translate(-Z,-V),ce.translate(-Z,-V),this._isUnderCache=!0,this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(c),this.drawScene(Q,this),this.drawHit(ae,this),this._isUnderCache=!1,se.restore(),ce.restore(),z&&(se.save(),se.beginPath(),se.rect(0,0,U,W),se.closePath(),se.setAttr("strokeStyle","red"),se.setAttr("lineWidth",5),se.stroke(),se.restore()),this._cache.set(h,{scene:Q,filter:ee,hit:ae,x:Z,y:V}),this._requestDraw(),this}isCached(){return this._cache.has(h)}getClientRect(A){throw new Error('abstract "getClientRect" method call')}_transformedRect(A,N){const F=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}];let U=1/0,W=1/0,$=-1/0,Z=-1/0;const V=this.getAbsoluteTransform(N);return F.forEach(function(G){const z=V.point(G);U===void 0&&(U=$=z.x,W=Z=z.y),U=Math.min(U,z.x),W=Math.min(W,z.y),$=Math.max($,z.x),Z=Math.max(Z,z.y)}),{x:U,y:W,width:$-U,height:Z-W}}_drawCachedSceneCanvas(A){A.save(),A._applyOpacity(this),A._applyGlobalCompositeOperation(this);const N=this._getCanvasCache();A.translate(N.x,N.y);const F=this._getCachedSceneCanvas(),U=F.pixelRatio;A.drawImage(F._canvas,0,0,F.width/U,F.height/U),A.restore()}_drawCachedHitCanvas(A){const N=this._getCanvasCache(),F=N.hit;A.save(),A.translate(N.x,N.y),A.drawImage(F._canvas,0,0,F.width/F.pixelRatio,F.height/F.pixelRatio),A.restore()}_getCachedSceneCanvas(){let A=this.filters(),N=this._getCanvasCache(),F=N.scene,U=N.filter,W=U.getContext(),$,Z,V,G;if(A){if(!this._filterUpToDate){const z=F.pixelRatio;U.setSize(F.width/F.pixelRatio,F.height/F.pixelRatio);try{for($=A.length,W.clear(),W.drawImage(F._canvas,0,0,F.getWidth()/z,F.getHeight()/z),Z=W.getImageData(0,0,U.getWidth(),U.getHeight()),V=0;V<$;V++){if(G=A[V],typeof G!="function"){e.Util.error("Filter should be type of function, but got "+typeof G+" instead. Please check correct filters");continue}G.call(this,Z),W.putImageData(Z,0,0)}}catch(D){e.Util.error("Unable to apply filter. "+D.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return U}return F}on(A,N){if(this._cache&&this._cache.delete(l),arguments.length===3)return this._delegate.apply(this,arguments);let F=A.split(v),U=F.length,W,$,Z,V,G;for(W=0;W<U;W++)$=F[W],Z=$.split("."),V=Z[0],G=Z[1]||"",this.eventListeners[V]||(this.eventListeners[V]=[]),this.eventListeners[V].push({name:G,handler:N});return this}off(A,N){let F=(A||"").split(v),U=F.length,W,$,Z,V,G,z;if(this._cache&&this._cache.delete(l),!A)for($ in this.eventListeners)this._off($);for(W=0;W<U;W++)if(Z=F[W],V=Z.split("."),G=V[0],z=V[1],G)this.eventListeners[G]&&this._off(G,z,N);else for($ in this.eventListeners)this._off($,z,N);return this}dispatchEvent(A){const N={target:this,type:A.type,evt:A};return this.fire(A.type,N),this}addEventListener(A,N){return this.on(A,function(F){N.call(this,F.evt)}),this}removeEventListener(A){return this.off(A),this}_delegate(A,N,F){const U=this;this.on(A,function(W){const $=W.target.findAncestors(N,!0,U);for(let Z=0;Z<$.length;Z++)W=e.Util.cloneObject(W),W.currentTarget=$[Z],F.call($[Z],W)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(T),this._clearSelfAndDescendantCache(_)}_remove(){this._clearCaches();const A=this.getParent();A&&A.children&&(A.children.splice(this.index,1),A._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(A){const N="get"+e.Util._capitalize(A);return e.Util._isFunction(this[N])?this[N]():this.attrs[A]}getAncestors(){let A=this.getParent(),N=[];for(;A;)N.push(A),A=A.getParent();return N}getAttrs(){return this.attrs||{}}setAttrs(A){return this._batchTransformChanges(()=>{let N,F;if(!A)return this;for(N in A)N!==w&&(F=m+e.Util._capitalize(N),e.Util._isFunction(this[F])?this[F](A[N]):this._setAttr(N,A[N]))}),this}isListening(){return this._getCache(_,this._isListening)}_isListening(A){if(!this.listening())return!1;const F=this.getParent();return F&&F!==A&&this!==A?F._isListening(A):!0}isVisible(){return this._getCache(T,this._isVisible)}_isVisible(A){if(!this.visible())return!1;const F=this.getParent();return F&&F!==A&&this!==A?F._isVisible(A):!0}shouldDrawHit(A,N=!1){if(A)return this._isVisible(A)&&this._isListening(A);const F=this.getLayer();let U=!1;a.DD._dragElements.forEach($=>{$.dragStatus==="dragging"&&($.node.nodeType==="Stage"||$.node.getLayer()===F)&&(U=!0)});const W=!N&&!n.Konva.hitOnDragEnabled&&(U||n.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!W}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let A=this.getDepth(),N=this,F=0,U,W,$,Z;function V(z){for(U=[],W=z.length,$=0;$<W;$++)Z=z[$],F++,Z.nodeType!==g&&(U=U.concat(Z.getChildren().slice())),Z._id===N._id&&($=W);U.length>0&&U[0].getDepth()<=A&&V(U)}const G=this.getStage();return N.nodeType!==I&&G&&V(G.getChildren()),F}getDepth(){let A=0,N=this.parent;for(;N;)A++,N=N.parent;return A}_batchTransformChanges(A){this._batchingTransformChange=!0,A(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(O),this._clearSelfAndDescendantCache(u)),this._needClearTransformCache=!1}setPosition(A){return this._batchTransformChanges(()=>{this.x(A.x),this.y(A.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const A=this.getStage();if(!A)return null;const N=A.getPointerPosition();if(!N)return null;const F=this.getAbsoluteTransform().copy();return F.invert(),F.point(N)}getAbsolutePosition(A){let N=!1,F=this.parent;for(;F;){if(F.isCached()){N=!0;break}F=F.parent}N&&!A&&(A=!0);const U=this.getAbsoluteTransform(A).getMatrix(),W=new e.Transform,$=this.offset();return W.m=U.slice(),W.translate($.x,$.y),W.getTranslation()}setAbsolutePosition(A){const{x:N,y:F,...U}=this._clearTransform();this.attrs.x=N,this.attrs.y=F,this._clearCache(O);const W=this._getAbsoluteTransform().copy();return W.invert(),W.translate(A.x,A.y),A={x:this.attrs.x+W.getTranslation().x,y:this.attrs.y+W.getTranslation().y},this._setTransform(U),this.setPosition({x:A.x,y:A.y}),this._clearCache(O),this._clearSelfAndDescendantCache(u),this}_setTransform(A){let N;for(N in A)this.attrs[N]=A[N]}_clearTransform(){const A={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,A}move(A){let N=A.x,F=A.y,U=this.x(),W=this.y();return N!==void 0&&(U+=N),F!==void 0&&(W+=F),this.setPosition({x:U,y:W}),this}_eachAncestorReverse(A,N){let F=[],U=this.getParent(),W,$;if(!(N&&N._id===this._id)){for(F.unshift(this);U&&(!N||U._id!==N._id);)F.unshift(U),U=U.parent;for(W=F.length,$=0;$<W;$++)A(F[$])}}rotate(A){return this.rotation(this.rotation()+A),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const A=this.index,N=this.parent.getChildren().length;return A<N-1?(this.parent.children.splice(A,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const A=this.index,N=this.parent.getChildren().length;return A<N-1?(this.parent.children.splice(A,1),this.parent.children.splice(A+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.splice(A-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(A){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(A<0||A>=this.parent.children.length)&&e.Util.warn("Unexpected value "+A+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const N=this.index;return this.parent.children.splice(N,1),this.parent.children.splice(A,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(o,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let A=this.opacity();const N=this.getParent();return N&&!N._isUnderCache&&(A*=N.getAbsoluteOpacity()),A}moveTo(A){return this.getParent()!==A&&(this._remove(),A.add(this)),this}toObject(){let A=this.getAttrs(),N,F,U,W,$;const Z={attrs:{},className:this.getClassName()};for(N in A)F=A[N],$=e.Util.isObject(F)&&!e.Util._isPlainObject(F)&&!e.Util._isArray(F),!$&&(U=typeof this[N]=="function"&&this[N],delete A[N],W=U?U.call(this):null,A[N]=F,W!==F&&(Z.attrs[N]=F));return e.Util._prepareToStringify(Z)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(A,N,F){const U=[];N&&this._isMatch(A)&&U.push(this);let W=this.parent;for(;W;){if(W===F)return U;W._isMatch(A)&&U.push(W),W=W.parent}return U}isAncestorOf(A){return!1}findAncestor(A,N,F){return this.findAncestors(A,N,F)[0]}_isMatch(A){if(!A)return!1;if(typeof A=="function")return A(this);let N=A.replace(/ /g,"").split(","),F=N.length,U,W;for(U=0;U<F;U++)if(W=N[U],e.Util.isValidSelector(W)||(e.Util.warn('Selector "'+W+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),W.charAt(0)==="#"){if(this.id()===W.slice(1))return!0}else if(W.charAt(0)==="."){if(this.hasName(W.slice(1)))return!0}else if(this.className===W||this.nodeType===W)return!0;return!1}getLayer(){const A=this.getParent();return A?A.getLayer():null}getStage(){return this._getCache(b,this._getStage)}_getStage(){const A=this.getParent();return A?A.getStage():null}fire(A,N={},F){return N.target=N.target||this,F?this._fireAndBubble(A,N):this._fire(A,N),this}getAbsoluteTransform(A){return A?this._getAbsoluteTransform(A):this._getCache(u,this._getAbsoluteTransform)}_getAbsoluteTransform(A){let N;if(A)return N=new e.Transform,this._eachAncestorReverse(function(F){const U=F.transformsEnabled();U==="all"?N.multiply(F.getTransform()):U==="position"&&N.translate(F.x()-F.offsetX(),F.y()-F.offsetY())},A),N;{N=this._cache.get(u)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(N):N.reset();const F=this.transformsEnabled();if(F==="all")N.multiply(this.getTransform());else if(F==="position"){const U=this.attrs.x||0,W=this.attrs.y||0,$=this.attrs.offsetX||0,Z=this.attrs.offsetY||0;N.translate(U-$,W-Z)}return N.dirty=!1,N}}getAbsoluteScale(A){let N=this;for(;N;)N._isUnderCache&&(A=N),N=N.getParent();const U=this.getAbsoluteTransform(A).decompose();return{x:U.scaleX,y:U.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(O,this._getTransform)}_getTransform(){var A,N;const F=this._cache.get(O)||new e.Transform;F.reset();const U=this.x(),W=this.y(),$=n.Konva.getAngle(this.rotation()),Z=(A=this.attrs.scaleX)!==null&&A!==void 0?A:1,V=(N=this.attrs.scaleY)!==null&&N!==void 0?N:1,G=this.attrs.skewX||0,z=this.attrs.skewY||0,D=this.attrs.offsetX||0,K=this.attrs.offsetY||0;return(U!==0||W!==0)&&F.translate(U,W),$!==0&&F.rotate($),(G!==0||z!==0)&&F.skew(G,z),(Z!==1||V!==1)&&F.scale(Z,V),(D!==0||K!==0)&&F.translate(-1*D,-1*K),F.dirty=!1,F}clone(A){let N=e.Util.cloneObject(this.attrs),F,U,W,$,Z;for(F in A)N[F]=A[F];const V=new this.constructor(N);for(F in this.eventListeners)for(U=this.eventListeners[F],W=U.length,$=0;$<W;$++)Z=U[$],Z.name.indexOf(d)<0&&(V.eventListeners[F]||(V.eventListeners[F]=[]),V.eventListeners[F].push(Z));return V}_toKonvaCanvas(A){A=A||{};const N=this.getClientRect(),F=this.getStage(),U=A.x!==void 0?A.x:Math.floor(N.x),W=A.y!==void 0?A.y:Math.floor(N.y),$=A.pixelRatio||1,Z=new t.SceneCanvas({width:A.width||Math.ceil(N.width)||(F?F.width():0),height:A.height||Math.ceil(N.height)||(F?F.height():0),pixelRatio:$}),V=Z.getContext(),G=new t.SceneCanvas({width:Z.width/Z.pixelRatio+Math.abs(U),height:Z.height/Z.pixelRatio+Math.abs(W),pixelRatio:Z.pixelRatio});return A.imageSmoothingEnabled===!1&&(V._context.imageSmoothingEnabled=!1),V.save(),(U||W)&&V.translate(-1*U,-1*W),this.drawScene(Z,void 0,G),V.restore(),Z}toCanvas(A){return this._toKonvaCanvas(A)._canvas}toDataURL(A){A=A||{};const N=A.mimeType||null,F=A.quality||null,U=this._toKonvaCanvas(A).toDataURL(N,F);return A.callback&&A.callback(U),U}toImage(A){return new Promise((N,F)=>{try{const U=A==null?void 0:A.callback;U&&delete A.callback,e.Util._urlToImage(this.toDataURL(A),function(W){N(W),U==null||U(W)})}catch(U){F(U)}})}toBlob(A){return new Promise((N,F)=>{try{const U=A==null?void 0:A.callback;U&&delete A.callback,this.toCanvas(A).toBlob(W=>{N(W),U==null||U(W)},A==null?void 0:A.mimeType,A==null?void 0:A.quality)}catch(U){F(U)}})}setSize(A){return this.width(A.width),this.height(A.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():n.Konva.dragDistance}_off(A,N,F){let U=this.eventListeners[A],W,$,Z;for(W=0;W<U.length;W++)if($=U[W].name,Z=U[W].handler,($!=="konva"||N==="konva")&&(!N||$===N)&&(!F||F===Z)){if(U.splice(W,1),U.length===0){delete this.eventListeners[A];break}W--}}_fireChangeEvent(A,N,F){this._fire(A+p,{oldVal:N,newVal:F})}addName(A){if(!this.hasName(A)){const N=this.name(),F=N?N+" "+A:A;this.name(F)}return this}hasName(A){if(!A)return!1;const N=this.name();return N?(N||"").split(/\s/g).indexOf(A)!==-1:!1}removeName(A){const N=(this.name()||"").split(/\s/g),F=N.indexOf(A);return F!==-1&&(N.splice(F,1),this.name(N.join(" "))),this}setAttr(A,N){const F=this[m+e.Util._capitalize(A)];return e.Util._isFunction(F)?F.call(this,N):this._setAttr(A,N),this}_requestDraw(){if(n.Konva.autoDrawEnabled){const A=this.getLayer()||this.getStage();A==null||A.batchDraw()}}_setAttr(A,N){const F=this.attrs[A];F===N&&!e.Util.isObject(N)||(N==null?delete this.attrs[A]:this.attrs[A]=N,this._shouldFireChangeEvents&&this._fireChangeEvent(A,F,N),this._requestDraw())}_setComponentAttr(A,N,F){let U;F!==void 0&&(U=this.attrs[A],U||(this.attrs[A]=this.getAttr(A)),this.attrs[A][N]=F,this._fireChangeEvent(A,U,F))}_fireAndBubble(A,N,F){if(N&&this.nodeType===g&&(N.target=this),!((A===E||A===S)&&(F&&(this===F||this.isAncestorOf&&this.isAncestorOf(F))||this.nodeType==="Stage"&&!F))){this._fire(A,N);const W=(A===E||A===S)&&F&&F.isAncestorOf&&F.isAncestorOf(this)&&!F.isAncestorOf(this.parent);(N&&!N.cancelBubble||!N)&&this.parent&&this.parent.isListening()&&!W&&(F&&F.parent?this._fireAndBubble.call(this.parent,A,N,F):this._fireAndBubble.call(this.parent,A,N))}}_getProtoListeners(A){var N,F,U;const W=(N=this._cache.get(l))!==null&&N!==void 0?N:{};let $=W==null?void 0:W[A];if($===void 0){$=[];let Z=Object.getPrototypeOf(this);for(;Z;){const V=(U=(F=Z.eventListeners)===null||F===void 0?void 0:F[A])!==null&&U!==void 0?U:[];$.push(...V),Z=Object.getPrototypeOf(Z)}W[A]=$,this._cache.set(l,W)}return $}_fire(A,N){N=N||{},N.currentTarget=this,N.type=A;const F=this._getProtoListeners(A);if(F)for(var U=0;U<F.length;U++)F[U].handler.call(this,N);const W=this.eventListeners[A];if(W)for(var U=0;U<W.length;U++)W[U].handler.call(this,N)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(A){const N=A?A.pointerId:void 0,F=this.getStage(),U=this.getAbsolutePosition();if(!F)return;const W=F._getPointerById(N)||F._changedPointerPositions[0]||U;a.DD._dragElements.set(this._id,{node:this,startPointerPos:W,offset:{x:W.x-U.x,y:W.y-U.y},dragStatus:"ready",pointerId:N})}startDrag(A,N=!0){a.DD._dragElements.has(this._id)||this._createDragElement(A);const F=a.DD._dragElements.get(this._id);F.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:A&&A.evt},N)}_setDragPosition(A,N){const F=this.getStage()._getPointerById(N.pointerId);if(!F)return;let U={x:F.x-N.offset.x,y:F.y-N.offset.y};const W=this.dragBoundFunc();if(W!==void 0){const $=W.call(this,U,A);$?U=$:e.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==U.x||this._lastPos.y!==U.y)&&(this.setAbsolutePosition(U),this._requestDraw()),this._lastPos=U}stopDrag(A){const N=a.DD._dragElements.get(this._id);N&&(N.dragStatus="stopped"),a.DD._endDragBefore(A),a.DD._endDragAfter(A)}setDraggable(A){this._setAttr("draggable",A),this._dragChange()}isDragging(){const A=a.DD._dragElements.get(this._id);return A?A.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(A){if(!(!(A.evt.button!==void 0)||n.Konva.dragButtons.indexOf(A.evt.button)>=0)||this.isDragging())return;let U=!1;a.DD._dragElements.forEach(W=>{this.isAncestorOf(W.node)&&(U=!0)}),U||this._createDragElement(A)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const N=a.DD._dragElements.get(this._id),F=N&&N.dragStatus==="dragging",U=N&&N.dragStatus==="ready";F?this.stopDrag():U&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(A={x:0,y:0}){const N=this.getStage();if(!N)return!1;const F={x:-A.x,y:-A.y,width:N.width()+2*A.x,height:N.height()+2*A.y};return e.Util.haveIntersection(F,this.getClientRect())}static create(A,N){return e.Util._isString(A)&&(A=JSON.parse(A)),this._createNode(A,N)}static _createNode(A,N){let F=C.prototype.getClassName.call(A),U=A.children,W,$,Z;N&&(A.attrs.container=N),n.Konva[F]||(e.Util.warn('Can not find a node with class name "'+F+'". Fallback to "Shape".'),F="Shape");const V=n.Konva[F];if(W=new V(A.attrs),U)for($=U.length,Z=0;Z<$;Z++)W.add(C._createNode(U[Z]));return W}}Zh.Node=C,C.prototype.nodeType="Node",C.prototype._attrsAffectingSize=[],C.prototype.eventListeners={},C.prototype.on.call(C.prototype,M,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(O),this._clearSelfAndDescendantCache(u)}),C.prototype.on.call(C.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(T)}),C.prototype.on.call(C.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(_)}),C.prototype.on.call(C.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(o)});const x=r.Factory.addGetterSetter;return x(C,"zIndex"),x(C,"absolutePosition"),x(C,"position"),x(C,"x",0,(0,i.getNumberValidator)()),x(C,"y",0,(0,i.getNumberValidator)()),x(C,"globalCompositeOperation","source-over",(0,i.getStringValidator)()),x(C,"opacity",1,(0,i.getNumberValidator)()),x(C,"name","",(0,i.getStringValidator)()),x(C,"id","",(0,i.getStringValidator)()),x(C,"rotation",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"scale",["x","y"]),x(C,"scaleX",1,(0,i.getNumberValidator)()),x(C,"scaleY",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"skew",["x","y"]),x(C,"skewX",0,(0,i.getNumberValidator)()),x(C,"skewY",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"offset",["x","y"]),x(C,"offsetX",0,(0,i.getNumberValidator)()),x(C,"offsetY",0,(0,i.getNumberValidator)()),x(C,"dragDistance",void 0,(0,i.getNumberValidator)()),x(C,"width",0,(0,i.getNumberValidator)()),x(C,"height",0,(0,i.getNumberValidator)()),x(C,"listening",!0,(0,i.getBooleanValidator)()),x(C,"preventDefault",!0,(0,i.getBooleanValidator)()),x(C,"filters",void 0,function(L){return this._filterUpToDate=!1,L}),x(C,"visible",!0,(0,i.getBooleanValidator)()),x(C,"transformsEnabled","all",(0,i.getStringValidator)()),x(C,"size"),x(C,"dragBoundFunc"),x(C,"draggable",!1,(0,i.getBooleanValidator)()),r.Factory.backCompat(C,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),Zh}var Qh={},$y;function e0(){if($y)return Qh;$y=1,Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.Container=void 0;const e=Hr(),r=Ji(),t=Wr();let n=class extends r.Node{constructor(){super(...arguments),this.children=[]}getChildren(i){if(!i)return this.children||[];const o=this.children||[],l=[];return o.forEach(function(u){i(u)&&l.push(u)}),l}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.destroy()}),this.children=[],this._requestDraw(),this}add(...i){if(i.length===0)return this;if(i.length>1){for(let l=0;l<i.length;l++)this.add(i[l]);return this}const o=i[0];return o.getParent()?(o.moveTo(this),this):(this._validateAdd(o),o.index=this.getChildren().length,o.parent=this,o._clearCaches(),this.getChildren().push(o),this._fire("add",{child:o}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(i){return this._generalFind(i,!1)}findOne(i){const o=this._generalFind(i,!0);return o.length>0?o[0]:void 0}_generalFind(i,o){const l=[];return this._descendants(u=>{const c=u._isMatch(i);return c&&l.push(u),!!(c&&o)}),l}_descendants(i){let o=!1;const l=this.getChildren();for(const u of l){if(o=i(u),o)return!0;if(u.hasChildren()&&(o=u._descendants(i),o))return!0}return!1}toObject(){const i=r.Node.prototype.toObject.call(this);return i.children=[],this.getChildren().forEach(o=>{i.children.push(o.toObject())}),i}isAncestorOf(i){let o=i.getParent();for(;o;){if(o._id===this._id)return!0;o=o.getParent()}return!1}clone(i){const o=r.Node.prototype.clone.call(this,i);return this.getChildren().forEach(function(l){o.add(l.clone())}),o}getAllIntersections(i){const o=[];return this.find("Shape").forEach(l=>{l.isVisible()&&l.intersects(i)&&o.push(l)}),o}_clearSelfAndDescendantCache(i){var o;super._clearSelfAndDescendantCache(i),!this.isCached()&&((o=this.children)===null||o===void 0||o.forEach(function(l){l._clearSelfAndDescendantCache(i)}))}_setChildrenIndices(){var i;(i=this.children)===null||i===void 0||i.forEach(function(o,l){o.index=l}),this._requestDraw()}drawScene(i,o,l){const u=this.getLayer(),c=i||u&&u.getCanvas(),h=c&&c.getContext(),p=this._getCanvasCache(),w=p&&p.scene,d=c&&c.isCache;if(!this.isVisible()&&!d)return this;if(w){h.save();const _=this.getAbsoluteTransform(o).getMatrix();h.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedSceneCanvas(h),h.restore()}else this._drawChildren("drawScene",c,o,l);return this}drawHit(i,o){if(!this.shouldDrawHit(o))return this;const l=this.getLayer(),u=i||l&&l.hitCanvas,c=u&&u.getContext(),h=this._getCanvasCache();if(h&&h.hit){c.save();const w=this.getAbsoluteTransform(o).getMatrix();c.transform(w[0],w[1],w[2],w[3],w[4],w[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",u,o);return this}_drawChildren(i,o,l,u){var c;const h=o&&o.getContext(),p=this.clipWidth(),w=this.clipHeight(),d=this.clipFunc(),_=typeof p=="number"&&typeof w=="number"||d,E=l===this;if(_){h.save();const m=this.getAbsoluteTransform(l);let g=m.getMatrix();h.transform(g[0],g[1],g[2],g[3],g[4],g[5]),h.beginPath();let v;if(d)v=d.call(this,h,this);else{const b=this.clipX(),O=this.clipY();h.rect(b||0,O||0,p,w)}h.clip.apply(h,v),g=m.copy().invert().getMatrix(),h.transform(g[0],g[1],g[2],g[3],g[4],g[5])}const S=!E&&this.globalCompositeOperation()!=="source-over"&&i==="drawScene";S&&(h.save(),h._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(m){m[i](o,l,u)}),S&&h.restore(),_&&h.restore()}getClientRect(i={}){var o;const l=i.skipTransform,u=i.relativeTo;let c,h,p,w,d={x:1/0,y:1/0,width:0,height:0};const _=this;(o=this.children)===null||o===void 0||o.forEach(function(m){if(!m.visible())return;const g=m.getClientRect({relativeTo:_,skipShadow:i.skipShadow,skipStroke:i.skipStroke});g.width===0&&g.height===0||(c===void 0?(c=g.x,h=g.y,p=g.x+g.width,w=g.y+g.height):(c=Math.min(c,g.x),h=Math.min(h,g.y),p=Math.max(p,g.x+g.width),w=Math.max(w,g.y+g.height)))});const E=this.find("Shape");let S=!1;for(let m=0;m<E.length;m++)if(E[m]._isVisible(this)){S=!0;break}return S&&c!==void 0?d={x:c,y:h,width:p-c,height:w-h}:d={x:0,y:0,width:0,height:0},l?d:this._transformedRect(d,u)}};return Qh.Container=n,e.Factory.addComponentsGetterSetter(n,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(n,"clipX",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipY",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipWidth",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipHeight",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipFunc"),Qh}var rg={},Fc={},Yy;function w6(){if(Yy)return Fc;Yy=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.getCapturedShape=n,Fc.createEvent=a,Fc.hasPointerCapture=i,Fc.setPointerCapture=o,Fc.releaseCapture=l;const e=Mr(),r=new Map,t=e.Konva._global.PointerEvent!==void 0;function n(u){return r.get(u)}function a(u){return{evt:u,pointerId:u.pointerId}}function i(u,c){return r.get(u)===c}function o(u,c){l(u),c.getStage()&&(r.set(u,c),t&&c._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function l(u,c){const h=r.get(u);if(!h)return;const p=h.getStage();p&&p.content,r.delete(u),t&&h._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return Fc}var Xy;function RS(){return Xy||(Xy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const r=Li(),t=Hr(),n=e0(),a=Mr(),i=J1(),o=om(),l=Mr(),u=w6(),c="Stage",h="string",p="px",w="mouseout",d="mouseleave",_="mouseover",E="mouseenter",S="mousemove",m="mousedown",g="mouseup",v="pointermove",b="pointerdown",O="pointerup",I="pointercancel",T="lostpointercapture",M="pointerout",j="pointerleave",C="pointerover",x="pointerenter",L="contextmenu",A="touchstart",N="touchend",F="touchmove",U="touchcancel",W="wheel",$=5,Z=[[E,"_pointerenter"],[m,"_pointerdown"],[S,"_pointermove"],[g,"_pointerup"],[d,"_pointerleave"],[A,"_pointerdown"],[F,"_pointermove"],[N,"_pointerup"],[U,"_pointercancel"],[_,"_pointerover"],[W,"_wheel"],[L,"_contextmenu"],[b,"_pointerdown"],[v,"_pointermove"],[O,"_pointerup"],[I,"_pointercancel"],[T,"_lostpointercapture"]],V={mouse:{[M]:w,[j]:d,[C]:_,[x]:E,[v]:S,[b]:m,[O]:g,[I]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[M]:"touchout",[j]:"touchleave",[C]:"touchover",[x]:"touchenter",[v]:F,[b]:A,[O]:N,[I]:U,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[M]:M,[j]:j,[C]:C,[x]:x,[v]:v,[b]:b,[O]:O,[I]:I,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},G=Q=>Q.indexOf("pointer")>=0?"pointer":Q.indexOf("touch")>=0?"touch":"mouse",z=Q=>{const ee=G(Q);if(ee==="pointer")return a.Konva.pointerEventsEnabled&&V.pointer;if(ee==="touch")return V.touch;if(ee==="mouse")return V.mouse};function D(Q={}){return(Q.clipFunc||Q.clipWidth||Q.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Q}const K="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class ne extends n.Container{constructor(ee){super(D(ee)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{D(this.attrs)}),this._checkVisibility()}_validateAdd(ee){const ae=ee.getType()==="Layer",se=ee.getType()==="FastLayer";ae||se||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const ee=this.visible()?"":"none";this.content.style.display=ee}setContainer(ee){if(typeof ee===h){if(ee.charAt(0)==="."){const se=ee.slice(1);ee=document.getElementsByClassName(se)[0]}else{var ae;ee.charAt(0)!=="#"?ae=ee:ae=ee.slice(1),ee=document.getElementById(ae)}if(!ee)throw"Can not find container in document with id "+ae}return this._setAttr("container",ee),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),ee.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const ee=this.children,ae=ee.length;for(let se=0;se<ae;se++)ee[se].clear();return this}clone(ee){return ee||(ee={}),ee.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,ee)}destroy(){super.destroy();const ee=this.content;ee&&r.Util._isInDocument(ee)&&this.container().removeChild(ee);const ae=e.stages.indexOf(this);return ae>-1&&e.stages.splice(ae,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const ee=this._pointerPositions[0]||this._changedPointerPositions[0];return ee?{x:ee.x,y:ee.y}:(r.Util.warn(K),null)}_getPointerById(ee){return this._pointerPositions.find(ae=>ae.id===ee)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(ee){ee=ee||{},ee.x=ee.x||0,ee.y=ee.y||0,ee.width=ee.width||this.width(),ee.height=ee.height||this.height();const ae=new i.SceneCanvas({width:ee.width,height:ee.height,pixelRatio:ee.pixelRatio||1}),se=ae.getContext()._context,ce=this.children;return(ee.x||ee.y)&&se.translate(-1*ee.x,-1*ee.y),ce.forEach(function(me){if(!me.isVisible())return;const Se=me._toKonvaCanvas(ee);se.drawImage(Se._canvas,ee.x,ee.y,Se.getWidth()/Se.getPixelRatio(),Se.getHeight()/Se.getPixelRatio())}),ae}getIntersection(ee){if(!ee)return null;const ae=this.children,se=ae.length,ce=se-1;for(let me=ce;me>=0;me--){const Se=ae[me].getIntersection(ee);if(Se)return Se}return null}_resizeDOM(){const ee=this.width(),ae=this.height();this.content&&(this.content.style.width=ee+p,this.content.style.height=ae+p),this.bufferCanvas.setSize(ee,ae),this.bufferHitCanvas.setSize(ee,ae),this.children.forEach(se=>{se.setSize({width:ee,height:ae}),se.draw()})}add(ee,...ae){if(arguments.length>1){for(let ce=0;ce<arguments.length;ce++)this.add(arguments[ce]);return this}super.add(ee);const se=this.children.length;return se>$&&r.Util.warn("The stage has "+se+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),ee.setSize({width:this.width(),height:this.height()}),ee.draw(),a.Konva.isBrowser&&this.content.appendChild(ee.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(ee){return u.hasPointerCapture(ee,this)}setPointerCapture(ee){u.setPointerCapture(ee,this)}releaseCapture(ee){u.releaseCapture(ee,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&Z.forEach(([ee,ae])=>{this.content.addEventListener(ee,se=>{this[ae](se)},{passive:!1})})}_pointerenter(ee){this.setPointersPositions(ee);const ae=z(ee.type);ae&&this._fire(ae.pointerenter,{evt:ee,target:this,currentTarget:this})}_pointerover(ee){this.setPointersPositions(ee);const ae=z(ee.type);ae&&this._fire(ae.pointerover,{evt:ee,target:this,currentTarget:this})}_getTargetShape(ee){let ae=this[ee+"targetShape"];return ae&&!ae.getStage()&&(ae=null),ae}_pointerleave(ee){const ae=z(ee.type),se=G(ee.type);if(!ae)return;this.setPointersPositions(ee);const ce=this._getTargetShape(se),me=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;ce&&me?(ce._fireAndBubble(ae.pointerout,{evt:ee}),ce._fireAndBubble(ae.pointerleave,{evt:ee}),this._fire(ae.pointerleave,{evt:ee,target:this,currentTarget:this}),this[se+"targetShape"]=null):me&&(this._fire(ae.pointerleave,{evt:ee,target:this,currentTarget:this}),this._fire(ae.pointerout,{evt:ee,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(ee){const ae=z(ee.type),se=G(ee.type);if(!ae)return;this.setPointersPositions(ee);let ce=!1;this._changedPointerPositions.forEach(me=>{const Se=this.getIntersection(me);if(o.DD.justDragged=!1,a.Konva["_"+se+"ListenClick"]=!0,!Se||!Se.isListening()){this[se+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&Se.setPointerCapture(me.id),this[se+"ClickStartShape"]=Se,Se._fireAndBubble(ae.pointerdown,{evt:ee,pointerId:me.id}),ce=!0;const Oe=ee.type.indexOf("touch")>=0;Se.preventDefault()&&ee.cancelable&&Oe&&ee.preventDefault()}),ce||this._fire(ae.pointerdown,{evt:ee,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(ee){const ae=z(ee.type),se=G(ee.type);if(!ae||(a.Konva.isDragging()&&o.DD.node.preventDefault()&&ee.cancelable&&ee.preventDefault(),this.setPointersPositions(ee),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const me={};let Se=!1;const Oe=this._getTargetShape(se);this._changedPointerPositions.forEach(Ne=>{const xe=u.getCapturedShape(Ne.id)||this.getIntersection(Ne),ve=Ne.id,Xe={evt:ee,pointerId:ve},be=Oe!==xe;if(be&&Oe&&(Oe._fireAndBubble(ae.pointerout,{...Xe},xe),Oe._fireAndBubble(ae.pointerleave,{...Xe},xe)),xe){if(me[xe._id])return;me[xe._id]=!0}xe&&xe.isListening()?(Se=!0,be&&(xe._fireAndBubble(ae.pointerover,{...Xe},Oe),xe._fireAndBubble(ae.pointerenter,{...Xe},Oe),this[se+"targetShape"]=xe),xe._fireAndBubble(ae.pointermove,{...Xe})):Oe&&(this._fire(ae.pointerover,{evt:ee,target:this,currentTarget:this,pointerId:ve}),this[se+"targetShape"]=null)}),Se||this._fire(ae.pointermove,{evt:ee,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(ee){const ae=z(ee.type),se=G(ee.type);if(!ae)return;this.setPointersPositions(ee);const ce=this[se+"ClickStartShape"],me=this[se+"ClickEndShape"],Se={};let Oe=!1;this._changedPointerPositions.forEach(Ne=>{const xe=u.getCapturedShape(Ne.id)||this.getIntersection(Ne);if(xe){if(xe.releaseCapture(Ne.id),Se[xe._id])return;Se[xe._id]=!0}const ve=Ne.id,Xe={evt:ee,pointerId:ve};let be=!1;a.Konva["_"+se+"InDblClickWindow"]?(be=!0,clearTimeout(this[se+"DblTimeout"])):o.DD.justDragged||(a.Konva["_"+se+"InDblClickWindow"]=!0,clearTimeout(this[se+"DblTimeout"])),this[se+"DblTimeout"]=setTimeout(function(){a.Konva["_"+se+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),xe&&xe.isListening()?(Oe=!0,this[se+"ClickEndShape"]=xe,xe._fireAndBubble(ae.pointerup,{...Xe}),a.Konva["_"+se+"ListenClick"]&&ce&&ce===xe&&(xe._fireAndBubble(ae.pointerclick,{...Xe}),be&&me&&me===xe&&xe._fireAndBubble(ae.pointerdblclick,{...Xe}))):(this[se+"ClickEndShape"]=null,a.Konva["_"+se+"ListenClick"]&&this._fire(ae.pointerclick,{evt:ee,target:this,currentTarget:this,pointerId:ve}),be&&this._fire(ae.pointerdblclick,{evt:ee,target:this,currentTarget:this,pointerId:ve}))}),Oe||this._fire(ae.pointerup,{evt:ee,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+se+"ListenClick"]=!1,ee.cancelable&&se!=="touch"&&se!=="pointer"&&ee.preventDefault()}_contextmenu(ee){this.setPointersPositions(ee);const ae=this.getIntersection(this.getPointerPosition());ae&&ae.isListening()?ae._fireAndBubble(L,{evt:ee}):this._fire(L,{evt:ee,target:this,currentTarget:this})}_wheel(ee){this.setPointersPositions(ee);const ae=this.getIntersection(this.getPointerPosition());ae&&ae.isListening()?ae._fireAndBubble(W,{evt:ee}):this._fire(W,{evt:ee,target:this,currentTarget:this})}_pointercancel(ee){this.setPointersPositions(ee);const ae=u.getCapturedShape(ee.pointerId)||this.getIntersection(this.getPointerPosition());ae&&ae._fireAndBubble(O,u.createEvent(ee)),u.releaseCapture(ee.pointerId)}_lostpointercapture(ee){u.releaseCapture(ee.pointerId)}setPointersPositions(ee){const ae=this._getContentPosition();let se=null,ce=null;ee=ee||window.event,ee.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(ee.touches,me=>{this._pointerPositions.push({id:me.identifier,x:(me.clientX-ae.left)/ae.scaleX,y:(me.clientY-ae.top)/ae.scaleY})}),Array.prototype.forEach.call(ee.changedTouches||ee.touches,me=>{this._changedPointerPositions.push({id:me.identifier,x:(me.clientX-ae.left)/ae.scaleX,y:(me.clientY-ae.top)/ae.scaleY})})):(se=(ee.clientX-ae.left)/ae.scaleX,ce=(ee.clientY-ae.top)/ae.scaleY,this.pointerPos={x:se,y:ce},this._pointerPositions=[{x:se,y:ce,id:r.Util._getFirstPointerId(ee)}],this._changedPointerPositions=[{x:se,y:ce,id:r.Util._getFirstPointerId(ee)}])}_setPointerPosition(ee){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(ee)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const ee=this.content.getBoundingClientRect();return{top:ee.top,left:ee.left,scaleX:ee.width/this.content.clientWidth||1,scaleY:ee.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!a.Konva.isBrowser)return;const ee=this.container();if(!ee)throw"Stage has no container. A container is required.";ee.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),ee.appendChild(this.content),this._resizeDOM()}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(ee){ee.batchDraw()}),this}}e.Stage=ne,ne.prototype.nodeType=c,(0,l._registerNode)(ne),t.Factory.addGetterSetter(ne,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(Q=>{Q.batchDraw()})})}(rg)),rg}var Jh={},ng={},Ky;function Ma(){return Ky||(Ky=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const r=Mr(),t=Li(),n=Hr(),a=Ji(),i=Wr(),o=Mr(),l=w6(),u="hasShadow",c="shadowRGBA",h="patternImage",p="linearGradient",w="radialGradient";let d;function _(){return d||(d=t.Util.createCanvasElement().getContext("2d"),d)}e.shapes={};function E(j){const C=this.attrs.fillRule;C?j.fill(C):j.fill()}function S(j){j.stroke()}function m(j){const C=this.attrs.fillRule;C?j.fill(C):j.fill()}function g(j){j.stroke()}function v(){this._clearCache(u)}function b(){this._clearCache(c)}function O(){this._clearCache(h)}function I(){this._clearCache(p)}function T(){this._clearCache(w)}class M extends a.Node{constructor(C){super(C);let x;for(;x=t.Util.getRandomColor(),!(x&&!(x in e.shapes)););this.colorKey=x,e.shapes[x]=this}getContext(){return t.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return t.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const x=_().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(x&&x.setTransform){const L=new t.Transform;L.translate(this.fillPatternX(),this.fillPatternY()),L.rotate(r.Konva.getAngle(this.fillPatternRotation())),L.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),L.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const A=L.getMatrix(),N=typeof DOMMatrix>"u"?{a:A[0],b:A[1],c:A[2],d:A[3],e:A[4],f:A[5]}:new DOMMatrix(A);x.setTransform(N)}return x}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){const C=this.fillLinearGradientColorStops();if(C){const x=_(),L=this.fillLinearGradientStartPoint(),A=this.fillLinearGradientEndPoint(),N=x.createLinearGradient(L.x,L.y,A.x,A.y);for(let F=0;F<C.length;F+=2)N.addColorStop(C[F],C[F+1]);return N}}_getRadialGradient(){return this._getCache(w,this.__getRadialGradient)}__getRadialGradient(){const C=this.fillRadialGradientColorStops();if(C){const x=_(),L=this.fillRadialGradientStartPoint(),A=this.fillRadialGradientEndPoint(),N=x.createRadialGradient(L.x,L.y,this.fillRadialGradientStartRadius(),A.x,A.y,this.fillRadialGradientEndRadius());for(let F=0;F<C.length;F+=2)N.addColorStop(C[F],C[F+1]);return N}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const C=t.Util.colorToRGBA(this.shadowColor());if(C)return"rgba("+C.r+","+C.g+","+C.b+","+C.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const C=this.hitStrokeWidth();return C==="auto"?this.hasStroke():this.strokeEnabled()&&!!C}intersects(C){const x=this.getStage();if(!x)return!1;const L=x.bufferHitCanvas;return L.getContext().clear(),this.drawHit(L,void 0,!0),L.context.getImageData(Math.round(C.x),Math.round(C.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(C){var x;if(!((x=this.attrs.perfectDrawEnabled)!==null&&x!==void 0?x:!0))return!1;const A=C||this.hasFill(),N=this.hasStroke(),F=this.getAbsoluteOpacity()!==1;if(A&&N&&F)return!0;const U=this.hasShadow(),W=this.shadowForStrokeEnabled();return!!(A&&N&&U&&W)}setStrokeHitEnabled(C){t.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),C?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const C=this.size();return{x:this._centroid?-C.width/2:0,y:this._centroid?-C.height/2:0,width:C.width,height:C.height}}getClientRect(C={}){let x=!1,L=this.getParent();for(;L;){if(L.isCached()){x=!0;break}L=L.getParent()}const A=C.skipTransform,N=C.relativeTo||x&&this.getStage()||void 0,F=this.getSelfRect(),W=!C.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,$=F.width+W,Z=F.height+W,V=!C.skipShadow&&this.hasShadow(),G=V?this.shadowOffsetX():0,z=V?this.shadowOffsetY():0,D=$+Math.abs(G),K=Z+Math.abs(z),ne=V&&this.shadowBlur()||0,Q=D+ne*2,ee=K+ne*2,ae={width:Q,height:ee,x:-(W/2+ne)+Math.min(G,0)+F.x,y:-(W/2+ne)+Math.min(z,0)+F.y};return A?ae:this._transformedRect(ae,N)}drawScene(C,x,L){const A=this.getLayer();let N=C||A.getCanvas(),F=N.getContext(),U=this._getCanvasCache(),W=this.getSceneFunc(),$=this.hasShadow(),Z,V;const G=N.isCache,z=x===this;if(!this.isVisible()&&!z)return this;if(U){F.save();const K=this.getAbsoluteTransform(x).getMatrix();return F.transform(K[0],K[1],K[2],K[3],K[4],K[5]),this._drawCachedSceneCanvas(F),F.restore(),this}if(!W)return this;if(F.save(),this._useBufferCanvas()&&!G){Z=this.getStage();const K=L||Z.bufferCanvas;V=K.getContext(),V.clear(),V.save(),V._applyLineJoin(this);var D=this.getAbsoluteTransform(x).getMatrix();V.transform(D[0],D[1],D[2],D[3],D[4],D[5]),W.call(this,V,this),V.restore();const ne=K.pixelRatio;$&&F._applyShadow(this),F._applyOpacity(this),F._applyGlobalCompositeOperation(this),F.drawImage(K._canvas,0,0,K.width/ne,K.height/ne)}else{if(F._applyLineJoin(this),!z){var D=this.getAbsoluteTransform(x).getMatrix();F.transform(D[0],D[1],D[2],D[3],D[4],D[5]),F._applyOpacity(this),F._applyGlobalCompositeOperation(this)}$&&F._applyShadow(this),W.call(this,F,this)}return F.restore(),this}drawHit(C,x,L=!1){if(!this.shouldDrawHit(x,L))return this;const A=this.getLayer(),N=C||A.hitCanvas,F=N&&N.getContext(),U=this.hitFunc()||this.sceneFunc(),W=this._getCanvasCache(),$=W&&W.hit;if(this.colorKey||t.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),$){F.save();const V=this.getAbsoluteTransform(x).getMatrix();return F.transform(V[0],V[1],V[2],V[3],V[4],V[5]),this._drawCachedHitCanvas(F),F.restore(),this}if(!U)return this;if(F.save(),F._applyLineJoin(this),!(this===x)){const V=this.getAbsoluteTransform(x).getMatrix();F.transform(V[0],V[1],V[2],V[3],V[4],V[5])}return U.call(this,F,this),F.restore(),this}drawHitFromCache(C=0){const x=this._getCanvasCache(),L=this._getCachedSceneCanvas(),A=x.hit,N=A.getContext(),F=A.getWidth(),U=A.getHeight();N.clear(),N.drawImage(L._canvas,0,0,F,U);try{const W=N.getImageData(0,0,F,U),$=W.data,Z=$.length,V=t.Util._hexToRgb(this.colorKey);for(let G=0;G<Z;G+=4)$[G+3]>C?($[G]=V.r,$[G+1]=V.g,$[G+2]=V.b,$[G+3]=255):$[G+3]=0;N.putImageData(W,0,0)}catch(W){t.Util.error("Unable to draw hit graph from cached scene canvas. "+W.message)}return this}hasPointerCapture(C){return l.hasPointerCapture(C,this)}setPointerCapture(C){l.setPointerCapture(C,this)}releaseCapture(C){l.releaseCapture(C,this)}}e.Shape=M,M.prototype._fillFunc=E,M.prototype._strokeFunc=S,M.prototype._fillFuncHit=m,M.prototype._strokeFuncHit=g,M.prototype._centroid=!1,M.prototype.nodeType="Shape",(0,o._registerNode)(M),M.prototype.eventListeners={},M.prototype.on.call(M.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),M.prototype.on.call(M.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),M.prototype.on.call(M.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O),M.prototype.on.call(M.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I),M.prototype.on.call(M.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",T),n.Factory.addGetterSetter(M,"stroke",void 0,(0,i.getStringOrGradientValidator)()),n.Factory.addGetterSetter(M,"strokeWidth",2,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(M,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(M,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(M,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(M,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(M,"lineJoin"),n.Factory.addGetterSetter(M,"lineCap"),n.Factory.addGetterSetter(M,"sceneFunc"),n.Factory.addGetterSetter(M,"hitFunc"),n.Factory.addGetterSetter(M,"dash"),n.Factory.addGetterSetter(M,"dashOffset",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"shadowColor",void 0,(0,i.getStringValidator)()),n.Factory.addGetterSetter(M,"shadowBlur",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"shadowOpacity",1,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(M,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(M,"shadowOffsetX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"shadowOffsetY",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillPatternImage"),n.Factory.addGetterSetter(M,"fill",void 0,(0,i.getStringOrGradientValidator)()),n.Factory.addGetterSetter(M,"fillPatternX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillPatternY",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(M,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(M,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(M,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(M,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(M,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(M,"fillEnabled",!0),n.Factory.addGetterSetter(M,"strokeEnabled",!0),n.Factory.addGetterSetter(M,"shadowEnabled",!0),n.Factory.addGetterSetter(M,"dashEnabled",!0),n.Factory.addGetterSetter(M,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(M,"fillPriority","color"),n.Factory.addComponentsGetterSetter(M,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(M,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(M,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(M,"fillPatternScaleX",1,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(M,"fillPatternScaleY",1,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(M,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(M,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(M,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(M,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(M,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(M,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(M,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(M,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(M,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(M,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(M,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(M,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(M,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(M,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(M,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(M,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(M,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(M,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(M,"fillPatternRotation",0),n.Factory.addGetterSetter(M,"fillRule",void 0,(0,i.getStringValidator)()),n.Factory.backCompat(M,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(ng)),ng}var Zy;function _6(){if(Zy)return Jh;Zy=1,Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.Layer=void 0;const e=Li(),r=e0(),t=Ji(),n=Hr(),a=J1(),i=Wr(),o=Ma(),l=Mr(),u="#",c="beforeDraw",h="draw",p=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],w=p.length;class d extends r.Container{constructor(E){super(E),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(E){return this.getContext().clear(E),this.getHitCanvas().getContext().clear(E),this}setZIndex(E){super.setZIndex(E);const S=this.getStage();return S&&S.content&&(S.content.removeChild(this.getNativeCanvasElement()),E<S.children.length-1?S.content.insertBefore(this.getNativeCanvasElement(),S.children[E+1].getCanvas()._canvas):S.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const E=this.getStage();return E&&E.content&&(E.content.removeChild(this.getNativeCanvasElement()),E.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const S=this.getStage();return!S||!S.content?!1:(S.content.removeChild(this.getNativeCanvasElement()),this.index<S.children.length-1?S.content.insertBefore(this.getNativeCanvasElement(),S.children[this.index+1].getCanvas()._canvas):S.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const E=this.getStage();if(E){const S=E.children;E.content&&(E.content.removeChild(this.getNativeCanvasElement()),E.content.insertBefore(this.getNativeCanvasElement(),S[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const E=this.getStage();if(E){const S=E.children;E.content&&(E.content.removeChild(this.getNativeCanvasElement()),E.content.insertBefore(this.getNativeCanvasElement(),S[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const E=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),E&&E.parentNode&&e.Util._isInDocument(E)&&E.parentNode.removeChild(E),this}getStage(){return this.parent}setSize({width:E,height:S}){return this.canvas.setSize(E,S),this.hitCanvas.setSize(E,S),this._setSmoothEnabled(),this}_validateAdd(E){const S=E.getType();S!=="Group"&&S!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(E){return E=E||{},E.width=E.width||this.getWidth(),E.height=E.height||this.getHeight(),E.x=E.x!==void 0?E.x:this.x(),E.y=E.y!==void 0?E.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,E)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(E){if(!this.isListening()||!this.isVisible())return null;let S=1,m=!1;for(;;){for(let g=0;g<w;g++){const v=p[g],b=this._getIntersection({x:E.x+v.x*S,y:E.y+v.y*S}),O=b.shape;if(O)return O;if(m=!!b.antialiased,!b.antialiased)break}if(m)S+=1;else return null}}_getIntersection(E){const S=this.hitCanvas.pixelRatio,m=this.hitCanvas.context.getImageData(Math.round(E.x*S),Math.round(E.y*S),1,1).data,g=m[3];if(g===255){const v=e.Util._rgbToHex(m[0],m[1],m[2]),b=o.shapes[u+v];return b?{shape:b}:{antialiased:!0}}else if(g>0)return{antialiased:!0};return{}}drawScene(E,S){const m=this.getLayer(),g=E||m&&m.getCanvas();return this._fire(c,{node:this}),this.clearBeforeDraw()&&g.getContext().clear(),r.Container.prototype.drawScene.call(this,g,S),this._fire(h,{node:this}),this}drawHit(E,S){const m=this.getLayer(),g=E||m&&m.hitCanvas;return m&&m.clearBeforeDraw()&&m.getHitCanvas().getContext().clear(),r.Container.prototype.drawHit.call(this,g,S),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(E){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(E)}getHitGraphEnabled(E){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const E=this.parent;!!this.hitCanvas._canvas.parentNode?E.content.removeChild(this.hitCanvas._canvas):E.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}return Jh.Layer=d,d.prototype.nodeType="Layer",(0,l._registerNode)(d),n.Factory.addGetterSetter(d,"imageSmoothingEnabled",!0),n.Factory.addGetterSetter(d,"clearBeforeDraw",!0),n.Factory.addGetterSetter(d,"hitGraphEnabled",!0,(0,i.getBooleanValidator)()),Jh}var ed={},Qy;function MS(){if(Qy)return ed;Qy=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.FastLayer=void 0;const e=Li(),r=_6(),t=Mr();class n extends r.Layer{constructor(i){super(i),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}return ed.FastLayer=n,n.prototype.nodeType="FastLayer",(0,t._registerNode)(n),ed}var td={},Jy;function sm(){if(Jy)return td;Jy=1,Object.defineProperty(td,"__esModule",{value:!0}),td.Group=void 0;const e=Li(),r=e0(),t=Mr();class n extends r.Container{_validateAdd(i){const o=i.getType();o!=="Group"&&o!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}}return td.Group=n,n.prototype.nodeType="Group",(0,t._registerNode)(n),td}var rd={},e5;function lm(){if(e5)return rd;e5=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.Animation=void 0;const e=Mr(),r=Li(),t=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let n=class lh{constructor(i,o){this.id=lh.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t(),frameRate:0},this.func=i,this.setLayers(o)}setLayers(i){let o=[];return i&&(o=Array.isArray(i)?i:[i]),this.layers=o,this}getLayers(){return this.layers}addLayer(i){const o=this.layers,l=o.length;for(let u=0;u<l;u++)if(o[u]._id===i._id)return!1;return this.layers.push(i),!0}isRunning(){const o=lh.animations,l=o.length;for(let u=0;u<l;u++)if(o[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=t(),lh._addAnimation(this),this}stop(){return lh._removeAnimation(this),this}_updateFrameObject(i){this.frame.timeDiff=i-this.frame.lastTime,this.frame.lastTime=i,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(i){this.animations.push(i),this._handleAnimation()}static _removeAnimation(i){const o=i.id,l=this.animations,u=l.length;for(let c=0;c<u;c++)if(l[c].id===o){this.animations.splice(c,1);break}}static _runFrames(){const i={},o=this.animations;for(let l=0;l<o.length;l++){const u=o[l],c=u.layers,h=u.func;u._updateFrameObject(t());const p=c.length;let w;if(h?w=h.call(u,u.frame)!==!1:w=!0,!!w)for(let d=0;d<p;d++){const _=c[d];_._id!==void 0&&(i[_._id]=_)}}for(const l in i)i.hasOwnProperty(l)&&i[l].batchDraw()}static _animationLoop(){const i=lh;i.animations.length?(i._runFrames(),r.Util.requestAnimFrame(i._animationLoop)):i.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,r.Util.requestAnimFrame(this._animationLoop))}};return rd.Animation=n,n.animations=[],n.animIdCounter=0,n.animRunning=!1,rd}var ig={},t5;function IS(){return t5||(t5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const r=Li(),t=lm(),n=Ji(),a=Mr(),i={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,l=2,u=3,c=["fill","stroke","shadowColor"];let h=0;class p{constructor(_,E,S,m,g,v,b){this.prop=_,this.propFunc=E,this.begin=m,this._pos=m,this.duration=v,this._change=0,this.prevPos=0,this.yoyo=b,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=S,this._change=g-this.begin,this.pause()}fire(_){const E=this[_];E&&E()}setTime(_){_>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():_<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=_,this.update())}getTime(){return this._time}setPosition(_){this.prevPos=this._pos,this.propFunc(_),this._pos=_}getPosition(_){return _===void 0&&(_=this._time),this.func(_,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=u,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(_){this.pause(),this._time=_,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const _=this.getTimer()-this._startTime;this.state===l?this.setTime(_):this.state===u&&this.setTime(this.duration-_)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class w{constructor(_){const E=this,S=_.node,m=S._id,g=_.easing||e.Easings.Linear,v=!!_.yoyo;let b,O;typeof _.duration>"u"?b=.3:_.duration===0?b=.001:b=_.duration,this.node=S,this._id=h++;const I=S.getLayer()||(S instanceof a.Konva.Stage?S.getLayers():null);I||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new t.Animation(function(){E.tween.onEnterFrame()},I),this.tween=new p(O,function(T){E._tweenFunc(T)},g,0,1,b*1e3,v),this._addListeners(),w.attrs[m]||(w.attrs[m]={}),w.attrs[m][this._id]||(w.attrs[m][this._id]={}),w.tweens[m]||(w.tweens[m]={});for(O in _)i[O]===void 0&&this._addAttr(O,_[O]);this.reset(),this.onFinish=_.onFinish,this.onReset=_.onReset,this.onUpdate=_.onUpdate}_addAttr(_,E){const S=this.node,m=S._id;let g,v,b,O,I;const T=w.tweens[m][_];T&&delete w.attrs[m][T][_];let M=S.getAttr(_);if(r.Util._isArray(E))if(g=[],v=Math.max(E.length,M.length),_==="points"&&E.length!==M.length&&(E.length>M.length?(O=M,M=r.Util._prepareArrayForTween(M,E,S.closed())):(b=E,E=r.Util._prepareArrayForTween(E,M,S.closed()))),_.indexOf("fill")===0)for(let j=0;j<v;j++)if(j%2===0)g.push(E[j]-M[j]);else{const C=r.Util.colorToRGBA(M[j]);I=r.Util.colorToRGBA(E[j]),M[j]=C,g.push({r:I.r-C.r,g:I.g-C.g,b:I.b-C.b,a:I.a-C.a})}else for(let j=0;j<v;j++)g.push(E[j]-M[j]);else c.indexOf(_)!==-1?(M=r.Util.colorToRGBA(M),I=r.Util.colorToRGBA(E),g={r:I.r-M.r,g:I.g-M.g,b:I.b-M.b,a:I.a-M.a}):g=E-M;w.attrs[m][this._id][_]={start:M,diff:g,end:E,trueEnd:b,trueStart:O},w.tweens[m][_]=this._id}_tweenFunc(_){const E=this.node,S=w.attrs[E._id][this._id];let m,g,v,b,O,I,T,M;for(m in S){if(g=S[m],v=g.start,b=g.diff,M=g.end,r.Util._isArray(v))if(O=[],T=Math.max(v.length,M.length),m.indexOf("fill")===0)for(I=0;I<T;I++)I%2===0?O.push((v[I]||0)+b[I]*_):O.push("rgba("+Math.round(v[I].r+b[I].r*_)+","+Math.round(v[I].g+b[I].g*_)+","+Math.round(v[I].b+b[I].b*_)+","+(v[I].a+b[I].a*_)+")");else for(I=0;I<T;I++)O.push((v[I]||0)+b[I]*_);else c.indexOf(m)!==-1?O="rgba("+Math.round(v.r+b.r*_)+","+Math.round(v.g+b.g*_)+","+Math.round(v.b+b.b*_)+","+(v.a+b.a*_)+")":O=v+b*_;E.setAttr(m,O)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const _=this.node,E=w.attrs[_._id][this._id];E.points&&E.points.trueEnd&&_.setAttr("points",E.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const _=this.node,E=w.attrs[_._id][this._id];E.points&&E.points.trueStart&&_.points(E.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(_){return this.tween.seek(_*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const _=this.node._id,E=this._id,S=w.tweens[_];this.pause();for(const m in S)delete w.tweens[_][m];delete w.attrs[_][E]}}e.Tween=w,w.attrs={},w.tweens={},n.Node.prototype.to=function(d){const _=d.onFinish;d.node=this,d.onFinish=function(){this.destroy(),_&&_()},new w(d).play()},e.Easings={BackEaseIn(d,_,E,S){return E*(d/=S)*d*((1.70158+1)*d-1.70158)+_},BackEaseOut(d,_,E,S){return E*((d=d/S-1)*d*((1.70158+1)*d+1.70158)+1)+_},BackEaseInOut(d,_,E,S){let m=1.70158;return(d/=S/2)<1?E/2*(d*d*(((m*=1.525)+1)*d-m))+_:E/2*((d-=2)*d*(((m*=1.525)+1)*d+m)+2)+_},ElasticEaseIn(d,_,E,S,m,g){let v=0;return d===0?_:(d/=S)===1?_+E:(g||(g=S*.3),!m||m<Math.abs(E)?(m=E,v=g/4):v=g/(2*Math.PI)*Math.asin(E/m),-(m*Math.pow(2,10*(d-=1))*Math.sin((d*S-v)*(2*Math.PI)/g))+_)},ElasticEaseOut(d,_,E,S,m,g){let v=0;return d===0?_:(d/=S)===1?_+E:(g||(g=S*.3),!m||m<Math.abs(E)?(m=E,v=g/4):v=g/(2*Math.PI)*Math.asin(E/m),m*Math.pow(2,-10*d)*Math.sin((d*S-v)*(2*Math.PI)/g)+E+_)},ElasticEaseInOut(d,_,E,S,m,g){let v=0;return d===0?_:(d/=S/2)===2?_+E:(g||(g=S*(.3*1.5)),!m||m<Math.abs(E)?(m=E,v=g/4):v=g/(2*Math.PI)*Math.asin(E/m),d<1?-.5*(m*Math.pow(2,10*(d-=1))*Math.sin((d*S-v)*(2*Math.PI)/g))+_:m*Math.pow(2,-10*(d-=1))*Math.sin((d*S-v)*(2*Math.PI)/g)*.5+E+_)},BounceEaseOut(d,_,E,S){return(d/=S)<1/2.75?E*(7.5625*d*d)+_:d<2/2.75?E*(7.5625*(d-=1.5/2.75)*d+.75)+_:d<2.5/2.75?E*(7.5625*(d-=2.25/2.75)*d+.9375)+_:E*(7.5625*(d-=2.625/2.75)*d+.984375)+_},BounceEaseIn(d,_,E,S){return E-e.Easings.BounceEaseOut(S-d,0,E,S)+_},BounceEaseInOut(d,_,E,S){return d<S/2?e.Easings.BounceEaseIn(d*2,0,E,S)*.5+_:e.Easings.BounceEaseOut(d*2-S,0,E,S)*.5+E*.5+_},EaseIn(d,_,E,S){return E*(d/=S)*d+_},EaseOut(d,_,E,S){return-E*(d/=S)*(d-2)+_},EaseInOut(d,_,E,S){return(d/=S/2)<1?E/2*d*d+_:-E/2*(--d*(d-2)-1)+_},StrongEaseIn(d,_,E,S){return E*(d/=S)*d*d*d*d+_},StrongEaseOut(d,_,E,S){return E*((d=d/S-1)*d*d*d*d+1)+_},StrongEaseInOut(d,_,E,S){return(d/=S/2)<1?E/2*d*d*d*d*d+_:E/2*((d-=2)*d*d*d*d+2)+_},Linear(d,_,E,S){return E*d/S+_}}}(ig)),ig}var r5;function S2(){return r5||(r5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=Mr(),t=Li(),n=Ji(),a=e0(),i=RS(),o=_6(),l=MS(),u=sm(),c=om(),h=Ma(),p=lm(),w=IS(),d=b6(),_=J1();e.Konva=t.Util._assign(r.Konva,{Util:t.Util,Transform:t.Transform,Node:n.Node,Container:a.Container,Stage:i.Stage,stages:i.stages,Layer:o.Layer,FastLayer:l.FastLayer,Group:u.Group,DD:c.DD,Shape:h.Shape,shapes:h.shapes,Animation:p.Animation,Tween:w.Tween,Easings:w.Easings,Context:d.Context,Canvas:_.Canvas}),e.default=e.Konva}(Z0)),Z0}var nd={},n5;function jS(){if(n5)return nd;n5=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Arc=void 0;const e=Hr(),r=Ma(),t=Mr(),n=Wr(),a=Mr();class i extends r.Shape{_sceneFunc(l){const u=t.Konva.getAngle(this.angle()),c=this.clockwise();l.beginPath(),l.arc(0,0,this.outerRadius(),0,u,c),l.arc(0,0,this.innerRadius(),u,0,!c),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(l){this.outerRadius(l/2)}setHeight(l){this.outerRadius(l/2)}getSelfRect(){const l=this.innerRadius(),u=this.outerRadius(),c=this.clockwise(),h=t.Konva.getAngle(c?360-this.angle():this.angle()),p=Math.cos(Math.min(h,Math.PI)),w=1,d=Math.sin(Math.min(Math.max(Math.PI,h),3*Math.PI/2)),_=Math.sin(Math.min(h,Math.PI/2)),E=p*(p>0?l:u),S=w*u,m=d*(d>0?l:u),g=_*(_>0?u:l);return{x:E,y:c?-1*g:m,width:S-E,height:g-m}}}return nd.Arc=i,i.prototype._centroid=!0,i.prototype.className="Arc",i.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1,(0,n.getBooleanValidator)()),nd}var id={},ad={},i5;function S6(){if(i5)return ad;i5=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.Line=void 0;const e=Hr(),r=Mr(),t=Ma(),n=Wr();function a(l,u,c,h,p,w,d){const _=Math.sqrt(Math.pow(c-l,2)+Math.pow(h-u,2)),E=Math.sqrt(Math.pow(p-c,2)+Math.pow(w-h,2)),S=d*_/(_+E),m=d*E/(_+E),g=c-S*(p-l),v=h-S*(w-u),b=c+m*(p-l),O=h+m*(w-u);return[g,v,b,O]}function i(l,u){const c=l.length,h=[];for(let p=2;p<c-2;p+=2){const w=a(l[p-2],l[p-1],l[p],l[p+1],l[p+2],l[p+3],u);isNaN(w[0])||(h.push(w[0]),h.push(w[1]),h.push(l[p]),h.push(l[p+1]),h.push(w[2]),h.push(w[3]))}return h}class o extends t.Shape{constructor(u){super(u),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(u){let c=this.points(),h=c.length,p=this.tension(),w=this.closed(),d=this.bezier(),_,E,S;if(h){if(u.beginPath(),u.moveTo(c[0],c[1]),p!==0&&h>4){for(_=this.getTensionPoints(),E=_.length,S=w?0:4,w||u.quadraticCurveTo(_[0],_[1],_[2],_[3]);S<E-2;)u.bezierCurveTo(_[S++],_[S++],_[S++],_[S++],_[S++],_[S++]);w||u.quadraticCurveTo(_[E-2],_[E-1],c[h-2],c[h-1])}else if(d)for(S=2;S<h;)u.bezierCurveTo(c[S++],c[S++],c[S++],c[S++],c[S++],c[S++]);else for(S=2;S<h;S+=2)u.lineTo(c[S],c[S+1]);w?(u.closePath(),u.fillStrokeShape(this)):u.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():i(this.points(),this.tension())}_getTensionPointsClosed(){const u=this.points(),c=u.length,h=this.tension(),p=a(u[c-2],u[c-1],u[0],u[1],u[2],u[3],h),w=a(u[c-4],u[c-3],u[c-2],u[c-1],u[0],u[1],h),d=i(u,h);return[p[2],p[3]].concat(d).concat([w[0],w[1],u[c-2],u[c-1],w[2],w[3],p[0],p[1],u[0],u[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let u=this.points();if(u.length<4)return{x:u[0]||0,y:u[1]||0,width:0,height:0};this.tension()!==0?u=[u[0],u[1],...this._getTensionPoints(),u[u.length-2],u[u.length-1]]:u=this.points();let c=u[0],h=u[0],p=u[1],w=u[1],d,_;for(let E=0;E<u.length/2;E++)d=u[E*2],_=u[E*2+1],c=Math.min(c,d),h=Math.max(h,d),p=Math.min(p,_),w=Math.max(w,_);return{x:c,y:p,width:h-c,height:w-p}}}return ad.Line=o,o.prototype.className="Line",o.prototype._attrsAffectingSize=["points","bezier","tension"],(0,r._registerNode)(o),e.Factory.addGetterSetter(o,"closed",!1),e.Factory.addGetterSetter(o,"bezier",!1),e.Factory.addGetterSetter(o,"tension",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(o,"points",[],(0,n.getNumberArrayValidator)()),ad}var od={},ag={},a5;function FS(){return a5||(a5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const r=(o,l,u)=>{let c,h;const w=u/2;c=0;for(let d=0;d<20;d++)h=w*e.tValues[20][d]+w,c+=e.cValues[20][d]*n(o,l,h);return w*c};e.getCubicArcLength=r;const t=(o,l,u)=>{u===void 0&&(u=1);const c=o[0]-2*o[1]+o[2],h=l[0]-2*l[1]+l[2],p=2*o[1]-2*o[0],w=2*l[1]-2*l[0],d=4*(c*c+h*h),_=4*(c*p+h*w),E=p*p+w*w;if(d===0)return u*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(l[2]-l[0],2));const S=_/(2*d),m=E/d,g=u+S,v=m-S*S,b=g*g+v>0?Math.sqrt(g*g+v):0,O=S*S+v>0?Math.sqrt(S*S+v):0,I=S+Math.sqrt(S*S+v)!==0?v*Math.log(Math.abs((g+b)/(S+O))):0;return Math.sqrt(d)/2*(g*b-S*O+I)};e.getQuadraticArcLength=t;function n(o,l,u){const c=a(1,u,o),h=a(1,u,l),p=c*c+h*h;return Math.sqrt(p)}const a=(o,l,u)=>{const c=u.length-1;let h,p;if(c===0)return 0;if(o===0){p=0;for(let w=0;w<=c;w++)p+=e.binomialCoefficients[c][w]*Math.pow(1-l,c-w)*Math.pow(l,w)*u[w];return p}else{h=new Array(c);for(let w=0;w<c;w++)h[w]=c*(u[w+1]-u[w]);return a(o-1,l,h)}},i=(o,l,u)=>{let c=1,h=o/l,p=(o-u(h))/l,w=0;for(;c>.001;){const d=u(h+p),_=Math.abs(o-d)/l;if(_<c)c=_,h+=p;else{const E=u(h-p),S=Math.abs(o-E)/l;S<c?(c=S,h-=p):p/=2}if(w++,w>500)break}return h};e.t2length=i}(ag)),ag}var o5;function um(){if(o5)return od;o5=1,Object.defineProperty(od,"__esModule",{value:!0}),od.Path=void 0;const e=Hr(),r=Ma(),t=Mr(),n=FS();class a extends r.Shape{constructor(o){super(o),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(o){const l=this.dataArray;o.beginPath();let u=!1;for(let b=0;b<l.length;b++){const O=l[b].command,I=l[b].points;switch(O){case"L":o.lineTo(I[0],I[1]);break;case"M":o.moveTo(I[0],I[1]);break;case"C":o.bezierCurveTo(I[0],I[1],I[2],I[3],I[4],I[5]);break;case"Q":o.quadraticCurveTo(I[0],I[1],I[2],I[3]);break;case"A":var c=I[0],h=I[1],p=I[2],w=I[3],d=I[4],_=I[5],E=I[6],S=I[7],m=p>w?p:w,g=p>w?1:p/w,v=p>w?w/p:1;o.translate(c,h),o.rotate(E),o.scale(g,v),o.arc(0,0,m,d,d+_,1-S),o.scale(1/g,1/v),o.rotate(-E),o.translate(-c,-h);break;case"z":u=!0,o.closePath();break}}!u&&!this.hasFill()?o.strokeShape(this):o.fillStrokeShape(this)}getSelfRect(){let o=[];this.dataArray.forEach(function(d){if(d.command==="A"){const _=d.points[4],E=d.points[5],S=d.points[4]+E;let m=Math.PI/180;if(Math.abs(_-S)<m&&(m=Math.abs(_-S)),E<0)for(let g=_-m;g>S;g-=m){const v=a.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],g,0);o.push(v.x,v.y)}else for(let g=_+m;g<S;g+=m){const v=a.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],g,0);o.push(v.x,v.y)}}else if(d.command==="C")for(let _=0;_<=1;_+=.01){const E=a.getPointOnCubicBezier(_,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);o.push(E.x,E.y)}else o=o.concat(d.points)});let l=o[0],u=o[0],c=o[1],h=o[1],p,w;for(let d=0;d<o.length/2;d++)p=o[d*2],w=o[d*2+1],isNaN(p)||(l=Math.min(l,p),u=Math.max(u,p)),isNaN(w)||(c=Math.min(c,w),h=Math.max(h,w));return{x:l,y:c,width:u-l,height:h-c}}getLength(){return this.pathLength}getPointAtLength(o){return a.getPointAtLengthOfDataArray(o,this.dataArray)}static getLineLength(o,l,u,c){return Math.sqrt((u-o)*(u-o)+(c-l)*(c-l))}static getPathLength(o){let l=0;for(let u=0;u<o.length;++u)l+=o[u].pathLength;return l}static getPointAtLengthOfDataArray(o,l){let u,c=0,h=l.length;if(!h)return null;for(;c<h&&o>l[c].pathLength;)o-=l[c].pathLength,++c;if(c===h)return u=l[c-1].points.slice(-2),{x:u[0],y:u[1]};if(o<.01)return u=l[c].points.slice(0,2),{x:u[0],y:u[1]};const p=l[c],w=p.points;switch(p.command){case"L":return a.getPointOnLine(o,p.start.x,p.start.y,w[0],w[1]);case"C":return a.getPointOnCubicBezier((0,n.t2length)(o,a.getPathLength(l),b=>(0,n.getCubicArcLength)([p.start.x,w[0],w[2],w[4]],[p.start.y,w[1],w[3],w[5]],b)),p.start.x,p.start.y,w[0],w[1],w[2],w[3],w[4],w[5]);case"Q":return a.getPointOnQuadraticBezier((0,n.t2length)(o,a.getPathLength(l),b=>(0,n.getQuadraticArcLength)([p.start.x,w[0],w[2]],[p.start.y,w[1],w[3]],b)),p.start.x,p.start.y,w[0],w[1],w[2],w[3]);case"A":var d=w[0],_=w[1],E=w[2],S=w[3],m=w[4],g=w[5],v=w[6];return m+=g*o/p.pathLength,a.getPointOnEllipticalArc(d,_,E,S,m,v)}return null}static getPointOnLine(o,l,u,c,h,p,w){p=p??l,w=w??u;const d=this.getLineLength(l,u,c,h);if(d<1e-10)return{x:l,y:u};if(c===l)return{x:p,y:w+(h>u?o:-o)};const _=(h-u)/(c-l),E=Math.sqrt(o*o/(1+_*_))*(c<l?-1:1),S=_*E;if(Math.abs(w-u-_*(p-l))<1e-10)return{x:p+E,y:w+S};const m=((p-l)*(c-l)+(w-u)*(h-u))/(d*d),g=l+m*(c-l),v=u+m*(h-u),b=this.getLineLength(p,w,g,v),O=Math.sqrt(o*o-b*b),I=Math.sqrt(O*O/(1+_*_))*(c<l?-1:1),T=_*I;return{x:g+I,y:v+T}}static getPointOnCubicBezier(o,l,u,c,h,p,w,d,_){function E(O){return O*O*O}function S(O){return 3*O*O*(1-O)}function m(O){return 3*O*(1-O)*(1-O)}function g(O){return(1-O)*(1-O)*(1-O)}const v=d*E(o)+p*S(o)+c*m(o)+l*g(o),b=_*E(o)+w*S(o)+h*m(o)+u*g(o);return{x:v,y:b}}static getPointOnQuadraticBezier(o,l,u,c,h,p,w){function d(g){return g*g}function _(g){return 2*g*(1-g)}function E(g){return(1-g)*(1-g)}const S=p*d(o)+c*_(o)+l*E(o),m=w*d(o)+h*_(o)+u*E(o);return{x:S,y:m}}static getPointOnEllipticalArc(o,l,u,c,h,p){const w=Math.cos(p),d=Math.sin(p),_={x:u*Math.cos(h),y:c*Math.sin(h)};return{x:o+(_.x*w-_.y*d),y:l+(_.x*d+_.y*w)}}static parsePathData(o){if(!o)return[];let l=o;const u=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];l=l.replace(new RegExp(" ","g"),",");for(var c=0;c<u.length;c++)l=l.replace(new RegExp(u[c],"g"),"|"+u[c]);const h=l.split("|"),p=[],w=[];let d=0,_=0;const E=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let S;for(c=1;c<h.length;c++){let A=h[c],N=A.charAt(0);for(A=A.slice(1),w.length=0;S=E.exec(A);)w.push(S[0]);const F=[];for(let U=0,W=w.length;U<W;U++){if(w[U]==="00"){F.push(0,0);continue}const $=parseFloat(w[U]);isNaN($)?F.push(0):F.push($)}for(;F.length>0&&!isNaN(F[0]);){let U="",W=[];const $=d,Z=_;var m,g,v,b,O,I,T,M,j,C;switch(N){case"l":d+=F.shift(),_+=F.shift(),U="L",W.push(d,_);break;case"L":d=F.shift(),_=F.shift(),W.push(d,_);break;case"m":var x=F.shift(),L=F.shift();if(d+=x,_+=L,U="M",p.length>2&&p[p.length-1].command==="z"){for(let V=p.length-2;V>=0;V--)if(p[V].command==="M"){d=p[V].points[0]+x,_=p[V].points[1]+L;break}}W.push(d,_),N="l";break;case"M":d=F.shift(),_=F.shift(),U="M",W.push(d,_),N="L";break;case"h":d+=F.shift(),U="L",W.push(d,_);break;case"H":d=F.shift(),U="L",W.push(d,_);break;case"v":_+=F.shift(),U="L",W.push(d,_);break;case"V":_=F.shift(),U="L",W.push(d,_);break;case"C":W.push(F.shift(),F.shift(),F.shift(),F.shift()),d=F.shift(),_=F.shift(),W.push(d,_);break;case"c":W.push(d+F.shift(),_+F.shift(),d+F.shift(),_+F.shift()),d+=F.shift(),_+=F.shift(),U="C",W.push(d,_);break;case"S":g=d,v=_,m=p[p.length-1],m.command==="C"&&(g=d+(d-m.points[2]),v=_+(_-m.points[3])),W.push(g,v,F.shift(),F.shift()),d=F.shift(),_=F.shift(),U="C",W.push(d,_);break;case"s":g=d,v=_,m=p[p.length-1],m.command==="C"&&(g=d+(d-m.points[2]),v=_+(_-m.points[3])),W.push(g,v,d+F.shift(),_+F.shift()),d+=F.shift(),_+=F.shift(),U="C",W.push(d,_);break;case"Q":W.push(F.shift(),F.shift()),d=F.shift(),_=F.shift(),W.push(d,_);break;case"q":W.push(d+F.shift(),_+F.shift()),d+=F.shift(),_+=F.shift(),U="Q",W.push(d,_);break;case"T":g=d,v=_,m=p[p.length-1],m.command==="Q"&&(g=d+(d-m.points[0]),v=_+(_-m.points[1])),d=F.shift(),_=F.shift(),U="Q",W.push(g,v,d,_);break;case"t":g=d,v=_,m=p[p.length-1],m.command==="Q"&&(g=d+(d-m.points[0]),v=_+(_-m.points[1])),d+=F.shift(),_+=F.shift(),U="Q",W.push(g,v,d,_);break;case"A":b=F.shift(),O=F.shift(),I=F.shift(),T=F.shift(),M=F.shift(),j=d,C=_,d=F.shift(),_=F.shift(),U="A",W=this.convertEndpointToCenterParameterization(j,C,d,_,T,M,b,O,I);break;case"a":b=F.shift(),O=F.shift(),I=F.shift(),T=F.shift(),M=F.shift(),j=d,C=_,d+=F.shift(),_+=F.shift(),U="A",W=this.convertEndpointToCenterParameterization(j,C,d,_,T,M,b,O,I);break}p.push({command:U||N,points:W,start:{x:$,y:Z},pathLength:this.calcLength($,Z,U||N,W)})}(N==="z"||N==="Z")&&p.push({command:"z",points:[],start:void 0,pathLength:0})}return p}static calcLength(o,l,u,c){let h,p,w,d;const _=a;switch(u){case"L":return _.getLineLength(o,l,c[0],c[1]);case"C":return(0,n.getCubicArcLength)([o,c[0],c[2],c[4]],[l,c[1],c[3],c[5]],1);case"Q":return(0,n.getQuadraticArcLength)([o,c[0],c[2]],[l,c[1],c[3]],1);case"A":h=0;var E=c[4],S=c[5],m=c[4]+S,g=Math.PI/180;if(Math.abs(E-m)<g&&(g=Math.abs(E-m)),p=_.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],E,0),S<0)for(d=E-g;d>m;d-=g)w=_.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],d,0),h+=_.getLineLength(p.x,p.y,w.x,w.y),p=w;else for(d=E+g;d<m;d+=g)w=_.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],d,0),h+=_.getLineLength(p.x,p.y,w.x,w.y),p=w;return w=_.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],m,0),h+=_.getLineLength(p.x,p.y,w.x,w.y),h}return 0}static convertEndpointToCenterParameterization(o,l,u,c,h,p,w,d,_){const E=_*(Math.PI/180),S=Math.cos(E)*(o-u)/2+Math.sin(E)*(l-c)/2,m=-1*Math.sin(E)*(o-u)/2+Math.cos(E)*(l-c)/2,g=S*S/(w*w)+m*m/(d*d);g>1&&(w*=Math.sqrt(g),d*=Math.sqrt(g));let v=Math.sqrt((w*w*(d*d)-w*w*(m*m)-d*d*(S*S))/(w*w*(m*m)+d*d*(S*S)));h===p&&(v*=-1),isNaN(v)&&(v=0);const b=v*w*m/d,O=v*-d*S/w,I=(o+u)/2+Math.cos(E)*b-Math.sin(E)*O,T=(l+c)/2+Math.sin(E)*b+Math.cos(E)*O,M=function(F){return Math.sqrt(F[0]*F[0]+F[1]*F[1])},j=function(F,U){return(F[0]*U[0]+F[1]*U[1])/(M(F)*M(U))},C=function(F,U){return(F[0]*U[1]<F[1]*U[0]?-1:1)*Math.acos(j(F,U))},x=C([1,0],[(S-b)/w,(m-O)/d]),L=[(S-b)/w,(m-O)/d],A=[(-1*S-b)/w,(-1*m-O)/d];let N=C(L,A);return j(L,A)<=-1&&(N=Math.PI),j(L,A)>=1&&(N=0),p===0&&N>0&&(N=N-2*Math.PI),p===1&&N<0&&(N=N+2*Math.PI),[I,T,w,d,x,N,E,p]}}return od.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),od}var s5;function DS(){if(s5)return id;s5=1,Object.defineProperty(id,"__esModule",{value:!0}),id.Arrow=void 0;const e=Hr(),r=S6(),t=Wr(),n=Mr(),a=um();class i extends r.Line{_sceneFunc(l){super._sceneFunc(l);const u=Math.PI*2,c=this.points();let h=c;const p=this.tension()!==0&&c.length>4;p&&(h=this.getTensionPoints());const w=this.pointerLength(),d=c.length;let _,E;if(p){const g=[h[h.length-4],h[h.length-3],h[h.length-2],h[h.length-1],c[d-2],c[d-1]],v=a.Path.calcLength(h[h.length-4],h[h.length-3],"C",g),b=a.Path.getPointOnQuadraticBezier(Math.min(1,1-w/v),g[0],g[1],g[2],g[3],g[4],g[5]);_=c[d-2]-b.x,E=c[d-1]-b.y}else _=c[d-2]-c[d-4],E=c[d-1]-c[d-3];const S=(Math.atan2(E,_)+u)%u,m=this.pointerWidth();this.pointerAtEnding()&&(l.save(),l.beginPath(),l.translate(c[d-2],c[d-1]),l.rotate(S),l.moveTo(0,0),l.lineTo(-w,m/2),l.lineTo(-w,-m/2),l.closePath(),l.restore(),this.__fillStroke(l)),this.pointerAtBeginning()&&(l.save(),l.beginPath(),l.translate(c[0],c[1]),p?(_=(h[0]+h[2])/2-c[0],E=(h[1]+h[3])/2-c[1]):(_=c[2]-c[0],E=c[3]-c[1]),l.rotate((Math.atan2(-E,-_)+u)%u),l.moveTo(0,0),l.lineTo(-w,m/2),l.lineTo(-w,-m/2),l.closePath(),l.restore(),this.__fillStroke(l))}__fillStroke(l){const u=this.dashEnabled();u&&(this.attrs.dashEnabled=!1,l.setLineDash([])),l.fillStrokeShape(this),u&&(this.attrs.dashEnabled=!0)}getSelfRect(){const l=super.getSelfRect(),u=this.pointerWidth()/2;return{x:l.x,y:l.y-u,width:l.width,height:l.height+u*2}}}return id.Arrow=i,i.prototype.className="Arrow",(0,n._registerNode)(i),e.Factory.addGetterSetter(i,"pointerLength",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerWidth",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerAtBeginning",!1),e.Factory.addGetterSetter(i,"pointerAtEnding",!0),id}var sd={},l5;function BS(){if(l5)return sd;l5=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.Circle=void 0;const e=Hr(),r=Ma(),t=Wr(),n=Mr();class a extends r.Shape{_sceneFunc(o){o.beginPath(),o.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(o){this.radius()!==o/2&&this.radius(o/2)}setHeight(o){this.radius()!==o/2&&this.radius(o/2)}}return sd.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),sd}var ld={},u5;function qS(){if(u5)return ld;u5=1,Object.defineProperty(ld,"__esModule",{value:!0}),ld.Ellipse=void 0;const e=Hr(),r=Ma(),t=Wr(),n=Mr();class a extends r.Shape{_sceneFunc(o){const l=this.radiusX(),u=this.radiusY();o.beginPath(),o.save(),l!==u&&o.scale(1,u/l),o.arc(0,0,l,0,Math.PI*2,!1),o.restore(),o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(o){this.radiusX(o/2)}setHeight(o){this.radiusY(o/2)}}return ld.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,n._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,t.getNumberValidator)()),ld}var ud={},c5;function zS(){if(c5)return ud;c5=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.Image=void 0;const e=Li(),r=Hr(),t=Ma(),n=Mr(),a=Wr();class i extends t.Shape{constructor(l){super(l),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",u=>{this._removeImageLoad(u.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const l=this.image();l&&l.complete||l&&l.readyState===4||l&&l.addEventListener&&l.addEventListener("load",this._loadListener)}_removeImageLoad(l){l&&l.removeEventListener&&l.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const l=!!this.cornerRadius(),u=this.hasShadow();return l&&u?!0:super._useBufferCanvas(!0)}_sceneFunc(l){const u=this.getWidth(),c=this.getHeight(),h=this.cornerRadius(),p=this.attrs.image;let w;if(p){const d=this.attrs.cropWidth,_=this.attrs.cropHeight;d&&_?w=[p,this.cropX(),this.cropY(),d,_,0,0,u,c]:w=[p,0,0,u,c]}(this.hasFill()||this.hasStroke()||h)&&(l.beginPath(),h?e.Util.drawRoundedRectPath(l,u,c,h):l.rect(0,0,u,c),l.closePath(),l.fillStrokeShape(this)),p&&(h&&l.clip(),l.drawImage.apply(l,w))}_hitFunc(l){const u=this.width(),c=this.height(),h=this.cornerRadius();l.beginPath(),h?e.Util.drawRoundedRectPath(l,u,c,h):l.rect(0,0,u,c),l.closePath(),l.fillStrokeShape(this)}getWidth(){var l,u;return(l=this.attrs.width)!==null&&l!==void 0?l:(u=this.image())===null||u===void 0?void 0:u.width}getHeight(){var l,u;return(l=this.attrs.height)!==null&&l!==void 0?l:(u=this.image())===null||u===void 0?void 0:u.height}static fromURL(l,u,c=null){const h=e.Util.createImageElement();h.onload=function(){const p=new i({image:h});u(p)},h.onerror=c,h.crossOrigin="Anonymous",h.src=l}}return ud.Image=i,i.prototype.className="Image",(0,n._registerNode)(i),r.Factory.addGetterSetter(i,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),r.Factory.addGetterSetter(i,"image"),r.Factory.addComponentsGetterSetter(i,"crop",["x","y","width","height"]),r.Factory.addGetterSetter(i,"cropX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropWidth",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropHeight",0,(0,a.getNumberValidator)()),ud}var bf={},f5;function US(){if(f5)return bf;f5=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Tag=bf.Label=void 0;const e=Hr(),r=Ma(),t=sm(),n=Wr(),a=Mr(),i=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],o="Change.konva",l="none",u="up",c="right",h="down",p="left",w=i.length;class d extends t.Group{constructor(S){super(S),this.on("add.konva",function(m){this._addListeners(m.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(S){let m=this,g;const v=function(){m._sync()};for(g=0;g<w;g++)S.on(i[g]+o,v)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let S=this.getText(),m=this.getTag(),g,v,b,O,I,T,M;if(S&&m){switch(g=S.width(),v=S.height(),b=m.pointerDirection(),O=m.pointerWidth(),M=m.pointerHeight(),I=0,T=0,b){case u:I=g/2,T=-1*M;break;case c:I=g+O,T=v/2;break;case h:I=g/2,T=v+M;break;case p:I=-1*O,T=v/2;break}m.setAttrs({x:-1*I,y:-1*T,width:g,height:v}),S.setAttrs({x:-1*I,y:-1*T})}}}bf.Label=d,d.prototype.className="Label",(0,a._registerNode)(d);class _ extends r.Shape{_sceneFunc(S){const m=this.width(),g=this.height(),v=this.pointerDirection(),b=this.pointerWidth(),O=this.pointerHeight(),I=this.cornerRadius();let T=0,M=0,j=0,C=0;typeof I=="number"?T=M=j=C=Math.min(I,m/2,g/2):(T=Math.min(I[0]||0,m/2,g/2),M=Math.min(I[1]||0,m/2,g/2),C=Math.min(I[2]||0,m/2,g/2),j=Math.min(I[3]||0,m/2,g/2)),S.beginPath(),S.moveTo(T,0),v===u&&(S.lineTo((m-b)/2,0),S.lineTo(m/2,-1*O),S.lineTo((m+b)/2,0)),S.lineTo(m-M,0),S.arc(m-M,M,M,Math.PI*3/2,0,!1),v===c&&(S.lineTo(m,(g-O)/2),S.lineTo(m+b,g/2),S.lineTo(m,(g+O)/2)),S.lineTo(m,g-C),S.arc(m-C,g-C,C,0,Math.PI/2,!1),v===h&&(S.lineTo((m+b)/2,g),S.lineTo(m/2,g+O),S.lineTo((m-b)/2,g)),S.lineTo(j,g),S.arc(j,g-j,j,Math.PI/2,Math.PI,!1),v===p&&(S.lineTo(0,(g+O)/2),S.lineTo(-1*b,g/2),S.lineTo(0,(g-O)/2)),S.lineTo(0,T),S.arc(T,T,T,Math.PI,Math.PI*3/2,!1),S.closePath(),S.fillStrokeShape(this)}getSelfRect(){let S=0,m=0,g=this.pointerWidth(),v=this.pointerHeight(),b=this.pointerDirection(),O=this.width(),I=this.height();return b===u?(m-=v,I+=v):b===h?I+=v:b===p?(S-=g*1.5,O+=g):b===c&&(O+=g*1.5),{x:S,y:m,width:O,height:I}}}return bf.Tag=_,_.prototype.className="Tag",(0,a._registerNode)(_),e.Factory.addGetterSetter(_,"pointerDirection",l),e.Factory.addGetterSetter(_,"pointerWidth",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(_,"pointerHeight",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(_,"cornerRadius",0,(0,n.getNumberOrArrayOfNumbersValidator)(4)),bf}var cd={},h5;function x6(){if(h5)return cd;h5=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.Rect=void 0;const e=Hr(),r=Ma(),t=Mr(),n=Li(),a=Wr();class i extends r.Shape{_sceneFunc(l){const u=this.cornerRadius(),c=this.width(),h=this.height();l.beginPath(),u?n.Util.drawRoundedRectPath(l,c,h,u):l.rect(0,0,c,h),l.closePath(),l.fillStrokeShape(this)}}return cd.Rect=i,i.prototype.className="Rect",(0,t._registerNode)(i),e.Factory.addGetterSetter(i,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),cd}var fd={},d5;function HS(){if(d5)return fd;d5=1,Object.defineProperty(fd,"__esModule",{value:!0}),fd.RegularPolygon=void 0;const e=Hr(),r=Ma(),t=Wr(),n=Mr();class a extends r.Shape{_sceneFunc(o){const l=this._getPoints();o.beginPath(),o.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++)o.lineTo(l[u].x,l[u].y);o.closePath(),o.fillStrokeShape(this)}_getPoints(){const o=this.attrs.sides,l=this.attrs.radius||0,u=[];for(let c=0;c<o;c++)u.push({x:l*Math.sin(c*2*Math.PI/o),y:-1*l*Math.cos(c*2*Math.PI/o)});return u}getSelfRect(){const o=this._getPoints();let l=o[0].x,u=o[0].y,c=o[0].x,h=o[0].y;return o.forEach(p=>{l=Math.min(l,p.x),u=Math.max(u,p.x),c=Math.min(c,p.y),h=Math.max(h,p.y)}),{x:l,y:c,width:u-l,height:h-c}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(o){this.radius(o/2)}setHeight(o){this.radius(o/2)}}return fd.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"sides",0,(0,t.getNumberValidator)()),fd}var hd={},p5;function GS(){if(p5)return hd;p5=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.Ring=void 0;const e=Hr(),r=Ma(),t=Wr(),n=Mr(),a=Math.PI*2;class i extends r.Shape{_sceneFunc(l){l.beginPath(),l.arc(0,0,this.innerRadius(),0,a,!1),l.moveTo(this.outerRadius(),0),l.arc(0,0,this.outerRadius(),a,0,!0),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(l){this.outerRadius(l/2)}setHeight(l){this.outerRadius(l/2)}}return hd.Ring=i,i.prototype.className="Ring",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,t.getNumberValidator)()),hd}var dd={},g5;function VS(){if(g5)return dd;g5=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.Sprite=void 0;const e=Hr(),r=Ma(),t=lm(),n=Wr(),a=Mr();class i extends r.Shape{constructor(l){super(l),this._updated=!0,this.anim=new t.Animation(()=>{const u=this._updated;return this._updated=!1,u}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(l){const u=this.animation(),c=this.frameIndex(),h=c*4,p=this.animations()[u],w=this.frameOffsets(),d=p[h+0],_=p[h+1],E=p[h+2],S=p[h+3],m=this.image();if((this.hasFill()||this.hasStroke())&&(l.beginPath(),l.rect(0,0,E,S),l.closePath(),l.fillStrokeShape(this)),m)if(w){const g=w[u],v=c*2;l.drawImage(m,d,_,E,S,g[v+0],g[v+1],E,S)}else l.drawImage(m,d,_,E,S,0,0,E,S)}_hitFunc(l){const u=this.animation(),c=this.frameIndex(),h=c*4,p=this.animations()[u],w=this.frameOffsets(),d=p[h+2],_=p[h+3];if(l.beginPath(),w){const E=w[u],S=c*2;l.rect(E[S+0],E[S+1],d,_)}else l.rect(0,0,d,_);l.closePath(),l.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const l=this;this.interval=setInterval(function(){l._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const l=this.getLayer();this.anim.setLayers(l),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const l=this.frameIndex(),u=this.animation(),c=this.animations(),h=c[u],p=h.length/4;l<p-1?this.frameIndex(l+1):this.frameIndex(0)}}return dd.Sprite=i,i.prototype.className="Sprite",(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"animation"),e.Factory.addGetterSetter(i,"animations"),e.Factory.addGetterSetter(i,"frameOffsets"),e.Factory.addGetterSetter(i,"image"),e.Factory.addGetterSetter(i,"frameIndex",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"frameRate",17,(0,n.getNumberValidator)()),e.Factory.backCompat(i,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),dd}var pd={},v5;function WS(){if(v5)return pd;v5=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.Star=void 0;const e=Hr(),r=Ma(),t=Wr(),n=Mr();class a extends r.Shape{_sceneFunc(o){const l=this.innerRadius(),u=this.outerRadius(),c=this.numPoints();o.beginPath(),o.moveTo(0,0-u);for(let h=1;h<c*2;h++){const p=h%2===0?u:l,w=p*Math.sin(h*Math.PI/c),d=-1*p*Math.cos(h*Math.PI/c);o.lineTo(w,d)}o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(o){this.outerRadius(o/2)}setHeight(o){this.outerRadius(o/2)}}return pd.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"numPoints",5,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"outerRadius",0,(0,t.getNumberValidator)()),pd}var nh={},m5;function E6(){if(m5)return nh;m5=1,Object.defineProperty(nh,"__esModule",{value:!0}),nh.Text=void 0,nh.stringToArray=o;const e=Li(),r=Hr(),t=Ma(),n=Mr(),a=Wr(),i=Mr();function o(z){return[...z].reduce((D,K,ne,Q)=>{if(new RegExp("\\p{Emoji}","u").test(K)){const ee=Q[ne+1];ee&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(ee)?(D.push(K+ee),Q[ne+1]=""):D.push(K)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(K+(Q[ne+1]||""))?D.push(K+Q[ne+1]):ne>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(K)?D[D.length-1]+=K:K&&D.push(K);return D},[])}const l="auto",u="center",c="inherit",h="justify",p="Change.konva",w="2d",d="-",_="left",E="text",S="Text",m="top",g="bottom",v="middle",b="normal",O="px ",I=" ",T="right",M="rtl",j="word",C="char",x="none",L="…",A=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],N=A.length;function F(z){return z.split(",").map(D=>{D=D.trim();const K=D.indexOf(" ")>=0,ne=D.indexOf('"')>=0||D.indexOf("'")>=0;return K&&!ne&&(D=`"${D}"`),D}).join(", ")}let U;function W(){return U||(U=e.Util.createCanvasElement().getContext(w),U)}function $(z){z.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Z(z){z.setAttr("miterLimit",2),z.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function V(z){return z=z||{},!z.fillLinearGradientColorStops&&!z.fillRadialGradientColorStops&&!z.fillPatternImage&&(z.fill=z.fill||"black"),z}class G extends t.Shape{constructor(D){super(V(D)),this._partialTextX=0,this._partialTextY=0;for(let K=0;K<N;K++)this.on(A[K]+p,this._setTextData);this._setTextData()}_sceneFunc(D){const K=this.textArr,ne=K.length;if(!this.text())return;let Q=this.padding(),ee=this.fontSize(),ae=this.lineHeight()*ee,se=this.verticalAlign(),ce=this.direction(),me=0,Se=this.align(),Oe=this.getWidth(),Ne=this.letterSpacing(),xe=this.fill(),ve=this.textDecoration(),Xe=ve.indexOf("underline")!==-1,be=ve.indexOf("line-through")!==-1,Ae;ce=ce===c?D.direction:ce;let Ee=ae/2,Le=v;if(n.Konva._fixTextRendering){const Je=this.measureSize("M");Le="alphabetic",Ee=(Je.fontBoundingBoxAscent-Je.fontBoundingBoxDescent)/2+ae/2}var he=0,ke=0;for(ce===M&&D.setAttr("direction",ce),D.setAttr("font",this._getContextFont()),D.setAttr("textBaseline",Le),D.setAttr("textAlign",_),se===v?me=(this.getHeight()-ne*ae-Q*2)/2:se===g&&(me=this.getHeight()-ne*ae-Q*2),D.translate(Q,me+Q),Ae=0;Ae<ne;Ae++){var he=0,ke=0,Re=K[Ae],$e=Re.text,vt=Re.width,wt=Re.lastInParagraph,at,mt;if(D.save(),Se===T?he+=Oe-vt-Q*2:Se===u&&(he+=(Oe-vt-Q*2)/2),Xe){D.save(),D.beginPath();const qt=n.Konva._fixTextRendering?Math.round(ee/4):Math.round(ee/2),At=he,Ht=Ee+ke+qt;D.moveTo(At,Ht),at=$e.split(" ").length-1,mt=Se===h&&!wt?Oe-Q*2:vt,D.lineTo(At+Math.round(mt),Ht),D.lineWidth=ee/15;const zt=this._getLinearGradient();D.strokeStyle=zt||xe,D.stroke(),D.restore()}if(be){D.save(),D.beginPath();const qt=n.Konva._fixTextRendering?-Math.round(ee/4):0;D.moveTo(he,Ee+ke+qt),at=$e.split(" ").length-1,mt=Se===h&&!wt?Oe-Q*2:vt,D.lineTo(he+Math.round(mt),Ee+ke+qt),D.lineWidth=ee/15;const At=this._getLinearGradient();D.strokeStyle=At||xe,D.stroke(),D.restore()}if(ce!==M&&(Ne!==0||Se===h)){at=$e.split(" ").length-1;const qt=o($e);for(let At=0;At<qt.length;At++){const Ht=qt[At];Ht===" "&&!wt&&Se===h&&(he+=(Oe-Q*2-vt)/at),this._partialTextX=he,this._partialTextY=Ee+ke,this._partialText=Ht,D.fillStrokeShape(this),he+=this.measureSize(Ht).width+Ne}}else Ne!==0&&D.setAttr("letterSpacing",`${Ne}px`),this._partialTextX=he,this._partialTextY=Ee+ke,this._partialText=$e,D.fillStrokeShape(this);D.restore(),ne>1&&(Ee+=ae)}}_hitFunc(D){const K=this.getWidth(),ne=this.getHeight();D.beginPath(),D.rect(0,0,K,ne),D.closePath(),D.fillStrokeShape(this)}setText(D){const K=e.Util._isString(D)?D:D==null?"":D+"";return this._setAttr(E,K),this}getWidth(){return this.attrs.width===l||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===l||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(D){var K,ne,Q,ee,ae,se,ce,me,Se,Oe,Ne;let xe=W(),ve=this.fontSize(),Xe;xe.save(),xe.font=this._getContextFont(),Xe=xe.measureText(D),xe.restore();const be=ve/100;return{actualBoundingBoxAscent:(K=Xe.actualBoundingBoxAscent)!==null&&K!==void 0?K:71.58203125*be,actualBoundingBoxDescent:(ne=Xe.actualBoundingBoxDescent)!==null&&ne!==void 0?ne:0,actualBoundingBoxLeft:(Q=Xe.actualBoundingBoxLeft)!==null&&Q!==void 0?Q:-7.421875*be,actualBoundingBoxRight:(ee=Xe.actualBoundingBoxRight)!==null&&ee!==void 0?ee:75.732421875*be,alphabeticBaseline:(ae=Xe.alphabeticBaseline)!==null&&ae!==void 0?ae:0,emHeightAscent:(se=Xe.emHeightAscent)!==null&&se!==void 0?se:100*be,emHeightDescent:(ce=Xe.emHeightDescent)!==null&&ce!==void 0?ce:-20*be,fontBoundingBoxAscent:(me=Xe.fontBoundingBoxAscent)!==null&&me!==void 0?me:91*be,fontBoundingBoxDescent:(Se=Xe.fontBoundingBoxDescent)!==null&&Se!==void 0?Se:21*be,hangingBaseline:(Oe=Xe.hangingBaseline)!==null&&Oe!==void 0?Oe:72.80000305175781*be,ideographicBaseline:(Ne=Xe.ideographicBaseline)!==null&&Ne!==void 0?Ne:-21*be,width:Xe.width,height:ve}}_getContextFont(){return this.fontStyle()+I+this.fontVariant()+I+(this.fontSize()+O)+F(this.fontFamily())}_addTextLine(D){this.align()===h&&(D=D.trim());const ne=this._getTextWidth(D);return this.textArr.push({text:D,width:ne,lastInParagraph:!1})}_getTextWidth(D){const K=this.letterSpacing(),ne=D.length;return W().measureText(D).width+K*ne}_setTextData(){let D=this.text().split(`
|
|
43
|
-
`),K=+this.fontSize(),ne=0,Q=this.lineHeight()*K,ee=this.attrs.width,ae=this.attrs.height,se=ee!==l&&ee!==void 0,ce=ae!==l&&ae!==void 0,me=this.padding(),Se=ee-me*2,Oe=ae-me*2,Ne=0,xe=this.wrap(),ve=xe!==x,Xe=xe!==C&&ve,be=this.ellipsis();this.textArr=[],W().font=this._getContextFont();const Ae=be?this._getTextWidth(L):0;for(let Ee=0,Le=D.length;Ee<Le;++Ee){let he=D[Ee],ke=this._getTextWidth(he);if(se&&ke>Se)for(;he.length>0;){let Re=0,$e=o(he).length,vt="",wt=0;for(;Re<$e;){const at=Re+$e>>>1,mt=o(he),Je=mt.slice(0,at+1).join(""),nt=this._getTextWidth(Je);(be&&ce&&Ne+Q>Oe?nt+Ae:nt)<=Se?(Re=at+1,vt=Je,wt=nt):$e=at}if(vt){if(Xe){const Je=o(he),nt=o(vt),qt=Je[nt.length],At=qt===I||qt===d;let Ht;if(At&&wt<=Se)Ht=nt.length;else{const zt=nt.lastIndexOf(I),Ie=nt.lastIndexOf(d);Ht=Math.max(zt,Ie)+1}Ht>0&&(Re=Ht,vt=Je.slice(0,Re).join(""),wt=this._getTextWidth(vt))}if(vt=vt.trimRight(),this._addTextLine(vt),ne=Math.max(ne,wt),Ne+=Q,this._shouldHandleEllipsis(Ne)){this._tryToAddEllipsisToLastLine();break}if(he=o(he).slice(Re).join("").trimLeft(),he.length>0&&(ke=this._getTextWidth(he),ke<=Se)){this._addTextLine(he),Ne+=Q,ne=Math.max(ne,ke);break}}else break}else this._addTextLine(he),Ne+=Q,ne=Math.max(ne,ke),this._shouldHandleEllipsis(Ne)&&Ee<Le-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),ce&&Ne+Q>Oe)break}this.textHeight=K,this.textWidth=ne}_shouldHandleEllipsis(D){const K=+this.fontSize(),ne=this.lineHeight()*K,Q=this.attrs.height,ee=Q!==l&&Q!==void 0,ae=this.padding(),se=Q-ae*2;return!(this.wrap()!==x)||ee&&D+ne>se}_tryToAddEllipsisToLastLine(){const D=this.attrs.width,K=D!==l&&D!==void 0,ne=this.padding(),Q=D-ne*2,ee=this.ellipsis(),ae=this.textArr[this.textArr.length-1];!ae||!ee||(K&&(this._getTextWidth(ae.text+L)<Q||(ae.text=ae.text.slice(0,ae.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(ae.text+L))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const D=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,K=this.hasShadow();return D&&K?!0:super._useBufferCanvas()}}return nh.Text=G,G.prototype._fillFunc=$,G.prototype._strokeFunc=Z,G.prototype.className=S,G.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,i._registerNode)(G),r.Factory.overWriteSetter(G,"width",(0,a.getNumberOrAutoValidator)()),r.Factory.overWriteSetter(G,"height",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(G,"direction",c),r.Factory.addGetterSetter(G,"fontFamily","Arial"),r.Factory.addGetterSetter(G,"fontSize",12,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(G,"fontStyle",b),r.Factory.addGetterSetter(G,"fontVariant",b),r.Factory.addGetterSetter(G,"padding",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(G,"align",_),r.Factory.addGetterSetter(G,"verticalAlign",m),r.Factory.addGetterSetter(G,"lineHeight",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(G,"wrap",j),r.Factory.addGetterSetter(G,"ellipsis",!1,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(G,"letterSpacing",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(G,"text","",(0,a.getStringValidator)()),r.Factory.addGetterSetter(G,"textDecoration",""),nh}var gd={},y5;function $S(){if(y5)return gd;y5=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.TextPath=void 0;const e=Li(),r=Hr(),t=Ma(),n=um(),a=E6(),i=Wr(),o=Mr(),l="",u="normal";function c(w){w.fillText(this.partialText,0,0)}function h(w){w.strokeText(this.partialText,0,0)}class p extends t.Shape{constructor(d){super(d),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return n.Path.getPathLength(this.dataArray)}_getPointAtLength(d){if(!this.attrs.data)return null;const _=this.pathLength;return d-1>_?null:n.Path.getPointAtLengthOfDataArray(d,this.dataArray)}_readDataAttribute(){this.dataArray=n.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(d){d.setAttr("font",this._getContextFont()),d.setAttr("textBaseline",this.textBaseline()),d.setAttr("textAlign","left"),d.save();const _=this.textDecoration(),E=this.fill(),S=this.fontSize(),m=this.glyphInfo;_==="underline"&&d.beginPath();for(let g=0;g<m.length;g++){d.save();const v=m[g].p0;d.translate(v.x,v.y),d.rotate(m[g].rotation),this.partialText=m[g].text,d.fillStrokeShape(this),_==="underline"&&(g===0&&d.moveTo(0,S/2+1),d.lineTo(S,S/2+1)),d.restore()}_==="underline"&&(d.strokeStyle=E,d.lineWidth=S/20,d.stroke()),d.restore()}_hitFunc(d){d.beginPath();const _=this.glyphInfo;if(_.length>=1){const E=_[0].p0;d.moveTo(E.x,E.y)}for(let E=0;E<_.length;E++){const S=_[E].p1;d.lineTo(S.x,S.y)}d.setAttr("lineWidth",this.fontSize()),d.setAttr("strokeStyle",this.colorKey),d.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(d){return a.Text.prototype.setText.call(this,d)}_getContextFont(){return a.Text.prototype._getContextFont.call(this)}_getTextSize(d){const E=this.dummyCanvas.getContext("2d");E.save(),E.font=this._getContextFont();const S=E.measureText(d);return E.restore(),{width:S.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:d,height:_}=this._getTextSize(this.attrs.text);if(this.textWidth=d,this.textHeight=_,this.glyphInfo=[],!this.attrs.data)return null;const E=this.letterSpacing(),S=this.align(),m=this.kerningFunc(),g=Math.max(this.textWidth+((this.attrs.text||"").length-1)*E,0);let v=0;S==="center"&&(v=Math.max(0,this.pathLength/2-g/2)),S==="right"&&(v=Math.max(0,this.pathLength-g));const b=(0,a.stringToArray)(this.text());let O=v;for(let I=0;I<b.length;I++){const T=this._getPointAtLength(O);if(!T)return;let M=this._getTextSize(b[I]).width+E;if(b[I]===" "&&S==="justify"){const N=this.text().split(" ").length-1;M+=(this.pathLength-g)/N}const j=this._getPointAtLength(O+M);if(!j)return;const C=n.Path.getLineLength(T.x,T.y,j.x,j.y);let x=0;if(m)try{x=m(b[I-1],b[I])*this.fontSize()}catch{x=0}T.x+=x,j.x+=x,this.textWidth+=x;const L=n.Path.getPointOnLine(x+C/2,T.x,T.y,j.x,j.y),A=Math.atan2(j.y-T.y,j.x-T.x);this.glyphInfo.push({transposeX:L.x,transposeY:L.y,text:b[I],rotation:A,p0:T,p1:j}),O+=M}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const d=[];this.glyphInfo.forEach(function(O){d.push(O.p0.x),d.push(O.p0.y),d.push(O.p1.x),d.push(O.p1.y)});let _=d[0]||0,E=d[0]||0,S=d[1]||0,m=d[1]||0,g,v;for(let O=0;O<d.length/2;O++)g=d[O*2],v=d[O*2+1],_=Math.min(_,g),E=Math.max(E,g),S=Math.min(S,v),m=Math.max(m,v);const b=this.fontSize();return{x:_-b/2,y:S-b/2,width:E-_+b,height:m-S+b}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return gd.TextPath=p,p.prototype._fillFunc=c,p.prototype._strokeFunc=h,p.prototype._fillFuncHit=c,p.prototype._strokeFuncHit=h,p.prototype.className="TextPath",p.prototype._attrsAffectingSize=["text","fontSize","data"],(0,o._registerNode)(p),r.Factory.addGetterSetter(p,"data"),r.Factory.addGetterSetter(p,"fontFamily","Arial"),r.Factory.addGetterSetter(p,"fontSize",12,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(p,"fontStyle",u),r.Factory.addGetterSetter(p,"align","left"),r.Factory.addGetterSetter(p,"letterSpacing",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(p,"textBaseline","middle"),r.Factory.addGetterSetter(p,"fontVariant",u),r.Factory.addGetterSetter(p,"text",l),r.Factory.addGetterSetter(p,"textDecoration",""),r.Factory.addGetterSetter(p,"kerningFunc",void 0),gd}var vd={},b5;function YS(){if(b5)return vd;b5=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.Transformer=void 0;const e=Li(),r=Hr(),t=Ji(),n=Ma(),a=x6(),i=sm(),o=Mr(),l=Wr(),u=Mr(),c="tr-konva",h=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(M=>M+`.${c}`).join(" "),p="nodesRect",w=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],d={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},_="ontouchstart"in o.Konva._global;function E(M,j,C){if(M==="rotater")return C;j+=e.Util.degToRad(d[M]||0);const x=(e.Util.radToDeg(j)%360+360)%360;return e.Util._inRange(x,315+22.5,360)||e.Util._inRange(x,0,22.5)?"ns-resize":e.Util._inRange(x,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(x,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(x,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(x,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(x,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(x,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(x,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+x),"pointer")}const S=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function m(M){return{x:M.x+M.width/2*Math.cos(M.rotation)+M.height/2*Math.sin(-M.rotation),y:M.y+M.height/2*Math.cos(M.rotation)+M.width/2*Math.sin(M.rotation)}}function g(M,j,C){const x=C.x+(M.x-C.x)*Math.cos(j)-(M.y-C.y)*Math.sin(j),L=C.y+(M.x-C.x)*Math.sin(j)+(M.y-C.y)*Math.cos(j);return{...M,rotation:M.rotation+j,x,y:L}}function v(M,j){const C=m(M);return g(M,j,C)}function b(M,j,C){let x=j;for(let L=0;L<M.length;L++){const A=o.Konva.getAngle(M[L]),N=Math.abs(A-j)%(Math.PI*2);Math.min(N,Math.PI*2-N)<C&&(x=A)}return x}let O=0;class I extends i.Group{constructor(j){super(j),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(h,this.update),this.getNode()&&this.update()}attachTo(j){return this.setNode(j),this}setNode(j){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([j])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return c+this._id}setNodes(j=[]){this._nodes&&this._nodes.length&&this.detach();const C=j.filter(L=>L.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=j=C,j.length===1&&this.useSingleNodeRotation()?this.rotation(j[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(L=>{const A=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(L._attrsAffectingSize.length){const N=L._attrsAffectingSize.map(F=>F+"Change."+this._getEventNamespace()).join(" ");L.on(N,A)}L.on(w.map(N=>N+`.${this._getEventNamespace()}`).join(" "),A),L.on(`absoluteTransformChange.${this._getEventNamespace()}`,A),this._proxyDrag(L)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(j){let C;j.on(`dragstart.${this._getEventNamespace()}`,x=>{C=j.getAbsolutePosition(),!this.isDragging()&&j!==this.findOne(".back")&&this.startDrag(x,!1)}),j.on(`dragmove.${this._getEventNamespace()}`,x=>{if(!C)return;const L=j.getAbsolutePosition(),A=L.x-C.x,N=L.y-C.y;this.nodes().forEach(F=>{if(F===j||F.isDragging())return;const U=F.getAbsolutePosition();F.setAbsolutePosition({x:U.x+A,y:U.y+N}),F.startDrag(x)}),C=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(j=>{j.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(p),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(p,this.__getNodeRect)}__getNodeShape(j,C=this.rotation(),x){const L=j.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),A=j.getAbsoluteScale(x),N=j.getAbsolutePosition(x),F=L.x*A.x-j.offsetX()*A.x,U=L.y*A.y-j.offsetY()*A.y,W=(o.Konva.getAngle(j.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),$={x:N.x+F*Math.cos(W)+U*Math.sin(-W),y:N.y+U*Math.cos(W)+F*Math.sin(W),width:L.width*A.x,height:L.height*A.y,rotation:W};return g($,-o.Konva.getAngle(C),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const C=[];this.nodes().map(W=>{const $=W.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),Z=[{x:$.x,y:$.y},{x:$.x+$.width,y:$.y},{x:$.x+$.width,y:$.y+$.height},{x:$.x,y:$.y+$.height}],V=W.getAbsoluteTransform();Z.forEach(function(G){const z=V.point(G);C.push(z)})});const x=new e.Transform;x.rotate(-o.Konva.getAngle(this.rotation()));let L=1/0,A=1/0,N=-1/0,F=-1/0;C.forEach(function(W){const $=x.point(W);L===void 0&&(L=N=$.x,A=F=$.y),L=Math.min(L,$.x),A=Math.min(A,$.y),N=Math.max(N,$.x),F=Math.max(F,$.y)}),x.invert();const U=x.point({x:L,y:A});return{x:U.x,y:U.y,width:N-L,height:F-A,rotation:o.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),S.forEach(j=>{this._createAnchor(j)}),this._createAnchor("rotater")}_createAnchor(j){const C=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:j+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:_?10:"auto"}),x=this;C.on("mousedown touchstart",function(L){x._handleMouseDown(L)}),C.on("dragstart",L=>{C.stopDrag(),L.cancelBubble=!0}),C.on("dragend",L=>{L.cancelBubble=!0}),C.on("mouseenter",()=>{const L=o.Konva.getAngle(this.rotation()),A=this.rotateAnchorCursor(),N=E(j,L,A);C.getStage().content&&(C.getStage().content.style.cursor=N),this._cursorChange=!0}),C.on("mouseout",()=>{C.getStage().content&&(C.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(C)}_createBack(){const j=new n.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(C,x){const L=x.getParent(),A=L.padding();C.beginPath(),C.rect(-A,-A,x.width()+A*2,x.height()+A*2),C.moveTo(x.width()/2,-A),L.rotateEnabled()&&L.rotateLineVisible()&&C.lineTo(x.width()/2,-L.rotateAnchorOffset()*e.Util._sign(x.height())-A),C.fillStrokeShape(x)},hitFunc:(C,x)=>{if(!this.shouldOverdrawWholeArea())return;const L=this.padding();C.beginPath(),C.rect(-L,-L,x.width()+L*2,x.height()+L*2),C.fillStrokeShape(x)}});this.add(j),this._proxyDrag(j),j.on("dragstart",C=>{C.cancelBubble=!0}),j.on("dragmove",C=>{C.cancelBubble=!0}),j.on("dragend",C=>{C.cancelBubble=!0}),this.on("dragmove",C=>{this.update()})}_handleMouseDown(j){if(this._transforming)return;this._movingAnchorName=j.target.name().split(" ")[0];const C=this._getNodeRect(),x=C.width,L=C.height,A=Math.sqrt(Math.pow(x,2)+Math.pow(L,2));this.sin=Math.abs(L/A),this.cos=Math.abs(x/A),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const N=j.target.getAbsolutePosition(),F=j.target.getStage().getPointerPosition();this._anchorDragOffset={x:F.x-N.x,y:F.y-N.y},O++,this._fire("transformstart",{evt:j.evt,target:this.getNode()}),this._nodes.forEach(U=>{U._fire("transformstart",{evt:j.evt,target:U})})}_handleMouseMove(j){let C,x,L;const A=this.findOne("."+this._movingAnchorName),N=A.getStage();N.setPointersPositions(j);const F=N.getPointerPosition();let U={x:F.x-this._anchorDragOffset.x,y:F.y-this._anchorDragOffset.y};const W=A.getAbsolutePosition();this.anchorDragBoundFunc()&&(U=this.anchorDragBoundFunc()(W,U,j)),A.setAbsolutePosition(U);const $=A.getAbsolutePosition();if(W.x===$.x&&W.y===$.y)return;if(this._movingAnchorName==="rotater"){const se=this._getNodeRect();C=A.x()-se.width/2,x=-A.y()+se.height/2;let ce=Math.atan2(-x,C)+Math.PI/2;se.height<0&&(ce-=Math.PI);const Se=o.Konva.getAngle(this.rotation())+ce,Oe=o.Konva.getAngle(this.rotationSnapTolerance()),xe=b(this.rotationSnaps(),Se,Oe)-se.rotation,ve=v(se,xe);this._fitNodesInto(ve,j);return}const Z=this.shiftBehavior();let V;Z==="inverted"?V=this.keepRatio()&&!j.shiftKey:Z==="none"?V=this.keepRatio():V=this.keepRatio()||j.shiftKey;var ne=this.centeredScaling()||j.altKey;if(this._movingAnchorName==="top-left"){if(V){var G=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};L=Math.sqrt(Math.pow(G.x-A.x(),2)+Math.pow(G.y-A.y(),2));var z=this.findOne(".top-left").x()>G.x?-1:1,D=this.findOne(".top-left").y()>G.y?-1:1;C=L*this.cos*z,x=L*this.sin*D,this.findOne(".top-left").x(G.x-C),this.findOne(".top-left").y(G.y-x)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(A.y());else if(this._movingAnchorName==="top-right"){if(V){var G=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};L=Math.sqrt(Math.pow(A.x()-G.x,2)+Math.pow(G.y-A.y(),2));var z=this.findOne(".top-right").x()<G.x?-1:1,D=this.findOne(".top-right").y()>G.y?-1:1;C=L*this.cos*z,x=L*this.sin*D,this.findOne(".top-right").x(G.x+C),this.findOne(".top-right").y(G.y-x)}var K=A.position();this.findOne(".top-left").y(K.y),this.findOne(".bottom-right").x(K.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(A.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(A.x());else if(this._movingAnchorName==="bottom-left"){if(V){var G=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};L=Math.sqrt(Math.pow(G.x-A.x(),2)+Math.pow(A.y()-G.y,2));var z=G.x<A.x()?-1:1,D=A.y()<G.y?-1:1;C=L*this.cos*z,x=L*this.sin*D,A.x(G.x-C),A.y(G.y+x)}K=A.position(),this.findOne(".top-left").x(K.x),this.findOne(".bottom-right").y(K.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(A.y());else if(this._movingAnchorName==="bottom-right"){if(V){var G=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};L=Math.sqrt(Math.pow(A.x()-G.x,2)+Math.pow(A.y()-G.y,2));var z=this.findOne(".bottom-right").x()<G.x?-1:1,D=this.findOne(".bottom-right").y()<G.y?-1:1;C=L*this.cos*z,x=L*this.sin*D,this.findOne(".bottom-right").x(G.x+C),this.findOne(".bottom-right").y(G.y+x)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var ne=this.centeredScaling()||j.altKey;if(ne){const se=this.findOne(".top-left"),ce=this.findOne(".bottom-right"),me=se.x(),Se=se.y(),Oe=this.getWidth()-ce.x(),Ne=this.getHeight()-ce.y();ce.move({x:-me,y:-Se}),se.move({x:Oe,y:Ne})}const Q=this.findOne(".top-left").getAbsolutePosition();C=Q.x,x=Q.y;const ee=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),ae=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:C,y:x,width:ee,height:ae,rotation:o.Konva.getAngle(this.rotation())},j)}_handleMouseUp(j){this._removeEvents(j)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(j){var C;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const x=this.getNode();O--,this._fire("transformend",{evt:j,target:x}),(C=this.getLayer())===null||C===void 0||C.batchDraw(),x&&this._nodes.forEach(L=>{var A;L._fire("transformend",{evt:j,target:L}),(A=L.getLayer())===null||A===void 0||A.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(j,C){const x=this._getNodeRect(),L=1;if(e.Util._inRange(j.width,-this.padding()*2-L,L)){this.update();return}if(e.Util._inRange(j.height,-this.padding()*2-L,L)){this.update();return}const A=new e.Transform;if(A.rotate(o.Konva.getAngle(this.rotation())),this._movingAnchorName&&j.width<0&&this._movingAnchorName.indexOf("left")>=0){const V=A.point({x:-this.padding()*2,y:0});j.x+=V.x,j.y+=V.y,j.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y}else if(this._movingAnchorName&&j.width<0&&this._movingAnchorName.indexOf("right")>=0){const V=A.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,j.width+=this.padding()*2}if(this._movingAnchorName&&j.height<0&&this._movingAnchorName.indexOf("top")>=0){const V=A.point({x:0,y:-this.padding()*2});j.x+=V.x,j.y+=V.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,j.height+=this.padding()*2}else if(this._movingAnchorName&&j.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const V=A.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,j.height+=this.padding()*2}if(this.boundBoxFunc()){const V=this.boundBoxFunc()(x,j);V?j=V:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const N=1e7,F=new e.Transform;F.translate(x.x,x.y),F.rotate(x.rotation),F.scale(x.width/N,x.height/N);const U=new e.Transform,W=j.width/N,$=j.height/N;this.flipEnabled()===!1?(U.translate(j.x,j.y),U.rotate(j.rotation),U.translate(j.width<0?j.width:0,j.height<0?j.height:0),U.scale(Math.abs(W),Math.abs($))):(U.translate(j.x,j.y),U.rotate(j.rotation),U.scale(W,$));const Z=U.multiply(F.invert());this._nodes.forEach(V=>{var G;const z=V.getParent().getAbsoluteTransform(),D=V.getTransform().copy();D.translate(V.offsetX(),V.offsetY());const K=new e.Transform;K.multiply(z.copy().invert()).multiply(Z).multiply(z).multiply(D);const ne=K.decompose();V.setAttrs(ne),(G=V.getLayer())===null||G===void 0||G.batchDraw()}),this.rotation(e.Util._getRotation(j.rotation)),this._nodes.forEach(V=>{this._fire("transform",{evt:C,target:V}),V._fire("transform",{evt:C,target:V})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(j,C){this.findOne(j).setAttrs(C)}update(){var j;const C=this._getNodeRect();this.rotation(e.Util._getRotation(C.rotation));const x=C.width,L=C.height,A=this.enabledAnchors(),N=this.resizeEnabled(),F=this.padding(),U=this.anchorSize(),W=this.find("._anchor");W.forEach(Z=>{Z.setAttrs({width:U,height:U,offsetX:U/2,offsetY:U/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:U/2+F,offsetY:U/2+F,visible:N&&A.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:x/2,y:0,offsetY:U/2+F,visible:N&&A.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x,y:0,offsetX:U/2-F,offsetY:U/2+F,visible:N&&A.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:L/2,offsetX:U/2+F,visible:N&&A.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x,y:L/2,offsetX:U/2-F,visible:N&&A.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:L,offsetX:U/2+F,offsetY:U/2-F,visible:N&&A.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:x/2,y:L,offsetY:U/2-F,visible:N&&A.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x,y:L,offsetX:U/2-F,offsetY:U/2-F,visible:N&&A.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:x/2,y:-this.rotateAnchorOffset()*e.Util._sign(L)-F,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:x,height:L,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const $=this.anchorStyleFunc();$&&W.forEach(Z=>{$(Z)}),(j=this.getLayer())===null||j===void 0||j.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const j=this.findOne("."+this._movingAnchorName);j&&j.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),i.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return t.Node.prototype.toObject.call(this)}clone(j){return t.Node.prototype.clone.call(this,j)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}vd.Transformer=I,I.isTransforming=()=>O>0;function T(M){return M instanceof Array||e.Util.warn("enabledAnchors value should be an array"),M instanceof Array&&M.forEach(function(j){S.indexOf(j)===-1&&e.Util.warn("Unknown anchor name: "+j+". Available names are: "+S.join(", "))}),M||[]}return I.prototype.className="Transformer",(0,u._registerNode)(I),r.Factory.addGetterSetter(I,"enabledAnchors",S,T),r.Factory.addGetterSetter(I,"flipEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(I,"resizeEnabled",!0),r.Factory.addGetterSetter(I,"anchorSize",10,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"rotateEnabled",!0),r.Factory.addGetterSetter(I,"rotateLineVisible",!0),r.Factory.addGetterSetter(I,"rotationSnaps",[]),r.Factory.addGetterSetter(I,"rotateAnchorOffset",50,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"rotateAnchorCursor","crosshair"),r.Factory.addGetterSetter(I,"rotationSnapTolerance",5,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"borderEnabled",!0),r.Factory.addGetterSetter(I,"anchorStroke","rgb(0, 161, 255)"),r.Factory.addGetterSetter(I,"anchorStrokeWidth",1,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"anchorFill","white"),r.Factory.addGetterSetter(I,"anchorCornerRadius",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"borderStroke","rgb(0, 161, 255)"),r.Factory.addGetterSetter(I,"borderStrokeWidth",1,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"borderDash"),r.Factory.addGetterSetter(I,"keepRatio",!0),r.Factory.addGetterSetter(I,"shiftBehavior","default"),r.Factory.addGetterSetter(I,"centeredScaling",!1),r.Factory.addGetterSetter(I,"ignoreStroke",!1),r.Factory.addGetterSetter(I,"padding",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"nodes"),r.Factory.addGetterSetter(I,"node"),r.Factory.addGetterSetter(I,"boundBoxFunc"),r.Factory.addGetterSetter(I,"anchorDragBoundFunc"),r.Factory.addGetterSetter(I,"anchorStyleFunc"),r.Factory.addGetterSetter(I,"shouldOverdrawWholeArea",!1),r.Factory.addGetterSetter(I,"useSingleNodeRotation",!0),r.Factory.backCompat(I,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),vd}var md={},w5;function XS(){if(w5)return md;w5=1,Object.defineProperty(md,"__esModule",{value:!0}),md.Wedge=void 0;const e=Hr(),r=Ma(),t=Mr(),n=Wr(),a=Mr();class i extends r.Shape{_sceneFunc(l){l.beginPath(),l.arc(0,0,this.radius(),0,t.Konva.getAngle(this.angle()),this.clockwise()),l.lineTo(0,0),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(l){this.radius(l/2)}setHeight(l){this.radius(l/2)}}return md.Wedge=i,i.prototype.className="Wedge",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1),e.Factory.backCompat(i,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),md}var yd={},_5;function KS(){if(_5)return yd;_5=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.Blur=void 0;const e=Hr(),r=Ji(),t=Wr();function n(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],i=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function o(u,c){const h=u.data,p=u.width,w=u.height;let d,_,E,S,m,g,v,b,O,I,T,M,j,C,x,L,A,N,F,U,W,$,Z,V;const G=c+c+1,z=p-1,D=w-1,K=c+1,ne=K*(K+1)/2,Q=new n,ee=a[c],ae=i[c];let se=null,ce=Q,me=null,Se=null;for(E=1;E<G;E++)ce=ce.next=new n,E===K&&(se=ce);for(ce.next=Q,v=g=0,_=0;_<w;_++){for(L=A=N=F=b=O=I=T=0,M=K*(U=h[g]),j=K*(W=h[g+1]),C=K*($=h[g+2]),x=K*(Z=h[g+3]),b+=ne*U,O+=ne*W,I+=ne*$,T+=ne*Z,ce=Q,E=0;E<K;E++)ce.r=U,ce.g=W,ce.b=$,ce.a=Z,ce=ce.next;for(E=1;E<K;E++)S=g+((z<E?z:E)<<2),b+=(ce.r=U=h[S])*(V=K-E),O+=(ce.g=W=h[S+1])*V,I+=(ce.b=$=h[S+2])*V,T+=(ce.a=Z=h[S+3])*V,L+=U,A+=W,N+=$,F+=Z,ce=ce.next;for(me=Q,Se=se,d=0;d<p;d++)h[g+3]=Z=T*ee>>ae,Z!==0?(Z=255/Z,h[g]=(b*ee>>ae)*Z,h[g+1]=(O*ee>>ae)*Z,h[g+2]=(I*ee>>ae)*Z):h[g]=h[g+1]=h[g+2]=0,b-=M,O-=j,I-=C,T-=x,M-=me.r,j-=me.g,C-=me.b,x-=me.a,S=v+((S=d+c+1)<z?S:z)<<2,L+=me.r=h[S],A+=me.g=h[S+1],N+=me.b=h[S+2],F+=me.a=h[S+3],b+=L,O+=A,I+=N,T+=F,me=me.next,M+=U=Se.r,j+=W=Se.g,C+=$=Se.b,x+=Z=Se.a,L-=U,A-=W,N-=$,F-=Z,Se=Se.next,g+=4;v+=p}for(d=0;d<p;d++){for(A=N=F=L=O=I=T=b=0,g=d<<2,M=K*(U=h[g]),j=K*(W=h[g+1]),C=K*($=h[g+2]),x=K*(Z=h[g+3]),b+=ne*U,O+=ne*W,I+=ne*$,T+=ne*Z,ce=Q,E=0;E<K;E++)ce.r=U,ce.g=W,ce.b=$,ce.a=Z,ce=ce.next;for(m=p,E=1;E<=c;E++)g=m+d<<2,b+=(ce.r=U=h[g])*(V=K-E),O+=(ce.g=W=h[g+1])*V,I+=(ce.b=$=h[g+2])*V,T+=(ce.a=Z=h[g+3])*V,L+=U,A+=W,N+=$,F+=Z,ce=ce.next,E<D&&(m+=p);for(g=d,me=Q,Se=se,_=0;_<w;_++)S=g<<2,h[S+3]=Z=T*ee>>ae,Z>0?(Z=255/Z,h[S]=(b*ee>>ae)*Z,h[S+1]=(O*ee>>ae)*Z,h[S+2]=(I*ee>>ae)*Z):h[S]=h[S+1]=h[S+2]=0,b-=M,O-=j,I-=C,T-=x,M-=me.r,j-=me.g,C-=me.b,x-=me.a,S=d+((S=_+K)<D?S:D)*p<<2,b+=L+=me.r=h[S],O+=A+=me.g=h[S+1],I+=N+=me.b=h[S+2],T+=F+=me.a=h[S+3],me=me.next,M+=U=Se.r,j+=W=Se.g,C+=$=Se.b,x+=Z=Se.a,L-=U,A-=W,N-=$,F-=Z,Se=Se.next,g+=p}}const l=function(c){const h=Math.round(this.blurRadius());h>0&&o(c,h)};return yd.Blur=l,e.Factory.addGetterSetter(r.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),yd}var bd={},S5;function ZS(){if(S5)return bd;S5=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.Brighten=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=this.brightness()*255,o=a.data,l=o.length;for(let u=0;u<l;u+=4)o[u]+=i,o[u+1]+=i,o[u+2]+=i};return bd.Brighten=n,e.Factory.addGetterSetter(r.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),bd}var wd={},x5;function QS(){if(x5)return wd;x5=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.Contrast=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=Math.pow((this.contrast()+100)/100,2),o=a.data,l=o.length;let u=150,c=150,h=150;for(let p=0;p<l;p+=4)u=o[p],c=o[p+1],h=o[p+2],u/=255,u-=.5,u*=i,u+=.5,u*=255,c/=255,c-=.5,c*=i,c+=.5,c*=255,h/=255,h-=.5,h*=i,h+=.5,h*=255,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,h=h<0?0:h>255?255:h,o[p]=u,o[p+1]=c,o[p+2]=h};return wd.Contrast=n,e.Factory.addGetterSetter(r.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),wd}var _d={},E5;function JS(){if(E5)return _d;E5=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.Emboss=void 0;const e=Hr(),r=Ji(),t=Li(),n=Wr(),a=function(i){const o=this.embossStrength()*10,l=this.embossWhiteLevel()*255,u=this.embossDirection(),c=this.embossBlend(),h=i.data,p=i.width,w=i.height,d=p*4;let _=0,E=0,S=w;switch(u){case"top-left":_=-1,E=-1;break;case"top":_=-1,E=0;break;case"top-right":_=-1,E=1;break;case"right":_=0,E=1;break;case"bottom-right":_=1,E=1;break;case"bottom":_=1,E=0;break;case"bottom-left":_=1,E=-1;break;case"left":_=0,E=-1;break;default:t.Util.error("Unknown emboss direction: "+u)}do{const m=(S-1)*d;let g=_;S+g<1&&(g=0),S+g>w&&(g=0);const v=(S-1+g)*p*4;let b=p;do{const O=m+(b-1)*4;let I=E;b+I<1&&(I=0),b+I>p&&(I=0);const T=v+(b-1+I)*4,M=h[O]-h[T],j=h[O+1]-h[T+1],C=h[O+2]-h[T+2];let x=M;const L=x>0?x:-x,A=j>0?j:-j,N=C>0?C:-C;if(A>L&&(x=j),N>L&&(x=C),x*=o,c){const F=h[O]+x,U=h[O+1]+x,W=h[O+2]+x;h[O]=F>255?255:F<0?0:F,h[O+1]=U>255?255:U<0?0:U,h[O+2]=W>255?255:W<0?0:W}else{let F=l-x;F<0?F=0:F>255&&(F=255),h[O]=h[O+1]=h[O+2]=F}}while(--b)}while(--S)};return _d.Emboss=a,e.Factory.addGetterSetter(r.Node,"embossStrength",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossWhiteLevel",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossDirection","top-left",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter),_d}var Sd={},P5;function ex(){if(P5)return Sd;P5=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.Enhance=void 0;const e=Hr(),r=Ji(),t=Wr();function n(i,o,l,u,c){const h=l-o,p=c-u;if(h===0)return u+p/2;if(p===0)return u;let w=(i-o)/h;return w=p*w+u,w}const a=function(i){const o=i.data,l=o.length;let u=o[0],c=u,h,p=o[1],w=p,d,_=o[2],E=_,S;const m=this.enhance();if(m===0)return;for(let x=0;x<l;x+=4)h=o[x+0],h<u?u=h:h>c&&(c=h),d=o[x+1],d<p?p=d:d>w&&(w=d),S=o[x+2],S<_?_=S:S>E&&(E=S);c===u&&(c=255,u=0),w===p&&(w=255,p=0),E===_&&(E=255,_=0);let g,v,b,O,I,T,M,j,C;m>0?(v=c+m*(255-c),b=u-m*(u-0),I=w+m*(255-w),T=p-m*(p-0),j=E+m*(255-E),C=_-m*(_-0)):(g=(c+u)*.5,v=c+m*(c-g),b=u+m*(u-g),O=(w+p)*.5,I=w+m*(w-O),T=p+m*(p-O),M=(E+_)*.5,j=E+m*(E-M),C=_+m*(_-M));for(let x=0;x<l;x+=4)o[x+0]=n(o[x+0],u,c,b,v),o[x+1]=n(o[x+1],p,w,T,I),o[x+2]=n(o[x+2],_,E,C,j)};return Sd.Enhance=a,e.Factory.addGetterSetter(r.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Sd}var xd={},O5;function tx(){if(O5)return xd;O5=1,Object.defineProperty(xd,"__esModule",{value:!0}),xd.Grayscale=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4){const i=.34*t[a]+.5*t[a+1]+.16*t[a+2];t[a]=i,t[a+1]=i,t[a+2]=i}};return xd.Grayscale=e,xd}var Ed={},A5;function rx(){if(A5)return Ed;A5=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.HSL=void 0;const e=Hr(),r=Ji(),t=Wr();e.Factory.addGetterSetter(r.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"luminance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter);const n=function(a){const i=a.data,o=i.length,l=1,u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,h=this.luminance()*127,p=l*u*Math.cos(c*Math.PI/180),w=l*u*Math.sin(c*Math.PI/180),d=.299*l+.701*p+.167*w,_=.587*l-.587*p+.33*w,E=.114*l-.114*p-.497*w,S=.299*l-.299*p-.328*w,m=.587*l+.413*p+.035*w,g=.114*l-.114*p+.293*w,v=.299*l-.3*p+1.25*w,b=.587*l-.586*p-1.05*w,O=.114*l+.886*p-.2*w;let I,T,M,j;for(let C=0;C<o;C+=4)I=i[C+0],T=i[C+1],M=i[C+2],j=i[C+3],i[C+0]=d*I+_*T+E*M+h,i[C+1]=S*I+m*T+g*M+h,i[C+2]=v*I+b*T+O*M+h,i[C+3]=j};return Ed.HSL=n,Ed}var Pd={},C5;function nx(){if(C5)return Pd;C5=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.HSV=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=a.data,o=i.length,l=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,h=l*u*Math.cos(c*Math.PI/180),p=l*u*Math.sin(c*Math.PI/180),w=.299*l+.701*h+.167*p,d=.587*l-.587*h+.33*p,_=.114*l-.114*h-.497*p,E=.299*l-.299*h-.328*p,S=.587*l+.413*h+.035*p,m=.114*l-.114*h+.293*p,g=.299*l-.3*h+1.25*p,v=.587*l-.586*h-1.05*p,b=.114*l+.886*h-.2*p;let O,I,T,M;for(let j=0;j<o;j+=4)O=i[j+0],I=i[j+1],T=i[j+2],M=i[j+3],i[j+0]=w*O+d*I+_*T,i[j+1]=E*O+S*I+m*T,i[j+2]=g*O+v*I+b*T,i[j+3]=M};return Pd.HSV=n,e.Factory.addGetterSetter(r.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"value",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Pd}var Od={},k5;function ix(){if(k5)return Od;k5=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.Invert=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4)t[a]=255-t[a],t[a+1]=255-t[a+1],t[a+2]=255-t[a+2]};return Od.Invert=e,Od}var Ad={},L5;function ax(){if(L5)return Ad;L5=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.Kaleidoscope=void 0;const e=Hr(),r=Ji(),t=Li(),n=Wr(),a=function(l,u,c){const h=l.data,p=u.data,w=l.width,d=l.height,_=c.polarCenterX||w/2,E=c.polarCenterY||d/2;let S=Math.sqrt(_*_+E*E),m=w-_,g=d-E;const v=Math.sqrt(m*m+g*g);S=v>S?v:S;const b=d,O=w,I=360/O*Math.PI/180;for(let T=0;T<O;T+=1){const M=Math.sin(T*I),j=Math.cos(T*I);for(let C=0;C<b;C+=1){m=Math.floor(_+S*C/b*j),g=Math.floor(E+S*C/b*M);let x=(g*w+m)*4;const L=h[x+0],A=h[x+1],N=h[x+2],F=h[x+3];x=(T+C*w)*4,p[x+0]=L,p[x+1]=A,p[x+2]=N,p[x+3]=F}}},i=function(l,u,c){const h=l.data,p=u.data,w=l.width,d=l.height,_=c.polarCenterX||w/2,E=c.polarCenterY||d/2;let S=Math.sqrt(_*_+E*E),m=w-_,g=d-E;const v=Math.sqrt(m*m+g*g);S=v>S?v:S;const b=d,O=w,I=0;let T,M;for(m=0;m<w;m+=1)for(g=0;g<d;g+=1){const j=m-_,C=g-E,x=Math.sqrt(j*j+C*C)*b/S;let L=(Math.atan2(C,j)*180/Math.PI+360+I)%360;L=L*O/360,T=Math.floor(L),M=Math.floor(x);let A=(M*w+T)*4;const N=h[A+0],F=h[A+1],U=h[A+2],W=h[A+3];A=(g*w+m)*4,p[A+0]=N,p[A+1]=F,p[A+2]=U,p[A+3]=W}},o=function(l){const u=l.width,c=l.height;let h,p,w,d,_,E,S,m,g,v,b=Math.round(this.kaleidoscopePower());const O=Math.round(this.kaleidoscopeAngle()),I=Math.floor(u*(O%360)/360);if(b<1)return;const T=t.Util.createCanvasElement();T.width=u,T.height=c;const M=T.getContext("2d").getImageData(0,0,u,c);t.Util.releaseCanvas(T),a(l,M,{polarCenterX:u/2,polarCenterY:c/2});let j=u/Math.pow(2,b);for(;j<=8;)j=j*2,b-=1;j=Math.ceil(j);let C=j,x=0,L=C,A=1;for(I+j>u&&(x=C,L=0,A=-1),p=0;p<c;p+=1)for(h=x;h!==L;h+=A)w=Math.round(h+I)%u,g=(u*p+w)*4,_=M.data[g+0],E=M.data[g+1],S=M.data[g+2],m=M.data[g+3],v=(u*p+h)*4,M.data[v+0]=_,M.data[v+1]=E,M.data[v+2]=S,M.data[v+3]=m;for(p=0;p<c;p+=1)for(C=Math.floor(j),d=0;d<b;d+=1){for(h=0;h<C+1;h+=1)g=(u*p+h)*4,_=M.data[g+0],E=M.data[g+1],S=M.data[g+2],m=M.data[g+3],v=(u*p+C*2-h-1)*4,M.data[v+0]=_,M.data[v+1]=E,M.data[v+2]=S,M.data[v+3]=m;C*=2}i(M,l,{})};return Ad.Kaleidoscope=o,e.Factory.addGetterSetter(r.Node,"kaleidoscopePower",2,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"kaleidoscopeAngle",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Ad}var Cd={},N5;function ox(){if(N5)return Cd;N5=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.Mask=void 0;const e=Hr(),r=Ji(),t=Wr();function n(w,d,_){let E=(_*w.width+d)*4;const S=[];return S.push(w.data[E++],w.data[E++],w.data[E++],w.data[E++]),S}function a(w,d){return Math.sqrt(Math.pow(w[0]-d[0],2)+Math.pow(w[1]-d[1],2)+Math.pow(w[2]-d[2],2))}function i(w){const d=[0,0,0];for(let _=0;_<w.length;_++)d[0]+=w[_][0],d[1]+=w[_][1],d[2]+=w[_][2];return d[0]/=w.length,d[1]/=w.length,d[2]/=w.length,d}function o(w,d){const _=n(w,0,0),E=n(w,w.width-1,0),S=n(w,0,w.height-1),m=n(w,w.width-1,w.height-1),g=d||10;if(a(_,E)<g&&a(E,m)<g&&a(m,S)<g&&a(S,_)<g){const v=i([E,_,m,S]),b=[];for(let O=0;O<w.width*w.height;O++){const I=a(v,[w.data[O*4],w.data[O*4+1],w.data[O*4+2]]);b[O]=I<g?0:255}return b}}function l(w,d){for(let _=0;_<w.width*w.height;_++)w.data[4*_+3]=d[_]}function u(w,d,_){const E=[1,1,1,1,0,1,1,1,1],S=Math.round(Math.sqrt(E.length)),m=Math.floor(S/2),g=[];for(let v=0;v<_;v++)for(let b=0;b<d;b++){const O=v*d+b;let I=0;for(let T=0;T<S;T++)for(let M=0;M<S;M++){const j=v+T-m,C=b+M-m;if(j>=0&&j<_&&C>=0&&C<d){const x=j*d+C,L=E[T*S+M];I+=w[x]*L}}g[O]=I===255*8?255:0}return g}function c(w,d,_){const E=[1,1,1,1,1,1,1,1,1],S=Math.round(Math.sqrt(E.length)),m=Math.floor(S/2),g=[];for(let v=0;v<_;v++)for(let b=0;b<d;b++){const O=v*d+b;let I=0;for(let T=0;T<S;T++)for(let M=0;M<S;M++){const j=v+T-m,C=b+M-m;if(j>=0&&j<_&&C>=0&&C<d){const x=j*d+C,L=E[T*S+M];I+=w[x]*L}}g[O]=I>=255*4?255:0}return g}function h(w,d,_){const E=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],S=Math.round(Math.sqrt(E.length)),m=Math.floor(S/2),g=[];for(let v=0;v<_;v++)for(let b=0;b<d;b++){const O=v*d+b;let I=0;for(let T=0;T<S;T++)for(let M=0;M<S;M++){const j=v+T-m,C=b+M-m;if(j>=0&&j<_&&C>=0&&C<d){const x=j*d+C,L=E[T*S+M];I+=w[x]*L}}g[O]=I}return g}const p=function(w){const d=this.threshold();let _=o(w,d);return _&&(_=u(_,w.width,w.height),_=c(_,w.width,w.height),_=h(_,w.width,w.height),l(w,_)),w};return Cd.Mask=p,e.Factory.addGetterSetter(r.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Cd}var kd={},T5;function sx(){if(T5)return kd;T5=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.Noise=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=this.noise()*255,o=a.data,l=o.length,u=i/2;for(let c=0;c<l;c+=4)o[c+0]+=u-2*u*Math.random(),o[c+1]+=u-2*u*Math.random(),o[c+2]+=u-2*u*Math.random()};return kd.Noise=n,e.Factory.addGetterSetter(r.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),kd}var Ld={},R5;function lx(){if(R5)return Ld;R5=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.Pixelate=void 0;const e=Hr(),r=Li(),t=Ji(),n=Wr(),a=function(i){let o=Math.ceil(this.pixelSize()),l=i.width,u=i.height,c,h,p,w,d,_,E,S=Math.ceil(l/o),m=Math.ceil(u/o),g,v,b,O,I,T,M,j=i.data;if(o<=0){r.Util.error("pixelSize value can not be <= 0");return}for(I=0;I<S;I+=1)for(T=0;T<m;T+=1){for(w=0,d=0,_=0,E=0,g=I*o,v=g+o,b=T*o,O=b+o,M=0,c=g;c<v;c+=1)if(!(c>=l))for(h=b;h<O;h+=1)h>=u||(p=(l*h+c)*4,w+=j[p+0],d+=j[p+1],_+=j[p+2],E+=j[p+3],M+=1);for(w=w/M,d=d/M,_=_/M,E=E/M,c=g;c<v;c+=1)if(!(c>=l))for(h=b;h<O;h+=1)h>=u||(p=(l*h+c)*4,j[p+0]=w,j[p+1]=d,j[p+2]=_,j[p+3]=E)}};return Ld.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Ld}var Nd={},M5;function ux(){if(M5)return Nd;M5=1,Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.Posterize=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=Math.round(this.levels()*254)+1,o=a.data,l=o.length,u=255/i;for(let c=0;c<l;c+=1)o[c]=Math.floor(o[c]/u)*u};return Nd.Posterize=n,e.Factory.addGetterSetter(r.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Nd}var Td={},I5;function cx(){if(I5)return Td;I5=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.RGB=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=a.data,o=i.length,l=this.red(),u=this.green(),c=this.blue();for(let h=0;h<o;h+=4){const p=(.34*i[h]+.5*i[h+1]+.16*i[h+2])/255;i[h]=p*l,i[h+1]=p*u,i[h+2]=p*c,i[h+3]=i[h+3]}};return Td.RGB=n,e.Factory.addGetterSetter(r.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),Td}var Rd={},j5;function fx(){if(j5)return Rd;j5=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.RGBA=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=a.data,o=i.length,l=this.red(),u=this.green(),c=this.blue(),h=this.alpha();for(let p=0;p<o;p+=4){const w=1-h;i[p]=l*h+i[p]*w,i[p+1]=u*h+i[p+1]*w,i[p+2]=c*h+i[p+2]*w}};return Rd.RGBA=n,e.Factory.addGetterSetter(r.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"alpha",1,function(a){return this._filterUpToDate=!1,a>1?1:a<0?0:a}),Rd}var Md={},F5;function hx(){if(F5)return Md;F5=1,Object.defineProperty(Md,"__esModule",{value:!0}),Md.Sepia=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4){const i=t[a+0],o=t[a+1],l=t[a+2];t[a+0]=Math.min(255,i*.393+o*.769+l*.189),t[a+1]=Math.min(255,i*.349+o*.686+l*.168),t[a+2]=Math.min(255,i*.272+o*.534+l*.131)}};return Md.Sepia=e,Md}var Id={},D5;function dx(){if(D5)return Id;D5=1,Object.defineProperty(Id,"__esModule",{value:!0}),Id.Solarize=void 0;const e=function(r){const t=r.data,n=r.width,a=r.height,i=n*4;let o=a;do{const l=(o-1)*i;let u=n;do{const c=l+(u-1)*4;let h=t[c],p=t[c+1],w=t[c+2];h>127&&(h=255-h),p>127&&(p=255-p),w>127&&(w=255-w),t[c]=h,t[c+1]=p,t[c+2]=w}while(--u)}while(--o)};return Id.Solarize=e,Id}var jd={},B5;function px(){if(B5)return jd;B5=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.Threshold=void 0;const e=Hr(),r=Ji(),t=Wr(),n=function(a){const i=this.threshold()*255,o=a.data,l=o.length;for(let u=0;u<l;u+=1)o[u]=o[u]<i?0:255};return jd.Threshold=n,e.Factory.addGetterSetter(r.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),jd}var q5;function gx(){if(q5)return Kh;q5=1,Object.defineProperty(Kh,"__esModule",{value:!0}),Kh.Konva=void 0;const e=S2(),r=jS(),t=DS(),n=BS(),a=qS(),i=zS(),o=US(),l=S6(),u=um(),c=x6(),h=HS(),p=GS(),w=VS(),d=WS(),_=E6(),E=$S(),S=YS(),m=XS(),g=KS(),v=ZS(),b=QS(),O=JS(),I=ex(),T=tx(),M=rx(),j=nx(),C=ix(),x=ax(),L=ox(),A=sx(),N=lx(),F=ux(),U=cx(),W=fx(),$=hx(),Z=dx(),V=px();return Kh.Konva=e.Konva.Util._assign(e.Konva,{Arc:r.Arc,Arrow:t.Arrow,Circle:n.Circle,Ellipse:a.Ellipse,Image:i.Image,Label:o.Label,Tag:o.Tag,Line:l.Line,Path:u.Path,Rect:c.Rect,RegularPolygon:h.RegularPolygon,Ring:p.Ring,Sprite:w.Sprite,Star:d.Star,Text:_.Text,TextPath:E.TextPath,Transformer:S.Transformer,Wedge:m.Wedge,Filters:{Blur:g.Blur,Brighten:v.Brighten,Contrast:b.Contrast,Emboss:O.Emboss,Enhance:I.Enhance,Grayscale:T.Grayscale,HSL:M.HSL,HSV:j.HSV,Invert:C.Invert,Kaleidoscope:x.Kaleidoscope,Mask:L.Mask,Noise:A.Noise,Pixelate:N.Pixelate,Posterize:F.Posterize,RGB:U.RGB,RGBA:W.RGBA,Sepia:$.Sepia,Solarize:Z.Solarize,Threshold:V.Threshold}}),Kh}var vx=m1.exports,z5;function Us(){if(z5)return m1.exports;z5=1,Object.defineProperty(vx,"__esModule",{value:!0});const e=gx();return m1.exports=e.Konva,m1.exports}Us();var s1={exports:{}},U5;function mx(){return U5||(U5=1,function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Konva=void 0;var t=S2();Object.defineProperty(r,"Konva",{enumerable:!0,get:function(){return t.Konva}});const n=S2();e.exports=n.Konva}(s1,s1.exports)),s1.exports}var yx=mx();const fp=mp(yx);var og={exports:{}};/**
|
|
44
|
-
* @license React
|
|
45
|
-
* react-reconciler.production.min.js
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license found in the
|
|
50
|
-
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var sg,H5;function bx(){return H5||(H5=1,sg=function(r){var t={},n=di(),a=D2(),i=Object.assign;function o(y){for(var P="https://reactjs.org/docs/error-decoder.html?invariant="+y,B=1;B<arguments.length;B++)P+="&args[]="+encodeURIComponent(arguments[B]);return"Minified React error #"+y+"; visit "+P+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),c=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),_=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),O=Symbol.iterator;function I(y){return y===null||typeof y!="object"?null:(y=O&&y[O]||y["@@iterator"],typeof y=="function"?y:null)}function T(y){if(y==null)return null;if(typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case h:return"Fragment";case c:return"Portal";case w:return"Profiler";case p:return"StrictMode";case S:return"Suspense";case m:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case _:return(y.displayName||"Context")+".Consumer";case d:return(y._context.displayName||"Context")+".Provider";case E:var P=y.render;return y=y.displayName,y||(y=P.displayName||P.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case g:return P=y.displayName||null,P!==null?P:T(y.type)||"Memo";case v:P=y._payload,y=y._init;try{return T(y(P))}catch{}}return null}function M(y){var P=y.type;switch(y.tag){case 24:return"Cache";case 9:return(P.displayName||"Context")+".Consumer";case 10:return(P._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return y=P.render,y=y.displayName||y.name||"",P.displayName||(y!==""?"ForwardRef("+y+")":"ForwardRef");case 7:return"Fragment";case 5:return P;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T(P);case 8:return P===p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P}return null}function j(y){var P=y,B=y;if(y.alternate)for(;P.return;)P=P.return;else{y=P;do P=y,(P.flags&4098)!==0&&(B=P.return),y=P.return;while(y)}return P.tag===3?B:null}function C(y){if(j(y)!==y)throw Error(o(188))}function x(y){var P=y.alternate;if(!P){if(P=j(y),P===null)throw Error(o(188));return P!==y?null:y}for(var B=y,X=P;;){var re=B.return;if(re===null)break;var le=re.alternate;if(le===null){if(X=re.return,X!==null){B=X;continue}break}if(re.child===le.child){for(le=re.child;le;){if(le===B)return C(re),y;if(le===X)return C(re),P;le=le.sibling}throw Error(o(188))}if(B.return!==X.return)B=re,X=le;else{for(var _e=!1,Ke=re.child;Ke;){if(Ke===B){_e=!0,B=re,X=le;break}if(Ke===X){_e=!0,X=re,B=le;break}Ke=Ke.sibling}if(!_e){for(Ke=le.child;Ke;){if(Ke===B){_e=!0,B=le,X=re;break}if(Ke===X){_e=!0,X=le,B=re;break}Ke=Ke.sibling}if(!_e)throw Error(o(189))}}if(B.alternate!==X)throw Error(o(190))}if(B.tag!==3)throw Error(o(188));return B.stateNode.current===B?y:P}function L(y){return y=x(y),y!==null?A(y):null}function A(y){if(y.tag===5||y.tag===6)return y;for(y=y.child;y!==null;){var P=A(y);if(P!==null)return P;y=y.sibling}return null}function N(y){if(y.tag===5||y.tag===6)return y;for(y=y.child;y!==null;){if(y.tag!==4){var P=N(y);if(P!==null)return P}y=y.sibling}return null}var F=Array.isArray,U=r.getPublicInstance,W=r.getRootHostContext,$=r.getChildHostContext,Z=r.prepareForCommit,V=r.resetAfterCommit,G=r.createInstance,z=r.appendInitialChild,D=r.finalizeInitialChildren,K=r.prepareUpdate,ne=r.shouldSetTextContent,Q=r.createTextInstance,ee=r.scheduleTimeout,ae=r.cancelTimeout,se=r.noTimeout,ce=r.isPrimaryRenderer,me=r.supportsMutation,Se=r.supportsPersistence,Oe=r.supportsHydration,Ne=r.getInstanceFromNode,xe=r.preparePortalMount,ve=r.getCurrentEventPriority,Xe=r.detachDeletedInstance,be=r.supportsMicrotasks,Ae=r.scheduleMicrotask,Ee=r.supportsTestSelectors,Le=r.findFiberRoot,he=r.getBoundingRect,ke=r.getTextContent,Re=r.isHiddenSubtree,$e=r.matchAccessibilityRole,vt=r.setFocusIfFocusable,wt=r.setupIntersectionObserver,at=r.appendChild,mt=r.appendChildToContainer,Je=r.commitTextUpdate,nt=r.commitMount,qt=r.commitUpdate,At=r.insertBefore,Ht=r.insertInContainerBefore,zt=r.removeChild,Ie=r.removeChildFromContainer,He=r.resetTextContent,Nt=r.hideInstance,ht=r.hideTextInstance,gt=r.unhideInstance,_t=r.unhideTextInstance,rr=r.clearContainer,Wt=r.cloneInstance,St=r.createContainerChildSet,it=r.appendChildToContainerChildSet,Bt=r.finalizeContainerChildren,Ue=r.replaceContainerChildren,De=r.cloneHiddenInstance,bt=r.cloneHiddenTextInstance,ze=r.canHydrateInstance,xt=r.canHydrateTextInstance,kt=r.canHydrateSuspenseInstance,Ft=r.isSuspenseInstancePending,Ut=r.isSuspenseInstanceFallback,Yt=r.getSuspenseInstanceFallbackErrorDetails,_r=r.registerSuspenseInstanceRetry,kr=r.getNextHydratableSibling,Lr=r.getFirstHydratableChild,Nr=r.getFirstHydratableChildWithinContainer,Wn=r.getFirstHydratableChildWithinSuspenseInstance,en=r.hydrateInstance,Qn=r.hydrateTextInstance,_i=r.hydrateSuspenseInstance,Ni=r.getNextHydratableInstanceAfterSuspenseInstance,Si=r.commitHydratedContainer,fa=r.commitHydratedSuspenseInstance,ws=r.clearSuspenseBoundary,Vo=r.clearSuspenseBoundaryFromContainer,tu=r.shouldDeleteUnhydratedTailInstances,vc=r.didNotMatchHydratedContainerTextInstance,Mn=r.didNotMatchHydratedTextInstance,Bu;function oo(y){if(Bu===void 0)try{throw Error()}catch(B){var P=B.stack.trim().match(/\n( *(at )?)/);Bu=P&&P[1]||""}return`
|
|
52
|
-
`+Bu+y}var dl=!1;function Hs(y,P){if(!y||dl)return"";dl=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(P)if(P=function(){throw Error()},Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(Lt){var X=Lt}Reflect.construct(y,[],P)}else{try{P.call()}catch(Lt){X=Lt}y.call(P.prototype)}else{try{throw Error()}catch(Lt){X=Lt}y()}}catch(Lt){if(Lt&&X&&typeof Lt.stack=="string"){for(var re=Lt.stack.split(`
|
|
53
|
-
`),le=X.stack.split(`
|
|
54
|
-
`),_e=re.length-1,Ke=le.length-1;1<=_e&&0<=Ke&&re[_e]!==le[Ke];)Ke--;for(;1<=_e&&0<=Ke;_e--,Ke--)if(re[_e]!==le[Ke]){if(_e!==1||Ke!==1)do if(_e--,Ke--,0>Ke||re[_e]!==le[Ke]){var ut=`
|
|
55
|
-
`+re[_e].replace(" at new "," at ");return y.displayName&&ut.includes("<anonymous>")&&(ut=ut.replace("<anonymous>",y.displayName)),ut}while(1<=_e&&0<=Ke);break}}}finally{dl=!1,Error.prepareStackTrace=B}return(y=y?y.displayName||y.name:"")?oo(y):""}var qu=Object.prototype.hasOwnProperty,ru=[],so=-1;function pi(y){return{current:y}}function Kr(y){0>so||(y.current=ru[so],ru[so]=null,so--)}function Ar(y,P){so++,ru[so]=y.current,y.current=P}var ln={},gi=pi(ln),Ti=pi(!1),Ia=ln;function ja(y,P){var B=y.type.contextTypes;if(!B)return ln;var X=y.stateNode;if(X&&X.__reactInternalMemoizedUnmaskedChildContext===P)return X.__reactInternalMemoizedMaskedChildContext;var re={},le;for(le in B)re[le]=P[le];return X&&(y=y.stateNode,y.__reactInternalMemoizedUnmaskedChildContext=P,y.__reactInternalMemoizedMaskedChildContext=re),re}function ii(y){return y=y.childContextTypes,y!=null}function Ri(){Kr(Ti),Kr(gi)}function pl(y,P,B){if(gi.current!==ln)throw Error(o(168));Ar(gi,P),Ar(Ti,B)}function ha(y,P,B){var X=y.stateNode;if(P=P.childContextTypes,typeof X.getChildContext!="function")return B;X=X.getChildContext();for(var re in X)if(!(re in P))throw Error(o(108,M(y)||"Unknown",re));return i({},B,X)}function Wo(y){return y=(y=y.stateNode)&&y.__reactInternalMemoizedMergedChildContext||ln,Ia=gi.current,Ar(gi,y),Ar(Ti,Ti.current),!0}function nu(y,P,B){var X=y.stateNode;if(!X)throw Error(o(169));B?(y=ha(y,P,Ia),X.__reactInternalMemoizedMergedChildContext=y,Kr(Ti),Kr(gi),Ar(gi,y)):Kr(Ti),Ar(Ti,B)}var da=Math.clz32?Math.clz32:iu,Gs=Math.log,af=Math.LN2;function iu(y){return y>>>=0,y===0?32:31-(Gs(y)/af|0)|0}var Ir=64,_s=4194304;function Vs(y){switch(y&-y){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return y&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return y&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return y}}function Ws(y,P){var B=y.pendingLanes;if(B===0)return 0;var X=0,re=y.suspendedLanes,le=y.pingedLanes,_e=B&268435455;if(_e!==0){var Ke=_e&~re;Ke!==0?X=Vs(Ke):(le&=_e,le!==0&&(X=Vs(le)))}else _e=B&~re,_e!==0?X=Vs(_e):le!==0&&(X=Vs(le));if(X===0)return 0;if(P!==0&&P!==X&&(P&re)===0&&(re=X&-X,le=P&-P,re>=le||re===16&&(le&4194240)!==0))return P;if((X&4)!==0&&(X|=B&16),P=y.entangledLanes,P!==0)for(y=y.entanglements,P&=X;0<P;)B=31-da(P),re=1<<B,X|=y[B],P&=~re;return X}function mc(y,P){switch(y){case 1:case 2:case 4:return P+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return P+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $o(y,P){for(var B=y.suspendedLanes,X=y.pingedLanes,re=y.expirationTimes,le=y.pendingLanes;0<le;){var _e=31-da(le),Ke=1<<_e,ut=re[_e];ut===-1?((Ke&B)===0||(Ke&X)!==0)&&(re[_e]=mc(Ke,P)):ut<=P&&(y.expiredLanes|=Ke),le&=~Ke}}function Ss(y){return y=y.pendingLanes&-1073741825,y!==0?y:y&1073741824?1073741824:0}function xs(){var y=Ir;return Ir<<=1,(Ir&4194240)===0&&(Ir=64),y}function Es(y){for(var P=[],B=0;31>B;B++)P.push(y);return P}function gn(y,P,B){y.pendingLanes|=P,P!==536870912&&(y.suspendedLanes=0,y.pingedLanes=0),y=y.eventTimes,P=31-da(P),y[P]=B}function Yo(y,P){var B=y.pendingLanes&~P;y.pendingLanes=P,y.suspendedLanes=0,y.pingedLanes=0,y.expiredLanes&=P,y.mutableReadLanes&=P,y.entangledLanes&=P,P=y.entanglements;var X=y.eventTimes;for(y=y.expirationTimes;0<B;){var re=31-da(B),le=1<<re;P[re]=0,X[re]=-1,y[re]=-1,B&=~le}}function Fa(y,P){var B=y.entangledLanes|=P;for(y=y.entanglements;B;){var X=31-da(B),re=1<<X;re&P|y[X]&P&&(y[X]|=P),B&=~re}}var It=0;function $s(y){return y&=-y,1<y?4<y?(y&268435455)!==0?16:536870912:4:1}var lo=a.unstable_scheduleCallback,Oo=a.unstable_cancelCallback,zu=a.unstable_shouldYield,Ys=a.unstable_requestPaint,In=a.unstable_now,Xs=a.unstable_ImmediatePriority,au=a.unstable_UserBlockingPriority,ou=a.unstable_NormalPriority,of=a.unstable_IdlePriority,uo=null,ai=null;function Da(y){if(ai&&typeof ai.onCommitFiberRoot=="function")try{ai.onCommitFiberRoot(uo,y,void 0,(y.current.flags&128)===128)}catch{}}function su(y,P){return y===P&&(y!==0||1/y===1/P)||y!==y&&P!==P}var Mi=typeof Object.is=="function"?Object.is:su,Ba=null,Ao=!1,Ps=!1;function gl(y){Ba===null?Ba=[y]:Ba.push(y)}function Uu(y){Ao=!0,gl(y)}function oi(){if(!Ps&&Ba!==null){Ps=!0;var y=0,P=It;try{var B=Ba;for(It=1;y<B.length;y++){var X=B[y];do X=X(!0);while(X!==null)}Ba=null,Ao=!1}catch(re){throw Ba!==null&&(Ba=Ba.slice(y+1)),lo(Xs,oi),re}finally{It=P,Ps=!1}}return null}var Ii=[],ji=0,vl=null,xa=0,wn=[],Fi=0,_n=null,ea=1,ta="";function qa(y,P){Ii[ji++]=xa,Ii[ji++]=vl,vl=y,xa=P}function lu(y,P,B){wn[Fi++]=ea,wn[Fi++]=ta,wn[Fi++]=_n,_n=y;var X=ea;y=ta;var re=32-da(X)-1;X&=~(1<<re),B+=1;var le=32-da(P)+re;if(30<le){var _e=re-re%5;le=(X&(1<<_e)-1).toString(32),X>>=_e,re-=_e,ea=1<<32-da(P)+re|B<<re|X,ta=le+y}else ea=1<<le|B<<re|X,ta=y}function Os(y){y.return!==null&&(qa(y,1),lu(y,1,0))}function Ks(y){for(;y===vl;)vl=Ii[--ji],Ii[ji]=null,xa=Ii[--ji],Ii[ji]=null;for(;y===_n;)_n=wn[--Fi],wn[Fi]=null,ta=wn[--Fi],wn[Fi]=null,ea=wn[--Fi],wn[Fi]=null}var $n=null,vi=null,tn=!1,Zs=!1,za=null;function ml(y,P){var B=Uo(5,null,null,0);B.elementType="DELETED",B.stateNode=P,B.return=y,P=y.deletions,P===null?(y.deletions=[B],y.flags|=16):P.push(B)}function Xo(y,P){switch(y.tag){case 5:return P=ze(P,y.type,y.pendingProps),P!==null?(y.stateNode=P,$n=y,vi=Lr(P),!0):!1;case 6:return P=xt(P,y.pendingProps),P!==null?(y.stateNode=P,$n=y,vi=null,!0):!1;case 13:if(P=kt(P),P!==null){var B=_n!==null?{id:ea,overflow:ta}:null;return y.memoizedState={dehydrated:P,treeContext:B,retryLane:1073741824},B=Uo(18,null,null,0),B.stateNode=P,B.return=y,y.child=B,$n=y,vi=null,!0}return!1;default:return!1}}function yl(y){return(y.mode&1)!==0&&(y.flags&128)===0}function Ko(y){if(tn){var P=vi;if(P){var B=P;if(!Xo(y,P)){if(yl(y))throw Error(o(418));P=kr(B);var X=$n;P&&Xo(y,P)?ml(X,B):(y.flags=y.flags&-4097|2,tn=!1,$n=y)}}else{if(yl(y))throw Error(o(418));y.flags=y.flags&-4097|2,tn=!1,$n=y}}}function uu(y){for(y=y.return;y!==null&&y.tag!==5&&y.tag!==3&&y.tag!==13;)y=y.return;$n=y}function Y(y){if(!Oe||y!==$n)return!1;if(!tn)return uu(y),tn=!0,!1;if(y.tag!==3&&(y.tag!==5||tu(y.type)&&!ne(y.type,y.memoizedProps))){var P=vi;if(P){if(yl(y))throw fe(),Error(o(418));for(;P;)ml(y,P),P=kr(P)}}if(uu(y),y.tag===13){if(!Oe)throw Error(o(316));if(y=y.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(o(317));vi=Ni(y)}else vi=$n?kr(y.stateNode):null;return!0}function fe(){for(var y=vi;y;)y=kr(y)}function Ce(){Oe&&(vi=$n=null,Zs=tn=!1)}function je(y){za===null?za=[y]:za.push(y)}var et=l.ReactCurrentBatchConfig;function ft(y,P){if(Mi(y,P))return!0;if(typeof y!="object"||y===null||typeof P!="object"||P===null)return!1;var B=Object.keys(y),X=Object.keys(P);if(B.length!==X.length)return!1;for(X=0;X<B.length;X++){var re=B[X];if(!qu.call(P,re)||!Mi(y[re],P[re]))return!1}return!0}function Et(y){switch(y.tag){case 5:return oo(y.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return y=Hs(y.type,!1),y;case 11:return y=Hs(y.type.render,!1),y;case 1:return y=Hs(y.type,!0),y;default:return""}}function Dt(y,P,B){if(y=B.ref,y!==null&&typeof y!="function"&&typeof y!="object"){if(B._owner){if(B=B._owner,B){if(B.tag!==1)throw Error(o(309));var X=B.stateNode}if(!X)throw Error(o(147,y));var re=X,le=""+y;return P!==null&&P.ref!==null&&typeof P.ref=="function"&&P.ref._stringRef===le?P.ref:(P=function(_e){var Ke=re.refs;_e===null?delete Ke[le]:Ke[le]=_e},P._stringRef=le,P)}if(typeof y!="string")throw Error(o(284));if(!B._owner)throw Error(o(290,y))}return y}function ir(y,P){throw y=Object.prototype.toString.call(P),Error(o(31,y==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":y))}function gr(y){var P=y._init;return P(y._payload)}function dr(y){function P(ot,Ze){if(y){var dt=ot.deletions;dt===null?(ot.deletions=[Ze],ot.flags|=16):dt.push(Ze)}}function B(ot,Ze){if(!y)return null;for(;Ze!==null;)P(ot,Ze),Ze=Ze.sibling;return null}function X(ot,Ze){for(ot=new Map;Ze!==null;)Ze.key!==null?ot.set(Ze.key,Ze):ot.set(Ze.index,Ze),Ze=Ze.sibling;return ot}function re(ot,Ze){return ot=Eu(ot,Ze),ot.index=0,ot.sibling=null,ot}function le(ot,Ze,dt){return ot.index=dt,y?(dt=ot.alternate,dt!==null?(dt=dt.index,dt<Ze?(ot.flags|=2,Ze):dt):(ot.flags|=2,Ze)):(ot.flags|=1048576,Ze)}function _e(ot){return y&&ot.alternate===null&&(ot.flags|=2),ot}function Ke(ot,Ze,dt,$t){return Ze===null||Ze.tag!==6?(Ze=Cc(dt,ot.mode,$t),Ze.return=ot,Ze):(Ze=re(Ze,dt),Ze.return=ot,Ze)}function ut(ot,Ze,dt,$t){var ur=dt.type;return ur===h?Zt(ot,Ze,dt.props.children,$t,dt.key):Ze!==null&&(Ze.elementType===ur||typeof ur=="object"&&ur!==null&&ur.$$typeof===v&&gr(ur)===Ze.type)?($t=re(Ze,dt.props),$t.ref=Dt(ot,Ze,dt),$t.return=ot,$t):($t=Yf(dt.type,dt.key,dt.props,null,ot.mode,$t),$t.ref=Dt(ot,Ze,dt),$t.return=ot,$t)}function Lt(ot,Ze,dt,$t){return Ze===null||Ze.tag!==4||Ze.stateNode.containerInfo!==dt.containerInfo||Ze.stateNode.implementation!==dt.implementation?(Ze=Xf(dt,ot.mode,$t),Ze.return=ot,Ze):(Ze=re(Ze,dt.children||[]),Ze.return=ot,Ze)}function Zt(ot,Ze,dt,$t,ur){return Ze===null||Ze.tag!==7?(Ze=ma(dt,ot.mode,$t,ur),Ze.return=ot,Ze):(Ze=re(Ze,dt),Ze.return=ot,Ze)}function br(ot,Ze,dt){if(typeof Ze=="string"&&Ze!==""||typeof Ze=="number")return Ze=Cc(""+Ze,ot.mode,dt),Ze.return=ot,Ze;if(typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case u:return dt=Yf(Ze.type,Ze.key,Ze.props,null,ot.mode,dt),dt.ref=Dt(ot,null,Ze),dt.return=ot,dt;case c:return Ze=Xf(Ze,ot.mode,dt),Ze.return=ot,Ze;case v:var $t=Ze._init;return br(ot,$t(Ze._payload),dt)}if(F(Ze)||I(Ze))return Ze=ma(Ze,ot.mode,dt,null),Ze.return=ot,Ze;ir(ot,Ze)}return null}function Vt(ot,Ze,dt,$t){var ur=Ze!==null?Ze.key:null;if(typeof dt=="string"&&dt!==""||typeof dt=="number")return ur!==null?null:Ke(ot,Ze,""+dt,$t);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case u:return dt.key===ur?ut(ot,Ze,dt,$t):null;case c:return dt.key===ur?Lt(ot,Ze,dt,$t):null;case v:return ur=dt._init,Vt(ot,Ze,ur(dt._payload),$t)}if(F(dt)||I(dt))return ur!==null?null:Zt(ot,Ze,dt,$t,null);ir(ot,dt)}return null}function Tn(ot,Ze,dt,$t,ur){if(typeof $t=="string"&&$t!==""||typeof $t=="number")return ot=ot.get(dt)||null,Ke(Ze,ot,""+$t,ur);if(typeof $t=="object"&&$t!==null){switch($t.$$typeof){case u:return ot=ot.get($t.key===null?dt:$t.key)||null,ut(Ze,ot,$t,ur);case c:return ot=ot.get($t.key===null?dt:$t.key)||null,Lt(Ze,ot,$t,ur);case v:var Cr=$t._init;return Tn(ot,Ze,dt,Cr($t._payload),ur)}if(F($t)||I($t))return ot=ot.get(dt)||null,Zt(Ze,ot,$t,ur,null);ir(Ze,$t)}return null}function mn(ot,Ze,dt,$t){for(var ur=null,Cr=null,wr=Ze,Gr=Ze=0,$i=null;wr!==null&&Gr<dt.length;Gr++){wr.index>Gr?($i=wr,wr=null):$i=wr.sibling;var Ur=Vt(ot,wr,dt[Gr],$t);if(Ur===null){wr===null&&(wr=$i);break}y&&wr&&Ur.alternate===null&&P(ot,wr),Ze=le(Ur,Ze,Gr),Cr===null?ur=Ur:Cr.sibling=Ur,Cr=Ur,wr=$i}if(Gr===dt.length)return B(ot,wr),tn&&qa(ot,Gr),ur;if(wr===null){for(;Gr<dt.length;Gr++)wr=br(ot,dt[Gr],$t),wr!==null&&(Ze=le(wr,Ze,Gr),Cr===null?ur=wr:Cr.sibling=wr,Cr=wr);return tn&&qa(ot,Gr),ur}for(wr=X(ot,wr);Gr<dt.length;Gr++)$i=Tn(wr,ot,Gr,dt[Gr],$t),$i!==null&&(y&&$i.alternate!==null&&wr.delete($i.key===null?Gr:$i.key),Ze=le($i,Ze,Gr),Cr===null?ur=$i:Cr.sibling=$i,Cr=$i);return y&&wr.forEach(function(ka){return P(ot,ka)}),tn&&qa(ot,Gr),ur}function to(ot,Ze,dt,$t){var ur=I(dt);if(typeof ur!="function")throw Error(o(150));if(dt=ur.call(dt),dt==null)throw Error(o(151));for(var Cr=ur=null,wr=Ze,Gr=Ze=0,$i=null,Ur=dt.next();wr!==null&&!Ur.done;Gr++,Ur=dt.next()){wr.index>Gr?($i=wr,wr=null):$i=wr.sibling;var ka=Vt(ot,wr,Ur.value,$t);if(ka===null){wr===null&&(wr=$i);break}y&&wr&&ka.alternate===null&&P(ot,wr),Ze=le(ka,Ze,Gr),Cr===null?ur=ka:Cr.sibling=ka,Cr=ka,wr=$i}if(Ur.done)return B(ot,wr),tn&&qa(ot,Gr),ur;if(wr===null){for(;!Ur.done;Gr++,Ur=dt.next())Ur=br(ot,Ur.value,$t),Ur!==null&&(Ze=le(Ur,Ze,Gr),Cr===null?ur=Ur:Cr.sibling=Ur,Cr=Ur);return tn&&qa(ot,Gr),ur}for(wr=X(ot,wr);!Ur.done;Gr++,Ur=dt.next())Ur=Tn(wr,ot,Gr,Ur.value,$t),Ur!==null&&(y&&Ur.alternate!==null&&wr.delete(Ur.key===null?Gr:Ur.key),Ze=le(Ur,Ze,Gr),Cr===null?ur=Ur:Cr.sibling=Ur,Cr=Ur);return y&&wr.forEach(function(v0){return P(ot,v0)}),tn&&qa(ot,Gr),ur}function ol(ot,Ze,dt,$t){if(typeof dt=="object"&&dt!==null&&dt.type===h&&dt.key===null&&(dt=dt.props.children),typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case u:e:{for(var ur=dt.key,Cr=Ze;Cr!==null;){if(Cr.key===ur){if(ur=dt.type,ur===h){if(Cr.tag===7){B(ot,Cr.sibling),Ze=re(Cr,dt.props.children),Ze.return=ot,ot=Ze;break e}}else if(Cr.elementType===ur||typeof ur=="object"&&ur!==null&&ur.$$typeof===v&&gr(ur)===Cr.type){B(ot,Cr.sibling),Ze=re(Cr,dt.props),Ze.ref=Dt(ot,Cr,dt),Ze.return=ot,ot=Ze;break e}B(ot,Cr);break}else P(ot,Cr);Cr=Cr.sibling}dt.type===h?(Ze=ma(dt.props.children,ot.mode,$t,dt.key),Ze.return=ot,ot=Ze):($t=Yf(dt.type,dt.key,dt.props,null,ot.mode,$t),$t.ref=Dt(ot,Ze,dt),$t.return=ot,ot=$t)}return _e(ot);case c:e:{for(Cr=dt.key;Ze!==null;){if(Ze.key===Cr)if(Ze.tag===4&&Ze.stateNode.containerInfo===dt.containerInfo&&Ze.stateNode.implementation===dt.implementation){B(ot,Ze.sibling),Ze=re(Ze,dt.children||[]),Ze.return=ot,ot=Ze;break e}else{B(ot,Ze);break}else P(ot,Ze);Ze=Ze.sibling}Ze=Xf(dt,ot.mode,$t),Ze.return=ot,ot=Ze}return _e(ot);case v:return Cr=dt._init,ol(ot,Ze,Cr(dt._payload),$t)}if(F(dt))return mn(ot,Ze,dt,$t);if(I(dt))return to(ot,Ze,dt,$t);ir(ot,dt)}return typeof dt=="string"&&dt!==""||typeof dt=="number"?(dt=""+dt,Ze!==null&&Ze.tag===6?(B(ot,Ze.sibling),Ze=re(Ze,dt),Ze.return=ot,ot=Ze):(B(ot,Ze),Ze=Cc(dt,ot.mode,$t),Ze.return=ot,ot=Ze),_e(ot)):B(ot,Ze)}return ol}var Sr=dr(!0),Cn=dr(!1),Sn=pi(null),jn=null,Jn=null,si=null;function Ua(){si=Jn=jn=null}function Ea(y,P,B){ce?(Ar(Sn,P._currentValue),P._currentValue=B):(Ar(Sn,P._currentValue2),P._currentValue2=B)}function Pa(y){var P=Sn.current;Kr(Sn),ce?y._currentValue=P:y._currentValue2=P}function Zo(y,P,B){for(;y!==null;){var X=y.alternate;if((y.childLanes&P)!==P?(y.childLanes|=P,X!==null&&(X.childLanes|=P)):X!==null&&(X.childLanes&P)!==P&&(X.childLanes|=P),y===B)break;y=y.return}}function Qo(y,P){jn=y,si=Jn=null,y=y.dependencies,y!==null&&y.firstContext!==null&&((y.lanes&P)!==0&&(ui=!0),y.firstContext=null)}function Di(y){var P=ce?y._currentValue:y._currentValue2;if(si!==y)if(y={context:y,memoizedValue:P,next:null},Jn===null){if(jn===null)throw Error(o(308));Jn=y,jn.dependencies={lanes:0,firstContext:y}}else Jn=Jn.next=y;return P}var Ha=null;function Qs(y){Ha===null?Ha=[y]:Ha.push(y)}function bl(y,P,B,X){var re=P.interleaved;return re===null?(B.next=B,Qs(P)):(B.next=re.next,re.next=B),P.interleaved=B,ra(y,X)}function ra(y,P){y.lanes|=P;var B=y.alternate;for(B!==null&&(B.lanes|=P),B=y,y=y.return;y!==null;)y.childLanes|=P,B=y.alternate,B!==null&&(B.childLanes|=P),B=y,y=y.return;return B.tag===3?B.stateNode:null}var rn=!1;function Js(y){y.updateQueue={baseState:y.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wl(y,P){y=y.updateQueue,P.updateQueue===y&&(P.updateQueue={baseState:y.baseState,firstBaseUpdate:y.firstBaseUpdate,lastBaseUpdate:y.lastBaseUpdate,shared:y.shared,effects:y.effects})}function Oa(y,P){return{eventTime:y,lane:P,tag:0,payload:null,callback:null,next:null}}function Ga(y,P,B){var X=y.updateQueue;if(X===null)return null;if(X=X.shared,(vr&2)!==0){var re=X.pending;return re===null?P.next=P:(P.next=re.next,re.next=P),X.pending=P,ra(y,B)}return re=X.interleaved,re===null?(P.next=P,Qs(X)):(P.next=re.next,re.next=P),X.interleaved=P,ra(y,B)}function xi(y,P,B){if(P=P.updateQueue,P!==null&&(P=P.shared,(B&4194240)!==0)){var X=P.lanes;X&=y.pendingLanes,B|=X,P.lanes=B,Fa(y,B)}}function el(y,P){var B=y.updateQueue,X=y.alternate;if(X!==null&&(X=X.updateQueue,B===X)){var re=null,le=null;if(B=B.firstBaseUpdate,B!==null){do{var _e={eventTime:B.eventTime,lane:B.lane,tag:B.tag,payload:B.payload,callback:B.callback,next:null};le===null?re=le=_e:le=le.next=_e,B=B.next}while(B!==null);le===null?re=le=P:le=le.next=P}else re=le=P;B={baseState:X.baseState,firstBaseUpdate:re,lastBaseUpdate:le,shared:X.shared,effects:X.effects},y.updateQueue=B;return}y=B.lastBaseUpdate,y===null?B.firstBaseUpdate=P:y.next=P,B.lastBaseUpdate=P}function co(y,P,B,X){var re=y.updateQueue;rn=!1;var le=re.firstBaseUpdate,_e=re.lastBaseUpdate,Ke=re.shared.pending;if(Ke!==null){re.shared.pending=null;var ut=Ke,Lt=ut.next;ut.next=null,_e===null?le=Lt:_e.next=Lt,_e=ut;var Zt=y.alternate;Zt!==null&&(Zt=Zt.updateQueue,Ke=Zt.lastBaseUpdate,Ke!==_e&&(Ke===null?Zt.firstBaseUpdate=Lt:Ke.next=Lt,Zt.lastBaseUpdate=ut))}if(le!==null){var br=re.baseState;_e=0,Zt=Lt=ut=null,Ke=le;do{var Vt=Ke.lane,Tn=Ke.eventTime;if((X&Vt)===Vt){Zt!==null&&(Zt=Zt.next={eventTime:Tn,lane:0,tag:Ke.tag,payload:Ke.payload,callback:Ke.callback,next:null});e:{var mn=y,to=Ke;switch(Vt=P,Tn=B,to.tag){case 1:if(mn=to.payload,typeof mn=="function"){br=mn.call(Tn,br,Vt);break e}br=mn;break e;case 3:mn.flags=mn.flags&-65537|128;case 0:if(mn=to.payload,Vt=typeof mn=="function"?mn.call(Tn,br,Vt):mn,Vt==null)break e;br=i({},br,Vt);break e;case 2:rn=!0}}Ke.callback!==null&&Ke.lane!==0&&(y.flags|=64,Vt=re.effects,Vt===null?re.effects=[Ke]:Vt.push(Ke))}else Tn={eventTime:Tn,lane:Vt,tag:Ke.tag,payload:Ke.payload,callback:Ke.callback,next:null},Zt===null?(Lt=Zt=Tn,ut=br):Zt=Zt.next=Tn,_e|=Vt;if(Ke=Ke.next,Ke===null){if(Ke=re.shared.pending,Ke===null)break;Vt=Ke,Ke=Vt.next,Vt.next=null,re.lastBaseUpdate=Vt,re.shared.pending=null}}while(!0);if(Zt===null&&(ut=br),re.baseState=ut,re.firstBaseUpdate=Lt,re.lastBaseUpdate=Zt,P=re.shared.interleaved,P!==null){re=P;do _e|=re.lane,re=re.next;while(re!==P)}else le===null&&(re.shared.lanes=0);Ns|=_e,y.lanes=_e,y.memoizedState=br}}function Hu(y,P,B){if(y=P.effects,P.effects=null,y!==null)for(P=0;P<y.length;P++){var X=y[P],re=X.callback;if(re!==null){if(X.callback=null,X=B,typeof re!="function")throw Error(o(191,re));re.call(X)}}}var mi={},Bi=pi(mi),As=pi(mi),Co=pi(mi);function yi(y){if(y===mi)throw Error(o(174));return y}function Jo(y,P){Ar(Co,P),Ar(As,y),Ar(Bi,mi),y=W(P),Kr(Bi),Ar(Bi,y)}function li(){Kr(Bi),Kr(As),Kr(Co)}function qi(y){var P=yi(Co.current),B=yi(Bi.current);P=$(B,y.type,P),B!==P&&(Ar(As,y),Ar(Bi,P))}function es(y){As.current===y&&(Kr(Bi),Kr(As))}var $r=pi(0);function fo(y){for(var P=y;P!==null;){if(P.tag===13){var B=P.memoizedState;if(B!==null&&(B=B.dehydrated,B===null||Ft(B)||Ut(B)))return P}else if(P.tag===19&&P.memoizedProps.revealOrder!==void 0){if((P.flags&128)!==0)return P}else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===y)break;for(;P.sibling===null;){if(P.return===null||P.return===y)return null;P=P.return}P.sibling.return=P.return,P=P.sibling}return null}var tl=[];function ko(){for(var y=0;y<tl.length;y++){var P=tl[y];ce?P._workInProgressVersionPrimary=null:P._workInProgressVersionSecondary=null}tl.length=0}var jr=l.ReactCurrentDispatcher,Lo=l.ReactCurrentBatchConfig,Yn=0,Tr=null,xn=null,Xn=null,ts=!1,No=!1,To=0,Va=0;function kn(){throw Error(o(321))}function ho(y,P){if(P===null)return!1;for(var B=0;B<P.length&&B<y.length;B++)if(!Mi(y[B],P[B]))return!1;return!0}function Ro(y,P,B,X,re,le){if(Yn=le,Tr=P,P.memoizedState=null,P.updateQueue=null,P.lanes=0,jr.current=y===null||y.memoizedState===null?Wu:Ol,y=B(X,re),No){le=0;do{if(No=!1,To=0,25<=le)throw Error(o(301));le+=1,Xn=xn=null,P.updateQueue=null,jr.current=uf,y=B(X,re)}while(No)}if(jr.current=ks,P=xn!==null&&xn.next!==null,Yn=0,Xn=xn=Tr=null,ts=!1,P)throw Error(o(300));return y}function Mo(){var y=To!==0;return To=0,y}function zi(){var y={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?Tr.memoizedState=Xn=y:Xn=Xn.next=y,Xn}function un(){if(xn===null){var y=Tr.alternate;y=y!==null?y.memoizedState:null}else y=xn.next;var P=Xn===null?Tr.memoizedState:Xn.next;if(P!==null)Xn=P,xn=y;else{if(y===null)throw Error(o(310));xn=y,y={memoizedState:xn.memoizedState,baseState:xn.baseState,baseQueue:xn.baseQueue,queue:xn.queue,next:null},Xn===null?Tr.memoizedState=Xn=y:Xn=Xn.next=y}return Xn}function Ei(y,P){return typeof P=="function"?P(y):P}function nn(y){var P=un(),B=P.queue;if(B===null)throw Error(o(311));B.lastRenderedReducer=y;var X=xn,re=X.baseQueue,le=B.pending;if(le!==null){if(re!==null){var _e=re.next;re.next=le.next,le.next=_e}X.baseQueue=re=le,B.pending=null}if(re!==null){le=re.next,X=X.baseState;var Ke=_e=null,ut=null,Lt=le;do{var Zt=Lt.lane;if((Yn&Zt)===Zt)ut!==null&&(ut=ut.next={lane:0,action:Lt.action,hasEagerState:Lt.hasEagerState,eagerState:Lt.eagerState,next:null}),X=Lt.hasEagerState?Lt.eagerState:y(X,Lt.action);else{var br={lane:Zt,action:Lt.action,hasEagerState:Lt.hasEagerState,eagerState:Lt.eagerState,next:null};ut===null?(Ke=ut=br,_e=X):ut=ut.next=br,Tr.lanes|=Zt,Ns|=Zt}Lt=Lt.next}while(Lt!==null&&Lt!==le);ut===null?_e=X:ut.next=Ke,Mi(X,P.memoizedState)||(ui=!0),P.memoizedState=X,P.baseState=_e,P.baseQueue=ut,B.lastRenderedState=X}if(y=B.interleaved,y!==null){re=y;do le=re.lane,Tr.lanes|=le,Ns|=le,re=re.next;while(re!==y)}else re===null&&(B.lanes=0);return[P.memoizedState,B.dispatch]}function Yr(y){var P=un(),B=P.queue;if(B===null)throw Error(o(311));B.lastRenderedReducer=y;var X=B.dispatch,re=B.pending,le=P.memoizedState;if(re!==null){B.pending=null;var _e=re=re.next;do le=y(le,_e.action),_e=_e.next;while(_e!==re);Mi(le,P.memoizedState)||(ui=!0),P.memoizedState=le,P.baseQueue===null&&(P.baseState=le),B.lastRenderedState=le}return[le,X]}function Fn(){}function ei(y,P){var B=Tr,X=un(),re=P(),le=!Mi(X.memoizedState,re);if(le&&(X.memoizedState=re,ui=!0),X=X.queue,El(rl.bind(null,B,X,y),[y]),X.getSnapshot!==P||le||Xn!==null&&Xn.memoizedState.tag&1){if(B.flags|=2048,bi(9,_l.bind(null,B,X,re,P),void 0,null),Jr===null)throw Error(o(349));(Yn&30)!==0||Io(B,P,re)}return re}function Io(y,P,B){y.flags|=16384,y={getSnapshot:P,value:B},P=Tr.updateQueue,P===null?(P={lastEffect:null,stores:null},Tr.updateQueue=P,P.stores=[y]):(B=P.stores,B===null?P.stores=[y]:B.push(y))}function _l(y,P,B,X){P.value=B,P.getSnapshot=X,cu(P)&&jo(y)}function rl(y,P,B){return B(function(){cu(P)&&jo(y)})}function cu(y){var P=y.getSnapshot;y=y.value;try{var B=P();return!Mi(y,B)}catch{return!0}}function jo(y){var P=ra(y,1);P!==null&&la(P,y,1,-1)}function Sl(y){var P=zi();return typeof y=="function"&&(y=y()),P.memoizedState=P.baseState=y,y={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:y},P.queue=y,y=y.dispatch=Bh.bind(null,Tr,y),[P.memoizedState,y]}function bi(y,P,B,X){return y={tag:y,create:P,destroy:B,deps:X,next:null},P=Tr.updateQueue,P===null?(P={lastEffect:null,stores:null},Tr.updateQueue=P,P.lastEffect=y.next=y):(B=P.lastEffect,B===null?P.lastEffect=y.next=y:(X=B.next,B.next=y,y.next=X,P.lastEffect=y)),y}function Wa(){return un().memoizedState}function xl(y,P,B,X){var re=zi();Tr.flags|=y,re.memoizedState=bi(1|P,B,void 0,X===void 0?null:X)}function Fo(y,P,B,X){var re=un();X=X===void 0?null:X;var le=void 0;if(xn!==null){var _e=xn.memoizedState;if(le=_e.destroy,X!==null&&ho(X,_e.deps)){re.memoizedState=bi(P,B,le,X);return}}Tr.flags|=y,re.memoizedState=bi(1|P,B,le,X)}function sf(y,P){return xl(8390656,8,y,P)}function El(y,P){return Fo(2048,8,y,P)}function fu(y,P){return Fo(4,2,y,P)}function cn(y,P){return Fo(4,4,y,P)}function Gu(y,P){if(typeof P=="function")return y=y(),P(y),function(){P(null)};if(P!=null)return y=y(),P.current=y,function(){P.current=null}}function Pl(y,P,B){return B=B!=null?B.concat([y]):null,Fo(4,4,Gu.bind(null,P,y),B)}function Cs(){}function hu(y,P){var B=un();P=P===void 0?null:P;var X=B.memoizedState;return X!==null&&P!==null&&ho(P,X[1])?X[0]:(B.memoizedState=[y,P],y)}function du(y,P){var B=un();P=P===void 0?null:P;var X=B.memoizedState;return X!==null&&P!==null&&ho(P,X[1])?X[0]:(y=y(),B.memoizedState=[y,P],y)}function pu(y,P,B){return(Yn&21)===0?(y.baseState&&(y.baseState=!1,ui=!0),y.memoizedState=B):(Mi(B,P)||(B=xs(),Tr.lanes|=B,Ns|=B,y.baseState=!0),P)}function yc(y,P){var B=It;It=B!==0&&4>B?B:4,y(!0);var X=Lo.transition;Lo.transition={};try{y(!1),P()}finally{It=B,Lo.transition=X}}function nl(){return un().memoizedState}function qf(y,P,B){var X=hi(y);if(B={lane:X,action:B,hasEagerState:!1,eagerState:null,next:null},zf(y))lf(P,B);else if(B=bl(y,P,B,X),B!==null){var re=bn();la(B,y,X,re),Vu(B,P,X)}}function Bh(y,P,B){var X=hi(y),re={lane:X,action:B,hasEagerState:!1,eagerState:null,next:null};if(zf(y))lf(P,re);else{var le=y.alternate;if(y.lanes===0&&(le===null||le.lanes===0)&&(le=P.lastRenderedReducer,le!==null))try{var _e=P.lastRenderedState,Ke=le(_e,B);if(re.hasEagerState=!0,re.eagerState=Ke,Mi(Ke,_e)){var ut=P.interleaved;ut===null?(re.next=re,Qs(P)):(re.next=ut.next,ut.next=re),P.interleaved=re;return}}catch{}finally{}B=bl(y,P,re,X),B!==null&&(re=bn(),la(B,y,X,re),Vu(B,P,X))}}function zf(y){var P=y.alternate;return y===Tr||P!==null&&P===Tr}function lf(y,P){No=ts=!0;var B=y.pending;B===null?P.next=P:(P.next=B.next,B.next=P),y.pending=P}function Vu(y,P,B){if((B&4194240)!==0){var X=P.lanes;X&=y.pendingLanes,B|=X,P.lanes=B,Fa(y,B)}}var ks={readContext:Di,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},Wu={readContext:Di,useCallback:function(y,P){return zi().memoizedState=[y,P===void 0?null:P],y},useContext:Di,useEffect:sf,useImperativeHandle:function(y,P,B){return B=B!=null?B.concat([y]):null,xl(4194308,4,Gu.bind(null,P,y),B)},useLayoutEffect:function(y,P){return xl(4194308,4,y,P)},useInsertionEffect:function(y,P){return xl(4,2,y,P)},useMemo:function(y,P){var B=zi();return P=P===void 0?null:P,y=y(),B.memoizedState=[y,P],y},useReducer:function(y,P,B){var X=zi();return P=B!==void 0?B(P):P,X.memoizedState=X.baseState=P,y={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:y,lastRenderedState:P},X.queue=y,y=y.dispatch=qf.bind(null,Tr,y),[X.memoizedState,y]},useRef:function(y){var P=zi();return y={current:y},P.memoizedState=y},useState:Sl,useDebugValue:Cs,useDeferredValue:function(y){return zi().memoizedState=y},useTransition:function(){var y=Sl(!1),P=y[0];return y=yc.bind(null,y[1]),zi().memoizedState=y,[P,y]},useMutableSource:function(){},useSyncExternalStore:function(y,P,B){var X=Tr,re=zi();if(tn){if(B===void 0)throw Error(o(407));B=B()}else{if(B=P(),Jr===null)throw Error(o(349));(Yn&30)!==0||Io(X,P,B)}re.memoizedState=B;var le={value:B,getSnapshot:P};return re.queue=le,sf(rl.bind(null,X,le,y),[y]),X.flags|=2048,bi(9,_l.bind(null,X,le,B,P),void 0,null),B},useId:function(){var y=zi(),P=Jr.identifierPrefix;if(tn){var B=ta,X=ea;B=(X&~(1<<32-da(X)-1)).toString(32)+B,P=":"+P+"R"+B,B=To++,0<B&&(P+="H"+B.toString(32)),P+=":"}else B=Va++,P=":"+P+"r"+B.toString(32)+":";return y.memoizedState=P},unstable_isNewReconciler:!1},Ol={readContext:Di,useCallback:hu,useContext:Di,useEffect:El,useImperativeHandle:Pl,useInsertionEffect:fu,useLayoutEffect:cn,useMemo:du,useReducer:nn,useRef:Wa,useState:function(){return nn(Ei)},useDebugValue:Cs,useDeferredValue:function(y){var P=un();return pu(P,xn.memoizedState,y)},useTransition:function(){var y=nn(Ei)[0],P=un().memoizedState;return[y,P]},useMutableSource:Fn,useSyncExternalStore:ei,useId:nl,unstable_isNewReconciler:!1},uf={readContext:Di,useCallback:hu,useContext:Di,useEffect:El,useImperativeHandle:Pl,useInsertionEffect:fu,useLayoutEffect:cn,useMemo:du,useReducer:Yr,useRef:Wa,useState:function(){return Yr(Ei)},useDebugValue:Cs,useDeferredValue:function(y){var P=un();return xn===null?P.memoizedState=y:pu(P,xn.memoizedState,y)},useTransition:function(){var y=Yr(Ei)[0],P=un().memoizedState;return[y,P]},useMutableSource:Fn,useSyncExternalStore:ei,useId:nl,unstable_isNewReconciler:!1};function $a(y,P){if(y&&y.defaultProps){P=i({},P),y=y.defaultProps;for(var B in y)P[B]===void 0&&(P[B]=y[B]);return P}return P}function bc(y,P,B,X){P=y.memoizedState,B=B(X,P),B=B==null?P:i({},P,B),y.memoizedState=B,y.lanes===0&&(y.updateQueue.baseState=B)}var $u={isMounted:function(y){return(y=y._reactInternals)?j(y)===y:!1},enqueueSetState:function(y,P,B){y=y._reactInternals;var X=bn(),re=hi(y),le=Oa(X,re);le.payload=P,B!=null&&(le.callback=B),P=Ga(y,le,re),P!==null&&(la(P,y,re,X),xi(P,y,re))},enqueueReplaceState:function(y,P,B){y=y._reactInternals;var X=bn(),re=hi(y),le=Oa(X,re);le.tag=1,le.payload=P,B!=null&&(le.callback=B),P=Ga(y,le,re),P!==null&&(la(P,y,re,X),xi(P,y,re))},enqueueForceUpdate:function(y,P){y=y._reactInternals;var B=bn(),X=hi(y),re=Oa(B,X);re.tag=2,P!=null&&(re.callback=P),P=Ga(y,re,X),P!==null&&(la(P,y,X,B),xi(P,y,X))}};function Uf(y,P,B,X,re,le,_e){return y=y.stateNode,typeof y.shouldComponentUpdate=="function"?y.shouldComponentUpdate(X,le,_e):P.prototype&&P.prototype.isPureReactComponent?!ft(B,X)||!ft(re,le):!0}function Hf(y,P,B){var X=!1,re=ln,le=P.contextType;return typeof le=="object"&&le!==null?le=Di(le):(re=ii(P)?Ia:gi.current,X=P.contextTypes,le=(X=X!=null)?ja(y,re):ln),P=new P(B,le),y.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=$u,y.stateNode=P,P._reactInternals=y,X&&(y=y.stateNode,y.__reactInternalMemoizedUnmaskedChildContext=re,y.__reactInternalMemoizedMaskedChildContext=le),P}function wc(y,P,B,X){y=P.state,typeof P.componentWillReceiveProps=="function"&&P.componentWillReceiveProps(B,X),typeof P.UNSAFE_componentWillReceiveProps=="function"&&P.UNSAFE_componentWillReceiveProps(B,X),P.state!==y&&$u.enqueueReplaceState(P,P.state,null)}function Ui(y,P,B,X){var re=y.stateNode;re.props=B,re.state=y.memoizedState,re.refs={},Js(y);var le=P.contextType;typeof le=="object"&&le!==null?re.context=Di(le):(le=ii(P)?Ia:gi.current,re.context=ja(y,le)),re.state=y.memoizedState,le=P.getDerivedStateFromProps,typeof le=="function"&&(bc(y,P,le,B),re.state=y.memoizedState),typeof P.getDerivedStateFromProps=="function"||typeof re.getSnapshotBeforeUpdate=="function"||typeof re.UNSAFE_componentWillMount!="function"&&typeof re.componentWillMount!="function"||(P=re.state,typeof re.componentWillMount=="function"&&re.componentWillMount(),typeof re.UNSAFE_componentWillMount=="function"&&re.UNSAFE_componentWillMount(),P!==re.state&&$u.enqueueReplaceState(re,re.state,null),co(y,B,re,X),re.state=y.memoizedState),typeof re.componentDidMount=="function"&&(y.flags|=4194308)}function Hi(y,P){try{var B="",X=P;do B+=Et(X),X=X.return;while(X);var re=B}catch(le){re=`
|
|
56
|
-
Error generating stack: `+le.message+`
|
|
57
|
-
`+le.stack}return{value:y,source:P,stack:re,digest:null}}function na(y,P,B){return{value:y,source:null,stack:B??null,digest:P??null}}function po(y,P){try{console.error(P.value)}catch(B){setTimeout(function(){throw B})}}var gu=typeof WeakMap=="function"?WeakMap:Map;function Gi(y,P,B){B=Oa(-1,B),B.tag=3,B.payload={element:null};var X=P.value;return B.callback=function(){zn||(zn=!0,Un=X),po(y,P)},B}function pa(y,P,B){B=Oa(-1,B),B.tag=3;var X=y.type.getDerivedStateFromError;if(typeof X=="function"){var re=P.value;B.payload=function(){return X(re)},B.callback=function(){po(y,P)}}var le=y.stateNode;return le!==null&&typeof le.componentDidCatch=="function"&&(B.callback=function(){po(y,P),typeof X!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var _e=P.stack;this.componentDidCatch(P.value,{componentStack:_e!==null?_e:""})}),B}function Gf(y,P,B){var X=y.pingCache;if(X===null){X=y.pingCache=new gu;var re=new Set;X.set(P,re)}else re=X.get(P),re===void 0&&(re=new Set,X.set(P,re));re.has(B)||(re.add(B),y=Np.bind(null,y,P,B),P.then(y,y))}function Vf(y){do{var P;if((P=y.tag===13)&&(P=y.memoizedState,P=P!==null?P.dehydrated!==null:!0),P)return y;y=y.return}while(y!==null);return null}function Ls(y,P,B,X,re){return(y.mode&1)===0?(y===P?y.flags|=65536:(y.flags|=128,B.flags|=131072,B.flags&=-52805,B.tag===1&&(B.alternate===null?B.tag=17:(P=Oa(-1,1),P.tag=2,Ga(B,P,1))),B.lanes|=1),y):(y.flags|=65536,y.lanes=re,y)}var vu=l.ReactCurrentOwner,ui=!1;function wi(y,P,B,X){P.child=y===null?Cn(P,null,B,X):Sr(P,y.child,B,X)}function _c(y,P,B,X,re){B=B.render;var le=P.ref;return Qo(P,re),X=Ro(y,P,B,X,le,re),B=Mo(),y!==null&&!ui?(P.updateQueue=y.updateQueue,P.flags&=-2053,y.lanes&=~re,te(y,P,re)):(tn&&B&&Os(P),P.flags|=1,wi(y,P,X,re),P.child)}function rs(y,P,B,X,re){if(y===null){var le=B.type;return typeof le=="function"&&!Oc(le)&&le.defaultProps===void 0&&B.compare===null&&B.defaultProps===void 0?(P.tag=15,P.type=le,go(y,P,le,X,re)):(y=Yf(B.type,null,X,P,P.mode,re),y.ref=P.ref,y.return=P,P.child=y)}if(le=y.child,(y.lanes&re)===0){var _e=le.memoizedProps;if(B=B.compare,B=B!==null?B:ft,B(_e,X)&&y.ref===P.ref)return te(y,P,re)}return P.flags|=1,y=Eu(le,X),y.ref=P.ref,y.return=P,P.child=y}function go(y,P,B,X,re){if(y!==null){var le=y.memoizedProps;if(ft(le,X)&&y.ref===P.ref)if(ui=!1,P.pendingProps=X=le,(y.lanes&re)!==0)(y.flags&131072)!==0&&(ui=!0);else return P.lanes=y.lanes,te(y,P,re)}return ns(y,P,B,X,re)}function Zr(y,P,B){var X=P.pendingProps,re=X.children,le=y!==null?y.memoizedState:null;if(X.mode==="hidden")if((P.mode&1)===0)P.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ar(qo,ti),ti|=B;else{if((B&1073741824)===0)return y=le!==null?le.baseLanes|B:B,P.lanes=P.childLanes=1073741824,P.memoizedState={baseLanes:y,cachePool:null,transitions:null},P.updateQueue=null,Ar(qo,ti),ti|=y,null;P.memoizedState={baseLanes:0,cachePool:null,transitions:null},X=le!==null?le.baseLanes:B,Ar(qo,ti),ti|=X}else le!==null?(X=le.baseLanes|B,P.memoizedState=null):X=B,Ar(qo,ti),ti|=X;return wi(y,P,re,B),P.child}function an(y,P){var B=P.ref;(y===null&&B!==null||y!==null&&y.ref!==B)&&(P.flags|=512,P.flags|=2097152)}function ns(y,P,B,X,re){var le=ii(B)?Ia:gi.current;return le=ja(P,le),Qo(P,re),B=Ro(y,P,B,X,le,re),X=Mo(),y!==null&&!ui?(P.updateQueue=y.updateQueue,P.flags&=-2053,y.lanes&=~re,te(y,P,re)):(tn&&X&&Os(P),P.flags|=1,wi(y,P,B,re),P.child)}function Pi(y,P,B,X,re){if(ii(B)){var le=!0;Wo(P)}else le=!1;if(Qo(P,re),P.stateNode===null)H(y,P),Hf(P,B,X),Ui(P,B,X,re),X=!0;else if(y===null){var _e=P.stateNode,Ke=P.memoizedProps;_e.props=Ke;var ut=_e.context,Lt=B.contextType;typeof Lt=="object"&&Lt!==null?Lt=Di(Lt):(Lt=ii(B)?Ia:gi.current,Lt=ja(P,Lt));var Zt=B.getDerivedStateFromProps,br=typeof Zt=="function"||typeof _e.getSnapshotBeforeUpdate=="function";br||typeof _e.UNSAFE_componentWillReceiveProps!="function"&&typeof _e.componentWillReceiveProps!="function"||(Ke!==X||ut!==Lt)&&wc(P,_e,X,Lt),rn=!1;var Vt=P.memoizedState;_e.state=Vt,co(P,X,_e,re),ut=P.memoizedState,Ke!==X||Vt!==ut||Ti.current||rn?(typeof Zt=="function"&&(bc(P,B,Zt,X),ut=P.memoizedState),(Ke=rn||Uf(P,B,Ke,X,Vt,ut,Lt))?(br||typeof _e.UNSAFE_componentWillMount!="function"&&typeof _e.componentWillMount!="function"||(typeof _e.componentWillMount=="function"&&_e.componentWillMount(),typeof _e.UNSAFE_componentWillMount=="function"&&_e.UNSAFE_componentWillMount()),typeof _e.componentDidMount=="function"&&(P.flags|=4194308)):(typeof _e.componentDidMount=="function"&&(P.flags|=4194308),P.memoizedProps=X,P.memoizedState=ut),_e.props=X,_e.state=ut,_e.context=Lt,X=Ke):(typeof _e.componentDidMount=="function"&&(P.flags|=4194308),X=!1)}else{_e=P.stateNode,wl(y,P),Ke=P.memoizedProps,Lt=P.type===P.elementType?Ke:$a(P.type,Ke),_e.props=Lt,br=P.pendingProps,Vt=_e.context,ut=B.contextType,typeof ut=="object"&&ut!==null?ut=Di(ut):(ut=ii(B)?Ia:gi.current,ut=ja(P,ut));var Tn=B.getDerivedStateFromProps;(Zt=typeof Tn=="function"||typeof _e.getSnapshotBeforeUpdate=="function")||typeof _e.UNSAFE_componentWillReceiveProps!="function"&&typeof _e.componentWillReceiveProps!="function"||(Ke!==br||Vt!==ut)&&wc(P,_e,X,ut),rn=!1,Vt=P.memoizedState,_e.state=Vt,co(P,X,_e,re);var mn=P.memoizedState;Ke!==br||Vt!==mn||Ti.current||rn?(typeof Tn=="function"&&(bc(P,B,Tn,X),mn=P.memoizedState),(Lt=rn||Uf(P,B,Lt,X,Vt,mn,ut)||!1)?(Zt||typeof _e.UNSAFE_componentWillUpdate!="function"&&typeof _e.componentWillUpdate!="function"||(typeof _e.componentWillUpdate=="function"&&_e.componentWillUpdate(X,mn,ut),typeof _e.UNSAFE_componentWillUpdate=="function"&&_e.UNSAFE_componentWillUpdate(X,mn,ut)),typeof _e.componentDidUpdate=="function"&&(P.flags|=4),typeof _e.getSnapshotBeforeUpdate=="function"&&(P.flags|=1024)):(typeof _e.componentDidUpdate!="function"||Ke===y.memoizedProps&&Vt===y.memoizedState||(P.flags|=4),typeof _e.getSnapshotBeforeUpdate!="function"||Ke===y.memoizedProps&&Vt===y.memoizedState||(P.flags|=1024),P.memoizedProps=X,P.memoizedState=mn),_e.props=X,_e.state=mn,_e.context=ut,X=Lt):(typeof _e.componentDidUpdate!="function"||Ke===y.memoizedProps&&Vt===y.memoizedState||(P.flags|=4),typeof _e.getSnapshotBeforeUpdate!="function"||Ke===y.memoizedProps&&Vt===y.memoizedState||(P.flags|=1024),X=!1)}return ia(y,P,B,X,le,re)}function ia(y,P,B,X,re,le){an(y,P);var _e=(P.flags&128)!==0;if(!X&&!_e)return re&&nu(P,B,!1),te(y,P,le);X=P.stateNode,vu.current=P;var Ke=_e&&typeof B.getDerivedStateFromError!="function"?null:X.render();return P.flags|=1,y!==null&&_e?(P.child=Sr(P,y.child,null,le),P.child=Sr(P,null,Ke,le)):wi(y,P,Ke,le),P.memoizedState=X.state,re&&nu(P,B,!0),P.child}function il(y){var P=y.stateNode;P.pendingContext?pl(y,P.pendingContext,P.pendingContext!==P.context):P.context&&pl(y,P.context,!1),Jo(y,P.containerInfo)}function Al(y,P,B,X,re){return Ce(),je(re),P.flags|=256,wi(y,P,B,X),P.child}var aa={dehydrated:null,treeContext:null,retryLane:0};function mu(y){return{baseLanes:y,cachePool:null,transitions:null}}function cf(y,P,B){var X=P.pendingProps,re=$r.current,le=!1,_e=(P.flags&128)!==0,Ke;if((Ke=_e)||(Ke=y!==null&&y.memoizedState===null?!1:(re&2)!==0),Ke?(le=!0,P.flags&=-129):(y===null||y.memoizedState!==null)&&(re|=1),Ar($r,re&1),y===null)return Ko(P),y=P.memoizedState,y!==null&&(y=y.dehydrated,y!==null)?((P.mode&1)===0?P.lanes=1:Ut(y)?P.lanes=8:P.lanes=1073741824,null):(_e=X.children,y=X.fallback,le?(X=P.mode,le=P.child,_e={mode:"hidden",children:_e},(X&1)===0&&le!==null?(le.childLanes=0,le.pendingProps=_e):le=Ac(_e,X,0,null),y=ma(y,X,B,null),le.return=P,y.return=P,le.sibling=y,P.child=le,P.child.memoizedState=mu(B),P.memoizedState=aa,y):Yu(P,_e));if(re=y.memoizedState,re!==null&&(Ke=re.dehydrated,Ke!==null))return Wf(y,P,_e,X,Ke,re,B);if(le){le=X.fallback,_e=P.mode,re=y.child,Ke=re.sibling;var ut={mode:"hidden",children:X.children};return(_e&1)===0&&P.child!==re?(X=P.child,X.childLanes=0,X.pendingProps=ut,P.deletions=null):(X=Eu(re,ut),X.subtreeFlags=re.subtreeFlags&14680064),Ke!==null?le=Eu(Ke,le):(le=ma(le,_e,B,null),le.flags|=2),le.return=P,X.return=P,X.sibling=le,P.child=X,X=le,le=P.child,_e=y.child.memoizedState,_e=_e===null?mu(B):{baseLanes:_e.baseLanes|B,cachePool:null,transitions:_e.transitions},le.memoizedState=_e,le.childLanes=y.childLanes&~B,P.memoizedState=aa,X}return le=y.child,y=le.sibling,X=Eu(le,{mode:"visible",children:X.children}),(P.mode&1)===0&&(X.lanes=B),X.return=P,X.sibling=null,y!==null&&(B=P.deletions,B===null?(P.deletions=[y],P.flags|=16):B.push(y)),P.child=X,P.memoizedState=null,X}function Yu(y,P){return P=Ac({mode:"visible",children:P},y.mode,0,null),P.return=y,y.child=P}function is(y,P,B,X){return X!==null&&je(X),Sr(P,y.child,null,B),y=Yu(P,P.pendingProps.children),y.flags|=2,P.memoizedState=null,y}function Wf(y,P,B,X,re,le,_e){if(B)return P.flags&256?(P.flags&=-257,X=na(Error(o(422))),is(y,P,_e,X)):P.memoizedState!==null?(P.child=y.child,P.flags|=128,null):(le=X.fallback,re=P.mode,X=Ac({mode:"visible",children:X.children},re,0,null),le=ma(le,re,_e,null),le.flags|=2,X.return=P,le.return=P,X.sibling=le,P.child=X,(P.mode&1)!==0&&Sr(P,y.child,null,_e),P.child.memoizedState=mu(_e),P.memoizedState=aa,le);if((P.mode&1)===0)return is(y,P,_e,null);if(Ut(re))return X=Yt(re).digest,le=Error(o(419)),X=na(le,X,void 0),is(y,P,_e,X);if(B=(_e&y.childLanes)!==0,ui||B){if(X=Jr,X!==null){switch(_e&-_e){case 4:re=2;break;case 16:re=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:re=32;break;case 536870912:re=268435456;break;default:re=0}re=(re&(X.suspendedLanes|_e))!==0?0:re,re!==0&&re!==le.retryLane&&(le.retryLane=re,ra(y,re),la(X,y,re,-1))}return eo(),X=na(Error(o(421))),is(y,P,_e,X)}return Ft(re)?(P.flags|=128,P.child=y.child,P=Rp.bind(null,y),_r(re,P),null):(y=le.treeContext,Oe&&(vi=Wn(re),$n=P,tn=!0,za=null,Zs=!1,y!==null&&(wn[Fi++]=ea,wn[Fi++]=ta,wn[Fi++]=_n,ea=y.id,ta=y.overflow,_n=P)),P=Yu(P,X.children),P.flags|=4096,P)}function as(y,P,B){y.lanes|=P;var X=y.alternate;X!==null&&(X.lanes|=P),Zo(y.return,P,B)}function Cl(y,P,B,X,re){var le=y.memoizedState;le===null?y.memoizedState={isBackwards:P,rendering:null,renderingStartTime:0,last:X,tail:B,tailMode:re}:(le.isBackwards=P,le.rendering=null,le.renderingStartTime=0,le.last=X,le.tail=B,le.tailMode=re)}function R(y,P,B){var X=P.pendingProps,re=X.revealOrder,le=X.tail;if(wi(y,P,X.children,B),X=$r.current,(X&2)!==0)X=X&1|2,P.flags|=128;else{if(y!==null&&(y.flags&128)!==0)e:for(y=P.child;y!==null;){if(y.tag===13)y.memoizedState!==null&&as(y,B,P);else if(y.tag===19)as(y,B,P);else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===P)break e;for(;y.sibling===null;){if(y.return===null||y.return===P)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}X&=1}if(Ar($r,X),(P.mode&1)===0)P.memoizedState=null;else switch(re){case"forwards":for(B=P.child,re=null;B!==null;)y=B.alternate,y!==null&&fo(y)===null&&(re=B),B=B.sibling;B=re,B===null?(re=P.child,P.child=null):(re=B.sibling,B.sibling=null),Cl(P,!1,re,B,le);break;case"backwards":for(B=null,re=P.child,P.child=null;re!==null;){if(y=re.alternate,y!==null&&fo(y)===null){P.child=re;break}y=re.sibling,re.sibling=B,B=re,re=y}Cl(P,!0,B,null,le);break;case"together":Cl(P,!1,null,null,void 0);break;default:P.memoizedState=null}return P.child}function H(y,P){(P.mode&1)===0&&y!==null&&(y.alternate=null,P.alternate=null,P.flags|=2)}function te(y,P,B){if(y!==null&&(P.dependencies=y.dependencies),Ns|=P.lanes,(B&P.childLanes)===0)return null;if(y!==null&&P.child!==y.child)throw Error(o(153));if(P.child!==null){for(y=P.child,B=Eu(y,y.pendingProps),P.child=B,B.return=P;y.sibling!==null;)y=y.sibling,B=B.sibling=Eu(y,y.pendingProps),B.return=P;B.sibling=null}return P.child}function oe(y,P,B){switch(P.tag){case 3:il(P),Ce();break;case 5:qi(P);break;case 1:ii(P.type)&&Wo(P);break;case 4:Jo(P,P.stateNode.containerInfo);break;case 10:Ea(P,P.type._context,P.memoizedProps.value);break;case 13:var X=P.memoizedState;if(X!==null)return X.dehydrated!==null?(Ar($r,$r.current&1),P.flags|=128,null):(B&P.child.childLanes)!==0?cf(y,P,B):(Ar($r,$r.current&1),y=te(y,P,B),y!==null?y.sibling:null);Ar($r,$r.current&1);break;case 19:if(X=(B&P.childLanes)!==0,(y.flags&128)!==0){if(X)return R(y,P,B);P.flags|=128}var re=P.memoizedState;if(re!==null&&(re.rendering=null,re.tail=null,re.lastEffect=null),Ar($r,$r.current),X)break;return null;case 22:case 23:return P.lanes=0,Zr(y,P,B)}return te(y,P,B)}function ue(y){y.flags|=4}function de(y,P){if(y!==null&&y.child===P.child)return!0;if((P.flags&16)!==0)return!1;for(y=P.child;y!==null;){if((y.flags&12854)!==0||(y.subtreeFlags&12854)!==0)return!1;y=y.sibling}return!0}var ge,ye,we,Pe;if(me)ge=function(y,P){for(var B=P.child;B!==null;){if(B.tag===5||B.tag===6)z(y,B.stateNode);else if(B.tag!==4&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===P)break;for(;B.sibling===null;){if(B.return===null||B.return===P)return;B=B.return}B.sibling.return=B.return,B=B.sibling}},ye=function(){},we=function(y,P,B,X,re){if(y=y.memoizedProps,y!==X){var le=P.stateNode,_e=yi(Bi.current);B=K(le,B,y,X,re,_e),(P.updateQueue=B)&&ue(P)}},Pe=function(y,P,B,X){B!==X&&ue(P)};else if(Se){ge=function(y,P,B,X){for(var re=P.child;re!==null;){if(re.tag===5){var le=re.stateNode;B&&X&&(le=De(le,re.type,re.memoizedProps,re)),z(y,le)}else if(re.tag===6)le=re.stateNode,B&&X&&(le=bt(le,re.memoizedProps,re)),z(y,le);else if(re.tag!==4){if(re.tag===22&&re.memoizedState!==null)le=re.child,le!==null&&(le.return=re),ge(y,re,!0,!0);else if(re.child!==null){re.child.return=re,re=re.child;continue}}if(re===P)break;for(;re.sibling===null;){if(re.return===null||re.return===P)return;re=re.return}re.sibling.return=re.return,re=re.sibling}};var Fe=function(y,P,B,X){for(var re=P.child;re!==null;){if(re.tag===5){var le=re.stateNode;B&&X&&(le=De(le,re.type,re.memoizedProps,re)),it(y,le)}else if(re.tag===6)le=re.stateNode,B&&X&&(le=bt(le,re.memoizedProps,re)),it(y,le);else if(re.tag!==4){if(re.tag===22&&re.memoizedState!==null)le=re.child,le!==null&&(le.return=re),Fe(y,re,!0,!0);else if(re.child!==null){re.child.return=re,re=re.child;continue}}if(re===P)break;for(;re.sibling===null;){if(re.return===null||re.return===P)return;re=re.return}re.sibling.return=re.return,re=re.sibling}};ye=function(y,P){var B=P.stateNode;if(!de(y,P)){y=B.containerInfo;var X=St(y);Fe(X,P,!1,!1),B.pendingChildren=X,ue(P),Bt(y,X)}},we=function(y,P,B,X,re){var le=y.stateNode,_e=y.memoizedProps;if((y=de(y,P))&&_e===X)P.stateNode=le;else{var Ke=P.stateNode,ut=yi(Bi.current),Lt=null;_e!==X&&(Lt=K(Ke,B,_e,X,re,ut)),y&&Lt===null?P.stateNode=le:(le=Wt(le,Lt,B,_e,X,P,y,Ke),D(le,B,X,re,ut)&&ue(P),P.stateNode=le,y?ue(P):ge(le,P,!1,!1))}},Pe=function(y,P,B,X){B!==X?(y=yi(Co.current),B=yi(Bi.current),P.stateNode=Q(X,y,B,P),ue(P)):P.stateNode=y.stateNode}}else ye=function(){},we=function(){},Pe=function(){};function Qe(y,P){if(!tn)switch(y.tailMode){case"hidden":P=y.tail;for(var B=null;P!==null;)P.alternate!==null&&(B=P),P=P.sibling;B===null?y.tail=null:B.sibling=null;break;case"collapsed":B=y.tail;for(var X=null;B!==null;)B.alternate!==null&&(X=B),B=B.sibling;X===null?P||y.tail===null?y.tail=null:y.tail.sibling=null:X.sibling=null}}function Ye(y){var P=y.alternate!==null&&y.alternate.child===y.child,B=0,X=0;if(P)for(var re=y.child;re!==null;)B|=re.lanes|re.childLanes,X|=re.subtreeFlags&14680064,X|=re.flags&14680064,re.return=y,re=re.sibling;else for(re=y.child;re!==null;)B|=re.lanes|re.childLanes,X|=re.subtreeFlags,X|=re.flags,re.return=y,re=re.sibling;return y.subtreeFlags|=X,y.childLanes=B,P}function We(y,P,B){var X=P.pendingProps;switch(Ks(P),P.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(P),null;case 1:return ii(P.type)&&Ri(),Ye(P),null;case 3:return B=P.stateNode,li(),Kr(Ti),Kr(gi),ko(),B.pendingContext&&(B.context=B.pendingContext,B.pendingContext=null),(y===null||y.child===null)&&(Y(P)?ue(P):y===null||y.memoizedState.isDehydrated&&(P.flags&256)===0||(P.flags|=1024,za!==null&&(Ku(za),za=null))),ye(y,P),Ye(P),null;case 5:es(P),B=yi(Co.current);var re=P.type;if(y!==null&&P.stateNode!=null)we(y,P,re,X,B),y.ref!==P.ref&&(P.flags|=512,P.flags|=2097152);else{if(!X){if(P.stateNode===null)throw Error(o(166));return Ye(P),null}if(y=yi(Bi.current),Y(P)){if(!Oe)throw Error(o(175));y=en(P.stateNode,P.type,P.memoizedProps,B,y,P,!Zs),P.updateQueue=y,y!==null&&ue(P)}else{var le=G(re,X,B,y,P);ge(le,P,!1,!1),P.stateNode=le,D(le,re,X,B,y)&&ue(P)}P.ref!==null&&(P.flags|=512,P.flags|=2097152)}return Ye(P),null;case 6:if(y&&P.stateNode!=null)Pe(y,P,y.memoizedProps,X);else{if(typeof X!="string"&&P.stateNode===null)throw Error(o(166));if(y=yi(Co.current),B=yi(Bi.current),Y(P)){if(!Oe)throw Error(o(176));if(y=P.stateNode,B=P.memoizedProps,(X=Qn(y,B,P,!Zs))&&(re=$n,re!==null))switch(re.tag){case 3:vc(re.stateNode.containerInfo,y,B,(re.mode&1)!==0);break;case 5:Mn(re.type,re.memoizedProps,re.stateNode,y,B,(re.mode&1)!==0)}X&&ue(P)}else P.stateNode=Q(X,y,B,P)}return Ye(P),null;case 13:if(Kr($r),X=P.memoizedState,y===null||y.memoizedState!==null&&y.memoizedState.dehydrated!==null){if(tn&&vi!==null&&(P.mode&1)!==0&&(P.flags&128)===0)fe(),Ce(),P.flags|=98560,re=!1;else if(re=Y(P),X!==null&&X.dehydrated!==null){if(y===null){if(!re)throw Error(o(318));if(!Oe)throw Error(o(344));if(re=P.memoizedState,re=re!==null?re.dehydrated:null,!re)throw Error(o(317));_i(re,P)}else Ce(),(P.flags&128)===0&&(P.memoizedState=null),P.flags|=4;Ye(P),re=!1}else za!==null&&(Ku(za),za=null),re=!0;if(!re)return P.flags&65536?P:null}return(P.flags&128)!==0?(P.lanes=B,P):(B=X!==null,B!==(y!==null&&y.memoizedState!==null)&&B&&(P.child.flags|=8192,(P.mode&1)!==0&&(y===null||($r.current&1)!==0?fn===0&&(fn=3):eo())),P.updateQueue!==null&&(P.flags|=4),Ye(P),null);case 4:return li(),ye(y,P),y===null&&xe(P.stateNode.containerInfo),Ye(P),null;case 10:return Pa(P.type._context),Ye(P),null;case 17:return ii(P.type)&&Ri(),Ye(P),null;case 19:if(Kr($r),re=P.memoizedState,re===null)return Ye(P),null;if(X=(P.flags&128)!==0,le=re.rendering,le===null)if(X)Qe(re,!1);else{if(fn!==0||y!==null&&(y.flags&128)!==0)for(y=P.child;y!==null;){if(le=fo(y),le!==null){for(P.flags|=128,Qe(re,!1),y=le.updateQueue,y!==null&&(P.updateQueue=y,P.flags|=4),P.subtreeFlags=0,y=B,B=P.child;B!==null;)X=B,re=y,X.flags&=14680066,le=X.alternate,le===null?(X.childLanes=0,X.lanes=re,X.child=null,X.subtreeFlags=0,X.memoizedProps=null,X.memoizedState=null,X.updateQueue=null,X.dependencies=null,X.stateNode=null):(X.childLanes=le.childLanes,X.lanes=le.lanes,X.child=le.child,X.subtreeFlags=0,X.deletions=null,X.memoizedProps=le.memoizedProps,X.memoizedState=le.memoizedState,X.updateQueue=le.updateQueue,X.type=le.type,re=le.dependencies,X.dependencies=re===null?null:{lanes:re.lanes,firstContext:re.firstContext}),B=B.sibling;return Ar($r,$r.current&1|2),P.child}y=y.sibling}re.tail!==null&&In()>_u&&(P.flags|=128,X=!0,Qe(re,!1),P.lanes=4194304)}else{if(!X)if(y=fo(le),y!==null){if(P.flags|=128,X=!0,y=y.updateQueue,y!==null&&(P.updateQueue=y,P.flags|=4),Qe(re,!0),re.tail===null&&re.tailMode==="hidden"&&!le.alternate&&!tn)return Ye(P),null}else 2*In()-re.renderingStartTime>_u&&B!==1073741824&&(P.flags|=128,X=!0,Qe(re,!1),P.lanes=4194304);re.isBackwards?(le.sibling=P.child,P.child=le):(y=re.last,y!==null?y.sibling=le:P.child=le,re.last=le)}return re.tail!==null?(P=re.tail,re.rendering=P,re.tail=P.sibling,re.renderingStartTime=In(),P.sibling=null,y=$r.current,Ar($r,X?y&1|2:y&1),P):(Ye(P),null);case 22:case 23:return xu(),B=P.memoizedState!==null,y!==null&&y.memoizedState!==null!==B&&(P.flags|=8192),B&&(P.mode&1)!==0?(ti&1073741824)!==0&&(Ye(P),me&&P.subtreeFlags&6&&(P.flags|=8192)):Ye(P),null;case 24:return null;case 25:return null}throw Error(o(156,P.tag))}function yt(y,P){switch(Ks(P),P.tag){case 1:return ii(P.type)&&Ri(),y=P.flags,y&65536?(P.flags=y&-65537|128,P):null;case 3:return li(),Kr(Ti),Kr(gi),ko(),y=P.flags,(y&65536)!==0&&(y&128)===0?(P.flags=y&-65537|128,P):null;case 5:return es(P),null;case 13:if(Kr($r),y=P.memoizedState,y!==null&&y.dehydrated!==null){if(P.alternate===null)throw Error(o(340));Ce()}return y=P.flags,y&65536?(P.flags=y&-65537|128,P):null;case 19:return Kr($r),null;case 4:return li(),null;case 10:return Pa(P.type._context),null;case 22:case 23:return xu(),null;case 24:return null;default:return null}}var lt=!1,Me=!1,qe=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function ct(y,P){var B=y.ref;if(B!==null)if(typeof B=="function")try{B(null)}catch(X){Gn(y,P,X)}else B.current=null}function pt(y,P,B){try{B()}catch(X){Gn(y,P,X)}}var Gt=!1;function jt(y,P){for(Z(y.containerInfo),Ge=P;Ge!==null;)if(y=Ge,P=y.child,(y.subtreeFlags&1028)!==0&&P!==null)P.return=y,Ge=P;else for(;Ge!==null;){y=Ge;try{var B=y.alternate;if((y.flags&1024)!==0)switch(y.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var X=B.memoizedProps,re=B.memoizedState,le=y.stateNode,_e=le.getSnapshotBeforeUpdate(y.elementType===y.type?X:$a(y.type,X),re);le.__reactInternalSnapshotBeforeUpdate=_e}break;case 3:me&&rr(y.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Ke){Gn(y,y.return,Ke)}if(P=y.sibling,P!==null){P.return=y.return,Ge=P;break}Ge=y.return}return B=Gt,Gt=!1,B}function ar(y,P,B){var X=P.updateQueue;if(X=X!==null?X.lastEffect:null,X!==null){var re=X=X.next;do{if((re.tag&y)===y){var le=re.destroy;re.destroy=void 0,le!==void 0&&pt(P,B,le)}re=re.next}while(re!==X)}}function Mt(y,P){if(P=P.updateQueue,P=P!==null?P.lastEffect:null,P!==null){var B=P=P.next;do{if((B.tag&y)===y){var X=B.create;B.destroy=X()}B=B.next}while(B!==P)}}function Fr(y){var P=y.ref;if(P!==null){var B=y.stateNode;switch(y.tag){case 5:y=U(B);break;default:y=B}typeof P=="function"?P(y):P.current=y}}function qr(y){var P=y.alternate;P!==null&&(y.alternate=null,qr(P)),y.child=null,y.deletions=null,y.sibling=null,y.tag===5&&(P=y.stateNode,P!==null&&Xe(P)),y.stateNode=null,y.return=null,y.dependencies=null,y.memoizedProps=null,y.memoizedState=null,y.pendingProps=null,y.stateNode=null,y.updateQueue=null}function Rr(y){return y.tag===5||y.tag===3||y.tag===4}function yr(y){e:for(;;){for(;y.sibling===null;){if(y.return===null||Rr(y.return))return null;y=y.return}for(y.sibling.return=y.return,y=y.sibling;y.tag!==5&&y.tag!==6&&y.tag!==18;){if(y.flags&2||y.child===null||y.tag===4)continue e;y.child.return=y,y=y.child}if(!(y.flags&2))return y.stateNode}}function Xr(y,P,B){var X=y.tag;if(X===5||X===6)y=y.stateNode,P?Ht(B,y,P):mt(B,y);else if(X!==4&&(y=y.child,y!==null))for(Xr(y,P,B),y=y.sibling;y!==null;)Xr(y,P,B),y=y.sibling}function Qr(y,P,B){var X=y.tag;if(X===5||X===6)y=y.stateNode,P?At(B,y,P):at(B,y);else if(X!==4&&(y=y.child,y!==null))for(Qr(y,P,B),y=y.sibling;y!==null;)Qr(y,P,B),y=y.sibling}var Qt=null,zr=!1;function Ln(y,P,B){for(B=B.child;B!==null;)Dn(y,P,B),B=B.sibling}function Dn(y,P,B){if(ai&&typeof ai.onCommitFiberUnmount=="function")try{ai.onCommitFiberUnmount(uo,B)}catch{}switch(B.tag){case 5:Me||ct(B,P);case 6:if(me){var X=Qt,re=zr;Qt=null,Ln(y,P,B),Qt=X,zr=re,Qt!==null&&(zr?Ie(Qt,B.stateNode):zt(Qt,B.stateNode))}else Ln(y,P,B);break;case 18:me&&Qt!==null&&(zr?Vo(Qt,B.stateNode):ws(Qt,B.stateNode));break;case 4:me?(X=Qt,re=zr,Qt=B.stateNode.containerInfo,zr=!0,Ln(y,P,B),Qt=X,zr=re):(Se&&(X=B.stateNode.containerInfo,re=St(X),Ue(X,re)),Ln(y,P,B));break;case 0:case 11:case 14:case 15:if(!Me&&(X=B.updateQueue,X!==null&&(X=X.lastEffect,X!==null))){re=X=X.next;do{var le=re,_e=le.destroy;le=le.tag,_e!==void 0&&((le&2)!==0||(le&4)!==0)&&pt(B,P,_e),re=re.next}while(re!==X)}Ln(y,P,B);break;case 1:if(!Me&&(ct(B,P),X=B.stateNode,typeof X.componentWillUnmount=="function"))try{X.props=B.memoizedProps,X.state=B.memoizedState,X.componentWillUnmount()}catch(Ke){Gn(B,P,Ke)}Ln(y,P,B);break;case 21:Ln(y,P,B);break;case 22:B.mode&1?(Me=(X=Me)||B.memoizedState!==null,Ln(y,P,B),Me=X):Ln(y,P,B);break;default:Ln(y,P,B)}}function ci(y){var P=y.updateQueue;if(P!==null){y.updateQueue=null;var B=y.stateNode;B===null&&(B=y.stateNode=new qe),P.forEach(function(X){var re=d0.bind(null,y,X);B.has(X)||(B.add(X),X.then(re,re))})}}function xr(y,P){var B=P.deletions;if(B!==null)for(var X=0;X<B.length;X++){var re=B[X];try{var le=y,_e=P;if(me){var Ke=_e;e:for(;Ke!==null;){switch(Ke.tag){case 5:Qt=Ke.stateNode,zr=!1;break e;case 3:Qt=Ke.stateNode.containerInfo,zr=!0;break e;case 4:Qt=Ke.stateNode.containerInfo,zr=!0;break e}Ke=Ke.return}if(Qt===null)throw Error(o(160));Dn(le,_e,re),Qt=null,zr=!1}else Dn(le,_e,re);var ut=re.alternate;ut!==null&&(ut.return=null),re.return=null}catch(Lt){Gn(re,P,Lt)}}if(P.subtreeFlags&12854)for(P=P.child;P!==null;)Vi(P,y),P=P.sibling}function Vi(y,P){var B=y.alternate,X=y.flags;switch(y.tag){case 0:case 11:case 14:case 15:if(xr(P,y),En(y),X&4){try{ar(3,y,y.return),Mt(3,y)}catch(Vt){Gn(y,y.return,Vt)}try{ar(5,y,y.return)}catch(Vt){Gn(y,y.return,Vt)}}break;case 1:xr(P,y),En(y),X&512&&B!==null&&ct(B,B.return);break;case 5:if(xr(P,y),En(y),X&512&&B!==null&&ct(B,B.return),me){if(y.flags&32){var re=y.stateNode;try{He(re)}catch(Vt){Gn(y,y.return,Vt)}}if(X&4&&(re=y.stateNode,re!=null)){var le=y.memoizedProps;if(B=B!==null?B.memoizedProps:le,X=y.type,P=y.updateQueue,y.updateQueue=null,P!==null)try{qt(re,P,X,B,le,y)}catch(Vt){Gn(y,y.return,Vt)}}}break;case 6:if(xr(P,y),En(y),X&4&&me){if(y.stateNode===null)throw Error(o(162));re=y.stateNode,le=y.memoizedProps,B=B!==null?B.memoizedProps:le;try{Je(re,B,le)}catch(Vt){Gn(y,y.return,Vt)}}break;case 3:if(xr(P,y),En(y),X&4){if(me&&Oe&&B!==null&&B.memoizedState.isDehydrated)try{Si(P.containerInfo)}catch(Vt){Gn(y,y.return,Vt)}if(Se){re=P.containerInfo,le=P.pendingChildren;try{Ue(re,le)}catch(Vt){Gn(y,y.return,Vt)}}}break;case 4:if(xr(P,y),En(y),X&4&&Se){le=y.stateNode,re=le.containerInfo,le=le.pendingChildren;try{Ue(re,le)}catch(Vt){Gn(y,y.return,Vt)}}break;case 13:xr(P,y),En(y),re=y.child,re.flags&8192&&(le=re.memoizedState!==null,re.stateNode.isHidden=le,!le||re.alternate!==null&&re.alternate.memoizedState!==null||(wu=In())),X&4&&ci(y);break;case 22:var _e=B!==null&&B.memoizedState!==null;if(y.mode&1?(Me=(B=Me)||_e,xr(P,y),Me=B):xr(P,y),En(y),X&8192){if(B=y.memoizedState!==null,(y.stateNode.isHidden=B)&&!_e&&(y.mode&1)!==0)for(Ge=y,X=y.child;X!==null;){for(P=Ge=X;Ge!==null;){_e=Ge;var Ke=_e.child;switch(_e.tag){case 0:case 11:case 14:case 15:ar(4,_e,_e.return);break;case 1:ct(_e,_e.return);var ut=_e.stateNode;if(typeof ut.componentWillUnmount=="function"){var Lt=_e,Zt=_e.return;try{var br=Lt;ut.props=br.memoizedProps,ut.state=br.memoizedState,ut.componentWillUnmount()}catch(Vt){Gn(Lt,Zt,Vt)}}break;case 5:ct(_e,_e.return);break;case 22:if(_e.memoizedState!==null){ga(P);continue}}Ke!==null?(Ke.return=_e,Ge=Ke):ga(P)}X=X.sibling}if(me){e:if(X=null,me)for(P=y;;){if(P.tag===5){if(X===null){X=P;try{re=P.stateNode,B?Nt(re):gt(P.stateNode,P.memoizedProps)}catch(Vt){Gn(y,y.return,Vt)}}}else if(P.tag===6){if(X===null)try{le=P.stateNode,B?ht(le):_t(le,P.memoizedProps)}catch(Vt){Gn(y,y.return,Vt)}}else if((P.tag!==22&&P.tag!==23||P.memoizedState===null||P===y)&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===y)break e;for(;P.sibling===null;){if(P.return===null||P.return===y)break e;X===P&&(X=null),P=P.return}X===P&&(X=null),P.sibling.return=P.return,P=P.sibling}}}break;case 19:xr(P,y),En(y),X&4&&ci(y);break;case 21:break;default:xr(P,y),En(y)}}function En(y){var P=y.flags;if(P&2){try{if(me){e:{for(var B=y.return;B!==null;){if(Rr(B)){var X=B;break e}B=B.return}throw Error(o(160))}switch(X.tag){case 5:var re=X.stateNode;X.flags&32&&(He(re),X.flags&=-33);var le=yr(y);Qr(y,le,re);break;case 3:case 4:var _e=X.stateNode.containerInfo,Ke=yr(y);Xr(y,Ke,_e);break;default:throw Error(o(161))}}}catch(ut){Gn(y,y.return,ut)}y.flags&=-3}P&4096&&(y.flags&=-4097)}function Bn(y,P,B){Ge=y,fi(y)}function fi(y,P,B){for(var X=(y.mode&1)!==0;Ge!==null;){var re=Ge,le=re.child;if(re.tag===22&&X){var _e=re.memoizedState!==null||lt;if(!_e){var Ke=re.alternate,ut=Ke!==null&&Ke.memoizedState!==null||Me;Ke=lt;var Lt=Me;if(lt=_e,(Me=ut)&&!Lt)for(Ge=re;Ge!==null;)_e=Ge,ut=_e.child,_e.tag===22&&_e.memoizedState!==null?Ya(re):ut!==null?(ut.return=_e,Ge=ut):Ya(re);for(;le!==null;)Ge=le,fi(le),le=le.sibling;Ge=re,lt=Ke,Me=Lt}Oi(y)}else(re.subtreeFlags&8772)!==0&&le!==null?(le.return=re,Ge=le):Oi(y)}}function Oi(y){for(;Ge!==null;){var P=Ge;if((P.flags&8772)!==0){var B=P.alternate;try{if((P.flags&8772)!==0)switch(P.tag){case 0:case 11:case 15:Me||Mt(5,P);break;case 1:var X=P.stateNode;if(P.flags&4&&!Me)if(B===null)X.componentDidMount();else{var re=P.elementType===P.type?B.memoizedProps:$a(P.type,B.memoizedProps);X.componentDidUpdate(re,B.memoizedState,X.__reactInternalSnapshotBeforeUpdate)}var le=P.updateQueue;le!==null&&Hu(P,le,X);break;case 3:var _e=P.updateQueue;if(_e!==null){if(B=null,P.child!==null)switch(P.child.tag){case 5:B=U(P.child.stateNode);break;case 1:B=P.child.stateNode}Hu(P,_e,B)}break;case 5:var Ke=P.stateNode;B===null&&P.flags&4&&nt(Ke,P.type,P.memoizedProps,P);break;case 6:break;case 4:break;case 12:break;case 13:if(Oe&&P.memoizedState===null){var ut=P.alternate;if(ut!==null){var Lt=ut.memoizedState;if(Lt!==null){var Zt=Lt.dehydrated;Zt!==null&&fa(Zt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Me||P.flags&512&&Fr(P)}catch(br){Gn(P,P.return,br)}}if(P===y){Ge=null;break}if(B=P.sibling,B!==null){B.return=P.return,Ge=B;break}Ge=P.return}}function ga(y){for(;Ge!==null;){var P=Ge;if(P===y){Ge=null;break}var B=P.sibling;if(B!==null){B.return=P.return,Ge=B;break}Ge=P.return}}function Ya(y){for(;Ge!==null;){var P=Ge;try{switch(P.tag){case 0:case 11:case 15:var B=P.return;try{Mt(4,P)}catch(ut){Gn(P,B,ut)}break;case 1:var X=P.stateNode;if(typeof X.componentDidMount=="function"){var re=P.return;try{X.componentDidMount()}catch(ut){Gn(P,re,ut)}}var le=P.return;try{Fr(P)}catch(ut){Gn(P,le,ut)}break;case 5:var _e=P.return;try{Fr(P)}catch(ut){Gn(P,_e,ut)}}}catch(ut){Gn(P,P.return,ut)}if(P===y){Ge=null;break}var Ke=P.sibling;if(Ke!==null){Ke.return=P.return,Ge=Ke;break}Ge=P.return}}var yn=0,qn=1,oa=2,Do=3,vo=4;if(typeof Symbol=="function"&&Symbol.for){var Dr=Symbol.for;yn=Dr("selector.component"),qn=Dr("selector.has_pseudo_class"),oa=Dr("selector.role"),Do=Dr("selector.test_id"),vo=Dr("selector.text")}function mo(y){var P=Ne(y);if(P!=null){if(typeof P.memoizedProps["data-testname"]!="string")throw Error(o(364));return P}if(y=Le(y),y===null)throw Error(o(362));return y.stateNode.current}function yu(y,P){switch(P.$$typeof){case yn:if(y.type===P.value)return!0;break;case qn:e:{P=P.value,y=[y,0];for(var B=0;B<y.length;){var X=y[B++],re=y[B++],le=P[re];if(X.tag!==5||!Re(X)){for(;le!=null&&yu(X,le);)re++,le=P[re];if(re===P.length){P=!0;break e}else for(X=X.child;X!==null;)y.push(X,re),X=X.sibling}}P=!1}return P;case oa:if(y.tag===5&&$e(y.stateNode,P.value))return!0;break;case vo:if((y.tag===5||y.tag===6)&&(y=ke(y),y!==null&&0<=y.indexOf(P.value)))return!0;break;case Do:if(y.tag===5&&(y=y.memoizedProps["data-testname"],typeof y=="string"&&y.toLowerCase()===P.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Xu(y){switch(y.$$typeof){case yn:return"<"+(T(y.value)||"Unknown")+">";case qn:return":has("+(Xu(y)||"")+")";case oa:return'[role="'+y.value+'"]';case vo:return'"'+y.value+'"';case Do:return'[data-testname="'+y.value+'"]';default:throw Error(o(365))}}function Xa(y,P){var B=[];y=[y,0];for(var X=0;X<y.length;){var re=y[X++],le=y[X++],_e=P[le];if(re.tag!==5||!Re(re)){for(;_e!=null&&yu(re,_e);)le++,_e=P[le];if(le===P.length)B.push(re);else for(re=re.child;re!==null;)y.push(re,le),re=re.sibling}}return B}function Aa(y,P){if(!Ee)throw Error(o(363));y=mo(y),y=Xa(y,P),P=[],y=Array.from(y);for(var B=0;B<y.length;){var X=y[B++];if(X.tag===5)Re(X)||P.push(X.stateNode);else for(X=X.child;X!==null;)y.push(X),X=X.sibling}return P}var kl=Math.ceil,va=l.ReactCurrentDispatcher,Bo=l.ReactCurrentOwner,vn=l.ReactCurrentBatchConfig,vr=0,Jr=null,Pn=null,Nn=0,ti=0,qo=pi(0),fn=0,bu=null,Ns=0,hn=0,Ka=0,Ll=null,sa=null,wu=0,_u=1/0,Ai=null;function on(){_u=In()+500}var zn=!1,Un=null,Za=null,yo=!1,Qa=null,Sc=0,Hn=0,Su=null,al=-1,Ja=0;function bn(){return(vr&6)!==0?In():al!==-1?al:al=In()}function hi(y){return(y.mode&1)===0?1:(vr&2)!==0&&Nn!==0?Nn&-Nn:et.transition!==null?(Ja===0&&(Ja=xs()),Ja):(y=It,y!==0?y:ve())}function la(y,P,B,X){if(50<Hn)throw Hn=0,Su=null,Error(o(185));gn(y,B,X),((vr&2)===0||y!==Jr)&&(y===Jr&&((vr&2)===0&&(hn|=B),fn===4&&os(y,Nn)),Wi(y,X),B===1&&vr===0&&(P.mode&1)===0&&(on(),Ao&&oi()))}function Wi(y,P){var B=y.callbackNode;$o(y,P);var X=Ws(y,y===Jr?Nn:0);if(X===0)B!==null&&Oo(B),y.callbackNode=null,y.callbackPriority=0;else if(P=X&-X,y.callbackPriority!==P){if(B!=null&&Oo(B),P===1)y.tag===0?Uu(ff.bind(null,y)):gl(ff.bind(null,y)),be?Ae(function(){(vr&6)===0&&oi()}):lo(Xs,oi),B=null;else{switch($s(X)){case 1:B=Xs;break;case 4:B=au;break;case 16:B=ou;break;case 536870912:B=of;break;default:B=ou}B=zh(B,Ts.bind(null,y))}y.callbackPriority=P,y.callbackNode=B}}function Ts(y,P){if(al=-1,Ja=0,(vr&6)!==0)throw Error(o(327));var B=y.callbackNode;if(Tl()&&y.callbackNode!==B)return null;var X=Ws(y,y===Jr?Nn:0);if(X===0)return null;if((X&30)!==0||(X&y.expiredLanes)!==0||P)P=ls(y,X);else{P=X;var re=vr;vr|=2;var le=ss();(Jr!==y||Nn!==P)&&(Ai=null,on(),zo(y,P));do try{Pc();break}catch(Ke){Ca(y,Ke)}while(!0);Ua(),va.current=le,vr=re,Pn!==null?P=0:(Jr=null,Nn=0,P=fn)}if(P!==0){if(P===2&&(re=Ss(y),re!==0&&(X=re,P=xc(y,re))),P===1)throw B=bu,zo(y,0),os(y,X),Wi(y,In()),B;if(P===6)os(y,X);else{if(re=y.current.alternate,(X&30)===0&&!$f(re)&&(P=ls(y,X),P===2&&(le=Ss(y),le!==0&&(X=le,P=xc(y,le))),P===1))throw B=bu,zo(y,0),os(y,X),Wi(y,In()),B;switch(y.finishedWork=re,y.finishedLanes=X,P){case 0:case 1:throw Error(o(345));case 2:us(y,sa,Ai);break;case 3:if(os(y,X),(X&130023424)===X&&(P=wu+500-In(),10<P)){if(Ws(y,0)!==0)break;if(re=y.suspendedLanes,(re&X)!==X){bn(),y.pingedLanes|=y.suspendedLanes&re;break}y.timeoutHandle=ee(us.bind(null,y,sa,Ai),P);break}us(y,sa,Ai);break;case 4:if(os(y,X),(X&4194240)===X)break;for(P=y.eventTimes,re=-1;0<X;){var _e=31-da(X);le=1<<_e,_e=P[_e],_e>re&&(re=_e),X&=~le}if(X=re,X=In()-X,X=(120>X?120:480>X?480:1080>X?1080:1920>X?1920:3e3>X?3e3:4320>X?4320:1960*kl(X/1960))-X,10<X){y.timeoutHandle=ee(us.bind(null,y,sa,Ai),X);break}us(y,sa,Ai);break;case 5:us(y,sa,Ai);break;default:throw Error(o(329))}}}return Wi(y,In()),y.callbackNode===B?Ts.bind(null,y):null}function xc(y,P){var B=Ll;return y.current.memoizedState.isDehydrated&&(zo(y,P).flags|=256),y=ls(y,P),y!==2&&(P=sa,sa=B,P!==null&&Ku(P)),y}function Ku(y){sa===null?sa=y:sa.push.apply(sa,y)}function $f(y){for(var P=y;;){if(P.flags&16384){var B=P.updateQueue;if(B!==null&&(B=B.stores,B!==null))for(var X=0;X<B.length;X++){var re=B[X],le=re.getSnapshot;re=re.value;try{if(!Mi(le(),re))return!1}catch{return!1}}}if(B=P.child,P.subtreeFlags&16384&&B!==null)B.return=P,P=B;else{if(P===y)break;for(;P.sibling===null;){if(P.return===null||P.return===y)return!0;P=P.return}P.sibling.return=P.return,P=P.sibling}}return!0}function os(y,P){for(P&=~Ka,P&=~hn,y.suspendedLanes|=P,y.pingedLanes&=~P,y=y.expirationTimes;0<P;){var B=31-da(P),X=1<<B;y[B]=-1,P&=~X}}function ff(y){if((vr&6)!==0)throw Error(o(327));Tl();var P=Ws(y,0);if((P&1)===0)return Wi(y,In()),null;var B=ls(y,P);if(y.tag!==0&&B===2){var X=Ss(y);X!==0&&(P=X,B=xc(y,X))}if(B===1)throw B=bu,zo(y,0),os(y,P),Wi(y,In()),B;if(B===6)throw Error(o(345));return y.finishedWork=y.current.alternate,y.finishedLanes=P,us(y,sa,Ai),Wi(y,In()),null}function Nl(y){Qa!==null&&Qa.tag===0&&(vr&6)===0&&Tl();var P=vr;vr|=1;var B=vn.transition,X=It;try{if(vn.transition=null,It=1,y)return y()}finally{It=X,vn.transition=B,vr=P,(vr&6)===0&&oi()}}function xu(){ti=qo.current,Kr(qo)}function zo(y,P){y.finishedWork=null,y.finishedLanes=0;var B=y.timeoutHandle;if(B!==se&&(y.timeoutHandle=se,ae(B)),Pn!==null)for(B=Pn.return;B!==null;){var X=B;switch(Ks(X),X.tag){case 1:X=X.type.childContextTypes,X!=null&&Ri();break;case 3:li(),Kr(Ti),Kr(gi),ko();break;case 5:es(X);break;case 4:li();break;case 13:Kr($r);break;case 19:Kr($r);break;case 10:Pa(X.type._context);break;case 22:case 23:xu()}B=B.return}if(Jr=y,Pn=y=Eu(y.current,null),Nn=ti=P,fn=0,bu=null,Ka=hn=Ns=0,sa=Ll=null,Ha!==null){for(P=0;P<Ha.length;P++)if(B=Ha[P],X=B.interleaved,X!==null){B.interleaved=null;var re=X.next,le=B.pending;if(le!==null){var _e=le.next;le.next=re,X.next=_e}B.pending=X}Ha=null}return y}function Ca(y,P){do{var B=Pn;try{if(Ua(),jr.current=ks,ts){for(var X=Tr.memoizedState;X!==null;){var re=X.queue;re!==null&&(re.pending=null),X=X.next}ts=!1}if(Yn=0,Xn=xn=Tr=null,No=!1,To=0,Bo.current=null,B===null||B.return===null){fn=1,bu=P,Pn=null;break}e:{var le=y,_e=B.return,Ke=B,ut=P;if(P=Nn,Ke.flags|=32768,ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var Lt=ut,Zt=Ke,br=Zt.tag;if((Zt.mode&1)===0&&(br===0||br===11||br===15)){var Vt=Zt.alternate;Vt?(Zt.updateQueue=Vt.updateQueue,Zt.memoizedState=Vt.memoizedState,Zt.lanes=Vt.lanes):(Zt.updateQueue=null,Zt.memoizedState=null)}var Tn=Vf(_e);if(Tn!==null){Tn.flags&=-257,Ls(Tn,_e,Ke,le,P),Tn.mode&1&&Gf(le,Lt,P),P=Tn,ut=Lt;var mn=P.updateQueue;if(mn===null){var to=new Set;to.add(ut),P.updateQueue=to}else mn.add(ut);break e}else{if((P&1)===0){Gf(le,Lt,P),eo();break e}ut=Error(o(426))}}else if(tn&&Ke.mode&1){var ol=Vf(_e);if(ol!==null){(ol.flags&65536)===0&&(ol.flags|=256),Ls(ol,_e,Ke,le,P),je(Hi(ut,Ke));break e}}le=ut=Hi(ut,Ke),fn!==4&&(fn=2),Ll===null?Ll=[le]:Ll.push(le),le=_e;do{switch(le.tag){case 3:le.flags|=65536,P&=-P,le.lanes|=P;var ot=Gi(le,ut,P);el(le,ot);break e;case 1:Ke=ut;var Ze=le.type,dt=le.stateNode;if((le.flags&128)===0&&(typeof Ze.getDerivedStateFromError=="function"||dt!==null&&typeof dt.componentDidCatch=="function"&&(Za===null||!Za.has(dt)))){le.flags|=65536,P&=-P,le.lanes|=P;var $t=pa(le,Ke,P);el(le,$t);break e}}le=le.return}while(le!==null)}Zu(B)}catch(ur){P=ur,Pn===B&&B!==null&&(Pn=B=B.return);continue}break}while(!0)}function ss(){var y=va.current;return va.current=ks,y===null?ks:y}function eo(){(fn===0||fn===3||fn===2)&&(fn=4),Jr===null||(Ns&268435455)===0&&(hn&268435455)===0||os(Jr,Nn)}function ls(y,P){var B=vr;vr|=2;var X=ss();(Jr!==y||Nn!==P)&&(Ai=null,zo(y,P));do try{Ec();break}catch(re){Ca(y,re)}while(!0);if(Ua(),vr=B,va.current=X,Pn!==null)throw Error(o(261));return Jr=null,Nn=0,fn}function Ec(){for(;Pn!==null;)hf(Pn)}function Pc(){for(;Pn!==null&&!zu();)hf(Pn)}function hf(y){var P=Mp(y.alternate,y,ti);y.memoizedProps=y.pendingProps,P===null?Zu(y):Pn=P,Bo.current=null}function Zu(y){var P=y;do{var B=P.alternate;if(y=P.return,(P.flags&32768)===0){if(B=We(B,P,ti),B!==null){Pn=B;return}}else{if(B=yt(B,P),B!==null){B.flags&=32767,Pn=B;return}if(y!==null)y.flags|=32768,y.subtreeFlags=0,y.deletions=null;else{fn=6,Pn=null;return}}if(P=P.sibling,P!==null){Pn=P;return}Pn=P=y}while(P!==null);fn===0&&(fn=5)}function us(y,P,B){var X=It,re=vn.transition;try{vn.transition=null,It=1,Lp(y,P,B,X)}finally{vn.transition=re,It=X}return null}function Lp(y,P,B,X){do Tl();while(Qa!==null);if((vr&6)!==0)throw Error(o(327));B=y.finishedWork;var re=y.finishedLanes;if(B===null)return null;if(y.finishedWork=null,y.finishedLanes=0,B===y.current)throw Error(o(177));y.callbackNode=null,y.callbackPriority=0;var le=B.lanes|B.childLanes;if(Yo(y,le),y===Jr&&(Pn=Jr=null,Nn=0),(B.subtreeFlags&2064)===0&&(B.flags&2064)===0||yo||(yo=!0,zh(ou,function(){return Tl(),null})),le=(B.flags&15990)!==0,(B.subtreeFlags&15990)!==0||le){le=vn.transition,vn.transition=null;var _e=It;It=1;var Ke=vr;vr|=4,Bo.current=null,jt(y,B),Vi(B,y),V(y.containerInfo),y.current=B,Bn(B),Ys(),vr=Ke,It=_e,vn.transition=le}else y.current=B;if(yo&&(yo=!1,Qa=y,Sc=re),le=y.pendingLanes,le===0&&(Za=null),Da(B.stateNode),Wi(y,In()),P!==null)for(X=y.onRecoverableError,B=0;B<P.length;B++)re=P[B],X(re.value,{componentStack:re.stack,digest:re.digest});if(zn)throw zn=!1,y=Un,Un=null,y;return(Sc&1)!==0&&y.tag!==0&&Tl(),le=y.pendingLanes,(le&1)!==0?y===Su?Hn++:(Hn=0,Su=y):Hn=0,oi(),null}function Tl(){if(Qa!==null){var y=$s(Sc),P=vn.transition,B=It;try{if(vn.transition=null,It=16>y?16:y,Qa===null)var X=!1;else{if(y=Qa,Qa=null,Sc=0,(vr&6)!==0)throw Error(o(331));var re=vr;for(vr|=4,Ge=y.current;Ge!==null;){var le=Ge,_e=le.child;if((Ge.flags&16)!==0){var Ke=le.deletions;if(Ke!==null){for(var ut=0;ut<Ke.length;ut++){var Lt=Ke[ut];for(Ge=Lt;Ge!==null;){var Zt=Ge;switch(Zt.tag){case 0:case 11:case 15:ar(8,Zt,le)}var br=Zt.child;if(br!==null)br.return=Zt,Ge=br;else for(;Ge!==null;){Zt=Ge;var Vt=Zt.sibling,Tn=Zt.return;if(qr(Zt),Zt===Lt){Ge=null;break}if(Vt!==null){Vt.return=Tn,Ge=Vt;break}Ge=Tn}}}var mn=le.alternate;if(mn!==null){var to=mn.child;if(to!==null){mn.child=null;do{var ol=to.sibling;to.sibling=null,to=ol}while(to!==null)}}Ge=le}}if((le.subtreeFlags&2064)!==0&&_e!==null)_e.return=le,Ge=_e;else e:for(;Ge!==null;){if(le=Ge,(le.flags&2048)!==0)switch(le.tag){case 0:case 11:case 15:ar(9,le,le.return)}var ot=le.sibling;if(ot!==null){ot.return=le.return,Ge=ot;break e}Ge=le.return}}var Ze=y.current;for(Ge=Ze;Ge!==null;){_e=Ge;var dt=_e.child;if((_e.subtreeFlags&2064)!==0&&dt!==null)dt.return=_e,Ge=dt;else e:for(_e=Ze;Ge!==null;){if(Ke=Ge,(Ke.flags&2048)!==0)try{switch(Ke.tag){case 0:case 11:case 15:Mt(9,Ke)}}catch(ur){Gn(Ke,Ke.return,ur)}if(Ke===_e){Ge=null;break e}var $t=Ke.sibling;if($t!==null){$t.return=Ke.return,Ge=$t;break e}Ge=Ke.return}}if(vr=re,oi(),ai&&typeof ai.onPostCommitFiberRoot=="function")try{ai.onPostCommitFiberRoot(uo,y)}catch{}X=!0}return X}finally{It=B,vn.transition=P}}return!1}function qh(y,P,B){P=Hi(B,P),P=Gi(y,P,1),y=Ga(y,P,1),P=bn(),y!==null&&(gn(y,1,P),Wi(y,P))}function Gn(y,P,B){if(y.tag===3)qh(y,y,B);else for(;P!==null;){if(P.tag===3){qh(P,y,B);break}else if(P.tag===1){var X=P.stateNode;if(typeof P.type.getDerivedStateFromError=="function"||typeof X.componentDidCatch=="function"&&(Za===null||!Za.has(X))){y=Hi(B,y),y=pa(P,y,1),P=Ga(P,y,1),y=bn(),P!==null&&(gn(P,1,y),Wi(P,y));break}}P=P.return}}function Np(y,P,B){var X=y.pingCache;X!==null&&X.delete(P),P=bn(),y.pingedLanes|=y.suspendedLanes&B,Jr===y&&(Nn&B)===B&&(fn===4||fn===3&&(Nn&130023424)===Nn&&500>In()-wu?zo(y,0):Ka|=B),Wi(y,P)}function Tp(y,P){P===0&&((y.mode&1)===0?P=1:(P=_s,_s<<=1,(_s&130023424)===0&&(_s=4194304)));var B=bn();y=ra(y,P),y!==null&&(gn(y,P,B),Wi(y,B))}function Rp(y){var P=y.memoizedState,B=0;P!==null&&(B=P.retryLane),Tp(y,B)}function d0(y,P){var B=0;switch(y.tag){case 13:var X=y.stateNode,re=y.memoizedState;re!==null&&(B=re.retryLane);break;case 19:X=y.stateNode;break;default:throw Error(o(314))}X!==null&&X.delete(P),Tp(y,B)}var Mp;Mp=function(y,P,B){if(y!==null)if(y.memoizedProps!==P.pendingProps||Ti.current)ui=!0;else{if((y.lanes&B)===0&&(P.flags&128)===0)return ui=!1,oe(y,P,B);ui=(y.flags&131072)!==0}else ui=!1,tn&&(P.flags&1048576)!==0&&lu(P,xa,P.index);switch(P.lanes=0,P.tag){case 2:var X=P.type;H(y,P),y=P.pendingProps;var re=ja(P,gi.current);Qo(P,B),re=Ro(null,P,X,y,re,B);var le=Mo();return P.flags|=1,typeof re=="object"&&re!==null&&typeof re.render=="function"&&re.$$typeof===void 0?(P.tag=1,P.memoizedState=null,P.updateQueue=null,ii(X)?(le=!0,Wo(P)):le=!1,P.memoizedState=re.state!==null&&re.state!==void 0?re.state:null,Js(P),re.updater=$u,P.stateNode=re,re._reactInternals=P,Ui(P,X,y,B),P=ia(null,P,X,!0,le,B)):(P.tag=0,tn&&le&&Os(P),wi(null,P,re,B),P=P.child),P;case 16:X=P.elementType;e:{switch(H(y,P),y=P.pendingProps,re=X._init,X=re(X._payload),P.type=X,re=P.tag=p0(X),y=$a(X,y),re){case 0:P=ns(null,P,X,y,B);break e;case 1:P=Pi(null,P,X,y,B);break e;case 11:P=_c(null,P,X,y,B);break e;case 14:P=rs(null,P,X,$a(X.type,y),B);break e}throw Error(o(306,X,""))}return P;case 0:return X=P.type,re=P.pendingProps,re=P.elementType===X?re:$a(X,re),ns(y,P,X,re,B);case 1:return X=P.type,re=P.pendingProps,re=P.elementType===X?re:$a(X,re),Pi(y,P,X,re,B);case 3:e:{if(il(P),y===null)throw Error(o(387));X=P.pendingProps,le=P.memoizedState,re=le.element,wl(y,P),co(P,X,null,B);var _e=P.memoizedState;if(X=_e.element,Oe&&le.isDehydrated)if(le={element:X,isDehydrated:!1,cache:_e.cache,pendingSuspenseBoundaries:_e.pendingSuspenseBoundaries,transitions:_e.transitions},P.updateQueue.baseState=le,P.memoizedState=le,P.flags&256){re=Hi(Error(o(423)),P),P=Al(y,P,X,B,re);break e}else if(X!==re){re=Hi(Error(o(424)),P),P=Al(y,P,X,B,re);break e}else for(Oe&&(vi=Nr(P.stateNode.containerInfo),$n=P,tn=!0,za=null,Zs=!1),B=Cn(P,null,X,B),P.child=B;B;)B.flags=B.flags&-3|4096,B=B.sibling;else{if(Ce(),X===re){P=te(y,P,B);break e}wi(y,P,X,B)}P=P.child}return P;case 5:return qi(P),y===null&&Ko(P),X=P.type,re=P.pendingProps,le=y!==null?y.memoizedProps:null,_e=re.children,ne(X,re)?_e=null:le!==null&&ne(X,le)&&(P.flags|=32),an(y,P),wi(y,P,_e,B),P.child;case 6:return y===null&&Ko(P),null;case 13:return cf(y,P,B);case 4:return Jo(P,P.stateNode.containerInfo),X=P.pendingProps,y===null?P.child=Sr(P,null,X,B):wi(y,P,X,B),P.child;case 11:return X=P.type,re=P.pendingProps,re=P.elementType===X?re:$a(X,re),_c(y,P,X,re,B);case 7:return wi(y,P,P.pendingProps,B),P.child;case 8:return wi(y,P,P.pendingProps.children,B),P.child;case 12:return wi(y,P,P.pendingProps.children,B),P.child;case 10:e:{if(X=P.type._context,re=P.pendingProps,le=P.memoizedProps,_e=re.value,Ea(P,X,_e),le!==null)if(Mi(le.value,_e)){if(le.children===re.children&&!Ti.current){P=te(y,P,B);break e}}else for(le=P.child,le!==null&&(le.return=P);le!==null;){var Ke=le.dependencies;if(Ke!==null){_e=le.child;for(var ut=Ke.firstContext;ut!==null;){if(ut.context===X){if(le.tag===1){ut=Oa(-1,B&-B),ut.tag=2;var Lt=le.updateQueue;if(Lt!==null){Lt=Lt.shared;var Zt=Lt.pending;Zt===null?ut.next=ut:(ut.next=Zt.next,Zt.next=ut),Lt.pending=ut}}le.lanes|=B,ut=le.alternate,ut!==null&&(ut.lanes|=B),Zo(le.return,B,P),Ke.lanes|=B;break}ut=ut.next}}else if(le.tag===10)_e=le.type===P.type?null:le.child;else if(le.tag===18){if(_e=le.return,_e===null)throw Error(o(341));_e.lanes|=B,Ke=_e.alternate,Ke!==null&&(Ke.lanes|=B),Zo(_e,B,P),_e=le.sibling}else _e=le.child;if(_e!==null)_e.return=le;else for(_e=le;_e!==null;){if(_e===P){_e=null;break}if(le=_e.sibling,le!==null){le.return=_e.return,_e=le;break}_e=_e.return}le=_e}wi(y,P,re.children,B),P=P.child}return P;case 9:return re=P.type,X=P.pendingProps.children,Qo(P,B),re=Di(re),X=X(re),P.flags|=1,wi(y,P,X,B),P.child;case 14:return X=P.type,re=$a(X,P.pendingProps),re=$a(X.type,re),rs(y,P,X,re,B);case 15:return go(y,P,P.type,P.pendingProps,B);case 17:return X=P.type,re=P.pendingProps,re=P.elementType===X?re:$a(X,re),H(y,P),P.tag=1,ii(X)?(y=!0,Wo(P)):y=!1,Qo(P,B),Hf(P,X,re),Ui(P,X,re,B),ia(null,P,X,!0,y,B);case 19:return R(y,P,B);case 22:return Zr(y,P,B)}throw Error(o(156,P.tag))};function zh(y,P){return lo(y,P)}function Ip(y,P,B,X){this.tag=y,this.key=B,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=P,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=X,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Uo(y,P,B,X){return new Ip(y,P,B,X)}function Oc(y){return y=y.prototype,!(!y||!y.isReactComponent)}function p0(y){if(typeof y=="function")return Oc(y)?1:0;if(y!=null){if(y=y.$$typeof,y===E)return 11;if(y===g)return 14}return 2}function Eu(y,P){var B=y.alternate;return B===null?(B=Uo(y.tag,P,y.key,y.mode),B.elementType=y.elementType,B.type=y.type,B.stateNode=y.stateNode,B.alternate=y,y.alternate=B):(B.pendingProps=P,B.type=y.type,B.flags=0,B.subtreeFlags=0,B.deletions=null),B.flags=y.flags&14680064,B.childLanes=y.childLanes,B.lanes=y.lanes,B.child=y.child,B.memoizedProps=y.memoizedProps,B.memoizedState=y.memoizedState,B.updateQueue=y.updateQueue,P=y.dependencies,B.dependencies=P===null?null:{lanes:P.lanes,firstContext:P.firstContext},B.sibling=y.sibling,B.index=y.index,B.ref=y.ref,B}function Yf(y,P,B,X,re,le){var _e=2;if(X=y,typeof y=="function")Oc(y)&&(_e=1);else if(typeof y=="string")_e=5;else e:switch(y){case h:return ma(B.children,re,le,P);case p:_e=8,re|=8;break;case w:return y=Uo(12,B,P,re|2),y.elementType=w,y.lanes=le,y;case S:return y=Uo(13,B,P,re),y.elementType=S,y.lanes=le,y;case m:return y=Uo(19,B,P,re),y.elementType=m,y.lanes=le,y;case b:return Ac(B,re,le,P);default:if(typeof y=="object"&&y!==null)switch(y.$$typeof){case d:_e=10;break e;case _:_e=9;break e;case E:_e=11;break e;case g:_e=14;break e;case v:_e=16,X=null;break e}throw Error(o(130,y==null?y:typeof y,""))}return P=Uo(_e,B,P,re),P.elementType=y,P.type=X,P.lanes=le,P}function ma(y,P,B,X){return y=Uo(7,y,X,P),y.lanes=B,y}function Ac(y,P,B,X){return y=Uo(22,y,X,P),y.elementType=b,y.lanes=B,y.stateNode={isHidden:!1},y}function Cc(y,P,B){return y=Uo(6,y,null,P),y.lanes=B,y}function Xf(y,P,B){return P=Uo(4,y.children!==null?y.children:[],y.key,P),P.lanes=B,P.stateNode={containerInfo:y.containerInfo,pendingChildren:null,implementation:y.implementation},P}function jp(y,P,B,X,re){this.tag=P,this.containerInfo=y,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=se,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Es(0),this.expirationTimes=Es(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Es(0),this.identifierPrefix=X,this.onRecoverableError=re,Oe&&(this.mutableSourceEagerHydrationData=null)}function Uh(y,P,B,X,re,le,_e,Ke,ut){return y=new jp(y,P,B,Ke,ut),P===1?(P=1,le===!0&&(P|=8)):P=0,le=Uo(3,null,null,P),y.current=le,le.stateNode=y,le.memoizedState={element:X,isDehydrated:B,cache:null,transitions:null,pendingSuspenseBoundaries:null},Js(le),y}function Kf(y){if(!y)return ln;y=y._reactInternals;e:{if(j(y)!==y||y.tag!==1)throw Error(o(170));var P=y;do{switch(P.tag){case 3:P=P.stateNode.context;break e;case 1:if(ii(P.type)){P=P.stateNode.__reactInternalMemoizedMergedChildContext;break e}}P=P.return}while(P!==null);throw Error(o(171))}if(y.tag===1){var B=y.type;if(ii(B))return ha(y,B,P)}return P}function Qu(y){var P=y._reactInternals;if(P===void 0)throw typeof y.render=="function"?Error(o(188)):(y=Object.keys(y).join(","),Error(o(268,y)));return y=L(P),y===null?null:y.stateNode}function Zf(y,P){if(y=y.memoizedState,y!==null&&y.dehydrated!==null){var B=y.retryLane;y.retryLane=B!==0&&B<P?B:P}}function kc(y,P){Zf(y,P),(y=y.alternate)&&Zf(y,P)}function g0(y){return y=L(y),y===null?null:y.stateNode}function Fp(){return null}return t.attemptContinuousHydration=function(y){if(y.tag===13){var P=ra(y,134217728);if(P!==null){var B=bn();la(P,y,134217728,B)}kc(y,134217728)}},t.attemptDiscreteHydration=function(y){if(y.tag===13){var P=ra(y,1);if(P!==null){var B=bn();la(P,y,1,B)}kc(y,1)}},t.attemptHydrationAtCurrentPriority=function(y){if(y.tag===13){var P=hi(y),B=ra(y,P);if(B!==null){var X=bn();la(B,y,P,X)}kc(y,P)}},t.attemptSynchronousHydration=function(y){switch(y.tag){case 3:var P=y.stateNode;if(P.current.memoizedState.isDehydrated){var B=Vs(P.pendingLanes);B!==0&&(Fa(P,B|1),Wi(P,In()),(vr&6)===0&&(on(),oi()))}break;case 13:Nl(function(){var X=ra(y,1);if(X!==null){var re=bn();la(X,y,1,re)}}),kc(y,1)}},t.batchedUpdates=function(y,P){var B=vr;vr|=1;try{return y(P)}finally{vr=B,vr===0&&(on(),Ao&&oi())}},t.createComponentSelector=function(y){return{$$typeof:yn,value:y}},t.createContainer=function(y,P,B,X,re,le,_e){return Uh(y,P,!1,null,B,X,re,le,_e)},t.createHasPseudoClassSelector=function(y){return{$$typeof:qn,value:y}},t.createHydrationContainer=function(y,P,B,X,re,le,_e,Ke,ut){return y=Uh(B,X,!0,y,re,le,_e,Ke,ut),y.context=Kf(null),B=y.current,X=bn(),re=hi(B),le=Oa(X,re),le.callback=P??null,Ga(B,le,re),y.current.lanes=re,gn(y,re,X),Wi(y,X),y},t.createPortal=function(y,P,B){var X=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:X==null?null:""+X,children:y,containerInfo:P,implementation:B}},t.createRoleSelector=function(y){return{$$typeof:oa,value:y}},t.createTestNameSelector=function(y){return{$$typeof:Do,value:y}},t.createTextSelector=function(y){return{$$typeof:vo,value:y}},t.deferredUpdates=function(y){var P=It,B=vn.transition;try{return vn.transition=null,It=16,y()}finally{It=P,vn.transition=B}},t.discreteUpdates=function(y,P,B,X,re){var le=It,_e=vn.transition;try{return vn.transition=null,It=1,y(P,B,X,re)}finally{It=le,vn.transition=_e,vr===0&&on()}},t.findAllNodes=Aa,t.findBoundingRects=function(y,P){if(!Ee)throw Error(o(363));P=Aa(y,P),y=[];for(var B=0;B<P.length;B++)y.push(he(P[B]));for(P=y.length-1;0<P;P--){B=y[P];for(var X=B.x,re=X+B.width,le=B.y,_e=le+B.height,Ke=P-1;0<=Ke;Ke--)if(P!==Ke){var ut=y[Ke],Lt=ut.x,Zt=Lt+ut.width,br=ut.y,Vt=br+ut.height;if(X>=Lt&&le>=br&&re<=Zt&&_e<=Vt){y.splice(P,1);break}else if(X!==Lt||B.width!==ut.width||Vt<le||br>_e){if(!(le!==br||B.height!==ut.height||Zt<X||Lt>re)){Lt>X&&(ut.width+=Lt-X,ut.x=X),Zt<re&&(ut.width=re-Lt),y.splice(P,1);break}}else{br>le&&(ut.height+=br-le,ut.y=le),Vt<_e&&(ut.height=_e-br),y.splice(P,1);break}}}return y},t.findHostInstance=Qu,t.findHostInstanceWithNoPortals=function(y){return y=x(y),y=y!==null?N(y):null,y===null?null:y.stateNode},t.findHostInstanceWithWarning=function(y){return Qu(y)},t.flushControlled=function(y){var P=vr;vr|=1;var B=vn.transition,X=It;try{vn.transition=null,It=1,y()}finally{It=X,vn.transition=B,vr=P,vr===0&&(on(),oi())}},t.flushPassiveEffects=Tl,t.flushSync=Nl,t.focusWithin=function(y,P){if(!Ee)throw Error(o(363));for(y=mo(y),P=Xa(y,P),P=Array.from(P),y=0;y<P.length;){var B=P[y++];if(!Re(B)){if(B.tag===5&&vt(B.stateNode))return!0;for(B=B.child;B!==null;)P.push(B),B=B.sibling}}return!1},t.getCurrentUpdatePriority=function(){return It},t.getFindAllNodesFailureDescription=function(y,P){if(!Ee)throw Error(o(363));var B=0,X=[];y=[mo(y),0];for(var re=0;re<y.length;){var le=y[re++],_e=y[re++],Ke=P[_e];if((le.tag!==5||!Re(le))&&(yu(le,Ke)&&(X.push(Xu(Ke)),_e++,_e>B&&(B=_e)),_e<P.length))for(le=le.child;le!==null;)y.push(le,_e),le=le.sibling}if(B<P.length){for(y=[];B<P.length;B++)y.push(Xu(P[B]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(X.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+y.join(" > ")}return null},t.getPublicRootInstance=function(y){if(y=y.current,!y.child)return null;switch(y.child.tag){case 5:return U(y.child.stateNode);default:return y.child.stateNode}},t.injectIntoDevTools=function(y){if(y={bundleType:y.bundleType,version:y.version,rendererPackageName:y.rendererPackageName,rendererConfig:y.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:g0,findFiberByHostInstance:y.findFiberByHostInstance||Fp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")y=!1;else{var P=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(P.isDisabled||!P.supportsFiber)y=!0;else{try{uo=P.inject(y),ai=P}catch{}y=!!P.checkDCE}}return y},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(y,P,B,X){if(!Ee)throw Error(o(363));y=Aa(y,P);var re=wt(y,B,X).disconnect;return{disconnect:function(){re()}}},t.registerMutableSourceForHydration=function(y,P){var B=P._getVersion;B=B(P._source),y.mutableSourceEagerHydrationData==null?y.mutableSourceEagerHydrationData=[P,B]:y.mutableSourceEagerHydrationData.push(P,B)},t.runWithPriority=function(y,P){var B=It;try{return It=y,P()}finally{It=B}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(y,P,B,X){var re=P.current,le=bn(),_e=hi(re);return B=Kf(B),P.context===null?P.context=B:P.pendingContext=B,P=Oa(le,_e),P.payload={element:y},X=X===void 0?null:X,X!==null&&(P.callback=X),y=Ga(re,P,_e),y!==null&&(la(y,re,_e,le),xi(y,re,_e)),_e},t}),sg}var G5;function wx(){return G5||(G5=1,og.exports=bx()),og.exports}var _x=wx();const Sx=mp(_x);var lg={exports:{}},Dc={};/**
|
|
62
|
-
* @license React
|
|
63
|
-
* react-reconciler-constants.production.min.js
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the MIT license found in the
|
|
68
|
-
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var V5;function xx(){return V5||(V5=1,Dc.ConcurrentRoot=1,Dc.ContinuousEventPriority=4,Dc.DefaultEventPriority=16,Dc.DiscreteEventPriority=1,Dc.IdleEventPriority=536870912,Dc.LegacyRoot=0),Dc}var W5;function Ex(){return W5||(W5=1,lg.exports=xx()),lg.exports}var P6=Ex(),Px=Mr();const $5={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Y5=!1,X5=!1;const cm=".react-konva-event";let O6=!1;function Ox(e){O6=e}const Ax=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
70
|
-
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
71
|
-
Consider to add onDragMove or onDragEnd events.
|
|
72
|
-
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
73
|
-
`,Cx=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
74
|
-
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
75
|
-
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
76
|
-
`,kx={};function t0(e,r,t=kx){if(!Y5&&"zIndex"in r&&(console.warn(Cx),Y5=!0),!X5&&r.draggable){var n=r.x!==void 0||r.y!==void 0,a=r.onDragEnd||r.onDragMove;n&&!a&&(console.warn(Ax),X5=!0)}for(var i in t)if(!$5[i]){var o=i.slice(0,2)==="on",l=t[i]!==r[i];if(o&&l){var u=i.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),e.off(u,t[i])}var c=!r.hasOwnProperty(i);c&&e.setAttr(i,void 0)}var h=O6||r._useStrictMode,p={},w=!1;const d={};for(var i in r)if(!$5[i]){var o=i.slice(0,2)==="on",_=t[i]!==r[i];if(o&&_){var u=i.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),r[i]&&(d[u]=r[i])}!o&&(r[i]!==t[i]||h&&r[i]!==e.getAttr(i))&&(w=!0,p[i]=r[i])}w&&(e.setAttrs(p),ef(e));for(var u in d)e.on(u+cm,d[u])}function ef(e){if(!Px.Konva.autoDrawEnabled){var r=e.getLayer()||e.getStage();r&&r.batchDraw()}}var ug=D2();const A6={},Lx={};fp.Node.prototype._applyProps=t0;function Nx(e,r){if(typeof r=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${r}`);return}e.add(r),ef(e)}function Tx(e,r,t){let n=fp[e];n||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),n=fp.Group);const a={},i={};for(var o in r){var l=o.slice(0,2)==="on";l?i[o]=r[o]:a[o]=r[o]}const u=new n(a);return t0(u,i),u}function Rx(e,r,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Mx(e,r,t){return!1}function Ix(e){return e}function jx(){return null}function Fx(){return null}function Dx(e,r,t,n){return Lx}function Bx(){}function qx(e){}function zx(e,r){return!1}function Ux(){return A6}function Hx(){return A6}const Gx=setTimeout,Vx=clearTimeout,Wx=-1;function $x(e,r){return!1}const Yx=!1,Xx=!0,Kx=!0;function Zx(e,r){r.parent===e?r.moveToTop():e.add(r),ef(e)}function Qx(e,r){r.parent===e?r.moveToTop():e.add(r),ef(e)}function C6(e,r,t){r._remove(),e.add(r),r.setZIndex(t.getZIndex()),ef(e)}function Jx(e,r,t){C6(e,r,t)}function eE(e,r){r.destroy(),r.off(cm),ef(e)}function tE(e,r){r.destroy(),r.off(cm),ef(e)}function rE(e,r,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function nE(e,r,t){}function iE(e,r,t,n,a){t0(e,a,n)}function aE(e){e.hide(),ef(e)}function oE(e){}function sE(e,r){(r.visible==null||r.visible)&&e.show()}function lE(e,r){}function uE(e){}function cE(){}const fE=()=>P6.DefaultEventPriority,hE=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Zx,appendChildToContainer:Qx,appendInitialChild:Nx,cancelTimeout:Vx,clearContainer:uE,commitMount:nE,commitTextUpdate:rE,commitUpdate:iE,createInstance:Tx,createTextInstance:Rx,detachDeletedInstance:cE,finalizeInitialChildren:Mx,getChildHostContext:Hx,getCurrentEventPriority:fE,getPublicInstance:Ix,getRootHostContext:Ux,hideInstance:aE,hideTextInstance:oE,idlePriority:ug.unstable_IdlePriority,insertBefore:C6,insertInContainerBefore:Jx,isPrimaryRenderer:Yx,noTimeout:Wx,now:ug.unstable_now,prepareForCommit:jx,preparePortalMount:Fx,prepareUpdate:Dx,removeChild:eE,removeChildFromContainer:tE,resetAfterCommit:Bx,resetTextContent:qx,run:ug.unstable_runWithPriority,scheduleTimeout:Gx,shouldDeprioritizeSubtree:zx,shouldSetTextContent:$x,supportsMutation:Kx,unhideInstance:sE,unhideTextInstance:lE,warnsIfNotActing:Xx},Symbol.toStringTag,{value:"Module"}));var dE=Object.defineProperty,pE=Object.defineProperties,gE=Object.getOwnPropertyDescriptors,K5=Object.getOwnPropertySymbols,vE=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,Z5=(e,r,t)=>r in e?dE(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Q5=(e,r)=>{for(var t in r||(r={}))vE.call(r,t)&&Z5(e,t,r[t]);if(K5)for(var t of K5(r))mE.call(r,t)&&Z5(e,t,r[t]);return e},yE=(e,r)=>pE(e,gE(r)),J5,eb;typeof window<"u"&&((J5=window.document)!=null&&J5.createElement||((eb=window.navigator)==null?void 0:eb.product)==="ReactNative")?ni.useLayoutEffect:ni.useEffect;function k6(e,r,t){if(!e)return;if(t(e)===!0)return e;let n=e.child;for(;n;){const a=k6(n,r,t);if(a)return a;n=n.sibling}}function L6(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const tb=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=tb;return}return tb.apply(this,arguments)};const fm=L6(ni.createContext(null));class N6 extends ni.Component{render(){return ni.createElement(fm.Provider,{value:this._reactInternals},this.props.children)}}function bE(){const e=ni.useContext(fm);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const r=ni.useId();return ni.useMemo(()=>{for(const n of[e,e==null?void 0:e.alternate]){if(!n)continue;const a=k6(n,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===r)return!0;o=o.next}});if(a)return a}},[e,r])}function wE(){const e=bE(),[r]=ni.useState(()=>new Map);r.clear();let t=e;for(;t;){if(t.type&&typeof t.type=="object"){const a=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;a&&a!==fm&&!r.has(a)&&r.set(a,ni.useContext(L6(a)))}t=t.return}return r}function T6(){const e=wE();return ni.useMemo(()=>Array.from(e.keys()).reduce((r,t)=>n=>ni.createElement(r,null,ni.createElement(t.Provider,yE(Q5({},n),{value:e.get(t)}))),r=>ni.createElement(N6,Q5({},r))),[e])}function _E(e){const r=Vr.useRef({});return Vr.useLayoutEffect(()=>{r.current=e}),Vr.useLayoutEffect(()=>()=>{r.current={}},[]),r.current}const SE=e=>{const r=Vr.useRef(),t=Vr.useRef(),n=Vr.useRef(),a=_E(e),i=T6(),o=l=>{const{forwardedRef:u}=e;u&&(typeof u=="function"?u(l):u.current=l)};return Vr.useLayoutEffect(()=>(t.current=new fp.Stage({width:e.width,height:e.height,container:r.current}),o(t.current),n.current=dh.createContainer(t.current,P6.LegacyRoot,!1,null),dh.updateContainer(Vr.createElement(i,{},e.children),n.current),()=>{fp.isBrowser&&(o(null),dh.updateContainer(null,n.current,null),t.current.destroy())}),[]),Vr.useLayoutEffect(()=>{o(t.current),t0(t.current,e,a),dh.updateContainer(Vr.createElement(i,{},e.children),n.current,null)}),Vr.createElement("div",{ref:r,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},xE="Layer",EE="FastLayer",M1="Group",PE="Label",OE="Rect",AE="Circle",CE="Ellipse",kE="Wedge",LE="Line",NE="Sprite",TE="Image",RE="Text",ME="TextPath",IE="Star",jE="Ring",FE="Arc",DE="Tag",BE="Path",qE="RegularPolygon",zE="Arrow",UE="Shape",HE="Transformer",dh=Sx(hE);dh.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:Vr.version,rendererPackageName:"react-konva"});const GE=Vr.forwardRef((e,r)=>Vr.createElement(N6,{},Vr.createElement(SE,{...e,forwardedRef:r}))),VE=Ox,WE=Object.freeze(Object.defineProperty({__proto__:null,Arc:FE,Arrow:zE,Circle:AE,Ellipse:CE,FastLayer:EE,Group:M1,Image:TE,KonvaRenderer:dh,Label:PE,Layer:xE,Line:LE,Path:BE,Rect:OE,RegularPolygon:qE,Ring:jE,Shape:UE,Sprite:NE,Stage:GE,Star:IE,Tag:DE,Text:RE,TextPath:ME,Transformer:HE,Wedge:kE,useStrictMode:VE},Symbol.toStringTag,{value:"Module"})),Fu=Kc(WE);var cg,rb;function r0(){if(rb)return cg;rb=1;var e=di();return cg=function(t,n,a){const i=e.useRef("loading"),o=e.useRef(),[l,u]=e.useState(0),c=e.useRef(),h=e.useRef(),p=e.useRef();return(c.current!==t||h.current!==n||p.current!==a)&&(i.current="loading",o.current=void 0,c.current=t,h.current=n,p.current=a),e.useLayoutEffect(function(){if(!t)return;var w=document.createElement("img");function d(){i.current="loaded",o.current=w,u(Math.random())}function _(){i.current="failed",o.current=void 0,u(Math.random())}return w.addEventListener("load",d),w.addEventListener("error",_),n&&(w.crossOrigin=n),a&&(w.referrerPolicy=a),w.src=t,function(){w.removeEventListener("load",d),w.removeEventListener("error",_)}},[t,n,a]),[o.current,i.current]},cg}var Fd={},Dd={},$E=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const YE=e=>{const r=window.getComputedStyle(e).position;return!(r==="absolute"||r==="relative")};function R6(e=()=>{}){const r=Vr.useRef(e);return r.current=e,Vr.useCallback((...t)=>r.current.apply(null,t),[])}const XE=({children:e,groupProps:r,divProps:t,transform:n,transformFunc:a,parentNodeFunc:i})=>{const o=T6(),l=Vr.useRef(null),[u]=Vr.useState(()=>document.createElement("div")),c=Vr.useMemo(()=>fw.createRoot(u),[u]),h=n??!0,p=R6(()=>{if(h&&l.current){let S=l.current.getAbsoluteTransform().decompose();a&&(S=a(S)),u.style.position="absolute",u.style.zIndex="10",u.style.top="0px",u.style.left="0px",u.style.transform=`translate(${S.x}px, ${S.y}px) rotate(${S.rotation}deg) scaleX(${S.scaleX}) scaleY(${S.scaleY})`,u.style.transformOrigin="top left"}else u.style.position="",u.style.zIndex="",u.style.top="",u.style.left="",u.style.transform="",u.style.transformOrigin="";const w=t||{},{style:d}=w,_=$E(w,["style"]);Object.assign(u.style,d),Object.assign(u,_)});return Vr.useLayoutEffect(()=>{var w;const d=l.current;if(!d)return;const _=i?i({stage:d.getStage()}):(w=d.getStage())===null||w===void 0?void 0:w.container();if(_)return _.appendChild(u),h&&YE(_)&&(_.style.position="relative"),d.on("absoluteTransformChange",p),p(),()=>{var E;d.off("absoluteTransformChange",p),(E=u.parentNode)===null||E===void 0||E.removeChild(u)}},[h,i]),Vr.useLayoutEffect(()=>{p()},[t,a]),Vr.useLayoutEffect(()=>{c.render(Vr.createElement(o,null,e))}),Vr.useLayoutEffect(()=>()=>{setTimeout(()=>{c.unmount()})},[]),Vr.createElement(M1,Object.assign({ref:l},r))},KE=({selector:e,enabled:r,children:t})=>{const n=Vr.useRef(null),a=Vr.useRef(null),i=Vr.useRef(null),o=r??!0;return Vr.useLayoutEffect(()=>{if(!n.current||!a.current)return;i.current=a.current;const u=n.current.getStage().findOne(e);o&&u?a.current.moveTo(u):a.current.moveTo(n.current);const c=n.current.getLayer();if(c&&(c.batchDraw(),u)){const h=u.getLayer();if(!h)return;h.batchDraw()}},[e,o]),Vr.useEffect(()=>()=>{var l;(l=i.current)===null||l===void 0||l.destroy()},[]),Vr.createElement(M1,{name:"_outer_portal",ref:n},Vr.createElement(M1,{name:"_inner_portal",ref:a},t))};var ZE=r0();const QE=mp(ZE),JE=Object.freeze(Object.defineProperty({__proto__:null,Html:XE,Portal:KE,useEvent:R6,useImage:QE},Symbol.toStringTag,{value:"Module"})),Mh=Kc(JE);function eP(e,r){return Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(r))),e}function M6(e,r,t){const n=r-1,a=t[j6(n,t.length)];return a.marker!=="Z"?a:M6(e,n,t)}function I6(e,r,t){const n=r+1,a=t[j6(n,t.length)];return a.marker==="Z"?I6(e,n,t):a}function tP(e,r,t){let n=t[r-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"L":case"A":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"H":e.marker="L",e.values.x+=n.values.x,e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x,e.values.y+=n.values.y;break;case"C":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"S":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"Q":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y;break;case"T":e.values.x+=n.values.x,e.values.y+=n.values.y;break}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x;break}if(e.marker==="Z"){let a=function(o,l){return o[l].marker==="M"?o[l]:a(o,l-1)},i=a(t,r);e.values.x=i.values.x,e.values.y=i.values.y}return e}function rP(e,r){const t=[];switch(e.toUpperCase()){case"M":for(let n=0;n<r.length;n+=2){let a;e===e.toUpperCase()?a=n===0?"M":"L":a=n===0?"m":"l",t.push({marker:a,values:{x:r[n],y:r[n+1]}})}break;case"L":for(let n=0;n<r.length;n+=2)t.push({marker:e,values:{x:r[n],y:r[n+1]}});break;case"H":for(let n=0;n<r.length;n++)t.push({marker:e,values:{x:r[n],y:0}});break;case"V":for(let n=0;n<r.length;n++)t.push({marker:e,values:{x:0,y:r[n]}});break;case"C":for(let n=0;n<r.length;n+=6)t.push({marker:e,values:{x1:r[n],y1:r[n+1],x2:r[n+2],y2:r[n+3],x:r[n+4],y:r[n+5]}});break;case"S":for(let n=0;n<r.length;n+=4)t.push({marker:e,values:{x2:r[n],y2:r[n+1],x:r[n+2],y:r[n+3]}});break;case"Q":for(let n=0;n<r.length;n+=4)t.push({marker:e,values:{x1:r[n],y1:r[n+1],x:r[n+2],y:r[n+3]}});break;case"T":for(let n=0;n<r.length;n+=2)t.push({marker:e,values:{x:r[n],y:r[n+1]}});break;case"A":for(let n=0;n<r.length;n+=7)t.push({marker:e,values:{radiusX:r[n],radiusY:r[n+1],rotation:r[n+2],largeArc:r[n+3],sweep:r[n+4],x:r[n+5],y:r[n+6]}});break;case"Z":t.push({marker:e,values:{x:0,y:0}});break}return t}function j6(e,r){return(e%r+r)%r}function nP(e,r,t){if(r!==0&&e.marker==="L"){let n=t[r-1];["x","y"].every(i=>Math.round(Math.abs(n.values[i]-e.values[i]))===0)&&(e.overlap=!0)}return e}function x2(e,r){const t=["x","y"].every(n=>Math.round(Math.abs(e[r].values[n]-e[0].values[n]))===0);e[r].marker==="L"&&t&&(e[r].overlap=!0,x2(e,r-1)),e[r].marker==="Z"&&x2(e,r-1)}function iP(e,r,t){const n=ib(e.values,t.values),a=ib(r.values,e.values);return Math.min(a,n)}function nb(e,r){return Math.atan2(r.x-e.x,r.y-e.y)}function ib(e,r){const t=e.x-r.x,n=e.y-r.y;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}function ab(e,r){return Math.sin(e)*r}function ob(e,r){return Math.cos(e)*r}function sb(e,r){const t=r/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?r:t}function aP(e,r){return r*Math.tan(e)}function oP(e,r){let t,n=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=sb(e/2,-r):(t=sb(e/2,r),n=1,t===1/0&&(t=r)),{offset:t,sweepFlag:n}}function sP(e){const r=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(t=>{let n="";if(t.marker!=="Z"){const a=Object.keys(t.values);n=r.filter(i=>a.indexOf(i)!==-1).map(i=>t.values[i]).join()}return`${t.marker}${n}`}).join("").trim()}function F6(e){const r=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(r)].map(n=>({marker:n[0],index:n.index})).reduceRight((n,a)=>{const i=e.substring(a.index,n.length?n[n.length-1].index:e.length);return n.concat([{marker:a.marker,index:a.index,chunk:i.length>0?i.substr(1,i.length-1):i}])},[]).reverse().flatMap(n=>{const a=n.chunk.match(t),i=a?a.map(parseFloat):[];return rP(n.marker,i)}).map(tP)}function D6(e,r,t){let n=[],a=[];return t&&e.forEach(i=>eP(i,t)),e.forEach(i=>{i.marker==="M"&&n.push([]),n[n.length-1].push(i)}),n.forEach(i=>{i.map(nP),x2(i,i.length-1);const o=i[i.length-1].marker=="Z";i.filter(l=>!l.overlap).map((l,u,c)=>{const p=M6(l,u,c),w=I6(l,u,c),d=nb(l.values,p.values),_=nb(l.values,w.values),E=_-d,S=E*(180/Math.PI),m=iP(l,p,w),g=Math.abs(aP(E/2,m/2)),v=Math.min(r,g),b=oP(E,v),O=b.offset,I=b.sweepFlag,T=(u==0||u==c.length-1)&&!o;switch(l.marker){case"M":case"L":const M=[l.values.x+ab(d,O),l.values.y+ob(d,O)],j=[l.values.x+ab(_,O),l.values.y+ob(_,O)];T?a.push({marker:l.marker,values:l.values}):a.push({marker:l.marker,values:{x:parseFloat(M[0].toFixed(3)),y:parseFloat(M[1].toFixed(3))}}),!T&&(w.marker==="L"||w.marker==="M")&&a.push({marker:"A",radius:v,values:{radiusX:parseFloat(v.toFixed(3)),radiusY:parseFloat(v.toFixed(3)),rotation:S,largeArc:0,sweep:I,x:parseFloat(j[0].toFixed(3)),y:parseFloat(j[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":a.push({marker:l.marker,values:l.values});break}})}),{path:sP(a),commands:a}}function lP(e,r,t){return D6([...F6(e)],r,t)}const uP=Object.freeze(Object.defineProperty({__proto__:null,parsePath:F6,roundCommands:D6,roundCorners:lP},Symbol.toStringTag,{value:"Module"})),cP=Kc(uP);var jl={},Bd={},l1={},lb;function fP(){if(lb)return l1;lb=1;var e=e||{};e.stringify=function(){var r={"visit_linear-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return r.visit_gradient(t)},"visit_radial-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return r.visit_gradient(t)},visit_gradient:function(t){var n=r.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+r.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,a=r.visit(t.at),i=r.visit(t.style);return i&&(n+=" "+i),a&&(n+=" at "+a),n},"visit_default-radial":function(t){var n="",a=r.visit(t.at);return a&&(n+=a),n},"visit_extent-keyword":function(t){var n=t.value,a=r.visit(t.at);return a&&(n+=" at "+a),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return r.visit(t.value.x)+" "+r.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return r.visit_color(t.value,t)},visit_hex:function(t){return r.visit_color("#"+t.value,t)},visit_rgb:function(t){return r.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return r.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var a=t,i=r.visit(n.length);return i&&(a+=" "+i),a},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",a=t.length;return t.forEach(function(i,o){n+=r.visit(i),o<a-1&&(n+=", ")}),n},visit:function(t){if(!t)return"";var n="";if(t instanceof Array)return r.visit_array(t,n);if(t.type){var a=r["visit_"+t.type];if(a)return a(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return r.visit(t)}}();var e=e||{};return e.parse=function(){var r={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n($){var Z=new Error(t+": "+$);throw Z.source=t,Z}function a(){var $=i();return t.length>0&&n("Invalid input not EOF"),$}function i(){return b(o)}function o(){return l("linear-gradient",r.linearGradient,c)||l("repeating-linear-gradient",r.repeatingLinearGradient,c)||l("radial-gradient",r.radialGradient,w)||l("repeating-radial-gradient",r.repeatingRadialGradient,w)}function l($,Z,V){return u(Z,function(G){var z=V();return z&&(U(r.comma)||n("Missing comma before color stops")),{type:$,orientation:z,colorStops:b(O)}})}function u($,Z){var V=U($);if(V){U(r.startCall)||n("Missing (");var G=Z(V);return U(r.endCall)||n("Missing )"),G}}function c(){return h()||p()}function h(){return F("directional",r.sideOrCorner,1)}function p(){return F("angular",r.angleValue,1)}function w(){var $,Z=d(),V;return Z&&($=[],$.push(Z),V=t,U(r.comma)&&(Z=d(),Z?$.push(Z):t=V)),$}function d(){var $=_()||E();if($)$.at=m();else{var Z=S();if(Z){$=Z;var V=m();V&&($.at=V)}else{var G=g();G&&($={type:"default-radial",at:G})}}return $}function _(){var $=F("shape",/^(circle)/i,0);return $&&($.style=N()||S()),$}function E(){var $=F("shape",/^(ellipse)/i,0);return $&&($.style=L()||S()),$}function S(){return F("extent-keyword",r.extentKeywords,1)}function m(){if(F("position",/^at/,0)){var $=g();return $||n("Missing positioning value"),$}}function g(){var $=v();if($.x||$.y)return{type:"position",value:$}}function v(){return{x:L(),y:L()}}function b($){var Z=$(),V=[];if(Z)for(V.push(Z);U(r.comma);)Z=$(),Z?V.push(Z):n("One extra comma");return V}function O(){var $=I();return $||n("Expected color definition"),$.length=L(),$}function I(){return M()||C()||j()||T()}function T(){return F("literal",r.literalColor,0)}function M(){return F("hex",r.hexColor,1)}function j(){return u(r.rgbColor,function(){return{type:"rgb",value:b(x)}})}function C(){return u(r.rgbaColor,function(){return{type:"rgba",value:b(x)}})}function x(){return U(r.number)[1]}function L(){return F("%",r.percentageValue,1)||A()||N()}function A(){return F("position-keyword",r.positionKeywords,1)}function N(){return F("px",r.pixelValue,1)||F("em",r.emValue,1)}function F($,Z,V){var G=U(Z);if(G)return{type:$,value:G[V]}}function U($){var Z,V;return V=/^[\n\r\t\s]+/.exec(t),V&&W(V[0].length),Z=$.exec(t),Z&&W(Z[0].length),Z}function W($){t=t.substr($)}return function($){return t=$.toString(),a()}}(),l1.parse=e.parse,l1.stringify=e.stringify,l1}var ub;function hm(){return ub||(ub=1,function(e){var r=Bd&&Bd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const t=r(fP());e.isGradient=a=>a.indexOf("linear-gradient")>=0;const n=a=>a.type==="hex"?"#"+a.value:a.type==="literal"?a.value:`${a.type}(${a.value.join(",")})`;e.parseColor=a=>{if(!(0,e.isGradient)(a))return{rotation:0,stops:[{offset:0,color:a},{offset:1,color:a}]};const i=t.default.parse(a)[0];return{rotation:parseFloat(i.orientation.value),stops:i.colorStops.map((o,l)=>({color:n(o),offset:o.length?parseFloat(o.length.value)/100:l/(i.colorStops.length-1)}))}}}(Bd)),Bd}var cb;function Pp(){return cb||(cb=1,function(e){var r,t=jl&&jl.__createBinding||(Object.create?function(c,h,p,w){w===void 0&&(w=p);var d=Object.getOwnPropertyDescriptor(h,p);d&&!("get"in d?!h.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(c,w,d)}:function(c,h,p,w){w===void 0&&(w=p),c[w]=h[p]}),n=jl&&jl.__setModuleDefault||(Object.create?function(c,h){Object.defineProperty(c,"default",{enumerable:!0,value:h})}:function(c,h){c.default=h}),a=jl&&jl.__importStar||(r=function(c){return r=Object.getOwnPropertyNames||function(h){var p=[];for(var w in h)Object.prototype.hasOwnProperty.call(h,w)&&(p[p.length]=w);return p},r(c)},function(c){if(c&&c.__esModule)return c;var h={};if(c!=null)for(var p=r(c),w=0;w<p.length;w++)p[w]!=="default"&&t(h,c,p[w]);return n(h,c),h}),i=jl&&jl.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const o=i(di()),l=a(hm()),u=i(Us());e.useColor=(c,h=c.fill,p="fill")=>o.default.useMemo(()=>{if(!l.isGradient(h))return{[p]:h};const{stops:w,rotation:d}=l.parseColor(h),_=c.a.width/2,E=c.a.height/2,S=(d%180+180)%180,m=S>45&&S<135?c.a.width:c.a.height,g=u.default.Util.degToRad(d)-Math.PI/2,v=[];return w.forEach(({offset:b,color:O})=>{v.push(b,O)}),p==="fill"?{fillLinearGradientStartPointX:_-m/2*Math.cos(g),fillLinearGradientStartPointY:E-m/2*Math.sin(g),fillLinearGradientColorStops:v,fillLinearGradientEndPointX:_+m/2*Math.cos(g),fillLinearGradientEndPointY:E+m/2*Math.sin(g),fill:w[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:_-m/2*Math.cos(g),strokeLinearGradientStartPointY:E-m/2*Math.sin(g),strokeLinearGradientColorStops:v,strokeLinearGradientEndPointX:_+m/2*Math.cos(g),strokeLinearGradientEndPointY:E+m/2*Math.sin(g)}},[h,c.width,c.height])}(jl)),jl}var fg={},qd={},fb;function If(){return fb||(fb=1,function(e){var r=qd&&qd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=function(i,o){const l=t.default.useRef();t.default.useLayoutEffect(()=>{l.current&&l.current.destroy()},[o]),t.default.useLayoutEffect(()=>{if(!a)return;const u=i.current.opacity();return u?(i.current.opacity(0),l.current=new n.default.Tween({node:i.current,opacity:u,onFinish:()=>{var c;(c=l.current)===null||c===void 0||c.destroy()}}),l.current.play(),()=>{var c;(c=l.current)===null||c===void 0||c.destroy()}):void 0},[])};const t=r(di()),n=r(Us());let a=!1;e.toggleFadeInAnimation=(i=!a)=>{a=i},e.isAnimationUsed=()=>a}(qd)),qd}var hb;function jf(){return hb||(hb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0,e.incrementLoader=function(c){t+=1;let h=!1;const p=setTimeout(()=>{h||(u(`Timeout loading asset ${c}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",c),h=!0,o())},a);return()=>{h||(clearTimeout(p),o())}},e.decrementLoader=o,e.whenLoaded=function(){return new Promise(c=>{return h=()=>{(0,r.isAnimationUsed)()?setTimeout(c,300):c(!0)},void(t===0?h():n.push(h));var h})},e.onLoadError=function(c){l.push(c)},e.triggerLoadError=u;const r=If();let t=0,n=[],a=3e4;e.setAssetLoadTimeout=c=>{a=c},e.getAssetLoadTimeout=()=>a;let i=6e3;function o(){t-=1,t===0&&(n.forEach(c=>c()),n=[])}e.setFontLoadTimeout=c=>{i=c},e.getFontLoadTimeout=()=>i;let l=[];function u(c){l.forEach(h=>h(c))}}(fg)),fg}var rc={},db;function Op(){return db||(db=1,function(e){var r,t=rc&&rc.__createBinding||(Object.create?function(S,m,g,v){v===void 0&&(v=g);var b=Object.getOwnPropertyDescriptor(m,g);b&&!("get"in b?!m.__esModule:b.writable||b.configurable)||(b={enumerable:!0,get:function(){return m[g]}}),Object.defineProperty(S,v,b)}:function(S,m,g,v){v===void 0&&(v=g),S[v]=m[g]}),n=rc&&rc.__setModuleDefault||(Object.create?function(S,m){Object.defineProperty(S,"default",{enumerable:!0,value:m})}:function(S,m){S.default=m}),a=rc&&rc.__importStar||(r=function(S){return r=Object.getOwnPropertyNames||function(m){var g=[];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[g.length]=v);return g},r(S)},function(S){if(S&&S.__esModule)return S;var m={};if(S!=null)for(var g=r(S),v=0;v<g.length;v++)g[v]!=="default"&&t(m,S,g[v]);return n(m,S),m});Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=function(){return u.value},e.setGoogleFonts=function(S){S!=="default"?(u.value=!0,l.splice(0,l.length),l.push(...S)):u.value=!1},e.getFontsList=function(){return l},e.addGlobalFont=function(S){e.globalFonts.push(S)},e.removeGlobalFont=function(S){const m=e.globalFonts.findIndex(g=>g.fontFamily===S);m!==-1&&e.globalFonts.splice(m,1)},e.replaceGlobalFonts=function(S){e.globalFonts.replace(S)},e.loadFont=async function(S,m,g){var v;if(w[S])return;const b=!!(!((v=document.fonts)===null||v===void 0)&&v.load),O=p("Arial","Arial",m,g);if(b)try{if(await document.fonts.load(`16px '${S}', ${m} ${g}`),O!==p(S,"Arial",m,g))return void(w[S]=!0)}catch{}const I=p("Times","Times",m,g),T=p(S,"Arial",m,g),M=Math.min(6e3,(0,o.getFontLoadTimeout)())/60;for(let j=0;j<M;j++){const C=p(S,"Arial",m,g),x=p(S,"Times",m,g);if(C!==T||C!==O||x!==I)return void(w[S]=!0);await new Promise(L=>setTimeout(L,60))}console.warn(`Timeout for loading font "${S}". Looks like polotno can't load it. Is it a correct font family?`),(0,o.triggerLoadError)(`Timeout for loading font "${S}"`)},e.setGoogleFontsVariants=function(S){_=S},e.getGoogleFontsVariants=function(){return _},e.injectGoogleFont=function(S){if(d[S])return;const m=`https://fonts.googleapis.com/css?family=${S.replace(/ /g,"+")}:${_}`,g=document.createElement("link");g.type="text/css",g.href=m,g.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(g),d[S]=!0},e.injectCustomFont=function(S){const m=S.fontFamily;if(E[m]||!S.url&&!S.styles)return;const g=document.createElement("style");g.type="text/css";const v=S.styles||(S.url?[{src:`url("${S.url}")`}]:[]);let b="";v.forEach(O=>{b+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${m}';
|
|
79
|
-
src: ${O.src};
|
|
80
|
-
font-style: ${O.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${O.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),g.innerHTML=b,document.getElementsByTagName("head")[0].appendChild(g),E[S.fontFamily]=!0};const i=a(fl),o=jf();let l=i.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),u=i.observable({value:!1});e.globalFonts=i.observable([]);var c="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",h=document.createElement("canvas");function p(S,m="Arial",g="normal",v="normal"){var b=h.getContext("2d");return b.font=`${g} ${v} 40px '${S}', ${m}`,b.measureText(c).width}const w={Arial:!0};e.isFontLoaded=S=>!!w[S];const d={};let _="400,400italic,700,700italic";const E={}}(rc)),rc}var nc={},pb;function tf(){return pb||(pb=1,function(e){var r,t=nc&&nc.__createBinding||(Object.create?function(o,l,u,c){c===void 0&&(c=u);var h=Object.getOwnPropertyDescriptor(l,u);h&&!("get"in h?!l.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(o,c,h)}:function(o,l,u,c){c===void 0&&(c=u),o[c]=l[u]}),n=nc&&nc.__setModuleDefault||(Object.create?function(o,l){Object.defineProperty(o,"default",{enumerable:!0,value:l})}:function(o,l){o.default=l}),a=nc&&nc.__importStar||(r=function(o){return r=Object.getOwnPropertyNames||function(l){var u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[u.length]=c);return u},r(o)},function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var u=r(o),c=0;c<u.length;c++)u[c]!=="default"&&t(l,o,u[c]);return n(l,o),l});Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextSplitAllowed=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const i=a(fl);e.flags=i.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),e.setTextVerticalResizeEnabled=i.action(o=>{e.flags.textVerticalResizeEnabled=o}),e.useRemoveBackground=i.action(o=>{e.flags.removeBackgroundEnabled=o}),e.useHtmlTextRender=i.action(o=>{e.flags.htmlRenderEnabled=o}),e.setDownScalingEnabled=i.action(o=>{e.flags.imageDownScalingEnabled=o}),e.useDownScaling=i.action(o=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),(0,e.setDownScalingEnabled)(o)}),e.setForceTextFit=i.action(o=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),e.flags.textOverflow="change-font-size"}),e.setTextOverflow=i.action(o=>{e.flags.textOverflow=o}),e.setTextSplitAllowed=i.action(o=>{e.flags.textSplitAllowed=o}),e.setAnimationsEnabled=i.action(o=>{e.flags.animationsEnabled=o})}(nc)),nc}var hg={},gb;function B6(){return gb||(gb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=function(r=""){return(r.match(/<\/p>/gi)||[]).length>1&&(r=r.replace(/<\/p>/gi,(t,n,a)=>(a.slice(n+t.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
|
-
`:t)),r.replace(/(<([^>]+)>)/gi,"")},e.sanitizeHtml=function(r){return r?/<[a-z][a-z0-9]*(\s[^>]*)?>[^<]*<\/[a-z][a-z0-9]*>/i.test(r)?(r=r.replace(/<(?![a-z/!])/gi,"<")).replace(/([^a-z0-9"'\s/])>/gi,"$1>"):r.replace(/</g,"<").replace(/>/g,">"):""}}(hg)),hg}var zd={},vb;function Ap(){return vb||(vb=1,function(e){var r=zd&&zd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=function(a,i){var o;const l={filters:[]},u={};i.brightnessEnabled&&(l.filters.push(t.default.Filters.Brighten),l.brightness=i.brightness),i.blurEnabled&&(l.filters.push(t.default.Filters.Blur),l.blurRadius=i.blurRadius,i.type==="text"&&i.lineHeight<1&&(u.offset=i.fontSize)),i.sepiaEnabled&&l.filters.push(t.default.Filters.Sepia),i.grayscaleEnabled&&l.filters.push(t.default.Filters.Grayscale),i.filters.forEach((c,h)=>{const p=n[h];p&&l.filters.push(p(c.intensity))}),a.setAttrs(l),l.filters.length?a.cache(Object.assign(Object.assign({},u),{pixelRatio:i.store._elementsPixelRatio})):a.clearCache(),(o=a.getLayer())===null||o===void 0||o.batchDraw()};const t=r(Us()),n={warm:a=>i=>{const o=i.data;for(let l=0;l<o.length;l+=4)o[l]=Math.min(o[l]+30*a,255),o[l+1]=Math.min(o[l+1]+15*a,255);return i},cold:a=>i=>{const o=i.data;for(let l=0;l<o.length;l+=4)o[l]=Math.min(o[l]-15*a,255),o[l+1]=Math.min(o[l+1]-10*a,255),o[l+2]=Math.min(o[l+2]+15*a,255);return i},natural:a=>i=>{const o=i.data;a=Math.max(0,Math.min(a,1));for(let l=0;l<o.length;l+=4){o[l]=Math.min(o[l]*(1+.1*a),255),o[l+1]=Math.min(o[l+1]*(1+.1*a),255),o[l+2]=Math.min(o[l+2]*(1+.1*a),255);const u=(o[l]+o[l+1]+o[l+2])/3;o[l]=Math.min((o[l]-u)*(1+.2*a)+u,255),o[l+1]=Math.min((o[l+1]-u)*(1+.2*a)+u,255),o[l+2]=Math.min((o[l+2]-u)*(1+.2*a)+u,255)}return i}}}(zd)),zd}var Ud={},mb;function Ff(){return mb||(mb=1,function(e){var r=Ud&&Ud.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const t=r(di()),n=zs,a=Fu,i={stroke:"rgb(0, 161, 255)",strokeWidth:2};e.setHighlighterStyle=o=>{Object.assign(i,o)},e.Highlighter=(0,n.observer)(({element:o})=>t.default.createElement(a.Rect,Object.assign({name:"highlighter",x:o.a.x,y:o.a.y,rotation:o.a.rotation,width:o.a.width,height:o.a.height,listening:!1,strokeScaleEnabled:!1},i)))}(Ud)),Ud}var Hd={},yb;function rf(){return yb||(yb=1,function(e){var r=Hd&&Hd.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.isTouchDevice=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const t=r(di());e.MOBILE_BREAKPOINT=800,e.isMobile=()=>window.innerWidth<=e.MOBILE_BREAKPOINT,e.mobileStyle=n=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${n}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${n}
|
|
91
|
-
}
|
|
92
|
-
`,e.isTouchDevice=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,e.useMobile=()=>{const[n,a]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const i=()=>{a((0,e.isMobile)())};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),n}}(Hd)),Hd}var bb={},q6="warn";function z6(e){q6=e}function U6(){return q6}function hP(e){z6(e)}var wa;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(wa||(wa={}));var E2=function(e,r){return E2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},E2(e,r)};function Zn(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");E2(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var _a=function(){return _a=Object.assign||function(r){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},_a.apply(this,arguments)};function dP(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t}function H6(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(h){return u([c,h])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(t=0)),t;)try{if(n=1,a&&(i=c[0]&2?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1],i=c;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(c);break}i[2]&&t.ops.pop(),t.trys.pop();continue}c=r.call(e,t)}catch(h){c=[6,h],a=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function op(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Iu(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),a,i=[],o;try{for(;(r===void 0||r-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return i}function ju(e,r,t){if(arguments.length===2)for(var n=0,a=r.length,i;n<a;n++)(i||!(n in r))&&(i||(i=Array.prototype.slice.call(r,0,n)),i[n]=r[n]);return e.concat(i||Array.prototype.slice.call(r))}function Cp(e){return nr(e).type}function pP(e,r){return nr(e).getChildType(r)}function G6(e,r){return nr(e).onPatch(r)}function gP(e,r){return nr(e).onSnapshot(r)}function Oh(e,r){nr(e).applyPatches(wm(r))}function vP(e,r){var t={patches:[],inversePatches:[]},n={},a,i={get recording(){return!!a},get patches(){return n.patches||(n.patches=t.patches.slice()),n.patches},get reversedInversePatches(){return n.reversedInversePatches||(n.reversedInversePatches=t.inversePatches.slice().reverse()),n.reversedInversePatches},get inversePatches(){return n.inversePatches||(n.inversePatches=t.inversePatches.slice()),n.inversePatches},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=G6(e,function(o,l){r&&!r(o,l,vm())||(t.patches.push(o),t.inversePatches.push(l),n.patches=void 0,n.inversePatches=void 0,n.reversedInversePatches=void 0)}))},replay:function(o){Oh(o||e,t.patches)},undo:function(o){Oh(o||e,t.inversePatches.slice().reverse())}};return i.resume(),i}function mP(e){var r=nr(e);if(!r.isRoot)throw new Kt("`protect` can only be invoked on root nodes");r.isProtectionEnabled=!0}function yP(e){var r=nr(e);if(!r.isRoot)throw new Kt("`unprotect` can only be invoked on root nodes");r.isProtectionEnabled=!1}function bP(e){return nr(e).isProtected}function V6(e,r){return nr(e).applySnapshot(r)}function dm(e,r){r===void 0&&(r=!0);var t=nr(e);return r?t.snapshot:t.type.getSnapshot(t,!1)}function wP(e,r){r===void 0&&(r=1);for(var t=nr(e).parent;t;){if(--r===0)return!0;t=t.parent}return!1}function _P(e,r){r===void 0&&(r=1);for(var t=r,n=nr(e).parent;n;){if(--t===0)return n.storedValue;n=n.parent}throw new Kt("Failed to find the parent of ".concat(nr(e)," at depth ").concat(r))}function SP(e,r){for(var t=nr(e).parent;t;){if(r.is(t.storedValue))return!0;t=t.parent}return!1}function xP(e,r){for(var t=nr(e).parent;t;){if(r.is(t.storedValue))return t.storedValue;t=t.parent}throw new Kt("Failed to find the parent of ".concat(nr(e)," of a given type"))}function W6(e){return nr(e).root.storedValue}function $6(e){return nr(e).path}function EP(e){return Nh(nr(e).path)}function PP(e){return nr(e).isRoot}function OP(e,r){var t=f8(nr(e),r);return t?t.value:void 0}function AP(e,r,t){var n=nr(r).root.identifierCache.resolve(e,Ih(t));return n==null?void 0:n.value}function Y6(e){return nr(e).identifier}function CP(e,r){r===void 0&&(r=!0);try{var t=e();if(t==null)return;if(An(t))return r?pm(t)?t:void 0:t;throw new Kt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof _m)return;throw n}}function kP(e,r){r===void 0&&(r=!0);try{var t=e();if(t==null)return!1;if(An(t))return r?pm(t):!0;throw new Kt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof _m)return!1;throw n}}function X6(e,r){var t=f8(nr(e),r,!1);if(t!==void 0)try{return t.value}catch{return}}function LP(e,r){return c8(nr(e),nr(r))}function NP(e,r){r===void 0&&(r=!0);var t=nr(e);return t.type.create(t.snapshot,r===!0?t.root.environment:r===!1?void 0:r)}function TP(e){return nr(e).detach(),e}function RP(e){var r=nr(e);r.isRoot?r.die():r.parent.removeChild(r.subpath)}function pm(e){return nr(e).observableIsAlive}function MP(e,r){var t=nr(e);return t.addDisposer(r),r}function IP(e){var r=nr(e),t=r.root.environment;if(!t)throw new Kt("Failed to find the environment of ".concat(r," ").concat(r.path));return t}function jP(e){var r=nr(e),t=r.root.environment;return!!t}function K6(e,r){var t=nr(e);t.getChildren().forEach(function(n){An(n.storedValue)&&K6(n.storedValue,r)}),r(t.storedValue)}function Z6(e){var r;return An(e)?r=Cp(e):r=e,{name:r.name,properties:_a({},r.properties)}}function FP(e){var r=nr(e).type,t=_a(_a({},Z6(r)),{actions:[],volatile:[],views:[],flowActions:[]}),n=Object.getOwnPropertyNames(e);return n.forEach(function(a){if(!(a in t.properties)){var i=Object.getOwnPropertyDescriptor(e,a);if(i.get){t6(e,a)?t.views.push(a):t.volatile.push(a);return}i.value._isFlowAction===!0&&t.flowActions.push(a),i.value._isMSTAction===!0?t.actions.push(a):n6(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function DP(e){return e}function BP(e){return e}function qP(e){return e}function zP(e){return nr(e).nodeId}var Q6=function(){function e(r,t,n,a){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:io.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=a,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(r){var t=this.isAlive;this._state=r;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._hookSubscribers&&this._hookSubscribers.emit(r,this,r)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){return this._hookSubscribers||(this._hookSubscribers=new v8),this._hookSubscribers.register(r,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){this._parent=r,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.pathAtom||(this.pathAtom=up("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Vc(this._subpath):""),this.parent.getEscapedPath(r)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==io.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===io.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=up("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.state===io.CREATED){if(this.parent){if(this.parent.state!==io.FINALIZED)return;this.fireHook(wa.afterAttach)}this.state=io.FINALIZED,r&&r()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=io.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(wa.beforeDestroy)}}),e}(),hp=function(e){Zn(r,e);function r(t,n,a,i,o){var l=e.call(this,t,n,a,i)||this;try{l.storedValue=t.createNewInstance(o)}catch(u){throw l.state=io.DEAD,u}return l.state=io.CREATED,l.finalizeCreation(),l}return Object.defineProperty(r.prototype,"root",{get:function(){if(!this.parent)throw new Kt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.parent!==t,i=this.subpath!==n;!a&&!i||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(r.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(r.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(t).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(r.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===io.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(r.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(r.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(r.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(r.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.fireInternalHook(t)}}),r}(Q6);hp.prototype.die=ca(hp.prototype.die);var UP=1,Gl;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Gl||(Gl={}));var Is;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Is||(Is={}));var HP={onError:function(e){throw e}},vs=function(e){Zn(r,e);function r(t,n,a,i,o){var l=e.call(this,t,n,a,i)||this;if(Object.defineProperty(l,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++UP}),Object.defineProperty(l,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Gl.UNINITIALIZED}),Object.defineProperty(l,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),l._snapshotComputed=Tf(function(){return l.getSnapshot()}),l.unbox=l.unbox.bind(l),l._initialSnapshot=o,l.identifierAttribute=t.identifierAttribute,n||(l.identifierCache=new uO),l._childNodes=t.initializeChildNodes(l,l._initialSnapshot),l.identifier=null,l.unnormalizedIdentifier=null,l.identifierAttribute&&l._initialSnapshot){var u=l._initialSnapshot[l.identifierAttribute];if(u===void 0){var c=l._childNodes[l.identifierAttribute];c&&(u=c.value)}if(typeof u!="string"&&typeof u!="number")throw new Kt("Instance identifier '".concat(l.identifierAttribute,"' for type '").concat(l.type.name,"' must be a string or a number"));l.identifier=Ih(u),l.unnormalizedIdentifier=u}return n?n.root.identifierCache.addNodeToCache(l):l.identifierCache.addNodeToCache(l),l}return Object.defineProperty(r.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)}}),Object.defineProperty(r.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(t){t===void 0&&(t=!0),this._observableInstanceState===Gl.UNINITIALIZED&&this.createObservableInstance(t)}}),Object.defineProperty(r.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,a,i,o;t===void 0&&(t=!0),this._observableInstanceState=Gl.CREATING;for(var l=[],u=this.parent;u&&u._observableInstanceState===Gl.UNINITIALIZED;)l.unshift(u),u=u.parent;try{for(var c=op(l),h=c.next();!h.done;h=c.next()){var p=h.value;p.createObservableInstanceIfNeeded(!1)}}catch(E){n={error:E}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}var w=this.type;try{this.storedValue=w.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,w.finalizeNewInstance(this,this.storedValue)}catch(E){throw this.state=io.DEAD,E}finally{this._isRunningAction=!1}if(this._observableInstanceState=Gl.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=kh,this.state=io.CREATED,t){this.fireHook(wa.afterCreate),this.finalizeCreation();try{for(var d=op(l.reverse()),_=d.next();!_.done;_=d.next()){var p=_.value;p.fireHook(wa.afterCreate),p.finalizeCreation()}}catch(E){i={error:E}}finally{try{_&&!_.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}}),Object.defineProperty(r.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(wa.beforeDetach);var t=this.state;this.state=io.DETACHING;var n=this.root,a=n.environment,i=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=a,this.identifierCache=i}finally{this.state=t}}}}),Object.defineProperty(r.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t!==this.parent,i=n!==this.subpath;!a&&!i||(a?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,n),this.fireHook(wa.afterAttach)):i&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(r.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.fireInternalHook(t);var a=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[t];typeof a=="function"&&(xh?xh(function(){a.apply(n.storedValue)}):a.apply(this.storedValue))}}),Object.defineProperty(r.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Gl.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(r.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(r.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,n=this._childNodes,a=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(n,a),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(r.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(r.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=U6();if(!this.isAlive&&n!=="ignore"){var a=this._getAssertAliveError(t);switch(n){case"error":throw new Kt(a);case"warn":SO(a)}}}}),Object.defineProperty(r.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",a=t.subpath&&Vc(t.subpath)||"",i=t.actionContext||gm();i&&i.type!=="action"&&i.parentActionEvent&&(i=i.parentActionEvent);var o="";if(i&&i.name!=null){var l=i&&i.context&&$6(i.context)||n;o="".concat(l,".").concat(i.name,"()")}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '".concat(this.type.name,"', Path upon death: '").concat(n,"', Subpath: '").concat(a,"', Action: '").concat(o,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return this._observableInstanceState===Gl.CREATED?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(kh),this._autoUnbox=!1;try{return this._observableInstanceState===Gl.CREATED?this.type.getChildren(this):d8(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.type.getChildType(t)}}),Object.defineProperty(r.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw new Kt("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.type.removeChild(this,t)}}),Object.defineProperty(r.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t)}}),Object.defineProperty(r.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(t).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(r.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this.baseFinalizeCreation(function(){var n,a;try{for(var i=op(t.getChildren()),o=i.next();!o.done;o=i.next()){var l=o.value;l.finalizeCreation()}}catch(u){n={error:u}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}t.fireInternalHook(wa.afterCreationFinalization)})}}),Object.defineProperty(r.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new Kt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(r.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this._applyPatches=dp(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(a){if(!a.path){t.type.applySnapshot(t,a.value);return}var i=Nh(a.path),o=h8(t,i.slice(0,-1));o.applyPatchLocally(i[i.length-1],a)})}),this._applySnapshot=dp(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==t.snapshot)return t.type.applySnapshot(t,n)}),Ef(this.storedValue,"$treenode",this),Ef(this.storedValue,"toJSON",fO)}}),Object.defineProperty(r.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===io.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(r.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Gl.UNINITIALIZED&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Is.Dispose),this._internalEventsClear(Is.Dispose))}}),Object.defineProperty(r.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(r.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._addSnapshotReaction(),this._internalEventsRegister(Is.Snapshot,t)}}),Object.defineProperty(r.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Is.Snapshot,t)}}),Object.defineProperty(r.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Is.Patch,t)}}),Object.defineProperty(r.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._internalEventsHasSubscribers(Is.Patch)){var a=n.path.substr(this.path.length)+(t.path?"/"+t.path:""),i=bO({},t,{path:a}),o=Iu(CO(i),2),l=o[0],u=o[1];this._internalEventsEmit(Is.Patch,l,u)}this.parent&&this.parent.emitPatch(t,n)}}),Object.defineProperty(r.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Is.Dispose,t)}}),Object.defineProperty(r.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Is.Dispose,t,!0);return}throw new Kt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(r.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._internalEventsHas(Is.Dispose,t))throw new Kt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Is.Dispose,t)}}),Object.defineProperty(r.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.middlewares){var n=this.middlewares.indexOf(t);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(r.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var i={handler:t,includeHooks:n};return this.middlewares?this.middlewares.push(i):this.middlewares=[i],function(){a.removeMiddleware(i)}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,n)}}),Object.defineProperty(r.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;if(!this._hasSnapshotReaction){var n=$w(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},HP);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(r.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)}}),Object.defineProperty(r.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){return a===void 0&&(a=!1),this._internalEvents||(this._internalEvents=new v8),this._internalEvents.register(t,n,a)}}),Object.defineProperty(r.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!!this._internalEvents&&this._internalEvents.has(t,n)}}),Object.defineProperty(r.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this._internalEvents&&this._internalEvents.unregister(t,n)}}),Object.defineProperty(r.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var n,a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];this._internalEvents&&(n=this._internalEvents).emit.apply(n,ju([t],Iu(a),!1))}}),Object.defineProperty(r.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEvents&&this._internalEvents.clear(t)}}),Object.defineProperty(r.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),r}(Q6);vs.prototype.createObservableInstance=ca(vs.prototype.createObservableInstance);vs.prototype.detach=ca(vs.prototype.detach);vs.prototype.die=ca(vs.prototype.die);var J6,Or;(function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(Or||(Or={}));var e8="cannotDetermine",GP=Symbol("$type"),pc=function(){function e(r){Object.defineProperty(this,J6,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){return hc(this,r),this.instantiate(null,"",t,r).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){throw new Kt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=u8(r);if(n){var a=Cp(r);return this.isAssignableFrom(a)?ms():ys(t,r)}return this.isValidSnapshot(r,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.validate(r,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new Kt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw new Kt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw new Kt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw new Kt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();J6=GP;pc.prototype.create=ca(pc.prototype.create);var Ah=function(e){Zn(r,e);function r(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(r.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t===void 0&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.createObservableInstanceIfNeeded(),t.storedValue}}),Object.defineProperty(r.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!t.identifierAttribute||t.identifier===Ih(n[t.identifierAttribute])}}),Object.defineProperty(r.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t.isDetaching?!1:t.snapshot===n||An(n)&&nr(n)===t?!0:t.type===this&&p8(n)&&!An(n)&&this.isMatchingSnapshotId(t,n)?(t.applySnapshot(n),!0):!1}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.tryToReconcileNode(t,n);if(o)return t.setParent(a,i),t;if(t.die(),An(n)&&this.isAssignableFrom(Cp(n))){var l=nr(n);return l.setParent(a,i),l}return this.instantiate(a,i,void 0,n)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),r}(pc);Ah.prototype.create=ca(Ah.prototype.create);var Df=function(e){Zn(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t}}),Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t.isDetaching&&t.type===this&&t.storedValue===n)return t;var o=this.instantiate(a,i,void 0,n);return t.die(),o}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),r}(pc);function Sa(e){return typeof e=="object"&&e&&e.isType===!0}var Ou=new Map;function VP(e){return function(t,n,a){switch(t.type){case"action":if(!e.filter||e.filter(t)===!0){var i=e.onStart(t);e.onResume(t,i),Ou.set(t.id,{call:t,context:i,async:!1});try{var o=n(t);return e.onSuspend(t,i),Ou.get(t.id).async===!1&&(Ou.delete(t.id),e.onSuccess(t,i,o)),o}catch(u){throw Ou.delete(t.id),e.onFail(t,i,u),u}}else return n(t);case"flow_spawn":{var l=Ou.get(t.rootId);return l.async=!0,n(t)}case"flow_resume":case"flow_resume_error":{var l=Ou.get(t.rootId);e.onResume(t,l.context);try{return n(t)}finally{e.onSuspend(t,l.context)}}case"flow_throw":{var l=Ou.get(t.rootId);return Ou.delete(t.rootId),e.onFail(t,l.context,t.args[0]),n(t)}case"flow_return":{var l=Ou.get(t.rootId);return Ou.delete(t.rootId),e.onSuccess(t,l.context,t.args[0]),n(t)}}}}var WP=function(){function e(r,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),r&&r.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,r))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function $P(e){var r=new Map;return function(n,a){var i=n.parentActionEvent?r.get(n.parentActionEvent.id):void 0;if(n.type==="action"){var o=_a(_a({},n),{env:i&&i.call.env,parentCall:i&&i.call}),l=!e.filter||e.filter(o),u=l?e:void 0,c=new WP(u,o);r.set(n.id,c);var h=void 0;try{h=a(n)}catch(w){throw r.delete(n.id),c.finish(w),w}return c.hasFlowsPending||(r.delete(n.id),c.finish()),h}else{if(!i)return a(n);switch(n.type){case"flow_spawn":return i.incFlowsPending(),a(n);case"flow_resume":case"flow_resume_error":return a(n);case"flow_throw":{var p=n.args[0];try{return a(n)}finally{i.decFlowsPending(),i.hasFlowsPending||(r.delete(n.parentActionEvent.id),i.finish(p))}}case"flow_return":try{return a(n)}finally{i.decFlowsPending(),i.hasFlowsPending||(r.delete(n.parentActionEvent.id),i.finish())}}}}}function YP(e,r,t,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(Lh(n))return n;if(An(n))return u1("[MSTNode: ".concat(Cp(n).name,"]"));if(typeof n=="function")return u1("[function]");if(typeof n=="object"&&!xf(n)&&!bm(n))return u1("[object ".concat(n&&n.constructor&&n.constructor.name||"Complex Object","]"));try{return JSON.stringify(n),n}catch(a){return u1(""+a)}}function XP(e,r){return r&&typeof r=="object"&&"$MST_DATE"in r?new Date(r.$MST_DATE):r}function u1(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function t8(e,r){xh(function(){wm(r).forEach(function(t){return KP(e,t)})})}function KP(e,r){var t=X6(e,r.path||"");if(!t)throw new Kt("Invalid action path: ".concat(r.path||""));var n=nr(t);if(r.name==="@APPLY_PATCHES")return Oh.call(null,t,r.args[0]);if(r.name==="@APPLY_SNAPSHOT")return V6.call(null,t,r.args[0]);if(typeof t[r.name]!="function")throw new Kt("Action '".concat(r.name,"' does not exist in '").concat(n.path,"'"));return t[r.name].apply(t,r.args?r.args.map(function(a){return XP(n,a)}):[])}function ZP(e,r){var t=[],n=function(o){var l=r?r(o,vm()):!0;l&&t.push(o)},a,i={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=r8(e,n))},replay:function(o){t8(o,t)}};return i.resume(),i}function r8(e,r,t){return t===void 0&&(t=!1),a8(e,function(a,i){if(a.type==="action"&&a.id===a.rootId){var o=nr(a.context),l={name:a.name,path:c8(nr(e),o),args:a.args.map(function(c,h){return YP(o,a.name,h,c)})};if(t){var u=i(a);return r(l),u}else return r(l),i(a)}else return i(a)})}var QP=1,sp;function gm(){return sp}function n8(){return QP++}function P2(e,r){var t=nr(e.context);e.type==="action"&&t.assertAlive({actionContext:e});var n=t._isRunningAction;t._isRunningAction=!0;var a=sp;sp=e;try{return tO(t,e,r)}finally{sp=a,t._isRunningAction=n}}function i8(e){if(e)return e.type==="action"?e:e.parentActionEvent}function dp(e,r,t){var n=function(){var a=n8(),i=sp,o=i8(i);return P2({type:"action",name:r,id:a,args:m8(arguments),context:e,tree:W6(e),rootId:i?i.rootId:a,parentId:i?i.id:0,allParentIds:i?ju(ju([],Iu(i.allParentIds),!1),[i.id],!1):[],parentEvent:i,parentActionEvent:o},t)};return n._isMSTAction=!0,n._isFlowAction=t._isFlowAction,n}function a8(e,r,t){t===void 0&&(t=!0);var n=nr(e);return n.addMiddleWare(r,t)}function JP(e,r,t){t===void 0&&(t=!0);var n={handler:e,includeHooks:t};return r.$mst_middleware=r.$mst_middleware||[],r.$mst_middleware.push(n),r}var eO=function(){function e(r,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=r;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.middlewares[this.arrayIndex];if(r){var t=r[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function tO(e,r,t){var n=new eO(e,t);if(n.isEmpty)return ca(t).apply(null,r.args);var a=null;function i(o){var l=n.getNextMiddleware(),u=l&&l.handler;if(!u)return ca(t).apply(null,o.args);if(!l.includeHooks&&wa[o.name])return i(o);function c(p,w){a=i(p),w&&(a=w(a))}function h(p){a=p}return u(o,c,h),a}return i(r)}function vm(){for(var e=gm();e&&e.type!=="action";)e=e.parentActionEvent;return e}function o8(e,r,t){for(var n=typeof r=="number"?r:r.id,a=t?e:e.parentActionEvent;a;){if(a.id===n)return!0;a=a.parentActionEvent}return!1}function rO(e,r){return o8(e,r,!1)}function nO(e,r){return o8(e,r,!0)}function iO(e){try{return JSON.stringify(e)}catch(r){return"<Unserializable: ".concat(r,">")}}function s8(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):An(e)?"<".concat(e,">"):"`".concat(iO(e),"`")}function aO(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function oO(e){var r=e.value,t=e.context[e.context.length-1].type,n=e.context.map(function(l){var u=l.path;return u}).filter(function(l){return l.length>0}).join("/"),a=n.length>0?'at path "/'.concat(n,'" '):"",i=An(r)?"value of type ".concat(nr(r).type.name,":"):Lh(r)?"value":"snapshot",o=t&&An(r)&&t.is(nr(r).snapshot);return"".concat(a).concat(i," ").concat(s8(r)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?k8(t)||Lh(r)?".":", expected an instance of `".concat(t.name,"` or a snapshot like `").concat(t.describe(),"` instead.")+(o?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function mm(e,r,t){return e.concat([{path:r,type:t}])}function ms(){return Ch}function ys(e,r,t){return[{context:e,value:r,message:t}]}function n0(e){return e.reduce(function(r,t){return r.concat(t)},[])}function hc(e,r){xO()&&l8(e,r)}function l8(e,r){var t=e.validate(r,[{path:"",type:e}]);if(t.length>0)throw new Kt(sO(e,r,t))}function sO(e,r,t){if(t.length!==0)return"Error while converting ".concat(aO(s8(r))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(oO).join(`
|
|
95
|
-
`)}var lO=0,uO=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:lO++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:Rn.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:Rn.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.lastCacheModificationPerId.get(r);this.lastCacheModificationPerId.set(r,t===void 0?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.lastCacheModificationPerId.get(r)||0;return"".concat(this.cacheId,"-").concat(t)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){if(t===void 0&&(t=!0),r.identifierAttribute){var n=r.identifier;this.cache.has(n)||this.cache.set(n,Rn.array([],i0));var a=this.cache.get(n);if(a.indexOf(r)!==-1)throw new Kt("Already registered");a.push(r),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this;X2(r.identifierCache.cache).forEach(function(n){return n.forEach(function(a){t.addNodeToCache(a)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.identifierAttribute){var t=r.identifier,n=this.cache.get(t);n&&(n.remove(r),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(r.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this,n=new e,a=r.path+"/";return i6(this.cache).forEach(function(i){for(var o=Iu(i,2),l=o[0],u=o[1],c=!1,h=u.length-1;h>=0;h--){var p=u[h];(p===r||p.path.indexOf(a)===0)&&(n.addNodeToCache(p,!1),u.splice(h,1),u.length||t.cache.delete(l),c=!0)}c&&t.updateLastCacheModificationPerId(l)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.cache.get(t);return n?n.some(function(a){return r.isAssignableFrom(a.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.cache.get(t);if(!n)return null;var a=n.filter(function(i){return r.isAssignableFrom(i.type)});switch(a.length){case 0:return null;case 1:return a[0];default:throw new Kt("Cannot resolve a reference to type '".concat(r.name,"' with id: '").concat(t,"' unambigously, there are multiple candidates: ").concat(a.map(function(i){return i.path}).join(", ")))}}}),e}();function ym(e,r,t,n,a){var i=u8(a);if(i){if(i.parent)throw new Kt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(r?r.path:"","/").concat(t,"', but it lives already at '").concat(i.path,"'"));return r&&i.setParent(r,t),i}return new vs(e,r,t,n,a)}function nf(e,r,t,n,a){return new hp(e,r,t,n,a)}function cO(e){return e instanceof hp||e instanceof vs}var io;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"})(io||(io={}));function An(e){return!!(e&&e.$treenode)}function nr(e){if(!An(e))throw new Kt("Value ".concat(e," is no MST Node"));return e.$treenode}function u8(e){return e&&e.$treenode||null}function fO(){return nr(this).snapshot}var hO=function(e){return".."};function c8(e,r){if(e.root!==r.root)throw new Kt("Cannot calculate relative path: objects '".concat(e,"' and '").concat(r,"' are not part of the same object tree"));for(var t=Nh(e.path),n=Nh(r.path),a=0;a<t.length&&t[a]===n[a];a++);return t.slice(a).map(hO).join("/")+I1(n.slice(a))}function f8(e,r,t){return t===void 0&&(t=!0),h8(e,Nh(r),t)}function h8(e,r,t){t===void 0&&(t=!0);var n=e;try{for(var a=0;a<r.length;a++){var i=r[a];if(i===".."){if(n=n.parent,n)continue}else{if(i===".")continue;if(n){if(n instanceof hp){var o=n.value;An(o)&&(n=nr(o))}if(n instanceof vs){var l=n.getChildType(i);if(l&&(n=n.getChildNode(i),n))continue}}}throw new Kt("Could not resolve '".concat(i,"' in path '").concat(I1(r.slice(0,a))||"/","' while resolving '").concat(I1(r),"'"))}}catch(u){if(!t)return;throw u}return n}function d8(e){if(!e)return Ch;var r=Object.keys(e);if(!r.length)return Ch;var t=new Array(r.length);return r.forEach(function(n,a){t[a]=e[n]}),t}function dO(e){return y8(e)}var pO=Object.toString(),Ch=Object.freeze([]),kh=Object.freeze({}),i0=Iw().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(i0);var Kt=function(e){Zn(r,e);function r(t){return t===void 0&&(t="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(t))||this}return r}(Error);function gO(e){return e}var vO=Number.isInteger;function mO(e){return Number(e)===e&&e%1!==0}function yO(e){return Number.isFinite(e)}function bm(e){return Array.isArray(e)||Go(e)}function wm(e){return e?bm(e)?e:[e]:Ch}function bO(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n++){var a=r[n];for(var i in a)e[i]=a[i]}return e}function xf(e){var r;if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t==null?!0:((r=t.constructor)===null||r===void 0?void 0:r.toString())===pO}function p8(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function Lh(e,r){return r===void 0&&(r=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||r&&e instanceof Date}function g8(e){return typeof e!="function"}function wO(e,r,t){Ra(e)?Z2(e,r,t):Object.defineProperty(e,r,t)}function Ef(e,r,t){wO(e,r,{enumerable:!1,writable:!1,configurable:!0,value:t})}var _O=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this;return t===void 0&&(t=!1),t?this.handlers.unshift(r):this.handlers.push(r),function(){n.unregister(r)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.handlers.indexOf(r)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.handlers.indexOf(r);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=this.handlers.slice();n.forEach(function(a){return a.apply(void 0,ju([],Iu(r),!1))})}}),e}(),v8=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.eventHandlers&&this.eventHandlers[r];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var a=this.eventHandlers[r];return a||(a=this.eventHandlers[r]=new _O),a.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.eventHandlers&&this.eventHandlers[r];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.eventHandlers&&this.eventHandlers[r];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.eventHandlers&&delete this.eventHandlers[r]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var t,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var i=this.eventHandlers&&this.eventHandlers[r];i&&(t=i).emit.apply(t,ju([],Iu(n),!1))}}),e}();function m8(e){for(var r=new Array(e.length),t=0;t<e.length;t++)r[t]=e[t];return r}function dg(e,r){return e.indexOf(r)===0}function SO(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function xO(){return typeof process<"u"&&bb&&bb.ENABLE_TYPE_CHECK==="true"}function pg(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function y8(e){return AO(e.name,e)}function EO(e){return e}function PO(e){return function(){var r,t=[];for(r=0;r<arguments.length;r++)t[r]=arguments[r];return H6(this,function(n){switch(n.label){case 0:return[4,e.apply(void 0,ju([],Iu(t),!1))];case 1:return[2,n.sent()]}})}}function OO(e){return H6(this,function(r){switch(r.label){case 0:return[4,e];case 1:return[2,r.sent()]}})}function AO(e,r){var t=function(){var a=n8(),i=gm();if(!i)throw new Kt("a mst flow must always have a parent context");var o=i8(i);if(!o)throw new Kt("a mst flow must always have a parent action context");var l={name:e,id:a,tree:i.tree,context:i.context,parentId:i.id,allParentIds:ju(ju([],Iu(i.allParentIds),!1),[i.id],!1),rootId:i.rootId,parentEvent:i,parentActionEvent:o},u=arguments;function c(h,p,w){return h.$mst_middleware=t.$mst_middleware,P2(_a(_a({},l),{type:p,args:[w]}),h)}return new Promise(function(h,p){var w,d=function(){w=r.apply(null,arguments),_(void 0)};d.$mst_middleware=t.$mst_middleware,P2(_a(_a({},l),{type:"flow_spawn",args:m8(u)}),d);function _(m){var g;try{var v=c(function(b){g=w.next(b)},"flow_resume",m);v instanceof Error&&(g=w.throw(v))}catch(b){pg(function(){c(function(O){p(b)},"flow_throw",b)});return}S(g)}function E(m){var g;try{c(function(v){g=w.throw(v)},"flow_resume_error",m)}catch(v){pg(function(){c(function(b){p(v)},"flow_throw",v)});return}S(g)}function S(m){if(m.done){pg(function(){c(function(g){h(g)},"flow_return",m.value)});return}if(!m.value||typeof m.value.then!="function")throw new Kt("Only promises can be yielded to `async`, got: "+m);return m.value.then(_,E)}})};return t._isFlowAction=!0,t}function CO(e){if(!("oldValue"in e))throw new Kt("Patches without `oldValue` field cannot be inversed");return[kO(e),LO(e)]}function kO(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function LO(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function NO(e){return typeof e=="number"}function Vc(e){return NO(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function b8(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function I1(e){if(e.length===0)return"";var r=function(t){return t.map(Vc).join("/")};return e[0]==="."||e[0]===".."?r(e):"/"+r(e)}function Nh(e){var r=e.split("/").map(b8),t=e===""||e==="."||e===".."||dg(e,"/")||dg(e,"./")||dg(e,"../");if(!t)throw new Kt("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return r[0]===""&&r.shift(),r}var gg=Symbol("$preProcessorFailed"),TO=function(e){Zn(r,e);function r(t,n,a){var i=e.call(this,a||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(r.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t}}),Object.defineProperty(r.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(t){try{return this.preProcessSnapshot(t)}catch{return gg}}}),Object.defineProperty(r.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,t,n.storedValue):t}}),Object.defineProperty(r.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;RO(t.type,this,"create"),t instanceof vs&&(t.hasSnapshotPostProcessor=!!this._processors.postProcessor);var a=t.getSnapshot;t.getSnapshot=function(){return n.postProcessSnapshot(a.call(t),t)},N8(this._subtype)||(t.getReconciliationType=function(){return n})}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=An(i)?i:this.preProcessSnapshot(i),l=this._subtype.instantiate(t,n,a,o);return this._fixNode(l),l}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this._subtype.reconcile(t,An(n)?n:this.preProcessSnapshot(n),a,i);return o!==t&&this._fixNode(o),o}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=!0);var a=this._subtype.getSnapshot(t);return n?this.postProcessSnapshot(a,t):a}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.preProcessSnapshotSafe(t);return a===gg?ys(n,t,"Failed to preprocess value"):this._subtype.validate(a,n)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(r.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=Sa(t)?this._subtype:An(t)?dm(t,!1):this.preProcessSnapshotSafe(t);return n===gg?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!(this._subtype instanceof Ah))return!1;var a=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(t,a)}}),r}(pc);function RO(e,r){for(var t,n,a=[],i=2;i<arguments.length;i++)a[i-2]=arguments[i];try{for(var o=op(a),l=o.next();!l.done;l=o.next()){var u=l.value;e[u]=r[u].bind(r)}}catch(c){t={error:c}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}function MO(e,r,t){return new TO(e,r,t)}var wb="Map.put can only be used to store complex values that have an identifier type attribute";function w8(e,r){var t,n,a=e.getSubTypes();if(a===e8)return!1;if(a){var i=wm(a);try{for(var o=op(i),l=o.next();!l.done;l=o.next()){var u=l.value;if(!w8(u,r))return!1}}catch(c){t={error:c}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}return e instanceof pp&&r.push(e),!0}var zc;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(zc||(zc={}));var IO=function(e){Zn(r,e);function r(t,n){return e.call(this,t,Rn.ref.enhancer,n)||this}return Object.defineProperty(r.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(r.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(r.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(r.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(r.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!t)throw new Kt("Map.put cannot be used to set empty values");if(An(t)){var n=nr(t);if(n.identifier===null)throw new Kt(wb);return this.set(n.identifier,t),t}else if(p8(t)){var a=nr(this),i=a.type;if(i.identifierMode!==zc.YES)throw new Kt(wb);var o=i.mapIdentifierAttribute,l=t[o];if(!Sm(l)){var u=this.put(i.getChildType().create(t,a.environment));return this.put(dm(u))}var c=Ih(l);return this.set(c,t),this.get(c)}else throw new Kt("Map.put can only be used to store complex values")}}),r}(Q1),j1=function(e){Zn(r,e);function r(t,n,a){a===void 0&&(a=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:zc.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=a,i}return Object.defineProperty(r.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new r(this.name,this._subType,n)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._determineIdentifierMode(),ym(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===zc.UNKNOWN){var t=[];if(w8(this._subType,t)){var n=t.reduce(function(a,i){if(!i.identifierAttribute)return a;if(a&&a!==i.identifierAttribute)throw new Kt("The objects in a map should all have the same identifier attribute, expected '".concat(a,"', but child of type '").concat(i.name,"' declared attribute '").concat(i.identifierAttribute,"' as identifier"));return i.identifierAttribute},void 0);n?(this.identifierMode=zc.YES,this.mapIdentifierAttribute=n):this.identifierMode=zc.NO}}}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type._subType,i={};return Object.keys(n).forEach(function(o){i[o]=a.instantiate(t,o,void 0,n[o])}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new IO(t,this.name)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Y2(n,t.unbox);var a=t.type;a.hookInitializers.forEach(function(i){var o=i(n);Object.keys(o).forEach(function(l){var u=o[l],c=dp(n,l,u);Ef(n,l,c)})}),X1(n,this.willChange),Z1(n,this.didChange)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return X2(t.storedValue)}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t.storedValue.get(""+n);if(!a)throw new Kt("Not a child "+n);return a}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=nr(t.object),a=t.name;n.assertWritable({subpath:a});var i=n.type,o=i._subType;switch(t.type){case"update":{var l=t.newValue,u=t.object.get(a);if(l===u)return null;hc(o,l),t.newValue=o.reconcile(n.getChildNode(a),t.newValue,n,a),i.processIdentifier(a,t.newValue)}break;case"add":hc(o,t.newValue),t.newValue=o.instantiate(n,a,void 0,t.newValue),i.processIdentifier(a,t.newValue);break}return t}}),Object.defineProperty(r.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.identifierMode===zc.YES&&n instanceof vs){var a=n.identifier;if(a!==t)throw new Kt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(a,"', but expected: '").concat(t,"'"))}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return t.getChildren().forEach(function(a){n[a.subpath]=a.snapshot}),n}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=nr(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:Vc(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Vc(t.name),value:t.newValue.snapshot,oldValue:void 0},n);case"delete":var a=t.oldValue.snapshot;return t.oldValue.die(),void n.emitPatch({op:"remove",path:Vc(t.name),oldValue:a},n)}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=t.storedValue;switch(a.op){case"add":case"replace":i.set(n,a.value);break;case"remove":i.delete(n);break}}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=t.storedValue,i={};if(Array.from(a.keys()).forEach(function(l){i[l]=!1}),n)for(var o in n)a.set(o,n[o]),i[""+o]=!0;Object.keys(i).forEach(function(l){i[l]===!1&&a.delete(l)})}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return xf(t)?n0(Object.keys(t).map(function(i){return a._subType.validate(t[i],mm(n,i,a._subType))})):ys(n,t,"Value is not a plain object")}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return kh}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.delete(n)}}),r}(Ah);j1.prototype.applySnapshot=ca(j1.prototype.applySnapshot);function jO(e){return new j1("Map<string, ".concat(e.name,">"),e)}function FO(e){return Sa(e)&&(e.flags&Or.Map)>0}var F1=function(e){Zn(r,e);function r(t,n,a){a===void 0&&(a=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=a,i}return Object.defineProperty(r.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new r(this.name,this._subType,n)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return ym(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=[]);var a=t.type._subType,i={};return n.forEach(function(o,l){var u=""+l;i[u]=a.instantiate(t,u,void 0,o)}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=_a(_a({},i0),{name:this.name});return Rn.array(d8(t),n)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Zl(n).dehancer=t.unbox;var a=t.type;a.hookInitializers.forEach(function(i){var o=i(n);Object.keys(o).forEach(function(l){var u=o[l],c=dp(n,l,u);Ef(n,l,c)})}),X1(n,this.willChange),Z1(n,this.didChange)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue.slice()}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=Number(n);if(a<t.storedValue.length)return t.storedValue[a];throw new Kt("Not a child: "+n)}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=nr(t.object);n.assertWritable({subpath:""+t.index});var a=n.type._subType,i=n.getChildren();switch(t.type){case"update":{if(t.newValue===t.object[t.index])return null;var o=_b(n,a,[i[t.index]],[t.newValue],[t.index]);if(!o)return null;t.newValue=o[0]}break;case"splice":{var l=t.index,u=t.removedCount,c=t.added,h=_b(n,a,i.slice(l,l+u),c,c.map(function(w,d){return l+d}));if(!h)return null;t.added=h;for(var p=l+u;p<i.length;p++)i[p].setParent(n,""+(p+c.length-u))}break}return t}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=[];return Object.keys(t).forEach(function(a){n.push(t[a].getSnapshot())}),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=nr(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"splice":if(t.removedCount&&t.addedCount===t.object.length)return void n.emitPatch({op:"replace",path:"",value:n.snapshot,oldValue:t.removed.map(function(i){return i.snapshot})},n);for(var a=t.removedCount-1;a>=0;a--)n.emitPatch({op:"remove",path:""+(t.index+a),oldValue:t.removed[a].snapshot},n);for(var a=0;a<t.addedCount;a++)n.emitPatch({op:"add",path:""+(t.index+a),value:t.added[a].snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=t.storedValue,o=n==="-"?i.length:Number(n);switch(a.op){case"replace":i[o]=a.value;break;case"add":i.splice(o,0,a.value);break;case"remove":i.splice(o,1);break}}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=t.storedValue;a.replace(n)}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return bm(t)?n0(t.map(function(i,o){return a._subType.validate(i,mm(n,""+o,a._subType))})):ys(n,t,"Value is not an array")}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Ch}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.splice(Number(n),1)}}),r}(Ah);F1.prototype.applySnapshot=ca(F1.prototype.applySnapshot);function DO(e){return new F1("".concat(e.name,"[]"),e)}function _b(e,r,t,n,a){for(var i=!0,o=0;;o++){var l=o<=n.length-1,u=t[o],c=l?n[o]:void 0,h=""+a[o];if(cO(c)&&(c=c.storedValue),!u&&!l)break;if(!l)i=!1,t.splice(o,1),u instanceof vs&&u.createObservableInstanceIfNeeded(),u.die(),o--;else if(u)if(Sb(u,c))t[o]=vg(r,e,h,c,u);else{for(var w=void 0,d=o;d<t.length;d++)if(Sb(t[d],c)){w=t.splice(d,1)[0];break}i=!1;var p=vg(r,e,h,c,w);t.splice(o,0,p)}else{if(An(c)&&nr(c).parent===e)throw new Kt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(e.path,"/").concat(h,"', but it lives already at '").concat(nr(c).path,"'"));i=!1;var p=vg(r,e,h,c);t.splice(o,0,p)}}return i?null:t}function vg(e,r,t,n,a){hc(e,n);function i(){if(An(n)){var l=nr(n);if(l.assertAlive(kh),l.parent!==null&&l.parent===r)return l.setParent(r,t),l}return a?e.reconcile(a,n,r,t):e.instantiate(r,t,void 0,n)}var o=i();return a&&a!==o&&(a instanceof vs&&a.createObservableInstanceIfNeeded(),a.die()),o}function Sb(e,r){if(!e.isAlive)return!1;if(An(r)){var t=nr(r);return t.isAlive&&t===e}if(e.snapshot===r)return!0;if(!(e instanceof vs))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&xf(r)&&n.is(r)&&n.isMatchingSnapshotId(e,r)}function BO(e){return Sa(e)&&(e.flags&Or.Array)>0}var xb="preProcessSnapshot",Eb="postProcessSnapshot";function qO(){return nr(this).toString()}var Pb={name:"AnonymousModel",properties:{},initializers:Ch};function zO(e){var r=Object.keys(e),t=new Set;return r.forEach(function(n){if(t.has(n))throw new Kt("".concat(n," is declared twice in the model. Model should not contain the same keys"));t.add(n)}),r.reduce(function(n,a){if(a in wa)throw new Kt("Hook '".concat(a,"' was defined as property. Hooks should be defined as part of the actions"));var i=Object.getOwnPropertyDescriptor(e,a);if("get"in i)throw new Kt("Getters are not supported as properties. Please use views instead");var o=i.value;if(o==null)throw new Kt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(Lh(o))n[a]=Pf($O(o),o);else if(o instanceof j1)n[a]=Pf(o,{});else if(o instanceof F1)n[a]=Pf(o,[]);else if(!Sa(o))throw new Kt("Invalid type definition for property '".concat(a,"', cannot infer a type from a value like '").concat(o,"' (").concat(typeof o,")"));return n},_a({},e))}var pp=function(e){Zn(r,e);function r(t){var n=e.call(this,t.name||Pb.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({name:a})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({properties:a})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var i=n.preProcessor;return i?n.cloneAndEnhance({preProcessor:function(o){return i(a(o))}}):n.cloneAndEnhance({preProcessor:a})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var i=n.postProcessor;return i?n.cloneAndEnhance({postProcessor:function(o){return a(i(o))}}):n.cloneAndEnhance({postProcessor:a})}}),Object.assign(n,Pb,t),n.properties=zO(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(r.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=void 0;return this.forAllProps(function(n,a){if(a.flags&Or.Identifier){if(t)throw new Kt("Cannot define property '".concat(n,"' as object identifier, property '").concat(t,"' is already defined as identifier property"));t=n}}),t}}),Object.defineProperty(r.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new r({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})}}),Object.defineProperty(r.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){return n.instantiateActions(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Kt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(a){if(a===xb)throw new Kt("Cannot define action '".concat(xb,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===Eb)throw new Kt("Cannot define action '".concat(Eb,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var i=n[a],o=t[a];if(a in wa&&o){var l=i;i=function(){o.apply(null,arguments),l.apply(null,arguments)}}var u=i.$mst_middleware,c=i.bind(n);c._isFlowAction=i._isFlowAction||!1,c.$mst_middleware=u;var h=dp(t,a,c);n[a]=h,Ef(t,a,h)})}}),Object.defineProperty(r.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;if(typeof t!="function")throw new Kt("You passed an ".concat(typeof t," to volatile state as an argument, when function is expected"));var a=function(i){return n.instantiateVolatileState(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Kt("volatile state initializer should return a plain object containing state");K2(t,n)}}),Object.defineProperty(r.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){var o=t(i),l=o.actions,u=o.views,c=o.state,h=dP(o,["actions","views","state"]);for(var p in h)throw new Kt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(p,"'"));return c&&n.instantiateVolatileState(i,c),u&&n.instantiateViews(i,u),l&&n.instantiateActions(i,l),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){return n.instantiateViews(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Kt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(a){var i,o=Object.getOwnPropertyDescriptor(n,a);if("get"in o)Z2(t,a,o),Q2(t,(i={},i[a]=Tf,i));else if(typeof o.value=="function")Ef(t,a,o.value);else throw new Kt("A view member should either be a function or getter based property")})}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=An(i)?i:this.applySnapshotPreProcessor(i);return ym(this,t,n,a,o)}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type,i={};return a.forAllProps(function(o,l){i[o]=l.instantiate(t,o,void 0,n[o])}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=_a(_a({},i0),{name:this.name});return Rn.object(t,kh,n)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Ef(n,"toString",qO),this.forAllProps(function(a){Y2(n,a,t.unbox)}),this.initializers.reduce(function(a,i){return i(a)},n),X1(n,this.willChange),Z1(n,this.didChange)}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=nr(n.object),i=n.name;a.assertWritable({subpath:i});var o=a.type.properties[i];return o&&(hc(o,n.newValue),n.newValue=o.reconcile(a.getChildNode(i),n.newValue,a,i)),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=nr(n.object),i=a.type.properties[n.name];if(i){var o=n.oldValue?n.oldValue.snapshot:void 0;a.emitPatch({op:"replace",path:Vc(n.name),value:n.newValue.snapshot,oldValue:o},a)}}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=[];return this.forAllProps(function(i){a.push(n.getChildNode(t,i))}),a}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a;if(!(n in this.properties))throw new Kt("Not a value property: "+n);var i=Zl(t.storedValue,n),o=(a=i.raw)===null||a===void 0?void 0:a.call(i);if(!o)throw new Kt("Node not available for property "+n);return o}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var i={};return this.forAllProps(function(o,l){try{var u=Mu(t.storedValue,o);u.reportObserved()}catch{throw new Kt("".concat(o," property is declared twice"))}i[o]=a.getChildNode(t,o).snapshot}),n?this.applySnapshotPostProcessor(i):i}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){if(!(a.op==="replace"||a.op==="add"))throw new Kt("object does not support operation ".concat(a.op));t.storedValue[n]=a.value}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=this.applySnapshotPreProcessor(n);this.forAllProps(function(i){t.storedValue[i]=a[i]})}}),Object.defineProperty(r.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.preProcessor;return n?n.call(null,t):t}}),Object.defineProperty(r.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.postProcessor;return n?n.call(null,t):t}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.properties[t]}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,i=this.applySnapshotPreProcessor(t);return xf(i)?n0(this.propertyNames.map(function(o){return a.properties[o].validate(i[o],mm(n,o,a.properties[o]))})):ys(n,i,"Value is not a plain object")}}),Object.defineProperty(r.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.propertyNames.forEach(function(a){return t(a,n.properties[a])})}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;return"{ "+this.propertyNames.map(function(n){return n+": "+t.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return kh}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue[n]=void 0}}),r}(Ah);pp.prototype.applySnapshot=ca(pp.prototype.applySnapshot);function UO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new pp({name:t,properties:n})}function HO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string",n=t?e[0]:"AnonymousModel";return t&&e.shift(),e.reduce(function(a,i){return a.cloneAndEnhance({name:a.name+"_"+i.name,properties:i.properties,initializers:i.initializers,preProcessor:function(o){return i.applySnapshotPreProcessor(a.applySnapshotPreProcessor(o))},postProcessor:function(o){return i.applySnapshotPostProcessor(a.applySnapshotPostProcessor(o))}})}).named(n)}function _8(e){return Sa(e)&&(e.flags&Or.Object)>0}var gc=function(e){Zn(r,e);function r(t,n,a,i){i===void 0&&(i=gO);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=n,o}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.initializer(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(Lh(t)&&this.checker(t))return ms();var a=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return ys(n,t,"Value is not a ".concat(a))}}),r}(Df),S8=new gc("string",Or.String,function(e){return typeof e=="string"}),x8=new gc("number",Or.Number,function(e){return typeof e=="number"}),GO=new gc("integer",Or.Integer,function(e){return vO(e)}),VO=new gc("float",Or.Float,function(e){return mO(e)}),WO=new gc("finite",Or.Finite,function(e){return yO(e)}),E8=new gc("boolean",Or.Boolean,function(e){return typeof e=="boolean"}),P8=new gc("null",Or.Null,function(e){return e===null}),O8=new gc("undefined",Or.Undefined,function(e){return e===void 0}),A8=new gc("Date",Or.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});A8.getSnapshot=function(e){return e.storedValue.getTime()};var C8=A8;function $O(e){switch(typeof e){case"string":return S8;case"number":return x8;case"boolean":return E8;case"object":if(e instanceof Date)return C8}throw new Kt("Cannot determine primitive type from value "+e)}function k8(e){return Sa(e)&&(e.flags&(Or.String|Or.Number|Or.Integer|Or.Boolean|Or.Date))>0}var YO=function(e){Zn(r,e);function r(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Literal}),n.value=t,n}return Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return Lh(t)&&t===this.value?ms():ys(n,t,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),r}(Df);function L8(e){return new YO(e)}function XO(e){return Sa(e)&&(e.flags&Or.Literal)>0}var KO=function(e){Zn(r,e);function r(t,n,a,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this._subtype.validate(t,n);if(a.length>0)return a;var i=An(t)?nr(t).snapshot:t;return this._predicate(i)?ms():ys(n,t,this._message(t))}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),r}(pc);function ZO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string"?e.shift():Sa(e[0])?e[0].name:null,n=e[0],a=e[1],i=e[2]?e[2]:function(o){return"Value does not respect the refinement predicate"};return new KO(t,n,a,i)}function QO(e){return Sa(e)&&(e.flags&Or.Refinement)>0}function JO(e,r){var t=typeof e=="string"?r:e,n=a0.apply(void 0,ju([],Iu(t.map(function(a){return L8(""+a)})),!1));return typeof e=="string"&&(n.name=e),n}var eA=function(e){Zn(r,e);function r(t,n,a){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),a=_a({eager:!0,dispatcher:void 0},a),i._dispatcher=a.dispatcher,a.eager||(i._eager=!1),i}return Object.defineProperty(r.prototype,"flags",{get:function(){var t=Or.Union;return this._types.forEach(function(n){t|=n.flags}),t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._types.some(function(n){return n.isAssignableFrom(t)})}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.determineType(i,void 0);if(!o)throw new Kt("No matching type for union "+this.describe());return o.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.determineType(n,t.getReconciliationType());if(!o)throw new Kt("No matching type for union "+this.describe());return o.reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._dispatcher?this._dispatcher(t):n?n.is(t)?n:this._types.filter(function(a){return a!==n}).find(function(a){return a.is(t)}):this._types.find(function(a){return a.is(t)})}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._dispatcher)return this._dispatcher(t).validate(t,n);for(var a=[],i=0,o=0;o<this._types.length;o++){var l=this._types[o],u=l.validate(t,n);if(u.length===0){if(this._eager)return ms();i++}else a.push(u)}return i===1?ms():ys(n,t,"No type is applicable for the union").concat(n0(a))}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),r}(pc);function a0(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var n=Sa(e)?void 0:e,a=Sa(e)?ju([e],Iu(r),!1):r,i="("+a.map(function(o){return o.name}).join(" | ")+")";return new eA(i,a,n)}function N8(e){return Sa(e)&&(e.flags&Or.Union)>0}var tA=function(e){Zn(r,e);function r(t,n,a){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:a}),i}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(this.optionalValues.indexOf(i)>=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,n,a,o)}return this._subtype.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.reconcile(t,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),a,i)}}),Object.defineProperty(r.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&hc(this,t),t}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.optionalValues.indexOf(t)>=0?ms():this._subtype.validate(t,n)}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),r}(pc);function rA(e,r){if(typeof r!="function"&&An(r))throw new Kt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Pf(e,r,t){return rA(e,r),new tA(e,r,t||nA)}var nA=[void 0];function iA(e){return Sa(e)&&(e.flags&Or.Optional)>0}var aA=Pf(O8,void 0),oA=Pf(P8,null);function T8(e){return a0(e,aA)}function sA(e){return a0(e,oA)}var lA=function(e){Zn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a}return Object.defineProperty(r.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Or.Late},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(a){if(a instanceof ReferenceError)n=void 0;else throw a}if(t&&n===void 0)throw new Kt("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.getSubType(!0).instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.getSubType(!0).reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.getSubType(!1);return a?a.validate(t,n):ms()}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getSubType(!1);return n?n.isAssignableFrom(t):!1}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t||e8}}),r}(pc);function uA(e,r){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?r:e;return new lA(t,n)}function cA(e){return Sa(e)&&(e.flags&Or.Late)>0}function fA(e,r){return new hA(e,r)}var hA=function(e){Zn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:Rn.array()}),w2(function(){return a.pendingNodeList.length>0&&a.pendingNodeList.some(function(i){return i.isAlive&&a.options.shouldLoadPredicate(i.parent?i.parent.value:null)})},function(){a.options.loadType().then(ca(function(i){a.loadedType=i,a.pendingNodeList.forEach(function(o){o.parent&&a.loadedType&&o.parent.applyPatches([{op:"replace",path:"/".concat(o.subpath),value:o.snapshot}])})}))}),a}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this;if(this.loadedType)return this.loadedType.instantiate(t,n,a,i);var l=nf(this,t,n,a,i);return this.pendingNodeList.push(l),w2(function(){return!l.isAlive},function(){return o.pendingNodeList.splice(o.pendingNodeList.indexOf(l),1)}),l}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.loadedType?this.loadedType.validate(t,n):g8(t)?ms():ys(n,t,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.loadedType?(t.die(),this.loadedType.instantiate(a,i,a.environment,n)):e.prototype.reconcile.call(this,t,n,a,i)}}),r}(Df),R8=function(e){Zn(r,e);function r(t){var n=e.call(this,t?"frozen(".concat(t.name,")"):"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Frozen}),n}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return g8(t)?this.subType?this.subType.validate(t,n):ms():ys(n,t,"Value is not serializable and cannot be frozen")}}),r}(Df),Ob=new R8;function dA(e){return arguments.length===0?Ob:Sa(e)?new R8(e):Pf(Ob,e)}function pA(e){return Sa(e)&&(e.flags&Or.Frozen)>0}function gA(e){switch(e){case wa.beforeDestroy:return"destroy";case wa.beforeDetach:return"detach";default:return}}var vA=function(){function e(r,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Sm(r))this.identifier=r;else if(An(r)){var n=nr(r);if(!n.identifierAttribute)throw new Kt("Can only store references with a defined identifier attribute.");var a=n.unnormalizedIdentifier;if(a==null)throw new Kt("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new Kt("Can only store references to tree nodes or identifiers, got: '".concat(r,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=Ih(this.identifier),n=r.root,a=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==a){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new _m("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(r.path,")"));this.resolvedReference={node:o,lastCacheModification:a}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),_m=function(e){Zn(r,e);function r(t){var n=e.call(this,t)||this;return Object.setPrototypeOf(n,r.prototype),n}return r}(Error),M8=function(e){Zn(r,e);function r(t,n){var a=e.call(this,"reference(".concat(t.name,")"))||this;return Object.defineProperty(a,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(a,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Reference}),a}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.targetType.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return Sm(t)?ms():ys(n,t,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(r.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=n.parent;if(!(!o||!o.isAlive)){var l=o.storedValue;l&&this.onInvalidated({cause:t,parent:l,invalidTarget:i?i.storedValue:void 0,invalidId:a,replaceRef:function(u){Oh(n.root.storedValue,{op:"replace",value:u,path:n.path})},removeRef:function(){_8(o.type)?this.replaceRef(void 0):Oh(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(r.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,i=this.getValue(t);if(i){var o=nr(i),l=function(h,p){var w=gA(p);w&&a.fireInvalidated(w,t,n,o)},u=o.registerHook(wa.beforeDetach,l),c=o.registerHook(wa.beforeDestroy,l);return function(){u(),c()}}}}),Object.defineProperty(r.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=this;if(this.onInvalidated){var o;t.registerHook(wa.beforeDestroy,function(){o&&o()});var l=function(u){o&&o();var c=t.parent,h=c&&c.storedValue;if(c&&c.isAlive&&h){var p=void 0;a?p=!!a.get(n,h):p=t.root.identifierCache.has(i.targetType,Ih(n)),p?o=i.addTargetNodeWatcher(t,n):u||i.fireInvalidated("invalidSnapshotReference",t,n,null)}};t.state===io.FINALIZED?l(!0):(t.isRoot||t.root.registerHook(wa.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(wa.afterAttach,function(){l(!1)}))}}}),r}(Df),mA=function(e){Zn(r,e);function r(t,n){return e.call(this,t,n)||this}return Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=t.storedValue;return n.resolvedValue}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.storedValue;return n.identifier}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=An(i)?Y6(i):i,l=new vA(i,this.targetType),u=nf(this,t,n,a,l);return l.node=u,this.watchTargetNodeForInvalidations(u,o,void 0),u}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t.isDetaching&&t.type===this){var o=An(n),l=t.storedValue;if(!o&&l.identifier===n||o&&l.resolvedValue===n)return t.setParent(a,i),t}var u=this.instantiate(a,i,void 0,n);return t.die(),u}}),r}(M8),yA=function(e){Zn(r,e);function r(t,n,a){var i=e.call(this,t,a)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=this.options.get(t.storedValue,t.parent?t.parent.storedValue:null);return n}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=An(i)?this.options.set(i,t?t.storedValue:null):i,l=nf(this,t,n,a,o);return this.watchTargetNodeForInvalidations(l,o,this.options),l}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=An(n)?this.options.set(n,t?t.storedValue:null):n;if(!t.isDetaching&&t.type===this&&t.storedValue===o)return t.setParent(a,i),t;var l=this.instantiate(a,i,void 0,o);return t.die(),l}}),r}(M8);function I8(e,r){var t=r||void 0,n=r?r.onInvalidated:void 0;return t&&(t.get||t.set)?new yA(e,{get:t.get,set:t.set},n):new mA(e,n)}function bA(e){return Sa(e)&&(e.flags&Or.Reference)>0}function wA(e,r){var t=I8(e,_a(_a({},r),{onInvalidated:function(n){r&&r.onInvalidated&&r.onInvalidated(n),n.removeRef()}}));return r&&r.acceptsUndefined===!1?t:T8(t)}var j8=function(e){Zn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Identifier}),a}return Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t||!(t.type instanceof pp))throw new Kt("Identifier types can only be instantiated as direct child of a model type");return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(t.storedValue!==n)throw new Kt("Tried to change identifier from '".concat(t.storedValue,"' to '").concat(n,"'. Changing identifiers is not allowed."));return t.setParent(a,i),t}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return typeof t!==this.validType?ys(n,t,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):ms()}}),r}(Df),_A=function(e){Zn(r,e);function r(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Identifier}),t}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),r}(j8),SA=function(e){Zn(r,e);function r(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),r}(j8),xA=new _A,EA=new SA;function PA(e){return Sa(e)&&(e.flags&Or.Identifier)>0}function Ih(e){return""+e}function Sm(e){return typeof e=="string"||typeof e=="number"}function OA(e){return new AA(e)}var AA=function(e){Zn(r,e);function r(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Custom}),n}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.options.isTargetType(t))return ms();var a=this.options.getValidationMessage(t);return a?ys(n,t,"Invalid value for type '".concat(this.name,"': ").concat(a)):ms()}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.options.toSnapshot(t.storedValue)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.options.isTargetType(i)?i:this.options.fromSnapshot(i,t&&t.root.environment);return nf(this,t,n,a,o)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=!this.options.isTargetType(n);if(!t.isDetaching){var l=t.type===this&&(o?n===t.snapshot:n===t.storedValue);if(l)return t.setParent(a,i),t}var u=o?this.options.fromSnapshot(n,a.root.environment):n,c=this.instantiate(a,i,void 0,u);return t.die(),c}}),r}(Df),Ab={enumeration:JO,model:UO,compose:HO,custom:OA,reference:I8,safeReference:wA,union:a0,optional:Pf,literal:L8,maybe:T8,maybeNull:sA,refinement:ZO,string:S8,boolean:E8,number:x8,integer:GO,float:VO,finite:WO,Date:C8,map:jO,array:DO,frozen:dA,identifier:xA,identifierNumber:EA,late:uA,lazy:fA,undefined:O8,null:P8,snapshotProcessor:MO};const CA=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:MP,addMiddleware:a8,applyAction:t8,applyPatch:Oh,applySnapshot:V6,cast:DP,castFlowReturn:EO,castToReferenceSnapshot:qP,castToSnapshot:BP,clone:NP,createActionTrackingMiddleware:VP,createActionTrackingMiddleware2:$P,decorate:JP,destroy:RP,detach:TP,escapeJsonPath:Vc,flow:y8,getChildType:pP,getEnv:IP,getIdentifier:Y6,getLivelinessChecking:U6,getMembers:FP,getNodeId:zP,getParent:_P,getParentOfType:xP,getPath:$6,getPathParts:EP,getPropertyMembers:Z6,getRelativePath:LP,getRoot:W6,getRunningActionContext:vm,getSnapshot:dm,getType:Cp,hasEnv:jP,hasParent:wP,hasParentOfType:SP,isActionContextChildOf:rO,isActionContextThisOrChildOf:nO,isAlive:pm,isArrayType:BO,isFrozenType:pA,isIdentifierType:PA,isLateType:cA,isLiteralType:XO,isMapType:FO,isModelType:_8,isOptionalType:iA,isPrimitiveType:k8,isProtected:bP,isReferenceType:bA,isRefinementType:QO,isRoot:PP,isStateTreeNode:An,isType:Sa,isUnionType:N8,isValidReference:kP,joinJsonPath:I1,onAction:r8,onPatch:G6,onSnapshot:gP,process:dO,protect:mP,recordActions:ZP,recordPatches:vP,resolveIdentifier:AP,resolvePath:OP,setLivelinessChecking:z6,setLivelynessChecking:hP,splitJsonPath:Nh,t:Ab,toGenerator:OO,toGeneratorFunction:PO,tryReference:CP,tryResolve:X6,typecheck:l8,types:Ab,unescapeJsonPath:b8,unprotect:yP,walk:K6},Symbol.toStringTag,{value:"Module"})),hl=Kc(CA);var mg={},Cb;function F8(){return Cb||(Cb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getLimitedFontSize=function({oldText:r,newText:t,element:n}){if(!(t.length/Math.max(20,r.length)>=4))return n.fontSize;const a=n.width*n.page.computedHeight/t.length,i=1.5*Math.sqrt(a),o=n.fontSize;return Math.min(o,Math.max(5,Math.round(i)))}}(mg)),mg}var kb;function D8(){return kb||(kb=1,function(e){var r=Dd&&Dd.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=I,e.getDir=T,e.usePrevious=C;const t=r(di()),n=zs,a=Fu,i=Mh,o=fl,l=r(Us()),u=cP,c=Pp(),h=jf(),p=Op(),w=tf(),d=B6(),_=Ap(),E=If(),S=Ff(),m=rf(),g=hl,v=F8();l.default._fixTextRendering=!0;const b=document.createElement("style");b.type="text/css",document.head.appendChild(b);const O={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function I(x){x=x.replace(/\s/g,"");let L=0;for(var A=0;A<x.length;A++)N=x[A],F="֑-߿יִ-﷽ﹰ-ﻼ",new RegExp("^[^"+F+"]*?["+F+"]").test(N)&&(L+=1);var N,F;return L>x.length/2}function T(x){return I(x)?"rtl":"ltr"}const M=(0,n.observer)(({textNodeRef:x,element:L,onBlur:A,selectAll:N,cursorPosition:F})=>{const[U,W]=t.default.useState(O),$=x.current;t.default.useLayoutEffect(()=>{const D={};D.width=$.width()-2*$.padding()+"px",D.height=$.height()-2*$.padding()+$.fontSize()*$.lineHeight()+"px",D.fontSize=$.fontSize()+"px",D.lineHeight=$.lineHeight()+.01,D.fontFamily=$.fontFamily(),D.textAlign=$.align(),D.color=$.fill(),D.fontWeight=L.fontWeight,D.fontStyle=L.fontStyle,D.letterSpacing=L.letterSpacing+"em";const K=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${U.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;b.innerHTML="",b.appendChild(document.createTextNode(K)),JSON.stringify(D)!==JSON.stringify(U)&&W(D)});const Z=t.default.useRef(null);t.default.useLayoutEffect(()=>{var D;const K=Z.current;if(!K)return;(D=Z.current)===null||D===void 0||D.focus();const ne=F||K.value.length;K.selectionStart=K.selectionEnd=ne,N&&(K==null||K.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",A);const D=K=>{var ne;!((ne=Z.current)===null||ne===void 0)&&ne.contains(K.target)||A()};return window.addEventListener("touchstart",D),()=>{window.removeEventListener("blur",A),window.removeEventListener("touchstart",D)}},[]);let V=0;const G=$.textArr.length*$.lineHeight()*$.fontSize();L.verticalAlign==="middle"&&(V=(L.a.height-G)/2),L.verticalAlign==="bottom"&&(V=L.a.height-G);const z=(0,d.removeTags)(L.text);return t.default.createElement("textarea",{className:"polotno-input",ref:Z,dir:T(z),style:Object.assign(Object.assign(Object.assign({},O),U),{paddingTop:V+"px"}),value:z,onChange:D=>{const K=(0,v.getLimitedFontSize)({oldText:L.text,newText:D.target.value,element:L});L.set({text:D.target.value,fontSize:K})},placeholder:L.placeholder,onBlur:A})}),j=x=>t.default.createElement(i.Html,null,t.default.createElement(M,Object.assign({},x)));function C(x){const L=t.default.useRef(x),A=t.default.useRef(x);return t.default.useMemo(()=>{A.current=L.current,L.current=x},[x]),A.current}e.useFontLoader=(x,L)=>{const[A,N]=t.default.useReducer(U=>U+1,0),F=t.default.useRef((0,p.isFontLoaded)(L));return t.default.useLayoutEffect(()=>{if(F.current=(0,p.isFontLoaded)(L),F.current)return;let U=!0;return(async()=>{F.current=!1,N();const W=(0,h.incrementLoader)(`text ${L}`);await x.loadFont(L),setTimeout(W,100),U&&(F.current=!0,N())})(),()=>{U=!1}},[L]),[F.current]},e.getLineHeight=({fontLoaded:x,fontFamily:L,fontSize:A,lineHeight:N})=>t.default.useMemo(()=>{if(typeof N=="number")return N;const F=document.createElement("div");F.style.fontFamily=L,F.style.fontSize=A+"px",F.style.lineHeight=N,F.innerText="Test text",document.body.appendChild(F);const U=F.offsetHeight;return document.body.removeChild(F),U/A},[x,L,A,N]),e.TextElement=(0,n.observer)(({element:x,store:L})=>{const A=t.default.useRef(null),N=t.default.useRef(null),{editorEnabled:F,selectAll:U}=(Ee=>{const[Le,he]=t.default.useState(!1),ke=t.default.useRef(!1);return t.default.useEffect(()=>{var Re=!0;return setTimeout(()=>{Re&&(Ee._editModeEnabled&&(ke.current=!0),he(!0),setTimeout(()=>{ke.current=!1},50))},50),()=>{Re=!1}},[]),{editorEnabled:Le&&Ee._editModeEnabled,selectAll:ke.current}})(x),[W,$]=t.default.useState(!1),[Z,V]=t.default.useState(!1),G=t.default.useRef(x.a.height),z=L.selectedShapes.indexOf(x)>=0&&x.selectable,{textVerticalResizeEnabled:D}=w.flags,K=C(x.fontFamily),[ne,Q]=t.default.useState([]);t.default.useEffect(()=>{var Ee,Le;const he=(Le=(Ee=A.current)===null||Ee===void 0?void 0:Ee.textArr)!==null&&Le!==void 0?Le:[];JSON.stringify(he)!==JSON.stringify(ne)&&Q(he)}),t.default.useEffect(()=>{if(x.a.width)return;const Ee=A.current;Ee.width(600),x.set({width:1.4*Ee.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,o.autorun)(()=>{const Ee=A.current;(0,_.applyFilter)(Ee,x)}));const[ee]=(0,e.useFontLoader)(L,x.fontFamily),ae=(0,d.removeTags)(x.text),se=()=>{const Ee=A.current.clone({height:void 0}),Le=Math.ceil(Ee.fontSize()*Ee.lineHeight()*Ee.textArr.length+1);return Ee.destroy(),Le};t.default.useLayoutEffect(()=>{if(!ee)return;const{textOverflow:Ee,textSplitAllowed:Le}=w.flags;if(x.a.height){if(!L.isPlaying)if(Ee!=="change-font-size"||Z){if(Ee==="resize"){const he=se();D&&x.a.height<he&&L.history.ignore(()=>{var ke;(0,g.isAlive)(x)&&x.set({height:he}),(ke=A.current)===null||ke===void 0||ke.height(he)},!1,!0),D||x.a.height===he||L.history.ignore(()=>{var ke;(0,g.isAlive)(x)&&x.set({height:he}),(ke=A.current)===null||ke===void 0||ke.height(he)},!1,!0)}}else{const he=function(Re,$e,vt=!1){const wt=Re.fontSize(),at=Re.height(),mt=(0,d.removeTags)($e.text);let Je=$e.a.fontSize;Re.height(void 0);const nt=Math.round(2*$e.a.fontSize)-1;for(let qt=1;qt<nt;qt++){const At=$e.a.height&&Re.height()>$e.a.height;let Ht=mt.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((He,Nt)=>/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(Nt)?He.concat(Nt.split("")):He.concat(Nt),[]),zt=Re.textArr.map(He=>He.text).join(";");const Ie=Ht.find(He=>!zt.includes(He)||(zt=zt.replace(He,""),!1));if(!(At||Ie&&!vt))break;Je-=.5,Re.fontSize(Je)}return Re.fontSize(wt),Re.height(at),Je}(A.current,x,Le);if(he!==x.a.fontSize)return void L.history.ignore(()=>{x.set({fontSize:he})},!1,!0);const ke=se();x.a.height===ke||D||L.history.ignore(()=>{x.set({height:ke})},!1,!0)}}else{const he=se();L.history.ignore(()=>{x.set({height:he})},!1,!0)}}),t.default.useLayoutEffect(()=>{const Ee=A.current;Ee&&(Ee.width(Ee.width()+1e-8),Ee._setTextData(),(0,_.applyFilter)(Ee,x))},[ee]);const ce=t.default.useRef(null),me=t.default.useRef(0),Se=Ee=>{Ee.evt.preventDefault(),L.selectedShapes.find(he=>he===x)&&x.contentEditable&&(me.current=function(he){var ke;const Re=he.target,$e=function(nt){var qt=nt.getAbsoluteTransform().copy();qt.invert();var At=nt.getStage().getPointerPosition();return qt.point(At)}(Re),vt=Re.textArr,wt=Math.floor($e.y/(Re.fontSize()*Re.lineHeight())),at=vt.slice(0,wt).reduce((nt,qt)=>nt+qt.text.length,wt),mt=(ke=vt[wt])!==null&&ke!==void 0?ke:vt[0];let Je=0;return Re.align()==="right"?Je=Re.width()-mt.width:Re.align()==="center"&&(Je=Re.width()/2-mt.width/2),at+Math.round(($e.x-Je)/mt.width*mt.text.length)}(Ee),x.toggleEditMode())},Oe=!ae&&x.placeholder?.6:x.a.opacity;(0,E.useFadeIn)(A,Oe);const Ne=(0,e.getLineHeight)({fontLoaded:ee,fontFamily:x.fontFamily,fontSize:x.a.fontSize,lineHeight:x.lineHeight}),xe=x.selectable||L.role==="admin",ve=(0,c.useColor)(x),Xe=t.default.useMemo(()=>x.backgroundEnabled?function({lines:Ee,lineHeight:Le,width:he,align:ke="left",padding:Re=0,cornerRadius:$e=0}){var vt;Ee.forEach((Je,nt)=>{Je.cx=he/2,ke==="right"?Je.cx=he-Je.width/2:ke==="left"&&(Je.cx=Je.width/2),ke!=="justify"||Je.lastInParagraph||(Je.width=he),ke==="justify"&&(Je.cx=Je.width/2)});let wt=`M ${(vt=Ee[0])===null||vt===void 0?void 0:vt.cx} ${-Re}`;Ee.forEach((Je,nt)=>{const{cx:qt}=Je,At=Ee[nt-1];At&&At.width>Je.width?wt+=` L ${qt+Je.width/2+Re} ${nt*Le+Re}`:wt+=` L ${qt+Je.width/2+Re} ${nt*Le-Re}`;const Ht=Ee[nt+1];Ht&&Ht.width>Je.width?wt+=` L ${qt+Je.width/2+Re} ${(nt+1)*Le-Re}`:wt+=` L ${qt+Je.width/2+Re} ${(nt+1)*Le+Re}`});for(var at=Ee.length-1;at>=0;at--){const Je=Ee[at],{cx:nt}=Je,qt=Ee[at+1];qt&&qt.width>Je.width?wt+=` L ${nt-Je.width/2-Re} ${(at+1)*Le-Re}`:wt+=` L ${nt-Je.width/2-Re} ${(at+1)*Le+Re}`;const At=Ee[at-1];At&&At.width>Je.width?wt+=` L ${nt-Je.width/2-Re} ${at*Le+Re}`:wt+=` L ${nt-Je.width/2-Re} ${at*Le-Re}`}wt+=" Z";const mt=(0,u.parsePath)(wt);return(0,u.roundCommands)(mt,$e).path}({lines:JSON.parse(JSON.stringify(ne)),cornerRadius:x.backgroundCornerRadius*(x.a.fontSize*Ne*.5),lineHeight:Ne*x.a.fontSize,padding:x.backgroundPadding*(x.a.fontSize*Ne*.5),width:x.a.width,align:x.align}):"",[x.backgroundEnabled,x.backgroundCornerRadius,x.a.fontSize,Ne,x.backgroundPadding,x.a.width,x.align,ne]),be=(0,m.isTouchDevice)();let Ae=0;return x.verticalAlign==="middle"?Ae=(x.a.height-ne.length*Ne*x.a.fontSize)/2:x.verticalAlign==="bottom"&&(Ae=x.a.height-ne.length*Ne*x.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:N,x:x.a.x,y:x.a.y,rotation:x.a.rotation,hideInExport:!x.showInExport,listening:!1,visible:x.backgroundEnabled,opacity:x.backgroundOpacity*Oe,data:Xe,fill:x.backgroundColor,offsetY:-Ae}),t.default.createElement(a.Text,Object.assign({ref:A,id:x.id,name:"element",hideInExport:!x.showInExport,editModeEnabled:x._editModeEnabled,x:x.a.x,y:x.a.y,rotation:x.a.rotation,width:x.a.width,height:x.a.height,text:ae||x.placeholder,direction:T(ae)},ve,{stroke:x.stroke,lineJoin:"round",strokeWidth:x.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:x.a.fontSize,fontFamily:`"${x.fontFamily}", "${K}"`,fontStyle:x.fontStyle+" "+x.fontWeight,textDecoration:x.textDecoration,align:x.align,verticalAlign:x.verticalAlign,draggable:be?x.draggable&&z:x.draggable,preventDefault:!be||z,opacity:Oe,visible:!x._editModeEnabled,ellipsis:w.flags.textOverflow==="ellipsis",shadowEnabled:x.shadowEnabled,shadowBlur:x.shadowBlur,shadowOffsetX:x.shadowOffsetX,shadowOffsetY:x.shadowOffsetY,shadowColor:x.shadowColor,shadowOpacity:x.shadowOpacity,lineHeight:Ne,letterSpacing:x.letterSpacing*x.a.fontSize,listening:xe,onDragMove:Ee=>{x.set({x:Ee.target.x(),y:Ee.target.y()})},onDragEnd:Ee=>{x.set({x:Ee.target.x(),y:Ee.target.y()})},onMouseEnter:()=>{$(!0)},onMouseLeave:()=>{$(!1)},onClick:Se,onTap:Se,onTransformStart:()=>{V(!0),G.current=A.current.height()},onTransform:Ee=>{var Le,he;const ke=Ee.target;(Le=N.current)===null||Le===void 0||Le.setAttrs({x:ke.x(),y:ke.y(),rotation:ke.rotation(),scale:ke.scale()});const Re=((he=ke.getStage())===null||he===void 0?void 0:he.findOne("Transformer")).getActiveAnchor();if(Re==="middle-left"||Re==="middle-right"){const $e=ke.scaleX(),vt=ke.width()*$e,wt=x.a.fontSize;let at=vt;vt<wt&&(at=wt,ce.current&&ke.position(ce.current)),ke.width(at),ke.scaleX(1),ke.scaleY(1);const mt=se();if(w.flags.textOverflow!=="ellipsis"){const Je=Math.max(mt,G.current);ke.height(Je),x.set({height:ke.height()})}x.set({x:ke.x(),y:ke.y(),width:ke.width(),rotation:ke.rotation()}),(0,_.applyFilter)(ke,x)}if(Re==="top-center"||Re==="bottom-center"){let $e=w.flags.textOverflow==="resize"?se():Ne*x.a.fontSize;Ee.target.height(Math.max($e,Ee.target.height()*Ee.target.scaleY())),Ee.target.scaleY(1)}ce.current=Ee.target.position()},onTransformEnd:Ee=>{var Le;const he=Ee.target.scaleX();Ee.target.scaleX(1),Ee.target.scaleY(1),x.set({fontSize:Math.round(x.a.fontSize*he),width:Math.ceil(Ee.target.width()*he),x:Ee.target.x(),y:Ee.target.y(),rotation:Ee.target.rotation(),height:Ee.target.height()*he,shadowBlur:x.shadowBlur*he,shadowOffsetX:x.shadowOffsetX*he,shadowOffsetY:x.shadowOffsetY*he,strokeWidth:x.strokeWidth*he}),(Le=N.current)===null||Le===void 0||Le.setAttrs({scaleX:1,scaleY:1}),V(!1)}})),F&&t.default.createElement(a.Group,{x:x.a.x,y:x.a.y,rotation:x.a.rotation},t.default.createElement(j,{textNodeRef:A,element:x,selectAll:U,cursorPosition:me.current,onBlur:()=>{x.toggleEditMode(!1)}})),!Z&&(W||z)&&t.default.createElement(S.Highlighter,{element:x}))})}(Dd)),Dd}var Fl={},Gd={},yg={exports:{}},bg={exports:{}},Lb;function xm(){return Lb||(Lb=1,function(e,r){e.exports=t;function t(a){return n.bind(null,a)}function n(a){var i=[].slice.call(arguments,1);i.unshift("["+a+"]"),process.stderr.write(i.join(" ")+`
|
|
102
|
-
`)}}(bg)),bg.exports}var Nb;function B8(){return Nb||(Nb=1,function(e,r){xm()("lex"),e.exports=t;function t(n){var a="",i,o=0,l=-1,u=0,c=1,h="before-selector",p=[h],w={},d=[],_=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function E(){return M(),n[l]}function S(W){return W?p[p.length-1-W]:h}function m(W){var $=l+1;return W===n.slice($,$+W.length)}function g(W){var $=n.slice(l).indexOf(W);return $>0?$:!1}function v(W){return W===b(1)}function b(W){return n[l+(W||1)]}function O(){var W=p.pop();return h=p[p.length-1],W}function I(W){return h=W,p.push(h),p.length}function T(W){var $=h;return p[p.length-1]=h=W,$}function M(W){if((W||1)==1)n[l]==`
|
|
103
|
-
`?(c++,o=1):o++,l++;else{var $=n.slice(l,l+W).split(`
|
|
104
|
-
`);$.length>1&&(c+=$.length-1,o=1),o+=$[$.length-1].length,l=l+W}}function j(){w.end={line:c,col:o},d.push(w),a="",w={}}function C(W){w={type:W,start:{line:c,col:o}}}for(;i=E();)switch(i){case" ":switch(S()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":a+=i;break}break;case`
|
|
105
|
-
`:case" ":case"\r":case"\f":switch(S()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":a+=i;break;case"at-value":i===`
|
|
106
|
-
`&&(w.value=a.trim(),j(),O());break}break;case":":switch(S()){case"name":w.name=a.trim(),a="",T("before-value");break;case"before-selector":a+=i,C("selector"),I("selector");break;case"before-value":T("value"),a+=i;break;default:a+=i;break}break;case";":switch(S()){case"name":case"before-value":case"value":a.trim().length>0&&(w.value=a.trim(),j()),T("before-name");break;case"value-paren":a+=i;break;case"at-value":w.value=a.trim(),j(),O();break;case"before-name":break;default:a+=i;break}break;case"{":switch(S()){case"selector":if(b(-1)==="\\"){a+=i;break}w.text=a.trim(),j(),T("before-name"),u=u+1;break;case"at-group":switch(w.name=a.trim(),w.type){case"font-face":case"viewport":case"page":I("before-name");break;default:I("before-selector")}j(),u=u+1;break;case"name":case"at-rule":w.name=a.trim(),j(),I("before-name"),u=u+1;break;case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":T("value"),a+=i;break}break;case"}":switch(S()){case"before-name":case"name":case"before-value":case"value":a&&(w.value=a.trim()),w.name&&w.value&&j(),C("end"),j(),O(),S()==="at-group"&&(C("at-group-end"),j(),O()),u>0&&(u=u-1);break;case"at-group":case"before-selector":case"selector":if(b(-1)==="\\"){a+=i;break}u>0&&S(1)==="at-group"&&(C("at-group-end"),j()),u>1&&O(),u>0&&(u=u-1);break;case"double-string":case"single-string":case"comment":a+=i;break}break;case'"':case"'":switch(S()){case"double-string":i==='"'&&b(-1)!=="\\"&&O();break;case"single-string":i==="'"&&b(-1)!=="\\"&&O();break;case"before-at-value":T("at-value"),I(i==='"'?"double-string":"single-string");break;case"before-value":T("value"),I(i==='"'?"double-string":"single-string");break;case"comment":break;default:b(-1)!=="\\"&&I(i==='"'?"double-string":"single-string")}a+=i;break;case"/":switch(S()){case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":case"selector":case"name":case"value":if(v("*")){var x=g("*/");x&&M(x+1)}else S()=="before-value"&&T("value"),a+=i;break;default:v("*")?(C("comment"),I("comment"),M()):a+=i;break}break;case"*":switch(S()){case"comment":v("/")?(w.text=a,M(),j(),O()):a+=i;break;case"before-selector":a+=i,C("selector"),I("selector");break;case"before-value":T("value"),a+=i;break;default:a+=i}break;case"@":switch(S()){case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":T("value"),a+=i;break;default:for(var L=!1,A,N,F=0,U=_.length;!L&&F<U;++F)N=_[F],A=N.name||N,m(A)&&(L=!0,C(A),I(N.state||"at-group"),M(A.length),N.prefix&&(w.prefix=N.prefix),N.type&&(w.type=N.type));L||(a+=i);break}break;case"(":switch(S()){case"value":I("value-paren");break;case"before-value":T("value");break}a+=i;break;case")":switch(S()){case"value-paren":O();break;case"before-value":T("value");break}a+=i;break;default:switch(S()){case"before-selector":C("selector"),I("selector");break;case"before-name":C("property"),T("name");break;case"before-value":T("value");break;case"before-at-value":T("at-value");break}a+=i;break}return d}}(yg)),yg.exports}var wg={exports:{}},Tb;function kA(){return Tb||(Tb=1,function(e,r){xm()("parse");var t=B8();e.exports=l;var n,a,i,o;function l(O,I){I||(I={}),n=!!I.comments,i=!!I.position,a=0,o=Array.isArray(O)?O.slice():t(O);for(var T,M=[],j;j=c();)T=m(j),T&&M.push(T);return{type:"stylesheet",stylesheet:{rules:M}}}function u(O,I){I||(I={});for(var T,M=["type","name","value"],j={},C=0;C<M.length;++C)T=M[C],O[T]&&(j[T]=I[T]||O[T]);for(M=Object.keys(I),C=0;C<M.length;++C)T=M[C],j[T]||(j[T]=I[T]);return i&&(j.position={start:O.start,end:O.end}),j}function c(){var O=o.shift();return O}function h(O){a=a+1;var I={};switch(O.type){case"font-face":case"viewport":I.declarations=v();break;case"page":I.prefix=O.prefix,I.declarations=v();break;default:I.prefix=O.prefix,I.rules=b()}return u(O,I)}function p(O){return u(O)}function w(O){return u(O)}function d(O){return u(O,{text:O.text})}function _(O){return u(O)}function E(O){return u(O)}function S(O){function I(T){return T.trim()}return u(O,{type:"rule",selectors:O.text.split(",").map(I),declarations:v()})}function m(O){switch(O.type){case"property":return E(O);case"selector":return S(O);case"at-group-end":a=a-1;return;case"media":case"keyframes":return h(O);case"comment":if(n)return d(O);break;case"charset":return w(O);case"import":return p(O);case"namespace":return _(O);case"font-face":case"supports":case"viewport":case"document":case"page":return h(O)}}function g(O){for(var I,T=[],M;(M=c())&&O&&O(M);)I=m(M),I&&T.push(I);return M&&M.type!=="end"&&o.unshift(M),T}function v(){return g(function(O){return O.type==="property"||O.type==="comment"})}function b(){return g(function(){return a})}}(wg)),wg.exports}var _g={exports:{}},Rb;function LA(){return Rb||(Rb=1,function(e,r){xm()("stringify");var t,n,a,i,o,l;e.exports=u;function u(b,O){O||(O={}),a=O.indentation||"",n=!!O.compress,t=!!O.comments,i=1,n?o=l="":(o=`
|
|
107
|
-
`,l=" ");var I=_(b.stylesheet.rules,g).join(`
|
|
108
|
-
`).trim();return I}function c(b){if(b){i+=b;return}return n?"":Array(i).join(a||"")}function h(b){return"@"+b.type+" "+b.value+";"+o}function p(b){var O="",I=b.prefix||"";b.name&&(O=" "+b.name);var T=b.type!=="page";return"@"+I+b.type+O+l+E(b,T)+o}function w(b){return t?"/*"+(b.text||"")+"*/"+o:""}function d(b){var O;return b.selectors?O=b.selectors.join(","+o):(O="@"+b.type,O+=b.name?" "+b.name:""),c()+O+l+E(b)+o}function _(b,O){return b.reduce(function(I,T){var M=T.type==="comment"?w(T):O(T);return M&&I.push(M),I},[])}function E(b,O){var I=b.declarations,T=m;return b.rules&&(I=b.rules,T=d),I=S(I,T),I&&(I=o+I+(O?"":o)),"{"+I+c()+"}"}function S(b,O){if(!b)return"";c(1);var I=_(b,O);return c(-1),I.length?I.join(o):""}function m(b){if(b.type==="property")return v(b)}function g(b){switch(b.type){case"rule":return d(b);case"media":case"keyframes":return p(b);case"comment":return w(b);case"import":case"charset":case"namespace":return h(b);case"font-face":case"supports":case"viewport":case"document":case"page":return p(b)}}function v(b){var O=b.name?b.name+":"+l:"";return c()+O+b.value+";"}}(_g)),_g.exports}var Sg,Mb;function NA(){return Mb||(Mb=1,Sg={lex:B8(),parse:kA(),stringify:LA()}),Sg}var Ib;function kp(){return Ib||(Ib=1,function(e){var r=Gd&&Gd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=async function(_){const E=await fetch(_);return d(await E.text())},e.urlToString=p,e.getColors=w,e.svgToURL=d,e.getSvgSize=async function(_){const E=await p(_),S=new DOMParser().parseFromString(E,"image/svg+xml").documentElement.getAttribute("viewBox"),[m,g,v,b]=(S==null?void 0:S.split(" "))||[];return{width:parseFloat(v),height:parseFloat(b)}},e.fixSize=function(_){var E=new DOMParser().parseFromString(_,"image/svg+xml");const S=E.documentElement.getAttribute("viewBox"),[m,g,v,b]=(S==null?void 0:S.split(" "))||[],O=E.documentElement.getAttribute("width");O||E.documentElement.setAttribute("width",v+"px");const I=E.documentElement.getAttribute("height");if((!I||I.indexOf("%")>=0)&&E.documentElement.setAttribute("height",b+"px"),O&&O.indexOf("%")>=0&&I&&I.indexOf("%")===-1){const T=parseFloat(I)/parseFloat(b);E.documentElement.setAttribute("width",T*parseFloat(v)+"px")}if(I&&I.indexOf("%")>=0&&O&&O.indexOf("%")===-1){const T=parseFloat(O)/parseFloat(v);E.documentElement.setAttribute("height",T*parseFloat(b)+"px")}return O==="100%"&&I==="100%"&&(E.documentElement.setAttribute("width",v+"px"),E.documentElement.setAttribute("height",b+"px")),new XMLSerializer().serializeToString(E)},e.replaceColors=function(_,E){var S=new DOMParser().parseFromString(_,"image/svg+xml");const m=h(S),g=Array.from(E.keys()),v=l(S);return m.forEach(b=>{const{fill:O,stroke:I}=u(b,v);[{prop:"fill",color:O},{prop:"stroke",color:I}].forEach(({prop:T,color:M})=>{const j=g.find(C=>(0,e.sameColors)(C,M));if(j){const C=E.get(j);if((0,a.isGradient)(C)){const{rotation:x,stops:L}=(0,a.parseColor)(C),A=L.map(F=>({offset:100*F.offset+"%","stop-color":F.color})),N="color"+Math.round(1e8*Math.random());(function(F,U,W,$){var Z=F.namespaceURI,V=document.createElementNS(Z,"linearGradient");const G=t.default.Util.degToRad(W+90),z=(Math.cos(G)+1)/2,D=(Math.sin(G)+1)/2,K=(Math.cos(G+Math.PI)+1)/2,ne=(Math.sin(G+Math.PI)+1)/2;V.setAttribute("x1",100*z+"%"),V.setAttribute("y1",100*D+"%"),V.setAttribute("x2",100*K+"%"),V.setAttribute("y2",100*ne+"%"),V.setAttribute("gradientUnits","userSpaceOnUse"),V.setAttribute("id",U);for(var Q=0;Q<$.length;Q++){var ee=$[Q],ae=document.createElementNS(Z,"stop");for(var se in ee)ee.hasOwnProperty(se)&&ae.setAttribute(se,ee[se]);V.appendChild(ae)}(F.querySelector("defs")||F.insertBefore(document.createElementNS(Z,"defs"),F.firstChild)).appendChild(V)})(S.children[0],N,x,A),b.style[T]=null,b.setAttribute(T,`url('#${N}')`)}else b.style[T]=E.get(j)}})}),d(new XMLSerializer().serializeToString(S))};const t=r(Us()),n=r(di()),a=hm(),i=r(NA());function o(_){for(;_.parentNode;){if(_.nodeName==="defs")return!0;_=_.parentNode}return!1}function l(_){const E={};return _.querySelectorAll("style").forEach(S=>{const m=i.default.parse(S.textContent).stylesheet.rules;for(let g of m)g.selectors&&g.selectors.forEach(v=>{const b=E[v]||{};g.declarations.forEach(O=>{b[O.name]=O.value}),E[v]=b})}),E}function u(_,E){var S;const m={fill:"",stroke:""},g=((S=_.getAttribute("class"))===null||S===void 0?void 0:S.split(" "))||[],v=_.getAttribute("id");let b={};if(v&&E[`#${v}`]?b=E[`#${v}`]:g.forEach(O=>{E[`.${O}`]&&(b=Object.assign(Object.assign({},b),E[`.${O}`]))}),E[_.nodeName]&&(b=Object.assign(Object.assign({},b),E[_.nodeName])),_.getAttribute("fill")&&_.getAttribute("fill")!=="none"?m.fill=_.getAttribute("fill"):b.fill&&b.fill!=="none"&&(m.fill=b.fill),_.getAttribute("stroke")&&_.getAttribute("stroke")!=="none"?m.stroke=_.getAttribute("stroke"):b.stroke&&b.stroke!=="none"&&(m.stroke=b.stroke),!m.fill&&_.style.fill&&_.style.fill!=="none"&&(m.fill=_.style.fill),!m.stroke&&_.style.stroke&&_.style.stroke!=="none"&&(m.stroke=_.style.stroke),!m.stroke&&!m.fill){const O=_.ownerSVGElement,I=O&&O!==_&&u(O,E);(I==null?void 0:I.fill)==="currentColor"||(I==null?void 0:I.stroke)==="currentColor"||(m.fill="black")}return m}const c=["path","rect","circle","line","polygon","polyline","ellipse","text"];function h(_){for(var E=[],S=_.getElementsByTagName("*"),m=0,g=S.length;m<g;m++){const v=S[m];o(v)||(v.getAttribute("fill")!==null&&E.push(v),(v.getAttribute("stroke")!==null||v.style&&v.style.fill||c.indexOf(v.nodeName)>=0)&&E.push(v))}return E}async function p(_){return await(await fetch(_,{mode:"cors"})).text()}function w(_){var E=new DOMParser().parseFromString(_,"image/svg+xml");const S=l(E),m=h(E),g=[];return m.forEach(v=>{const{fill:b,stroke:O}=u(v,S);[b,O].forEach(I=>{I&&(I==="currentColor"&&(I="black"),t.default.Util.colorToRGBA(I)&&g.indexOf(I)===-1&&g.push(I))})}),g}function d(_){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(_)))}e.sameColors=(_,E)=>{if(!_||!E)return!1;if(E==="currentColor"&&_==="black")return!0;const S=t.default.Util.colorToRGBA(_),m=t.default.Util.colorToRGBA(E);return S&&m?S.r===m.r&&S.g===m.g&&S.b===m.b&&S.a===m.a:void 0},e.useSvgColors=_=>{const[E,S]=n.default.useState([]);return n.default.useEffect(()=>{let m=!1;return(async()=>{S([]);const g=w(await p(_));m||S(g)})(),()=>{m=!0}},[_]),E}}(Gd)),Gd}var xg={},jb;function q8(){return jb||(jb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trySetCanvasSize=void 0,e.trySetCanvasSize=(r,t,n)=>{let a=t,i=n,o=1;for(;a>0&&i>0;){r.width=a,r.height=i;const l=r.getContext("2d");if(!l)return;if(l.fillStyle="rgba(0,0,0,0.1)",l.fillRect(0,0,1,1),l.getImageData(0,0,1,1).data[3]!==0)return void l.clearRect(0,0,r.width,r.height);if(o*=.9,a=Math.floor(t*o),i=Math.floor(n*o),a=Math.max(a,1),i=Math.max(i,1),a<=1&&i<=1)return r.width=1,void(r.height=1)}}}(xg)),xg}var Fb;function Em(){return Fb||(Fb=1,function(e){var r,t=Fl&&Fl.__createBinding||(Object.create?function(N,F,U,W){W===void 0&&(W=U);var $=Object.getOwnPropertyDescriptor(F,U);$&&!("get"in $?!F.__esModule:$.writable||$.configurable)||($={enumerable:!0,get:function(){return F[U]}}),Object.defineProperty(N,W,$)}:function(N,F,U,W){W===void 0&&(W=U),N[W]=F[U]}),n=Fl&&Fl.__setModuleDefault||(Object.create?function(N,F){Object.defineProperty(N,"default",{enumerable:!0,value:F})}:function(N,F){N.default=F}),a=Fl&&Fl.__importStar||(r=function(N){return r=Object.getOwnPropertyNames||function(F){var U=[];for(var W in F)Object.prototype.hasOwnProperty.call(F,W)&&(U[U.length]=W);return U},r(N)},function(N){if(N&&N.__esModule)return N;var F={};if(N!=null)for(var U=r(N),W=0;W<U.length;W++)U[W]!=="default"&&t(F,N,U[W]);return n(F,N),F}),i=Fl&&Fl.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=e.useCornerRadiusAndCrop=e.setOuterImageCropTransformerStyle=e.setInnerImageCropTransformerStyle=e.useSizeFixer=void 0;const o=i(di()),l=zs,u=fl,c=Fu,h=i(r0()),p=i(Us()),w=Mh,d=Ff(),_=jf(),E=a(kp()),S=tf(),m=q8(),g=Ap(),v=If(),b=rf();function O(){return document.createElement("canvas")}function I(N,F){return{x:(N.x+F.x)/2,y:(N.y+F.y)/2}}e.useSizeFixer=N=>{const[F,U]=o.default.useState(N);return o.default.useEffect(()=>{(async()=>{const W=await async function($){if(!($.indexOf("data:image/svg+xml")>=0||$.indexOf(".svg")>=0))return $;const Z=await E.urlToString($),V=E.fixSize(Z);return E.svgToURL(V)}(N);W!==F&&U(W)})()},[N]),F};const T={boundBoxFunc:(N,F)=>F.width<5||F.height<5?N:F,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2};e.setInnerImageCropTransformerStyle=N=>{Object.assign(T,N)};const M={boundBoxFunc:(N,F)=>F.width<5||F.height<5?N:F,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2};e.setOuterImageCropTransformerStyle=N=>{Object.assign(M,N)};const j=(N,F,U)=>Math.max(F,Math.min(U,N));e.useCornerRadiusAndCrop=(N,F,U,W,$=0,Z=!1,V=!0)=>{const G=Math.floor(j(N.a.width*W,1,1e4)),z=Math.floor(j(N.a.height*W,1,1e4)),D=Math.min($*W,G/2,z/2),K=Math.max(N.a.width/U.width,N.a.height/U.height)*W,ne=N.page._exportingOrRendering&&S.flags.imageDownScalingEnabled&&K<1&&!Z,Q=U.x===0&&U.y===0&&U.width===(F==null?void 0:F.width)&&U.height===(F==null?void 0:F.height),ee=o.default.useMemo(()=>{if(F&&F.width&&F.height)return Q&&D===0&&!ne?void 0:O()},[F,D,ne,Q]);return o.default.useLayoutEffect(()=>{if(!ee||!F)return;(0,m.trySetCanvasSize)(ee,G,z);const ae=ee.getContext("2d");if(!ae)return;D&&(ae.beginPath(),ae.moveTo(D,0),ae.lineTo(G-D,0),ae.arc(G-D,D,D,3*Math.PI/2,0,!1),ae.lineTo(G,z-D),ae.arc(G-D,z-D,D,0,Math.PI/2,!1),ae.lineTo(D,z),ae.arc(D,z-D,D,Math.PI/2,Math.PI,!1),ae.lineTo(0,D),ae.arc(D,D,D,Math.PI,3*Math.PI/2,!1),ae.clip());const se=ne?function(me,Se){var Oe,Ne;const xe=O();xe.width=me.width,xe.height=me.height;const ve=Math.max(1,Math.floor(xe.width*Se)),Xe=Math.max(1,Math.floor(xe.height*Se));(Oe=xe.getContext("2d"))===null||Oe===void 0||Oe.drawImage(me,0,0,xe.width,xe.height);const be=function(Ae,Ee,Le,he,ke,Re,$e){for(var vt=new ImageData(Ee,Le),wt=new Int32Array(Ae.data.buffer),at=Ae.width,mt=new Int32Array(vt.data.buffer),Je=vt.width,nt=Ee/Re,qt=Le/$e,At=Math.round(1/nt),Ht=Math.round(1/qt),zt=At*Ht,Ie=0;Ie<vt.height;Ie++)for(var He=0;He<Je;He++){for(var Nt=0+Math.round(He/nt)+(0+Math.round(Ie/qt))*at,ht=0,gt=0,_t=0,rr=0,Wt=0;Wt<Ht;Wt++)for(var St=0;St<At;St++){var it=wt[Nt+St+Wt*at];ht+=it<<24>>>24,gt+=it<<16>>>24,_t+=it<<8>>>24,rr+=it>>>24}ht=Math.round(ht/zt),gt=Math.round(gt/zt),_t=Math.round(_t/zt),rr=Math.round(rr/zt),mt[He+Ie*Je]=rr<<24|_t<<16|gt<<8|ht}return vt}(xe.getContext("2d").getImageData(0,0,xe.width,xe.height),ve,Xe,0,0,xe.width,xe.height);return xe.width=ve,xe.height=Xe,(Ne=xe.getContext("2d"))===null||Ne===void 0||Ne.putImageData(be,0,0),xe}(F,K):F,ce=ne?{x:Math.floor(U.x*K),y:Math.floor(U.y*K),width:Math.floor(U.width*K),height:Math.floor(U.height*K)}:U;ae.drawImage(se,ce.x,ce.y,ce.width,ce.height,0,0,ee.width,ee.height)},[ee,N.a.width,N.a.height,U.x,U.y,U.width,U.height,$,W,Z,N.page._exportingOrRendering,ne]),o.default.useEffect(()=>()=>{ee&&ee.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(ee)},[ee]),ee||F};const C=O(),x=(0,l.observer)(({element:N})=>{const F=Math.min(30,N.a.width/4,N.a.height/4),U=o.default.useRef(null);return o.default.useEffect(()=>{const W=U.current;if(!W)return;const $=new p.default.Animation(Z=>{W.rotate(((Z==null?void 0:Z.timeDiff)||0)/2)},W.getLayer());return $.start(),()=>{$.stop()}}),o.default.createElement(c.Group,{x:N.x,y:N.y,rotation:N.rotation,listening:!1,opacity:N.a.opacity,hideInExport:!N.showInExport},o.default.createElement(c.Rect,{width:N.a.width,height:N.a.height,fill:"rgba(124, 173, 212, 0.8)"}),o.default.createElement(c.Arc,{ref:U,x:N.a.width/2,y:N.a.height/2,fill:"white",outerRadius:Math.abs(F),innerRadius:Math.max(1,F-5),angle:270}))}),L=(0,l.observer)(({element:N})=>{const F=Math.max(10,Math.min(30,N.a.width/25));return o.default.createElement(c.Group,{x:N.x,y:N.y,rotation:N.rotation,listening:!1,opacity:N.a.opacity,hideInExport:!N.showInExport},o.default.createElement(c.Rect,{width:N.a.width,height:N.a.height,fill:"rgba(223, 102, 102, 0.8)"}),o.default.createElement(c.Text,{text:"Can not load the image...",fontSize:F,width:N.a.width,height:N.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let A=h.default;e.setImageLoaderHook=N=>{A=N},e.useImageLoader=(N,F="",U="")=>{const W=o.default.useRef(),$=()=>{var Z;(Z=W.current)===null||Z===void 0||Z.call(W),W.current=void 0};o.default.useEffect(()=>$,[]),o.default.useLayoutEffect(()=>{const Z=F.slice(0,200),V=`image with id ${U} url: ${Z}`;N!=="loading"||W.current||(W.current=(0,_.incrementLoader)(V)),N!=="loading"&&$(),N==="failed"&&(0,_.triggerLoadError)(V)},[N])},e.ImageElement=(0,l.observer)(({element:N,store:F})=>{var U;const[W,$]=o.default.useState(!1),Z=o.default.useRef(null),V=o.default.useRef(null),[G,z]=o.default.useState(!1),D=F.selectedShapes.indexOf(N)>=0&&N.selectable,[K,ne]=(Ue=>{const[De,bt]=o.default.useReducer(Ft=>Ft+1,0),ze=o.default.useRef("loading"),xt=o.default.useRef(Ue.src),kt=o.default.useRef(Ue.src);return kt.current!==Ue.src&&(kt.current=Ue.src,ze.current="loading"),o.default.useEffect(()=>{if(Ue.type!=="svg"||!Ue.src)return;let Ft=!1;return(async()=>{ze.current="loading",bt();const Ut=await E.urlToString(Ue.src),Yt=E.fixSize(Ut),_r=E.replaceColors(Yt,Ue.colorsReplace);Ft||(xt.current=_r,ze.current="loaded",bt())})(),()=>{Ft=!0}},[Ue.src,JSON.stringify(Ue.colorsReplace)]),Ue.type!=="svg"?[Ue.src,"loaded"]:[xt.current,ze.current]})(N),[Q,ee]=A(K,"anonymous"),ae=N.type!=="svg"||ne==="loaded"?ee:"loading";(0,e.useImageLoader)(ae,N.src,N.id);const se=N.page._exportingOrRendering?1:Math.max(1,F.scale),ce=F._elementsPixelRatio*se,me=(({image:Ue,status:De,type:bt})=>{const ze=o.default.useRef();return o.default.useEffect(()=>{ze.current=Ue||ze.current},[Ue]),De!=="failed"||De!=="failed"&&bt==="svg"?ze.current:void 0})({image:Q,status:ee,type:N.type}),Se=((Ue,De,bt)=>{const ze=o.default.useMemo(()=>{var xt,kt;const{flipX:Ft,flipY:Ut}=Ue,Yt=Ue.type==="svg"||Ue.src.indexOf("data:image/svg+xml")>=0||Ue.src.indexOf(".svg")>=0,_r=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,kr=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||_r)&&Yt||Ue.maskSrc;if(!Ft&&!Ut&&!kr)return De;if(!De||!De.width||!De.height)return null;const Lr=O();let Nr=1;Ue.type==="svg"&&(Nr=Math.max(Ue.a.width/De.width*bt,Ue.a.height/De.height*bt)),(0,m.trySetCanvasSize)(Lr,Math.max(De.width*Nr,1),Math.max(De.height*Nr,1));let Wn=Ft?-Lr.width:0,en=Ut?-Lr.height:0;return(xt=Lr.getContext("2d"))===null||xt===void 0||xt.scale(Ft?-1:1,Ut?-1:1),(kt=Lr.getContext("2d"))===null||kt===void 0||kt.drawImage(De,Wn,en,Lr.width,Lr.height),Lr},[Ue.maskSrc,Ue.flipX,Ue.flipY,De,Ue.a.width,Ue.a.height,bt]);return o.default.useEffect(()=>()=>{ze&&ze.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(ze)},[ze]),ze})(N,Q||me,ce),Oe=((Ue,De)=>{const[bt,ze]=A(Ue.maskSrc,"anonymous"),xt=Ue.maskSrc?ze:"loaded";return(0,e.useImageLoader)(xt,Ue.maskSrc||"",Ue.id),o.default.useMemo(()=>{if(!bt||!De||!De.width||!De.height)return De;const kt=O();kt.width=Math.max(De.width,1),kt.height=Math.max(De.height,1);const Ft=kt.getContext("2d");if(!Ft)return De;Ft.drawImage(De,0,0),Ft.globalCompositeOperation="source-in";const Ut=function(Yt,_r){const kr=_r.width/_r.height;let Lr,Nr;return kr>=Yt.width/Yt.height?(Lr=Yt.width,Nr=Yt.width/kr):(Lr=Yt.height*kr,Nr=Yt.height),{x:(Yt.width-Lr)/2,y:(Yt.height-Nr)/2,width:Lr,height:Nr}}(bt,Ue);return Ft.drawImage(bt,Ut.x,Ut.y,Ut.width,Ut.height,0,0,De.width,De.height),kt},[De,bt,Ue.a.width,Ue.a.height])})(N,Se)||C;let{cropX:Ne,cropY:xe,cropWidth:ve,cropHeight:Xe}=N.a;ee!=="loaded"&&(Ne=xe=0,ve=Xe=1);const be=Oe.width*ve,Ae=Oe.height*Xe,Ee=N.a.width/N.a.height;let Le,he;const ke=be/Ae,Re=N.type==="svg";Re?(Le=be,he=Ae):Ee>=ke?(Le=be,he=be/Ee):(Le=Ae*Ee,he=Ae);const $e={x:Oe.width*Ne,y:Oe.height*xe,width:Le,height:he},vt=(U=N.cornerRadius)!==null&&U!==void 0?U:0,wt=N.page._exportingOrRendering?1:Math.min(2,F.scale),at=F._elementsPixelRatio*wt;let mt=((Ue,De,bt,ze)=>{const xt=(0,e.useSizeFixer)(Ue.clipSrc||""),[kt,Ft]=A(xt,"anonymous"),Ut=Ue.clipSrc?Ft:"loaded";(0,e.useImageLoader)(Ut,Ue.clipSrc,Ue.id);const Yt=o.default.useMemo(()=>{if(De&&kt)return O()},[De,kt]);return o.default.useLayoutEffect(()=>{var _r;if(!kt||!De||!De.width||!De.height||!kt||!kt.width||!kt.height||!Yt)return;const kr=O(),Lr=Math.max(Ue.a.width/kt.width*bt,Ue.a.height/kt.height*bt);kr.width=kt.width*Lr,kr.height=kt.height*Lr,(_r=kr.getContext("2d"))===null||_r===void 0||_r.drawImage(kt,0,0,kr.width,kr.height),Yt.width=Math.max(De.width,1),Yt.height=Math.max(De.height,1);const Nr=Yt.getContext("2d");Nr&&(Nr.save(),Nr.drawImage(kr,0,0,De.width,De.height),p.default.Util.releaseCanvas(kr),Nr.globalCompositeOperation="source-in",Nr.drawImage(De,0,0,Yt.width,Yt.height),Nr.restore())},[Yt,De,kt,Ue.a.width,Ue.a.height,bt,...ze]),Ue.clipSrc&&kt?Yt:De})(N,(0,e.useCornerRadiusAndCrop)(N,Oe,$e,at,vt,W||N._cropModeEnabled||N.type==="svg",!0),at,[$e,vt,at]);const Je=Math.max(N.a.width/Le,N.a.height/he);o.default.useEffect(()=>{var Ue;if(!N._cropModeEnabled)return;const De=(Ue=Z.current)===null||Ue===void 0?void 0:Ue.getStage();function bt(xt){N._cropModeEnabled&&xt.target!==V.current&&N.toggleCropMode(!1)}function ze(xt){N._cropModeEnabled&&xt.target.parentNode!==De.content&&N.toggleCropMode(!1)}return document.body.addEventListener("click",ze),De==null||De.on("click",bt),De==null||De.on("tap",bt),()=>{document.body.removeEventListener("click",ze),document.body.removeEventListener("touchstart",ze),De==null||De.off("click",bt),De==null||De.off("click",bt)}},[N._cropModeEnabled]),o.default.useLayoutEffect(()=>{if(!W&&!N._cropModeEnabled)return(0,g.applyFilter)(Z.current,N),(0,u.autorun)(()=>{(0,g.applyFilter)(Z.current,N)},{delay:100})},[mt,N.page._exportingOrRendering,W,ve,Xe,N._cropModeEnabled]),o.default.useLayoutEffect(()=>{var Ue;W||N._cropModeEnabled?(Ue=Z.current)===null||Ue===void 0||Ue.clearCache():(0,g.applyFilter)(Z.current,N)},[W,N.a.width,N.a.height,N._cropModeEnabled]),o.default.useEffect(()=>{(0,g.applyFilter)(Z.current,N)},[N.shadowEnabled,N.shadowBlur,N.cornerRadius,N.shadowColor,N.shadowOffsetX,N.shadowOffsetY,N.shadowOpacity]);const nt=o.default.useRef(null),qt=o.default.useRef(null),At=o.default.useRef(null);o.default.useLayoutEffect(()=>{N._cropModeEnabled&&(qt.current.nodes([nt.current]),At.current.nodes([V.current]))},[N._cropModeEnabled]);var Ht=o.default.useRef(null),zt=o.default.useRef(0),Ie=o.default.useRef(!1);const He=Ue=>{var De;((De=Ue.evt.touches)===null||De===void 0?void 0:De.length)>2&&Ue.target.stopDrag(),Math.round(Ue.target.x())>0&&(Ue.target.x(0),Ue.target.scaleX(1)),Math.round(Ue.target.y())>0&&(Ue.target.y(0),Ue.target.scaleY(1));const bt=Ue.target.width()*Ue.target.scaleX(),ze=Ue.target.height()*Ue.target.scaleY(),xt=Math.min(1,Le/bt),kt=Math.min(1,he/ze),Ft=1-xt,Ut=Math.min(Ft,Math.max(0,Math.round(-Ue.target.x())/bt)),Yt=1-kt,_r=Math.min(Yt,Math.max(0,Math.round(-Ue.target.y())/ze));Ue.target.setAttrs({x:-Ut*Oe.width,y:-_r*Oe.height,scaleX:1,scaleY:1}),N.set({cropX:Ut,cropY:_r,cropWidth:xt,cropHeight:kt})},Nt=()=>{N.type!=="svg"&&N.contentEditable&&setTimeout(()=>{N.toggleCropMode(!0)})},ht=N.type==="svg"&&me,gt=ee==="loading"&&!ht,_t=ee==="failed",rr=!gt&&!_t,Wt=o.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),St=rr?N.a.opacity:0;(0,v.useFadeIn)(Z,St);const it=N.selectable||F.role==="admin",Bt=(0,b.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,gt&&o.default.createElement(x,{element:N}),_t&&o.default.createElement(L,{element:N}),o.default.createElement(c.Image,{ref:Z,name:"element",id:N.id,image:mt,x:N.a.x,y:N.a.y,width:N.a.width||1,height:N.a.height||1,rotation:N.a.rotation,opacity:St,shadowEnabled:N.shadowEnabled,shadowBlur:N.shadowBlur,shadowOffsetX:N.shadowOffsetX,shadowOffsetY:N.shadowOffsetY,shadowColor:N.shadowColor,shadowOpacity:N.shadowOpacity,customCrop:$e,listening:it,draggable:Bt?N.draggable&&D:N.draggable,preventDefault:!Bt||D,hideInExport:!N.showInExport,onMouseEnter:()=>{z(!0)},onMouseLeave:()=>{z(!1)},onDragMove:Ue=>{N.set({x:Ue.target.x(),y:Ue.target.y()})},onDragEnd:Ue=>{N.set({x:Ue.target.x(),y:Ue.target.y()})},onDblClick:Nt,onDblTap:Nt,onTransformStart:()=>{$(!0),Wt.current={cropX:N.cropX,cropY:N.cropY,cropWidth:N.cropWidth,cropHeight:N.cropHeight}},onTransform:Ue=>{var De;const bt=Ue.currentTarget,ze=Math.abs(bt.scaleX()-1)<1e-7?1:bt.scaleX(),xt=Math.abs(bt.scaleY()-1)<1e-7?1:bt.scaleY();bt.scaleX(1),bt.scaleY(1);const kt=(De=Ue.target.getStage())===null||De===void 0?void 0:De.findOne("Transformer"),Ft=1-Le/Oe.width,Ut=Math.min(Ft,Math.max(0,N.cropX)),Yt=1-he/Oe.height,_r=Math.min(Yt,Math.max(0,N.cropY)),kr=kt.getActiveAnchor(),Lr=!(kr.indexOf("middle")>=0||kr.indexOf("center")>=0),Nr=!Lr&&ze<1&&Wt.current.cropHeight>he/Oe.height;let Wn=Lr?N.cropWidth:N.cropWidth*ze;Nr&&(Wn=N.cropWidth);const en=!Lr&&xt<1&&Wt.current.cropWidth>Le/Oe.width;let Qn=Lr?N.cropHeight:N.cropHeight*xt;en&&(Qn=N.cropHeight),Re&&(Wn=N.cropWidth,Qn=N.cropHeight),N.set({cropX:Ut,cropY:_r,x:bt.x(),y:bt.y(),width:bt.width()*ze,height:bt.height()*xt,rotation:Ue.target.rotation(),cropWidth:Math.min(Wn,1-Ut),cropHeight:Math.min(Qn,1-_r)})},onTransformEnd:Ue=>{const De=Ue.currentTarget;N.set({width:De.width(),height:De.height(),x:De.x(),y:De.y(),rotation:Ue.target.rotation(),cropWidth:Le/Oe.width,cropHeight:he/Oe.height}),$(!1)}}),o.default.createElement(c.Rect,{x:N.x,y:N.y,width:Math.max(N.a.width-N.borderSize,0),height:Math.max(N.a.height-N.borderSize,0),opacity:St,offsetX:-N.borderSize/2,offsetY:-N.borderSize/2,stroke:N.borderColor,strokeWidth:N.borderSize,listening:!1,visible:!!N.borderSize,rotation:N.rotation,cornerRadius:Math.max(0,vt-N.borderSize),hideInExport:!N.showInExport}),N._cropModeEnabled&&o.default.createElement(w.Portal,{selector:".page-abs-container",enabled:!0},o.default.createElement(c.Rect,{x:-window.innerWidth/F.scale,y:-window.innerWidth/F.scale,width:window.innerWidth/F.scale*3,height:window.innerWidth/F.scale*3,fill:"rgba(0,0,0,0.3)"}),o.default.createElement(c.Image,{listening:!1,image:mt,x:N.x,y:N.y,width:N.a.width,height:N.a.height,rotation:N.rotation,shadowEnabled:N.shadowEnabled,shadowBlur:N.shadowBlur}),o.default.createElement(c.Group,{x:N.x,y:N.y,rotation:N.rotation,scaleX:Je,scaleY:Je},o.default.createElement(c.Image,{image:Oe,ref:V,opacity:.4,draggable:!0,x:-N.cropX*Oe.width,y:-N.cropY*Oe.height,onDragMove:He,onTransform:He,onTouchMove:Ue=>{Ue.evt.preventDefault();const De=Ue.target.getStage().getPointersPositions();var bt=De[0],ze=De[1];const xt=Ue.target;if(bt&&!ze&&!xt.isDragging()&&Ie.current&&(xt.startDrag(),Ie.current=!1),bt&&ze){p.default.hitOnDragEnabled=!0,xt.isDragging()&&(Ie.current=!0,xt.stopDrag());const en=Ue.target.getAbsoluteTransform().copy();en.invert();var kt={x:bt.x,y:bt.y},Ft={x:ze.x,y:ze.y};if(!Ht.current)return void(Ht.current=I(kt,Ft));var Ut=I(kt,Ft),Yt=function(Si,fa){return Math.sqrt(Math.pow(fa.x-Si.x,2)+Math.pow(fa.y-Si.y,2))}(kt,Ft);zt.current||(zt.current=Yt);const Qn=xt.position();var _r={x:Ut.x-Qn.x,y:Ut.y-Qn.y},kr=Yt/zt.current;xt.scaleX(kr),xt.scaleY(kr);const _i=en.point(Ut),Ni=en.point(Ht.current);var Lr=_i.x-Ni.x,Nr=_i.y-Ni.y,Wn={x:Math.min(0,Ut.x-_r.x*kr+Lr),y:Math.min(0,Ut.y-_r.y*kr+Nr)};xt.position(Wn),zt.current=Yt,Ht.current=Ut,He(Ue)}},onTouchEnd:Ue=>{zt.current=0,Ht.current=null,p.default.hitOnDragEnabled=!1}}),o.default.createElement(c.Transformer,Object.assign({ref:At},M)),o.default.createElement(c.Rect,{width:Le,height:he,ref:nt,listening:!1,onTransform:Ue=>{Ue.target.x()<-N.cropX*Oe.width-1e-9&&(Ue.target.x(-N.cropX*Oe.width),Ue.target.scaleX(1)),Ue.target.y()<-N.cropY*Oe.height-1e-9&&(Ue.target.y(-N.cropY*Oe.height),Ue.target.scaleY(1));const De=Math.min(1,Math.max(0,N.cropX+Ue.target.x()/Oe.width)),bt=Math.min(1,Math.max(0,Ue.target.y()/Oe.height+N.cropY)),ze=Ue.target.width()*Ue.target.scaleX(),xt=Ue.target.height()*Ue.target.scaleY(),kt=Math.min(1-De,ze/Oe.width),Ft=Math.min(1-bt,xt/Oe.height),Ut=Ue.target.getAbsolutePosition(Ue.target.getParent().getParent());Ue.target.scale({x:1,y:1}),Ue.target.position({x:0,y:0}),N.set({x:Ut.x,y:Ut.y,cropX:De,cropY:bt,cropWidth:kt,cropHeight:Ft,width:Math.min(ze*Je,Oe.width*(1-De)*Je),height:Math.min(xt*Je,Oe.height*(1-bt)*Je)})}}),o.default.createElement(c.Transformer,Object.assign({ref:qt},T,{visible:N.resizable})))),(G||D)&&o.default.createElement(d.Highlighter,{element:N}))})}(Fl)),Fl}var Dl={},y1={exports:{}};/*!
|
|
109
|
-
* Quill Editor v1.3.7
|
|
110
|
-
* https://quilljs.com/
|
|
111
|
-
* Copyright (c) 2014, Jason Chen
|
|
112
|
-
* Copyright (c) 2013, salesforce.com
|
|
113
|
-
*/var TA=y1.exports,Db;function RA(){return Db||(Db=1,function(e,r){(function(n,a){e.exports=a()})(typeof self<"u"?self:TA,function(){return function(t){var n={};function a(i){if(n[i])return n[i].exports;var o=n[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=n,a.d=function(i,o,l){a.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:l})},a.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(o,"a",o),o},a.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},a.p="",a(a.s=109)}([function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(17),o=a(18),l=a(19),u=a(45),c=a(46),h=a(47),p=a(48),w=a(49),d=a(12),_=a(32),E=a(33),S=a(31),m=a(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:i.default,Format:o.default,Leaf:l.default,Embed:p.default,Scroll:u.default,Block:h.default,Inline:c.default,Text:w.default,Attributor:{Attribute:d.default,Class:_.default,Style:E.default,Store:S.default}};n.default=g},function(t,n,a){var i=this&&this.__extends||function(){var S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var v in g)g.hasOwnProperty(v)&&(m[v]=g[v])};return function(m,g){S(m,g);function v(){this.constructor=m}m.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=function(S){i(m,S);function m(g){var v=this;return g="[Parchment] "+g,v=S.call(this,g)||this,v.message=g,v.name=v.constructor.name,v}return m}(Error);n.ParchmentError=o;var l={},u={},c={},h={};n.DATA_KEY="__blot";var p;(function(S){S[S.TYPE=3]="TYPE",S[S.LEVEL=12]="LEVEL",S[S.ATTRIBUTE=13]="ATTRIBUTE",S[S.BLOT=14]="BLOT",S[S.INLINE=7]="INLINE",S[S.BLOCK=11]="BLOCK",S[S.BLOCK_BLOT=10]="BLOCK_BLOT",S[S.INLINE_BLOT=6]="INLINE_BLOT",S[S.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",S[S.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",S[S.ANY=15]="ANY"})(p=n.Scope||(n.Scope={}));function w(S,m){var g=_(S);if(g==null)throw new o("Unable to create "+S+" blot");var v=g,b=S instanceof Node||S.nodeType===Node.TEXT_NODE?S:v.create(m);return new v(b,m)}n.create=w;function d(S,m){return m===void 0&&(m=!1),S==null?null:S[n.DATA_KEY]!=null?S[n.DATA_KEY].blot:m?d(S.parentNode,m):null}n.find=d;function _(S,m){m===void 0&&(m=p.ANY);var g;if(typeof S=="string")g=h[S]||l[S];else if(S instanceof Text||S.nodeType===Node.TEXT_NODE)g=h.text;else if(typeof S=="number")S&p.LEVEL&p.BLOCK?g=h.block:S&p.LEVEL&p.INLINE&&(g=h.inline);else if(S instanceof HTMLElement){var v=(S.getAttribute("class")||"").split(/\s+/);for(var b in v)if(g=u[v[b]],g)break;g=g||c[S.tagName]}return g==null?null:m&p.LEVEL&g.scope&&m&p.TYPE&g.scope?g:null}n.query=_;function E(){for(var S=[],m=0;m<arguments.length;m++)S[m]=arguments[m];if(S.length>1)return S.map(function(b){return E(b)});var g=S[0];if(typeof g.blotName!="string"&&typeof g.attrName!="string")throw new o("Invalid definition");if(g.blotName==="abstract")throw new o("Cannot register abstract class");if(h[g.blotName||g.attrName]=g,typeof g.keyName=="string")l[g.keyName]=g;else if(g.className!=null&&(u[g.className]=g),g.tagName!=null){Array.isArray(g.tagName)?g.tagName=g.tagName.map(function(b){return b.toUpperCase()}):g.tagName=g.tagName.toUpperCase();var v=Array.isArray(g.tagName)?g.tagName:[g.tagName];v.forEach(function(b){(c[b]==null||g.className==null)&&(c[b]=g)})}return g}n.register=E},function(t,n,a){var i=a(51),o=a(11),l=a(3),u=a(20),c="\0",h=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};h.prototype.insert=function(p,w){var d={};return p.length===0?this:(d.insert=p,w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(d.attributes=w),this.push(d))},h.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},h.prototype.retain=function(p,w){if(p<=0)return this;var d={retain:p};return w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(d.attributes=w),this.push(d)},h.prototype.push=function(p){var w=this.ops.length,d=this.ops[w-1];if(p=l(!0,{},p),typeof d=="object"){if(typeof p.delete=="number"&&typeof d.delete=="number")return this.ops[w-1]={delete:d.delete+p.delete},this;if(typeof d.delete=="number"&&p.insert!=null&&(w-=1,d=this.ops[w-1],typeof d!="object"))return this.ops.unshift(p),this;if(o(p.attributes,d.attributes)){if(typeof p.insert=="string"&&typeof d.insert=="string")return this.ops[w-1]={insert:d.insert+p.insert},typeof p.attributes=="object"&&(this.ops[w-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof d.retain=="number")return this.ops[w-1]={retain:d.retain+p.retain},typeof p.attributes=="object"&&(this.ops[w-1].attributes=p.attributes),this}}return w===this.ops.length?this.ops.push(p):this.ops.splice(w,0,p),this},h.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},h.prototype.filter=function(p){return this.ops.filter(p)},h.prototype.forEach=function(p){this.ops.forEach(p)},h.prototype.map=function(p){return this.ops.map(p)},h.prototype.partition=function(p){var w=[],d=[];return this.forEach(function(_){var E=p(_)?w:d;E.push(_)}),[w,d]},h.prototype.reduce=function(p,w){return this.ops.reduce(p,w)},h.prototype.changeLength=function(){return this.reduce(function(p,w){return w.insert?p+u.length(w):w.delete?p-w.delete:p},0)},h.prototype.length=function(){return this.reduce(function(p,w){return p+u.length(w)},0)},h.prototype.slice=function(p,w){p=p||0,typeof w!="number"&&(w=1/0);for(var d=[],_=u.iterator(this.ops),E=0;E<w&&_.hasNext();){var S;E<p?S=_.next(p-E):(S=_.next(w-E),d.push(S)),E+=u.length(S)}return new h(d)},h.prototype.compose=function(p){var w=u.iterator(this.ops),d=u.iterator(p.ops),_=[],E=d.peek();if(E!=null&&typeof E.retain=="number"&&E.attributes==null){for(var S=E.retain;w.peekType()==="insert"&&w.peekLength()<=S;)S-=w.peekLength(),_.push(w.next());E.retain-S>0&&d.next(E.retain-S)}for(var m=new h(_);w.hasNext()||d.hasNext();)if(d.peekType()==="insert")m.push(d.next());else if(w.peekType()==="delete")m.push(w.next());else{var g=Math.min(w.peekLength(),d.peekLength()),v=w.next(g),b=d.next(g);if(typeof b.retain=="number"){var O={};typeof v.retain=="number"?O.retain=g:O.insert=v.insert;var I=u.attributes.compose(v.attributes,b.attributes,typeof v.retain=="number");if(I&&(O.attributes=I),m.push(O),!d.hasNext()&&o(m.ops[m.ops.length-1],O)){var T=new h(w.rest());return m.concat(T).chop()}}else typeof b.delete=="number"&&typeof v.retain=="number"&&m.push(b)}return m.chop()},h.prototype.concat=function(p){var w=new h(this.ops.slice());return p.ops.length>0&&(w.push(p.ops[0]),w.ops=w.ops.concat(p.ops.slice(1))),w},h.prototype.diff=function(p,w){if(this.ops===p.ops)return new h;var d=[this,p].map(function(g){return g.map(function(v){if(v.insert!=null)return typeof v.insert=="string"?v.insert:c;var b=g===p?"on":"with";throw new Error("diff() called "+b+" non-document")}).join("")}),_=new h,E=i(d[0],d[1],w),S=u.iterator(this.ops),m=u.iterator(p.ops);return E.forEach(function(g){for(var v=g[1].length;v>0;){var b=0;switch(g[0]){case i.INSERT:b=Math.min(m.peekLength(),v),_.push(m.next(b));break;case i.DELETE:b=Math.min(v,S.peekLength()),S.next(b),_.delete(b);break;case i.EQUAL:b=Math.min(S.peekLength(),m.peekLength(),v);var O=S.next(b),I=m.next(b);o(O.insert,I.insert)?_.retain(b,u.attributes.diff(O.attributes,I.attributes)):_.push(I).delete(b);break}v-=b}}),_.chop()},h.prototype.eachLine=function(p,w){w=w||`
|
|
114
|
-
`;for(var d=u.iterator(this.ops),_=new h,E=0;d.hasNext();){if(d.peekType()!=="insert")return;var S=d.peek(),m=u.length(S)-d.peekLength(),g=typeof S.insert=="string"?S.insert.indexOf(w,m)-m:-1;if(g<0)_.push(d.next());else if(g>0)_.push(d.next(g));else{if(p(_,d.next(1).attributes||{},E)===!1)return;E+=1,_=new h}}_.length()>0&&p(_,{},E)},h.prototype.transform=function(p,w){if(w=!!w,typeof p=="number")return this.transformPosition(p,w);for(var d=u.iterator(this.ops),_=u.iterator(p.ops),E=new h;d.hasNext()||_.hasNext();)if(d.peekType()==="insert"&&(w||_.peekType()!=="insert"))E.retain(u.length(d.next()));else if(_.peekType()==="insert")E.push(_.next());else{var S=Math.min(d.peekLength(),_.peekLength()),m=d.next(S),g=_.next(S);if(m.delete)continue;g.delete?E.push(g):E.retain(S,u.attributes.transform(m.attributes,g.attributes,w))}return E.chop()},h.prototype.transformPosition=function(p,w){w=!!w;for(var d=u.iterator(this.ops),_=0;d.hasNext()&&_<=p;){var E=d.peekLength(),S=d.peekType();if(d.next(),S==="delete"){p-=Math.min(E,p-_);continue}else S==="insert"&&(_<p||!w)&&(p+=E);_+=E}return p},t.exports=h},function(t,n){var a=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(d){return typeof Array.isArray=="function"?Array.isArray(d):i.call(d)==="[object Array]"},c=function(d){if(!d||i.call(d)!=="[object Object]")return!1;var _=a.call(d,"constructor"),E=d.constructor&&d.constructor.prototype&&a.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!_&&!E)return!1;var S;for(S in d);return typeof S>"u"||a.call(d,S)},h=function(d,_){o&&_.name==="__proto__"?o(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},p=function(d,_){if(_==="__proto__")if(a.call(d,_)){if(l)return l(d,_).value}else return;return d[_]};t.exports=function w(){var d,_,E,S,m,g,v=arguments[0],b=1,O=arguments.length,I=!1;for(typeof v=="boolean"&&(I=v,v=arguments[1]||{},b=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});b<O;++b)if(d=arguments[b],d!=null)for(_ in d)E=p(v,_),S=p(d,_),v!==S&&(I&&S&&(c(S)||(m=u(S)))?(m?(m=!1,g=E&&u(E)?E:[]):g=E&&c(E)?E:{},h(v,{name:_,newValue:w(I,g,S)})):typeof S<"u"&&h(v,{name:_,newValue:S}));return v}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var i=function(){function x(L,A){for(var N=0;N<A.length;N++){var F=A[N];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(L,F.key,F)}}return function(L,A,N){return A&&x(L.prototype,A),N&&x(L,N),L}}(),o=function x(L,A,N){L===null&&(L=Function.prototype);var F=Object.getOwnPropertyDescriptor(L,A);if(F===void 0){var U=Object.getPrototypeOf(L);return U===null?void 0:x(U,A,N)}else{if("value"in F)return F.value;var W=F.get;return W===void 0?void 0:W.call(N)}},l=a(3),u=v(l),c=a(2),h=v(c),p=a(0),w=v(p),d=a(16),_=v(d),E=a(6),S=v(E),m=a(7),g=v(m);function v(x){return x&&x.__esModule?x:{default:x}}function b(x,L){if(!(x instanceof L))throw new TypeError("Cannot call a class as a function")}function O(x,L){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:x}function I(x,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);x.prototype=Object.create(L&&L.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(x,L):x.__proto__=L)}var T=1,M=function(x){I(L,x);function L(){return b(this,L),O(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return i(L,[{key:"attach",value:function(){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"attach",this).call(this),this.attributes=new w.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new h.default().insert(this.value(),(0,u.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(N,F){var U=w.default.query(N,w.default.Scope.BLOCK_ATTRIBUTE);U!=null&&this.attributes.attribute(U,F)}},{key:"formatAt",value:function(N,F,U,W){this.format(U,W)}},{key:"insertAt",value:function(N,F,U){if(typeof F=="string"&&F.endsWith(`
|
|
115
|
-
`)){var W=w.default.create(j.blotName);this.parent.insertBefore(W,N===0?this:this.next),W.insertAt(0,F.slice(0,-1))}else o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,N,F,U)}}]),L}(w.default.Embed);M.scope=w.default.Scope.BLOCK_BLOT;var j=function(x){I(L,x);function L(A){b(this,L);var N=O(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,A));return N.cache={},N}return i(L,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(w.default.Leaf).reduce(function(N,F){return F.length()===0?N:N.insert(F.value(),C(F))},new h.default).insert(`
|
|
116
|
-
`,C(this))),this.cache.delta}},{key:"deleteAt",value:function(N,F){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"deleteAt",this).call(this,N,F),this.cache={}}},{key:"formatAt",value:function(N,F,U,W){F<=0||(w.default.query(U,w.default.Scope.BLOCK)?N+F===this.length()&&this.format(U,W):o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"formatAt",this).call(this,N,Math.min(F,this.length()-N-1),U,W),this.cache={})}},{key:"insertAt",value:function(N,F,U){if(U!=null)return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,N,F,U);if(F.length!==0){var W=F.split(`
|
|
117
|
-
`),$=W.shift();$.length>0&&(N<this.length()-1||this.children.tail==null?o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,Math.min(N,this.length()-1),$):this.children.tail.insertAt(this.children.tail.length(),$),this.cache={});var Z=this;W.reduce(function(V,G){return Z=Z.split(V,!0),Z.insertAt(0,G),G.length},N+$.length)}}},{key:"insertBefore",value:function(N,F){var U=this.children.head;o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertBefore",this).call(this,N,F),U instanceof _.default&&U.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"length",this).call(this)+T),this.cache.length}},{key:"moveChildren",value:function(N,F){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"moveChildren",this).call(this,N,F),this.cache={}}},{key:"optimize",value:function(N){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,N),this.cache={}}},{key:"path",value:function(N){return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"path",this).call(this,N,!0)}},{key:"removeChild",value:function(N){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"removeChild",this).call(this,N),this.cache={}}},{key:"split",value:function(N){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(N===0||N>=this.length()-T)){var U=this.clone();return N===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var W=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"split",this).call(this,N,F);return this.cache={},W}}}]),L}(w.default.Block);j.blotName="block",j.tagName="P",j.defaultChild="break",j.allowedChildren=[S.default,w.default.Embed,g.default];function C(x){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return x==null||(typeof x.formats=="function"&&(L=(0,u.default)(L,x.formats())),x.parent==null||x.parent.blotName=="scroll"||x.parent.statics.scope!==x.statics.scope)?L:C(x.parent,L)}n.bubbleFormats=C,n.BlockEmbed=M,n.default=j},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},o=function(){function Z(V,G){var z=[],D=!0,K=!1,ne=void 0;try{for(var Q=V[Symbol.iterator](),ee;!(D=(ee=Q.next()).done)&&(z.push(ee.value),!(G&&z.length===G));D=!0);}catch(ae){K=!0,ne=ae}finally{try{!D&&Q.return&&Q.return()}finally{if(K)throw ne}}return z}return function(V,G){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return Z(V,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function Z(V,G){for(var z=0;z<G.length;z++){var D=G[z];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(V,D.key,D)}}return function(V,G,z){return G&&Z(V.prototype,G),z&&Z(V,z),V}}();a(50);var u=a(2),c=C(u),h=a(14),p=C(h),w=a(8),d=C(w),_=a(9),E=C(_),S=a(0),m=C(S),g=a(15),v=C(g),b=a(3),O=C(b),I=a(10),T=C(I),M=a(34),j=C(M);function C(Z){return Z&&Z.__esModule?Z:{default:Z}}function x(Z,V,G){return V in Z?Object.defineProperty(Z,V,{value:G,enumerable:!0,configurable:!0,writable:!0}):Z[V]=G,Z}function L(Z,V){if(!(Z instanceof V))throw new TypeError("Cannot call a class as a function")}var A=(0,T.default)("quill"),N=function(){l(Z,null,[{key:"debug",value:function(G){G===!0&&(G="log"),T.default.level(G)}},{key:"find",value:function(G){return G.__quill||m.default.find(G)}},{key:"import",value:function(G){return this.imports[G]==null&&A.error("Cannot import "+G+". Are you sure it was registered?"),this.imports[G]}},{key:"register",value:function(G,z){var D=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof G!="string"){var ne=G.attrName||G.blotName;typeof ne=="string"?this.register("formats/"+ne,G,z):Object.keys(G).forEach(function(Q){D.register(Q,G[Q],z)})}else this.imports[G]!=null&&!K&&A.warn("Overwriting "+G+" with",z),this.imports[G]=z,(G.startsWith("blots/")||G.startsWith("formats/"))&&z.blotName!=="abstract"?m.default.register(z):G.startsWith("modules")&&typeof z.register=="function"&&z.register()}}]);function Z(V){var G=this,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L(this,Z),this.options=F(V,z),this.container=this.options.container,this.container==null)return A.error("Invalid Quill container",V);this.options.debug&&Z.debug(this.options.debug);var D=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new d.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new v.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(d.default.events.EDITOR_CHANGE,function(ne){ne===d.default.events.TEXT_CHANGE&&G.root.classList.toggle("ql-blank",G.editor.isBlank())}),this.emitter.on(d.default.events.SCROLL_UPDATE,function(ne,Q){var ee=G.selection.lastRange,ae=ee&&ee.length===0?ee.index:void 0;U.call(G,function(){return G.editor.update(null,Q,ae)},ne)});var K=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+D+"<p><br></p></div>");this.setContents(K),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(Z,[{key:"addContainer",value:function(G){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof G=="string"){var D=G;G=document.createElement("div"),G.classList.add(D)}return this.container.insertBefore(G,z),G}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(G,z,D){var K=this,ne=W(G,z,D),Q=o(ne,4);return G=Q[0],z=Q[1],D=Q[3],U.call(this,function(){return K.editor.deleteText(G,z)},D,G,-1*z)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(G),this.container.classList.toggle("ql-disabled",!G)}},{key:"focus",value:function(){var G=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=G,this.scrollIntoView()}},{key:"format",value:function(G,z){var D=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;return U.call(this,function(){var ne=D.getSelection(!0),Q=new c.default;if(ne==null)return Q;if(m.default.query(G,m.default.Scope.BLOCK))Q=D.editor.formatLine(ne.index,ne.length,x({},G,z));else{if(ne.length===0)return D.selection.format(G,z),Q;Q=D.editor.formatText(ne.index,ne.length,x({},G,z))}return D.setSelection(ne,d.default.sources.SILENT),Q},K)}},{key:"formatLine",value:function(G,z,D,K,ne){var Q=this,ee=void 0,ae=W(G,z,D,K,ne),se=o(ae,4);return G=se[0],z=se[1],ee=se[2],ne=se[3],U.call(this,function(){return Q.editor.formatLine(G,z,ee)},ne,G,0)}},{key:"formatText",value:function(G,z,D,K,ne){var Q=this,ee=void 0,ae=W(G,z,D,K,ne),se=o(ae,4);return G=se[0],z=se[1],ee=se[2],ne=se[3],U.call(this,function(){return Q.editor.formatText(G,z,ee)},ne,G,0)}},{key:"getBounds",value:function(G){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=void 0;typeof G=="number"?D=this.selection.getBounds(G,z):D=this.selection.getBounds(G.index,G.length);var K=this.container.getBoundingClientRect();return{bottom:D.bottom-K.top,height:D.height,left:D.left-K.left,right:D.right-K.left,top:D.top-K.top,width:D.width}}},{key:"getContents",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-G,D=W(G,z),K=o(D,2);return G=K[0],z=K[1],this.editor.getContents(G,z)}},{key:"getFormat",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof G=="number"?this.editor.getFormat(G,z):this.editor.getFormat(G.index,G.length)}},{key:"getIndex",value:function(G){return G.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(G){return this.scroll.leaf(G)}},{key:"getLine",value:function(G){return this.scroll.line(G)}},{key:"getLines",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof G!="number"?this.scroll.lines(G.index,G.length):this.scroll.lines(G,z)}},{key:"getModule",value:function(G){return this.theme.modules[G]}},{key:"getSelection",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return G&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-G,D=W(G,z),K=o(D,2);return G=K[0],z=K[1],this.editor.getText(G,z)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(G,z,D){var K=this,ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Z.sources.API;return U.call(this,function(){return K.editor.insertEmbed(G,z,D)},ne,G)}},{key:"insertText",value:function(G,z,D,K,ne){var Q=this,ee=void 0,ae=W(G,0,D,K,ne),se=o(ae,4);return G=se[0],ee=se[2],ne=se[3],U.call(this,function(){return Q.editor.insertText(G,z,ee)},ne,G,z.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(G,z,D){this.clipboard.dangerouslyPasteHTML(G,z,D)}},{key:"removeFormat",value:function(G,z,D){var K=this,ne=W(G,z,D),Q=o(ne,4);return G=Q[0],z=Q[1],D=Q[3],U.call(this,function(){return K.editor.removeFormat(G,z)},D,G)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(G){var z=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return U.call(this,function(){G=new c.default(G);var K=z.getLength(),ne=z.editor.deleteText(0,K),Q=z.editor.applyDelta(G),ee=Q.ops[Q.ops.length-1];ee!=null&&typeof ee.insert=="string"&&ee.insert[ee.insert.length-1]===`
|
|
118
|
-
`&&(z.editor.deleteText(z.getLength()-1,1),Q.delete(1));var ae=ne.compose(Q);return ae},D)}},{key:"setSelection",value:function(G,z,D){if(G==null)this.selection.setRange(null,z||Z.sources.API);else{var K=W(G,z,D),ne=o(K,4);G=ne[0],z=ne[1],D=ne[3],this.selection.setRange(new g.Range(G,z),D),D!==d.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(G){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API,D=new c.default().insert(G);return this.setContents(D,z)}},{key:"update",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,z=this.scroll.update(G);return this.selection.update(G),z}},{key:"updateContents",value:function(G){var z=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return U.call(this,function(){return G=new c.default(G),z.editor.applyDelta(G,D)},D,!0)}}]),Z}();N.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},N.events=d.default.events,N.sources=d.default.sources,N.version="1.3.7",N.imports={delta:c.default,parchment:m.default,"core/module":E.default,"core/theme":j.default};function F(Z,V){if(V=(0,O.default)(!0,{container:Z,modules:{clipboard:!0,keyboard:!0,history:!0}},V),!V.theme||V.theme===N.DEFAULTS.theme)V.theme=j.default;else if(V.theme=N.import("themes/"+V.theme),V.theme==null)throw new Error("Invalid theme "+V.theme+". Did you register it?");var G=(0,O.default)(!0,{},V.theme.DEFAULTS);[G,V].forEach(function(K){K.modules=K.modules||{},Object.keys(K.modules).forEach(function(ne){K.modules[ne]===!0&&(K.modules[ne]={})})});var z=Object.keys(G.modules).concat(Object.keys(V.modules)),D=z.reduce(function(K,ne){var Q=N.import("modules/"+ne);return Q==null?A.error("Cannot load "+ne+" module. Are you sure you registered it?"):K[ne]=Q.DEFAULTS||{},K},{});return V.modules!=null&&V.modules.toolbar&&V.modules.toolbar.constructor!==Object&&(V.modules.toolbar={container:V.modules.toolbar}),V=(0,O.default)(!0,{},N.DEFAULTS,{modules:D},G,V),["bounds","container","scrollingContainer"].forEach(function(K){typeof V[K]=="string"&&(V[K]=document.querySelector(V[K]))}),V.modules=Object.keys(V.modules).reduce(function(K,ne){return V.modules[ne]&&(K[ne]=V.modules[ne]),K},{}),V}function U(Z,V,G,z){if(this.options.strict&&!this.isEnabled()&&V===d.default.sources.USER)return new c.default;var D=G==null?null:this.getSelection(),K=this.editor.delta,ne=Z();if(D!=null&&(G===!0&&(G=D.index),z==null?D=$(D,ne,V):z!==0&&(D=$(D,G,z,V)),this.setSelection(D,d.default.sources.SILENT)),ne.length()>0){var Q,ee=[d.default.events.TEXT_CHANGE,ne,K,V];if((Q=this.emitter).emit.apply(Q,[d.default.events.EDITOR_CHANGE].concat(ee)),V!==d.default.sources.SILENT){var ae;(ae=this.emitter).emit.apply(ae,ee)}}return ne}function W(Z,V,G,z,D){var K={};return typeof Z.index=="number"&&typeof Z.length=="number"?typeof V!="number"?(D=z,z=G,G=V,V=Z.length,Z=Z.index):(V=Z.length,Z=Z.index):typeof V!="number"&&(D=z,z=G,G=V,V=0),(typeof G>"u"?"undefined":i(G))==="object"?(K=G,D=z):typeof G=="string"&&(z!=null?K[G]=z:D=G),D=D||d.default.sources.API,[Z,V,K,D]}function $(Z,V,G,z){if(Z==null)return null;var D=void 0,K=void 0;if(V instanceof c.default){var ne=[Z.index,Z.index+Z.length].map(function(se){return V.transformPosition(se,z!==d.default.sources.USER)}),Q=o(ne,2);D=Q[0],K=Q[1]}else{var ee=[Z.index,Z.index+Z.length].map(function(se){return se<V||se===V&&z===d.default.sources.USER?se:G>=0?se+G:Math.max(V,se+G)}),ae=o(ee,2);D=ae[0],K=ae[1]}return new g.Range(D,K-D)}n.expandConfig=F,n.overload=W,n.default=N},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function S(m,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,v){return g&&S(m.prototype,g),v&&S(m,v),m}}(),o=function S(m,g,v){m===null&&(m=Function.prototype);var b=Object.getOwnPropertyDescriptor(m,g);if(b===void 0){var O=Object.getPrototypeOf(m);return O===null?void 0:S(O,g,v)}else{if("value"in b)return b.value;var I=b.get;return I===void 0?void 0:I.call(v)}},l=a(7),u=p(l),c=a(0),h=p(c);function p(S){return S&&S.__esModule?S:{default:S}}function w(S,m){if(!(S instanceof m))throw new TypeError("Cannot call a class as a function")}function d(S,m){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:S}function _(S,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);S.prototype=Object.create(m&&m.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(S,m):S.__proto__=m)}var E=function(S){_(m,S);function m(){return w(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"formatAt",value:function(v,b,O,I){if(m.compare(this.statics.blotName,O)<0&&h.default.query(O,h.default.Scope.BLOT)){var T=this.isolate(v,b);I&&T.wrap(O,I)}else o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,v,b,O,I)}},{key:"optimize",value:function(v){if(o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,v),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var b=this.parent.isolate(this.offset(),this.length());this.moveChildren(b),b.wrap(this)}}}],[{key:"compare",value:function(v,b){var O=m.order.indexOf(v),I=m.order.indexOf(b);return O>=0||I>=0?O-I:v===b?0:v<b?-1:1}}]),m}(h.default.Inline);E.allowedChildren=[E,h.default.Embed,u.default],E.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function c(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function h(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var p=function(w){h(d,w);function d(){return u(this,d),c(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(o.default.Text);n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function g(v,b){for(var O=0;O<b.length;O++){var I=b[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(v,I.key,I)}}return function(v,b,O){return b&&g(v.prototype,b),O&&g(v,O),v}}(),o=function g(v,b,O){v===null&&(v=Function.prototype);var I=Object.getOwnPropertyDescriptor(v,b);if(I===void 0){var T=Object.getPrototypeOf(v);return T===null?void 0:g(T,b,O)}else{if("value"in I)return I.value;var M=I.get;return M===void 0?void 0:M.call(O)}},l=a(54),u=p(l),c=a(10),h=p(c);function p(g){return g&&g.__esModule?g:{default:g}}function w(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function d(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function _(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var E=(0,h.default)("quill:events"),S=["selectionchange","mousedown","mouseup","click"];S.forEach(function(g){document.addEventListener(g,function(){for(var v=arguments.length,b=Array(v),O=0;O<v;O++)b[O]=arguments[O];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var T;(T=I.__quill.emitter).handleDOM.apply(T,b)}})})});var m=function(g){_(v,g);function v(){w(this,v);var b=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return b.listeners={},b.on("error",E.error),b}return i(v,[{key:"emit",value:function(){E.log.apply(E,arguments),o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(O){for(var I=arguments.length,T=Array(I>1?I-1:0),M=1;M<I;M++)T[M-1]=arguments[M];(this.listeners[O.type]||[]).forEach(function(j){var C=j.node,x=j.handler;(O.target===C||C.contains(O.target))&&x.apply(void 0,[O].concat(T))})}},{key:"listenDOM",value:function(O,I,T){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push({node:I,handler:T})}}]),v}(u.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var o=function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,l),this.quill=u,this.options=c};o.DEFAULTS={},n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function l(c){if(i.indexOf(c)<=i.indexOf(o)){for(var h,p=arguments.length,w=Array(p>1?p-1:0),d=1;d<p;d++)w[d-1]=arguments[d];(h=console)[c].apply(h,w)}}function u(c){return i.reduce(function(h,p){return h[p]=l.bind(console,p,c),h},{})}l.level=u.level=function(c){o=c},n.default=u},function(t,n,a){var i=Array.prototype.slice,o=a(52),l=a(53),u=t.exports=function(w,d,_){return _||(_={}),w===d?!0:w instanceof Date&&d instanceof Date?w.getTime()===d.getTime():!w||!d||typeof w!="object"&&typeof d!="object"?_.strict?w===d:w==d:p(w,d,_)};function c(w){return w==null}function h(w){return!(!w||typeof w!="object"||typeof w.length!="number"||typeof w.copy!="function"||typeof w.slice!="function"||w.length>0&&typeof w[0]!="number")}function p(w,d,_){var E,S;if(c(w)||c(d)||w.prototype!==d.prototype)return!1;if(l(w))return l(d)?(w=i.call(w),d=i.call(d),u(w,d,_)):!1;if(h(w)){if(!h(d)||w.length!==d.length)return!1;for(E=0;E<w.length;E++)if(w[E]!==d[E])return!1;return!0}try{var m=o(w),g=o(d)}catch{return!1}if(m.length!=g.length)return!1;for(m.sort(),g.sort(),E=m.length-1;E>=0;E--)if(m[E]!=g[E])return!1;for(E=m.length-1;E>=0;E--)if(S=m[E],!u(w[S],d[S],_))return!1;return typeof w==typeof d}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(1),o=function(){function l(u,c,h){h===void 0&&(h={}),this.attrName=u,this.keyName=c;var p=i.Scope.TYPE&i.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&i.Scope.LEVEL|p:this.scope=i.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return l.keys=function(u){return[].map.call(u.attributes,function(c){return c.name})},l.prototype.add=function(u,c){return this.canAdd(u,c)?(u.setAttribute(this.keyName,c),!0):!1},l.prototype.canAdd=function(u,c){var h=i.query(u,i.Scope.BLOT&(this.scope|i.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof c=="string"?this.whitelist.indexOf(c.replace(/["']/g,""))>-1:this.whitelist.indexOf(c)>-1},l.prototype.remove=function(u){u.removeAttribute(this.keyName)},l.prototype.value=function(u){var c=u.getAttribute(this.keyName);return this.canAdd(u,c)&&c?c:""},l}();n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var i=function(){function M(j,C){var x=[],L=!0,A=!1,N=void 0;try{for(var F=j[Symbol.iterator](),U;!(L=(U=F.next()).done)&&(x.push(U.value),!(C&&x.length===C));L=!0);}catch(W){A=!0,N=W}finally{try{!L&&F.return&&F.return()}finally{if(A)throw N}}return x}return function(j,C){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function M(j,C){for(var x=0;x<C.length;x++){var L=C[x];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(j,L.key,L)}}return function(j,C,x){return C&&M(j.prototype,C),x&&M(j,x),j}}(),l=function M(j,C,x){j===null&&(j=Function.prototype);var L=Object.getOwnPropertyDescriptor(j,C);if(L===void 0){var A=Object.getPrototypeOf(j);return A===null?void 0:M(A,C,x)}else{if("value"in L)return L.value;var N=L.get;return N===void 0?void 0:N.call(x)}},u=a(2),c=g(u),h=a(0),p=g(h),w=a(4),d=g(w),_=a(6),E=g(_),S=a(7),m=g(S);function g(M){return M&&M.__esModule?M:{default:M}}function v(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")}function b(M,j){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:M}function O(M,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);M.prototype=Object.create(j&&j.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(M,j):M.__proto__=j)}var I=function(M){O(j,M);function j(){return v(this,j),b(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return j}(E.default);I.blotName="code",I.tagName="CODE";var T=function(M){O(j,M);function j(){return v(this,j),b(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return o(j,[{key:"delta",value:function(){var x=this,L=this.domNode.textContent;return L.endsWith(`
|
|
119
|
-
`)&&(L=L.slice(0,-1)),L.split(`
|
|
120
|
-
`).reduce(function(A,N){return A.insert(N).insert(`
|
|
121
|
-
`,x.formats())},new c.default)}},{key:"format",value:function(x,L){if(!(x===this.statics.blotName&&L)){var A=this.descendant(m.default,this.length()-1),N=i(A,1),F=N[0];F!=null&&F.deleteAt(F.length()-1,1),l(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,x,L)}}},{key:"formatAt",value:function(x,L,A,N){if(L!==0&&!(p.default.query(A,p.default.Scope.BLOCK)==null||A===this.statics.blotName&&N===this.statics.formats(this.domNode))){var F=this.newlineIndex(x);if(!(F<0||F>=x+L)){var U=this.newlineIndex(x,!0)+1,W=F-U+1,$=this.isolate(U,W),Z=$.next;$.format(A,N),Z instanceof j&&Z.formatAt(0,x-U+L-W,A,N)}}}},{key:"insertAt",value:function(x,L,A){if(A==null){var N=this.descendant(m.default,x),F=i(N,2),U=F[0],W=F[1];U.insertAt(W,L)}}},{key:"length",value:function(){var x=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?x:x+1}},{key:"newlineIndex",value:function(x){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(L)return this.domNode.textContent.slice(0,x).lastIndexOf(`
|
|
123
|
-
`);var A=this.domNode.textContent.slice(x).indexOf(`
|
|
124
|
-
`);return A>-1?x+A:-1}},{key:"optimize",value:function(x){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(p.default.create("text",`
|
|
126
|
-
`)),l(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"optimize",this).call(this,x);var L=this.next;L!=null&&L.prev===this&&L.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===L.statics.formats(L.domNode)&&(L.optimize(x),L.moveChildren(this),L.remove())}},{key:"replace",value:function(x){l(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"replace",this).call(this,x),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(L){var A=p.default.find(L);A==null?L.parentNode.removeChild(L):A instanceof p.default.Embed?A.remove():A.unwrap()})}}],[{key:"create",value:function(x){var L=l(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,x);return L.setAttribute("spellcheck",!1),L}},{key:"formats",value:function(){return!0}}]),j}(d.default);T.blotName="code-block",T.tagName="PRE",T.TAB=" ",n.Code=I,n.default=T},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},o=function(){function Z(V,G){var z=[],D=!0,K=!1,ne=void 0;try{for(var Q=V[Symbol.iterator](),ee;!(D=(ee=Q.next()).done)&&(z.push(ee.value),!(G&&z.length===G));D=!0);}catch(ae){K=!0,ne=ae}finally{try{!D&&Q.return&&Q.return()}finally{if(K)throw ne}}return z}return function(V,G){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return Z(V,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function Z(V,G){for(var z=0;z<G.length;z++){var D=G[z];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(V,D.key,D)}}return function(V,G,z){return G&&Z(V.prototype,G),z&&Z(V,z),V}}(),u=a(2),c=L(u),h=a(20),p=L(h),w=a(0),d=L(w),_=a(13),E=L(_),S=a(24),m=L(S),g=a(4),v=L(g),b=a(16),O=L(b),I=a(21),T=L(I),M=a(11),j=L(M),C=a(3),x=L(C);function L(Z){return Z&&Z.__esModule?Z:{default:Z}}function A(Z,V,G){return V in Z?Object.defineProperty(Z,V,{value:G,enumerable:!0,configurable:!0,writable:!0}):Z[V]=G,Z}function N(Z,V){if(!(Z instanceof V))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,U=function(){function Z(V){N(this,Z),this.scroll=V,this.delta=this.getDelta()}return l(Z,[{key:"applyDelta",value:function(G){var z=this,D=!1;this.scroll.update();var K=this.scroll.length();return this.scroll.batchStart(),G=$(G),G.reduce(function(ne,Q){var ee=Q.retain||Q.delete||Q.insert.length||1,ae=Q.attributes||{};if(Q.insert!=null){if(typeof Q.insert=="string"){var se=Q.insert;se.endsWith(`
|
|
127
|
-
`)&&D&&(D=!1,se=se.slice(0,-1)),ne>=K&&!se.endsWith(`
|
|
128
|
-
`)&&(D=!0),z.scroll.insertAt(ne,se);var ce=z.scroll.line(ne),me=o(ce,2),Se=me[0],Oe=me[1],Ne=(0,x.default)({},(0,g.bubbleFormats)(Se));if(Se instanceof v.default){var xe=Se.descendant(d.default.Leaf,Oe),ve=o(xe,1),Xe=ve[0];Ne=(0,x.default)(Ne,(0,g.bubbleFormats)(Xe))}ae=p.default.attributes.diff(Ne,ae)||{}}else if(i(Q.insert)==="object"){var be=Object.keys(Q.insert)[0];if(be==null)return ne;z.scroll.insertAt(ne,be,Q.insert[be])}K+=ee}return Object.keys(ae).forEach(function(Ae){z.scroll.formatAt(ne,ee,Ae,ae[Ae])}),ne+ee},0),G.reduce(function(ne,Q){return typeof Q.delete=="number"?(z.scroll.deleteAt(ne,Q.delete),ne):ne+(Q.retain||Q.insert.length||1)},0),this.scroll.batchEnd(),this.update(G)}},{key:"deleteText",value:function(G,z){return this.scroll.deleteAt(G,z),this.update(new c.default().retain(G).delete(z))}},{key:"formatLine",value:function(G,z){var D=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(K).forEach(function(ne){if(!(D.scroll.whitelist!=null&&!D.scroll.whitelist[ne])){var Q=D.scroll.lines(G,Math.max(z,1)),ee=z;Q.forEach(function(ae){var se=ae.length();if(!(ae instanceof E.default))ae.format(ne,K[ne]);else{var ce=G-ae.offset(D.scroll),me=ae.newlineIndex(ce+ee)-ce+1;ae.formatAt(ce,me,ne,K[ne])}ee-=se})}}),this.scroll.optimize(),this.update(new c.default().retain(G).retain(z,(0,T.default)(K)))}},{key:"formatText",value:function(G,z){var D=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(K).forEach(function(ne){D.scroll.formatAt(G,z,ne,K[ne])}),this.update(new c.default().retain(G).retain(z,(0,T.default)(K)))}},{key:"getContents",value:function(G,z){return this.delta.slice(G,G+z)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(G,z){return G.concat(z.delta())},new c.default)}},{key:"getFormat",value:function(G){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=[],K=[];z===0?this.scroll.path(G).forEach(function(Q){var ee=o(Q,1),ae=ee[0];ae instanceof v.default?D.push(ae):ae instanceof d.default.Leaf&&K.push(ae)}):(D=this.scroll.lines(G,z),K=this.scroll.descendants(d.default.Leaf,G,z));var ne=[D,K].map(function(Q){if(Q.length===0)return{};for(var ee=(0,g.bubbleFormats)(Q.shift());Object.keys(ee).length>0;){var ae=Q.shift();if(ae==null)return ee;ee=W((0,g.bubbleFormats)(ae),ee)}return ee});return x.default.apply(x.default,ne)}},{key:"getText",value:function(G,z){return this.getContents(G,z).filter(function(D){return typeof D.insert=="string"}).map(function(D){return D.insert}).join("")}},{key:"insertEmbed",value:function(G,z,D){return this.scroll.insertAt(G,z,D),this.update(new c.default().retain(G).insert(A({},z,D)))}},{key:"insertText",value:function(G,z){var D=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return z=z.replace(/\r\n/g,`
|
|
129
|
-
`).replace(/\r/g,`
|
|
130
|
-
`),this.scroll.insertAt(G,z),Object.keys(K).forEach(function(ne){D.scroll.formatAt(G,z.length,ne,K[ne])}),this.update(new c.default().retain(G).insert(z,(0,T.default)(K)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var G=this.scroll.children.head;return G.statics.blotName!==v.default.blotName||G.children.length>1?!1:G.children.head instanceof O.default}},{key:"removeFormat",value:function(G,z){var D=this.getText(G,z),K=this.scroll.line(G+z),ne=o(K,2),Q=ne[0],ee=ne[1],ae=0,se=new c.default;Q!=null&&(Q instanceof E.default?ae=Q.newlineIndex(ee)-ee+1:ae=Q.length()-ee,se=Q.delta().slice(ee,ee+ae-1).insert(`
|
|
131
|
-
`));var ce=this.getContents(G,z+ae),me=ce.diff(new c.default().insert(D).concat(se)),Se=new c.default().retain(G).concat(me);return this.applyDelta(Se)}},{key:"update",value:function(G){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,K=this.delta;if(z.length===1&&z[0].type==="characterData"&&z[0].target.data.match(F)&&d.default.find(z[0].target)){var ne=d.default.find(z[0].target),Q=(0,g.bubbleFormats)(ne),ee=ne.offset(this.scroll),ae=z[0].oldValue.replace(m.default.CONTENTS,""),se=new c.default().insert(ae),ce=new c.default().insert(ne.value()),me=new c.default().retain(ee).concat(se.diff(ce,D));G=me.reduce(function(Se,Oe){return Oe.insert?Se.insert(Oe.insert,Q):Se.push(Oe)},new c.default),this.delta=K.compose(G)}else this.delta=this.getDelta(),(!G||!(0,j.default)(K.compose(G),this.delta))&&(G=K.diff(this.delta,D));return G}}]),Z}();function W(Z,V){return Object.keys(V).reduce(function(G,z){return Z[z]==null||(V[z]===Z[z]?G[z]=V[z]:Array.isArray(V[z])?V[z].indexOf(Z[z])<0&&(G[z]=V[z].concat([Z[z]])):G[z]=[V[z],Z[z]]),G},{})}function $(Z){return Z.reduce(function(V,G){if(G.insert===1){var z=(0,T.default)(G.attributes);return delete z.image,V.insert({image:G.attributes.image},z)}if(G.attributes!=null&&(G.attributes.list===!0||G.attributes.bullet===!0)&&(G=(0,T.default)(G),G.attributes.list?G.attributes.list="ordered":(G.attributes.list="bullet",delete G.attributes.bullet)),typeof G.insert=="string"){var D=G.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return V.insert(D,G.attributes)}return V.push(G)},new c.default)}n.default=U},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var i=function(){function M(j,C){var x=[],L=!0,A=!1,N=void 0;try{for(var F=j[Symbol.iterator](),U;!(L=(U=F.next()).done)&&(x.push(U.value),!(C&&x.length===C));L=!0);}catch(W){A=!0,N=W}finally{try{!L&&F.return&&F.return()}finally{if(A)throw N}}return x}return function(j,C){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function M(j,C){for(var x=0;x<C.length;x++){var L=C[x];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(j,L.key,L)}}return function(j,C,x){return C&&M(j.prototype,C),x&&M(j,x),j}}(),l=a(0),u=m(l),c=a(21),h=m(c),p=a(11),w=m(p),d=a(8),_=m(d),E=a(10),S=m(E);function m(M){return M&&M.__esModule?M:{default:M}}function g(M){if(Array.isArray(M)){for(var j=0,C=Array(M.length);j<M.length;j++)C[j]=M[j];return C}else return Array.from(M)}function v(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")}var b=(0,S.default)("quill:selection"),O=function M(j){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;v(this,M),this.index=j,this.length=C},I=function(){function M(j,C){var x=this;v(this,M),this.emitter=C,this.scroll=j,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new O(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){x.mouseDown||setTimeout(x.update.bind(x,_.default.sources.USER),1)}),this.emitter.on(_.default.events.EDITOR_CHANGE,function(L,A){L===_.default.events.TEXT_CHANGE&&A.length()>0&&x.update(_.default.sources.SILENT)}),this.emitter.on(_.default.events.SCROLL_BEFORE_UPDATE,function(){if(x.hasFocus()){var L=x.getNativeRange();L!=null&&L.start.node!==x.cursor.textNode&&x.emitter.once(_.default.events.SCROLL_UPDATE,function(){try{x.setNativeRange(L.start.node,L.start.offset,L.end.node,L.end.offset)}catch{}})}}),this.emitter.on(_.default.events.SCROLL_OPTIMIZE,function(L,A){if(A.range){var N=A.range,F=N.startNode,U=N.startOffset,W=N.endNode,$=N.endOffset;x.setNativeRange(F,U,W,$)}}),this.update(_.default.sources.SILENT)}return o(M,[{key:"handleComposition",value:function(){var C=this;this.root.addEventListener("compositionstart",function(){C.composing=!0}),this.root.addEventListener("compositionend",function(){if(C.composing=!1,C.cursor.parent){var x=C.cursor.restore();if(!x)return;setTimeout(function(){C.setNativeRange(x.startNode,x.startOffset,x.endNode,x.endOffset)},1)}})}},{key:"handleDragging",value:function(){var C=this;this.emitter.listenDOM("mousedown",document.body,function(){C.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){C.mouseDown=!1,C.update(_.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(C,x){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[C])){this.scroll.update();var L=this.getNativeRange();if(!(L==null||!L.native.collapsed||u.default.query(C,u.default.Scope.BLOCK))){if(L.start.node!==this.cursor.textNode){var A=u.default.find(L.start.node,!1);if(A==null)return;if(A instanceof u.default.Leaf){var N=A.split(L.start.offset);A.parent.insertBefore(this.cursor,N)}else A.insertBefore(this.cursor,L.start.node);this.cursor.attach()}this.cursor.format(C,x),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(C){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=this.scroll.length();C=Math.min(C,L-1),x=Math.min(C+x,L-1)-C;var A=void 0,N=this.scroll.leaf(C),F=i(N,2),U=F[0],W=F[1];if(U==null)return null;var $=U.position(W,!0),Z=i($,2);A=Z[0],W=Z[1];var V=document.createRange();if(x>0){V.setStart(A,W);var G=this.scroll.leaf(C+x),z=i(G,2);if(U=z[0],W=z[1],U==null)return null;var D=U.position(W,!0),K=i(D,2);return A=K[0],W=K[1],V.setEnd(A,W),V.getBoundingClientRect()}else{var ne="left",Q=void 0;return A instanceof Text?(W<A.data.length?(V.setStart(A,W),V.setEnd(A,W+1)):(V.setStart(A,W-1),V.setEnd(A,W),ne="right"),Q=V.getBoundingClientRect()):(Q=U.domNode.getBoundingClientRect(),W>0&&(ne="right")),{bottom:Q.top+Q.height,height:Q.height,left:Q[ne],right:Q[ne],top:Q.top,width:0}}}},{key:"getNativeRange",value:function(){var C=document.getSelection();if(C==null||C.rangeCount<=0)return null;var x=C.getRangeAt(0);if(x==null)return null;var L=this.normalizeNative(x);return b.info("getNativeRange",L),L}},{key:"getRange",value:function(){var C=this.getNativeRange();if(C==null)return[null,null];var x=this.normalizedToRange(C);return[x,C]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(C){var x=this,L=[[C.start.node,C.start.offset]];C.native.collapsed||L.push([C.end.node,C.end.offset]);var A=L.map(function(U){var W=i(U,2),$=W[0],Z=W[1],V=u.default.find($,!0),G=V.offset(x.scroll);return Z===0?G:V instanceof u.default.Container?G+V.length():G+V.index($,Z)}),N=Math.min(Math.max.apply(Math,g(A)),this.scroll.length()-1),F=Math.min.apply(Math,[N].concat(g(A)));return new O(F,N-F)}},{key:"normalizeNative",value:function(C){if(!T(this.root,C.startContainer)||!C.collapsed&&!T(this.root,C.endContainer))return null;var x={start:{node:C.startContainer,offset:C.startOffset},end:{node:C.endContainer,offset:C.endOffset},native:C};return[x.start,x.end].forEach(function(L){for(var A=L.node,N=L.offset;!(A instanceof Text)&&A.childNodes.length>0;)if(A.childNodes.length>N)A=A.childNodes[N],N=0;else if(A.childNodes.length===N)A=A.lastChild,N=A instanceof Text?A.data.length:A.childNodes.length+1;else break;L.node=A,L.offset=N}),x}},{key:"rangeToNative",value:function(C){var x=this,L=C.collapsed?[C.index]:[C.index,C.index+C.length],A=[],N=this.scroll.length();return L.forEach(function(F,U){F=Math.min(N-1,F);var W=void 0,$=x.scroll.leaf(F),Z=i($,2),V=Z[0],G=Z[1],z=V.position(G,U!==0),D=i(z,2);W=D[0],G=D[1],A.push(W,G)}),A.length<2&&(A=A.concat(A)),A}},{key:"scrollIntoView",value:function(C){var x=this.lastRange;if(x!=null){var L=this.getBounds(x.index,x.length);if(L!=null){var A=this.scroll.length()-1,N=this.scroll.line(Math.min(x.index,A)),F=i(N,1),U=F[0],W=U;if(x.length>0){var $=this.scroll.line(Math.min(x.index+x.length,A)),Z=i($,1);W=Z[0]}if(!(U==null||W==null)){var V=C.getBoundingClientRect();L.top<V.top?C.scrollTop-=V.top-L.top:L.bottom>V.bottom&&(C.scrollTop+=L.bottom-V.bottom)}}}}},{key:"setNativeRange",value:function(C,x){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:x,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(b.info("setNativeRange",C,x,L,A),!(C!=null&&(this.root.parentNode==null||C.parentNode==null||L.parentNode==null))){var F=document.getSelection();if(F!=null)if(C!=null){this.hasFocus()||this.root.focus();var U=(this.getNativeRange()||{}).native;if(U==null||N||C!==U.startContainer||x!==U.startOffset||L!==U.endContainer||A!==U.endOffset){C.tagName=="BR"&&(x=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode),L.tagName=="BR"&&(A=[].indexOf.call(L.parentNode.childNodes,L),L=L.parentNode);var W=document.createRange();W.setStart(C,x),W.setEnd(L,A),F.removeAllRanges(),F.addRange(W)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(C){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof x=="string"&&(L=x,x=!1),b.info("setRange",C),C!=null){var A=this.rangeToNative(C);this.setNativeRange.apply(this,g(A).concat([x]))}else this.setNativeRange(null);this.update(L)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_.default.sources.USER,x=this.lastRange,L=this.getRange(),A=i(L,2),N=A[0],F=A[1];if(this.lastRange=N,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,w.default)(x,this.lastRange)){var U;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var W=[_.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(x),C];if((U=this.emitter).emit.apply(U,[_.default.events.EDITOR_CHANGE].concat(W)),C!==_.default.sources.SILENT){var $;($=this.emitter).emit.apply($,W)}}}}]),M}();function T(M,j){try{j.parentNode}catch{return!1}return j instanceof Text&&(j=j.parentNode),M.contains(j)}n.Range=O,n.default=I},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(E,S){for(var m=0;m<S.length;m++){var g=S[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}return function(E,S,m){return S&&_(E.prototype,S),m&&_(E,m),E}}(),o=function _(E,S,m){E===null&&(E=Function.prototype);var g=Object.getOwnPropertyDescriptor(E,S);if(g===void 0){var v=Object.getPrototypeOf(E);return v===null?void 0:_(v,S,m)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(m)}},l=a(0),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(){return h(this,E),p(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return i(E,[{key:"insertInto",value:function(m,g){m.children.length===0?o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertInto",this).call(this,m,g):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),E}(u.default.Embed);d.blotName="break",d.tagName="BR",n.default=d},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,d){w.__proto__=d}||function(w,d){for(var _ in d)d.hasOwnProperty(_)&&(w[_]=d[_])};return function(w,d){p(w,d);function _(){this.constructor=w}w.prototype=d===null?Object.create(d):(_.prototype=d.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(44),l=a(30),u=a(1),c=function(p){i(w,p);function w(d){var _=p.call(this,d)||this;return _.build(),_}return w.prototype.appendChild=function(d){this.insertBefore(d)},w.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(d){d.attach()})},w.prototype.build=function(){var d=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(_){try{var E=h(_);d.insertBefore(E,d.children.head||void 0)}catch(S){if(S instanceof u.ParchmentError)return;throw S}})},w.prototype.deleteAt=function(d,_){if(d===0&&_===this.length())return this.remove();this.children.forEachAt(d,_,function(E,S,m){E.deleteAt(S,m)})},w.prototype.descendant=function(d,_){var E=this.children.find(_),S=E[0],m=E[1];return d.blotName==null&&d(S)||d.blotName!=null&&S instanceof d?[S,m]:S instanceof w?S.descendant(d,m):[null,-1]},w.prototype.descendants=function(d,_,E){_===void 0&&(_=0),E===void 0&&(E=Number.MAX_VALUE);var S=[],m=E;return this.children.forEachAt(_,E,function(g,v,b){(d.blotName==null&&d(g)||d.blotName!=null&&g instanceof d)&&S.push(g),g instanceof w&&(S=S.concat(g.descendants(d,v,m))),m-=b}),S},w.prototype.detach=function(){this.children.forEach(function(d){d.detach()}),p.prototype.detach.call(this)},w.prototype.formatAt=function(d,_,E,S){this.children.forEachAt(d,_,function(m,g,v){m.formatAt(g,v,E,S)})},w.prototype.insertAt=function(d,_,E){var S=this.children.find(d),m=S[0],g=S[1];if(m)m.insertAt(g,_,E);else{var v=E==null?u.create("text",_):u.create(_,E);this.appendChild(v)}},w.prototype.insertBefore=function(d,_){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(E){return d instanceof E}))throw new u.ParchmentError("Cannot insert "+d.statics.blotName+" into "+this.statics.blotName);d.insertInto(this,_)},w.prototype.length=function(){return this.children.reduce(function(d,_){return d+_.length()},0)},w.prototype.moveChildren=function(d,_){this.children.forEach(function(E){d.insertBefore(E,_)})},w.prototype.optimize=function(d){if(p.prototype.optimize.call(this,d),this.children.length===0)if(this.statics.defaultChild!=null){var _=u.create(this.statics.defaultChild);this.appendChild(_),_.optimize(d)}else this.remove()},w.prototype.path=function(d,_){_===void 0&&(_=!1);var E=this.children.find(d,_),S=E[0],m=E[1],g=[[this,d]];return S instanceof w?g.concat(S.path(m,_)):(S!=null&&g.push([S,m]),g)},w.prototype.removeChild=function(d){this.children.remove(d)},w.prototype.replace=function(d){d instanceof w&&d.moveChildren(this),p.prototype.replace.call(this,d)},w.prototype.split=function(d,_){if(_===void 0&&(_=!1),!_){if(d===0)return this;if(d===this.length())return this.next}var E=this.clone();return this.parent.insertBefore(E,this.next),this.children.forEachAt(d,this.length(),function(S,m,g){S=S.split(m,_),E.appendChild(S)}),E},w.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},w.prototype.update=function(d,_){var E=this,S=[],m=[];d.forEach(function(g){g.target===E.domNode&&g.type==="childList"&&(S.push.apply(S,g.addedNodes),m.push.apply(m,g.removedNodes))}),m.forEach(function(g){if(!(g.parentNode!=null&&g.tagName!=="IFRAME"&&document.body.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var v=u.find(g);v!=null&&(v.domNode.parentNode==null||v.domNode.parentNode===E.domNode)&&v.detach()}}),S.filter(function(g){return g.parentNode==E.domNode}).sort(function(g,v){return g===v?0:g.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(g){var v=null;g.nextSibling!=null&&(v=u.find(g.nextSibling));var b=h(g);(b.next!=v||b.next==null)&&(b.parent!=null&&b.parent.removeChild(E),E.insertBefore(b,v||void 0))})},w}(l.default);function h(p){var w=u.find(p);if(w==null)try{w=u.create(p)}catch{w=u.create(u.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(_){w.domNode.appendChild(_)}),p.parentNode&&p.parentNode.replaceChild(w.domNode,p),w.attach()}return w}n.default=c},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,d){w.__proto__=d}||function(w,d){for(var _ in d)d.hasOwnProperty(_)&&(w[_]=d[_])};return function(w,d){p(w,d);function _(){this.constructor=w}w.prototype=d===null?Object.create(d):(_.prototype=d.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12),l=a(31),u=a(17),c=a(1),h=function(p){i(w,p);function w(d){var _=p.call(this,d)||this;return _.attributes=new l.default(_.domNode),_}return w.formats=function(d){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return d.tagName.toLowerCase()},w.prototype.format=function(d,_){var E=c.query(d);E instanceof o.default?this.attributes.attribute(E,_):_&&E!=null&&(d!==this.statics.blotName||this.formats()[d]!==_)&&this.replaceWith(d,_)},w.prototype.formats=function(){var d=this.attributes.values(),_=this.statics.formats(this.domNode);return _!=null&&(d[this.statics.blotName]=_),d},w.prototype.replaceWith=function(d,_){var E=p.prototype.replaceWith.call(this,d,_);return this.attributes.copy(E),E},w.prototype.update=function(d,_){var E=this;p.prototype.update.call(this,d,_),d.some(function(S){return S.target===E.domNode&&S.type==="attributes"})&&this.attributes.build()},w.prototype.wrap=function(d,_){var E=p.prototype.wrap.call(this,d,_);return E instanceof w&&E.statics.scope===this.statics.scope&&this.attributes.move(E),E},w}(u.default);n.default=h},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var w in p)p.hasOwnProperty(w)&&(h[w]=p[w])};return function(h,p){c(h,p);function w(){this.constructor=h}h.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(30),l=a(1),u=function(c){i(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.value=function(p){return!0},h.prototype.index=function(p,w){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(w,1):-1},h.prototype.position=function(p,w){var d=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(d+=1),[this.parent.domNode,d]},h.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},h.scope=l.Scope.INLINE_BLOT,h}(o.default);n.default=u},function(t,n,a){var i=a(11),o=a(3),l={attributes:{compose:function(c,h,p){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});var w=o(!0,{},h);p||(w=Object.keys(w).reduce(function(_,E){return w[E]!=null&&(_[E]=w[E]),_},{}));for(var d in c)c[d]!==void 0&&h[d]===void 0&&(w[d]=c[d]);return Object.keys(w).length>0?w:void 0},diff:function(c,h){typeof c!="object"&&(c={}),typeof h!="object"&&(h={});var p=Object.keys(c).concat(Object.keys(h)).reduce(function(w,d){return i(c[d],h[d])||(w[d]=h[d]===void 0?null:h[d]),w},{});return Object.keys(p).length>0?p:void 0},transform:function(c,h,p){if(typeof c!="object")return h;if(typeof h=="object"){if(!p)return h;var w=Object.keys(h).reduce(function(d,_){return c[_]===void 0&&(d[_]=h[_]),d},{});return Object.keys(w).length>0?w:void 0}}},iterator:function(c){return new u(c)},length:function(c){return typeof c.delete=="number"?c.delete:typeof c.retain=="number"?c.retain:typeof c.insert=="string"?c.insert.length:1}};function u(c){this.ops=c,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(c){c||(c=1/0);var h=this.ops[this.index];if(h){var p=this.offset,w=l.length(h);if(c>=w-p?(c=w-p,this.index+=1,this.offset=0):this.offset+=c,typeof h.delete=="number")return{delete:c};var d={};return h.attributes&&(d.attributes=h.attributes),typeof h.retain=="number"?d.retain=c:typeof h.insert=="string"?d.insert=h.insert.substr(p,c):d.insert=h.insert,d}else return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},u.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,h=this.index,p=this.next(),w=this.ops.slice(this.index);return this.offset=c,this.index=h,[p].concat(w)}else return[]},t.exports=l},function(t,n){var a=function(){function i(E,S){return S!=null&&E instanceof S}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var u;try{u=Promise}catch{u=function(){}}function c(E,S,m,g,v){typeof S=="object"&&(m=S.depth,g=S.prototype,v=S.includeNonEnumerable,S=S.circular);var b=[],O=[],I=typeof Buffer<"u";typeof S>"u"&&(S=!0),typeof m>"u"&&(m=1/0);function T(M,j){if(M===null)return null;if(j===0)return M;var C,x;if(typeof M!="object")return M;if(i(M,o))C=new o;else if(i(M,l))C=new l;else if(i(M,u))C=new u(function(V,G){M.then(function(z){V(T(z,j-1))},function(z){G(T(z,j-1))})});else if(c.__isArray(M))C=[];else if(c.__isRegExp(M))C=new RegExp(M.source,_(M)),M.lastIndex&&(C.lastIndex=M.lastIndex);else if(c.__isDate(M))C=new Date(M.getTime());else{if(I&&Buffer.isBuffer(M))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(M.length):C=new Buffer(M.length),M.copy(C),C;i(M,Error)?C=Object.create(M):typeof g>"u"?(x=Object.getPrototypeOf(M),C=Object.create(x)):(C=Object.create(g),x=g)}if(S){var L=b.indexOf(M);if(L!=-1)return O[L];b.push(M),O.push(C)}i(M,o)&&M.forEach(function(V,G){var z=T(G,j-1),D=T(V,j-1);C.set(z,D)}),i(M,l)&&M.forEach(function(V){var G=T(V,j-1);C.add(G)});for(var A in M){var N;x&&(N=Object.getOwnPropertyDescriptor(x,A)),!(N&&N.set==null)&&(C[A]=T(M[A],j-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(M),A=0;A<F.length;A++){var U=F[A],W=Object.getOwnPropertyDescriptor(M,U);W&&!W.enumerable&&!v||(C[U]=T(M[U],j-1),W.enumerable||Object.defineProperty(C,U,{enumerable:!1}))}if(v)for(var $=Object.getOwnPropertyNames(M),A=0;A<$.length;A++){var Z=$[A],W=Object.getOwnPropertyDescriptor(M,Z);W&&W.enumerable||(C[Z]=T(M[Z],j-1),Object.defineProperty(C,Z,{enumerable:!1}))}return C}return T(E,m)}c.clonePrototype=function(S){if(S===null)return null;var m=function(){};return m.prototype=S,new m};function h(E){return Object.prototype.toString.call(E)}c.__objToStr=h;function p(E){return typeof E=="object"&&h(E)==="[object Date]"}c.__isDate=p;function w(E){return typeof E=="object"&&h(E)==="[object Array]"}c.__isArray=w;function d(E){return typeof E=="object"&&h(E)==="[object RegExp]"}c.__isRegExp=d;function _(E){var S="";return E.global&&(S+="g"),E.ignoreCase&&(S+="i"),E.multiline&&(S+="m"),S}return c.__getRegExpFlags=_,c}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function C(x,L){var A=[],N=!0,F=!1,U=void 0;try{for(var W=x[Symbol.iterator](),$;!(N=($=W.next()).done)&&(A.push($.value),!(L&&A.length===L));N=!0);}catch(Z){F=!0,U=Z}finally{try{!N&&W.return&&W.return()}finally{if(F)throw U}}return A}return function(x,L){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return C(x,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function C(x,L){for(var A=0;A<L.length;A++){var N=L[A];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,L,A){return L&&C(x.prototype,L),A&&C(x,A),x}}(),l=function C(x,L,A){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,L);if(N===void 0){var F=Object.getPrototypeOf(x);return F===null?void 0:C(F,L,A)}else{if("value"in N)return N.value;var U=N.get;return U===void 0?void 0:U.call(A)}},u=a(0),c=b(u),h=a(8),p=b(h),w=a(4),d=b(w),_=a(16),E=b(_),S=a(13),m=b(S),g=a(25),v=b(g);function b(C){return C&&C.__esModule?C:{default:C}}function O(C,x){if(!(C instanceof x))throw new TypeError("Cannot call a class as a function")}function I(C,x){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:C}function T(C,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);C.prototype=Object.create(x&&x.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(C,x):C.__proto__=x)}function M(C){return C instanceof d.default||C instanceof w.BlockEmbed}var j=function(C){T(x,C);function x(L,A){O(this,x);var N=I(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,L));return N.emitter=A.emitter,Array.isArray(A.whitelist)&&(N.whitelist=A.whitelist.reduce(function(F,U){return F[U]=!0,F},{})),N.domNode.addEventListener("DOMNodeInserted",function(){}),N.optimize(),N.enable(),N}return o(x,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(A,N){var F=this.line(A),U=i(F,2),W=U[0],$=U[1],Z=this.line(A+N),V=i(Z,1),G=V[0];if(l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"deleteAt",this).call(this,A,N),G!=null&&W!==G&&$>0){if(W instanceof w.BlockEmbed||G instanceof w.BlockEmbed){this.optimize();return}if(W instanceof m.default){var z=W.newlineIndex(W.length(),!0);if(z>-1&&(W=W.split(z+1),W===G)){this.optimize();return}}else if(G instanceof m.default){var D=G.newlineIndex(0);D>-1&&G.split(D+1)}var K=G.children.head instanceof E.default?null:G.children.head;W.moveChildren(G,K),W.remove()}this.optimize()}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",A)}},{key:"formatAt",value:function(A,N,F,U){this.whitelist!=null&&!this.whitelist[F]||(l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"formatAt",this).call(this,A,N,F,U),this.optimize())}},{key:"insertAt",value:function(A,N,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[N])){if(A>=this.length())if(F==null||c.default.query(N,c.default.Scope.BLOCK)==null){var U=c.default.create(this.statics.defaultChild);this.appendChild(U),F==null&&N.endsWith(`
|
|
134
|
-
`)&&(N=N.slice(0,-1)),U.insertAt(0,N,F)}else{var W=c.default.create(N,F);this.appendChild(W)}else l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertAt",this).call(this,A,N,F);this.optimize()}}},{key:"insertBefore",value:function(A,N){if(A.statics.scope===c.default.Scope.INLINE_BLOT){var F=c.default.create(this.statics.defaultChild);F.appendChild(A),A=F}l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,A,N)}},{key:"leaf",value:function(A){return this.path(A).pop()||[null,-1]}},{key:"line",value:function(A){return A===this.length()?this.line(A-1):this.descendant(M,A)}},{key:"lines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function U(W,$,Z){var V=[],G=Z;return W.children.forEachAt($,Z,function(z,D,K){M(z)?V.push(z):z instanceof c.default.Container&&(V=V.concat(U(z,D,G))),G-=K}),V};return F(this,A,N)}},{key:"optimize",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,A,N),A.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,A,N))}},{key:"path",value:function(A){return l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"path",this).call(this,A).slice(1)}},{key:"update",value:function(A){if(this.batch!==!0){var N=p.default.sources.USER;typeof A=="string"&&(N=A),Array.isArray(A)||(A=this.observer.takeRecords()),A.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,N,A),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"update",this).call(this,A.concat([])),A.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,N,A)}}}]),x}(c.default.Scroll);j.blotName="scroll",j.className="ql-editor",j.tagName="DIV",j.defaultChild="block",j.allowedChildren=[d.default,w.BlockEmbed,v.default],n.default=j},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},o=function(){function Q(ee,ae){var se=[],ce=!0,me=!1,Se=void 0;try{for(var Oe=ee[Symbol.iterator](),Ne;!(ce=(Ne=Oe.next()).done)&&(se.push(Ne.value),!(ae&&se.length===ae));ce=!0);}catch(xe){me=!0,Se=xe}finally{try{!ce&&Oe.return&&Oe.return()}finally{if(me)throw Se}}return se}return function(ee,ae){if(Array.isArray(ee))return ee;if(Symbol.iterator in Object(ee))return Q(ee,ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function Q(ee,ae){for(var se=0;se<ae.length;se++){var ce=ae[se];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(ee,ce.key,ce)}}return function(ee,ae,se){return ae&&Q(ee.prototype,ae),se&&Q(ee,se),ee}}(),u=a(21),c=C(u),h=a(11),p=C(h),w=a(3),d=C(w),_=a(2),E=C(_),S=a(20),m=C(S),g=a(0),v=C(g),b=a(5),O=C(b),I=a(10),T=C(I),M=a(9),j=C(M);function C(Q){return Q&&Q.__esModule?Q:{default:Q}}function x(Q,ee,ae){return ee in Q?Object.defineProperty(Q,ee,{value:ae,enumerable:!0,configurable:!0,writable:!0}):Q[ee]=ae,Q}function L(Q,ee){if(!(Q instanceof ee))throw new TypeError("Cannot call a class as a function")}function A(Q,ee){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee&&(typeof ee=="object"||typeof ee=="function")?ee:Q}function N(Q,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);Q.prototype=Object.create(ee&&ee.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,ee):Q.__proto__=ee)}var F=(0,T.default)("quill:keyboard"),U=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",W=function(Q){N(ee,Q),l(ee,null,[{key:"match",value:function(se,ce){return ce=ne(ce),["altKey","ctrlKey","metaKey","shiftKey"].some(function(me){return!!ce[me]!==se[me]&&ce[me]!==null})?!1:ce.key===(se.which||se.keyCode)}}]);function ee(ae,se){L(this,ee);var ce=A(this,(ee.__proto__||Object.getPrototypeOf(ee)).call(this,ae,se));return ce.bindings={},Object.keys(ce.options.bindings).forEach(function(me){me==="list autofill"&&ae.scroll.whitelist!=null&&!ae.scroll.whitelist.list||ce.options.bindings[me]&&ce.addBinding(ce.options.bindings[me])}),ce.addBinding({key:ee.keys.ENTER,shiftKey:null},z),ce.addBinding({key:ee.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ce.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0},Z),ce.addBinding({key:ee.keys.DELETE},{collapsed:!0},V)):(ce.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Z),ce.addBinding({key:ee.keys.DELETE},{collapsed:!0,suffix:/^.?$/},V)),ce.addBinding({key:ee.keys.BACKSPACE},{collapsed:!1},G),ce.addBinding({key:ee.keys.DELETE},{collapsed:!1},G),ce.addBinding({key:ee.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Z),ce.listen(),ce}return l(ee,[{key:"addBinding",value:function(se){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=ne(se);if(Se==null||Se.key==null)return F.warn("Attempted to add invalid keyboard binding",Se);typeof ce=="function"&&(ce={handler:ce}),typeof me=="function"&&(me={handler:me}),Se=(0,d.default)(Se,ce,me),this.bindings[Se.key]=this.bindings[Se.key]||[],this.bindings[Se.key].push(Se)}},{key:"listen",value:function(){var se=this;this.quill.root.addEventListener("keydown",function(ce){if(!ce.defaultPrevented){var me=ce.which||ce.keyCode,Se=(se.bindings[me]||[]).filter(function(Je){return ee.match(ce,Je)});if(Se.length!==0){var Oe=se.quill.getSelection();if(!(Oe==null||!se.quill.hasFocus())){var Ne=se.quill.getLine(Oe.index),xe=o(Ne,2),ve=xe[0],Xe=xe[1],be=se.quill.getLeaf(Oe.index),Ae=o(be,2),Ee=Ae[0],Le=Ae[1],he=Oe.length===0?[Ee,Le]:se.quill.getLeaf(Oe.index+Oe.length),ke=o(he,2),Re=ke[0],$e=ke[1],vt=Ee instanceof v.default.Text?Ee.value().slice(0,Le):"",wt=Re instanceof v.default.Text?Re.value().slice($e):"",at={collapsed:Oe.length===0,empty:Oe.length===0&&ve.length()<=1,format:se.quill.getFormat(Oe),offset:Xe,prefix:vt,suffix:wt},mt=Se.some(function(Je){if(Je.collapsed!=null&&Je.collapsed!==at.collapsed||Je.empty!=null&&Je.empty!==at.empty||Je.offset!=null&&Je.offset!==at.offset)return!1;if(Array.isArray(Je.format)){if(Je.format.every(function(nt){return at.format[nt]==null}))return!1}else if(i(Je.format)==="object"&&!Object.keys(Je.format).every(function(nt){return Je.format[nt]===!0?at.format[nt]!=null:Je.format[nt]===!1?at.format[nt]==null:(0,p.default)(Je.format[nt],at.format[nt])}))return!1;return Je.prefix!=null&&!Je.prefix.test(at.prefix)||Je.suffix!=null&&!Je.suffix.test(at.suffix)?!1:Je.handler.call(se,Oe,at)!==!0});mt&&ce.preventDefault()}}}})}}]),ee}(j.default);W.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},W.DEFAULTS={bindings:{bold:K("bold"),italic:K("italic"),underline:K("underline"),indent:{key:W.keys.TAB,format:["blockquote","indent","list"],handler:function(ee,ae){if(ae.collapsed&&ae.offset!==0)return!0;this.quill.format("indent","+1",O.default.sources.USER)}},outdent:{key:W.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(ee,ae){if(ae.collapsed&&ae.offset!==0)return!0;this.quill.format("indent","-1",O.default.sources.USER)}},"outdent backspace":{key:W.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(ee,ae){ae.format.indent!=null?this.quill.format("indent","-1",O.default.sources.USER):ae.format.list!=null&&this.quill.format("list",!1,O.default.sources.USER)}},"indent code-block":D(!0),"outdent code-block":D(!1),"remove tab":{key:W.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(ee){this.quill.deleteText(ee.index-1,1,O.default.sources.USER)}},tab:{key:W.keys.TAB,handler:function(ee){this.quill.history.cutoff();var ae=new E.default().retain(ee.index).delete(ee.length).insert(" ");this.quill.updateContents(ae,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index+1,O.default.sources.SILENT)}},"list empty enter":{key:W.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(ee,ae){this.quill.format("list",!1,O.default.sources.USER),ae.format.indent&&this.quill.format("indent",!1,O.default.sources.USER)}},"checklist enter":{key:W.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(ee){var ae=this.quill.getLine(ee.index),se=o(ae,2),ce=se[0],me=se[1],Se=(0,d.default)({},ce.formats(),{list:"checked"}),Oe=new E.default().retain(ee.index).insert(`
|
|
135
|
-
`,Se).retain(ce.length()-me-1).retain(1,{list:"unchecked"});this.quill.updateContents(Oe,O.default.sources.USER),this.quill.setSelection(ee.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:W.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(ee,ae){var se=this.quill.getLine(ee.index),ce=o(se,2),me=ce[0],Se=ce[1],Oe=new E.default().retain(ee.index).insert(`
|
|
136
|
-
`,ae.format).retain(me.length()-Se-1).retain(1,{header:null});this.quill.updateContents(Oe,O.default.sources.USER),this.quill.setSelection(ee.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(ee,ae){var se=ae.prefix.length,ce=this.quill.getLine(ee.index),me=o(ce,2),Se=me[0],Oe=me[1];if(Oe>se)return!0;var Ne=void 0;switch(ae.prefix.trim()){case"[]":case"[ ]":Ne="unchecked";break;case"[x]":Ne="checked";break;case"-":case"*":Ne="bullet";break;default:Ne="ordered"}this.quill.insertText(ee.index," ",O.default.sources.USER),this.quill.history.cutoff();var xe=new E.default().retain(ee.index-Oe).delete(se+1).retain(Se.length()-2-Oe).retain(1,{list:Ne});this.quill.updateContents(xe,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index-se,O.default.sources.SILENT)}},"code exit":{key:W.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(ee){var ae=this.quill.getLine(ee.index),se=o(ae,2),ce=se[0],me=se[1],Se=new E.default().retain(ee.index+ce.length()-me-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Se,O.default.sources.USER)}},"embed left":$(W.keys.LEFT,!1),"embed left shift":$(W.keys.LEFT,!0),"embed right":$(W.keys.RIGHT,!1),"embed right shift":$(W.keys.RIGHT,!0)}};function $(Q,ee){var ae,se=Q===W.keys.LEFT?"prefix":"suffix";return ae={key:Q,shiftKey:ee,altKey:null},x(ae,se,/^$/),x(ae,"handler",function(me){var Se=me.index;Q===W.keys.RIGHT&&(Se+=me.length+1);var Oe=this.quill.getLeaf(Se),Ne=o(Oe,1),xe=Ne[0];return xe instanceof v.default.Embed?(Q===W.keys.LEFT?ee?this.quill.setSelection(me.index-1,me.length+1,O.default.sources.USER):this.quill.setSelection(me.index-1,O.default.sources.USER):ee?this.quill.setSelection(me.index,me.length+1,O.default.sources.USER):this.quill.setSelection(me.index+me.length+1,O.default.sources.USER),!1):!0}),ae}function Z(Q,ee){if(!(Q.index===0||this.quill.getLength()<=1)){var ae=this.quill.getLine(Q.index),se=o(ae,1),ce=se[0],me={};if(ee.offset===0){var Se=this.quill.getLine(Q.index-1),Oe=o(Se,1),Ne=Oe[0];if(Ne!=null&&Ne.length()>1){var xe=ce.formats(),ve=this.quill.getFormat(Q.index-1,1);me=m.default.attributes.diff(xe,ve)||{}}}var Xe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(ee.prefix)?2:1;this.quill.deleteText(Q.index-Xe,Xe,O.default.sources.USER),Object.keys(me).length>0&&this.quill.formatLine(Q.index-Xe,Xe,me,O.default.sources.USER),this.quill.focus()}}function V(Q,ee){var ae=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(ee.suffix)?2:1;if(!(Q.index>=this.quill.getLength()-ae)){var se={},ce=0,me=this.quill.getLine(Q.index),Se=o(me,1),Oe=Se[0];if(ee.offset>=Oe.length()-1){var Ne=this.quill.getLine(Q.index+1),xe=o(Ne,1),ve=xe[0];if(ve){var Xe=Oe.formats(),be=this.quill.getFormat(Q.index,1);se=m.default.attributes.diff(Xe,be)||{},ce=ve.length()}}this.quill.deleteText(Q.index,ae,O.default.sources.USER),Object.keys(se).length>0&&this.quill.formatLine(Q.index+ce-1,ae,se,O.default.sources.USER)}}function G(Q){var ee=this.quill.getLines(Q),ae={};if(ee.length>1){var se=ee[0].formats(),ce=ee[ee.length-1].formats();ae=m.default.attributes.diff(ce,se)||{}}this.quill.deleteText(Q,O.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(Q.index,1,ae,O.default.sources.USER),this.quill.setSelection(Q.index,O.default.sources.SILENT),this.quill.focus()}function z(Q,ee){var ae=this;Q.length>0&&this.quill.scroll.deleteAt(Q.index,Q.length);var se=Object.keys(ee.format).reduce(function(ce,me){return v.default.query(me,v.default.Scope.BLOCK)&&!Array.isArray(ee.format[me])&&(ce[me]=ee.format[me]),ce},{});this.quill.insertText(Q.index,`
|
|
137
|
-
`,se,O.default.sources.USER),this.quill.setSelection(Q.index+1,O.default.sources.SILENT),this.quill.focus(),Object.keys(ee.format).forEach(function(ce){se[ce]==null&&(Array.isArray(ee.format[ce])||ce!=="link"&&ae.quill.format(ce,ee.format[ce],O.default.sources.USER))})}function D(Q){return{key:W.keys.TAB,shiftKey:!Q,format:{"code-block":!0},handler:function(ae){var se=v.default.query("code-block"),ce=ae.index,me=ae.length,Se=this.quill.scroll.descendant(se,ce),Oe=o(Se,2),Ne=Oe[0],xe=Oe[1];if(Ne!=null){var ve=this.quill.getIndex(Ne),Xe=Ne.newlineIndex(xe,!0)+1,be=Ne.newlineIndex(ve+xe+me),Ae=Ne.domNode.textContent.slice(Xe,be).split(`
|
|
138
|
-
`);xe=0,Ae.forEach(function(Ee,Le){Q?(Ne.insertAt(Xe+xe,se.TAB),xe+=se.TAB.length,Le===0?ce+=se.TAB.length:me+=se.TAB.length):Ee.startsWith(se.TAB)&&(Ne.deleteAt(Xe+xe,se.TAB.length),xe-=se.TAB.length,Le===0?ce-=se.TAB.length:me-=se.TAB.length),xe+=Ee.length+1}),this.quill.update(O.default.sources.USER),this.quill.setSelection(ce,me,O.default.sources.SILENT)}}}}function K(Q){return{key:Q[0].toUpperCase(),shortKey:!0,handler:function(ae,se){this.quill.format(Q,!se.format[Q],O.default.sources.USER)}}}function ne(Q){if(typeof Q=="string"||typeof Q=="number")return ne({key:Q});if((typeof Q>"u"?"undefined":i(Q))==="object"&&(Q=(0,c.default)(Q,!1)),typeof Q.key=="string")if(W.keys[Q.key.toUpperCase()]!=null)Q.key=W.keys[Q.key.toUpperCase()];else if(Q.key.length===1)Q.key=Q.key.toUpperCase().charCodeAt(0);else return null;return Q.shortKey&&(Q[U]=Q.shortKey,delete Q.shortKey),Q}n.default=W,n.SHORTKEY=U},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function m(g,v){var b=[],O=!0,I=!1,T=void 0;try{for(var M=g[Symbol.iterator](),j;!(O=(j=M.next()).done)&&(b.push(j.value),!(v&&b.length===v));O=!0);}catch(C){I=!0,T=C}finally{try{!O&&M.return&&M.return()}finally{if(I)throw T}}return b}return function(g,v){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return m(g,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function m(g,v,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,v);if(O===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:m(I,v,b)}else{if("value"in O)return O.value;var T=O.get;return T===void 0?void 0:T.call(b)}},l=function(){function m(g,v){for(var b=0;b<v.length;b++){var O=v[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,v,b){return v&&m(g.prototype,v),b&&m(g,b),g}}(),u=a(0),c=w(u),h=a(7),p=w(h);function w(m){return m&&m.__esModule?m:{default:m}}function d(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function _(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function E(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var S=function(m){E(g,m),l(g,null,[{key:"value",value:function(){}}]);function g(v,b){d(this,g);var O=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return O.selection=b,O.textNode=document.createTextNode(g.CONTENTS),O.domNode.appendChild(O.textNode),O._length=0,O}return l(g,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(b,O){if(this._length!==0)return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,O);for(var I=this,T=0;I!=null&&I.statics.scope!==c.default.Scope.BLOCK_BLOT;)T+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=g.CONTENTS.length,I.optimize(),I.formatAt(T,g.CONTENTS.length,b,O),this._length=0)}},{key:"index",value:function(b,O){return b===this.textNode?0:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,b,O)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var b=this.textNode,O=this.selection.getNativeRange(),I=void 0,T=void 0,M=void 0;if(O!=null&&O.start.node===b&&O.end.node===b){var j=[b,O.start.offset,O.end.offset];I=j[0],T=j[1],M=j[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==g.CONTENTS){var C=this.textNode.data.split(g.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,C),this.textNode.data=g.CONTENTS):(this.textNode.data=C,this.parent.insertBefore(c.default.create(this.textNode),this),this.textNode=document.createTextNode(g.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),T!=null){var x=[T,M].map(function(A){return Math.max(0,Math.min(I.data.length,A-1))}),L=i(x,2);return T=L[0],M=L[1],{startNode:I,startOffset:T,endNode:I,endOffset:M}}}}},{key:"update",value:function(b,O){var I=this;if(b.some(function(M){return M.type==="characterData"&&M.target===I.textNode})){var T=this.restore();T&&(O.range=T)}}},{key:"value",value:function(){return""}}]),g}(c.default.Embed);S.blotName="cursor",S.className="ql-cursor",S.tagName="span",S.CONTENTS="\uFEFF",n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=c(i),l=a(4),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(){return h(this,E),p(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return E}(o.default.Container);d.allowedChildren=[u.default,l.BlockEmbed,d],n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var i=function(){function S(m,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,v){return g&&S(m.prototype,g),v&&S(m,v),m}}(),o=function S(m,g,v){m===null&&(m=Function.prototype);var b=Object.getOwnPropertyDescriptor(m,g);if(b===void 0){var O=Object.getPrototypeOf(m);return O===null?void 0:S(O,g,v)}else{if("value"in b)return b.value;var I=b.get;return I===void 0?void 0:I.call(v)}},l=a(0),u=c(l);function c(S){return S&&S.__esModule?S:{default:S}}function h(S,m){if(!(S instanceof m))throw new TypeError("Cannot call a class as a function")}function p(S,m){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:S}function w(S,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);S.prototype=Object.create(m&&m.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(S,m):S.__proto__=m)}var d=function(S){w(m,S);function m(){return h(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"value",value:function(v){var b=o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,v);return b.startsWith("rgb(")?(b=b.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+b.split(",").map(function(O){return("00"+parseInt(O).toString(16)).slice(-2)}).join("")):b}}]),m}(u.default.Attributor.Style),_=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),E=new d("color","color",{scope:u.default.Scope.INLINE});n.ColorAttributor=d,n.ColorClass=_,n.ColorStyle=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var i=function(){function E(S,m){for(var g=0;g<m.length;g++){var v=m[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(S,v.key,v)}}return function(S,m,g){return m&&E(S.prototype,m),g&&E(S,g),S}}(),o=function E(S,m,g){S===null&&(S=Function.prototype);var v=Object.getOwnPropertyDescriptor(S,m);if(v===void 0){var b=Object.getPrototypeOf(S);return b===null?void 0:E(b,m,g)}else{if("value"in v)return v.value;var O=v.get;return O===void 0?void 0:O.call(g)}},l=a(6),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function p(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function w(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var d=function(E){w(S,E);function S(){return h(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,[{key:"format",value:function(g,v){if(g!==this.statics.blotName||!v)return o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,g,v);v=this.constructor.sanitize(v),this.domNode.setAttribute("href",v)}}],[{key:"create",value:function(g){var v=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,g);return g=this.sanitize(g),v.setAttribute("href",g),v.setAttribute("rel","noopener noreferrer"),v.setAttribute("target","_blank"),v}},{key:"formats",value:function(g){return g.getAttribute("href")}},{key:"sanitize",value:function(g){return _(g,this.PROTOCOL_WHITELIST)?g:this.SANITIZED_URL}}]),S}(u.default);d.blotName="link",d.tagName="A",d.SANITIZED_URL="about:blank",d.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function _(E,S){var m=document.createElement("a");m.href=E;var g=m.href.slice(0,m.href.indexOf(":"));return S.indexOf(g)>-1}n.default=d,n.sanitize=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},o=function(){function S(m,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,v){return g&&S(m.prototype,g),v&&S(m,v),m}}(),l=a(23),u=p(l),c=a(107),h=p(c);function p(S){return S&&S.__esModule?S:{default:S}}function w(S,m){if(!(S instanceof m))throw new TypeError("Cannot call a class as a function")}var d=0;function _(S,m){S.setAttribute(m,S.getAttribute(m)!=="true")}var E=function(){function S(m){var g=this;w(this,S),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){g.togglePicker()}),this.label.addEventListener("keydown",function(v){switch(v.keyCode){case u.default.keys.ENTER:g.togglePicker();break;case u.default.keys.ESCAPE:g.escape(),v.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(S,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),_(this.label,"aria-expanded"),_(this.options,"aria-hidden")}},{key:"buildItem",value:function(g){var v=this,b=document.createElement("span");return b.tabIndex="0",b.setAttribute("role","button"),b.classList.add("ql-picker-item"),g.hasAttribute("value")&&b.setAttribute("data-value",g.getAttribute("value")),g.textContent&&b.setAttribute("data-label",g.textContent),b.addEventListener("click",function(){v.selectItem(b,!0)}),b.addEventListener("keydown",function(O){switch(O.keyCode){case u.default.keys.ENTER:v.selectItem(b,!0),O.preventDefault();break;case u.default.keys.ESCAPE:v.escape(),O.preventDefault();break}}),b}},{key:"buildLabel",value:function(){var g=document.createElement("span");return g.classList.add("ql-picker-label"),g.innerHTML=h.default,g.tabIndex="0",g.setAttribute("role","button"),g.setAttribute("aria-expanded","false"),this.container.appendChild(g),g}},{key:"buildOptions",value:function(){var g=this,v=document.createElement("span");v.classList.add("ql-picker-options"),v.setAttribute("aria-hidden","true"),v.tabIndex="-1",v.id="ql-picker-options-"+d,d+=1,this.label.setAttribute("aria-controls",v.id),this.options=v,[].slice.call(this.select.options).forEach(function(b){var O=g.buildItem(b);v.appendChild(O),b.selected===!0&&g.selectItem(O)}),this.container.appendChild(v)}},{key:"buildPicker",value:function(){var g=this;[].slice.call(this.select.attributes).forEach(function(v){g.container.setAttribute(v.name,v.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var g=this;this.close(),setTimeout(function(){return g.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=this.container.querySelector(".ql-selected");if(g!==b&&(b!=null&&b.classList.remove("ql-selected"),g!=null&&(g.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(g.parentNode.children,g),g.hasAttribute("data-value")?this.label.setAttribute("data-value",g.getAttribute("data-value")):this.label.removeAttribute("data-value"),g.hasAttribute("data-label")?this.label.setAttribute("data-label",g.getAttribute("data-label")):this.label.removeAttribute("data-label"),v))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":i(Event))==="object"){var O=document.createEvent("Event");O.initEvent("change",!0,!0),this.select.dispatchEvent(O)}this.close()}}},{key:"update",value:function(){var g=void 0;if(this.select.selectedIndex>-1){var v=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];g=this.select.options[this.select.selectedIndex],this.selectItem(v)}else this.selectItem(null);var b=g!=null&&g!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",b)}}]),S}();n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=F(i),l=a(5),u=F(l),c=a(4),h=F(c),p=a(16),w=F(p),d=a(25),_=F(d),E=a(24),S=F(E),m=a(35),g=F(m),v=a(6),b=F(v),O=a(22),I=F(O),T=a(7),M=F(T),j=a(55),C=F(j),x=a(42),L=F(x),A=a(23),N=F(A);function F(U){return U&&U.__esModule?U:{default:U}}u.default.register({"blots/block":h.default,"blots/block/embed":c.BlockEmbed,"blots/break":w.default,"blots/container":_.default,"blots/cursor":S.default,"blots/embed":g.default,"blots/inline":b.default,"blots/scroll":I.default,"blots/text":M.default,"modules/clipboard":C.default,"modules/history":L.default,"modules/keyboard":N.default}),o.default.register(h.default,w.default,S.default,b.default,I.default,M.default),n.default=u.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(1),o=function(){function l(u){this.domNode=u,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(u){if(this.tagName==null)throw new i.ParchmentError("Blot definition missing tagName");var c;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?c=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?c=document.createElement(u):c=document.createElement(this.tagName[0])):c=document.createElement(this.tagName),this.className&&c.classList.add(this.className),c},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return i.create(u)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},l.prototype.deleteAt=function(u,c){var h=this.isolate(u,c);h.remove()},l.prototype.formatAt=function(u,c,h,p){var w=this.isolate(u,c);if(i.query(h,i.Scope.BLOT)!=null&&p)w.wrap(h,p);else if(i.query(h,i.Scope.ATTRIBUTE)!=null){var d=i.create(this.statics.scope);w.wrap(d),d.format(h,p)}},l.prototype.insertAt=function(u,c,h){var p=h==null?i.create("text",c):i.create(c,h),w=this.split(u);this.parent.insertBefore(p,w)},l.prototype.insertInto=function(u,c){c===void 0&&(c=null),this.parent!=null&&this.parent.children.remove(this);var h=null;u.children.insertBefore(this,c),c!=null&&(h=c.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=h)&&u.domNode.insertBefore(this.domNode,h),this.parent=u,this.attach()},l.prototype.isolate=function(u,c){var h=this.split(u);return h.split(c),h},l.prototype.length=function(){return 1},l.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},l.prototype.optimize=function(u){this.domNode[i.DATA_KEY]!=null&&delete this.domNode[i.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},l.prototype.replaceWith=function(u,c){var h=typeof u=="string"?i.create(u,c):u;return h.replace(this),h},l.prototype.split=function(u,c){return u===0?this:this.next},l.prototype.update=function(u,c){},l.prototype.wrap=function(u,c){var h=typeof u=="string"?i.create(u,c):u;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},l.blotName="abstract",l}();n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(12),o=a(32),l=a(33),u=a(1),c=function(){function h(p){this.attributes={},this.domNode=p,this.build()}return h.prototype.attribute=function(p,w){w?p.add(this.domNode,w)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},h.prototype.build=function(){var p=this;this.attributes={};var w=i.default.keys(this.domNode),d=o.default.keys(this.domNode),_=l.default.keys(this.domNode);w.concat(d).concat(_).forEach(function(E){var S=u.query(E,u.Scope.ATTRIBUTE);S instanceof i.default&&(p.attributes[S.attrName]=S)})},h.prototype.copy=function(p){var w=this;Object.keys(this.attributes).forEach(function(d){var _=w.attributes[d].value(w.domNode);p.format(d,_)})},h.prototype.move=function(p){var w=this;this.copy(p),Object.keys(this.attributes).forEach(function(d){w.attributes[d].remove(w.domNode)}),this.attributes={}},h.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(w,d){return w[d]=p.attributes[d].value(p.domNode),w},{})},h}();n.default=c},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var w in p)p.hasOwnProperty(w)&&(h[w]=p[w])};return function(h,p){c(h,p);function w(){this.constructor=h}h.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12);function l(c,h){var p=c.getAttribute("class")||"";return p.split(/\s+/).filter(function(w){return w.indexOf(h+"-")===0})}var u=function(c){i(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(w){return w.split("-").slice(0,-1).join("-")})},h.prototype.add=function(p,w){return this.canAdd(p,w)?(this.remove(p),p.classList.add(this.keyName+"-"+w),!0):!1},h.prototype.remove=function(p){var w=l(p,this.keyName);w.forEach(function(d){p.classList.remove(d)}),p.classList.length===0&&p.removeAttribute("class")},h.prototype.value=function(p){var w=l(p,this.keyName)[0]||"",d=w.slice(this.keyName.length+1);return this.canAdd(p,d)?d:""},h}(o.default);n.default=u},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var w in p)p.hasOwnProperty(w)&&(h[w]=p[w])};return function(h,p){c(h,p);function w(){this.constructor=h}h.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12);function l(c){var h=c.split("-"),p=h.slice(1).map(function(w){return w[0].toUpperCase()+w.slice(1)}).join("");return h[0]+p}var u=function(c){i(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(w){var d=w.split(":");return d[0].trim()})},h.prototype.add=function(p,w){return this.canAdd(p,w)?(p.style[l(this.keyName)]=w,!0):!1},h.prototype.remove=function(p){p.style[l(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},h.prototype.value=function(p){var w=p.style[l(this.keyName)];return this.canAdd(p,w)?w:""},h}(o.default);n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function u(c,h){for(var p=0;p<h.length;p++){var w=h[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,h,p){return h&&u(c.prototype,h),p&&u(c,p),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,h){o(this,u),this.quill=c,this.options=h,this.modules={}}return i(u,[{key:"init",value:function(){var h=this;Object.keys(this.options.modules).forEach(function(p){h.modules[p]==null&&h.addModule(p)})}},{key:"addModule",value:function(h){var p=this.quill.constructor.import("modules/"+h);return this.modules[h]=new p(this.quill,this.options.modules[h]||{}),this.modules[h]}}]),u}();l.DEFAULTS={modules:{}},l.themes={default:l},n.default=l},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function m(g,v){for(var b=0;b<v.length;b++){var O=v[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,v,b){return v&&m(g.prototype,v),b&&m(g,b),g}}(),o=function m(g,v,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,v);if(O===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:m(I,v,b)}else{if("value"in O)return O.value;var T=O.get;return T===void 0?void 0:T.call(b)}},l=a(0),u=p(l),c=a(7),h=p(c);function p(m){return m&&m.__esModule?m:{default:m}}function w(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function d(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function _(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var E="\uFEFF",S=function(m){_(g,m);function g(v){w(this,g);var b=d(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return b.contentNode=document.createElement("span"),b.contentNode.setAttribute("contenteditable",!1),[].slice.call(b.domNode.childNodes).forEach(function(O){b.contentNode.appendChild(O)}),b.leftGuard=document.createTextNode(E),b.rightGuard=document.createTextNode(E),b.domNode.appendChild(b.leftGuard),b.domNode.appendChild(b.contentNode),b.domNode.appendChild(b.rightGuard),b}return i(g,[{key:"index",value:function(b,O){return b===this.leftGuard?0:b===this.rightGuard?1:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,b,O)}},{key:"restore",value:function(b){var O=void 0,I=void 0,T=b.data.split(E).join("");if(b===this.leftGuard)if(this.prev instanceof h.default){var M=this.prev.length();this.prev.insertAt(M,T),O={startNode:this.prev.domNode,startOffset:M+T.length}}else I=document.createTextNode(T),this.parent.insertBefore(u.default.create(I),this),O={startNode:I,startOffset:T.length};else b===this.rightGuard&&(this.next instanceof h.default?(this.next.insertAt(0,T),O={startNode:this.next.domNode,startOffset:T.length}):(I=document.createTextNode(T),this.parent.insertBefore(u.default.create(I),this.next),O={startNode:I,startOffset:T.length}));return b.data=E,O}},{key:"update",value:function(b,O){var I=this;b.forEach(function(T){if(T.type==="characterData"&&(T.target===I.leftGuard||T.target===I.rightGuard)){var M=I.restore(T.target);M&&(O.range=M)}})}}]),g}(u.default.Embed);n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var i=a(0),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}var u={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},c=new o.default.Attributor.Attribute("align","align",u),h=new o.default.Attributor.Class("align","ql-align",u),p=new o.default.Attributor.Style("align","text-align",u);n.AlignAttribute=c,n.AlignClass=h,n.AlignStyle=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var i=a(0),o=u(i),l=a(26);function u(p){return p&&p.__esModule?p:{default:p}}var c=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),h=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});n.BackgroundClass=c,n.BackgroundStyle=h},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var i=a(0),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}var u={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},c=new o.default.Attributor.Attribute("direction","dir",u),h=new o.default.Attributor.Class("direction","ql-direction",u),p=new o.default.Attributor.Style("direction","direction",u);n.DirectionAttribute=c,n.DirectionClass=h,n.DirectionStyle=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var i=function(){function m(g,v){for(var b=0;b<v.length;b++){var O=v[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,v,b){return v&&m(g.prototype,v),b&&m(g,b),g}}(),o=function m(g,v,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,v);if(O===void 0){var I=Object.getPrototypeOf(g);return I===null?void 0:m(I,v,b)}else{if("value"in O)return O.value;var T=O.get;return T===void 0?void 0:T.call(b)}},l=a(0),u=c(l);function c(m){return m&&m.__esModule?m:{default:m}}function h(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function p(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function w(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var d={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},_=new u.default.Attributor.Class("font","ql-font",d),E=function(m){w(g,m);function g(){return h(this,g),p(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"value",value:function(b){return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b).replace(/["']/g,"")}}]),g}(u.default.Attributor.Style),S=new E("font","font-family",d);n.FontStyle=S,n.FontClass=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var i=a(0),o=l(i);function l(h){return h&&h.__esModule?h:{default:h}}var u=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),c=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=u,n.SizeStyle=c},function(t,n,a){t.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var i=function(){function v(b,O){for(var I=0;I<O.length;I++){var T=O[I];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,O,I){return O&&v(b.prototype,O),I&&v(b,I),b}}(),o=a(0),l=w(o),u=a(5),c=w(u),h=a(9),p=w(h);function w(v){return v&&v.__esModule?v:{default:v}}function d(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function _(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function E(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var S=function(v){E(b,v);function b(O,I){d(this,b);var T=_(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,O,I));return T.lastRecorded=0,T.ignoreChange=!1,T.clear(),T.quill.on(c.default.events.EDITOR_CHANGE,function(M,j,C,x){M!==c.default.events.TEXT_CHANGE||T.ignoreChange||(!T.options.userOnly||x===c.default.sources.USER?T.record(j,C):T.transform(j))}),T.quill.keyboard.addBinding({key:"Z",shortKey:!0},T.undo.bind(T)),T.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},T.redo.bind(T)),/Win/i.test(navigator.platform)&&T.quill.keyboard.addBinding({key:"Y",shortKey:!0},T.redo.bind(T)),T}return i(b,[{key:"change",value:function(I,T){if(this.stack[I].length!==0){var M=this.stack[I].pop();this.stack[T].push(M),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(M[I],c.default.sources.USER),this.ignoreChange=!1;var j=g(M[I]);this.quill.setSelection(j)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,T){if(I.ops.length!==0){this.stack.redo=[];var M=this.quill.getContents().diff(T),j=Date.now();if(this.lastRecorded+this.options.delay>j&&this.stack.undo.length>0){var C=this.stack.undo.pop();M=M.compose(C.undo),I=C.redo.compose(I)}else this.lastRecorded=j;this.stack.undo.push({redo:I,undo:M}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(T){T.undo=I.transform(T.undo,!0),T.redo=I.transform(T.redo,!0)}),this.stack.redo.forEach(function(T){T.undo=I.transform(T.undo,!0),T.redo=I.transform(T.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),b}(p.default);S.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(v){var b=v.ops[v.ops.length-1];return b==null?!1:b.insert!=null?typeof b.insert=="string"&&b.insert.endsWith(`
|
|
139
|
-
`):b.attributes!=null?Object.keys(b.attributes).some(function(O){return l.default.query(O,l.default.Scope.BLOCK)!=null}):!1}function g(v){var b=v.reduce(function(I,T){return I+=T.delete||0,I},0),O=v.length()-b;return m(v)&&(O-=1),O}n.default=S,n.getLastChangeIndex=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var i=function(){function z(D,K){for(var ne=0;ne<K.length;ne++){var Q=K[ne];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(D,Q.key,Q)}}return function(D,K,ne){return K&&z(D.prototype,K),ne&&z(D,ne),D}}(),o=function z(D,K,ne){D===null&&(D=Function.prototype);var Q=Object.getOwnPropertyDescriptor(D,K);if(Q===void 0){var ee=Object.getPrototypeOf(D);return ee===null?void 0:z(ee,K,ne)}else{if("value"in Q)return Q.value;var ae=Q.get;return ae===void 0?void 0:ae.call(ne)}},l=a(3),u=j(l),c=a(2),h=j(c),p=a(8),w=j(p),d=a(23),_=j(d),E=a(34),S=j(E),m=a(59),g=j(m),v=a(60),b=j(v),O=a(28),I=j(O),T=a(61),M=j(T);function j(z){return z&&z.__esModule?z:{default:z}}function C(z,D){if(!(z instanceof D))throw new TypeError("Cannot call a class as a function")}function x(z,D){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:z}function L(z,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);z.prototype=Object.create(D&&D.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(z,D):z.__proto__=D)}var A=[!1,"center","right","justify"],N=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],F=[!1,"serif","monospace"],U=["1","2","3",!1],W=["small",!1,"large","huge"],$=function(z){L(D,z);function D(K,ne){C(this,D);var Q=x(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,K,ne)),ee=function ae(se){if(!document.body.contains(K.root))return document.body.removeEventListener("click",ae);Q.tooltip!=null&&!Q.tooltip.root.contains(se.target)&&document.activeElement!==Q.tooltip.textbox&&!Q.quill.hasFocus()&&Q.tooltip.hide(),Q.pickers!=null&&Q.pickers.forEach(function(ce){ce.container.contains(se.target)||ce.close()})};return K.emitter.listenDOM("click",document.body,ee),Q}return i(D,[{key:"addModule",value:function(ne){var Q=o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"addModule",this).call(this,ne);return ne==="toolbar"&&this.extendToolbar(Q),Q}},{key:"buildButtons",value:function(ne,Q){ne.forEach(function(ee){var ae=ee.getAttribute("class")||"";ae.split(/\s+/).forEach(function(se){if(se.startsWith("ql-")&&(se=se.slice(3),Q[se]!=null))if(se==="direction")ee.innerHTML=Q[se][""]+Q[se].rtl;else if(typeof Q[se]=="string")ee.innerHTML=Q[se];else{var ce=ee.value||"";ce!=null&&Q[se][ce]&&(ee.innerHTML=Q[se][ce])}})})}},{key:"buildPickers",value:function(ne,Q){var ee=this;this.pickers=ne.map(function(se){if(se.classList.contains("ql-align"))return se.querySelector("option")==null&&G(se,A),new b.default(se,Q.align);if(se.classList.contains("ql-background")||se.classList.contains("ql-color")){var ce=se.classList.contains("ql-background")?"background":"color";return se.querySelector("option")==null&&G(se,N,ce==="background"?"#ffffff":"#000000"),new g.default(se,Q[ce])}else return se.querySelector("option")==null&&(se.classList.contains("ql-font")?G(se,F):se.classList.contains("ql-header")?G(se,U):se.classList.contains("ql-size")&&G(se,W)),new I.default(se)});var ae=function(){ee.pickers.forEach(function(ce){ce.update()})};this.quill.on(w.default.events.EDITOR_CHANGE,ae)}}]),D}(S.default);$.DEFAULTS=(0,u.default)(!0,{},S.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var D=this,K=this.container.querySelector("input.ql-image[type=file]");K==null&&(K=document.createElement("input"),K.setAttribute("type","file"),K.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),K.classList.add("ql-image"),K.addEventListener("change",function(){if(K.files!=null&&K.files[0]!=null){var ne=new FileReader;ne.onload=function(Q){var ee=D.quill.getSelection(!0);D.quill.updateContents(new h.default().retain(ee.index).delete(ee.length).insert({image:Q.target.result}),w.default.sources.USER),D.quill.setSelection(ee.index+1,w.default.sources.SILENT),K.value=""},ne.readAsDataURL(K.files[0])}}),this.container.appendChild(K)),K.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Z=function(z){L(D,z);function D(K,ne){C(this,D);var Q=x(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,K,ne));return Q.textbox=Q.root.querySelector('input[type="text"]'),Q.listen(),Q}return i(D,[{key:"listen",value:function(){var ne=this;this.textbox.addEventListener("keydown",function(Q){_.default.match(Q,"enter")?(ne.save(),Q.preventDefault()):_.default.match(Q,"escape")&&(ne.cancel(),Q.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Q!=null?this.textbox.value=Q:ne!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+ne)||""),this.root.setAttribute("data-mode",ne)}},{key:"restoreFocus",value:function(){var ne=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=ne}},{key:"save",value:function(){var ne=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",ne,w.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",ne,w.default.sources.USER)),this.quill.root.scrollTop=Q;break}case"video":ne=V(ne);case"formula":{if(!ne)break;var ee=this.quill.getSelection(!0);if(ee!=null){var ae=ee.index+ee.length;this.quill.insertEmbed(ae,this.root.getAttribute("data-mode"),ne,w.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ae+1," ",w.default.sources.USER),this.quill.setSelection(ae+2,w.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),D}(M.default);function V(z){var D=z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return D?(D[1]||"https")+"://www.youtube.com/embed/"+D[2]+"?showinfo=0":(D=z.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(D[1]||"https")+"://player.vimeo.com/video/"+D[2]+"/":z}function G(z,D){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D.forEach(function(ne){var Q=document.createElement("option");ne===K?Q.setAttribute("selected","selected"):Q.setAttribute("value",ne),z.appendChild(Q)})}n.BaseTooltip=Z,n.default=$},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var u,c=this.iterator();u=c();)if(u===l)return!0;return!1},o.prototype.insertBefore=function(l,u){l&&(l.next=u,u!=null?(l.prev=u.prev,u.prev!=null&&(u.prev.next=l),u.prev=l,u===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var u=0,c=this.head;c!=null;){if(c===l)return u;u+=c.length(),c=c.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var u=l;return l!=null&&(l=l.next),u}},o.prototype.find=function(l,u){u===void 0&&(u=!1);for(var c,h=this.iterator();c=h();){var p=c.length();if(l<p||u&&l===p&&(c.next==null||c.next.length()!==0))return[c,l];l-=p}return[null,0]},o.prototype.forEach=function(l){for(var u,c=this.iterator();u=c();)l(u)},o.prototype.forEachAt=function(l,u,c){if(!(u<=0))for(var h=this.find(l),p=h[0],w=h[1],d,_=l-w,E=this.iterator(p);(d=E())&&_<l+u;){var S=d.length();l>_?c(d,l-_,Math.min(u,_+S-l)):c(d,0,Math.min(S,l+u-_)),_+=S}},o.prototype.map=function(l){return this.reduce(function(u,c){return u.push(l(c)),u},[])},o.prototype.reduce=function(l,u){for(var c,h=this.iterator();c=h();)u=l(u,c);return u},o}();n.default=i},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,d){w.__proto__=d}||function(w,d){for(var _ in d)d.hasOwnProperty(_)&&(w[_]=d[_])};return function(w,d){p(w,d);function _(){this.constructor=w}w.prototype=d===null?Object.create(d):(_.prototype=d.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(17),l=a(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},c=100,h=function(p){i(w,p);function w(d){var _=p.call(this,d)||this;return _.scroll=_,_.observer=new MutationObserver(function(E){_.update(E)}),_.observer.observe(_.domNode,u),_.attach(),_}return w.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},w.prototype.deleteAt=function(d,_){this.update(),d===0&&_===this.length()?this.children.forEach(function(E){E.remove()}):p.prototype.deleteAt.call(this,d,_)},w.prototype.formatAt=function(d,_,E,S){this.update(),p.prototype.formatAt.call(this,d,_,E,S)},w.prototype.insertAt=function(d,_,E){this.update(),p.prototype.insertAt.call(this,d,_,E)},w.prototype.optimize=function(d,_){var E=this;d===void 0&&(d=[]),_===void 0&&(_={}),p.prototype.optimize.call(this,_);for(var S=[].slice.call(this.observer.takeRecords());S.length>0;)d.push(S.pop());for(var m=function(O,I){I===void 0&&(I=!0),!(O==null||O===E)&&O.domNode.parentNode!=null&&(O.domNode[l.DATA_KEY].mutations==null&&(O.domNode[l.DATA_KEY].mutations=[]),I&&m(O.parent))},g=function(O){O.domNode[l.DATA_KEY]==null||O.domNode[l.DATA_KEY].mutations==null||(O instanceof o.default&&O.children.forEach(g),O.optimize(_))},v=d,b=0;v.length>0;b+=1){if(b>=c)throw new Error("[Parchment] Maximum optimize iterations reached");for(v.forEach(function(O){var I=l.find(O.target,!0);I!=null&&(I.domNode===O.target&&(O.type==="childList"?(m(l.find(O.previousSibling,!1)),[].forEach.call(O.addedNodes,function(T){var M=l.find(T,!1);m(M,!1),M instanceof o.default&&M.children.forEach(function(j){m(j,!1)})})):O.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(g),v=[].slice.call(this.observer.takeRecords()),S=v.slice();S.length>0;)d.push(S.pop())}},w.prototype.update=function(d,_){var E=this;_===void 0&&(_={}),d=d||this.observer.takeRecords(),d.map(function(S){var m=l.find(S.target,!0);return m==null?null:m.domNode[l.DATA_KEY].mutations==null?(m.domNode[l.DATA_KEY].mutations=[S],m):(m.domNode[l.DATA_KEY].mutations.push(S),null)}).forEach(function(S){S==null||S===E||S.domNode[l.DATA_KEY]==null||S.update(S.domNode[l.DATA_KEY].mutations||[],_)}),this.domNode[l.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,_),this.optimize(d,_)},w.blotName="scroll",w.defaultChild="block",w.scope=l.Scope.BLOCK_BLOT,w.tagName="DIV",w}(o.default);n.default=h},function(t,n,a){var i=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,w){p.__proto__=w}||function(p,w){for(var d in w)w.hasOwnProperty(d)&&(p[d]=w[d])};return function(p,w){h(p,w);function d(){this.constructor=p}p.prototype=w===null?Object.create(w):(d.prototype=w.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(18),l=a(1);function u(h,p){if(Object.keys(h).length!==Object.keys(p).length)return!1;for(var w in h)if(h[w]!==p[w])return!1;return!0}var c=function(h){i(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.formats=function(w){if(w.tagName!==p.tagName)return h.formats.call(this,w)},p.prototype.format=function(w,d){var _=this;w===this.statics.blotName&&!d?(this.children.forEach(function(E){E instanceof o.default||(E=E.wrap(p.blotName,!0)),_.attributes.copy(E)}),this.unwrap()):h.prototype.format.call(this,w,d)},p.prototype.formatAt=function(w,d,_,E){if(this.formats()[_]!=null||l.query(_,l.Scope.ATTRIBUTE)){var S=this.isolate(w,d);S.format(_,E)}else h.prototype.formatAt.call(this,w,d,_,E)},p.prototype.optimize=function(w){h.prototype.optimize.call(this,w);var d=this.formats();if(Object.keys(d).length===0)return this.unwrap();var _=this.next;_ instanceof p&&_.prev===this&&u(d,_.formats())&&(_.moveChildren(this),_.remove())},p.blotName="inline",p.scope=l.Scope.INLINE_BLOT,p.tagName="SPAN",p}(o.default);n.default=c},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var w in p)p.hasOwnProperty(w)&&(h[w]=p[w])};return function(h,p){c(h,p);function w(){this.constructor=h}h.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(18),l=a(1),u=function(c){i(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.formats=function(p){var w=l.query(h.blotName).tagName;if(p.tagName!==w)return c.formats.call(this,p)},h.prototype.format=function(p,w){l.query(p,l.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!w?this.replaceWith(h.blotName):c.prototype.format.call(this,p,w))},h.prototype.formatAt=function(p,w,d,_){l.query(d,l.Scope.BLOCK)!=null?this.format(d,_):c.prototype.formatAt.call(this,p,w,d,_)},h.prototype.insertAt=function(p,w,d){if(d==null||l.query(w,l.Scope.INLINE)!=null)c.prototype.insertAt.call(this,p,w,d);else{var _=this.split(p),E=l.create(w,d);_.parent.insertBefore(E,_)}},h.prototype.update=function(p,w){navigator.userAgent.match(/Trident/)?this.build():c.prototype.update.call(this,p,w)},h.blotName="block",h.scope=l.Scope.BLOCK_BLOT,h.tagName="P",h}(o.default);n.default=u},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var p in h)h.hasOwnProperty(p)&&(c[p]=h[p])};return function(c,h){u(c,h);function p(){this.constructor=c}c.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(19),l=function(u){i(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.formats=function(h){},c.prototype.format=function(h,p){u.prototype.formatAt.call(this,0,this.length(),h,p)},c.prototype.formatAt=function(h,p,w,d){h===0&&p===this.length()?this.format(w,d):u.prototype.formatAt.call(this,h,p,w,d)},c.prototype.formats=function(){return this.statics.formats(this.domNode)},c}(o.default);n.default=l},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var w in p)p.hasOwnProperty(w)&&(h[w]=p[w])};return function(h,p){c(h,p);function w(){this.constructor=h}h.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(19),l=a(1),u=function(c){i(h,c);function h(p){var w=c.call(this,p)||this;return w.text=w.statics.value(w.domNode),w}return h.create=function(p){return document.createTextNode(p)},h.value=function(p){var w=p.data;return w.normalize&&(w=w.normalize()),w},h.prototype.deleteAt=function(p,w){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+w)},h.prototype.index=function(p,w){return this.domNode===p?w:-1},h.prototype.insertAt=function(p,w,d){d==null?(this.text=this.text.slice(0,p)+w+this.text.slice(p),this.domNode.data=this.text):c.prototype.insertAt.call(this,p,w,d)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(p){c.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(p,w){return[this.domNode,p]},h.prototype.split=function(p,w){if(w===void 0&&(w=!1),!w){if(p===0)return this;if(p===this.length())return this.next}var d=l.create(this.domNode.splitText(p));return this.parent.insertBefore(d,this.next),this.text=this.statics.value(this.domNode),d},h.prototype.update=function(p,w){var d=this;p.some(function(_){return _.type==="characterData"&&_.target===d.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=l.Scope.INLINE_BLOT,h}(o.default);n.default=u},function(t,n,a){var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,u){return arguments.length>1&&!this.contains(l)==!u?u:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,u){return u=u||0,this.substr(u,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,u){var c=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>c.length)&&(u=c.length),u-=l.length;var h=c.indexOf(l,u);return h!==-1&&h===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var c=Object(this),h=c.length>>>0,p=arguments[1],w,d=0;d<h;d++)if(w=c[d],u.call(p,w,d,c))return w}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,n){var a=-1,i=1,o=0;function l(b,O,I){if(b==O)return b?[[o,b]]:[];(I<0||b.length<I)&&(I=null);var T=p(b,O),M=b.substring(0,T);b=b.substring(T),O=O.substring(T),T=w(b,O);var j=b.substring(b.length-T);b=b.substring(0,b.length-T),O=O.substring(0,O.length-T);var C=u(b,O);return M&&C.unshift([o,M]),j&&C.push([o,j]),_(C),I!=null&&(C=m(C,I)),C=g(C),C}function u(b,O){var I;if(!b)return[[i,O]];if(!O)return[[a,b]];var T=b.length>O.length?b:O,M=b.length>O.length?O:b,j=T.indexOf(M);if(j!=-1)return I=[[i,T.substring(0,j)],[o,M],[i,T.substring(j+M.length)]],b.length>O.length&&(I[0][0]=I[2][0]=a),I;if(M.length==1)return[[a,b],[i,O]];var C=d(b,O);if(C){var x=C[0],L=C[1],A=C[2],N=C[3],F=C[4],U=l(x,A),W=l(L,N);return U.concat([[o,F]],W)}return c(b,O)}function c(b,O){for(var I=b.length,T=O.length,M=Math.ceil((I+T)/2),j=M,C=2*M,x=new Array(C),L=new Array(C),A=0;A<C;A++)x[A]=-1,L[A]=-1;x[j+1]=0,L[j+1]=0;for(var N=I-T,F=N%2!=0,U=0,W=0,$=0,Z=0,V=0;V<M;V++){for(var G=-V+U;G<=V-W;G+=2){var z=j+G,D;G==-V||G!=V&&x[z-1]<x[z+1]?D=x[z+1]:D=x[z-1]+1;for(var K=D-G;D<I&&K<T&&b.charAt(D)==O.charAt(K);)D++,K++;if(x[z]=D,D>I)W+=2;else if(K>T)U+=2;else if(F){var ne=j+N-G;if(ne>=0&&ne<C&&L[ne]!=-1){var Q=I-L[ne];if(D>=Q)return h(b,O,D,K)}}}for(var ee=-V+$;ee<=V-Z;ee+=2){var ne=j+ee,Q;ee==-V||ee!=V&&L[ne-1]<L[ne+1]?Q=L[ne+1]:Q=L[ne-1]+1;for(var ae=Q-ee;Q<I&&ae<T&&b.charAt(I-Q-1)==O.charAt(T-ae-1);)Q++,ae++;if(L[ne]=Q,Q>I)Z+=2;else if(ae>T)$+=2;else if(!F){var z=j+N-ee;if(z>=0&&z<C&&x[z]!=-1){var D=x[z],K=j+D-z;if(Q=I-Q,D>=Q)return h(b,O,D,K)}}}}return[[a,b],[i,O]]}function h(b,O,I,T){var M=b.substring(0,I),j=O.substring(0,T),C=b.substring(I),x=O.substring(T),L=l(M,j),A=l(C,x);return L.concat(A)}function p(b,O){if(!b||!O||b.charAt(0)!=O.charAt(0))return 0;for(var I=0,T=Math.min(b.length,O.length),M=T,j=0;I<M;)b.substring(j,M)==O.substring(j,M)?(I=M,j=I):T=M,M=Math.floor((T-I)/2+I);return M}function w(b,O){if(!b||!O||b.charAt(b.length-1)!=O.charAt(O.length-1))return 0;for(var I=0,T=Math.min(b.length,O.length),M=T,j=0;I<M;)b.substring(b.length-M,b.length-j)==O.substring(O.length-M,O.length-j)?(I=M,j=I):T=M,M=Math.floor((T-I)/2+I);return M}function d(b,O){var I=b.length>O.length?b:O,T=b.length>O.length?O:b;if(I.length<4||T.length*2<I.length)return null;function M(W,$,Z){for(var V=W.substring(Z,Z+Math.floor(W.length/4)),G=-1,z="",D,K,ne,Q;(G=$.indexOf(V,G+1))!=-1;){var ee=p(W.substring(Z),$.substring(G)),ae=w(W.substring(0,Z),$.substring(0,G));z.length<ae+ee&&(z=$.substring(G-ae,G)+$.substring(G,G+ee),D=W.substring(0,Z-ae),K=W.substring(Z+ee),ne=$.substring(0,G-ae),Q=$.substring(G+ee))}return z.length*2>=W.length?[D,K,ne,Q,z]:null}var j=M(I,T,Math.ceil(I.length/4)),C=M(I,T,Math.ceil(I.length/2)),x;if(!j&&!C)return null;C?j?x=j[4].length>C[4].length?j:C:x=C:x=j;var L,A,N,F;b.length>O.length?(L=x[0],A=x[1],N=x[2],F=x[3]):(N=x[0],F=x[1],L=x[2],A=x[3]);var U=x[4];return[L,A,N,F,U]}function _(b){b.push([o,""]);for(var O=0,I=0,T=0,M="",j="",C;O<b.length;)switch(b[O][0]){case i:T++,j+=b[O][1],O++;break;case a:I++,M+=b[O][1],O++;break;case o:I+T>1?(I!==0&&T!==0&&(C=p(j,M),C!==0&&(O-I-T>0&&b[O-I-T-1][0]==o?b[O-I-T-1][1]+=j.substring(0,C):(b.splice(0,0,[o,j.substring(0,C)]),O++),j=j.substring(C),M=M.substring(C)),C=w(j,M),C!==0&&(b[O][1]=j.substring(j.length-C)+b[O][1],j=j.substring(0,j.length-C),M=M.substring(0,M.length-C))),I===0?b.splice(O-T,I+T,[i,j]):T===0?b.splice(O-I,I+T,[a,M]):b.splice(O-I-T,I+T,[a,M],[i,j]),O=O-I-T+(I?1:0)+(T?1:0)+1):O!==0&&b[O-1][0]==o?(b[O-1][1]+=b[O][1],b.splice(O,1)):O++,T=0,I=0,M="",j="";break}b[b.length-1][1]===""&&b.pop();var x=!1;for(O=1;O<b.length-1;)b[O-1][0]==o&&b[O+1][0]==o&&(b[O][1].substring(b[O][1].length-b[O-1][1].length)==b[O-1][1]?(b[O][1]=b[O-1][1]+b[O][1].substring(0,b[O][1].length-b[O-1][1].length),b[O+1][1]=b[O-1][1]+b[O+1][1],b.splice(O-1,1),x=!0):b[O][1].substring(0,b[O+1][1].length)==b[O+1][1]&&(b[O-1][1]+=b[O+1][1],b[O][1]=b[O][1].substring(b[O+1][1].length)+b[O+1][1],b.splice(O+1,1),x=!0)),O++;x&&_(b)}var E=l;E.INSERT=i,E.DELETE=a,E.EQUAL=o,t.exports=E;function S(b,O){if(O===0)return[o,b];for(var I=0,T=0;T<b.length;T++){var M=b[T];if(M[0]===a||M[0]===o){var j=I+M[1].length;if(O===j)return[T+1,b];if(O<j){b=b.slice();var C=O-I,x=[M[0],M[1].slice(0,C)],L=[M[0],M[1].slice(C)];return b.splice(T,1,x,L),[T+1,b]}else I=j}}throw new Error("cursor_pos is out of bounds!")}function m(b,O){var I=S(b,O),T=I[1],M=I[0],j=T[M],C=T[M+1];if(j==null)return b;if(j[0]!==o)return b;if(C!=null&&j[1]+C[1]===C[1]+j[1])return T.splice(M,2,C,j),v(T,M,2);if(C!=null&&C[1].indexOf(j[1])===0){T.splice(M,2,[C[0],j[1]],[0,j[1]]);var x=C[1].slice(j[1].length);return x.length>0&&T.splice(M+2,0,[C[0],x]),v(T,M,3)}else return b}function g(b){for(var O=!1,I=function(C){return C.charCodeAt(0)>=56320&&C.charCodeAt(0)<=57343},T=function(C){return C.charCodeAt(C.length-1)>=55296&&C.charCodeAt(C.length-1)<=56319},M=2;M<b.length;M+=1)b[M-2][0]===o&&T(b[M-2][1])&&b[M-1][0]===a&&I(b[M-1][1])&&b[M][0]===i&&I(b[M][1])&&(O=!0,b[M-1][1]=b[M-2][1].slice(-1)+b[M-1][1],b[M][1]=b[M-2][1].slice(-1)+b[M][1],b[M-2][1]=b[M-2][1].slice(0,-1));if(!O)return b;for(var j=[],M=0;M<b.length;M+=1)b[M][1].length>0&&j.push(b[M]);return j}function v(b,O,I){for(var T=O+I-1;T>=0&&T>=O-1;T--)if(T+1<b.length){var M=b[T],j=b[T+1];M[0]===j[1]&&b.splice(T,2,[M[0],M[1]+j[1]])}return b}},function(t,n){n=t.exports=typeof Object.keys=="function"?Object.keys:a,n.shim=a;function a(i){var o=[];for(var l in i)o.push(l);return o}},function(t,n){var a=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=t.exports=a?i:o,n.supported=i;function i(l){return Object.prototype.toString.call(l)=="[object Arguments]"}n.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(t,n){var a=Object.prototype.hasOwnProperty,i="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(i=!1));function l(c,h,p){this.fn=c,this.context=h,this.once=p||!1}function u(){this._events=new o,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],p,w;if(this._eventsCount===0)return h;for(w in p=this._events)a.call(p,w)&&h.push(i?w.slice(1):w);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h,p){var w=i?i+h:h,d=this._events[w];if(p)return!!d;if(!d)return[];if(d.fn)return[d.fn];for(var _=0,E=d.length,S=new Array(E);_<E;_++)S[_]=d[_].fn;return S},u.prototype.emit=function(h,p,w,d,_,E){var S=i?i+h:h;if(!this._events[S])return!1;var m=this._events[S],g=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,w),!0;case 4:return m.fn.call(m.context,p,w,d),!0;case 5:return m.fn.call(m.context,p,w,d,_),!0;case 6:return m.fn.call(m.context,p,w,d,_,E),!0}for(b=1,v=new Array(g-1);b<g;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var O=m.length,I;for(b=0;b<O;b++)switch(m[b].once&&this.removeListener(h,m[b].fn,void 0,!0),g){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,p);break;case 3:m[b].fn.call(m[b].context,p,w);break;case 4:m[b].fn.call(m[b].context,p,w,d);break;default:if(!v)for(I=1,v=new Array(g-1);I<g;I++)v[I-1]=arguments[I];m[b].fn.apply(m[b].context,v)}}return!0},u.prototype.on=function(h,p,w){var d=new l(p,w||this),_=i?i+h:h;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],d]:this._events[_].push(d):(this._events[_]=d,this._eventsCount++),this},u.prototype.once=function(h,p,w){var d=new l(p,w||this,!0),_=i?i+h:h;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],d]:this._events[_].push(d):(this._events[_]=d,this._eventsCount++),this},u.prototype.removeListener=function(h,p,w,d){var _=i?i+h:h;if(!this._events[_])return this;if(!p)return--this._eventsCount===0?this._events=new o:delete this._events[_],this;var E=this._events[_];if(E.fn)E.fn===p&&(!d||E.once)&&(!w||E.context===w)&&(--this._eventsCount===0?this._events=new o:delete this._events[_]);else{for(var S=0,m=[],g=E.length;S<g;S++)(E[S].fn!==p||d&&!E[S].once||w&&E[S].context!==w)&&m.push(E[S]);m.length?this._events[_]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new o:delete this._events[_]}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=i?i+h:h,this._events[p]&&(--this._eventsCount===0?this._events=new o:delete this._events[p])):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=i,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},o=function(){function be(Ae,Ee){var Le=[],he=!0,ke=!1,Re=void 0;try{for(var $e=Ae[Symbol.iterator](),vt;!(he=(vt=$e.next()).done)&&(Le.push(vt.value),!(Ee&&Le.length===Ee));he=!0);}catch(wt){ke=!0,Re=wt}finally{try{!he&&$e.return&&$e.return()}finally{if(ke)throw Re}}return Le}return function(Ae,Ee){if(Array.isArray(Ae))return Ae;if(Symbol.iterator in Object(Ae))return be(Ae,Ee);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function be(Ae,Ee){for(var Le=0;Le<Ee.length;Le++){var he=Ee[Le];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(Ae,he.key,he)}}return function(Ae,Ee,Le){return Ee&&be(Ae.prototype,Ee),Le&&be(Ae,Le),Ae}}(),u=a(3),c=L(u),h=a(2),p=L(h),w=a(0),d=L(w),_=a(5),E=L(_),S=a(10),m=L(S),g=a(9),v=L(g),b=a(36),O=a(37),I=a(13),T=L(I),M=a(26),j=a(38),C=a(39),x=a(40);function L(be){return be&&be.__esModule?be:{default:be}}function A(be,Ae,Ee){return Ae in be?Object.defineProperty(be,Ae,{value:Ee,enumerable:!0,configurable:!0,writable:!0}):be[Ae]=Ee,be}function N(be,Ae){if(!(be instanceof Ae))throw new TypeError("Cannot call a class as a function")}function F(be,Ae){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ae&&(typeof Ae=="object"||typeof Ae=="function")?Ae:be}function U(be,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ae);be.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),Ae&&(Object.setPrototypeOf?Object.setPrototypeOf(be,Ae):be.__proto__=Ae)}var W=(0,m.default)("quill:clipboard"),$="__ql-matcher",Z=[[Node.TEXT_NODE,Xe],[Node.TEXT_NODE,Ne],["br",me],[Node.ELEMENT_NODE,Ne],[Node.ELEMENT_NODE,ce],[Node.ELEMENT_NODE,xe],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,ve],["li",Oe],["b",ae.bind(ae,"bold")],["i",ae.bind(ae,"italic")],["style",Se]],V=[b.AlignAttribute,j.DirectionAttribute].reduce(function(be,Ae){return be[Ae.keyName]=Ae,be},{}),G=[b.AlignStyle,O.BackgroundStyle,M.ColorStyle,j.DirectionStyle,C.FontStyle,x.SizeStyle].reduce(function(be,Ae){return be[Ae.keyName]=Ae,be},{}),z=function(be){U(Ae,be);function Ae(Ee,Le){N(this,Ae);var he=F(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,Ee,Le));return he.quill.root.addEventListener("paste",he.onPaste.bind(he)),he.container=he.quill.addContainer("ql-clipboard"),he.container.setAttribute("contenteditable",!0),he.container.setAttribute("tabindex",-1),he.matchers=[],Z.concat(he.options.matchers).forEach(function(ke){var Re=o(ke,2),$e=Re[0],vt=Re[1];!Le.matchVisual&&vt===xe||he.addMatcher($e,vt)}),he}return l(Ae,[{key:"addMatcher",value:function(Le,he){this.matchers.push([Le,he])}},{key:"convert",value:function(Le){if(typeof Le=="string")return this.container.innerHTML=Le.replace(/\>\r?\n +\</g,"><"),this.convert();var he=this.quill.getFormat(this.quill.selection.savedRange.index);if(he[T.default.blotName]){var ke=this.container.innerText;return this.container.innerHTML="",new p.default().insert(ke,A({},T.default.blotName,he[T.default.blotName]))}var Re=this.prepareMatching(),$e=o(Re,2),vt=$e[0],wt=$e[1],at=ee(this.container,vt,wt);return ne(at,`
|
|
140
|
-
`)&&at.ops[at.ops.length-1].attributes==null&&(at=at.compose(new p.default().retain(at.length()-1).delete(1))),W.log("convert",this.container.innerHTML,at),this.container.innerHTML="",at}},{key:"dangerouslyPasteHTML",value:function(Le,he){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E.default.sources.API;if(typeof Le=="string")this.quill.setContents(this.convert(Le),he),this.quill.setSelection(0,E.default.sources.SILENT);else{var Re=this.convert(he);this.quill.updateContents(new p.default().retain(Le).concat(Re),ke),this.quill.setSelection(Le+Re.length(),E.default.sources.SILENT)}}},{key:"onPaste",value:function(Le){var he=this;if(!(Le.defaultPrevented||!this.quill.isEnabled())){var ke=this.quill.getSelection(),Re=new p.default().retain(ke.index),$e=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(E.default.sources.SILENT),setTimeout(function(){Re=Re.concat(he.convert()).delete(ke.length),he.quill.updateContents(Re,E.default.sources.USER),he.quill.setSelection(Re.length()-ke.length,E.default.sources.SILENT),he.quill.scrollingContainer.scrollTop=$e,he.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Le=this,he=[],ke=[];return this.matchers.forEach(function(Re){var $e=o(Re,2),vt=$e[0],wt=$e[1];switch(vt){case Node.TEXT_NODE:ke.push(wt);break;case Node.ELEMENT_NODE:he.push(wt);break;default:[].forEach.call(Le.container.querySelectorAll(vt),function(at){at[$]=at[$]||[],at[$].push(wt)});break}}),[he,ke]}}]),Ae}(v.default);z.DEFAULTS={matchers:[],matchVisual:!0};function D(be,Ae,Ee){return(typeof Ae>"u"?"undefined":i(Ae))==="object"?Object.keys(Ae).reduce(function(Le,he){return D(Le,he,Ae[he])},be):be.reduce(function(Le,he){return he.attributes&&he.attributes[Ae]?Le.push(he):Le.insert(he.insert,(0,c.default)({},A({},Ae,Ee),he.attributes))},new p.default)}function K(be){if(be.nodeType!==Node.ELEMENT_NODE)return{};var Ae="__ql-computed-style";return be[Ae]||(be[Ae]=window.getComputedStyle(be))}function ne(be,Ae){for(var Ee="",Le=be.ops.length-1;Le>=0&&Ee.length<Ae.length;--Le){var he=be.ops[Le];if(typeof he.insert!="string")break;Ee=he.insert+Ee}return Ee.slice(-1*Ae.length)===Ae}function Q(be){if(be.childNodes.length===0)return!1;var Ae=K(be);return["block","list-item"].indexOf(Ae.display)>-1}function ee(be,Ae,Ee){return be.nodeType===be.TEXT_NODE?Ee.reduce(function(Le,he){return he(be,Le)},new p.default):be.nodeType===be.ELEMENT_NODE?[].reduce.call(be.childNodes||[],function(Le,he){var ke=ee(he,Ae,Ee);return he.nodeType===be.ELEMENT_NODE&&(ke=Ae.reduce(function(Re,$e){return $e(he,Re)},ke),ke=(he[$]||[]).reduce(function(Re,$e){return $e(he,Re)},ke)),Le.concat(ke)},new p.default):new p.default}function ae(be,Ae,Ee){return D(Ee,be,!0)}function se(be,Ae){var Ee=d.default.Attributor.Attribute.keys(be),Le=d.default.Attributor.Class.keys(be),he=d.default.Attributor.Style.keys(be),ke={};return Ee.concat(Le).concat(he).forEach(function(Re){var $e=d.default.query(Re,d.default.Scope.ATTRIBUTE);$e!=null&&(ke[$e.attrName]=$e.value(be),ke[$e.attrName])||($e=V[Re],$e!=null&&($e.attrName===Re||$e.keyName===Re)&&(ke[$e.attrName]=$e.value(be)||void 0),$e=G[Re],$e!=null&&($e.attrName===Re||$e.keyName===Re)&&($e=G[Re],ke[$e.attrName]=$e.value(be)||void 0))}),Object.keys(ke).length>0&&(Ae=D(Ae,ke)),Ae}function ce(be,Ae){var Ee=d.default.query(be);if(Ee==null)return Ae;if(Ee.prototype instanceof d.default.Embed){var Le={},he=Ee.value(be);he!=null&&(Le[Ee.blotName]=he,Ae=new p.default().insert(Le,Ee.formats(be)))}else typeof Ee.formats=="function"&&(Ae=D(Ae,Ee.blotName,Ee.formats(be)));return Ae}function me(be,Ae){return ne(Ae,`
|
|
141
|
-
`)||Ae.insert(`
|
|
142
|
-
`),Ae}function Se(){return new p.default}function Oe(be,Ae){var Ee=d.default.query(be);if(Ee==null||Ee.blotName!=="list-item"||!ne(Ae,`
|
|
143
|
-
`))return Ae;for(var Le=-1,he=be.parentNode;!he.classList.contains("ql-clipboard");)(d.default.query(he)||{}).blotName==="list"&&(Le+=1),he=he.parentNode;return Le<=0?Ae:Ae.compose(new p.default().retain(Ae.length()-1).retain(1,{indent:Le}))}function Ne(be,Ae){return ne(Ae,`
|
|
144
|
-
`)||(Q(be)||Ae.length()>0&&be.nextSibling&&Q(be.nextSibling))&&Ae.insert(`
|
|
145
|
-
`),Ae}function xe(be,Ae){if(Q(be)&&be.nextElementSibling!=null&&!ne(Ae,`
|
|
146
|
-
|
|
147
|
-
`)){var Ee=be.offsetHeight+parseFloat(K(be).marginTop)+parseFloat(K(be).marginBottom);be.nextElementSibling.offsetTop>be.offsetTop+Ee*1.5&&Ae.insert(`
|
|
148
|
-
`)}return Ae}function ve(be,Ae){var Ee={},Le=be.style||{};return Le.fontStyle&&K(be).fontStyle==="italic"&&(Ee.italic=!0),Le.fontWeight&&(K(be).fontWeight.startsWith("bold")||parseInt(K(be).fontWeight)>=700)&&(Ee.bold=!0),Object.keys(Ee).length>0&&(Ae=D(Ae,Ee)),parseFloat(Le.textIndent||0)>0&&(Ae=new p.default().insert(" ").concat(Ae)),Ae}function Xe(be,Ae){var Ee=be.data;if(be.parentNode.tagName==="O:P")return Ae.insert(Ee.trim());if(Ee.trim().length===0&&be.parentNode.classList.contains("ql-clipboard"))return Ae;if(!K(be.parentNode).whiteSpace.startsWith("pre")){var Le=function(ke,Re){return Re=Re.replace(/[^\u00a0]/g,""),Re.length<1&&ke?" ":Re};Ee=Ee.replace(/\r\n/g," ").replace(/\n/g," "),Ee=Ee.replace(/\s\s+/g,Le.bind(Le,!0)),(be.previousSibling==null&&Q(be.parentNode)||be.previousSibling!=null&&Q(be.previousSibling))&&(Ee=Ee.replace(/^\s+/,Le.bind(Le,!1))),(be.nextSibling==null&&Q(be.parentNode)||be.nextSibling!=null&&Q(be.nextSibling))&&(Ee=Ee.replace(/\s+$/,Le.bind(Le,!1)))}return Ae.insert(Ee)}n.default=z,n.matchAttributor=se,n.matchBlot=ce,n.matchNewline=Ne,n.matchSpacing=xe,n.matchText=Xe},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(E,S){for(var m=0;m<S.length;m++){var g=S[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}return function(E,S,m){return S&&_(E.prototype,S),m&&_(E,m),E}}(),o=function _(E,S,m){E===null&&(E=Function.prototype);var g=Object.getOwnPropertyDescriptor(E,S);if(g===void 0){var v=Object.getPrototypeOf(E);return v===null?void 0:_(v,S,m)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(m)}},l=a(6),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(){return h(this,E),p(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return i(E,[{key:"optimize",value:function(m){o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),E}(u.default);d.blotName="bold",d.tagName=["STRONG","B"],n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var i=function(){function x(L,A){var N=[],F=!0,U=!1,W=void 0;try{for(var $=L[Symbol.iterator](),Z;!(F=(Z=$.next()).done)&&(N.push(Z.value),!(A&&N.length===A));F=!0);}catch(V){U=!0,W=V}finally{try{!F&&$.return&&$.return()}finally{if(U)throw W}}return N}return function(L,A){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return x(L,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function x(L,A){for(var N=0;N<A.length;N++){var F=A[N];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(L,F.key,F)}}return function(L,A,N){return A&&x(L.prototype,A),N&&x(L,N),L}}(),l=a(2),u=m(l),c=a(0),h=m(c),p=a(5),w=m(p),d=a(10),_=m(d),E=a(9),S=m(E);function m(x){return x&&x.__esModule?x:{default:x}}function g(x,L,A){return L in x?Object.defineProperty(x,L,{value:A,enumerable:!0,configurable:!0,writable:!0}):x[L]=A,x}function v(x,L){if(!(x instanceof L))throw new TypeError("Cannot call a class as a function")}function b(x,L){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:x}function O(x,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);x.prototype=Object.create(L&&L.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(x,L):x.__proto__=L)}var I=(0,_.default)("quill:toolbar"),T=function(x){O(L,x);function L(A,N){v(this,L);var F=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,A,N));if(Array.isArray(F.options.container)){var U=document.createElement("div");j(U,F.options.container),A.container.parentNode.insertBefore(U,A.container),F.container=U}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var W;return W=I.error("Container required for toolbar",F.options),b(F,W)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function($){F.addHandler($,F.options.handlers[$])}),[].forEach.call(F.container.querySelectorAll("button, select"),function($){F.attach($)}),F.quill.on(w.default.events.EDITOR_CHANGE,function($,Z){$===w.default.events.SELECTION_CHANGE&&F.update(Z)}),F.quill.on(w.default.events.SCROLL_OPTIMIZE,function(){var $=F.quill.selection.getRange(),Z=i($,1),V=Z[0];F.update(V)}),F}return o(L,[{key:"addHandler",value:function(N,F){this.handlers[N]=F}},{key:"attach",value:function(N){var F=this,U=[].find.call(N.classList,function($){return $.indexOf("ql-")===0});if(U){if(U=U.slice(3),N.tagName==="BUTTON"&&N.setAttribute("type","button"),this.handlers[U]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[U]==null){I.warn("ignoring attaching to disabled format",U,N);return}if(h.default.query(U)==null){I.warn("ignoring attaching to nonexistent format",U,N);return}}var W=N.tagName==="SELECT"?"change":"click";N.addEventListener(W,function($){var Z=void 0;if(N.tagName==="SELECT"){if(N.selectedIndex<0)return;var V=N.options[N.selectedIndex];V.hasAttribute("selected")?Z=!1:Z=V.value||!1}else N.classList.contains("ql-active")?Z=!1:Z=N.value||!N.hasAttribute("value"),$.preventDefault();F.quill.focus();var G=F.quill.selection.getRange(),z=i(G,1),D=z[0];if(F.handlers[U]!=null)F.handlers[U].call(F,Z);else if(h.default.query(U).prototype instanceof h.default.Embed){if(Z=prompt("Enter "+U),!Z)return;F.quill.updateContents(new u.default().retain(D.index).delete(D.length).insert(g({},U,Z)),w.default.sources.USER)}else F.quill.format(U,Z,w.default.sources.USER);F.update(D)}),this.controls.push([U,N])}}},{key:"update",value:function(N){var F=N==null?{}:this.quill.getFormat(N);this.controls.forEach(function(U){var W=i(U,2),$=W[0],Z=W[1];if(Z.tagName==="SELECT"){var V=void 0;if(N==null)V=null;else if(F[$]==null)V=Z.querySelector("option[selected]");else if(!Array.isArray(F[$])){var G=F[$];typeof G=="string"&&(G=G.replace(/\"/g,'\\"')),V=Z.querySelector('option[value="'+G+'"]')}V==null?(Z.value="",Z.selectedIndex=-1):V.selected=!0}else if(N==null)Z.classList.remove("ql-active");else if(Z.hasAttribute("value")){var z=F[$]===Z.getAttribute("value")||F[$]!=null&&F[$].toString()===Z.getAttribute("value")||F[$]==null&&!Z.getAttribute("value");Z.classList.toggle("ql-active",z)}else Z.classList.toggle("ql-active",F[$]!=null)})}}]),L}(S.default);T.DEFAULTS={};function M(x,L,A){var N=document.createElement("button");N.setAttribute("type","button"),N.classList.add("ql-"+L),A!=null&&(N.value=A),x.appendChild(N)}function j(x,L){Array.isArray(L[0])||(L=[L]),L.forEach(function(A){var N=document.createElement("span");N.classList.add("ql-formats"),A.forEach(function(F){if(typeof F=="string")M(N,F);else{var U=Object.keys(F)[0],W=F[U];Array.isArray(W)?C(N,U,W):M(N,U,W)}}),x.appendChild(N)})}function C(x,L,A){var N=document.createElement("select");N.classList.add("ql-"+L),A.forEach(function(F){var U=document.createElement("option");F!==!1?U.setAttribute("value",F):U.setAttribute("selected","selected"),N.appendChild(U)}),x.appendChild(N)}T.DEFAULTS={container:null,handlers:{clean:function(){var L=this,A=this.quill.getSelection();if(A!=null)if(A.length==0){var N=this.quill.getFormat();Object.keys(N).forEach(function(F){h.default.query(F,h.default.Scope.INLINE)!=null&&L.quill.format(F,!1)})}else this.quill.removeFormat(A,w.default.sources.USER)},direction:function(L){var A=this.quill.getFormat().align;L==="rtl"&&A==null?this.quill.format("align","right",w.default.sources.USER):!L&&A==="right"&&this.quill.format("align",!1,w.default.sources.USER),this.quill.format("direction",L,w.default.sources.USER)},indent:function(L){var A=this.quill.getSelection(),N=this.quill.getFormat(A),F=parseInt(N.indent||0);if(L==="+1"||L==="-1"){var U=L==="+1"?1:-1;N.direction==="rtl"&&(U*=-1),this.quill.format("indent",F+U,w.default.sources.USER)}},link:function(L){L===!0&&(L=prompt("Enter link URL:")),this.quill.format("link",L,w.default.sources.USER)},list:function(L){var A=this.quill.getSelection(),N=this.quill.getFormat(A);L==="check"?N.list==="checked"||N.list==="unchecked"?this.quill.format("list",!1,w.default.sources.USER):this.quill.format("list","unchecked",w.default.sources.USER):this.quill.format("list",L,w.default.sources.USER)}}},n.default=T,n.addControls=j},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(E,S){for(var m=0;m<S.length;m++){var g=S[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}return function(E,S,m){return S&&_(E.prototype,S),m&&_(E,m),E}}(),o=function _(E,S,m){E===null&&(E=Function.prototype);var g=Object.getOwnPropertyDescriptor(E,S);if(g===void 0){var v=Object.getPrototypeOf(E);return v===null?void 0:_(v,S,m)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(m)}},l=a(28),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(S,m){h(this,E);var g=p(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,S));return g.label.innerHTML=m,g.container.classList.add("ql-color-picker"),[].slice.call(g.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(v){v.classList.add("ql-primary")}),g}return i(E,[{key:"buildItem",value:function(m){var g=o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"buildItem",this).call(this,m);return g.style.backgroundColor=m.getAttribute("value")||"",g}},{key:"selectItem",value:function(m,g){o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"selectItem",this).call(this,m,g);var v=this.label.querySelector(".ql-color-label"),b=m&&m.getAttribute("data-value")||"";v&&(v.tagName==="line"?v.style.stroke=b:v.style.fill=b)}}]),E}(u.default);n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(E,S){for(var m=0;m<S.length;m++){var g=S[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}return function(E,S,m){return S&&_(E.prototype,S),m&&_(E,m),E}}(),o=function _(E,S,m){E===null&&(E=Function.prototype);var g=Object.getOwnPropertyDescriptor(E,S);if(g===void 0){var v=Object.getPrototypeOf(E);return v===null?void 0:_(v,S,m)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(m)}},l=a(28),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(S,m){h(this,E);var g=p(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,S));return g.container.classList.add("ql-icon-picker"),[].forEach.call(g.container.querySelectorAll(".ql-picker-item"),function(v){v.innerHTML=m[v.getAttribute("data-value")||""]}),g.defaultItem=g.container.querySelector(".ql-selected"),g.selectItem(g.defaultItem),g}return i(E,[{key:"selectItem",value:function(m,g){o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"selectItem",this).call(this,m,g),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),E}(u.default);n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function u(c,h){for(var p=0;p<h.length;p++){var w=h[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,h,p){return h&&u(c.prototype,h),p&&u(c,p),c}}();function o(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(c,h){var p=this;o(this,u),this.quill=c,this.boundsContainer=h||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return i(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(h){var p=h.left+h.width/2-this.root.offsetWidth/2,w=h.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=w+"px",this.root.classList.remove("ql-flip");var d=this.boundsContainer.getBoundingClientRect(),_=this.root.getBoundingClientRect(),E=0;if(_.right>d.right&&(E=d.right-_.right,this.root.style.left=p+E+"px"),_.left<d.left&&(E=d.left-_.left,this.root.style.left=p+E+"px"),_.bottom>d.bottom){var S=_.bottom-_.top,m=h.bottom-h.top+S;this.root.style.top=w-m+"px",this.root.classList.add("ql-flip")}return E}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();n.default=l},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function C(x,L){var A=[],N=!0,F=!1,U=void 0;try{for(var W=x[Symbol.iterator](),$;!(N=($=W.next()).done)&&(A.push($.value),!(L&&A.length===L));N=!0);}catch(Z){F=!0,U=Z}finally{try{!N&&W.return&&W.return()}finally{if(F)throw U}}return A}return function(x,L){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return C(x,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function C(x,L,A){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,L);if(N===void 0){var F=Object.getPrototypeOf(x);return F===null?void 0:C(F,L,A)}else{if("value"in N)return N.value;var U=N.get;return U===void 0?void 0:U.call(A)}},l=function(){function C(x,L){for(var A=0;A<L.length;A++){var N=L[A];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,L,A){return L&&C(x.prototype,L),A&&C(x,A),x}}(),u=a(3),c=v(u),h=a(8),p=v(h),w=a(43),d=v(w),_=a(27),E=v(_),S=a(15),m=a(41),g=v(m);function v(C){return C&&C.__esModule?C:{default:C}}function b(C,x){if(!(C instanceof x))throw new TypeError("Cannot call a class as a function")}function O(C,x){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:C}function I(C,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);C.prototype=Object.create(x&&x.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(C,x):C.__proto__=x)}var T=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],M=function(C){I(x,C);function x(L,A){b(this,x),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=T);var N=O(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,L,A));return N.quill.container.classList.add("ql-snow"),N}return l(x,[{key:"extendToolbar",value:function(A){A.container.classList.add("ql-snow"),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),g.default),this.tooltip=new j(this.quill,this.options.bounds),A.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(N,F){A.handlers.link.call(A,!F.format.link)})}}]),x}(d.default);M.DEFAULTS=(0,c.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(x){if(x){var L=this.quill.getSelection();if(L==null||L.length==0)return;var A=this.quill.getText(L);/^\S+@\S+\.\S+$/.test(A)&&A.indexOf("mailto:")!==0&&(A="mailto:"+A);var N=this.quill.theme.tooltip;N.edit("link",A)}else this.quill.format("link",!1)}}}}});var j=function(C){I(x,C);function x(L,A){b(this,x);var N=O(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,L,A));return N.preview=N.root.querySelector("a.ql-preview"),N}return l(x,[{key:"listen",value:function(){var A=this;o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(N){A.root.classList.contains("ql-editing")?A.save():A.edit("link",A.preview.textContent),N.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(N){if(A.linkRange!=null){var F=A.linkRange;A.restoreFocus(),A.quill.formatText(F,"link",!1,p.default.sources.USER),delete A.linkRange}N.preventDefault(),A.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(N,F,U){if(N!=null){if(N.length===0&&U===p.default.sources.USER){var W=A.quill.scroll.descendant(E.default,N.index),$=i(W,2),Z=$[0],V=$[1];if(Z!=null){A.linkRange=new S.Range(N.index-V,Z.length());var G=E.default.formats(Z.domNode);A.preview.textContent=G,A.preview.setAttribute("href",G),A.show(),A.position(A.quill.getBounds(A.linkRange));return}}else delete A.linkRange;A.hide()}})}},{key:"show",value:function(){o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),x}(w.BaseTooltip);j.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=M},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(29),o=he(i),l=a(36),u=a(38),c=a(64),h=a(65),p=he(h),w=a(66),d=he(w),_=a(67),E=he(_),S=a(37),m=a(26),g=a(39),v=a(40),b=a(56),O=he(b),I=a(68),T=he(I),M=a(27),j=he(M),C=a(69),x=he(C),L=a(70),A=he(L),N=a(71),F=he(N),U=a(72),W=he(U),$=a(73),Z=he($),V=a(13),G=he(V),z=a(74),D=he(z),K=a(75),ne=he(K),Q=a(57),ee=he(Q),ae=a(41),se=he(ae),ce=a(28),me=he(ce),Se=a(59),Oe=he(Se),Ne=a(60),xe=he(Ne),ve=a(61),Xe=he(ve),be=a(108),Ae=he(be),Ee=a(62),Le=he(Ee);function he(ke){return ke&&ke.__esModule?ke:{default:ke}}o.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":S.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":g.FontClass,"attributors/class/size":v.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":S.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":g.FontStyle,"attributors/style/size":v.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":c.IndentClass,"formats/background":S.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":g.FontClass,"formats/size":v.SizeClass,"formats/blockquote":p.default,"formats/code-block":G.default,"formats/header":d.default,"formats/list":E.default,"formats/bold":O.default,"formats/code":V.Code,"formats/italic":T.default,"formats/link":j.default,"formats/script":x.default,"formats/strike":A.default,"formats/underline":F.default,"formats/image":W.default,"formats/video":Z.default,"formats/list/item":_.ListItem,"modules/formula":D.default,"modules/syntax":ne.default,"modules/toolbar":ee.default,"themes/bubble":Ae.default,"themes/snow":Le.default,"ui/icons":se.default,"ui/picker":me.default,"ui/icon-picker":xe.default,"ui/color-picker":Oe.default,"ui/tooltip":Xe.default},!0),n.default=o.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var i=function(){function E(S,m){for(var g=0;g<m.length;g++){var v=m[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(S,v.key,v)}}return function(S,m,g){return m&&E(S.prototype,m),g&&E(S,g),S}}(),o=function E(S,m,g){S===null&&(S=Function.prototype);var v=Object.getOwnPropertyDescriptor(S,m);if(v===void 0){var b=Object.getPrototypeOf(S);return b===null?void 0:E(b,m,g)}else{if("value"in v)return v.value;var O=v.get;return O===void 0?void 0:O.call(g)}},l=a(0),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function p(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function w(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var d=function(E){w(S,E);function S(){return h(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,[{key:"add",value:function(g,v){if(v==="+1"||v==="-1"){var b=this.value(g)||0;v=v==="+1"?b+1:b-1}return v===0?(this.remove(g),!0):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"add",this).call(this,g,v)}},{key:"canAdd",value:function(g,v){return o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"canAdd",this).call(this,g,v)||o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"canAdd",this).call(this,g,parseInt(v))}},{key:"value",value:function(g){return parseInt(o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"value",this).call(this,g))||void 0}}]),S}(u.default.Attributor.Class),_=new d("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(4),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function c(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function h(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var p=function(w){h(d,w);function d(){return u(this,d),c(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(o.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function d(_,E){for(var S=0;S<E.length;S++){var m=E[S];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(_,m.key,m)}}return function(_,E,S){return E&&d(_.prototype,E),S&&d(_,S),_}}(),o=a(4),l=u(o);function u(d){return d&&d.__esModule?d:{default:d}}function c(d,_){if(!(d instanceof _))throw new TypeError("Cannot call a class as a function")}function h(d,_){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:d}function p(d,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);d.prototype=Object.create(_&&_.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(d,_):d.__proto__=_)}var w=function(d){p(_,d);function _(){return c(this,_),h(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return i(_,null,[{key:"formats",value:function(S){return this.tagName.indexOf(S.tagName)+1}}]),_}(l.default);w.blotName="header",w.tagName=["H1","H2","H3","H4","H5","H6"],n.default=w},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var i=function(){function b(O,I){for(var T=0;T<I.length;T++){var M=I[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}return function(O,I,T){return I&&b(O.prototype,I),T&&b(O,T),O}}(),o=function b(O,I,T){O===null&&(O=Function.prototype);var M=Object.getOwnPropertyDescriptor(O,I);if(M===void 0){var j=Object.getPrototypeOf(O);return j===null?void 0:b(j,I,T)}else{if("value"in M)return M.value;var C=M.get;return C===void 0?void 0:C.call(T)}},l=a(0),u=d(l),c=a(4),h=d(c),p=a(25),w=d(p);function d(b){return b&&b.__esModule?b:{default:b}}function _(b,O,I){return O in b?Object.defineProperty(b,O,{value:I,enumerable:!0,configurable:!0,writable:!0}):b[O]=I,b}function E(b,O){if(!(b instanceof O))throw new TypeError("Cannot call a class as a function")}function S(b,O){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:b}function m(b,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);b.prototype=Object.create(O&&O.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(b,O):b.__proto__=O)}var g=function(b){m(O,b);function O(){return E(this,O),S(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return i(O,[{key:"format",value:function(T,M){T===v.blotName&&!M?this.replaceWith(u.default.create(this.statics.scope)):o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,T,M)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(T,M){return this.parent.isolate(this.offset(this.parent),this.length()),T===this.parent.statics.blotName?(this.parent.replaceWith(T,M),this):(this.parent.unwrap(),o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,T,M))}}],[{key:"formats",value:function(T){return T.tagName===this.tagName?void 0:o(O.__proto__||Object.getPrototypeOf(O),"formats",this).call(this,T)}}]),O}(h.default);g.blotName="list-item",g.tagName="LI";var v=function(b){m(O,b),i(O,null,[{key:"create",value:function(T){var M=T==="ordered"?"OL":"UL",j=o(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,M);return(T==="checked"||T==="unchecked")&&j.setAttribute("data-checked",T==="checked"),j}},{key:"formats",value:function(T){if(T.tagName==="OL")return"ordered";if(T.tagName==="UL")return T.hasAttribute("data-checked")?T.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function O(I){E(this,O);var T=S(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,I)),M=function(C){if(C.target.parentNode===I){var x=T.statics.formats(I),L=u.default.find(C.target);x==="checked"?L.format("list","unchecked"):x==="unchecked"&&L.format("list","checked")}};return I.addEventListener("touchstart",M),I.addEventListener("mousedown",M),T}return i(O,[{key:"format",value:function(T,M){this.children.length>0&&this.children.tail.format(T,M)}},{key:"formats",value:function(){return _({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(T,M){if(T instanceof g)o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,T,M);else{var j=M==null?this.length():M.offset(this),C=this.split(j);C.parent.insertBefore(T,C)}}},{key:"optimize",value:function(T){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,T);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&M.domNode.tagName===this.domNode.tagName&&M.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(M.moveChildren(this),M.remove())}},{key:"replace",value:function(T){if(T.statics.blotName!==this.statics.blotName){var M=u.default.create(this.statics.defaultChild);T.moveChildren(M),this.appendChild(M)}o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replace",this).call(this,T)}}]),O}(w.default);v.blotName="list",v.scope=u.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[g],n.ListItem=g,n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(56),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function c(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function h(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var p=function(w){h(d,w);function d(){return u(this,d),c(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(o.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(E,S){for(var m=0;m<S.length;m++){var g=S[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(E,g.key,g)}}return function(E,S,m){return S&&_(E.prototype,S),m&&_(E,m),E}}(),o=function _(E,S,m){E===null&&(E=Function.prototype);var g=Object.getOwnPropertyDescriptor(E,S);if(g===void 0){var v=Object.getPrototypeOf(E);return v===null?void 0:_(v,S,m)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(m)}},l=a(6),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}function h(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function p(_,E){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:_}function w(_,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);_.prototype=Object.create(E&&E.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(_,E):_.__proto__=E)}var d=function(_){w(E,_);function E(){return h(this,E),p(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return i(E,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):o(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),E}(u.default);d.blotName="script",d.tagName=["SUB","SUP"],n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(6),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function c(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function h(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var p=function(w){h(d,w);function d(){return u(this,d),c(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(o.default);p.blotName="strike",p.tagName="S",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(6),o=l(i);function l(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function c(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function h(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var p=function(w){h(d,w);function d(){return u(this,d),c(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(o.default);p.blotName="underline",p.tagName="U",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function S(m,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,v){return g&&S(m.prototype,g),v&&S(m,v),m}}(),o=function S(m,g,v){m===null&&(m=Function.prototype);var b=Object.getOwnPropertyDescriptor(m,g);if(b===void 0){var O=Object.getPrototypeOf(m);return O===null?void 0:S(O,g,v)}else{if("value"in b)return b.value;var I=b.get;return I===void 0?void 0:I.call(v)}},l=a(0),u=h(l),c=a(27);function h(S){return S&&S.__esModule?S:{default:S}}function p(S,m){if(!(S instanceof m))throw new TypeError("Cannot call a class as a function")}function w(S,m){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:S}function d(S,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);S.prototype=Object.create(m&&m.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(S,m):S.__proto__=m)}var _=["alt","height","width"],E=function(S){d(m,S);function m(){return p(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"format",value:function(v,b){_.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,v);return typeof v=="string"&&b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return _.reduce(function(b,O){return v.hasAttribute(O)&&(b[O]=v.getAttribute(O)),b},{})}},{key:"match",value:function(v){return/\.(jpe?g|gif|png)$/.test(v)||/^data:image\/.+;base64/.test(v)}},{key:"sanitize",value:function(v){return(0,c.sanitize)(v,["http","https","data"])?v:"//:0"}},{key:"value",value:function(v){return v.getAttribute("src")}}]),m}(u.default.Embed);E.blotName="image",E.tagName="IMG",n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function S(m,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,v){return g&&S(m.prototype,g),v&&S(m,v),m}}(),o=function S(m,g,v){m===null&&(m=Function.prototype);var b=Object.getOwnPropertyDescriptor(m,g);if(b===void 0){var O=Object.getPrototypeOf(m);return O===null?void 0:S(O,g,v)}else{if("value"in b)return b.value;var I=b.get;return I===void 0?void 0:I.call(v)}},l=a(4),u=a(27),c=h(u);function h(S){return S&&S.__esModule?S:{default:S}}function p(S,m){if(!(S instanceof m))throw new TypeError("Cannot call a class as a function")}function w(S,m){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:S}function d(S,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);S.prototype=Object.create(m&&m.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(S,m):S.__proto__=m)}var _=["height","width"],E=function(S){d(m,S);function m(){return p(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return i(m,[{key:"format",value:function(v,b){_.indexOf(v)>-1?b?this.domNode.setAttribute(v,b):this.domNode.removeAttribute(v):o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,v,b)}}],[{key:"create",value:function(v){var b=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,v);return b.setAttribute("frameborder","0"),b.setAttribute("allowfullscreen",!0),b.setAttribute("src",this.sanitize(v)),b}},{key:"formats",value:function(v){return _.reduce(function(b,O){return v.hasAttribute(O)&&(b[O]=v.getAttribute(O)),b},{})}},{key:"sanitize",value:function(v){return c.default.sanitize(v)}},{key:"value",value:function(v){return v.getAttribute("src")}}]),m}(l.BlockEmbed);E.blotName="video",E.className="ql-video",E.tagName="IFRAME",n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var i=function(){function v(b,O){for(var I=0;I<O.length;I++){var T=O[I];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,O,I){return O&&v(b.prototype,O),I&&v(b,I),b}}(),o=function v(b,O,I){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,O);if(T===void 0){var M=Object.getPrototypeOf(b);return M===null?void 0:v(M,O,I)}else{if("value"in T)return T.value;var j=T.get;return j===void 0?void 0:j.call(I)}},l=a(35),u=d(l),c=a(5),h=d(c),p=a(9),w=d(p);function d(v){return v&&v.__esModule?v:{default:v}}function _(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function E(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function S(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var m=function(v){S(b,v);function b(){return _(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,null,[{key:"create",value:function(I){var T=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",I)),T}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),b}(u.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var g=function(v){S(b,v),i(b,null,[{key:"register",value:function(){h.default.register(m,!0)}}]);function b(){_(this,b);var O=E(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return O}return b}(w.default);n.FormulaBlot=m,n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var i=function(){function I(T,M){for(var j=0;j<M.length;j++){var C=M[j];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}return function(T,M,j){return M&&I(T.prototype,M),j&&I(T,j),T}}(),o=function I(T,M,j){T===null&&(T=Function.prototype);var C=Object.getOwnPropertyDescriptor(T,M);if(C===void 0){var x=Object.getPrototypeOf(T);return x===null?void 0:I(x,M,j)}else{if("value"in C)return C.value;var L=C.get;return L===void 0?void 0:L.call(j)}},l=a(0),u=E(l),c=a(5),h=E(c),p=a(9),w=E(p),d=a(13),_=E(d);function E(I){return I&&I.__esModule?I:{default:I}}function S(I,T){if(!(I instanceof T))throw new TypeError("Cannot call a class as a function")}function m(I,T){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:I}function g(I,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);I.prototype=Object.create(T&&T.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(I,T):I.__proto__=T)}var v=function(I){g(T,I);function T(){return S(this,T),m(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}return i(T,[{key:"replaceWith",value:function(j){this.domNode.textContent=this.domNode.textContent,this.attach(),o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replaceWith",this).call(this,j)}},{key:"highlight",value:function(j){var C=this.domNode.textContent;this.cachedText!==C&&((C.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=j(C),this.domNode.normalize(),this.attach()),this.cachedText=C)}}]),T}(_.default);v.className="ql-syntax";var b=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),O=function(I){g(T,I),i(T,null,[{key:"register",value:function(){h.default.register(b,!0),h.default.register(v,!0)}}]);function T(M,j){S(this,T);var C=m(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,M,j));if(typeof C.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var x=null;return C.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(x),x=setTimeout(function(){C.highlight(),x=null},C.options.interval)}),C.highlight(),C}return i(T,[{key:"highlight",value:function(){var j=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var C=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(x){x.highlight(j.options.highlight)}),this.quill.update(h.default.sources.SILENT),C!=null&&this.quill.setSelection(C,h.default.sources.SILENT)}}}]),T}(w.default);O.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var T=window.hljs.highlightAuto(I);return T.value}}(),interval:1e3},n.CodeBlock=v,n.CodeToken=b,n.default=O},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var i=function T(M,j,C){M===null&&(M=Function.prototype);var x=Object.getOwnPropertyDescriptor(M,j);if(x===void 0){var L=Object.getPrototypeOf(M);return L===null?void 0:T(L,j,C)}else{if("value"in x)return x.value;var A=x.get;return A===void 0?void 0:A.call(C)}},o=function(){function T(M,j){for(var C=0;C<j.length;C++){var x=j[C];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(M,x.key,x)}}return function(M,j,C){return j&&T(M.prototype,j),C&&T(M,C),M}}(),l=a(3),u=S(l),c=a(8),h=S(c),p=a(43),w=S(p),d=a(15),_=a(41),E=S(_);function S(T){return T&&T.__esModule?T:{default:T}}function m(T,M){if(!(T instanceof M))throw new TypeError("Cannot call a class as a function")}function g(T,M){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:T}function v(T,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(T,M):T.__proto__=M)}var b=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],O=function(T){v(M,T);function M(j,C){m(this,M),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=b);var x=g(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,j,C));return x.quill.container.classList.add("ql-bubble"),x}return o(M,[{key:"extendToolbar",value:function(C){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(C.container),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),E.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),E.default)}}]),M}(w.default);O.DEFAULTS=(0,u.default)(!0,{},w.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(M){M?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(T){v(M,T);function M(j,C){m(this,M);var x=g(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,j,C));return x.quill.on(h.default.events.EDITOR_CHANGE,function(L,A,N,F){if(L===h.default.events.SELECTION_CHANGE)if(A!=null&&A.length>0&&F===h.default.sources.USER){x.show(),x.root.style.left="0px",x.root.style.width="",x.root.style.width=x.root.offsetWidth+"px";var U=x.quill.getLines(A.index,A.length);if(U.length===1)x.position(x.quill.getBounds(A));else{var W=U[U.length-1],$=x.quill.getIndex(W),Z=Math.min(W.length()-1,A.index+A.length-$),V=x.quill.getBounds(new d.Range($,Z));x.position(V)}}else document.activeElement!==x.textbox&&x.quill.hasFocus()&&x.hide()}),x}return o(M,[{key:"listen",value:function(){var C=this;i(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){C.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!C.root.classList.contains("ql-hidden")){var x=C.quill.getSelection();x!=null&&C.position(C.quill.getBounds(x))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(C){var x=i(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"position",this).call(this,C),L=this.root.querySelector(".ql-tooltip-arrow");if(L.style.marginLeft="",x===0)return x;L.style.marginLeft=-1*x-L.offsetWidth/2+"px"}}]),M}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=O},function(t,n,a){t.exports=a(63)}]).default})}(y1)),y1.exports}var ic={},b1={exports:{}},wf={},rp={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var MA=rp.exports,Bb;function IA(){return Bb||(Bb=1,function(e,r){(function(t){var n=r&&!r.nodeType&&r,a=e&&!e.nodeType&&e,i=typeof wh=="object"&&wh;(i.global===i||i.window===i||i.self===i)&&(t=i);var o,l=2147483647,u=36,c=1,h=26,p=38,w=700,d=72,_=128,E="-",S=/^xn--/,m=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=u-c,O=Math.floor,I=String.fromCharCode,T;function M(V){throw new RangeError(v[V])}function j(V,G){for(var z=V.length,D=[];z--;)D[z]=G(V[z]);return D}function C(V,G){var z=V.split("@"),D="";z.length>1&&(D=z[0]+"@",V=z[1]),V=V.replace(g,".");var K=V.split("."),ne=j(K,G).join(".");return D+ne}function x(V){for(var G=[],z=0,D=V.length,K,ne;z<D;)K=V.charCodeAt(z++),K>=55296&&K<=56319&&z<D?(ne=V.charCodeAt(z++),(ne&64512)==56320?G.push(((K&1023)<<10)+(ne&1023)+65536):(G.push(K),z--)):G.push(K);return G}function L(V){return j(V,function(G){var z="";return G>65535&&(G-=65536,z+=I(G>>>10&1023|55296),G=56320|G&1023),z+=I(G),z}).join("")}function A(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:u}function N(V,G){return V+22+75*(V<26)-((G!=0)<<5)}function F(V,G,z){var D=0;for(V=z?O(V/w):V>>1,V+=O(V/G);V>b*h>>1;D+=u)V=O(V/b);return O(D+(b+1)*V/(V+p))}function U(V){var G=[],z=V.length,D,K=0,ne=_,Q=d,ee,ae,se,ce,me,Se,Oe,Ne,xe;for(ee=V.lastIndexOf(E),ee<0&&(ee=0),ae=0;ae<ee;++ae)V.charCodeAt(ae)>=128&&M("not-basic"),G.push(V.charCodeAt(ae));for(se=ee>0?ee+1:0;se<z;){for(ce=K,me=1,Se=u;se>=z&&M("invalid-input"),Oe=A(V.charCodeAt(se++)),(Oe>=u||Oe>O((l-K)/me))&&M("overflow"),K+=Oe*me,Ne=Se<=Q?c:Se>=Q+h?h:Se-Q,!(Oe<Ne);Se+=u)xe=u-Ne,me>O(l/xe)&&M("overflow"),me*=xe;D=G.length+1,Q=F(K-ce,D,ce==0),O(K/D)>l-ne&&M("overflow"),ne+=O(K/D),K%=D,G.splice(K++,0,ne)}return L(G)}function W(V){var G,z,D,K,ne,Q,ee,ae,se,ce,me,Se=[],Oe,Ne,xe,ve;for(V=x(V),Oe=V.length,G=_,z=0,ne=d,Q=0;Q<Oe;++Q)me=V[Q],me<128&&Se.push(I(me));for(D=K=Se.length,K&&Se.push(E);D<Oe;){for(ee=l,Q=0;Q<Oe;++Q)me=V[Q],me>=G&&me<ee&&(ee=me);for(Ne=D+1,ee-G>O((l-z)/Ne)&&M("overflow"),z+=(ee-G)*Ne,G=ee,Q=0;Q<Oe;++Q)if(me=V[Q],me<G&&++z>l&&M("overflow"),me==G){for(ae=z,se=u;ce=se<=ne?c:se>=ne+h?h:se-ne,!(ae<ce);se+=u)ve=ae-ce,xe=u-ce,Se.push(I(N(ce+ve%xe,0))),ae=O(ve/xe);Se.push(I(N(ae,0))),ne=F(z,Ne,D==K),z=0,++D}++z,++G}return Se.join("")}function $(V){return C(V,function(G){return S.test(G)?U(G.slice(4).toLowerCase()):G})}function Z(V){return C(V,function(G){return m.test(G)?"xn--"+W(G):G})}if(o={version:"1.4.1",ucs2:{decode:x,encode:L},decode:U,encode:W,toASCII:Z,toUnicode:$},n&&a)if(e.exports==n)a.exports=o;else for(T in o)o.hasOwnProperty(T)&&(n[T]=o[T]);else t.punycode=o})(MA)}(rp,rp.exports)),rp.exports}var Eg,qb;function jh(){return qb||(qb=1,Eg=TypeError),Eg}const jA={},FA=Object.freeze(Object.defineProperty({__proto__:null,default:jA},Symbol.toStringTag,{value:"Module"})),DA=Kc(FA);var Pg,zb;function o0(){if(zb)return Pg;zb=1;var e=typeof Map=="function"&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=e&&r&&typeof r.get=="function"?r.get:null,n=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=a&&i&&typeof i.get=="function"?i.get:null,l=a&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,h=typeof WeakSet=="function"&&WeakSet.prototype,p=h?WeakSet.prototype.has:null,w=typeof WeakRef=="function"&&WeakRef.prototype,d=w?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,E=Object.prototype.toString,S=Function.prototype.toString,m=String.prototype.match,g=String.prototype.slice,v=String.prototype.replace,b=String.prototype.toUpperCase,O=String.prototype.toLowerCase,I=RegExp.prototype.test,T=Array.prototype.concat,M=Array.prototype.join,j=Array.prototype.slice,C=Math.floor,x=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,N=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||!0)?Symbol.toStringTag:null,U=Object.prototype.propertyIsEnumerable,W=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Ie){return Ie.__proto__}:null);function $(Ie,He){if(Ie===1/0||Ie===-1/0||Ie!==Ie||Ie&&Ie>-1e3&&Ie<1e3||I.call(/e/,He))return He;var Nt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Ie=="number"){var ht=Ie<0?-C(-Ie):C(Ie);if(ht!==Ie){var gt=String(ht),_t=g.call(He,gt.length+1);return v.call(gt,Nt,"$&_")+"."+v.call(v.call(_t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(He,Nt,"$&_")}var Z=DA,V=Z.custom,G=Ne(V)?V:null,z={__proto__:null,double:'"',single:"'"},D={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Pg=function Ie(He,Nt,ht,gt){var _t=Nt||{};if(Xe(_t,"quoteStyle")&&!Xe(z,_t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Xe(_t,"maxStringLength")&&(typeof _t.maxStringLength=="number"?_t.maxStringLength<0&&_t.maxStringLength!==1/0:_t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var rr=Xe(_t,"customInspect")?_t.customInspect:!0;if(typeof rr!="boolean"&&rr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Xe(_t,"indent")&&_t.indent!==null&&_t.indent!==" "&&!(parseInt(_t.indent,10)===_t.indent&&_t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Xe(_t,"numericSeparator")&&typeof _t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Wt=_t.numericSeparator;if(typeof He>"u")return"undefined";if(He===null)return"null";if(typeof He=="boolean")return He?"true":"false";if(typeof He=="string")return wt(He,_t);if(typeof He=="number"){if(He===0)return 1/0/He>0?"0":"-0";var St=String(He);return Wt?$(He,St):St}if(typeof He=="bigint"){var it=String(He)+"n";return Wt?$(He,it):it}var Bt=typeof _t.depth>"u"?5:_t.depth;if(typeof ht>"u"&&(ht=0),ht>=Bt&&Bt>0&&typeof He=="object")return ee(He)?"[Array]":"[Object]";var Ue=At(_t,ht);if(typeof gt>"u")gt=[];else if(Ee(gt,He)>=0)return"[Circular]";function De(Si,fa,ws){if(fa&&(gt=j.call(gt),gt.push(fa)),ws){var Vo={depth:_t.depth};return Xe(_t,"quoteStyle")&&(Vo.quoteStyle=_t.quoteStyle),Ie(Si,Vo,ht+1,gt)}return Ie(Si,_t,ht+1,gt)}if(typeof He=="function"&&!se(He)){var bt=Ae(He),ze=zt(He,De);return"[Function"+(bt?": "+bt:" (anonymous)")+"]"+(ze.length>0?" { "+M.call(ze,", ")+" }":"")}if(Ne(He)){var xt=N?v.call(String(He),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(He);return typeof He=="object"&&!N?mt(xt):xt}if(vt(He)){for(var kt="<"+O.call(String(He.nodeName)),Ft=He.attributes||[],Ut=0;Ut<Ft.length;Ut++)kt+=" "+Ft[Ut].name+"="+K(ne(Ft[Ut].value),"double",_t);return kt+=">",He.childNodes&&He.childNodes.length&&(kt+="..."),kt+="</"+O.call(String(He.nodeName))+">",kt}if(ee(He)){if(He.length===0)return"[]";var Yt=zt(He,De);return Ue&&!qt(Yt)?"["+Ht(Yt,Ue)+"]":"[ "+M.call(Yt,", ")+" ]"}if(ce(He)){var _r=zt(He,De);return!("cause"in Error.prototype)&&"cause"in He&&!U.call(He,"cause")?"{ ["+String(He)+"] "+M.call(T.call("[cause]: "+De(He.cause),_r),", ")+" }":_r.length===0?"["+String(He)+"]":"{ ["+String(He)+"] "+M.call(_r,", ")+" }"}if(typeof He=="object"&&rr){if(G&&typeof He[G]=="function"&&Z)return Z(He,{depth:Bt-ht});if(rr!=="symbol"&&typeof He.inspect=="function")return He.inspect()}if(Le(He)){var kr=[];return n&&n.call(He,function(Si,fa){kr.push(De(fa,He,!0)+" => "+De(Si,He))}),nt("Map",t.call(He),kr,Ue)}if(Re(He)){var Lr=[];return l&&l.call(He,function(Si){Lr.push(De(Si,He))}),nt("Set",o.call(He),Lr,Ue)}if(he(He))return Je("WeakMap");if($e(He))return Je("WeakSet");if(ke(He))return Je("WeakRef");if(Se(He))return mt(De(Number(He)));if(xe(He))return mt(De(x.call(He)));if(Oe(He))return mt(_.call(He));if(me(He))return mt(De(String(He)));if(typeof window<"u"&&He===window)return"{ [object Window] }";if(typeof globalThis<"u"&&He===globalThis||typeof wh<"u"&&He===wh)return"{ [object globalThis] }";if(!ae(He)&&!se(He)){var Nr=zt(He,De),Wn=W?W(He)===Object.prototype:He instanceof Object||He.constructor===Object,en=He instanceof Object?"":"null prototype",Qn=!Wn&&F&&Object(He)===He&&F in He?g.call(be(He),8,-1):en?"Object":"",_i=Wn||typeof He.constructor!="function"?"":He.constructor.name?He.constructor.name+" ":"",Ni=_i+(Qn||en?"["+M.call(T.call([],Qn||[],en||[]),": ")+"] ":"");return Nr.length===0?Ni+"{}":Ue?Ni+"{"+Ht(Nr,Ue)+"}":Ni+"{ "+M.call(Nr,", ")+" }"}return String(He)};function K(Ie,He,Nt){var ht=Nt.quoteStyle||He,gt=z[ht];return gt+Ie+gt}function ne(Ie){return v.call(String(Ie),/"/g,""")}function Q(Ie){return!F||!(typeof Ie=="object"&&(F in Ie||typeof Ie[F]<"u"))}function ee(Ie){return be(Ie)==="[object Array]"&&Q(Ie)}function ae(Ie){return be(Ie)==="[object Date]"&&Q(Ie)}function se(Ie){return be(Ie)==="[object RegExp]"&&Q(Ie)}function ce(Ie){return be(Ie)==="[object Error]"&&Q(Ie)}function me(Ie){return be(Ie)==="[object String]"&&Q(Ie)}function Se(Ie){return be(Ie)==="[object Number]"&&Q(Ie)}function Oe(Ie){return be(Ie)==="[object Boolean]"&&Q(Ie)}function Ne(Ie){if(N)return Ie&&typeof Ie=="object"&&Ie instanceof Symbol;if(typeof Ie=="symbol")return!0;if(!Ie||typeof Ie!="object"||!A)return!1;try{return A.call(Ie),!0}catch{}return!1}function xe(Ie){if(!Ie||typeof Ie!="object"||!x)return!1;try{return x.call(Ie),!0}catch{}return!1}var ve=Object.prototype.hasOwnProperty||function(Ie){return Ie in this};function Xe(Ie,He){return ve.call(Ie,He)}function be(Ie){return E.call(Ie)}function Ae(Ie){if(Ie.name)return Ie.name;var He=m.call(S.call(Ie),/^function\s*([\w$]+)/);return He?He[1]:null}function Ee(Ie,He){if(Ie.indexOf)return Ie.indexOf(He);for(var Nt=0,ht=Ie.length;Nt<ht;Nt++)if(Ie[Nt]===He)return Nt;return-1}function Le(Ie){if(!t||!Ie||typeof Ie!="object")return!1;try{t.call(Ie);try{o.call(Ie)}catch{return!0}return Ie instanceof Map}catch{}return!1}function he(Ie){if(!c||!Ie||typeof Ie!="object")return!1;try{c.call(Ie,c);try{p.call(Ie,p)}catch{return!0}return Ie instanceof WeakMap}catch{}return!1}function ke(Ie){if(!d||!Ie||typeof Ie!="object")return!1;try{return d.call(Ie),!0}catch{}return!1}function Re(Ie){if(!o||!Ie||typeof Ie!="object")return!1;try{o.call(Ie);try{t.call(Ie)}catch{return!0}return Ie instanceof Set}catch{}return!1}function $e(Ie){if(!p||!Ie||typeof Ie!="object")return!1;try{p.call(Ie,p);try{c.call(Ie,c)}catch{return!0}return Ie instanceof WeakSet}catch{}return!1}function vt(Ie){return!Ie||typeof Ie!="object"?!1:typeof HTMLElement<"u"&&Ie instanceof HTMLElement?!0:typeof Ie.nodeName=="string"&&typeof Ie.getAttribute=="function"}function wt(Ie,He){if(Ie.length>He.maxStringLength){var Nt=Ie.length-He.maxStringLength,ht="... "+Nt+" more character"+(Nt>1?"s":"");return wt(g.call(Ie,0,He.maxStringLength),He)+ht}var gt=D[He.quoteStyle||"single"];gt.lastIndex=0;var _t=v.call(v.call(Ie,gt,"\\$1"),/[\x00-\x1f]/g,at);return K(_t,"single",He)}function at(Ie){var He=Ie.charCodeAt(0),Nt={8:"b",9:"t",10:"n",12:"f",13:"r"}[He];return Nt?"\\"+Nt:"\\x"+(He<16?"0":"")+b.call(He.toString(16))}function mt(Ie){return"Object("+Ie+")"}function Je(Ie){return Ie+" { ? }"}function nt(Ie,He,Nt,ht){var gt=ht?Ht(Nt,ht):M.call(Nt,", ");return Ie+" ("+He+") {"+gt+"}"}function qt(Ie){for(var He=0;He<Ie.length;He++)if(Ee(Ie[He],`
|
|
149
|
-
`)>=0)return!1;return!0}function At(Ie,He){var Nt;if(Ie.indent===" ")Nt=" ";else if(typeof Ie.indent=="number"&&Ie.indent>0)Nt=M.call(Array(Ie.indent+1)," ");else return null;return{base:Nt,prev:M.call(Array(He+1),Nt)}}function Ht(Ie,He){if(Ie.length===0)return"";var Nt=`
|
|
150
|
-
`+He.prev+He.base;return Nt+M.call(Ie,","+Nt)+`
|
|
151
|
-
`+He.prev}function zt(Ie,He){var Nt=ee(Ie),ht=[];if(Nt){ht.length=Ie.length;for(var gt=0;gt<Ie.length;gt++)ht[gt]=Xe(Ie,gt)?He(Ie[gt],Ie):""}var _t=typeof L=="function"?L(Ie):[],rr;if(N){rr={};for(var Wt=0;Wt<_t.length;Wt++)rr["$"+_t[Wt]]=_t[Wt]}for(var St in Ie)Xe(Ie,St)&&(Nt&&String(Number(St))===St&&St<Ie.length||N&&rr["$"+St]instanceof Symbol||(I.call(/[^\w$]/,St)?ht.push(He(St,Ie)+": "+He(Ie[St],Ie)):ht.push(St+": "+He(Ie[St],Ie))));if(typeof L=="function")for(var it=0;it<_t.length;it++)U.call(Ie,_t[it])&&ht.push("["+He(_t[it])+"]: "+He(Ie[_t[it]],Ie));return ht}return Pg}var Og,Ub;function BA(){if(Ub)return Og;Ub=1;var e=o0(),r=jh(),t=function(l,u,c){for(var h=l,p;(p=h.next)!=null;h=p)if(p.key===u)return h.next=p.next,c||(p.next=l.next,l.next=p),p},n=function(l,u){if(l){var c=t(l,u);return c&&c.value}},a=function(l,u,c){var h=t(l,u);h?h.value=c:l.next={key:u,next:l.next,value:c}},i=function(l,u){return l?!!t(l,u):!1},o=function(l,u){if(l)return t(l,u,!0)};return Og=function(){var u,c={assert:function(h){if(!c.has(h))throw new r("Side channel does not contain "+e(h))},delete:function(h){var p=u&&u.next,w=o(u,h);return w&&p&&p===w&&(u=void 0),!!w},get:function(h){return n(u,h)},has:function(h){return i(u,h)},set:function(h,p){u||(u={next:void 0}),a(u,h,p)}};return c},Og}var Ag,Hb;function z8(){return Hb||(Hb=1,Ag=Object),Ag}var Cg,Gb;function qA(){return Gb||(Gb=1,Cg=Error),Cg}var kg,Vb;function zA(){return Vb||(Vb=1,kg=EvalError),kg}var Lg,Wb;function UA(){return Wb||(Wb=1,Lg=RangeError),Lg}var Ng,$b;function HA(){return $b||($b=1,Ng=ReferenceError),Ng}var Tg,Yb;function GA(){return Yb||(Yb=1,Tg=SyntaxError),Tg}var Rg,Xb;function VA(){return Xb||(Xb=1,Rg=URIError),Rg}var Mg,Kb;function WA(){return Kb||(Kb=1,Mg=Math.abs),Mg}var Ig,Zb;function $A(){return Zb||(Zb=1,Ig=Math.floor),Ig}var jg,Qb;function YA(){return Qb||(Qb=1,jg=Math.max),jg}var Fg,Jb;function XA(){return Jb||(Jb=1,Fg=Math.min),Fg}var Dg,e3;function KA(){return e3||(e3=1,Dg=Math.pow),Dg}var Bg,t3;function ZA(){return t3||(t3=1,Bg=Math.round),Bg}var qg,r3;function QA(){return r3||(r3=1,qg=Number.isNaN||function(r){return r!==r}),qg}var zg,n3;function JA(){if(n3)return zg;n3=1;var e=QA();return zg=function(t){return e(t)||t===0?t:t<0?-1:1},zg}var Ug,i3;function eC(){return i3||(i3=1,Ug=Object.getOwnPropertyDescriptor),Ug}var Hg,a3;function U8(){if(a3)return Hg;a3=1;var e=eC();if(e)try{e([],"length")}catch{e=null}return Hg=e,Hg}var Gg,o3;function tC(){if(o3)return Gg;o3=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Gg=e,Gg}var Vg,s3;function rC(){return s3||(s3=1,Vg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var i in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(r,t);if(l.value!==a||l.enumerable!==!0)return!1}return!0}),Vg}var Wg,l3;function nC(){if(l3)return Wg;l3=1;var e=typeof Symbol<"u"&&Symbol,r=rC();return Wg=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()},Wg}var $g,u3;function H8(){return u3||(u3=1,$g=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),$g}var Yg,c3;function G8(){if(c3)return Yg;c3=1;var e=z8();return Yg=e.getPrototypeOf||null,Yg}var Xg,f3;function iC(){if(f3)return Xg;f3=1;var e="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,t=Math.max,n="[object Function]",a=function(u,c){for(var h=[],p=0;p<u.length;p+=1)h[p]=u[p];for(var w=0;w<c.length;w+=1)h[w+u.length]=c[w];return h},i=function(u,c){for(var h=[],p=c,w=0;p<u.length;p+=1,w+=1)h[w]=u[p];return h},o=function(l,u){for(var c="",h=0;h<l.length;h+=1)c+=l[h],h+1<l.length&&(c+=u);return c};return Xg=function(u){var c=this;if(typeof c!="function"||r.apply(c)!==n)throw new TypeError(e+c);for(var h=i(arguments,1),p,w=function(){if(this instanceof p){var m=c.apply(this,a(h,arguments));return Object(m)===m?m:this}return c.apply(u,a(h,arguments))},d=t(0,c.length-h.length),_=[],E=0;E<d;E++)_[E]="$"+E;if(p=Function("binder","return function ("+o(_,",")+"){ return binder.apply(this,arguments); }")(w),c.prototype){var S=function(){};S.prototype=c.prototype,p.prototype=new S,S.prototype=null}return p},Xg}var Kg,h3;function s0(){if(h3)return Kg;h3=1;var e=iC();return Kg=Function.prototype.bind||e,Kg}var Zg,d3;function Pm(){return d3||(d3=1,Zg=Function.prototype.call),Zg}var Qg,p3;function V8(){return p3||(p3=1,Qg=Function.prototype.apply),Qg}var Jg,g3;function aC(){return g3||(g3=1,Jg=typeof Reflect<"u"&&Reflect&&Reflect.apply),Jg}var ev,v3;function oC(){if(v3)return ev;v3=1;var e=s0(),r=V8(),t=Pm(),n=aC();return ev=n||e.call(t,r),ev}var tv,m3;function W8(){if(m3)return tv;m3=1;var e=s0(),r=jh(),t=Pm(),n=oC();return tv=function(i){if(i.length<1||typeof i[0]!="function")throw new r("a function is required");return n(e,t,i)},tv}var rv,y3;function sC(){if(y3)return rv;y3=1;var e=W8(),r=U8(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&r&&r(Object.prototype,"__proto__"),a=Object,i=a.getPrototypeOf;return rv=n&&typeof n.get=="function"?e([n.get]):typeof i=="function"?function(l){return i(l==null?l:a(l))}:!1,rv}var nv,b3;function lC(){if(b3)return nv;b3=1;var e=H8(),r=G8(),t=sC();return nv=e?function(a){return e(a)}:r?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return r(a)}:t?function(a){return t(a)}:null,nv}var iv,w3;function uC(){if(w3)return iv;w3=1;var e=Function.prototype.call,r=Object.prototype.hasOwnProperty,t=s0();return iv=t.call(e,r),iv}var av,_3;function Om(){if(_3)return av;_3=1;var e,r=z8(),t=qA(),n=zA(),a=UA(),i=HA(),o=GA(),l=jh(),u=VA(),c=WA(),h=$A(),p=YA(),w=XA(),d=KA(),_=ZA(),E=JA(),S=Function,m=function(se){try{return S('"use strict"; return ('+se+").constructor;")()}catch{}},g=U8(),v=tC(),b=function(){throw new l},O=g?function(){try{return arguments.callee,b}catch{try{return g(arguments,"callee").get}catch{return b}}}():b,I=nC()(),T=lC(),M=G8(),j=H8(),C=V8(),x=Pm(),L={},A=typeof Uint8Array>"u"||!T?e:T(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":S,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&T?T(T([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!T?e:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":g,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":a,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!T?e:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&T?T(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":O,"%TypedArray%":A,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":C,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":M,"%Math.abs%":c,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":w,"%Math.pow%":d,"%Math.round%":_,"%Math.sign%":E,"%Reflect.getPrototypeOf%":j};if(T)try{null.error}catch(se){var F=T(T(se));N["%Error.prototype%"]=F}var U=function se(ce){var me;if(ce==="%AsyncFunction%")me=m("async function () {}");else if(ce==="%GeneratorFunction%")me=m("function* () {}");else if(ce==="%AsyncGeneratorFunction%")me=m("async function* () {}");else if(ce==="%AsyncGenerator%"){var Se=se("%AsyncGeneratorFunction%");Se&&(me=Se.prototype)}else if(ce==="%AsyncIteratorPrototype%"){var Oe=se("%AsyncGenerator%");Oe&&T&&(me=T(Oe.prototype))}return N[ce]=me,me},W={__proto__:null,"%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"]},$=s0(),Z=uC(),V=$.call(x,Array.prototype.concat),G=$.call(C,Array.prototype.splice),z=$.call(x,String.prototype.replace),D=$.call(x,String.prototype.slice),K=$.call(x,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,ee=function(ce){var me=D(ce,0,1),Se=D(ce,-1);if(me==="%"&&Se!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(Se==="%"&&me!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var Oe=[];return z(ce,ne,function(Ne,xe,ve,Xe){Oe[Oe.length]=ve?z(Xe,Q,"$1"):xe||Ne}),Oe},ae=function(ce,me){var Se=ce,Oe;if(Z(W,Se)&&(Oe=W[Se],Se="%"+Oe[0]+"%"),Z(N,Se)){var Ne=N[Se];if(Ne===L&&(Ne=U(Se)),typeof Ne>"u"&&!me)throw new l("intrinsic "+ce+" exists, but is not available. Please file an issue!");return{alias:Oe,name:Se,value:Ne}}throw new o("intrinsic "+ce+" does not exist!")};return av=function(ce,me){if(typeof ce!="string"||ce.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof me!="boolean")throw new l('"allowMissing" argument must be a boolean');if(K(/^%?[^%]*%?$/,ce)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Se=ee(ce),Oe=Se.length>0?Se[0]:"",Ne=ae("%"+Oe+"%",me),xe=Ne.name,ve=Ne.value,Xe=!1,be=Ne.alias;be&&(Oe=be[0],G(Se,V([0,1],be)));for(var Ae=1,Ee=!0;Ae<Se.length;Ae+=1){var Le=Se[Ae],he=D(Le,0,1),ke=D(Le,-1);if((he==='"'||he==="'"||he==="`"||ke==='"'||ke==="'"||ke==="`")&&he!==ke)throw new o("property names with quotes must have matching quotes");if((Le==="constructor"||!Ee)&&(Xe=!0),Oe+="."+Le,xe="%"+Oe+"%",Z(N,xe))ve=N[xe];else if(ve!=null){if(!(Le in ve)){if(!me)throw new l("base intrinsic for "+ce+" exists, but the property is not available.");return}if(g&&Ae+1>=Se.length){var Re=g(ve,Le);Ee=!!Re,Ee&&"get"in Re&&!("originalValue"in Re.get)?ve=Re.get:ve=ve[Le]}else Ee=Z(ve,Le),ve=ve[Le];Ee&&!Xe&&(N[xe]=ve)}}return ve},av}var ov,S3;function $8(){if(S3)return ov;S3=1;var e=Om(),r=W8(),t=r([e("%String.prototype.indexOf%")]);return ov=function(a,i){var o=e(a,!!i);return typeof o=="function"&&t(a,".prototype.")>-1?r([o]):o},ov}var sv,x3;function Y8(){if(x3)return sv;x3=1;var e=Om(),r=$8(),t=o0(),n=jh(),a=e("%Map%",!0),i=r("Map.prototype.get",!0),o=r("Map.prototype.set",!0),l=r("Map.prototype.has",!0),u=r("Map.prototype.delete",!0),c=r("Map.prototype.size",!0);return sv=!!a&&function(){var p,w={assert:function(d){if(!w.has(d))throw new n("Side channel does not contain "+t(d))},delete:function(d){if(p){var _=u(p,d);return c(p)===0&&(p=void 0),_}return!1},get:function(d){if(p)return i(p,d)},has:function(d){return p?l(p,d):!1},set:function(d,_){p||(p=new a),o(p,d,_)}};return w},sv}var lv,E3;function cC(){if(E3)return lv;E3=1;var e=Om(),r=$8(),t=o0(),n=Y8(),a=jh(),i=e("%WeakMap%",!0),o=r("WeakMap.prototype.get",!0),l=r("WeakMap.prototype.set",!0),u=r("WeakMap.prototype.has",!0),c=r("WeakMap.prototype.delete",!0);return lv=i?function(){var p,w,d={assert:function(_){if(!d.has(_))throw new a("Side channel does not contain "+t(_))},delete:function(_){if(i&&_&&(typeof _=="object"||typeof _=="function")){if(p)return c(p,_)}else if(n&&w)return w.delete(_);return!1},get:function(_){return i&&_&&(typeof _=="object"||typeof _=="function")&&p?o(p,_):w&&w.get(_)},has:function(_){return i&&_&&(typeof _=="object"||typeof _=="function")&&p?u(p,_):!!w&&w.has(_)},set:function(_,E){i&&_&&(typeof _=="object"||typeof _=="function")?(p||(p=new i),l(p,_,E)):n&&(w||(w=n()),w.set(_,E))}};return d}:n,lv}var uv,P3;function fC(){if(P3)return uv;P3=1;var e=jh(),r=o0(),t=BA(),n=Y8(),a=cC(),i=a||n||t;return uv=function(){var l,u={assert:function(c){if(!u.has(c))throw new e("Side channel does not contain "+r(c))},delete:function(c){return!!l&&l.delete(c)},get:function(c){return l&&l.get(c)},has:function(c){return!!l&&l.has(c)},set:function(c,h){l||(l=i()),l.set(c,h)}};return u},uv}var cv,O3;function Am(){if(O3)return cv;O3=1;var e=String.prototype.replace,r=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return cv={default:t.RFC3986,formatters:{RFC1738:function(n){return e.call(n,r,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},cv}var fv,A3;function X8(){if(A3)return fv;A3=1;var e=Am(),r=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var S=[],m=0;m<256;++m)S.push("%"+((m<16?"0":"")+m.toString(16)).toUpperCase());return S}(),a=function(m){for(;m.length>1;){var g=m.pop(),v=g.obj[g.prop];if(t(v)){for(var b=[],O=0;O<v.length;++O)typeof v[O]<"u"&&b.push(v[O]);g.obj[g.prop]=b}}},i=function(m,g){for(var v=g&&g.plainObjects?{__proto__:null}:{},b=0;b<m.length;++b)typeof m[b]<"u"&&(v[b]=m[b]);return v},o=function S(m,g,v){if(!g)return m;if(typeof g!="object"&&typeof g!="function"){if(t(m))m.push(g);else if(m&&typeof m=="object")(v&&(v.plainObjects||v.allowPrototypes)||!r.call(Object.prototype,g))&&(m[g]=!0);else return[m,g];return m}if(!m||typeof m!="object")return[m].concat(g);var b=m;return t(m)&&!t(g)&&(b=i(m,v)),t(m)&&t(g)?(g.forEach(function(O,I){if(r.call(m,I)){var T=m[I];T&&typeof T=="object"&&O&&typeof O=="object"?m[I]=S(T,O,v):m.push(O)}else m[I]=O}),m):Object.keys(g).reduce(function(O,I){var T=g[I];return r.call(O,I)?O[I]=S(O[I],T,v):O[I]=T,O},b)},l=function(m,g){return Object.keys(g).reduce(function(v,b){return v[b]=g[b],v},m)},u=function(S,m,g){var v=S.replace(/\+/g," ");if(g==="iso-8859-1")return v.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(v)}catch{return v}},c=1024,h=function(m,g,v,b,O){if(m.length===0)return m;var I=m;if(typeof m=="symbol"?I=Symbol.prototype.toString.call(m):typeof m!="string"&&(I=String(m)),v==="iso-8859-1")return escape(I).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var T="",M=0;M<I.length;M+=c){for(var j=I.length>=c?I.slice(M,M+c):I,C=[],x=0;x<j.length;++x){var L=j.charCodeAt(x);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||O===e.RFC1738&&(L===40||L===41)){C[C.length]=j.charAt(x);continue}if(L<128){C[C.length]=n[L];continue}if(L<2048){C[C.length]=n[192|L>>6]+n[128|L&63];continue}if(L<55296||L>=57344){C[C.length]=n[224|L>>12]+n[128|L>>6&63]+n[128|L&63];continue}x+=1,L=65536+((L&1023)<<10|j.charCodeAt(x)&1023),C[C.length]=n[240|L>>18]+n[128|L>>12&63]+n[128|L>>6&63]+n[128|L&63]}T+=C.join("")}return T},p=function(m){for(var g=[{obj:{o:m},prop:"o"}],v=[],b=0;b<g.length;++b)for(var O=g[b],I=O.obj[O.prop],T=Object.keys(I),M=0;M<T.length;++M){var j=T[M],C=I[j];typeof C=="object"&&C!==null&&v.indexOf(C)===-1&&(g.push({obj:I,prop:j}),v.push(C))}return a(g),m},w=function(m){return Object.prototype.toString.call(m)==="[object RegExp]"},d=function(m){return!m||typeof m!="object"?!1:!!(m.constructor&&m.constructor.isBuffer&&m.constructor.isBuffer(m))},_=function(m,g){return[].concat(m,g)},E=function(m,g){if(t(m)){for(var v=[],b=0;b<m.length;b+=1)v.push(g(m[b]));return v}return g(m)};return fv={arrayToObject:i,assign:l,combine:_,compact:p,decode:u,encode:h,isBuffer:d,isRegExp:w,maybeMap:E,merge:o},fv}var hv,C3;function hC(){if(C3)return hv;C3=1;var e=fC(),r=X8(),t=Am(),n=Object.prototype.hasOwnProperty,a={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,m){return S+"["+m+"]"},repeat:function(S){return S}},i=Array.isArray,o=Array.prototype.push,l=function(E,S){o.apply(E,i(S)?S:[S])},u=Date.prototype.toISOString,c=t.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:t.formatters[c],indices:!1,serializeDate:function(S){return u.call(S)},skipNulls:!1,strictNullHandling:!1},p=function(S){return typeof S=="string"||typeof S=="number"||typeof S=="boolean"||typeof S=="symbol"||typeof S=="bigint"},w={},d=function E(S,m,g,v,b,O,I,T,M,j,C,x,L,A,N,F,U,W){for(var $=S,Z=W,V=0,G=!1;(Z=Z.get(w))!==void 0&&!G;){var z=Z.get(S);if(V+=1,typeof z<"u"){if(z===V)throw new RangeError("Cyclic object value");G=!0}typeof Z.get(w)>"u"&&(V=0)}if(typeof j=="function"?$=j(m,$):$ instanceof Date?$=L($):g==="comma"&&i($)&&($=r.maybeMap($,function(xe){return xe instanceof Date?L(xe):xe})),$===null){if(O)return M&&!F?M(m,h.encoder,U,"key",A):m;$=""}if(p($)||r.isBuffer($)){if(M){var D=F?m:M(m,h.encoder,U,"key",A);return[N(D)+"="+N(M($,h.encoder,U,"value",A))]}return[N(m)+"="+N(String($))]}var K=[];if(typeof $>"u")return K;var ne;if(g==="comma"&&i($))F&&M&&($=r.maybeMap($,M)),ne=[{value:$.length>0?$.join(",")||null:void 0}];else if(i(j))ne=j;else{var Q=Object.keys($);ne=C?Q.sort(C):Q}var ee=T?String(m).replace(/\./g,"%2E"):String(m),ae=v&&i($)&&$.length===1?ee+"[]":ee;if(b&&i($)&&$.length===0)return ae+"[]";for(var se=0;se<ne.length;++se){var ce=ne[se],me=typeof ce=="object"&&ce&&typeof ce.value<"u"?ce.value:$[ce];if(!(I&&me===null)){var Se=x&&T?String(ce).replace(/\./g,"%2E"):String(ce),Oe=i($)?typeof g=="function"?g(ae,Se):ae:ae+(x?"."+Se:"["+Se+"]");W.set(S,V);var Ne=e();Ne.set(w,W),l(K,E(me,Oe,g,v,b,O,I,T,g==="comma"&&F&&i($)?null:M,j,C,x,L,A,N,F,U,Ne))}}return K},_=function(S){if(!S)return h;if(typeof S.allowEmptyArrays<"u"&&typeof S.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof S.encodeDotInKeys<"u"&&typeof S.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(S.encoder!==null&&typeof S.encoder<"u"&&typeof S.encoder!="function")throw new TypeError("Encoder has to be a function.");var m=S.charset||h.charset;if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var g=t.default;if(typeof S.format<"u"){if(!n.call(t.formatters,S.format))throw new TypeError("Unknown format option provided.");g=S.format}var v=t.formatters[g],b=h.filter;(typeof S.filter=="function"||i(S.filter))&&(b=S.filter);var O;if(S.arrayFormat in a?O=S.arrayFormat:"indices"in S?O=S.indices?"indices":"repeat":O=h.arrayFormat,"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof S.allowDots>"u"?S.encodeDotInKeys===!0?!0:h.allowDots:!!S.allowDots;return{addQueryPrefix:typeof S.addQueryPrefix=="boolean"?S.addQueryPrefix:h.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof S.allowEmptyArrays=="boolean"?!!S.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:O,charset:m,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!S.commaRoundTrip,delimiter:typeof S.delimiter>"u"?h.delimiter:S.delimiter,encode:typeof S.encode=="boolean"?S.encode:h.encode,encodeDotInKeys:typeof S.encodeDotInKeys=="boolean"?S.encodeDotInKeys:h.encodeDotInKeys,encoder:typeof S.encoder=="function"?S.encoder:h.encoder,encodeValuesOnly:typeof S.encodeValuesOnly=="boolean"?S.encodeValuesOnly:h.encodeValuesOnly,filter:b,format:g,formatter:v,serializeDate:typeof S.serializeDate=="function"?S.serializeDate:h.serializeDate,skipNulls:typeof S.skipNulls=="boolean"?S.skipNulls:h.skipNulls,sort:typeof S.sort=="function"?S.sort:null,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:h.strictNullHandling}};return hv=function(E,S){var m=E,g=_(S),v,b;typeof g.filter=="function"?(b=g.filter,m=b("",m)):i(g.filter)&&(b=g.filter,v=b);var O=[];if(typeof m!="object"||m===null)return"";var I=a[g.arrayFormat],T=I==="comma"&&g.commaRoundTrip;v||(v=Object.keys(m)),g.sort&&v.sort(g.sort);for(var M=e(),j=0;j<v.length;++j){var C=v[j],x=m[C];g.skipNulls&&x===null||l(O,d(x,C,I,T,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,M))}var L=O.join(g.delimiter),A=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),L.length>0?A+L:""},hv}var dv,k3;function dC(){if(k3)return dv;k3=1;var e=X8(),r=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(w){return w.replace(/&#(\d+);/g,function(d,_){return String.fromCharCode(parseInt(_,10))})},i=function(w,d,_){if(w&&typeof w=="string"&&d.comma&&w.indexOf(",")>-1)return w.split(",");if(d.throwOnLimitExceeded&&_>=d.arrayLimit)throw new RangeError("Array limit exceeded. Only "+d.arrayLimit+" element"+(d.arrayLimit===1?"":"s")+" allowed in an array.");return w},o="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(d,_){var E={__proto__:null},S=_.ignoreQueryPrefix?d.replace(/^\?/,""):d;S=S.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var m=_.parameterLimit===1/0?void 0:_.parameterLimit,g=S.split(_.delimiter,_.throwOnLimitExceeded?m+1:m);if(_.throwOnLimitExceeded&&g.length>m)throw new RangeError("Parameter limit exceeded. Only "+m+" parameter"+(m===1?"":"s")+" allowed.");var v=-1,b,O=_.charset;if(_.charsetSentinel)for(b=0;b<g.length;++b)g[b].indexOf("utf8=")===0&&(g[b]===l?O="utf-8":g[b]===o&&(O="iso-8859-1"),v=b,b=g.length);for(b=0;b<g.length;++b)if(b!==v){var I=g[b],T=I.indexOf("]="),M=T===-1?I.indexOf("="):T+1,j,C;M===-1?(j=_.decoder(I,n.decoder,O,"key"),C=_.strictNullHandling?null:""):(j=_.decoder(I.slice(0,M),n.decoder,O,"key"),C=e.maybeMap(i(I.slice(M+1),_,t(E[j])?E[j].length:0),function(L){return _.decoder(L,n.decoder,O,"value")})),C&&_.interpretNumericEntities&&O==="iso-8859-1"&&(C=a(String(C))),I.indexOf("[]=")>-1&&(C=t(C)?[C]:C);var x=r.call(E,j);x&&_.duplicates==="combine"?E[j]=e.combine(E[j],C):(!x||_.duplicates==="last")&&(E[j]=C)}return E},c=function(w,d,_,E){var S=0;if(w.length>0&&w[w.length-1]==="[]"){var m=w.slice(0,-1).join("");S=Array.isArray(d)&&d[m]?d[m].length:0}for(var g=E?d:i(d,_,S),v=w.length-1;v>=0;--v){var b,O=w[v];if(O==="[]"&&_.parseArrays)b=_.allowEmptyArrays&&(g===""||_.strictNullHandling&&g===null)?[]:e.combine([],g);else{b=_.plainObjects?{__proto__:null}:{};var I=O.charAt(0)==="["&&O.charAt(O.length-1)==="]"?O.slice(1,-1):O,T=_.decodeDotInKeys?I.replace(/%2E/g,"."):I,M=parseInt(T,10);!_.parseArrays&&T===""?b={0:g}:!isNaN(M)&&O!==T&&String(M)===T&&M>=0&&_.parseArrays&&M<=_.arrayLimit?(b=[],b[M]=g):T!=="__proto__"&&(b[T]=g)}g=b}return g},h=function(d,_,E,S){if(d){var m=E.allowDots?d.replace(/\.([^.[]+)/g,"[$1]"):d,g=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,b=E.depth>0&&g.exec(m),O=b?m.slice(0,b.index):m,I=[];if(O){if(!E.plainObjects&&r.call(Object.prototype,O)&&!E.allowPrototypes)return;I.push(O)}for(var T=0;E.depth>0&&(b=v.exec(m))!==null&&T<E.depth;){if(T+=1,!E.plainObjects&&r.call(Object.prototype,b[1].slice(1,-1))&&!E.allowPrototypes)return;I.push(b[1])}if(b){if(E.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+E.depth+" and strictDepth is true");I.push("["+m.slice(b.index)+"]")}return c(I,_,E,S)}},p=function(d){if(!d)return n;if(typeof d.allowEmptyArrays<"u"&&typeof d.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof d.decodeDotInKeys<"u"&&typeof d.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(d.decoder!==null&&typeof d.decoder<"u"&&typeof d.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof d.charset<"u"&&d.charset!=="utf-8"&&d.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof d.throwOnLimitExceeded<"u"&&typeof d.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var _=typeof d.charset>"u"?n.charset:d.charset,E=typeof d.duplicates>"u"?n.duplicates:d.duplicates;if(E!=="combine"&&E!=="first"&&E!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var S=typeof d.allowDots>"u"?d.decodeDotInKeys===!0?!0:n.allowDots:!!d.allowDots;return{allowDots:S,allowEmptyArrays:typeof d.allowEmptyArrays=="boolean"?!!d.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof d.allowPrototypes=="boolean"?d.allowPrototypes:n.allowPrototypes,allowSparse:typeof d.allowSparse=="boolean"?d.allowSparse:n.allowSparse,arrayLimit:typeof d.arrayLimit=="number"?d.arrayLimit:n.arrayLimit,charset:_,charsetSentinel:typeof d.charsetSentinel=="boolean"?d.charsetSentinel:n.charsetSentinel,comma:typeof d.comma=="boolean"?d.comma:n.comma,decodeDotInKeys:typeof d.decodeDotInKeys=="boolean"?d.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof d.decoder=="function"?d.decoder:n.decoder,delimiter:typeof d.delimiter=="string"||e.isRegExp(d.delimiter)?d.delimiter:n.delimiter,depth:typeof d.depth=="number"||d.depth===!1?+d.depth:n.depth,duplicates:E,ignoreQueryPrefix:d.ignoreQueryPrefix===!0,interpretNumericEntities:typeof d.interpretNumericEntities=="boolean"?d.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof d.parameterLimit=="number"?d.parameterLimit:n.parameterLimit,parseArrays:d.parseArrays!==!1,plainObjects:typeof d.plainObjects=="boolean"?d.plainObjects:n.plainObjects,strictDepth:typeof d.strictDepth=="boolean"?!!d.strictDepth:n.strictDepth,strictNullHandling:typeof d.strictNullHandling=="boolean"?d.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof d.throwOnLimitExceeded=="boolean"?d.throwOnLimitExceeded:!1}};return dv=function(w,d){var _=p(d);if(w===""||w===null||typeof w>"u")return _.plainObjects?{__proto__:null}:{};for(var E=typeof w=="string"?u(w,_):w,S=_.plainObjects?{__proto__:null}:{},m=Object.keys(E),g=0;g<m.length;++g){var v=m[g],b=h(v,E[v],_,typeof w=="string");S=e.merge(S,b,_)}return _.allowSparse===!0?S:e.compact(S)},dv}var pv,L3;function pC(){if(L3)return pv;L3=1;var e=hC(),r=dC(),t=Am();return pv={formats:t,parse:r,stringify:e},pv}var N3;function K8(){if(N3)return wf;N3=1;var e=IA();function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
|
|
152
|
-
`," "],o=["{","}","|","\\","^","`"].concat(i),l=["'"].concat(o),u=["%","/","?",";","#"].concat(l),c=["/","?","#"],h=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=pC();function m(O,I,T){if(O&&typeof O=="object"&&O instanceof r)return O;var M=new r;return M.parse(O,I,T),M}r.prototype.parse=function(O,I,T){if(typeof O!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof O);var M=O.indexOf("?"),j=M!==-1&&M<O.indexOf("#")?"?":"#",C=O.split(j),x=/\\/g;C[0]=C[0].replace(x,"/"),O=C.join(j);var L=O;if(L=L.trim(),!T&&O.split("#").length===1){var A=a.exec(L);if(A)return this.path=L,this.href=L,this.pathname=A[1],A[2]?(this.search=A[2],I?this.query=S.parse(this.search.substr(1)):this.query=this.search.substr(1)):I&&(this.search="",this.query={}),this}var N=t.exec(L);if(N){N=N[0];var F=N.toLowerCase();this.protocol=F,L=L.substr(N.length)}if(T||N||L.match(/^\/\/[^@/]+@[^@/]+/)){var U=L.substr(0,2)==="//";U&&!(N&&_[N])&&(L=L.substr(2),this.slashes=!0)}if(!_[N]&&(U||N&&!E[N])){for(var W=-1,$=0;$<c.length;$++){var Z=L.indexOf(c[$]);Z!==-1&&(W===-1||Z<W)&&(W=Z)}var V,G;W===-1?G=L.lastIndexOf("@"):G=L.lastIndexOf("@",W),G!==-1&&(V=L.slice(0,G),L=L.slice(G+1),this.auth=decodeURIComponent(V)),W=-1;for(var $=0;$<u.length;$++){var Z=L.indexOf(u[$]);Z!==-1&&(W===-1||Z<W)&&(W=Z)}W===-1&&(W=L.length),this.host=L.slice(0,W),L=L.slice(W),this.parseHost(),this.hostname=this.hostname||"";var z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!z)for(var D=this.hostname.split(/\./),$=0,K=D.length;$<K;$++){var ne=D[$];if(ne&&!ne.match(p)){for(var Q="",ee=0,ae=ne.length;ee<ae;ee++)ne.charCodeAt(ee)>127?Q+="x":Q+=ne[ee];if(!Q.match(p)){var se=D.slice(0,$),ce=D.slice($+1),me=ne.match(w);me&&(se.push(me[1]),ce.unshift(me[2])),ce.length&&(L="/"+ce.join(".")+L),this.hostname=se.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),z||(this.hostname=e.toASCII(this.hostname));var Se=this.port?":"+this.port:"",Oe=this.hostname||"";this.host=Oe+Se,this.href+=this.host,z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),L[0]!=="/"&&(L="/"+L))}if(!d[F])for(var $=0,K=l.length;$<K;$++){var Ne=l[$];if(L.indexOf(Ne)!==-1){var xe=encodeURIComponent(Ne);xe===Ne&&(xe=escape(Ne)),L=L.split(Ne).join(xe)}}var ve=L.indexOf("#");ve!==-1&&(this.hash=L.substr(ve),L=L.slice(0,ve));var Xe=L.indexOf("?");if(Xe!==-1?(this.search=L.substr(Xe),this.query=L.substr(Xe+1),I&&(this.query=S.parse(this.query)),L=L.slice(0,Xe)):I&&(this.search="",this.query={}),L&&(this.pathname=L),E[F]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Se=this.pathname||"",be=this.search||"";this.path=Se+be}return this.href=this.format(),this};function g(O){return typeof O=="string"&&(O=m(O)),O instanceof r?O.format():r.prototype.format.call(O)}r.prototype.format=function(){var O=this.auth||"";O&&(O=encodeURIComponent(O),O=O.replace(/%3A/i,":"),O+="@");var I=this.protocol||"",T=this.pathname||"",M=this.hash||"",j=!1,C="";this.host?j=O+this.host:this.hostname&&(j=O+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(j+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(C=S.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var x=this.search||C&&"?"+C||"";return I&&I.substr(-1)!==":"&&(I+=":"),this.slashes||(!I||E[I])&&j!==!1?(j="//"+(j||""),T&&T.charAt(0)!=="/"&&(T="/"+T)):j||(j=""),M&&M.charAt(0)!=="#"&&(M="#"+M),x&&x.charAt(0)!=="?"&&(x="?"+x),T=T.replace(/[?#]/g,function(L){return encodeURIComponent(L)}),x=x.replace("#","%23"),I+j+T+x+M};function v(O,I){return m(O,!1,!0).resolve(I)}r.prototype.resolve=function(O){return this.resolveObject(m(O,!1,!0)).format()};function b(O,I){return O?m(O,!1,!0).resolveObject(I):I}return r.prototype.resolveObject=function(O){if(typeof O=="string"){var I=new r;I.parse(O,!1,!0),O=I}for(var T=new r,M=Object.keys(this),j=0;j<M.length;j++){var C=M[j];T[C]=this[C]}if(T.hash=O.hash,O.href==="")return T.href=T.format(),T;if(O.slashes&&!O.protocol){for(var x=Object.keys(O),L=0;L<x.length;L++){var A=x[L];A!=="protocol"&&(T[A]=O[A])}return E[T.protocol]&&T.hostname&&!T.pathname&&(T.pathname="/",T.path=T.pathname),T.href=T.format(),T}if(O.protocol&&O.protocol!==T.protocol){if(!E[O.protocol]){for(var N=Object.keys(O),F=0;F<N.length;F++){var U=N[F];T[U]=O[U]}return T.href=T.format(),T}if(T.protocol=O.protocol,!O.host&&!_[O.protocol]){for(var K=(O.pathname||"").split("/");K.length&&!(O.host=K.shift()););O.host||(O.host=""),O.hostname||(O.hostname=""),K[0]!==""&&K.unshift(""),K.length<2&&K.unshift(""),T.pathname=K.join("/")}else T.pathname=O.pathname;if(T.search=O.search,T.query=O.query,T.host=O.host||"",T.auth=O.auth,T.hostname=O.hostname||O.host,T.port=O.port,T.pathname||T.search){var W=T.pathname||"",$=T.search||"";T.path=W+$}return T.slashes=T.slashes||O.slashes,T.href=T.format(),T}var Z=T.pathname&&T.pathname.charAt(0)==="/",V=O.host||O.pathname&&O.pathname.charAt(0)==="/",G=V||Z||T.host&&O.pathname,z=G,D=T.pathname&&T.pathname.split("/")||[],K=O.pathname&&O.pathname.split("/")||[],ne=T.protocol&&!E[T.protocol];if(ne&&(T.hostname="",T.port=null,T.host&&(D[0]===""?D[0]=T.host:D.unshift(T.host)),T.host="",O.protocol&&(O.hostname=null,O.port=null,O.host&&(K[0]===""?K[0]=O.host:K.unshift(O.host)),O.host=null),G=G&&(K[0]===""||D[0]==="")),V)T.host=O.host||O.host===""?O.host:T.host,T.hostname=O.hostname||O.hostname===""?O.hostname:T.hostname,T.search=O.search,T.query=O.query,D=K;else if(K.length)D||(D=[]),D.pop(),D=D.concat(K),T.search=O.search,T.query=O.query;else if(O.search!=null){if(ne){T.host=D.shift(),T.hostname=T.host;var Q=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;Q&&(T.auth=Q.shift(),T.hostname=Q.shift(),T.host=T.hostname)}return T.search=O.search,T.query=O.query,(T.pathname!==null||T.search!==null)&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.href=T.format(),T}if(!D.length)return T.pathname=null,T.search?T.path="/"+T.search:T.path=null,T.href=T.format(),T;for(var ee=D.slice(-1)[0],ae=(T.host||O.host||D.length>1)&&(ee==="."||ee==="..")||ee==="",se=0,ce=D.length;ce>=0;ce--)ee=D[ce],ee==="."?D.splice(ce,1):ee===".."?(D.splice(ce,1),se++):se&&(D.splice(ce,1),se--);if(!G&&!z)for(;se--;se)D.unshift("..");G&&D[0]!==""&&(!D[0]||D[0].charAt(0)!=="/")&&D.unshift(""),ae&&D.join("/").substr(-1)!=="/"&&D.push("");var me=D[0]===""||D[0]&&D[0].charAt(0)==="/";if(ne){T.hostname=me?"":D.length?D.shift():"",T.host=T.hostname;var Q=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;Q&&(T.auth=Q.shift(),T.hostname=Q.shift(),T.host=T.hostname)}return G=G||T.host&&D.length,G&&!me&&D.unshift(""),D.length>0?T.pathname=D.join("/"):(T.pathname=null,T.path=null),(T.pathname!==null||T.search!==null)&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.auth=O.auth||T.auth,T.slashes=T.slashes||O.slashes,T.href=T.format(),T},r.prototype.parseHost=function(){var O=this.host,I=n.exec(O);I&&(I=I[0],I!==":"&&(this.port=I.substr(1)),O=O.substr(0,O.length-I.length)),O&&(this.hostname=O)},wf.parse=m,wf.resolve=v,wf.resolveObject=b,wf.format=g,wf.Url=r,wf}var w1={exports:{}},gC=w1.exports,T3;function vC(){return T3||(T3=1,function(e){(function(r,t){e.exports?e.exports=t():r.xmlserializer=t()})(gC,function(){var r=function(d){return d.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},t=function(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n=function(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},a=function(d){var _=d.value;return" "+d.name+'="'+t(_)+'"'},i=function(d){var _=d.tagName;return d.namespaceURI==="http://www.w3.org/1999/xhtml"&&(_=_.toLowerCase()),_},o=function(d,_){var E=Array.prototype.map.call(d.attributes||d.attrs,function(S){return S.name}).indexOf("xmlns")>=0;return!E&&(_||d.namespaceURI!==d.parentNode.namespaceURI)?' xmlns="'+d.namespaceURI+'"':""},l=function(d){return Array.prototype.map.call(d.childNodes,function(_){return w(_)}).join("")},u=function(d,_){var E="<"+i(d);return E+=o(d,_),Array.prototype.forEach.call(d.attributes||d.attrs,function(S){E+=a(S)}),d.childNodes.length>0?(E+=">",E+=l(d),E+="</"+i(d)+">"):E+="/>",E},c=function(d){var _=d.nodeValue||d.value||"";return n(_)},h=function(d){return"<!--"+d.data.replace(/-/g,"-")+"-->"},p=function(d){return"<![CDATA["+d.nodeValue+"]]>"},w=function(d,_){var E=_&&_.rootNode;if(d.nodeName==="#document"||d.nodeName==="#document-fragment")return l(d);if(d.tagName)return u(d,E);if(d.nodeName==="#text")return c(d);if(d.nodeName==="#comment")return h(d);if(d.nodeName==="#cdata-section")return p(d)};return{serializeToString:function(d){return r(w(d,{rootNode:!0}))}}})}(w1)),w1.exports}var gv={},R3;function mC(){if(R3)return gv;R3=1;var e=function(i){var o=new XMLSerializer;return Array.prototype.map.call(i.childNodes,function(l){return o.serializeToString(l)}).join("")},r=function(i){if(i.documentElement.tagName==="parsererror"&&i.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return i.documentElement;if((i.documentElement.tagName==="xml"||i.documentElement.tagName==="html")&&i.documentElement.childNodes&&i.documentElement.childNodes.length>0&&i.documentElement.childNodes[0].nodeName==="parsererror")return i.documentElement.childNodes[0];if(i.documentElement.tagName==="html"&&i.documentElement.childNodes&&i.documentElement.childNodes.length>0&&i.documentElement.childNodes[0].nodeName==="body"&&i.documentElement.childNodes[0].childNodes&&i.documentElement.childNodes[0].childNodes.length&&i.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return i.documentElement.childNodes[0].childNodes[0]},t=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
153
|
-
?</div>`),new RegExp(`^(.+)
|
|
154
|
-
`)],n=function(i){var o=e(i),l,u;for(l=0;l<t.length;l++)if(u=t[l].exec(o),u)return u[1]},a=function(i){var o;if(i===null)throw new Error("Parse error");var l=r(i);if(l!==void 0)throw o=n(l)||"Parse error",new Error(o)};return gv.failOnParseError=function(i){return a(i),i},gv}var vv={},mv={},M3;function l0(){return M3||(M3=1,function(e){var r=K8();e.getDocumentBaseUrl=function(l){return l.baseURI!=="about:blank"?l.baseURI:null},e.clone=function(l){var u={},c;for(c in l)l.hasOwnProperty(c)&&(u[c]=l[c]);return u},e.cloneArray=function(l){return Array.prototype.slice.apply(l,[0])},e.joinUrl=function(l,u){return l?r.resolve(l,u):u},e.isDataUri=function(l){return/^data:/.test(l)},e.collectAndReportErrors=function(l){var u=[];return Promise.all(l.map(function(c){return c.catch(function(h){u.push(h)})})).then(function(){return u})};var t=null,n=function(l,u){return u===!1||u==="none"||u==="repeated"?((t===null||u!=="repeated")&&(t=Date.now()),l+"?_="+t):l};e.ajax=function(l,u){return new Promise(function(c,h){var p=new window.XMLHttpRequest,w=e.joinUrl(u.baseUrl,l),d,_=function(){h({msg:"Unable to load url",url:w})};d=n(w,u.cache),p.addEventListener("load",function(){p.status===200||p.status===0?c(p.response):_()},!1),p.addEventListener("error",_,!1);try{p.open("GET",d,!0),p.overrideMimeType(u.mimeType),p.send(null)}catch{_()}})},e.binaryAjax=function(l,u){var c=e.clone(u);return c.mimeType="text/plain; charset=x-user-defined",e.ajax(l,c).then(function(h){for(var p="",w=0;w<h.length;w++)p+=String.fromCharCode(h.charCodeAt(w)&255);return p})};var a=function(l){var u=function(c,h){return c.substring(0,h.length)===h};return u(l,"<?xml")||u(l,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(l,u){return e.binaryAjax(l,u).then(function(c){var h=btoa(c),p=a(c);return"data:"+p+";base64,"+h})};var i=[],o=function(l){return i.indexOf(l)<0&&i.push(l),i.indexOf(l)};e.memoize=function(l,u,c){if(typeof c!="object")throw new Error("cacheBucket is not an object");return function(){var h=Array.prototype.slice.call(arguments),p=u(h),w=o(l),d;return c[w]&&c[w][p]?c[w][p]:(d=l.apply(null,h),c[w]=c[w]||{},c[w][p]=d,d)}}}(mv)),mv}var yv={},I3;function yC(){if(I3)return yv;I3=1;var e=l0(),r=function(i,o){var l=null;i.hasAttribute("src")?l=i.getAttribute("src"):i.hasAttributeNS("http://www.w3.org/1999/xlink","href")?l=i.getAttributeNS("http://www.w3.org/1999/xlink","href"):i.hasAttribute("href")&&(l=i.getAttribute("href"));var u=e.getDocumentBaseUrl(i.ownerDocument),c=e.clone(o);return!c.baseUrl&&u&&(c.baseUrl=u),e.getDataURIForImageURL(l,c).then(function(h){return h},function(h){throw{resourceType:"image",url:h.url,msg:"Unable to load image "+h.url}})},t=function(i){return i.filter(function(o){var l=null;return o.hasAttribute("src")?l=o.getAttribute("src"):o.hasAttributeNS("http://www.w3.org/1999/xlink","href")?l=o.getAttributeNS("http://www.w3.org/1999/xlink","href"):o.hasAttribute("href")&&(l=o.getAttribute("href")),l!==null&&!e.isDataUri(l)})},n=function(i){return Array.prototype.filter.call(i,function(o){return o.type==="image"})},a=function(i){return Array.prototype.slice.call(i)};return yv.inline=function(i,o){var l=a(i.getElementsByTagName("img")),u=a(i.getElementsByTagName("image")),c=n(i.getElementsByTagName("input"));l=l.concat(u),l=l.concat(c);var h=t(l);return e.collectAndReportErrors(h.map(function(p){return r(p,o).then(function(w){p.attributes.src?p.attributes.src.value=w:p.attributes["xlink:href"]?p.attributes["xlink:href"].value=w:p.attributes.href&&(p.attributes.href.value=w)})}))},yv}var bv={},j3;function bC(){if(j3)return bv;j3=1;var e=l0(),r=function(i,o){var l=i.attributes.src.value,u=e.getDocumentBaseUrl(i.ownerDocument),c=e.clone(o);return!c.baseUrl&&u&&(c.baseUrl=u),e.ajax(l,c).catch(function(h){throw{resourceType:"script",url:h.url,msg:"Unable to load script "+h.url}})},t=function(i){return i.replace(/<\//g,"<\\/")},n=function(i,o){i.attributes.removeNamedItem("src"),i.textContent=t(o)},a=function(i){var o=i.getElementsByTagName("script");return Array.prototype.filter.call(o,function(l){return!!l.attributes.src})};return bv.inline=function(i,o){var l=a(i);return e.collectAndReportErrors(l.map(function(u){return r(u,o).then(function(c){n(u,c)})}))},bv}var wv={},_v={},F3;function Cm(){return F3||(F3=1,function(e){e.unquoteString=function(r){var t=/^"(.*)"$/,n=/^'(.*)'$/;return t.test(r)?r.replace(t,"$1"):n.test(r)?r.replace(n,"$1"):r},e.rulesForCssText=function(r){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style"),a;return n.textContent=r,t.body.appendChild(n),a=n.sheet.cssRules,Array.prototype.slice.call(a)},e.cssRulesToText=function(r){return r.reduce(function(t,n){return t+n.cssText},"")},e.exchangeRule=function(r,t,n){var a=r.indexOf(t);r[a]=e.rulesForCssText(n)[0]},e.changeFontFaceRuleSrc=function(r,t,n){var a="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(a+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(a+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(a+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),a+="src: "+n+"}",e.exchangeRule(r,t,a)}}(_v)),_v}var Sv={},D3;function wC(){return D3||(D3=1,function(e){var r=Cm(),t=function(i){var o=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return i.replace(o,"$1")};e.extractCssUrl=function(i){var o=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,l;if(!o.test(i))throw new Error("Invalid url");return l=o.exec(i)[1],r.unquoteString(t(l))};var n=function(i){var o=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,l="(url\\("+o+"\\)|[^,\\s]+)",u="(?:\\s*"+l+")+",c="^\\s*("+u+")(?:\\s*,\\s*("+u+"))*\\s*$",h=new RegExp(u,"g"),p,w=[],d=function(_){var E=new RegExp(l,"g"),S=[],m;for(m=E.exec(_);m;)S.push(m[1]),m=E.exec(_);return S};if(i.match(new RegExp(c))){for(p=h.exec(i);p;)w.push(d(p[0])),p=h.exec(i);return w}return[]},a=function(i){var o,l;for(o=0;o<i.length;o++)try{return l=e.extractCssUrl(i[o]),{url:l,idx:o}}catch{}};e.parse=function(i){var o=n(i);return o.map(function(l){var u=a(l);return u?{preUrl:l.slice(0,u.idx),url:u.url,postUrl:l.slice(u.idx+1)}:{preUrl:l}})},e.serialize=function(i){var o=i.map(function(l){var u=[].concat(l.preUrl);return l.url&&u.push('url("'+l.url+'")'),l.postUrl&&(u=u.concat(l.postUrl)),u.join(" ")});return o.join(", ")}}(Sv)),Sv}function c1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xv={exports:{}},B3;function _C(){return B3||(B3=1,function(e,r){(function(t){e.exports=t()})(function(){return function t(n,a,i){function o(c,h){if(!a[c]){if(!n[c]){var p=typeof c1=="function"&&c1;if(!h&&p)return p(c,!0);if(l)return l(c,!0);var w=new Error("Cannot find module '"+c+"'");throw w.code="MODULE_NOT_FOUND",w}var d=a[c]={exports:{}};n[c][0].call(d.exports,function(_){var E=n[c][1][_];return o(E||_)},d,d.exports,t,n,a,i)}return a[c].exports}for(var l=typeof c1=="function"&&c1,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(t,n,a){function i(u,c){function h(){this.constructor=u}h.prototype=c.prototype,u.prototype=new h}function o(u,c,h,p){this.message=u,this.expected=c,this.found=h,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o)}i(o,Error),o.buildMessage=function(u,c){var h={literal:function(m){return'"'+w(m.text)+'"'},class:function(m){var g="",v;for(v=0;v<m.parts.length;v++)g+=m.parts[v]instanceof Array?d(m.parts[v][0])+"-"+d(m.parts[v][1]):d(m.parts[v]);return"["+(m.inverted?"^":"")+g+"]"},any:function(m){return"any character"},end:function(m){return"end of input"},other:function(m){return m.description}};function p(m){return m.charCodeAt(0).toString(16).toUpperCase()}function w(m){return m.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+p(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+p(g)})}function d(m){return m.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+p(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+p(g)})}function _(m){return h[m.type](m)}function E(m){var g=new Array(m.length),v,b;for(v=0;v<m.length;v++)g[v]=_(m[v]);if(g.sort(),g.length>0){for(v=1,b=1;v<g.length;v++)g[v-1]!==g[v]&&(g[b]=g[v],b++);g.length=b}switch(g.length){case 1:return g[0];case 2:return g[0]+" or "+g[1];default:return g.slice(0,-1).join(", ")+", or "+g[g.length-1]}}function S(m){return m?'"'+w(m)+'"':"end of input"}return"Expected "+E(u)+" but "+S(c)+" found."};function l(u,c){c=c!==void 0?c:{};var h={},p={start:Se},w=Se,d="",_=function(){return[]},E=",",S=ne(",",!1),m=function(he,ke){return[he].concat(ke)},g=function(he){return[he]},v=function(he,ke){return{url:he,format:ke}},b=function(he){return{url:he}},O="url(",I=ne("url(",!1),T=")",M=ne(")",!1),j=function(he){return he},C="format(",x=ne("format(",!1),L="local(",A=ne("local(",!1),N=function(he){return{local:he}},F=/^[^)]/,U=Q([")"],!0,!1),W=function(he){return Le.extractValue(he.join(""))},$=/^[ \t\r\n\f]/,Z=Q([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),V=0,G=[{line:1,column:1}],z=0,D=[],K;if("startRule"in c){if(!(c.startRule in p))throw new Error(`Can't start parsing from rule "`+c.startRule+'".');w=p[c.startRule]}function ne(he,ke){return{type:"literal",text:he,ignoreCase:ke}}function Q(he,ke,Re){return{type:"class",parts:he,inverted:ke,ignoreCase:Re}}function ee(){return{type:"end"}}function ae(he){var ke=G[he],Re;if(ke)return ke;for(Re=he-1;!G[Re];)Re--;for(ke=G[Re],ke={line:ke.line,column:ke.column};Re<he;)u.charCodeAt(Re)===10?(ke.line++,ke.column=1):ke.column++,Re++;return G[he]=ke,ke}function se(he,ke){var Re=ae(he),$e=ae(ke);return{start:{offset:he,line:Re.line,column:Re.column},end:{offset:ke,line:$e.line,column:$e.column}}}function ce(he){V<z||(V>z&&(z=V,D=[]),D.push(he))}function me(he,ke,Re){return new o(o.buildMessage(he,ke),he,ke,Re)}function Se(){var he,ke;return he=Oe(),he===h&&(he=V,ke=d,ke!==h&&(ke=_()),he=ke),he}function Oe(){var he,ke,Re,$e,vt,wt;if(he=V,ke=Ne(),ke!==h){for(Re=[],$e=Ee();$e!==h;)Re.push($e),$e=Ee();if(Re!==h)if(u.charCodeAt(V)===44?($e=E,V++):($e=h,ce(S)),$e!==h){for(vt=[],wt=Ee();wt!==h;)vt.push(wt),wt=Ee();vt!==h?(wt=Oe(),wt!==h?(ke=m(ke,wt),he=ke):(V=he,he=h)):(V=he,he=h)}else V=he,he=h;else V=he,he=h}else V=he,he=h;return he===h&&(he=V,ke=Ne(),ke!==h&&(ke=g(ke)),he=ke),he}function Ne(){var he;return he=xe(),he===h&&(he=be()),he}function xe(){var he,ke,Re,$e;if(he=V,ke=ve(),ke!==h){if(Re=[],$e=Ee(),$e!==h)for(;$e!==h;)Re.push($e),$e=Ee();else Re=h;Re!==h?($e=Xe(),$e!==h?(ke=v(ke,$e),he=ke):(V=he,he=h)):(V=he,he=h)}else V=he,he=h;return he===h&&(he=V,ke=ve(),ke!==h&&(ke=b(ke)),he=ke),he}function ve(){var he,ke,Re,$e;return he=V,u.substr(V,4)===O?(ke=O,V+=4):(ke=h,ce(I)),ke!==h?(Re=Ae(),Re!==h?(u.charCodeAt(V)===41?($e=T,V++):($e=h,ce(M)),$e!==h?(ke=j(Re),he=ke):(V=he,he=h)):(V=he,he=h)):(V=he,he=h),he}function Xe(){var he,ke,Re,$e;return he=V,u.substr(V,7)===C?(ke=C,V+=7):(ke=h,ce(x)),ke!==h?(Re=Ae(),Re!==h?(u.charCodeAt(V)===41?($e=T,V++):($e=h,ce(M)),$e!==h?(ke=j(Re),he=ke):(V=he,he=h)):(V=he,he=h)):(V=he,he=h),he}function be(){var he,ke,Re,$e;return he=V,u.substr(V,6)===L?(ke=L,V+=6):(ke=h,ce(A)),ke!==h?(Re=Ae(),Re!==h?(u.charCodeAt(V)===41?($e=T,V++):($e=h,ce(M)),$e!==h?(ke=N(Re),he=ke):(V=he,he=h)):(V=he,he=h)):(V=he,he=h),he}function Ae(){var he,ke,Re;if(he=V,ke=[],F.test(u.charAt(V))?(Re=u.charAt(V),V++):(Re=h,ce(U)),Re!==h)for(;Re!==h;)ke.push(Re),F.test(u.charAt(V))?(Re=u.charAt(V),V++):(Re=h,ce(U));else ke=h;return ke!==h&&(ke=W(ke)),he=ke,he}function Ee(){var he;return $.test(u.charAt(V))?(he=u.charAt(V),V++):(he=h,ce(Z)),he}var Le=t("../util");if(K=w(),K!==h&&V===u.length)return K;throw K!==h&&V<u.length&&ce(ee()),me(D,z<u.length?u.charAt(z):null,z<u.length?se(z,z+1):se(z,z))}n.exports={SyntaxError:o,parse:l}},{"../util":3}],2:[function(t,n,a){var i=t("./grammar");a.SyntaxError=function(o,l){this.message=o,this.offset=l},a.parse=function(o){try{return i.parse(o)}catch(l){throw new a.SyntaxError(l.message,l.offset)}},a.serialize=function(o){return o.map(function(l){var u;return l.url?(u='url("'+l.url+'")',l.format&&(u+=' format("'+l.format+'")')):u='local("'+l.local+'")',u}).join(", ")}},{"./grammar":1}],3:[function(t,n,a){var i=function(l){var u=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return l.replace(u,"$1")},o=function(l){var u=/^"(.*)"$/,c=/^'(.*)'$/;return u.test(l)?l.replace(u,"$1"):c.test(l)?l.replace(c,"$1"):l};a.extractValue=function(l){return o(i(l))}},{}]},{},[2])(2)})}(xv)),xv.exports}var q3;function SC(){return q3||(q3=1,function(e){var r=l0(),t=Cm(),n=wC(),a=_C(),i=function(g,v,b){g.style.setProperty(v,b,g.style.getPropertyPriority(v))},o=function(g){return g.filter(function(v){return v.type===window.CSSRule.STYLE_RULE&&(v.style.getPropertyValue("background-image")||v.style.getPropertyValue("background"))})},l=function(g){var v=[];return g.forEach(function(b){b.style.getPropertyValue("background-image")?v.push({property:"background-image",value:b.style.getPropertyValue("background-image"),rule:b}):b.style.getPropertyValue("background")&&v.push({property:"background",value:b.style.getPropertyValue("background"),rule:b})}),v},u=function(g){return g.filter(function(v){return v.type===window.CSSRule.FONT_FACE_RULE&&v.style.getPropertyValue("src")})},c=function(g){return g.filter(function(v){return v.type===window.CSSRule.IMPORT_RULE&&v.href})},h=function(g){var v=[];return g.forEach(function(b,O){b.url&&!r.isDataUri(b.url)&&v.push(O)}),v},p=function(g){var v=[];return g.forEach(function(b,O){b.url&&!r.isDataUri(b.url)&&v.push(O)}),v};e.adjustPathsOfCssResources=function(g,v){var b=o(v),O=l(b),I=!1;return O.forEach(function(T){var M=n.parse(T.value),j=h(M),C;j.length>0&&(j.forEach(function(x){var L=M[x].url,A=r.joinUrl(g,L);M[x].url=A}),C=n.serialize(M),i(T.rule,T.property,C),I=!0)}),u(v).forEach(function(T){var M=T.style.getPropertyValue("src"),j,C;try{j=a.parse(M)}catch{return}C=p(j),C.length>0&&(C.forEach(function(x){var L=j[x].url,A=r.joinUrl(g,L);j[x].url=A}),t.changeFontFaceRuleSrc(v,T,a.serialize(j)),I=!0)}),c(v).forEach(function(T){var M=T.href,j=r.joinUrl(g,M);t.exchangeRule(v,T,"@import url("+j+");"),I=!0}),I};var w=function(g,v,b){var O=g.indexOf(v);g.splice(O,1),b.forEach(function(I,T){g.splice(O+T,0,I)})},d=function(g,v,b,O){var I=v.href,T;return I=t.unquoteString(I),T=r.joinUrl(O.baseUrl,I),b.indexOf(T)>=0?(w(g,v,[]),Promise.resolve([])):(b.push(T),r.ajax(I,O).then(function(M){var j=t.rulesForCssText(M);return e.loadCSSImportsForRules(j,b,O).then(function(C){return e.adjustPathsOfCssResources(I,j),w(g,v,j),C.errors})},function(M){throw{resourceType:"stylesheet",url:M.url,msg:"Unable to load stylesheet "+M.url}}))};e.loadCSSImportsForRules=function(g,v,b){var O=c(g),I=[],T=!1;return Promise.all(O.map(function(M){return d(g,M,v,b).then(function(j){I=I.concat(j),T=!0},function(j){I.push(j)})})).then(function(){return{hasChanges:T,errors:I}})};var _=function(g,v){var b=n.parse(g),O=h(b),I=!1;return r.collectAndReportErrors(O.map(function(T){var M=b[T].url;return r.getDataURIForImageURL(M,v).then(function(j){b[T].url=j,I=!0},function(j){throw{resourceType:"backgroundImage",url:j.url,msg:"Unable to load background-image "+j.url}})})).then(function(T){return{backgroundValue:n.serialize(b),hasChanges:I,errors:T}})},E=function(g,v){var b=o(g),O=l(b),I=[],T=!1;return Promise.all(O.map(function(M){return _(M.value,v).then(function(j){j.hasChanges&&(i(M.rule,M.property,j.backgroundValue),T=!0),I=I.concat(j.errors)})})).then(function(){return{hasChanges:T,errors:I}})},S=function(g,v){var b=!1,O,I;try{O=a.parse(g)}catch{O=[]}return I=p(O),r.collectAndReportErrors(I.map(function(T){var M=O[T],j=M.format||"woff";return r.binaryAjax(M.url,v).then(function(C){var x=btoa(C);M.url="data:font/"+j+";base64,"+x,b=!0},function(C){throw{resourceType:"fontFace",url:C.url,msg:"Unable to load font-face "+C.url}})})).then(function(T){return{srcDeclarationValue:a.serialize(O),hasChanges:b,errors:T}})},m=function(g,v){var b=u(g),O=[],I=!1;return Promise.all(b.map(function(T){var M=T.style.getPropertyValue("src");return S(M,v).then(function(j){j.hasChanges&&(t.changeFontFaceRuleSrc(g,T,j.srcDeclarationValue),I=!0),O=O.concat(j.errors)})})).then(function(){return{hasChanges:I,errors:O}})};e.loadAndInlineCSSResourcesForRules=function(g,v){var b=!1,O=[];return Promise.all([E,m].map(function(I){return I(g,v).then(function(T){b=b||T.hasChanges,O=O.concat(T.errors)})})).then(function(){return{hasChanges:b,errors:O}})}}(wv)),wv}var z3;function xC(){return z3||(z3=1,function(e){var r=l0(),t=yC(),n=bC(),a=SC(),i=Cm(),o=function(S){return r.joinUrl(S,".")},l=function(S){var m=S.map(function(g,v){return v===S.length-1&&(g={baseUrl:o(g.baseUrl)}),JSON.stringify(g)});return m},u=function(S,m){return m.cache!==!1&&m.cache!=="none"&&m.cacheBucket?r.memoize(S,l,m.cacheBucket):S},c=function(S,m,g){var v=i.rulesForCssText(S);return a.loadCSSImportsForRules(v,m,g).then(function(b){return a.loadAndInlineCSSResourcesForRules(v,g).then(function(O){var I=b.errors.concat(O.errors),T=b.hasChanges||O.hasChanges;return T&&(S=i.cssRulesToText(v)),{hasChanges:T,content:S,errors:I}})})},h=function(S,m,g){var v=S.textContent,b=u(c,m);return b(v,g,m).then(function(O){return O.hasChanges&&(S.childNodes[0].nodeValue=O.content),r.cloneArray(O.errors)})},p=function(S){var m=S.getElementsByTagName("style");return Array.prototype.filter.call(m,function(g){return!g.attributes.type||g.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(S,m){var g=p(S),v=[],b=[],O;return O=r.clone(m),O.baseUrl=O.baseUrl||r.getDocumentBaseUrl(S),Promise.all(g.map(function(I){return h(I,O,b).then(function(T){v=v.concat(T)})})).then(function(){return v})};var w=function(S,m){var g=S.parentNode,v;m=m.trim(),m&&(v=S.ownerDocument.createElement("style"),v.type="text/css",v.appendChild(S.ownerDocument.createTextNode(m)),g.insertBefore(v,S)),g.removeChild(S)},d=function(S,m){return r.ajax(S,m).then(function(g){var v=i.rulesForCssText(g);return{content:g,cssRules:v}}).then(function(g){var v=a.adjustPathsOfCssResources(S,g.cssRules);return{content:g.content,cssRules:g.cssRules,hasChanges:v}}).then(function(g){return a.loadCSSImportsForRules(g.cssRules,[],m).then(function(v){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||v.hasChanges,errors:v.errors}})}).then(function(g){return a.loadAndInlineCSSResourcesForRules(g.cssRules,m).then(function(v){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||v.hasChanges,errors:g.errors.concat(v.errors)}})}).then(function(g){var v=g.content;return g.hasChanges&&(v=i.cssRulesToText(g.cssRules)),{content:v,errors:g.errors}})},_=function(S,m){var g=S.attributes.href.value,v=r.getDocumentBaseUrl(S.ownerDocument),b=r.clone(m);!b.baseUrl&&v&&(b.baseUrl=v);var O=u(d,m);return O(g,b).then(function(I){return{content:I.content,errors:r.cloneArray(I.errors)}})},E=function(S){var m=S.getElementsByTagName("link");return Array.prototype.filter.call(m,function(g){return g.attributes.rel&&g.attributes.rel.value==="stylesheet"&&(!g.attributes.type||g.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(S,m){var g=E(S),v=[];return Promise.all(g.map(function(b){return _(b,m).then(function(O){w(b,O.content+`
|
|
156
|
-
`),v=v.concat(O.errors)},function(O){v.push({resourceType:"stylesheet",url:O.url,msg:"Unable to load stylesheet "+O.url})})})).then(function(){return v})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(S,m){var g=[],v=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return m.inlineScripts!==!1&&v.push(e.loadAndInlineScript),Promise.all(v.map(function(b){return b(S,m).then(function(O){g=g.concat(O)})})).then(function(){return g})}}(vv)),vv}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
157
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
158
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */var EC=b1.exports,U3;function PC(){return U3||(U3=1,function(e){(function(r,t){r===void 0&&window!==void 0&&(r=window),e.exports?e.exports=t(K8(),vC(),mC(),xC()):r.rasterizeHTML=t(r.url,r.xmlserializer,r.sanedomparsererror,r.inlineresources)})(EC,function(r,t,n,a){var i=function(_){var E={},S=[];E.joinUrl=function(v,b){return v?_.resolve(v,b):b},E.getConstantUniqueIdFor=function(v){return S.indexOf(v)<0&&S.push(v),S.indexOf(v)},E.clone=function(v){var b={},O;for(O in v)v.hasOwnProperty(O)&&(b[O]=v[O]);return b};var m=function(v){return typeof v=="object"&&v!==null},g=function(v){return m(v)&&Object.prototype.toString.apply(v).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return E.parseOptionalParameters=function(v){var b={canvas:null,options:{}};return v[0]==null||g(v[0])?(b.canvas=v[0]||null,b.options=E.clone(v[1])):b.options=E.clone(v[0]),b},E}(r),o=function(_){var E={},S=function(m,g,v){var b=m[g];return m[g]=function(){var O=Array.prototype.slice.call(arguments);return v.apply(this,[O,b])},b};return E.baseUrlRespectingXhr=function(m,g){var v=function(){var b=new m;return S(b,"open",function(O,I){var T=O.shift(),M=O.shift(),j=_.joinUrl(g,M);return I.apply(this,[T,j].concat(O))}),b};return v},E.finishNotifyingXhr=function(m){var g=0,v=0,b=!1,O,I=new Promise(function(M){O=function(){var j=g-v;j<=0&&b&&M({totalCount:g})}}),T=function(){var M=new m;return S(M,"send",function(j,C){return g+=1,C.apply(this,arguments)}),M.addEventListener("load",function(){v+=1,O()}),M};return T.waitForRequestsToFinish=function(){return b=!0,O(),I},T},E}(i),l=function(){var _={},E=function(T){return Array.prototype.slice.call(T)};_.addClassName=function(T,M){T.className+=" "+M},_.addClassNameRecursively=function(T,M){_.addClassName(T,M),T.parentNode!==T.ownerDocument&&_.addClassNameRecursively(T.parentNode,M)};var S=function(T,M){var j=T.parentStyleSheet,C=E(j.cssRules).indexOf(T);j.insertRule(M,C+1),j.deleteRule(C)},m=function(T,M){var j=T.cssText.replace(/^[^\{]+/,""),C=M+" "+j;S(T,C)},g=function(T){return E(T).reduce(function(M,j){return M+j.cssText},"")},v=function(T){T.textContent=g(T.sheet.cssRules)},b=function(T){var M=document.implementation.createHTMLDocument(""),j=document.createElement("style");j.textContent=T.textContent,M.body.appendChild(j),T.sheet=j.sheet},O=function(T){return"((?:^|[^.#:\\w])|(?=\\W))("+T.join("|")+")(?=\\W|$)"},I=function(T,M,j){var C=O(M);E(T.querySelectorAll("style")).forEach(function(x){typeof x.sheet>"u"&&b(x);var L=E(x.sheet.cssRules).filter(function(A){return A.selectorText&&new RegExp(C,"i").test(A.selectorText)});L.length&&(L.forEach(function(A){var N=A.selectorText.replace(new RegExp(C,"gi"),function(F,U,W){return U+j(W)});N!==A.selectorText&&m(A,N)}),v(x))})};return _.rewriteCssSelectorWith=function(T,M,j){I(T,[M],function(){return j})},_.lowercaseCssTypeSelectors=function(T,M){I(T,M,function(j){return j.toLowerCase()})},_.findHtmlOnlyNodeNames=function(T){var M=T.ownerDocument.createTreeWalker(T,NodeFilter.SHOW_ELEMENT),j={},C={},x;do x=M.currentNode.tagName.toLowerCase(),M.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?j[x]=!0:C[x]=!0;while(M.nextNode());return Object.keys(j).filter(function(L){return!C[L]})},_}(),u=function(_){var E={},S=function(g){return Array.prototype.slice.call(g)},m={active:!0,hover:!0,focus:!1,target:!1};return E.fakeUserAction=function(g,v,b){var O=g.querySelector(v),I=":"+b,T="rasterizehtml"+b;O&&(m[b]?_.addClassNameRecursively(O,T):_.addClassName(O,T),_.rewriteCssSelectorWith(g,I,"."+T))},E.persistInputValues=function(g){var v=g.querySelectorAll("input"),b=g.querySelectorAll("textarea"),O=function(I){return I.type==="checkbox"||I.type==="radio"};S(v).filter(O).forEach(function(I){I.checked?I.setAttribute("checked",""):I.removeAttribute("checked")}),S(v).filter(function(I){return!O(I)}).forEach(function(I){I.setAttribute("value",I.value)}),S(b).forEach(function(I){I.textContent=I.value})},E.rewriteTagNameSelectorsToLowerCase=function(g){_.lowercaseCssTypeSelectors(g,_.findHtmlOnlyNodeNames(g))},E}(l),c=function(_,E,S,m){var g={},v=function(W,$,Z,V){var G=W.createElement($);return G.style.visibility="hidden",G.style.width=Z+"px",G.style.height=V+"px",G.style.position="absolute",G.style.top=-1e4-V+"px",G.style.left=-1e4-Z+"px",W.getElementsByTagName("body")[0].appendChild(G),G},b=function(W){return W>0?new Promise(function($){setTimeout($,W)}):Promise.resolve()};g.executeJavascript=function(W,$){return new Promise(function(Z){var V=v(m.document,"iframe",$.width,$.height),G=W.outerHTML,z=[],D=$.executeJsTimeout||0,K=function(){m.document.getElementsByTagName("body")[0].removeChild(V)},ne=function(){var se=V.contentDocument;Z({document:se,errors:z,cleanUp:K})},Q=V.contentWindow.XMLHttpRequest,ee=E.finishNotifyingXhr(Q),ae=E.baseUrlRespectingXhr(ee,$.baseUrl);V.onload=function(){b(D).then(ee.waitForRequestsToFinish).then(ne)},V.contentDocument.open(),V.contentWindow.XMLHttpRequest=ae,V.contentWindow.onerror=function(se){z.push({resourceType:"scriptExecution",msg:se})},V.contentDocument.write("<!DOCTYPE html>"),V.contentDocument.write(G),V.contentDocument.close()})};var O=function(W,$,Z){var V=W.createElement("iframe");return V.style.width=$+"px",V.style.height=Z+"px",V.style.visibility="hidden",V.style.position="absolute",V.style.top=-1e4-Z+"px",V.style.left=-1e4-$+"px",V.style.borderWidth=0,V.sandbox="allow-same-origin",V.scrolling="no",V},I=function(W,$,Z){var V=Math.floor(W/Z),G=Math.floor($/Z);return O(m.document,V,G)},T=function(W,$,Z,V){return{width:Math.max(W.width*V,$),height:Math.max(W.height*V,Z)}},M=function(W,$){var Z=W.querySelector($);if(Z)return Z;if(W.ownerDocument.querySelector($)===W)return W;throw{message:"Clipping selector not found"}},j=function(W,$,Z,V,G){var z=Math.max(W.scrollWidth,W.clientWidth),D=Math.max(W.scrollHeight,W.clientHeight),K,ne,Q,ee,ae,se,ce,me;return $?(se=M(W,$),ce=se.getBoundingClientRect(),K=ce.top,ne=ce.left,Q=ce.width,ee=ce.height):(K=0,ne=0,Q=z,ee=D),me=T({width:Q,height:ee},Z,V,G),ae=m.getComputedStyle(W.ownerDocument.documentElement).fontSize,{left:ne,top:K,width:me.width,height:me.height,viewportWidth:z,viewportHeight:D,rootFontSize:ae}},C=function(W,$){var Z=W.tagName;return $.querySelector(Z)},x=function(W){var $=W.tagName.toLowerCase();return $==="html"||$==="body"?W.outerHTML:'<body style="margin: 0;">'+W.outerHTML+"</body>"};g.calculateDocumentContentSize=function(W,$){return new Promise(function(Z,V){var G=$.zoom||1,z;z=I($.width,$.height,G),m.document.getElementsByTagName("body")[0].appendChild(z),z.onload=function(){var D=z.contentDocument,K;try{K=j(C(W,D),$.clip,$.width,$.height,G),Z(K)}catch(ne){V(ne)}finally{m.document.getElementsByTagName("body")[0].removeChild(z)}},z.contentDocument.open(),z.contentDocument.write("<!DOCTYPE html>"),z.contentDocument.write(x(W)),z.contentDocument.close()})},g.parseHtmlFragment=function(W){var $=m.document.implementation.createHTMLDocument("");$.documentElement.innerHTML=W;var Z=$.querySelector("body").firstChild;if(!Z)throw"Invalid source";return Z};var L=function(W,$){var Z=/<html((?:\s+[^>]*)?)>/im.exec($),V=m.document.implementation.createHTMLDocument(""),G,z,D,K;if(Z)for(G="<div"+Z[1]+"></div>",V.documentElement.innerHTML=G,D=V.querySelector("div"),z=0;z<D.attributes.length;z++)K=D.attributes[z],W.documentElement.setAttribute(K.name,K.value)};g.parseHTML=function(W){var $=m.document.implementation.createHTMLDocument("");return $.documentElement.innerHTML=W,L($,W),$};var A=function(W){try{return S.failOnParseError(W)}catch($){throw{message:"Invalid source",originalError:$}}};g.validateXHTML=function(W){var $=new DOMParser,Z=$.parseFromString(W,"application/xml");A(Z)};var N=null,F=function(W,$){return $==="none"||$==="repeated"?((N===null||$!=="repeated")&&(N=Date.now()),W+"?_="+N):W},U=function(W,$){return new Promise(function(Z,V){var G=new window.XMLHttpRequest,z=_.joinUrl($.baseUrl,W),D=F(z,$.cache),K=function(ne){V({message:"Unable to load page",originalError:ne})};G.addEventListener("load",function(){G.status===200||G.status===0?Z(G.responseXML):K(G.statusText)},!1),G.addEventListener("error",function(ne){K(ne)},!1);try{G.open("GET",D,!0),G.responseType="document",G.send(null)}catch(ne){K(ne)}})};return g.loadDocument=function(W,$){return U(W,$).then(function(Z){return A(Z)})},g}(i,o,n,window),h=function(_){var E={},S=function(C,x){return x?URL.createObjectURL(new Blob([C],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(C)},m=function(C){C instanceof Blob&&URL.revokeObjectURL(C)},g='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',v=function(C){return new Promise(function(x,L){var A=document.createElement("canvas"),N=new Image;N.onload=function(){var F=A.getContext("2d");try{F.drawImage(N,0,0),A.toDataURL("image/png"),x(!0)}catch{x(!1)}},N.onerror=L,N.src=C})},b=function(){var C=S(g,!0);return v(C).then(function(x){return m(C),x?!1:v(S(g,!1)).then(function(L){return L})},function(){return!1})},O=function(){if(_.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},I=function(){return new Promise(function(C,x){O()&&_.URL?b().then(function(L){C(!L)},function(){x()}):C(!1)})},T,M=function(){return T===void 0&&(T=I()),T},j=function(C){return M().then(function(x){return S(C,x)})};return E.renderSvg=function(C){return new Promise(function(x,L){var A,N,F=function(){N.onload=null,N.onerror=null},U=function(){A&&m(A)};N=new Image,N.onload=function(){F(),U(),x(N)},N.onerror=function(){U(),L()},j(C).then(function(W){A=W,N.src=A},L)})},E}(window),p=function(_,E,S,m){var g={},v=function(C,x){var L=x||1,A={width:C.width,height:C.height,"font-size":C.rootFontSize};return L!==1&&(A.style="transform:scale("+L+"); transform-origin: 0 0;"),A},b=function(C){var x,L,A,N;x=Math.round(C.viewportWidth),L=Math.round(C.viewportHeight),A=-C.left,N=-C.top;var F={x:A,y:N,width:x,height:L};return F},O=function(C){var x=C.style||"";C.style=x+"float: left;"},I=function(C){C.externalResourcesRequired=!0},T=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},M=function(C){var x=Object.keys(C);return x.length?" "+x.map(function(L){return L+'="'+C[L]+'"'}).join(" "):""},j=function(C,x,L){var A=m.serializeToString(C);E.validateXHTML(A);var N=b(x);return O(N),I(N),'<svg xmlns="http://www.w3.org/2000/svg"'+M(v(x,L))+">"+T()+"<foreignObject"+M(N)+">"+A+"</foreignObject></svg>"};return g.getSvgForDocument=function(C,x,L){return S.rewriteTagNameSelectorsToLowerCase(C),j(C,x,L)},g.drawDocumentAsSvg=function(C,x){return["hover","active","focus","target"].forEach(function(L){x[L]&&S.fakeUserAction(C,x[L],L)}),E.calculateDocumentContentSize(C,x).then(function(L){return g.getSvgForDocument(C,L,x.zoom)})},g}(i,c,u,t),w=function(_,E,S,m,g,v){var b={},O=function(C){return{message:"Error rendering page",originalError:C}},I=function(C){return g.renderSvg(C).then(function(x){return{image:x,svg:C}},function(x){throw O(x)})},T=function(C,x){try{x.getContext("2d").drawImage(C,0,0)}catch(L){throw O(L)}},M=function(C,x,L){return m.drawDocumentAsSvg(C,L).then(I).then(function(A){return x&&T(A.image,x),A})},j=function(C,x){return E.executeJavascript(C,x).then(function(L){var A=L.document;return S.persistInputValues(A),{document:A,errors:L.errors,cleanUp:L.cleanUp}})};return b.rasterize=function(C,x,L){var A;return A=_.clone(L),A.inlineScripts=L.executeJs===!0,v.inlineReferences(C,A).then(function(N){return L.executeJs?j(C,L).then(function(F){return{element:F.document.documentElement,errors:N.concat(F.errors),cleanUp:F.cleanUp}}):{element:C,errors:N,cleanUp:function(){}}}).then(function(N){return M(N.element,x,L).then(function(F){return N.cleanUp(),{image:F.image,svg:F.svg,errors:N.errors}})})},b}(i,c,u,p,h,a),d=function(_,E,S){var m={},g=function(T,M){var j=300,C=200,x=T?T.width:j,L=T?T.height:C,A=M.width!==void 0?M.width:x,N=M.height!==void 0?M.height:L;return{width:A,height:N}},v=function(T){var M=g(T.canvas,T.options),j;return j=_.clone(T.options),j.width=M.width,j.height=M.height,j};m.drawDocument=function(){var T=arguments[0],M=Array.prototype.slice.call(arguments,1),j=_.parseOptionalParameters(M),C=T.documentElement?T.documentElement:T;return S.rasterize(C,j.canvas,v(j))};var b=function(T,M,j){var C=E.parseHTML(T);return m.drawDocument(C,M,j)};m.drawHTML=function(){var T=arguments[0],M=Array.prototype.slice.call(arguments,1),j=_.parseOptionalParameters(M);return b(T,j.canvas,j.options)};var O=function(T,M,j){var C=document.implementation.createHTMLDocument("");C.replaceChild(T.documentElement,C.documentElement);var x=j?_.clone(j):{};return j.baseUrl||(x.baseUrl=M),{document:C,options:x}},I=function(T,M,j){return E.loadDocument(T,j).then(function(C){var x=O(C,T,j);return m.drawDocument(x.document,M,x.options)})};return m.drawURL=function(){var T=arguments[0],M=Array.prototype.slice.call(arguments,1),j=_.parseOptionalParameters(M);return I(T,j.canvas,j.options)},m}(i,c,w);return d})}(b1)),b1.exports}var H3;function Z8(){return H3||(H3=1,function(e){var r,t=ic&&ic.__createBinding||(Object.create?function(S,m,g,v){v===void 0&&(v=g);var b=Object.getOwnPropertyDescriptor(m,g);b&&!("get"in b?!m.__esModule:b.writable||b.configurable)||(b={enumerable:!0,get:function(){return m[g]}}),Object.defineProperty(S,v,b)}:function(S,m,g,v){v===void 0&&(v=g),S[v]=m[g]}),n=ic&&ic.__setModuleDefault||(Object.create?function(S,m){Object.defineProperty(S,"default",{enumerable:!0,value:m})}:function(S,m){S.default=m}),a=ic&&ic.__importStar||(r=function(S){return r=Object.getOwnPropertyNames||function(m){var g=[];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[g.length]=v);return g},r(S)},function(S){if(S&&S.__esModule)return S;var m={};if(S!=null)for(var g=r(S),v=0;v<g.length;v++)g[v]!=="default"&&t(m,S,g[v]);return n(m,S),m});Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=function({html:S}){const m=document.createElement("div");m.innerHTML=S,m.style.display="inline-block",m.style.position="fixed",m.style.top="0px",m.style.left="0px",m.style.zIndex="1000",m.style.whiteSpace="nowrap",m.style.visibility="hidden";const g=h();g.appendChild(m);const v=m.textContent,b=m.childNodes[0],O=v.split(/\s+/);let I=!1;for(let T=0;T<O.length;T++){const M=O[T];if(b.textContent=M,I=b.scrollWidth>m.clientWidth,I)break}return g.removeChild(m),I},e.detectSize=function(S){const m=document.createElement("div");m.innerHTML=S,m.style.display="inline-block",m.style.position="fixed",m.style.top="0px",m.style.left="0px",m.style.zIndex="1000";const g=h();g.appendChild(m);const v=m.getBoundingClientRect();return g.removeChild(m),{width:v.width,height:v.height}},e.htmlToCanvas=async function({html:S,width:m,height:g,fontFamily:v,padding:b,font:O,pixelRatio:I}){if(v!=="Arial"&&!O){const C=(0,o.getGoogleFontsVariants)();S+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${v}:${C}" rel="stylesheet">`}if(O){const C=O.styles||(O.url?[{src:`url("${O.url}")`}]:E(v));S+="<style>",C.forEach(x=>{S+=`
|
|
159
|
-
@font-face {
|
|
160
|
-
font-family: '${v}';
|
|
161
|
-
src: ${x.src};
|
|
162
|
-
font-style: ${x.fontStyle||"normal"};
|
|
163
|
-
font-weight: ${x.fontWeight||"normal"};
|
|
164
|
-
}
|
|
165
|
-
`}),S+="</style>"}S+=u;const T=document.createElement("canvas"),M=await i.drawHTML(`<div style="padding: ${b}px;" dir="auto">${S}</div>`,T,{width:m+2*b,height:g+2*b,cacheBucket:d});(0,l.trySetCanvasSize)(T,(m+2*b)*I,(g+2*b)*I);const j=T.getContext("2d");return j==null||j.drawImage(M.image,0,0,T.width,T.height),T};const i=a(PC()),o=Op(),l=q8();e.resetStyleContent=`
|
|
166
|
-
p {
|
|
167
|
-
margin: 0;
|
|
168
|
-
padding: 0;
|
|
169
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
170
|
-
/* a text may have several spaces, we need to preserve them */
|
|
171
|
-
white-space: pre-wrap;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Reset default list styles and setup counters */
|
|
175
|
-
ul, ol {
|
|
176
|
-
list-style: none; /* Remove default markers */
|
|
177
|
-
padding-inline-start: 0; /* Reset padding */
|
|
178
|
-
margin: 0;
|
|
179
|
-
display: inline-block; /* Or block, depending on desired layout */
|
|
180
|
-
width: 100%;
|
|
181
|
-
text-decoration: inherit;
|
|
182
|
-
counter-reset: list-item; /* Initialize counter for ol */
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
li {
|
|
186
|
-
position: relative; /* Needed for absolute positioning of ::before */
|
|
187
|
-
padding-inline-start: 2.1em; /* Space for the marker (start side) */
|
|
188
|
-
margin: 0; /* Reset default li margins */
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
li::before {
|
|
192
|
-
content: ''; /* Base content */
|
|
193
|
-
position: absolute;
|
|
194
|
-
/* Use logical properties for positioning */
|
|
195
|
-
inset-inline-start: 0; /* Position marker at the start edge (left in LTR, right in RTL) */
|
|
196
|
-
top: 0; /* Adjust vertical alignment */
|
|
197
|
-
/* Prevent letter-spacing from affecting the marker */
|
|
198
|
-
letter-spacing: normal;
|
|
199
|
-
/* Define width to ensure consistent spacing and alignment */
|
|
200
|
-
display: inline-block;
|
|
201
|
-
width: 2em; /* Width for the marker container */
|
|
202
|
-
/* Align multi-digit numbers to the end (right in LTR, left in RTL) */
|
|
203
|
-
text-align: end;
|
|
204
|
-
/* Space between marker and text (using logical property) */
|
|
205
|
-
margin-inline-end: 0.8em; /* Pushes text away from marker (2.5em total = 1.7em width + 0.8em margin)*/
|
|
206
|
-
/* Prevent marker style from inheriting list item styles */
|
|
207
|
-
font-weight: normal;
|
|
208
|
-
font-style: normal;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/* Style for bullet points */
|
|
212
|
-
ul > li::before {
|
|
213
|
-
content: '•'; /* Literal bullet character */
|
|
214
|
-
/* Center the bullet within its allocated width */
|
|
215
|
-
text-align: center; /* Override text-align: end for bullets */
|
|
216
|
-
font-size: 1.2em;
|
|
217
|
-
top: 0em; /* Re-adjust vertical alignment for bullet */
|
|
218
|
-
/* Bullets don't need number alignment, width can be tighter */
|
|
219
|
-
width: 2em;
|
|
220
|
-
/* Adjust margin to maintain overall padding */
|
|
221
|
-
margin-inline-end: 1.5em; /* 2.5em total padding = 1em width + 1.5em margin */
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/* Style for numbers using counter */
|
|
225
|
-
ol > li {
|
|
226
|
-
counter-increment: list-item; /* Increment counter for each li in ol */
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
ol > li::before {
|
|
230
|
-
content: counter(list-item) "."; /* Display counter value + dot */
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.ql-indent-1 {
|
|
234
|
-
margin-inline-start: 0.5em;
|
|
235
|
-
}
|
|
236
|
-
.ql-indent-2 {
|
|
237
|
-
margin-inline-start: 1em;
|
|
238
|
-
}
|
|
239
|
-
.ql-indent-3 {
|
|
240
|
-
margin-inline-start: 1.5em;
|
|
241
|
-
}
|
|
242
|
-
`;const u=`
|
|
243
|
-
<style>
|
|
244
|
-
html, body {
|
|
245
|
-
padding: 0;
|
|
246
|
-
margin: 0;
|
|
247
|
-
}
|
|
248
|
-
${e.resetStyleContent}
|
|
249
|
-
</style>
|
|
250
|
-
`;let c;const h=()=>(c||(c=document.createElement("div"),c.id="polotno-hidden-do-not-touch",c.style.overflow="hidden",c.style.position="relative",document.body.appendChild(c),c.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),c),p=new Map,w=navigator.userAgent.includes("Firefox");e.prerenderFont=async S=>{if(p.has(S))return p.get(S);const m=(async()=>{const g=`<div style="font-family: ${S}; font-size: 100px;">${S}<strong>${S}</strong></div>`,v=document.createElement("div");v.innerHTML=g,v.style.visibility="hidden",v.style.position="absolute";const b=h();b.appendChild(v);const O=w?180:50;await new Promise(I=>setTimeout(I,O)),b.removeChild(v)})();return p.set(S,m),m};const d={},_={},E=S=>{if(_[S])return _[S];const m=function(v){const b=[];for(const O of document.styleSheets)try{for(const I of O.cssRules)I instanceof CSSFontFaceRule&&I.style.fontFamily.replace(/['"]/g,"")===v&&b.push(I)}catch(I){console.warn(`Could not access stylesheet: ${O.href}`,I)}return b}(S),g=m.filter(v=>v.style.fontFamily.replace(/['"]/g,"")===S).map(v=>({src:v.style.src,fontStyle:v.style.fontStyle||"normal",fontWeight:v.style.fontWeight||"normal"}));return _[S]=g,g}}(ic)),ic}var ih={},Ev={},G3;function Q8(){return G3||(G3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=h,e.setup=function(S,m,g,v){i.p=m,p=S,w=g,d=v},e.styled=function(S,m){let g=this||{};return function(){let v=arguments;function b(O,I){let T=Object.assign({},O),M=T.className||b.className;g.p=Object.assign({theme:w&&w()},T),g.o=/ *go\d+/.test(M),T.className=h.apply(g,v)+(M?" "+M:""),m&&(T.ref=I);let j=S;return S[0]&&(j=T.as||S,delete T.as),d&&j[0]&&d(T),p(j,T)}return m?m(b):b}};let r={data:""},t=S=>typeof window=="object"?((S?S.querySelector("#_goober"):window._goober)||Object.assign((S||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:S||r,n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,i=(S,m)=>{let g="",v="",b="";for(let O in S){let I=S[O];O[0]=="@"?O[1]=="i"?g=O+" "+I+";":v+=O[1]=="f"?i(I,O):O+"{"+i(I,O[1]=="k"?"":m)+"}":typeof I=="object"?v+=i(I,m?m.replace(/([^,])+/g,T=>O.replace(/(^:.*)|([^,])+/g,M=>/&/.test(M)?M.replace(/&/g,T):T?T+" "+M:M)):O):I!=null&&(O=O.replace(/[A-Z]/g,"-$&").toLowerCase(),b+=i.p?i.p(O,I):O+":"+I+";")}return g+(m&&b?m+"{"+b+"}":b)+v},o={},l=S=>{if(typeof S=="object"){let m="";for(let g in S)m+=g+l(S[g]);return m}return S},u=(S,m,g,v,b)=>{let O=l(S),I=o[O]||(o[O]=(T=>{let M=0,j=11;for(;M<T.length;)j=101*j+T.charCodeAt(M++)>>>0;return"go"+j})(O));if(!o[I]){let T=O!==S?S:(M=>{let j,C=[{}];for(;j=n.exec(M.replace(a,""));)j[4]?C.shift():j[3]?C.unshift(C[0][j[3]]=C[0][j[3]]||{}):C[0][j[1]]=j[2];return C[0]})(S);o[I]=i(b?{["@keyframes "+I]:T}:T,g?"":"."+I)}return((T,M,j)=>{M.data.indexOf(T)==-1&&(M.data=j?T+M.data:M.data+T)})(o[I],m,v),I},c=(S,m,g)=>S.reduce((v,b,O)=>{let I=m[O];if(I&&I.call){let T=I(g),M=T&&T.props&&T.props.className||/^go/.test(T)&&T;I=M?"."+M:T&&typeof T=="object"?T.props?"":i(T,""):T===!1?"":T}return v+b+(I??"")},"");function h(S){let m=this||{},g=S.call?S(m.p):S;return u(g.unshift?g.raw?c(g,[].slice.call(arguments,1),m.p):g.reduce((v,b)=>Object.assign(v,b&&b.call?b(m.p):b),{}):g,t(m.target),m.g,m.o,m.k)}e.extractCss=S=>{let m=t(S),g=m.data;return m.data="",g};let p,w,d,_=h.bind({g:1}),E=h.bind({k:1});e.glob=_,e.keyframes=E}(Ev)),Ev}var V3;function OC(){if(V3)return ih;V3=1;var e=ih&&ih.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ih,"__esModule",{value:!0});const r=e(di()),t=Q8();return(0,t.setup)(r.default.createElement),ih.default=t.styled,ih}var W3;function AC(){return W3||(W3=1,function(e){var r,t=Dl&&Dl.__createBinding||(Object.create?function(U,W,$,Z){Z===void 0&&(Z=$);var V=Object.getOwnPropertyDescriptor(W,$);V&&!("get"in V?!W.__esModule:V.writable||V.configurable)||(V={enumerable:!0,get:function(){return W[$]}}),Object.defineProperty(U,Z,V)}:function(U,W,$,Z){Z===void 0&&(Z=$),U[Z]=W[$]}),n=Dl&&Dl.__setModuleDefault||(Object.create?function(U,W){Object.defineProperty(U,"default",{enumerable:!0,value:W})}:function(U,W){U.default=W}),a=Dl&&Dl.__importStar||(r=function(U){return r=Object.getOwnPropertyNames||function(W){var $=[];for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&($[$.length]=Z);return $},r(U)},function(U){if(U&&U.__esModule)return U;var W={};if(U!=null)for(var $=r(U),Z=0;Z<$.length;Z++)$[Z]!=="default"&&t(W,U,$[Z]);return n(W,U),W}),i=Dl&&Dl.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.setQuillFormats=e.quillRef=void 0;const o=i(di()),l=zs,u=Fu,c=i(RA()),h=i(Us()),p=a(fl),w=tf(),d=Ap(),_=D8(),E=Pp(),S=Z8(),m=If(),g=Ff(),v=Mh,b=i(OC()),O=jf(),I=B6(),T=a(Op()),M=rf(),j=F8();e.quillRef=p.observable({enabled:!1,currentFormat:{},editor:p.observable.object({instance:null},{},{deep:!1})});const C=(0,b.default)("div",o.default.forwardRef)`
|
|
251
|
-
.ql-editor {
|
|
252
|
-
outline: none;
|
|
253
|
-
}
|
|
254
|
-
.ql-clipboard {
|
|
255
|
-
pointer-events: none;
|
|
256
|
-
}
|
|
257
|
-
${S.resetStyleContent}
|
|
258
|
-
strong {
|
|
259
|
-
font-weight: 700;
|
|
260
|
-
}
|
|
261
|
-
.ql-direction-rtl {
|
|
262
|
-
direction: rtl;
|
|
263
|
-
}
|
|
264
|
-
`;let x=["bold","color","font","italic","size","strike","underline","indent","list","direction"];e.setQuillFormats=U=>{x=U},e.createQuill=U=>new c.default(U,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:x}),e.setQuillContent=(U,W)=>{var $=U.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+W+"<p><br></p></div>");U.setContents($),U.history.clear()};const L=({html:U,onBlur:W,onChange:$,element:Z})=>{const V=o.default.useRef(null);o.default.useEffect(()=>{if(!V.current)return;const z=(0,e.createQuill)(V.current);return p.runInAction(()=>{e.quillRef.editor.instance=z}),window.__polotnoQuill=z,z.on("text-change",()=>{z.getSelection()&&p.runInAction(()=>{e.quillRef.currentFormat=z.getFormat()}),setTimeout(()=>{var D;const K=(D=V.current)===null||D===void 0?void 0:D.childNodes[0];$(K.innerHTML)},10)}),z.setSelection(0,0,"api"),z.on("selection-change",(D,K,ne)=>{D&&p.runInAction(()=>{e.quillRef.currentFormat=z.getFormat()})}),V.current.childNodes[0].addEventListener("blur",D=>{var K;if(!((K=D.relatedTarget)===null||K===void 0)&&K.classList.contains("ql-clipboard"))return;(function(Q){return!!Q&&!!Q.closest(".sketch-picker")})(D.relatedTarget)||W()}),()=>{p.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),o.default.useEffect(()=>{var z;const D=e.quillRef.editor.instance;if(!D)return;const K=D.getSelection();((z=V.current)===null||z===void 0?void 0:z.childNodes[0].innerHTML)===Z.text||((0,e.setQuillContent)(D,U),K&&(D.setSelection(K.index,K.length),p.runInAction(()=>{e.quillRef.currentFormat=D.getFormat()})))},[Z.text]);const G={color:Z.fill};return Z.fill.indexOf("gradient")>=0&&(G.backgroundColor=Z.fill,G.backgroundImage=Z.fill,G.backgroundSize="100% 100%",G.backgroundRepeat="repeat",G.webkitBackgroundClip="text",G.MozBackgroundClip="text",G.WebkitTextFillColor="transparent",G.MozTextFillColor="transparent"),o.default.createElement(C,{ref:V,style:Object.assign(Object.assign({},G),{fontSize:Z.fontSize,fontWeight:Z.fontWeight,width:Z.a.width,fontFamily:Z.fontFamily,lineHeight:Z.lineHeight,letterSpacing:Z.letterSpacing*Z.fontSize+"px",textAlign:Z.align}),dir:(0,_.getDir)((0,I.removeTags)(Z.text))})},A=(U,W=100,$=!1,Z="")=>{const[V,G]=o.default.useState(U),z=o.default.useRef(null);return o.default.useEffect(()=>U===$?(z.current&&(clearTimeout(z.current),z.current=null),void G($)):(z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{G(U),z.current=null},W),()=>{z.current&&clearTimeout(z.current)}),[U,W]),[V,G]};function N(U,{fontFamily:W="",color:$="black"}={}){let Z=`color: ${$||U.fill}`;return U.fill.indexOf("gradient")>=0&&(Z=`
|
|
265
|
-
background-color: ${$};
|
|
266
|
-
background-image: ${U.fill};
|
|
267
|
-
background-size: 100% 100%;
|
|
268
|
-
background-repeat: repeat;
|
|
269
|
-
-webkit-background-clip: text;
|
|
270
|
-
-moz-background-clip: text;
|
|
271
|
-
-webkit-text-fill-color: transparent;
|
|
272
|
-
-moz-text-fill-color: transparent;
|
|
273
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(U.width||100)}px`,Z,`font-size: ${U.fontSize}px`,`font-family: '${W}'`,`text-align: ${U.align}`,U.textDecoration?`text-decoration: ${U.textDecoration}; text-decoration-color: ${$||U.fill}; text-decoration-layer: over`:"",U.lineHeight?`line-height: ${U.lineHeight}`:"",U.letterSpacing?`letter-spacing: ${U.letterSpacing*U.fontSize}px`:"",U.fontStyle?`font-style: ${U.fontStyle}`:"",U.fontWeight?`font-weight: ${U.fontWeight}`:"",U.strokeWidth?`-webkit-text-stroke: ${U.strokeWidth}px ${U.stroke}`:"",U.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,_.getDir)((0,I.removeTags)(U.text))}">${(0,I.sanitizeHtml)(U.text).replace(/\n/g,"</br>")}</div>`}const F=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,l.observer)(({element:U,store:W})=>{const $=o.default.useRef(null),[Z,V]=o.default.useState(),[G,z]=o.default.useState(!1),[D,K]=o.default.useState(!0),[ne,Q]=o.default.useState(!1),ee=o.default.useRef(U.height),ae=W.selectedShapes.indexOf(U)>=0&&U.selectable,se=U.fontSize/3,{textVerticalResizeEnabled:ce}=w.flags,me=(0,_.usePrevious)(U.fontFamily),[Se]=(0,_.useFontLoader)(W,U.fontFamily),Oe=U._editModeEnabled;(0,m.useFadeIn)($);const Ne=Se?U.fontFamily:me!==U.fontFamily?me:"Arial",xe=(0,E.useColor)(U).fill,ve=N(U,{fontFamily:Ne,color:xe}),{width:Xe,height:be}=function(at,mt,Je){return o.default.useMemo(()=>(0,S.detectSize)(at),[at,mt.width,Je])}(ve,U,Se);o.default.useEffect(()=>{if(!Se)return;if(!U.height)return void U.set({height:be});const{textOverflow:at}=w.flags;if(at!=="change-font-size"||G)at==="resize"&&(ce&&U.height<be&&W.history.ignore(()=>{U.set({height:be})}),ce||U.height===be||W.history.ignore(()=>{U.set({height:be})}));else{const mt=(Je=>{let nt=Je.fontSize;for(let qt=1;qt<50;qt++){const At=N(Object.assign(Object.assign({},Je.toJSON()),{fontSize:nt}),{fontFamily:Je.fontFamily}),{height:Ht}=(0,S.detectSize)(At),zt=Je.height&&Ht>Je.height,Ie=(0,S.isContentWrapping)({html:At});if(!zt&&!Ie)break;nt-=.5}return nt})(U);mt!==U.fontSize?W.history.ignore(()=>{U.set({fontSize:mt})}):U.height!==be&&(ce&&U.height<be?W.history.ignore(()=>{U.set({height:be})}):ce||W.history.ignore(()=>{U.set({height:be})}))}});const Ae=o.default.useRef(0),Ee=o.default.useMemo(()=>{const at={lastArgs:null,lastResult:null};return async function(mt){return at.lastArgs&&at.lastResult&&(Je=at.lastArgs,nt=mt,JSON.stringify(Je)===JSON.stringify(nt))||(at.lastResult=await(0,S.htmlToCanvas)(mt),at.lastArgs=Object.assign({},mt)),at.lastResult;var Je,nt}},[]);o.default.useEffect(()=>{G||Oe||(async()=>{Ae.current++;const at=Ae.current,mt=(0,O.incrementLoader)(`text ${U.id}`);K(!0);let Je=null;const nt=F?5:1;for(let qt=0;qt<nt;qt++){const At=qt>0?Ee:S.htmlToCanvas;try{if(Je=await At({skipCache:qt>0,html:ve,width:U.width||1,height:U.height||be||1,fontFamily:Ne,padding:se,pixelRatio:W._elementsPixelRatio,font:W.fonts.find(Ht=>Ht.fontFamily===Ne)||T.globalFonts.find(Ht=>Ht.fontFamily===Ne)}),at!==Ae.current)return void mt();if(!function(Ht){const zt=Ht.getContext("2d").getImageData(0,0,Ht.width,Ht.height).data;for(let Ie=0;Ie<zt.length;Ie+=4)if(zt[Ie+3]!==0)return!0;return!1}(Je)&&F){await new Promise(Ht=>setTimeout(Ht,50*(qt+1)));continue}}catch{(0,O.triggerLoadError)(`Error rendering rich text with id ${U.id}`);break}}Je?(V(Je),K(!1),h.default.Util.requestAnimFrame(mt)):mt()})()},[ve,G,be,Oe,Ne,U.height,W._elementsPixelRatio,Se]);const[Le,he]=A(D),[ke]=A(G,100,!0),Re=ke||Le;o.default.useEffect(()=>p.autorun(()=>{const at=$.current;(0,d.applyFilter)(at,U)}),[Z,Re,U.shadowColor,U.shadowOffsetX,U.shadowOffsetY,U.shadowOpacity]);let $e=0;U.verticalAlign==="middle"&&($e=(U.height-be)/2),U.verticalAlign==="bottom"&&($e=U.height-be);const vt=(0,_.getLineHeight)({fontLoaded:Se,fontFamily:U.fontFamily,fontSize:U.fontSize,lineHeight:U.lineHeight}),wt=(0,M.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.Rect,{x:U.a.x,y:U.a.y,offsetX:U.backgroundPadding*(U.fontSize*vt*.5),offsetY:U.backgroundPadding*(U.fontSize*vt*.5),rotation:U.a.rotation,hideInExport:!U.showInExport,listening:!1,visible:U.backgroundEnabled,opacity:U.backgroundOpacity*U.a.opacity,fill:U.backgroundColor,width:U.a.width+U.backgroundPadding*(U.fontSize*vt),height:U.a.height+U.backgroundPadding*(U.fontSize*vt),cornerRadius:U.backgroundCornerRadius*(U.fontSize*vt*.5)}),o.default.createElement(u.Rect,{ref:$,name:"element",x:U.a.x,y:U.a.y,listening:U.selectable,rotation:U.a.rotation,width:U.a.width,height:U.a.height,visible:!Re,draggable:wt?U.draggable&&ae:U.draggable,preventDefault:!wt||ae,opacity:Oe?0:U.a.opacity,hideInExport:!U.showInExport,onMouseEnter:()=>{Q(!0)},onMouseLeave:()=>{Q(!1)},onDragMove:at=>{U.set({x:at.target.x(),y:at.target.y()})},onDragEnd:at=>{U.set({x:at.target.x(),y:at.target.y()})},id:U.id,onDblClick:()=>{U.contentEditable&&U.toggleEditMode(!0)},onDblTap:()=>{U.contentEditable&&U.toggleEditMode(!0)},onTransformStart:at=>{z(!0),ee.current=U.height},onTransform:at=>{var mt;const Je=at.target,nt=((mt=Je.getStage())===null||mt===void 0?void 0:mt.findOne("Transformer")).getActiveAnchor(),qt=nt==="middle-left"||nt==="middle-right",At=nt==="top-center"||nt==="bottom-center",Ht=Je.scaleX();if(qt){const zt=Je.scaleX(),Ie=Math.max(Je.width()*zt,U.fontSize);if(Je.width(Ie),Je.scaleX(1),w.flags.textVerticalResizeEnabled){const He=Math.max(be,ee.current);U.set({height:He})}U.set({width:Ie,x:Je.x(),y:Je.y()})}else if(At){let zt=w.flags.textOverflow==="resize"?be:U.lineHeight*U.fontSize;const Ie=Math.max(zt,at.target.height()*at.target.scaleY());Je.scaleY(1),U.set({x:Je.x(),y:Je.y(),height:Ie,rotation:Je.rotation()})}else Je.scaleX(1),Je.scaleY(1),U.set({fontSize:U.fontSize*Ht,letterSpacing:U.letterSpacing,width:Je.width()*Ht,x:Je.x(),y:Je.y(),rotation:Je.rotation(),height:Je.height()*Ht})},onTransformEnd:at=>{z(!1),K(!0);const mt=at.target.scaleX();at.target.scaleX(1),at.target.scaleY(1),U.set({fontSize:U.fontSize*mt,width:at.target.width()*mt,x:at.target.x(),y:at.target.y(),rotation:at.target.rotation(),shadowBlur:U.shadowBlur*mt,shadowOffsetX:U.shadowOffsetX*mt,shadowOffsetY:U.shadowOffsetY*mt,strokeWidth:U.strokeWidth*mt})}}),o.default.createElement(u.Image,{ref:$,image:Z,x:U.a.x,y:U.a.y,offsetX:se,offsetY:se-$e,listening:!1,rotation:U.rotation,width:U.a.width+2*se,height:U.a.height+2*se,visible:!Re,opacity:Oe?0:U.a.opacity,shadowEnabled:U.shadowEnabled,shadowBlur:U.shadowBlur,shadowOffsetX:U.shadowOffsetX,shadowOffsetY:U.shadowOffsetY,shadowColor:U.shadowColor,shadowOpacity:U.shadowOpacity,hideInExport:!U.showInExport}),Re&&o.default.createElement(u.Group,{x:U.a.x,y:U.a.y,rotation:U.rotation,offsetY:-$e},o.default.createElement(v.Html,{divProps:{style:{pointerEvents:"none"}}},o.default.createElement(C,{dangerouslySetInnerHTML:{__html:ve},style:{pointerEvents:"none"}}))),Oe&&o.default.createElement(u.Group,{x:U.a.x,y:U.a.y,rotation:U.rotation,offsetY:-$e},o.default.createElement(v.Html,null,o.default.createElement(L,{html:ve,element:U,onChange:at=>{const mt=(0,j.getLimitedFontSize)({oldText:(0,I.removeTags)(U.text),newText:(0,I.removeTags)(at),element:U});U.set({text:at,fontSize:mt})},onBlur:at=>{U.toggleEditMode(!1),he(!0)}}))),(ae||ne)&&o.default.createElement(g.Highlighter,{element:U}))})}(Dl)),Dl}var Vd={},Wd={},Pv={},$3;function Fh(){return $3||($3=1,function(e){function r(o){return o/180*Math.PI}function t(o,l,u,c,h){const p=Math.sqrt(u*u+c*c);return h+=Math.atan2(c,u),{x:o+p*Math.cos(h),y:l+p*Math.sin(h)}}function n(o){const{x:l,y:u,width:c,height:h}=o,p=r(o.rotation),w=t(l,u,0,0,p),d=t(l,u,c,0,p),_=t(l,u,c,h,p),E=t(l,u,0,h,p),S=Math.min(w.x,d.x,_.x,E.x),m=Math.min(w.y,d.y,_.y,E.y),g=Math.max(w.x,d.x,_.x,E.x),v=Math.max(w.y,d.y,_.y,E.y);return{x:S,y:m,width:g-S,height:v-m,minX:S,minY:m,maxX:g,maxY:v}}function a(o){const l=r(o.rotation||0);return{x:o.x+o.width/2*Math.cos(l)+o.height/2*Math.sin(-l),y:o.y+o.height/2*Math.cos(l)+o.width/2*Math.sin(l)}}function i(o,l,u){const c=r(l),h=u.x+(o.x-u.x)*Math.cos(c)-(o.y-u.y)*Math.sin(c),p=u.y+(o.x-u.x)*Math.sin(c)+(o.y-u.y)*Math.cos(c);return Object.assign(Object.assign({},o),{rotation:o.rotation+l,x:h,y:p})}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=r,e.getClientRect=n,e.getTotalClientRect=function(o){const l=o.map(w=>n(w)),u=Math.min(...l.map(w=>w.minX)),c=Math.min(...l.map(w=>w.minY)),h=Math.max(...l.map(w=>w.maxX)),p=Math.max(...l.map(w=>w.maxY));return{x:u,y:c,width:h-u,height:p-c,minX:u,minY:c,maxX:h,maxY:p}},e.getCenter=a,e.rotateAroundPoint=i,e.rotateAroundCenter=function(o,l){return i(o,l,a(o))}}(Pv)),Pv}var Y3;function J8(){return Y3||(Y3=1,function(e){var r=Wd&&Wd.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.setSnapFilterFunc=void 0,e.useSnap=function(c,h){const p=t.default.useRef(null),w=g=>g.hasName("element")||g.hasName("page-background")||!p.current&&g.hasName("elements-area");function d(g){var v;const b=(v=c.current)===null||v===void 0?void 0:v.getStage(),O=[],I=[];return b.find(w).forEach(T=>{if(!(g.indexOf(T)>=0)){var M=T.getClientRect({skipShadow:!0,skipStroke:!0});O.push({offset:M.x,node:T,snap:"start"},{offset:M.x+M.width,node:T,snap:"end"},{offset:M.x+M.width/2,node:T,snap:"center"}),I.push({offset:M.y,node:T,snap:"start"},{offset:M.y+M.height,node:T,snap:"end"},{offset:M.y+M.height/2,node:T,snap:"center"})}}),{vertical:O,horizontal:I}}function _(g){var v;const b=(v=c.current)===null||v===void 0?void 0:v.getLayer(),O=b==null?void 0:b.children.find(I=>I.name()==="line-guides");g.forEach(I=>{if(I.orientation==="H"){var T=new n.default.Line({x:-b.getStage().x(),y:-b.getStage().y(),points:[-6e3,I.lineGuide,6e3,I.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});O==null||O.add(T),b.batchDraw()}else I.orientation==="V"&&(T=new n.default.Line({x:-b.getStage().x(),y:-b.getStage().y(),points:[I.lineGuide,-6e3,I.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),O==null||O.add(T))})}const E=g=>{const v=g.target.getLayer().children.find(x=>x.name()==="line-guides");v==null||v.destroyChildren();var b=d(g.target.nodes()),O=function(x){const L=x.__getNodeRect(),A=(0,a.getClientRect)(Object.assign(Object.assign({},L),{rotation:n.default.Util.radToDeg(L.rotation)})),N=x.getAbsolutePosition();return{vertical:[{guide:A.x,offset:N.x-A.x,snap:"start",nodes:x.nodes()},{guide:A.x+A.width/2,offset:N.x-A.x-A.width/2,snap:"center",nodes:x.nodes()},{guide:A.x+A.width,offset:N.x-A.x-A.width,snap:"end",nodes:x.nodes()}],horizontal:[{guide:A.y,offset:N.y-A.y,snap:"start",nodes:x.nodes()},{guide:A.y+A.height/2,offset:N.y-A.y-A.height/2,snap:"center",nodes:x.nodes()},{guide:A.y+A.height,offset:N.y-A.y-A.height,snap:"end",nodes:x.nodes()}]}}(g.target),I=o(b,O);if(!I.length)return;_(I);const T=g.target.getAbsolutePosition(),M=(g.target.nodes().map(x=>x.getAbsolutePosition()),Object.assign({},T));I.forEach(x=>{switch(x.snap){case"start":case"center":case"end":switch(x.orientation){case"V":M.x=x.lineGuide+x.offset;break;case"H":M.y=x.lineGuide+x.offset}}});const j=M.x-T.x,C=M.y-T.y;g.evt.ctrlKey||g.evt.metaKey||g.target.nodes().forEach(x=>{const L=x.getAbsolutePosition();x.setAbsolutePosition({x:L.x+j,y:L.y+C})})},S=(g,v,b)=>{var O;const I=c.current,T=I.getLayer().children.find(U=>U.name()==="line-guides");if(T==null||T.destroyChildren(),I.getActiveAnchor()==="rotater")return v;const M=I.getActiveAnchor(),j=u[M],C=(O=I.findOne(`.${j}`))===null||O===void 0?void 0:O.getAbsolutePosition();if(!C)return v;const x={x:g.x-C.x,y:g.y-C.y},L=function(U,W){const $=l(U,W)/l(W,W);return{x:$*W.x,y:$*W.y}}({x:v.x-g.x,y:v.y-g.y},x),A={x:g.x+L.x,y:g.y+L.y};var N=o(d(I.nodes()),{vertical:[{guide:A.x,offset:0,snap:"start",nodes:I.nodes()}],horizontal:[{guide:A.y,offset:0,snap:"start",nodes:I.nodes()}]});if(!N.length||(_(N),b.ctrlKey||b.metaKey))return v;const F=[];if(N.forEach(U=>{const W=function($,Z,V){if(V.orientation==="V"){const G=V.lineGuide;if(Math.abs(Z.x-$.x)<1e-4)return null;const z=(Z.y-$.y)/(Z.x-$.x);return{x:G,y:z*G+($.y-z*$.x)}}{const G=V.lineGuide;if(Math.abs(Z.y-$.y)<1e-4)return null;const z=(Z.y-$.y)/(Z.x-$.x);return{x:(G-$.y)/z+$.x,y:G}}}(A,C,{orientation:U.orientation,lineGuide:U.lineGuide});W&&F.push(W)}),F.length>0){let U=F[0],W=Math.sqrt(Math.pow(A.x-U.x,2)+Math.pow(A.y-U.y,2));if(F.forEach($=>{const Z=Math.sqrt(Math.pow(A.x-$.x,2)+Math.pow(A.y-$.y,2));Z<W&&(W=Z,U=$)}),W<10)return U}return A},m=g=>{if(!g.target)return;const v=g.target.getLayer(),b=v.children.find(O=>O.name()==="line-guides");b==null||b.destroyChildren(),v.batchDraw()};t.default.useEffect(()=>{c.current&&(c.current.anchorDragBoundFunc(S),c.current.on("dragstart",g=>{setTimeout(()=>{if(n.default.DD._dragElements.size===0)return;const v=[...n.default.DD._dragElements.entries()],b=v.find(([O,I])=>I.node instanceof n.default.Transformer);b&&(v.splice(v.indexOf(b),1),v.unshift(b),n.default.DD._dragElements.clear(),v.forEach(([O,I])=>{n.default.DD._dragElements.set(O,I)}))})}),c.current.on("dragmove",E),c.current.on("dragend",m),c.current.on("transformend",m),c.current.on("transform",g=>{var v,b;g.evt.ctrlKey||g.evt.metaKey?(v=c.current)===null||v===void 0||v.rotationSnapTolerance(0):(b=c.current)===null||b===void 0||b.rotationSnapTolerance(5)}))},[])},e.useAnchorSnap=function(c,h,p){const w=E=>E.hasName("element")||E.hasName("line-anchor")||E.hasName("page-background")||E.hasName("elements-area"),d=E=>{const S=E.target.getLayer().children.find(T=>T.name()==="line-guides");S==null||S.destroyChildren();var m,g=o(function(T){var M;const j=(M=c.current)===null||M===void 0?void 0:M.getStage();var C=[],x=[];return j.find(w).forEach(L=>{if(!(T.indexOf(L)>=0)){var A=L.getClientRect({skipShadow:!0,skipStroke:!0});L.hasName("line-anchor")&&(A={x:L.absolutePosition().x,y:L.absolutePosition().y,width:0,height:0}),C.push({offset:A.x,node:L,snap:"start"},{offset:A.x+A.width,node:L,snap:"end"},{offset:A.x+A.width/2,node:L,snap:"center"}),x.push({offset:A.y,node:L,snap:"start"},{offset:A.y+A.height,node:L,snap:"end"},{offset:A.y+A.height/2,node:L,snap:"center"})}}),{vertical:C,horizontal:x}}([E.target,...h.map(T=>T.current)]),{vertical:[{guide:(m=E.target).absolutePosition().x,offset:0,snap:"center",nodes:[m]}],horizontal:[{guide:m.absolutePosition().y,offset:0,snap:"center",nodes:[m]}]});if(!g.length)return;(function(T){var M;const j=(M=c.current)===null||M===void 0?void 0:M.getLayer(),C=j==null?void 0:j.children.find(x=>x.name()==="line-guides");T.forEach(x=>{if(x.orientation==="H"){var L=new n.default.Line({points:[-6e3,x.lineGuide,6e3,x.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});C==null||C.add(L),j.batchDraw()}else x.orientation==="V"&&(L=new n.default.Line({points:[x.lineGuide,-6e3,x.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),C==null||C.add(L))})})(g);const v=E.target.getAbsolutePosition(),b=Object.assign({},v);g.forEach(T=>{switch(T.snap){case"start":case"center":case"end":switch(T.orientation){case"V":b.x=T.lineGuide+T.offset;break;case"H":b.y=T.lineGuide+T.offset}}});const O=b.x-v.x,I=b.y-v.y;if(!E.evt.ctrlKey&&!E.evt.metaKey){const T=E.target.getAbsolutePosition();E.target.absolutePosition({x:T.x+O,y:T.y+I})}},_=E=>{if(!E.target)return;const S=E.target.getLayer(),m=S.children.find(g=>g.name()==="line-guides");m==null||m.destroyChildren(),S.batchDraw()};t.default.useEffect(()=>{c.current&&(c.current.on("dragmove",d),c.current.on("dragend",_))},p)};const t=r(di()),n=r(Us()),a=Fh();let i=({targetKonvaNodes:c,guideKonvaNode:h,distance:p,snapDirection:w})=>p<5;function o(c,h){var p=[],w=[];c.vertical.forEach(g=>{h.vertical.forEach(v=>{var b=Math.abs(g.offset-v.guide);i({targetKonvaNodes:v.nodes,guideKonvaNode:g.node,distance:b,snapDirection:g.snap})&&p.push({lineGuide:g.offset,diff:b,snap:v.snap,offset:v.offset})})}),c.horizontal.forEach(g=>{h.horizontal.forEach(v=>{var b=Math.abs(g.offset-v.guide);i({targetKonvaNodes:v.nodes,guideKonvaNode:g.node,distance:b,snapDirection:g.snap})&&w.push({lineGuide:g.offset,diff:b,snap:v.snap,offset:v.offset})})});var d=[];const _=p.sort((g,v)=>g.diff-v.diff),E=w.sort((g,v)=>g.diff-v.diff);var S=_[0],m=E[0];return S&&_.filter(g=>Math.abs(g.diff-S.diff)<.1).forEach(g=>{d.push(Object.assign({orientation:"V"},g))}),m&&E.filter(g=>Math.abs(g.diff-m.diff)<.1).forEach(g=>{d.push(Object.assign({orientation:"H"},g))}),d}function l(c,h){return c.x*h.x+c.y*h.y}e.setSnapFilterFunc=c=>{i=c};const u={"top-left":"bottom-right","top-center":"bottom-center","top-right":"bottom-left","middle-right":"middle-left","bottom-right":"top-left","bottom-center":"top-center","bottom-left":"top-right","middle-left":"middle-right"}}(Wd)),Wd}var X3;function CC(){return X3||(X3=1,function(e){var r=Vd&&Vd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=h,e.getLinePositionFromMiddlePoints=p;const t=r(di()),n=zs,a=Fu,i=Pp(),o=Mh,l=Ff(),u=J8(),c=rf();function h(_){const{x:E,y:S,width:m,height:g,rotation:v}=_.a,b=v*Math.PI/180,O={x:E+g/2*Math.cos(b+Math.PI/2),y:S+g/2*Math.sin(b+Math.PI/2)};return{middleLeft:O,middleRight:{x:O.x+m*Math.cos(b),y:O.y+m*Math.sin(b)}}}function p(_,E,S){const m=Math.sqrt(Math.pow(E.x-_.x,2)+Math.pow(E.y-_.y,2)),g=Math.atan2(E.y-_.y,E.x-_.x),v=180*g/Math.PI;return{x:_.x+Math.cos(g-Math.PI/2)*S/2,y:_.y+Math.sin(g-Math.PI/2)*S/2,width:m,height:S,rotation:v}}const w=(_,E)=>({offsetX:5/_,offsetY:5/_,width:10/_,height:10/_,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:S=>{S.target.getStage().container().style.cursor="crosshair"},onMouseLeave:S=>{S.target.getStage().container().style.cursor=""},onDragStart:S=>{E.history.startTransaction()},onDragEnd:S=>{E.history.endTransaction()}}),d=(0,n.observer)(({element:_,type:E})=>{const S=(0,i.useColor)(_,_.a.color,"fill"),m=(0,i.useColor)(_,_.a.color,"stroke"),g=Object.assign(Object.assign(Object.assign({strokeWidth:_.height,lineCap:"round",lineJoin:"round"},m),S),{opacity:_.a.opacity,hideInExport:!_.showInExport});return t.default.createElement(t.default.Fragment,null,E==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*_.height,2*-_.height,0,0,3*_.height,2*_.height]},g)),E==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*_.height,2*-_.height,0,0,3*_.height,2*_.height],closed:!0},g)),E==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-_.height,0,2*_.height],closed:!0},g)),E==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-_.height,4*_.height,2*-_.height,4*_.height,2*_.height,0,2*_.height],closed:!0},g)),E==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*_.height,y:0,radius:2*_.height},g)))});e.LineElement=(0,n.observer)(({element:_,store:E})=>{const S=t.default.useRef(null),m=t.default.useRef(null),g=t.default.useRef(null),v=_.selectable||E.role==="admin",b=(0,c.isTouchDevice)(),[O,I]=t.default.useState(!1),T=E.selectedElements.indexOf(_)>=0&&E.selectedElements.length===1,M=E.selectedShapes.indexOf(_)>=0&&_.selectable,{middleLeft:j,middleRight:C}=h(_);(0,u.useAnchorSnap)(m,[S],[T]),(0,u.useAnchorSnap)(g,[S],[T]);const x=(0,i.useColor)(_,_.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:S,name:"element",id:_.id,x:_.a.x,y:_.a.y,points:[0,0,_.a.width,0],offsetY:-_.a.height/2,strokeWidth:_.a.height,hitStrokeWidth:Math.max(_.a.height,20),dash:_.dash.map(L=>L*_.a.height)},x,{rotation:_.a.rotation,opacity:_.animated("opacity"),shadowEnabled:_.shadowEnabled,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,shadowColor:_.shadowColor,shadowOpacity:_.shadowOpacity,listening:v,draggable:b?_.draggable&&M:_.draggable,preventDefault:!b||M,hideInExport:!_.showInExport,onMouseEnter:()=>{I(!0)},onMouseLeave:()=>{I(!1)},onDragMove:L=>{_.set({x:L.target.x(),y:L.target.y()})},onDragEnd:L=>{_.set({x:L.target.x(),y:L.target.y()})},onTransform:L=>{const A=L.target.scaleX();L.target.scaleX(1),L.target.scaleY(1),_.set({height:_.height*A,width:_.width*A,x:L.target.x(),y:L.target.y(),rotation:L.target.rotation()})}})),t.default.createElement(a.Group,{x:j.x,y:j.y,rotation:_.rotation,hideInExport:!_.showInExport},t.default.createElement(d,{element:_,type:_.startHead})),t.default.createElement(a.Group,{x:C.x,y:C.y,rotation:_.rotation+180},t.default.createElement(d,{element:_,type:_.endHead})),(O||M&&!T)&&t.default.createElement(l.Highlighter,{element:_}),T&&_.resizable&&t.default.createElement(o.Portal,{selector:".page-abs-container",enabled:!0},t.default.createElement(a.Group,{visible:T},t.default.createElement(a.Rect,Object.assign({x:j.x,y:j.y,ref:m,name:"line-anchor"},w(E.scale,E),{onDragMove:L=>{const A=p(L.target.position(),C,_.height);_.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:C.x,y:C.y,ref:g,name:"line-anchor"},w(E.scale,E),{onDragMove:L=>{const A=p(j,L.target.position(),_.height);_.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})))))})}(Vd)),Vd}var Bl={},K3;function e_(){return K3||(K3=1,function(e){var r,t=Bl&&Bl.__createBinding||(Object.create?function(x,L,A,N){N===void 0&&(N=A);var F=Object.getOwnPropertyDescriptor(L,A);F&&!("get"in F?!L.__esModule:F.writable||F.configurable)||(F={enumerable:!0,get:function(){return L[A]}}),Object.defineProperty(x,N,F)}:function(x,L,A,N){N===void 0&&(N=A),x[N]=L[A]}),n=Bl&&Bl.__setModuleDefault||(Object.create?function(x,L){Object.defineProperty(x,"default",{enumerable:!0,value:L})}:function(x,L){x.default=L}),a=Bl&&Bl.__importStar||(r=function(x){return r=Object.getOwnPropertyNames||function(L){var A=[];for(var N in L)Object.prototype.hasOwnProperty.call(L,N)&&(A[A.length]=N);return A},r(x)},function(x){if(x&&x.__esModule)return x;var L={};if(x!=null)for(var A=r(x),N=0;N<A.length;N++)A[N]!=="default"&&t(L,x,A[N]);return n(L,x),L}),i=Bl&&Bl.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useLoader=e.setVideoLoaderHook=e.useCornerRadiusAndCrop=void 0;const o=i(di()),l=zs,u=fl,c=Fu,h=i(r0()),p=i(Us()),w=Mh,d=Ff(),_=jf(),E=a(kp()),S=tf(),m=Ap(),g=If(),v=rf();function b(){return document.createElement("canvas")}const O=new window.Image;O.src=E.svgToURL(`
|
|
274
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
275
|
-
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
276
|
-
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
277
|
-
</svg>
|
|
278
|
-
`);const I=new window.Image;I.src=E.svgToURL(`
|
|
279
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
280
|
-
<path opacity="0.6" d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" fill="white"/>
|
|
281
|
-
<path opacity="0.6" d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" fill="white"/>
|
|
282
|
-
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
283
|
-
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
284
|
-
</svg>
|
|
285
|
-
`),e.useCornerRadiusAndCrop=(x,L,A,N,F=0,U=!1)=>{const W=Math.floor(Math.max(x.width*N,1)),$=Math.floor(Math.max(x.height*N,1)),Z=Math.min(F*N,W/2,$/2),V=Math.max(x.width/A.width,x.height/A.height)*N,G=x.page._exportingOrRendering&&S.flags.imageDownScalingEnabled&&V<1&&!U,z=A.x===0&&A.y===0&&A.width===(L==null?void 0:L.width)&&A.height===(L==null?void 0:L.height),D=o.default.useMemo(()=>{if(L&&L.width&&L.height)return z&&Z===0&&!G?void 0:b()},[L,Z,G,z]),K=()=>{if(!D||!L)return;D.width=W,D.height=$;const ne=D.getContext("2d");if(!ne)return;Z&&(ne.beginPath(),ne.moveTo(Z,0),ne.lineTo(W-Z,0),ne.arc(W-Z,Z,Z,3*Math.PI/2,0,!1),ne.lineTo(W,$-Z),ne.arc(W-Z,$-Z,Z,0,Math.PI/2,!1),ne.lineTo(Z,$),ne.arc(Z,$-Z,Z,Math.PI/2,Math.PI,!1),ne.lineTo(0,Z),ne.arc(Z,Z,Z,Math.PI,3*Math.PI/2,!1),ne.clip());const Q=G?function(ae,se){var ce,me;const Se=b();Se.width=ae.width,Se.height=ae.height,(ce=Se.getContext("2d"))===null||ce===void 0||ce.drawImage(ae,0,0,Se.width,Se.height);const Oe=function(Ne,xe,ve,Xe,be,Ae,Ee){for(var Le=new ImageData(xe,ve),he=new Int32Array(Ne.data.buffer),ke=Ne.width,Re=new Int32Array(Le.data.buffer),$e=Le.width,vt=xe/Ae,wt=ve/Ee,at=Math.round(1/vt),mt=Math.round(1/wt),Je=at*mt,nt=0;nt<Le.height;nt++)for(var qt=0;qt<$e;qt++){for(var At=0+Math.round(qt/vt)+(0+Math.round(nt/wt))*ke,Ht=0,zt=0,Ie=0,He=0,Nt=0;Nt<mt;Nt++)for(var ht=0;ht<at;ht++){var gt=he[At+ht+Nt*ke];Ht+=gt<<24>>>24,zt+=gt<<16>>>24,Ie+=gt<<8>>>24,He+=gt>>>24}Ht=Math.round(Ht/Je),zt=Math.round(zt/Je),Ie=Math.round(Ie/Je),He=Math.round(He/Je),Re[qt+nt*$e]=He<<24|Ie<<16|zt<<8|Ht}return Le}(Se.getContext("2d").getImageData(0,0,Se.width,Se.height),Math.floor(Se.width*se),Math.floor(Se.height*se),0,0,Se.width,Se.height);return Se.width=Math.floor(Se.width*se),Se.height=Math.floor(Se.height*se),(me=Se.getContext("2d"))===null||me===void 0||me.putImageData(Oe,0,0),Se}(L,V):L,ee=G?{x:Math.floor(A.x*V),y:Math.floor(A.y*V),width:Math.floor(A.width*V),height:Math.floor(A.height*V)}:A;ne.drawImage(Q,ee.x,ee.y,ee.width,ee.height,0,0,D.width,D.height)};return o.default.useLayoutEffect(()=>{K()},[D,x.width,x.height,A.x,A.y,A.width,A.height,F,N,U,x.page._exportingOrRendering,G]),o.default.useEffect(()=>()=>{D&&D.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(D)},[D]),[D||L,K]};const T=b(),M=(0,l.observer)(({element:x})=>{const L=Math.min(30,x.width/4,x.height/4),A=o.default.useRef(null);return o.default.useEffect(()=>{const N=A.current;if(!N)return;const F=new p.default.Animation(U=>{N.rotate(((U==null?void 0:U.timeDiff)||0)/2)},N.getLayer());return F.start(),()=>{F.stop()}}),o.default.createElement(c.Group,{x:x.a.x,y:x.a.y,rotation:x.a.rotation,listening:!1,opacity:x.a.opacity,hideInExport:!x.showInExport},o.default.createElement(c.Rect,{width:x.width,height:x.height,fill:"rgba(124, 173, 212, 0.8)"}),o.default.createElement(c.Arc,{ref:A,x:x.width/2,y:x.height/2,fill:"white",outerRadius:Math.abs(L),innerRadius:Math.max(1,L-5),angle:270}))}),j=(0,l.observer)(({element:x})=>{const L=Math.max(10,Math.min(30,x.width/25));return o.default.createElement(c.Group,{x:x.a.x,y:x.a.y,rotation:x.a.rotation,listening:!1,opacity:x.a.opacity,hideInExport:!x.showInExport},o.default.createElement(c.Rect,{width:x.width,height:x.height,fill:"rgba(223, 102, 102, 0.8)"}),o.default.createElement(c.Text,{text:"Can not load the video...",fontSize:L,width:x.width,height:x.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let C=function(x,L,A){const N=o.default.useRef("loading"),F=o.default.useRef(null),[U,W]=o.default.useState(0),$=o.default.useRef(),Z=o.default.useRef(),V=o.default.useRef();return $.current===x&&Z.current===L&&V.current===A||(N.current="loading",F.current=void 0,$.current=x,Z.current=L,V.current=A),o.default.useLayoutEffect(function(){if(x){var G=document.createElement("video");return G.addEventListener("canplay",z),G.addEventListener("error",D),L&&(G.crossOrigin=L),A&&(G.referrerpolicy=A),G.src=x,G.load(),function(){G.removeEventListener("canplay",z),G.removeEventListener("error",D)}}function z(){N.current="loaded",F.current=G,F.current.currentTime=0,W(Math.random()),F.current.removeEventListener("canplay",z)}function D(K){const ne=G.readyState===4,Q=G.buffered&&G.buffered.length>0&&G.buffered.end(G.buffered.length-1)/G.duration*100>=100;ne&&Q||(N.current="failed",F.current=void 0,W(Math.random()))}},[x,L,A]),[F.current,N.current]};e.setVideoLoaderHook=x=>{C=x},e.useLoader=(x,L,A)=>{const N=o.default.useRef(),F=()=>{var U;(U=N.current)===null||U===void 0||U.call(N),N.current=void 0};o.default.useEffect(()=>F,[]),o.default.useLayoutEffect(()=>{const U=L.slice(0,200),W=`video with id ${A} url: ${U}`;x!=="loading"||N.current||(N.current=(0,_.incrementLoader)(W)),x!=="loading"&&F(),x==="failed"&&(0,_.triggerLoadError)(W)},[x])},e.VideoElement=(0,l.observer)(({element:x,store:L})=>{var A;const[N,F]=o.default.useState(!1),U=o.default.useRef(null),W=o.default.useRef(null),[$,Z]=o.default.useState(!1),V=L.selectedShapes.indexOf(x)>=0&&x.selectable,[G,z]=o.default.useState(!1),[D,K]=C(x.src,"anonymous"),ne=L.activePage===x.page;(0,e.useLoader)(K,x.src,x.id),D&&(D.width=D.videoWidth,D.height=D.videoHeight,D.playsInline=!0);const Q=D||T;o.default.useEffect(()=>{D&&L.history.ignore(()=>{x.set({duration:1e3*D.duration})})},[D]),o.default.useEffect(()=>{var ht;if(!D)return;const gt=L.animatedElementsIds,_t=(!gt.length||gt.includes(x.id))&&L.isPlaying,rr=ne&&(_t||G);if(!rr)return void D.pause();rr&&(D.currentTime=x.startTime*D.duration,D.play());const Wt=new p.default.Animation(()=>{$e()},(ht=U.current)===null||ht===void 0?void 0:ht.getLayer());Wt.start();const St=()=>{z(!1),D.currentTime=x.startTime*D.duration},it=()=>{D.currentTime>=x.endTime*D.duration&&(D.pause(),D.currentTime=x.startTime*D.duration,z(!1))};return D.addEventListener("ended",St),D.addEventListener("timeupdate",it),()=>{D.pause(),Wt.stop(),D.removeEventListener("ended",St),D.removeEventListener("timeupdate",it)}},[D,G,L.isPlaying,ne]),o.default.useEffect(()=>{D&&(D.volume=x.volume)},[D,x.volume]);const ee=o.default.useRef();o.default.useEffect(()=>{const ht=(0,u.autorun)(()=>{var gt,_t;if(D){const rr=L.animatedElementsIds;if(rr.length&&!rr.includes(x.id))return;const Wt=(L.currentTime-x.page.startTime)%x.duration;if(Math.abs(1e3*D.currentTime-Wt)>500||!L.isPlaying){const St=Wt/1e3;St!==D.currentTime&&(D.currentTime=St),D.readyState!==4&&!L.isPlaying&&!ee.current&&(ee.current=(0,_.incrementLoader)(`video ${x.id}`))}$e(),(_t=(gt=U.current)===null||gt===void 0?void 0:gt.getLayer())===null||_t===void 0||_t.batchDraw()}});return()=>{ht(),ee.current&&(ee.current(),ee.current=null)}},[L,D]),o.default.useEffect(()=>{if(!D)return;const ht=()=>{var _t,rr;D.readyState!==4&&x.page._exportingOrRendering||ee.current&&($e(),(rr=(_t=U.current)===null||_t===void 0?void 0:_t.getLayer())===null||rr===void 0||rr.batchDraw(),ee.current(),ee.current=null)};let gt;return x.page._exportingOrRendering&&(gt=setInterval(ht,50)),D.addEventListener("timeupdate",ht),D.addEventListener("canplay",ht),()=>{clearInterval(gt),D.removeEventListener("timeupdate",ht),D.removeEventListener("canplay",ht)}},[x.page._exportingOrRendering,D,x.id,_.incrementLoader]);let{cropX:ae,cropY:se,cropWidth:ce,cropHeight:me}=x;K!=="loaded"&&(ae=se=0,ce=me=1);const Se=Q.width*ce,Oe=Q.height*me,Ne=x.width/x.height;let xe,ve;const Xe=Se/Oe,be=x.type==="svg";be?(xe=Se,ve=Oe):Ne>=Xe?(xe=Se,ve=Se/Ne):(xe=Oe*Ne,ve=Oe);const Ae={x:Q.width*ae,y:Q.height*se,width:xe,height:ve},Ee=(A=x.cornerRadius)!==null&&A!==void 0?A:0,[Le,he]=(0,e.useCornerRadiusAndCrop)(x,Q,Ae,L._elementsPixelRatio,Ee,N||x._cropModeEnabled||x.type==="svg");let[ke,Re]=((ht,gt,_t,rr)=>{const Wt=(bt=>{const[ze,xt]=o.default.useState(bt);return o.default.useEffect(()=>{(async()=>{const kt=await async function(Ft){if(!(Ft.indexOf("data:image/svg+xml")>=0||Ft.indexOf(".svg")>=0))return Ft;const Ut=await E.urlToString(Ft),Yt=E.fixSize(Ut);return E.svgToURL(Yt)}(bt);kt!==ze&&xt(kt)})()},[bt]),ze})(ht.clipSrc||""),[St,it]=(0,h.default)(Wt,"anonymous"),Bt=ht.clipSrc?it:"loaded";(0,e.useLoader)(Bt,ht.clipSrc,ht.id);const Ue=o.default.useMemo(()=>{if(gt&&St)return b()},[gt,St]);function De(){var bt;if(!St||!gt||!gt.width||!gt.height||!St||!St.width||!St.height||!Ue)return;const ze=b(),xt=Math.max(ht.width/St.width*_t,ht.height/St.height*_t);ze.width=St.width*xt,ze.height=St.height*xt,(bt=ze.getContext("2d"))===null||bt===void 0||bt.drawImage(St,0,0,ze.width,ze.height),Ue.width=Math.max(gt.width,1),Ue.height=Math.max(gt.height,1);const kt=Ue.getContext("2d");kt&&(kt.save(),kt.drawImage(ze,0,0,gt.width,gt.height),p.default.Util.releaseCanvas(ze),kt.globalCompositeOperation="source-in",kt.drawImage(gt,0,0,Ue.width,Ue.height),kt.restore())}return o.default.useLayoutEffect(()=>{De()},[Ue,gt,St,ht.width,ht.height,_t,...rr]),[ht.clipSrc&&St?Ue:gt,De]})(x,Le,L._elementsPixelRatio,[Ae,Ee,L._elementsPixelRatio]);function $e(){he(),Re()}const vt=Math.max(x.width/xe,x.height/ve);o.default.useEffect(()=>{var ht;if(!x._cropModeEnabled)return;const gt=(ht=U.current)===null||ht===void 0?void 0:ht.getStage();function _t(Wt){x._cropModeEnabled&&Wt.target!==W.current&&x.toggleCropMode(!1)}function rr(Wt){x._cropModeEnabled&&Wt.target.parentNode!==gt.content&&x.toggleCropMode(!1)}return document.body.addEventListener("click",rr),gt==null||gt.on("click",_t),gt==null||gt.on("tap",_t),()=>{document.body.removeEventListener("click",rr),document.body.removeEventListener("touchstart",rr),gt==null||gt.off("click",_t),gt==null||gt.off("click",_t)}},[x._cropModeEnabled]),o.default.useLayoutEffect(()=>{if(!N&&!x._cropModeEnabled)return(0,m.applyFilter)(U.current,x),(0,u.autorun)(()=>{(0,m.applyFilter)(U.current,x)},{delay:100})},[Q,N,ce,me,x._cropModeEnabled]),o.default.useLayoutEffect(()=>{var ht;N||x._cropModeEnabled?(ht=U.current)===null||ht===void 0||ht.clearCache():(0,m.applyFilter)(U.current,x)},[N,x.width,x.height,x._cropModeEnabled]),o.default.useEffect(()=>{(0,m.applyFilter)(U.current,x)},[x.shadowEnabled,x.shadowBlur,x.cornerRadius,x.shadowColor,x.shadowOffsetX,x.shadowOffsetY,x.shadowOpacity]);const wt=o.default.useRef(null),at=o.default.useRef(null),mt=o.default.useRef(null);o.default.useLayoutEffect(()=>{x._cropModeEnabled&&(at.current.nodes([wt.current]),mt.current.nodes([W.current]))},[x._cropModeEnabled]);const Je=ht=>{Math.round(ht.target.x())>0&&(ht.target.x(0),ht.target.scaleX(1)),Math.round(ht.target.y())>0&&(ht.target.y(0),ht.target.scaleY(1));const gt=ht.target.width()*ht.target.scaleX(),_t=ht.target.height()*ht.target.scaleY(),rr=Math.min(1,xe/gt),Wt=Math.min(1,ve/_t),St=1-rr,it=Math.min(St,Math.max(0,Math.round(-ht.target.x())/gt)),Bt=1-Wt,Ue=Math.min(Bt,Math.max(0,Math.round(-ht.target.y())/_t));ht.target.setAttrs({x:-it*Q.width,y:-Ue*Q.height,scaleX:1,scaleY:1}),x.set({cropX:it,cropY:Ue,cropWidth:rr,cropHeight:Wt})},nt=()=>{x.type!=="svg"&&x.contentEditable&&setTimeout(()=>{x.toggleCropMode(!0)})},qt=K==="loading",At=K==="failed",Ht=!qt&&!At,zt=o.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Ie=Ht?x.a.opacity:0;(0,g.useFadeIn)(U,Ie);const He=x.selectable||L.role==="admin",Nt=(0,v.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,qt&&o.default.createElement(M,{element:x}),At&&o.default.createElement(j,{element:x}),o.default.createElement(c.Image,{ref:U,name:"element",id:x.id,image:ke,x:x.a.x,y:x.a.y,width:x.a.width||1,height:x.a.height||1,rotation:x.a.rotation,opacity:Ie,shadowEnabled:x.shadowEnabled,shadowBlur:x.shadowBlur,shadowOffsetX:x.shadowOffsetX,shadowOffsetY:x.shadowOffsetY,shadowColor:x.shadowColor,shadowOpacity:x.shadowOpacity,customCrop:Ae,listening:He,draggable:Nt?x.draggable&&V:x.draggable,preventDefault:!Nt||V,hideInExport:!x.showInExport,onMouseEnter:()=>{Z(!0)},onMouseLeave:()=>{Z(!1)},onDragMove:ht=>{x.set({x:ht.target.x(),y:ht.target.y()})},onDragEnd:ht=>{x.set({x:ht.target.x(),y:ht.target.y()})},onDblClick:nt,onDblTap:nt,onTransformStart:()=>{F(!0),zt.current={cropX:x.cropX,cropY:x.cropY,cropWidth:x.cropWidth,cropHeight:x.cropHeight}},onTransform:ht=>{var gt;const _t=ht.currentTarget,rr=Math.abs(_t.scaleX()-1)<1e-7?1:_t.scaleX(),Wt=Math.abs(_t.scaleY()-1)<1e-7?1:_t.scaleY();_t.scaleX(1),_t.scaleY(1);const St=(gt=ht.target.getStage())===null||gt===void 0?void 0:gt.findOne("Transformer"),it=1-xe/Q.width,Bt=Math.min(it,Math.max(0,x.cropX)),Ue=1-ve/Q.height,De=Math.min(Ue,Math.max(0,x.cropY)),bt=St.getActiveAnchor(),ze=!(bt.indexOf("middle")>=0||bt.indexOf("center")>=0),xt=!ze&&rr<1&&zt.current.cropHeight>ve/Q.height;let kt=ze?x.cropWidth:x.cropWidth*rr;xt&&(kt=x.cropWidth);const Ft=!ze&&Wt<1&&zt.current.cropWidth>xe/Q.width;let Ut=ze?x.cropHeight:x.cropHeight*Wt;Ft&&(Ut=x.cropHeight),be&&(kt=x.cropWidth,Ut=x.cropHeight),x.set({cropX:Bt,cropY:De,x:_t.x(),y:_t.y(),width:_t.width()*rr,height:_t.height()*Wt,rotation:ht.target.rotation(),cropWidth:Math.min(kt,1-Bt),cropHeight:Math.min(Ut,1-De)})},onTransformEnd:ht=>{const gt=ht.currentTarget;x.set({width:gt.width(),height:gt.height(),x:gt.x(),y:gt.y(),rotation:ht.target.rotation(),cropWidth:xe/Q.width,cropHeight:ve/Q.height}),F(!1)}}),o.default.createElement(c.Rect,{x:x.a.x,y:x.a.y,width:Math.max(x.a.width-x.borderSize,0),height:Math.max(x.a.height-x.borderSize,0),opacity:Ie,offsetX:-x.borderSize/2,offsetY:-x.borderSize/2,stroke:x.borderColor,strokeWidth:x.borderSize,listening:!1,visible:!!x.borderSize,rotation:x.rotation,cornerRadius:Math.max(0,Ee-x.borderSize),hideInExport:!x.showInExport}),!L.isPlaying&&o.default.createElement(c.Image,{image:G?I:O,x:x.a.x,y:x.a.y,offsetX:-x.a.width/2+15/L.scale,offsetY:-x.a.height/2+15/L.scale,rotation:x.a.rotation,width:30/L.scale,height:30/L.scale,hideInExport:!0,onClick:()=>z(!G),onTap:()=>z(!G)}),x._cropModeEnabled&&o.default.createElement(w.Portal,{selector:".page-abs-container",enabled:!0},o.default.createElement(c.Rect,{x:-window.innerWidth/L.scale,y:-window.innerWidth/L.scale,width:window.innerWidth/L.scale*3,height:window.innerWidth/L.scale*3,fill:"rgba(0,0,0,0.3)"}),o.default.createElement(c.Image,{listening:!1,image:ke,x:x.a.x,y:x.a.y,width:x.a.width,height:x.a.height,rotation:x.a.rotation,shadowEnabled:x.shadowEnabled,shadowBlur:x.shadowBlur}),o.default.createElement(c.Group,{x:x.a.x,y:x.a.y,rotation:x.a.rotation,scaleX:vt,scaleY:vt},o.default.createElement(c.Image,{image:Q,ref:W,opacity:.4,draggable:!0,x:-x.cropX*Q.width,y:-x.cropY*Q.height,onDragMove:Je,onTransform:Je}),o.default.createElement(c.Transformer,{ref:mt,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(ht,gt)=>gt.width<5||gt.height<5?ht:gt,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),o.default.createElement(c.Rect,{width:xe,height:ve,ref:wt,listening:!1,onTransform:ht=>{ht.target.x()<-x.cropX*Q.width-1e-9&&(ht.target.x(-x.cropX*Q.width),ht.target.scaleX(1)),ht.target.y()<-x.cropY*Q.height-1e-9&&(ht.target.y(-x.cropY*Q.height),ht.target.scaleY(1));const gt=Math.min(1,Math.max(0,x.cropX+ht.target.x()/Q.width)),_t=Math.min(1,Math.max(0,ht.target.y()/Q.height+x.cropY)),rr=ht.target.width()*ht.target.scaleX(),Wt=ht.target.height()*ht.target.scaleY(),St=Math.min(1-gt,rr/Q.width),it=Math.min(1-_t,Wt/Q.height),Bt=ht.target.getAbsolutePosition(ht.target.getParent().getParent());ht.target.scale({x:1,y:1}),ht.target.position({x:0,y:0}),x.set({x:Bt.x,y:Bt.y,cropX:gt,cropY:_t,cropWidth:St,cropHeight:it,width:Math.min(rr*vt,Q.width*(1-gt)*vt),height:Math.min(Wt*vt,Q.height*(1-_t)*vt)})}}),o.default.createElement(c.Transformer,{ref:at,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(ht,gt)=>gt.width<5||gt.height<5?ht:gt,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2,visible:x.resizable}))),($||V)&&o.default.createElement(d.Highlighter,{element:x}))})}(Bl)),Bl}var $d={},Ov={},Z3;function km(){return Z3||(Z3=1,function(e){function r({width:c,height:h}){const p=c/2,w=h/2,d=c/2,_=h/2,E=d/2,S=_/2;let m="",g=Math.PI/5;for(let v=0;v<10;v++){const b=v%2==0?_:S,O=p+(v%2==0?d:E)*Math.sin(v*g),I=w-b*Math.cos(v*g);v===0?m=`M ${O} ${I}`:m+=` L ${O} ${I}`}return m+" Z"}function t({width:c,height:h}){const p=c/2,w=h/2;return`M ${p} 0 L ${c} ${w} L ${p} ${h} L 0 ${w} Z`}function n({width:c,height:h}){const p=c/2,w=h/2,d=c/2,_=h/2;let E="",S=2*Math.PI/5;for(let m=0;m<5;m++){const g=_,v=p+d*Math.sin(m*S),b=w-g*Math.cos(m*S);m===0?E=`M ${v} ${b}`:E+=` L ${v} ${b}`}return E+" Z"}function a({width:c,height:h}){const p=c/2,w=h/2,d=c/2,_=h/2;let E="",S=2*Math.PI/6;for(let m=0;m<6;m++){const g=_,v=p+d*Math.sin(m*S),b=w-g*Math.cos(m*S);m===0?E=`M ${v} ${b}`:E+=` L ${v} ${b}`}return E+" Z"}function i({path:c,aspectRatio:h,width:p,height:w}){return{path:c,scaleX:p/h.width,scaleY:w/h.height}}function o({width:c,height:h}){const p=.1*Math.min(c,h),w=.2*c,d=.2*h,_=.5*c;let E=`M ${p},0`;return E+=" H "+(c-p),E+=` A ${p},${p} 0 0 1 ${c},${p}`,E+=" V "+(h-p-d),E+=` A ${p},${p} 0 0 1 ${c-p},${h-d}`,E+=` H ${_+w/2}`,E+=` L ${_},${h}`,E+=` L ${_-w/2},${h-d}`,E+=` H ${p}`,E+=` A ${p},${p} 0 0 1 0,${h-p-d}`,E+=` V ${p}`,E+=` A ${p},${p} 0 0 1 ${p},0`,E+=" Z",E}function l({width:c,height:h}){const p=.3*c,w=.3*h,d=c/2,_=h/2,E=d-p/2,S=d+p/2,m=_-w/2,g=_+w/2;let v=`M ${E},0 `;return v+=`H ${S} `,v+=`V ${m} `,v+=`H ${c} `,v+=`V ${g} `,v+=`H ${S} `,v+=`V ${h} `,v+=`H ${E} `,v+=`V ${g} `,v+="H 0 ",v+=`V ${m} `,v+=`H ${E} `,v+="V 0 ",v+="Z",v}function u(c){return e.TYPES[c]||e.rectData}Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0,e.starPath=r,e.diamondPath=t,e.pentagonPath=n,e.hexagonPath=a,e.speechBubblePath=o,e.crossPath=l,e.subTypeToPathDataFunc=u,e.figureToSvg=function(c){const{subType:h}=c,p=u(h);return p?function(w,d){const{width:_,height:E,fill:S,stroke:m,strokeWidth:g,dash:v}=w,b=(v||[]).map(j=>j*g);let O=d(w),I=1,T=1;typeof O!="string"&&(I=O.scaleX,T=O.scaleY,O=O.path);const M=`clip-${w.id||Math.random()}`;return`
|
|
286
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${_}" height="${E}">
|
|
287
|
-
<defs>
|
|
288
|
-
<clipPath id="${M}">
|
|
289
|
-
<path d="${O}" />
|
|
290
|
-
</clipPath>
|
|
291
|
-
</defs>
|
|
292
|
-
|
|
293
|
-
<!-- Path for the fill -->
|
|
294
|
-
<path d="${O}" fill="${S}" transform="scale(${I}, ${T})"/>
|
|
295
|
-
|
|
296
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
297
|
-
<path d="${O}" fill="none" stroke="${m}" stroke-width="${2*g}" clip-path="url(#${M})" transform="scale(${I}, ${T})" stroke-dasharray="${b.join(" ")}"/>
|
|
298
|
-
</svg>
|
|
299
|
-
`}(c,p):(console.error(`Polotno error: Can not convert ${c.subType} figure to svg.`),(0,e.rectData)(c))},e.rectData=({width:c,height:h,cornerRadius:p})=>{if(p>0){const w=Math.min(p,c/2,h/2);return`M 0 ${w} A ${w} ${w} 0 0 1 ${w} 0 L ${c-w} 0 A ${w} ${w} 0 0 1 ${c} ${w} L ${c} ${h-w} A ${w} ${w} 0 0 1 ${c-w} ${h} L ${w} ${h} A ${w} ${w} 0 0 1 0 ${h-w} Z`}return`M 0 0 L ${c} 0 L ${c} ${h} L 0 ${h} Z`},e.triangleData=({width:c,height:h})=>`M ${c/2} 0 L ${c} ${h} L 0 ${h} Z`,e.rightTriangleData=({width:c,height:h})=>`M 0 0 L ${c} 0 L 0 ${h} Z`,e.circleData=({width:c,height:h})=>`M ${c/2} ${h/2} m -${c/2}, 0 a ${c/2},${h/2} 0 1,0 ${c},0 a ${c/2},${h/2} 0 1,0 -${c},0`,e.TYPES={rect:e.rectData,circle:e.circleData,star:r,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:t,pentagon:n,hexagon:a,speechBubble:o,cross:l,arc:({width:c,height:h})=>i({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:c,height:h}),cloud:({width:c,height:h})=>i({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:c,height:h}),rightArrow:({width:c,height:h})=>{const p=.6*c;return`M 0 ${h/4} L ${p} ${h/4} L ${p} 0 L ${c} ${h/2} L ${p} ${h} L ${p} ${.75*h} L 0 ${.75*h} Z`},leftArrow:({width:c,height:h})=>{const p=.4*c;return`M ${c} ${h/4} L ${p} ${h/4} L ${p} 0 L 0 ${h/2} L ${p} ${h} L ${p} ${.75*h} L ${c} ${.75*h} Z`},downArrow:({width:c,height:h})=>{const p=.6*h;return`M ${c/4} 0 L ${c/4} ${p} L 0 ${p} L ${c/2} ${h} L ${c} ${p} L ${.75*c} ${p} L ${.75*c} 0 Z`},upArrow:({width:c,height:h})=>{const p=.4*h;return`M ${c/4} ${h} L ${c/4} ${p} L 0 ${p} L ${c/2} 0 L ${c} ${p} L ${.75*c} ${p} L ${.75*c} ${h} Z`},asterisk1:({width:c,height:h})=>i({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:c,height:h}),asterisk2:({width:c,height:h})=>i({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:c,height:h}),bookmark:({width:c,height:h})=>i({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:c,height:h}),butterfly:({width:c,height:h})=>i({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:c,height:h}),cylinder:({width:c,height:h})=>i({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:c,height:h}),diamond2:({width:c,height:h})=>i({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:c,height:h}),door:({width:c,height:h})=>i({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:c,height:h}),drop1:({width:c,height:h})=>i({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:c,height:h}),drop2:({width:c,height:h})=>i({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:c,height:h}),explosion:({width:c,height:h})=>i({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:c,height:h}),flag:({width:c,height:h})=>i({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:c,height:h}),flower:({width:c,height:h})=>i({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:c,height:h}),frame:({width:c,height:h})=>i({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:c,height:h}),heart1:({width:c,height:h})=>i({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:c,height:h}),home:({width:c,height:h})=>i({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:c,height:h}),home2:({width:c,height:h})=>i({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:c,height:h}),hourglass:({width:c,height:h})=>i({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:c,height:h}),house:({width:c,height:h})=>i({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:c,height:h}),keyhole:({width:c,height:h})=>i({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:c,height:h}),kiss:({width:c,height:h})=>i({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:c,height:h}),leaf:({width:c,height:h})=>i({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:c,height:h}),lightning1:({width:c,height:h})=>i({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:c,height:h}),lightning2:({width:c,height:h})=>i({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:c,height:h}),magnet:({width:c,height:h})=>i({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:c,height:h}),mithosis:({width:c,height:h})=>i({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:c,height:h}),orangeRicky:({width:c,height:h})=>i({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:c,height:h}),party:({width:c,height:h})=>i({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:c,height:h}),pillow:({width:c,height:h})=>i({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:c,height:h}),polygon:({width:c,height:h})=>i({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:c,height:h}),rainbow:({width:c,height:h})=>i({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:c,height:h}),rhodeIsland:({width:c,height:h})=>i({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:c,height:h}),shell:({width:c,height:h})=>i({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:c,height:h}),shield1:({width:c,height:h})=>i({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:c,height:h}),shield2:({width:c,height:h})=>i({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:c,height:h}),skewedRectangle:({width:c,height:h})=>i({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:c,height:h}),softFlower:({width:c,height:h})=>i({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:c,height:h}),softStar:({width:c,height:h})=>i({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:c,height:h}),stairs1:({width:c,height:h})=>i({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:c,height:h}),stairs2:({width:c,height:h})=>i({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:c,height:h}),teewee:({width:c,height:h})=>i({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:c,height:h}),blob1:({width:c,height:h})=>i({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:c,height:h}),blob10:({width:c,height:h})=>i({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:c,height:h}),blob11:({width:c,height:h})=>i({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:c,height:h}),blob12:({width:c,height:h})=>i({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:c,height:h}),blob13:({width:c,height:h})=>i({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:c,height:h}),blob14:({width:c,height:h})=>i({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:c,height:h}),blob15:({width:c,height:h})=>i({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:c,height:h}),blob16:({width:c,height:h})=>i({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:c,height:h}),blob17:({width:c,height:h})=>i({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:c,height:h}),blob18:({width:c,height:h})=>i({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:c,height:h}),blob19:({width:c,height:h})=>i({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:c,height:h}),blob2:({width:c,height:h})=>i({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:c,height:h}),blob20:({width:c,height:h})=>i({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:c,height:h}),blob21:({width:c,height:h})=>i({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:c,height:h}),blob22:({width:c,height:h})=>i({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:c,height:h}),blob23:({width:c,height:h})=>i({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:c,height:h}),blob24:({width:c,height:h})=>i({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:c,height:h}),blob25:({width:c,height:h})=>i({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:c,height:h}),blob26:({width:c,height:h})=>i({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:c,height:h}),blob27:({width:c,height:h})=>i({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:c,height:h}),blob28:({width:c,height:h})=>i({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:c,height:h}),blob29:({width:c,height:h})=>i({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:c,height:h}),blob3:({width:c,height:h})=>i({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:c,height:h}),blob30:({width:c,height:h})=>i({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:c,height:h}),blob31:({width:c,height:h})=>i({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:c,height:h}),blob32:({width:c,height:h})=>i({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:c,height:h}),blob4:({width:c,height:h})=>i({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:c,height:h}),blob5:({width:c,height:h})=>i({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:c,height:h}),blob6:({width:c,height:h})=>i({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:c,height:h}),blob7:({width:c,height:h})=>i({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:c,height:h}),blob8:({width:c,height:h})=>i({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:c,height:h}),blob9:({width:c,height:h})=>i({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:c,height:h})}}(Ov)),Ov}var Q3;function kC(){return Q3||(Q3=1,function(e){var r=$d&&$d.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=r(di()),n=zs,a=Fu,i=km(),o=Ff(),l=rf(),u=Pp(),c={};e.FigureElement=(0,n.observer)(({element:h,store:p})=>{const w=h.selectable||p.role==="admin",d=(0,l.isTouchDevice)(),[_,E]=t.default.useState(!1),S=p.selectedShapes.indexOf(h)>=0&&h.selectable,m=Math.min(h.strokeWidth,h.width/2,h.height/2),g=Math.max(0,Math.min(h.width/2,h.height/2,h.cornerRadius)),v=(0,u.useColor)(h,h.a.fill,"fill"),b=Object.assign(Object.assign({width:h.a.width,height:h.a.height},v),{cornerRadius:g,opacity:h.animated("opacity"),shadowEnabled:h.shadowEnabled,shadowBlur:h.shadowBlur,shadowOffsetX:h.shadowOffsetX,shadowOffsetY:h.shadowOffsetY,shadowColor:h.shadowColor,shadowOpacity:h.shadowOpacity,preventDefault:!d||S,hideInExport:!h.showInExport}),O=(0,u.useColor)(h,h.stroke,"stroke"),I=Object.assign(Object.assign({visible:m>0,x:m/2,y:m/2,width:h.a.width-m,height:h.a.height-m},O),{strokeWidth:m,cornerRadius:Math.max(0,g-m),dash:h.dash.map(C=>C*m),opacity:h.animated("opacity"),hideInExport:!h.showInExport,listening:!1}),T=(M=h.subType,c[M]||(c[M]=(j=(0,i.subTypeToPathDataFunc)(M),(0,n.observer)(({element:C,fillProps:x,strokeProps:L})=>{let A=j({width:C.a.width,height:C.a.height,cornerRadius:C.cornerRadius}),N=1,F=1;typeof A!="string"&&(N=A.scaleX,F=A.scaleY,A=A.path);const U=t.default.useRef(null);return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Rect,{width:C.width,height:C.height,fill:"transparent"}),t.default.createElement(a.Path,Object.assign({},x,{ref:U,data:A,scaleX:N,scaleY:F})),t.default.createElement(a.Group,{clipFunc:W=>{const $=U.current;if($){var Z=$.dataArray;W.beginPath();for(var V=0;V<Z.length;V++){var G=Z[V].command,z=Z[V].points;switch(G){case"L":W.lineTo(z[0],z[1]);break;case"M":W.moveTo(z[0],z[1]);break;case"C":W.bezierCurveTo(z[0],z[1],z[2],z[3],z[4],z[5]);break;case"Q":W.quadraticCurveTo(z[0],z[1],z[2],z[3]);break;case"A":var D=z[0],K=z[1],ne=z[2],Q=z[3],ee=z[4],ae=z[5],se=z[6],ce=z[7],me=ne>Q?ne:Q,Se=ne>Q?1:ne/Q,Oe=ne>Q?Q/ne:1;W.translate(D,K),W.rotate(se),W.scale(Se,Oe),W.arc(0,0,me,ee,ee+ae,1-ce),W.scale(1/Se,1/Oe),W.rotate(-se),W.translate(-D,-K);break;case"z":W.closePath()}}}},scaleX:N,scaleY:F},t.default.createElement(a.Path,Object.assign({},L,{x:0,y:0,data:A,strokeWidth:2*L.strokeWidth,dash:L.dash.map(W=>W)}))))}))),c[M]||a.Group);var M,j;return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Group,{id:h.id,x:h.a.x,y:h.a.y,rotation:h.a.rotation,opacity:h.a.opacity,listening:w,draggable:d?h.draggable&&S:h.draggable,name:"element",onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)},onDragMove:C=>{h.set({x:C.target.x(),y:C.target.y()})},onDragEnd:C=>{h.set({x:C.target.x(),y:C.target.y()})},onTransform:C=>{const x=C.target.scale();C.target.scaleX(1),C.target.scaleY(1),h.set({width:h.width*x.x,height:h.height*x.y,x:C.target.x(),y:C.target.y(),rotation:C.target.rotation()})}},t.default.createElement(T,{element:h,fillProps:b,strokeProps:I})),(_||S)&&t.default.createElement(o.Highlighter,{element:h}))})}($d)),$d}var Yd={},ac={},Av={},oc={},J3;function t_(){if(J3)return oc;J3=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.loop=oc.conditional=oc.parse=void 0;var e=function n(a,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(i))i.forEach(function(c){return n(a,c,o,l)});else if(typeof i=="function")i(a,o,l,n);else{var u=Object.keys(i)[0];Array.isArray(i[u])?(l[u]={},n(a,i[u],o,l[u])):l[u]=i[u](a,o,l,n)}return o};oc.parse=e;var r=function(a,i){return function(o,l,u,c){i(o,l,u)&&c(o,a,l,u)}};oc.conditional=r;var t=function(a,i){return function(o,l,u,c){for(var h=[],p=o.pos;i(o,l,u);){var w={};if(c(o,a,l,w),o.pos===p)break;p=o.pos,h.push(w)}return h}};return oc.loop=t,oc}var Xi={},e4;function r_(){if(e4)return Xi;e4=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.readBits=Xi.readArray=Xi.readUnsigned=Xi.readString=Xi.peekBytes=Xi.readBytes=Xi.peekByte=Xi.readByte=Xi.buildStream=void 0;var e=function(p){return{data:p,pos:0}};Xi.buildStream=e;var r=function(){return function(p){return p.data[p.pos++]}};Xi.readByte=r;var t=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(w){return w.data[w.pos+p]}};Xi.peekByte=t;var n=function(p){return function(w){return w.data.subarray(w.pos,w.pos+=p)}};Xi.readBytes=n;var a=function(p){return function(w){return w.data.subarray(w.pos,w.pos+p)}};Xi.peekBytes=a;var i=function(p){return function(w){return Array.from(n(p)(w)).map(function(d){return String.fromCharCode(d)}).join("")}};Xi.readString=i;var o=function(p){return function(w){var d=n(2)(w);return p?(d[1]<<8)+d[0]:(d[0]<<8)+d[1]}};Xi.readUnsigned=o;var l=function(p,w){return function(d,_,E){for(var S=typeof w=="function"?w(d,_,E):w,m=n(p),g=new Array(S),v=0;v<S;v++)g[v]=m(d);return g}};Xi.readArray=l;var u=function(p,w,d){for(var _=0,E=0;E<d;E++)_+=p[w+E]&&Math.pow(2,d-E-1);return _},c=function(p){return function(w){for(var d=r()(w),_=new Array(8),E=0;E<8;E++)_[7-E]=!!(d&1<<E);return Object.keys(p).reduce(function(S,m){var g=p[m];return g.length?S[m]=u(_,g.index,g.length):S[m]=_[g.index],S},{})}};return Xi.readBits=c,Xi}var t4;function LC(){return t4||(t4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t_(),t=r_(),n={blocks:function(w){for(var d=0,_=[],E=w.data.length,S=0,m=(0,t.readByte)()(w);m!==d&&m;m=(0,t.readByte)()(w)){if(w.pos+m>=E){var g=E-w.pos;_.push((0,t.readBytes)(g)(w)),S+=g;break}_.push((0,t.readBytes)(m)(w)),S+=m}for(var v=new Uint8Array(S),b=0,O=0;O<_.length;O++)v.set(_[O],b),b+=_[O].length;return v}},a=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},function(p){var w=(0,t.peekBytes)(2)(p);return w[0]===33&&w[1]===249}),i=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,function(p,w,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(p,w,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},n]}]},function(p){return(0,t.peekByte)()(p)===44}),o=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(w,d,_){return(0,t.readBytes)(_.text.blockSize)(w)}},n]},function(p){var w=(0,t.peekBytes)(2)(p);return w[0]===33&&w[1]===1}),l=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(w,d,_){return(0,t.readString)(_.blockSize)(w)}},n]},function(p){var w=(0,t.peekBytes)(2)(p);return w[0]===33&&w[1]===255}),u=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},n]},function(p){var w=(0,t.peekBytes)(2)(p);return w[0]===33&&w[1]===254}),c=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,function(p,w){return Math.pow(2,w.lsd.gct.size+1)})},function(p,w){return w.lsd.gct.exists}),{frames:(0,r.loop)([a,l,u,i,o],function(p){var w=(0,t.peekByte)()(p);return w===33||w===44})}],h=c;e.default=h}(Av)),Av}var Xd={},r4;function NC(){if(r4)return Xd;r4=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.deinterlace=void 0;var e=function(t,n){for(var a=new Array(t.length),i=t.length/n,o=function(d,_){var E=t.slice(_*n,(_+1)*n);a.splice.apply(a,[d*n,n].concat(E))},l=[0,4,2,1],u=[8,8,4,2],c=0,h=0;h<4;h++)for(var p=l[h];p<i;p+=u[h])o(p,c),c++;return a};return Xd.deinterlace=e,Xd}var Kd={},n4;function TC(){if(n4)return Kd;n4=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.lzw=void 0;var e=function(t,n,a){var i=4096,o=-1,l=a,u,c,h,p,w,d,_,T,E,S,I,m,M,j,x,C,g=new Array(a),v=new Array(i),b=new Array(i),O=new Array(i+1);for(m=t,c=1<<m,w=c+1,u=c+2,_=o,p=m+1,h=(1<<p)-1,E=0;E<c;E++)v[E]=0,b[E]=E;var I,T,M,j,C,x;for(I=T=M=j=C=x=0,S=0;S<l;){if(j===0){if(T<p){I+=n[x]<<T,T+=8,x++;continue}if(E=I&h,I>>=p,T-=p,E>u||E==w)break;if(E==c){p=m+1,h=(1<<p)-1,u=c+2,_=o;continue}if(_==o){O[j++]=b[E],_=E,M=E;continue}for(d=E,E==u&&(O[j++]=M,E=_);E>c;)O[j++]=b[E],E=v[E];M=b[E]&255,O[j++]=M,u<i&&(v[u]=_,b[u]=M,u++,(u&h)===0&&u<i&&(p++,h+=u)),_=d}j--,g[C++]=O[j],S++}for(S=C;S<l;S++)g[S]=0;return g};return Kd.lzw=e,Kd}var i4;function RC(){if(i4)return ac;i4=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.decompressFrames=ac.decompressFrame=ac.parseGIF=void 0;var e=i(LC()),r=t_(),t=r_(),n=NC(),a=TC();function i(h){return h&&h.__esModule?h:{default:h}}var o=function(p){var w=new Uint8Array(p);return(0,r.parse)((0,t.buildStream)(w),e.default)};ac.parseGIF=o;var l=function(p){for(var w=p.pixels.length,d=new Uint8ClampedArray(w*4),_=0;_<w;_++){var E=_*4,S=p.pixels[_],m=p.colorTable[S]||[0,0,0];d[E]=m[0],d[E+1]=m[1],d[E+2]=m[2],d[E+3]=S!==p.transparentIndex?255:0}return d},u=function(p,w,d){if(!p.image){console.warn("gif frame does not have associated image.");return}var _=p.image,E=_.descriptor.width*_.descriptor.height,S=(0,a.lzw)(_.data.minCodeSize,_.data.blocks,E);_.descriptor.lct.interlaced&&(S=(0,n.deinterlace)(S,_.descriptor.width));var m={pixels:S,dims:{top:p.image.descriptor.top,left:p.image.descriptor.left,width:p.image.descriptor.width,height:p.image.descriptor.height}};return _.descriptor.lct&&_.descriptor.lct.exists?m.colorTable=_.lct:m.colorTable=w,p.gce&&(m.delay=(p.gce.delay||10)*10,m.disposalType=p.gce.extras.disposal,p.gce.extras.transparentColorGiven&&(m.transparentIndex=p.gce.transparentColorIndex)),d&&(m.patch=l(m)),m};ac.decompressFrame=u;var c=function(p,w){return p.frames.filter(function(d){return d.image}).map(function(d){return u(d,p.gct,w)})};return ac.decompressFrames=c,ac}var a4;function MC(){return a4||(a4=1,function(e){var r=Yd&&Yd.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const t=r(di()),n=zs,a=fl,i=Fu,o=r(Us()),l=RC(),u=Ff(),c=e_(),h=Em(),p=Ap(),w=If(),d=rf();function _(m,g,v){const b=g.getContext("2d"),O=v.getContext("2d");if(!b||!O)return;m.disposalType===2&&b.clearRect(0,0,g.width,g.height),v.width=m.width,v.height=m.height;const I=O.createImageData(m.width,m.height);I.data.set(m.patch),O.putImageData(I,0,0),b.drawImage(v,m.left,m.top)}const E=(0,n.observer)(({element:m})=>{const g=Math.min(30,m.width/4,m.height/4),v=t.default.useRef(null);return t.default.useEffect(()=>{const b=v.current;if(!b)return;const O=new o.default.Animation(I=>{b.rotate(((I==null?void 0:I.timeDiff)||0)/2)},b.getLayer());return O.start(),()=>{O.stop()}},[]),t.default.createElement(i.Group,{x:m.a.x,y:m.a.y,rotation:m.a.rotation,listening:!1,opacity:m.a.opacity,hideInExport:!m.showInExport},t.default.createElement(i.Rect,{width:m.width,height:m.height,fill:"rgba(124, 173, 212, 0.8)"}),t.default.createElement(i.Arc,{ref:v,x:m.width/2,y:m.height/2,fill:"white",outerRadius:Math.abs(g),innerRadius:Math.max(1,g-5),angle:270}))}),S=(0,n.observer)(({element:m})=>{const g=Math.max(10,Math.min(30,m.width/22));return t.default.createElement(i.Group,{x:m.a.x,y:m.a.y,rotation:m.a.rotation,listening:!1,opacity:m.a.opacity,hideInExport:!m.showInExport},t.default.createElement(i.Rect,{width:m.width,height:m.height,fill:"rgba(223, 102, 102, 0.8)"}),t.default.createElement(i.Text,{text:"Cannot load the GIF...",fontSize:g,width:m.width,height:m.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});e.GifElement=(0,n.observer)(({element:m,store:g})=>{var v;const[b,O]=t.default.useState(!1),[I,T]=t.default.useState(!1),M=g.selectedShapes.indexOf(m)>=0&&m.selectable,j=t.default.useRef(null),C=t.default.useRef(),[x,L,A,N]=function(ae){const[se,ce]=t.default.useState([]),[me,Se]=t.default.useState(0),[Oe,Ne]=t.default.useState("loading"),[xe,ve]=t.default.useState({width:0,height:0});return t.default.useEffect(()=>{(async()=>{try{const Xe=await fetch(ae),be=await Xe.arrayBuffer(),Ae=(0,l.parseGIF)(be),Ee=(0,l.decompressFrames)(Ae,!0),Le=Ae.lsd.width,he=Ae.lsd.height;ve({width:Le,height:he});const ke=Ee.map($e=>({patch:new Uint8ClampedArray($e.patch),delay:$e.delay,width:$e.dims.width,height:$e.dims.height,left:$e.dims.left,top:$e.dims.top,disposalType:$e.disposalType})),Re=ke.reduce(($e,vt)=>$e+vt.delay,0);ce(ke),Se(Re),Ne("loaded")}catch(Xe){console.error("Failed to load GIF:",Xe),Ne("failed")}})()},[ae]),[se,me,xe,Oe]}(m.src);(0,h.useImageLoader)(N,m.src,m.id),t.default.useEffect(()=>(C.current=document.createElement("canvas"),()=>{C.current&&o.default.Util.releaseCanvas(C.current)}),[]),t.default.useEffect(()=>{if(N==="loaded"&&C.current&&(C.current.width=A.width,C.current.height=A.height,x.length>0)){const ae=C.current.getContext("2d");if(ae){ae.clearRect(0,0,A.width,A.height);const se=document.createElement("canvas");_(x[0],C.current,se)}}},[A,N,x]),t.default.useEffect(()=>{if(!x.length||!C.current)return;const ae=C.current;ae.width=A.width,ae.height=A.height;const se=document.createElement("canvas"),ce=ae.getContext("2d");ce&&ce.clearRect(0,0,ae.width,ae.height);let me=-1;_(x[0],ae,se),z(),me=0;const Se=Oe=>{const Ne=(xe=>{const ve=xe%L;let Xe=0;for(let be=0;be<x.length;be++)if(Xe+=x[be].delay,Xe>ve)return be;return 0})(Oe);Ne!==me&&(_(x[Ne],ae,se),z(),j.current.getLayer().draw(),me=Ne)};if(g.isPlaying||m.page._exportingOrRendering)return(0,a.autorun)(()=>{Se(g.currentTime-m.page.startTime)});{const Oe=window.setInterval(()=>{Se(g.currentTime||performance.now())},16);return()=>{clearInterval(Oe)}}},[g.isPlaying,x,L,m.page._exportingOrRendering]),t.default.useEffect(()=>{L&&g.history.ignore(()=>{m.set({duration:L})})},[L]);let{cropX:F,cropY:U,cropWidth:W,cropHeight:$}=m;N!=="loaded"&&(F=U=0,W=$=1);const Z={x:A.width*F,y:A.height*U,width:A.width*W,height:A.height*$},V=(v=m.cornerRadius)!==null&&v!==void 0?v:0,[G,z]=(0,c.useCornerRadiusAndCrop)(m,C.current,Z,g._elementsPixelRatio,V,b||m._cropModeEnabled);t.default.useLayoutEffect(()=>{if(!b&&!m._cropModeEnabled&&j.current)return(0,p.applyFilter)(j.current,m),(0,a.autorun)(()=>{(0,p.applyFilter)(j.current,m)},{delay:100})},[C.current,b,W,$,m._cropModeEnabled,A.width,A.height]);const D=N==="loading",K=N==="failed",ne=D||K?0:m.a.opacity;(0,w.useFadeIn)(j,ne);const Q=m.selectable||g.role==="admin",ee=(0,d.isTouchDevice)();return t.default.createElement(t.default.Fragment,null,D&&t.default.createElement(E,{element:m}),K&&t.default.createElement(S,{element:m}),t.default.createElement(i.Image,{ref:j,name:"element",id:m.id,image:G,x:m.a.x,y:m.a.y,width:m.a.width||1,height:m.a.height||1,rotation:m.a.rotation,opacity:ne,shadowEnabled:m.shadowEnabled,shadowBlur:m.shadowBlur,shadowOffsetX:m.shadowOffsetX,shadowOffsetY:m.shadowOffsetY,shadowColor:m.shadowColor,shadowOpacity:m.shadowOpacity,customCrop:Z,listening:Q,draggable:ee?m.draggable&&M:m.draggable,preventDefault:!ee||M,hideInExport:!m.showInExport,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),onDragMove:ae=>{m.set({x:ae.target.x(),y:ae.target.y()})},onDragEnd:ae=>{m.set({x:ae.target.x(),y:ae.target.y()})},onTransformStart:()=>O(!0),onTransform:ae=>{const se=ae.currentTarget,ce=Math.abs(se.scaleX()-1)<1e-7?1:se.scaleX(),me=Math.abs(se.scaleY()-1)<1e-7?1:se.scaleY();se.scaleX(1),se.scaleY(1),m.set({x:se.x(),y:se.y(),width:se.width()*ce,height:se.height()*me,rotation:se.rotation()})},onTransformEnd:()=>O(!1)}),t.default.createElement(i.Rect,{x:m.a.x,y:m.a.y,width:Math.max(m.a.width-m.borderSize,0),height:Math.max(m.a.height-m.borderSize,0),opacity:ne,offsetX:-m.borderSize/2,offsetY:-m.borderSize/2,stroke:m.borderColor,strokeWidth:m.borderSize,listening:!1,visible:!!m.borderSize,rotation:m.rotation,cornerRadius:Math.max(0,V-m.borderSize),hideInExport:!m.showInExport}),(I||M)&&t.default.createElement(u.Highlighter,{element:m}))})}(Yd)),Yd}var o4;function IC(){return o4||(o4=1,function(e){var r=Fd&&Fd.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=function(S,m){_[S]=m};const t=r(di()),n=zs,a=D8(),i=Em(),o=AC(),l=CC(),u=e_(),c=kC(),h=MC(),p=Fu,w=tf(),d=(0,n.observer)(S=>{const{element:m,store:g}=S,{children:v}=m,b=m.selectable||g.role==="admin";return t.default.createElement(p.Group,{opacity:m.opacity,listening:b,hideInExport:!m.showInExport},v.map(O=>t.default.createElement(E,Object.assign({},S,{key:O.id,store:g,element:O}))))}),_={text:a.TextElement,image:i.ImageElement,svg:i.ImageElement,line:l.LineElement,video:u.VideoElement,figure:c.FigureElement,group:d,gif:h.GifElement},E=(0,n.observer)(S=>{let m=_[S.element.type];return S.element.type==="text"&&w.flags.htmlRenderEnabled&&(m=o.HTMLElement),S.element.visible?m?t.default.createElement(m,Object.assign({},S)):(console.error("Can not find component for "+S.element.type),null):null});e.default=E}(Fd)),Fd}var Cv={},s4;function jC(){return s4||(s4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=function(r,t,n="scale"){const a=t.width/t.height;let i,o;a>=r.width/r.height?(i=r.width,o=r.width/a):(i=r.height*a,o=r.height);let l=0,u=0;return n==="left-top"?(l=0,u=0):n==="left-middle"?(l=0,u=(r.height-o)/2):n==="left-bottom"?(l=0,u=r.height-o):n==="center-top"?(l=(r.width-i)/2,u=0):n==="center-middle"?(l=(r.width-i)/2,u=(r.height-o)/2):n==="center-bottom"?(l=(r.width-i)/2,u=r.height-o):n==="right-top"?(l=r.width-i,u=0):n==="right-middle"?(l=r.width-i,u=(r.height-o)/2):n==="right-bottom"?(l=r.width-i,u=r.height-o):n==="scale"?(l=0,u=0,i=r.width,o=r.height):console.error(new Error("Unknown clip position property - "+n)),{cropX:l,cropY:u,cropWidth:i,cropHeight:o}}}(Cv)),Cv}var sc={},kv={},l4;function FC(){return l4||(l4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setAPI=e.iconscoutDownload=e.iconscoutList=e.svgapiDownload=e.svgapiList=e.unsplashDownload=e.unsplashList=e.textTemplateList=e.templateList=e.removeBackground=e.polotnoShapesList=e.getGoogleFontImage=e.getGoogleFontsListAPI=e.URLS=e.getAPI=e.API=e.URL=void 0;const r=Lm();e.URL="https://api.polotno.com",e.API=`${e.URL}/api`,e.getAPI=()=>e.URL+"/api";const t={},n=(i,o)=>{t[i]||(t[i]=!0,console.error(o))},a=`API for iconscout is provided as a demonstration.
|
|
300
|
-
For production usage you have to use your own API endpoint.
|
|
301
|
-
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
302
|
-
https://polotno.com/docs/server-api`;e.URLS={unsplashList:({query:i,page:o=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${i}&per_page=20&page=${o}&KEY=${(0,r.getKey)()}`,unsplashDownload:i=>`${(0,e.getAPI)()}/download-unsplash?id=${i}&KEY=${(0,r.getKey)()}`,svgapiList:({query:i,page:o=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${i}&page=${o}&per_page=20&KEY=${(0,r.getKey)()}`,svgapiDownload:i=>`${(0,e.getAPI)()}/download-svgapi?path=${i}&KEY=${(0,r.getKey)()}`,iconscoutList:({query:i,page:o=1})=>(n("iconscout",a),`${(0,e.getAPI)()}/get-iconscout?query=${i}&page=${o}&KEY=${(0,r.getKey)()}`),iconscoutDownload:i=>(n("iconscout",a),`${(0,e.getAPI)()}/download-iconscout?uuid=${i}&KEY=${(0,r.getKey)()}`),nounProjectList:({query:i,page:o=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${i}&page=${o}&KEY=${(0,r.getKey)()}`,nounProjectDownload:i=>`${(0,e.getAPI)()}/download-nounproject?id=${i}&KEY=${(0,r.getKey)()}`,templateList:({query:i,page:o=1,sizeQuery:l})=>`${(0,e.getAPI)()}/get-templates?${l}&query=${i}&per_page=30&page=${o}&KEY=${(0,r.getKey)()}`,googleFontsList:()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,r.getKey)()}`,googleFontImage:i=>{return`${e.URL}/google-fonts-previews/black/${o=i,o.replace(new RegExp(" ","g"),"-")}.png`;var o},textTemplateList:()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,r.getKey)()}`,removeBackground:()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,r.getKey)()}`,aiText:()=>`${(0,e.getAPI)()}/ai/text?KEY=${(0,r.getKey)()}`},e.getGoogleFontsListAPI=()=>e.URLS.googleFontsList(),e.getGoogleFontImage=i=>e.URLS.googleFontImage(i),e.polotnoShapesList=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,r.getKey)()}`,e.removeBackground=()=>e.URLS.removeBackground(),e.templateList=i=>e.URLS.templateList(i),e.textTemplateList=()=>e.URLS.textTemplateList(),e.unsplashList=i=>e.URLS.unsplashList(i),e.unsplashDownload=i=>e.URLS.unsplashDownload(i),e.svgapiList=i=>e.URLS.svgapiList(i),e.svgapiDownload=i=>e.URLS.svgapiDownload(i),e.iconscoutList=i=>e.URLS.iconscoutList(i),e.iconscoutDownload=i=>e.URLS.iconscoutDownload(i),e.setAPI=(i,o)=>{e.URLS[i]=o}}(kv)),kv}var u4;function Lm(){return u4||(u4=1,function(e){var r,t=sc&&sc.__createBinding||(Object.create?function(M,j,C,x){x===void 0&&(x=C);var L=Object.getOwnPropertyDescriptor(j,C);L&&!("get"in L?!j.__esModule:L.writable||L.configurable)||(L={enumerable:!0,get:function(){return j[C]}}),Object.defineProperty(M,x,L)}:function(M,j,C,x){x===void 0&&(x=C),M[x]=j[C]}),n=sc&&sc.__setModuleDefault||(Object.create?function(M,j){Object.defineProperty(M,"default",{enumerable:!0,value:j})}:function(M,j){M.default=j}),a=sc&&sc.__importStar||(r=function(M){return r=Object.getOwnPropertyNames||function(j){var C=[];for(var x in j)Object.prototype.hasOwnProperty.call(j,x)&&(C[C.length]=x);return C},r(M)},function(M){if(M&&M.__esModule)return M;var j={};if(M!=null)for(var C=r(M),x=0;x<C.length;x++)C[x]!=="default"&&t(j,M,C[x]);return n(j,M),j});Object.defineProperty(e,"__esModule",{value:!0}),e.__=e.getKey=e.isCreditVisible=e.___=void 0,e.isKeyPaid=T,e.validateKey=async function(M,j){p=M,await T(M)&&!j||h()};const i=a(fl),o=FC(),l=tf(),u=i.observable({value:!1}),c=i.observable({value:"v1"});e.___=()=>c.value,e.isCreditVisible=()=>u.value;const h=i.action(()=>{u.value=!0});let p="";e.getKey=()=>p||"";const w=5,d=3e3,_="Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet",E="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",S="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",m="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let g=window.location.origin;const v=navigator.userAgent.indexOf("Headless")>-1,b=navigator.userAgent.indexOf("Electron")>-1;g==="file://"&&v&&(g="headless"),g==="file://"&&b&&(g="electron");const O=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${g}" here: https://polotno.com/cabinet`;let I=fetch;async function T(M){for(let j=0;j<w;j++)try{const C=await I((0,o.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:M,site:location.host,skdVersion:"2.21.11"})});if(c.value=C.headers.get("x-api-version"),!M)return console.warn(_),!1;if(C.status!==200){await new Promise(L=>setTimeout(L,d));continue}const x=await C.json();return x.is_valid||console.warn(E),x.is_paid||console.log(m,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),x.is_domain_valid||console.log(O,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,l.useRemoveBackground)(x.remove_background_enabled),x.is_paid||!1}catch{await new Promise(x=>setTimeout(x,d))}return console.error(S),!0}e.__=M=>{I=M}}(sc)),sc}var Lv={},c4;function Nm(){return c4||(c4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0,e.pxToUnit=({px:r,unit:t="px",dpi:n})=>{switch(t){case"pt":default:return r;case"mm":return r/(n/25.4);case"cm":return r/(n/2.54);case"in":return r/n}},e.pxToUnitRounded=({px:r,precious:t=2,dpi:n=72,unit:a="px"})=>parseFloat((0,e.pxToUnit)({px:r,dpi:n,unit:a}).toFixed(t)),e.unitToPx=({unitVal:r,dpi:t,unit:n})=>r/(0,e.pxToUnit)({px:1,unit:n,dpi:t}),e.pxToUnitString=r=>{const t=parseFloat((0,e.pxToUnit)(r).toFixed(1));switch(r.unit){case"pt":return`${Math.round(t)}pt`;case"mm":return`${t}mm`;case"cm":return`${t}cm`;case"in":return`${t}in`;default:return`${Math.round(t)}px`}}}(Lv)),Lv}var f4;function DC(){return f4||(f4=1,function(e){var r=yf&&yf.__rest||function(D,K){var ne={};for(var Q in D)Object.prototype.hasOwnProperty.call(D,Q)&&K.indexOf(Q)<0&&(ne[Q]=D[Q]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(Q=Object.getOwnPropertySymbols(D);ee<Q.length;ee++)K.indexOf(Q[ee])<0&&Object.prototype.propertyIsEnumerable.call(D,Q[ee])&&(ne[Q[ee]]=D[Q[ee]])}return ne},t=yf&&yf.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.useContextMenu=e.setTransformerStyle=void 0,e.registerTransformerAttrs=function(D,K){C[D]=C[D]||K,Object.assign(C[D],K)};const n=t(di()),a=zs,i=fl,o=Fu,l=t(r0()),u=t(Us()),c=t(IC()),h=J8(),p=Em(),w=jC(),d=Lm(),_=Fh(),E=Nm(),S=tf(),m=rf(),g=Pp(),v=hm(),b=Mh,O=u.default.DD._drag;window.removeEventListener("mousemove",O),u.default.DD._drag=function(D){(0,i.runInAction)(()=>{O.call(this,D)})},window.addEventListener("mousemove",u.default.DD._drag);const I=new u.default.Group,T=20;I.add(new u.default.Rect({width:T,height:T,fill:"white"})),I.add(new u.default.Path({scaleX:T/24,scaleY:T/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));const M=I.toCanvas({pixelRatio:2,width:T,height:T}),j={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:D=>{D.hasName("rotater")&&D.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:M,fillPatternScaleX:20/T/2,fillPatternScaleY:20/T/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}};e.setTransformerStyle=D=>{Object.assign(j,D)};const C={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},gif:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},x=D=>n.default.createElement(o.Rect,Object.assign({},D,{preventDefault:!1})),L=D=>{var{url:K}=D,ne=r(D,["url"]);const[Q,ee]=(0,l.default)(K,"anonymous"),ae=Q?(0,w.getCrop)(Q,{width:ne.width,height:ne.height},"center-middle"):{};return(0,p.useImageLoader)(ee,K,"page background"),n.default.createElement(o.Image,Object.assign({image:Q},ne,ae))},A=D=>{const K=(0,g.useColor)({fill:D.fill,a:{width:D.width,height:D.height}});return n.default.createElement(o.Rect,Object.assign({},D,K))},N=D=>{const{background:K,scale:ne,borderColor:Q}=D,ee=r(D,["background","scale","borderColor"]),ae=n.default.useMemo(()=>!!u.default.Util.colorToRGBA(K)||(0,v.isGradient)(K),[K]),se=n.default.useMemo(()=>{const ce=document.createElement("canvas"),me=30;ce.width=60,ce.height=60;const Se=ce.getContext("2d");return Se&&(Se.fillStyle="black",Se.fillRect(me,0,me,me),Se.fillRect(0,me,me,me)),ce},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Rect,Object.assign({fillPatternImage:se},ee,{opacity:.1,hideInExport:!0})),ae?n.default.createElement(A,Object.assign({fill:K},ee)):n.default.createElement(L,Object.assign({url:K},ee)))},F=(0,a.observer)(({selection:D})=>D.visible?n.default.createElement(o.Rect,{name:"selection",x:Math.min(D.x1,D.x2),y:Math.min(D.y1,D.y2),width:Math.abs(D.x1-D.x2),height:Math.abs(D.y1-D.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),U=(0,a.observer)(({x:D,y:K,width:ne,height:Q,rotation:ee,anchor:ae,store:se})=>{const ce=(0,_.getClientRect)({x:D,y:K,width:ne,height:Q,rotation:u.default.Util.radToDeg(ee)});if(ae===void 0)return null;const me=(Q/2+70)*Math.cos(ee-Math.PI/2),Se=(Q/2+70)*Math.sin(ee-Math.PI/2),Oe=(0,E.pxToUnitRounded)({unit:se.unit,dpi:se.dpi,px:ne/se.scale,precious:se.unit==="px"?0:1})+" x "+(0,E.pxToUnitRounded)({unit:se.unit,dpi:se.dpi,px:Q/se.scale,precious:se.unit==="px"?0:1})+(se.unit==="px"?"":" "+se.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Label,{x:(ce.minX+ce.maxX)/2+me,y:(ce.minY+ce.maxY)/2+Se,offsetX:14,offsetY:14,visible:ae==="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(u.default.Util.radToDeg(ee)).toString()+"°"})),n.default.createElement(o.Label,{x:(ce.minX+ce.maxX)/2,y:ce.maxY+20,visible:ae!=="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Oe})))}),W=(0,a.observer)(({elements:D,store:K})=>{const ne=D.filter(ee=>ee.alwaysOnTop),Q=D.filter(ee=>!ee.alwaysOnTop).concat(ne);return n.default.createElement(n.default.Fragment,null,Q.map(ee=>n.default.createElement(c.default,{key:ee.id,store:K,element:ee,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});e.useContextMenu=({store:D})=>{const[K,ne]=n.default.useState(!1),[Q,ee]=n.default.useState({x:0,y:0});return{open:n.default.useCallback(se=>{ne(!0),ee(se)},[]),close:n.default.useCallback(()=>{ne(!1)},[]),props:{isOpen:K,offset:Q,setIsOpen:ne}}};let $=null;e.registerNextDomDrop=D=>{$=D};const Z=atob("UG9sb3RubyBmcmVlIGxpY2Vuc2UgbGltaXRhdGlvbiBleGNlZWRlZCAtIFBsZWFzZSB1cGdyYWRlIHlvdXIgYWNjb3VudC4="),V=atob("cmVk"),G=atob("djAuOS4y"),z=D=>n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Label,{fill:V,height:200},n.default.createElement(o.Tag,{fill:V}),n.default.createElement(o.Text,Object.assign({},D,{fill:"white",text:Z,height:void 0,padding:10,fontSize:20}))));e.default=(0,a.observer)(({store:D,page:K,width:ne,height:Q,pageControlsEnabled:ee,backColor:ae,pageBorderColor:se,activePageBorderColor:ce,components:me,bleedColor:Se,altCloneEnabled:Oe,viewportSize:Ne})=>{const xe=D.bleedVisible?K.bleed:0,ve=K.computedWidth+2*xe,Xe=K.computedHeight+2*xe,be=(ne-ve*D.scale)/2,Ae=(Q-Xe*D.scale)/2,Ee=n.default.useRef(null),Le=n.default.useRef(null),he=n.default.useRef(null),ke=ee==null||ee,[Re,$e]=n.default.useState(null),[vt,wt]=n.default.useState({}),at=(0,e.useContextMenu)({store:D}),mt=D.selectedElements.find(it=>it._cropModeEnabled),Je=D.selectedShapes.filter(it=>!it.resizable).length>0,nt=D.selectedShapes.filter(it=>!it.draggable).length>0,qt=D.selectedElements.filter(it=>!it.visible).length>0;n.default.useLayoutEffect(()=>{var it,Bt,Ue;if(!Ee.current)return;const De=Ee.current.getStage(),bt=D.selectedShapes.map(xt=>xt._cropModeEnabled?null:De.findOne("#"+xt.id)).filter(xt=>xt),ze=D.selectedElements.length===1&&((it=D.selectedElements[0])===null||it===void 0?void 0:it.type)||"many";C[ze]?(Ee.current.setAttrs(Object.assign(Object.assign({},j),C[ze])),ze!=="svg"&&ze!=="image"&&ze!=="gif"||D.selectedElements[0].keepRatio||Ee.current.setAttrs({enabledAnchors:j.enabledAnchors}),ze==="text"&&S.flags.textVerticalResizeEnabled&&Ee.current.setAttrs({enabledAnchors:(Bt=C.text.enabledAnchors)===null||Bt===void 0?void 0:Bt.concat(["bottom-center"])})):Ee.current.setAttrs(j),Je&&Ee.current.enabledAnchors([]),nt&&Ee.current.rotateEnabled(!1),bt.find(xt=>xt==null?void 0:xt.isDragging())&&bt.forEach(xt=>{xt.isDragging()||xt==null||xt.startDrag()}),Ee.current.nodes(bt),(Ue=Ee.current.getLayer())===null||Ue===void 0||Ue.batchDraw()},[D.selectedShapes,mt,Je,qt,nt]);const At=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),Ht=n.default.useRef(!1),zt=(0,m.isTouchDevice)(),Ie=(0,i.action)(it=>{var Bt,Ue,De,bt;if(zt)return;Ht.current=!1;const ze=it.target.findAncestor(".elements-container"),xt=it.target.findAncestor("Transformer"),kt=it.target.findAncestor(".page-abs-container");if(ze||xt||kt)return;const Ft=(Bt=it.target.getStage())===null||Bt===void 0?void 0:Bt.getPointerPosition();Ft.x-=(Ue=it.target.getStage())===null||Ue===void 0?void 0:Ue.x(),Ft.y-=(De=it.target.getStage())===null||De===void 0?void 0:De.y(),Ft&&(At.visible=!0,At.x1=Ft.x,At.y1=Ft.y,At.x2=Ft.x,At.y2=Ft.y,((bt=it.target.getStage())===null||bt===void 0?void 0:bt.getPointersPositions().length)>=2&&(At.visible=!1))});(({stageRef:it,containerRef:Bt,viewportSize:Ue})=>{n.default.useEffect(()=>{var De;const bt=(De=Bt.current)===null||De===void 0?void 0:De.closest(".polotno-workspace-inner");function ze(){var xt;if(!it.current)return;const kt=(xt=Bt.current)===null||xt===void 0?void 0:xt.getBoundingClientRect(),Ft=bt==null?void 0:bt.getBoundingClientRect(),Ut=Math.max(0,Ft.left-kt.left-100),Yt=Math.max(0,Ft.top-kt.top-100);it.current.position({x:-Ut,y:-Yt}),it.current.container().style.transform=`translate(${Ut}px, ${Yt}px)`}return ze(),bt.addEventListener("scroll",ze),()=>{bt.removeEventListener("scroll",ze)}},[Ue.width,Ue.height])})({stageRef:Le,containerRef:he,viewportSize:Ne}),n.default.useEffect(()=>{const it=(0,i.action)(Ue=>{var De,bt,ze,xt;if(!At.visible)return;(De=Le.current)===null||De===void 0||De.setPointersPositions(Ue);let kt=(bt=Le.current)===null||bt===void 0?void 0:bt.getPointerPosition();kt?(kt.x-=(ze=Le.current)===null||ze===void 0?void 0:ze.x(),kt.y-=(xt=Le.current)===null||xt===void 0?void 0:xt.y()):kt={x:At.x2,y:At.y2},At.x2=kt.x,At.y2=kt.y}),Bt=(0,i.action)(()=>{if(!At.visible||!Le.current)return;const Ue=Le.current.findOne(".selection"),De=Ue?Ue.getClientRect():{width:0,height:0,x:0,y:0};if(De.width&&De.height){const bt=[];Le.current.find(".element").forEach(xt=>{const kt=xt.getClientRect(),Ft=D.getElementById(xt.id()),Ut=Ft==null?void 0:Ft.draggable,Yt=Ft==null?void 0:Ft.selectable;u.default.Util.haveIntersection(De,kt)&&Ut&&Yt&&bt.push(Ft.top.id)});const ze=[...new Set(bt)];D.selectElements(ze)}At.visible=!1,Ht.current=!0});return window.addEventListener("mousemove",it),window.addEventListener("touchmove",it),window.addEventListener("mouseup",Bt),window.addEventListener("touchend",Bt),()=>{window.removeEventListener("mousemove",it),window.removeEventListener("touchmove",it),window.removeEventListener("mouseup",Bt),window.removeEventListener("touchend",Bt)}},[]);const He=n.default.useRef(!1);n.default.useEffect(()=>{var it;let Bt;const Ue=(it=he.current)===null||it===void 0?void 0:it.closest(".polotno-workspace-inner"),De=()=>{He.current=!0,clearTimeout(Bt),Bt=setTimeout(()=>{He.current=!1},300)};return Ue.addEventListener("scroll",De),()=>{clearTimeout(Bt),Ue.removeEventListener("scroll",De)}},[]);const Nt=it=>{if(D.activePage!==K&&K.select(),He.current||Ht.current)return;const Bt=it.evt.ctrlKey||it.evt.metaKey||it.evt.shiftKey,Ue=it.target.findAncestor(".elements-container"),De=it.target.findAncestor(".page-abs-container"),bt=it.target.findAncestor("Transformer");if(!(Bt||Ue||bt||De))return void D.selectElements([]);const ze=it.target.findAncestor(".element",!0),xt=D.getElementById(ze==null?void 0:ze.id()),kt=xt==null?void 0:xt.top,Ft=kt==null?void 0:kt.id,Ut=D.selectedElementsIds.indexOf(Ft)>=0;Ft&&Bt&&!Ut?D.selectElements(D.selectedElementsIds.concat([Ft])):Ft&&Bt&&Ut?D.selectElements(D.selectedElementsIds.filter(Yt=>Yt!==Ft)):!Ft||Bt||Ut||D.selectElements([Ft])};(0,h.useSnap)(Ee,D);const ht=D.activePage===K,gt=me==null?void 0:me.PageControls,_t=me==null?void 0:me.Tooltip,rr=me==null?void 0:me.ContextMenu,Wt=1/D.scale,St=0/D.scale;return n.default.createElement("div",{ref:he,onDragOver:it=>it.preventDefault(),onDrop:it=>{if(it.preventDefault(),!Le.current)return;Le.current.setPointersPositions(it);const Bt=Le.current.findOne(".elements-container").getRelativePointerPosition(),Ue=Le.current.getPointerPosition(),De=Le.current.getAllIntersections(Ue).map(xt=>xt.findAncestor(".element",!0)).filter(Boolean),bt=[...new Set(De.reverse())].map(xt=>D.getElementById(xt.id())),ze=bt[0];$&&($(Bt,ze,{elements:bt,page:K}),$=null)},style:{position:"relative",width:ne+"px",height:Q+"px",overflow:"hidden"},className:"polotno-page-container"+(ht?" active-page":"")},n.default.createElement(o.Stage,{ref:Le,width:Math.min(ne,Ne.width+200),height:Math.min(Ne.height+200,Q),onClick:Nt,onTap:Nt,onContextMenu:it=>{it.evt.preventDefault();const Bt=it.target.findAncestor(".element",!0),Ue=D.getElementById(Bt==null?void 0:Bt.id()),De=Ue==null?void 0:Ue.top,bt=De==null?void 0:De.id;bt?D.selectedElementsIds.indexOf(bt)>=0||D.selectElements([bt]):D.selectElements([]),at.open({x:it.evt.clientX,y:it.evt.clientY})},onMouseDown:Ie,onMouseMove:it=>{if(!it.evt.altKey&&Re)return void $e(null);if(!it.evt.altKey)return;const Bt=it.target.findAncestor(".element",!0),Ue=Bt==null?void 0:Bt.id();if(!D.selectedElements[0]||D.selectedElementsIds.includes(Ue))return;const De=(0,_.getTotalClientRect)(D.selectedShapes),bt=Ue?D.getElementById(Ue):{x:0,y:0,width:K.computedWidth,height:K.computedHeight,rotation:0},ze=(0,_.getClientRect)(bt),xt=[];De.minX>ze.maxX&&xt.push({distance:De.minX-ze.maxX,box1:De,box2:ze,points:[{x:De.minX,y:De.minY+De.height/2},{x:ze.maxX,y:De.minY+De.height/2},{x:ze.maxX,y:ze.minY+ze.height/2}]}),De.maxX<ze.minX&&xt.push({distance:ze.minX-De.maxX,box1:De,box2:ze,points:[{x:De.maxX,y:De.minY+De.height/2},{x:ze.minX,y:De.minY+De.height/2},{x:ze.minX,y:ze.minY+ze.height/2}]}),De.minY>ze.maxY&&xt.push({box1:De,box2:ze,distance:De.minY-ze.maxY,points:[{x:De.minX+De.width/2,y:De.minY},{x:De.minX+De.width/2,y:ze.maxY},{x:ze.minX+ze.width/2,y:ze.maxY}]}),De.maxY<ze.minY&&xt.push({box1:De,box2:ze,distance:ze.minY-De.maxY,points:[{x:De.minX+De.width/2,y:De.maxY},{x:De.minX+De.width/2,y:ze.minY},{x:ze.minX+ze.width/2,y:ze.minY}]}),De.minX>=ze.minX&&De.maxX<=ze.maxX&&De.minY>=ze.minY&&De.maxY<=ze.maxY&&(xt.push({distance:De.minX-ze.minX,box1:De,box2:ze,points:[{x:De.minX,y:De.minY+De.height/2},{x:ze.minX,y:De.minY+De.height/2},{x:ze.minX,y:ze.minY+ze.height/2}]}),xt.push({distance:ze.maxX-De.maxX,box1:De,box2:ze,points:[{x:De.maxX,y:De.minY+De.height/2},{x:ze.maxX,y:De.minY+De.height/2},{x:ze.maxX,y:ze.minY+ze.height/2}]}),xt.push({box1:De,box2:ze,distance:De.minY-ze.minY,points:[{x:De.minX+De.width/2,y:De.minY},{x:De.minX+De.width/2,y:ze.minY},{x:ze.minX+ze.width/2,y:ze.minY}]}),xt.push({box1:De,box2:ze,distance:ze.maxY-De.maxY,points:[{x:De.minX+De.width/2,y:De.maxY},{x:De.minX+De.width/2,y:ze.maxY},{x:ze.minX+ze.width/2,y:ze.maxY}]})),JSON.stringify(Re)!==JSON.stringify(xt)&&$e(xt)},onDragStart:it=>{var Bt;const Ue=it.target.findAncestor(".element",!0);if(Ue){const De=D.getElementById(Ue==null?void 0:Ue.id()),bt=De==null?void 0:De.top,ze=bt==null?void 0:bt.id;!(D.selectedElementsIds.indexOf(ze)>=0)&&ze&&(D.selectElements([ze]),it.target.stopDrag(),it.target.startDrag(it),(Bt=Ee.current)===null||Bt===void 0||Bt.startDrag(it))}Re&&$e(null)},pageId:K.id,style:{position:"absolute",overflow:"hidden",top:0,left:0}},n.default.createElement(o.Layer,null,n.default.createElement(x,{width:ne,height:Q,fill:ae}),n.default.createElement(o.Group,{x:be,y:Ae,scaleX:D.scale,scaleY:D.scale,name:"page-container"},n.default.createElement(o.Group,{name:"page-container-2"},n.default.createElement(o.Group,{name:"page-background-group",x:xe,y:xe},n.default.createElement(N,{x:-K.bleed,y:-K.bleed,width:K.computedWidth+2*K.bleed,height:K.computedHeight+2*K.bleed,background:K.background,name:"page-background",preventDefault:!1,scale:D.scale})),n.default.createElement(o.Group,{x:xe,y:xe,name:"elements-container",listening:!D.isPlaying},n.default.createElement(o.Rect,{name:"elements-area",width:K.computedWidth,height:K.computedHeight,listening:!1}),n.default.createElement(W,{elements:K.children,store:D})),n.default.createElement(o.Rect,{stroke:Se,name:"bleed",strokeWidth:K.bleed,x:K.bleed/2,y:K.bleed/2,width:K.computedWidth+K.bleed,height:K.computedHeight+K.bleed,listening:!1,visible:K.bleed>0&&D.bleedVisible,hideInExport:!0}),(0,d.___)()===G&&n.default.createElement(z,{name:"hit-detection",x:-Wt/2-St,y:-Wt/2-St,width:ve+Wt+2*St,height:Xe+Wt+2*St}))),n.default.createElement(o.Line,{name:"workspace-background",points:[0,0,ne,0,ne,Q,0,Q,0,0,be,Ae,be,Q-Ae,ne-be,Q-Ae,ne-be,Ae,be,Ae],listening:!1,closed:!0,fill:ae}),n.default.createElement(o.Group,{x:be,y:Ae,scaleX:D.scale,scaleY:D.scale},n.default.createElement(o.Rect,{name:"page-highlight",hideInExport:!0,x:-Wt/2-St,y:-Wt/2-St,width:ve+Wt+2*St,height:Xe+Wt+2*St,stroke:ht&&D.pages.length>1?ce:se,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(o.Group,{x:be+xe*D.scale,y:Ae+xe*D.scale,scaleX:D.scale,scaleY:D.scale,name:"page-abs-container"},n.default.createElement(o.Transformer,{ref:Ee,onDragStart:it=>{var Bt;!((Bt=it.evt)===null||Bt===void 0)&&Bt.altKey&&Oe&&D.selectedElements.forEach(Ue=>{const De=Ue.clone({},{skipSelect:!0}),bt=K.children.indexOf(Ue);K.setElementZIndex(De.id,bt)}),D.history.startTransaction()},onDragEnd:()=>{D.history.endTransaction()},onTransformStart:()=>{D.history.startTransaction()},boundBoxFunc:(it,Bt)=>{const Ue=Math.abs(Bt.width)<1||Math.abs(Bt.height)<1,De=Math.abs(it.width)<1||Math.abs(it.height)<1;return Ue&&!De?it:Bt},onTransform:it=>{var Bt,Ue;const De=Ee.current.nodes(),bt=De[De.length-1];if(it.target!==bt)return;const ze=(Bt=Ee.current)===null||Bt===void 0?void 0:Bt.__getNodeRect(),xt=(Ue=Ee.current)===null||Ue===void 0?void 0:Ue.getActiveAnchor();wt({anchor:xt,x:ze.x,y:ze.y,rotation:ze.rotation,width:ze.width,height:ze.height})},onTransformEnd:it=>{wt({}),D.history.endTransaction()},visible:!D.isPlaying}),Re&&Re.map(({points:it,distance:Bt,box1:Ue,box2:De},bt)=>n.default.createElement(o.Group,{name:"distances-container",hideInExport:!0,key:bt,listening:!1},n.default.createElement(o.Rect,Object.assign({},Ue,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Rect,Object.assign({},De,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Line,{points:[it[0].x,it[0].y,it[1].x,it[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Line,{points:[it[1].x,it[1].y,it[2].x,it[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Label,{x:(it[0].x+it[1].x)/2,y:(it[0].y+it[1].y)/2,offsetY:-10,scaleX:1/D.scale,scaleY:1/D.scale},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,E.pxToUnitString)({unit:D.unit,dpi:D.dpi,px:Bt})})))),K._rendering&&n.default.createElement(o.Group,null,n.default.createElement(o.Rect,{width:ve,height:Xe,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(o.Text,{text:"Rendering...",fontSize:60,width:ve,height:Xe,align:"center",verticalAlign:"middle"})),_t&&n.default.createElement(_t,{components:me,store:D,page:K,stageRef:Le}),rr&&n.default.createElement(b.Html,null,n.default.createElement(rr,Object.assign({components:me,store:D},at.props)))),n.default.createElement(U,Object.assign({},vt,{store:D})),n.default.createElement(F,{selection:At}),(0,d.isCreditVisible)()&&n.default.createElement(o.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:ne-170,y:Q-18,onMouseEnter:it=>{it.target.getStage().container().style.cursor="pointer"},onMouseLeave:it=>{it.target.getStage().container().style.cursor=""},onTouchStart:it=>{it.cancelBubble=!0},onMouseDown:it=>{it.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),n.default.createElement(o.Group,{name:"line-guides"}))),ke&>&&n.default.createElement(gt,{store:D,page:K,xPadding:be,yPadding:Ae}))})}(yf)),yf}var Zd={},h4;function BC(){return h4||(h4=1,function(e){var r=Zd&&Zd.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=function(){return t.default.createElement("div",null,t.default.createElement("h1",null,"Top rules"))};const t=r(di()),n=Fh(),a=Nm(),i=zs,o=Q8(),l=(0,o.styled)("div",t.default.forwardRef)`
|
|
303
|
-
position: absolute;
|
|
304
|
-
top: 0;
|
|
305
|
-
left: 0;
|
|
306
|
-
pointer-events: none;
|
|
307
|
-
`,u=(0,o.styled)("div",t.default.forwardRef)`
|
|
308
|
-
height: 14px;
|
|
309
|
-
position: sticky;
|
|
310
|
-
font-size: 8px;
|
|
311
|
-
line-height: 14px;
|
|
312
|
-
top: 0;
|
|
313
|
-
left: 0;
|
|
314
|
-
color: grey;
|
|
315
|
-
border-bottom: 1px solid grey;
|
|
316
|
-
background-color: #e8e8e8;
|
|
317
|
-
overflow: hidden;
|
|
318
|
-
`,c=(0,o.styled)("div",t.default.forwardRef)`
|
|
319
|
-
left: 0;
|
|
320
|
-
width: 14px;
|
|
321
|
-
position: sticky;
|
|
322
|
-
font-size: 8px;
|
|
323
|
-
line-height: 14px;
|
|
324
|
-
color: grey;
|
|
325
|
-
border-right: 1px solid grey;
|
|
326
|
-
background-color: #e8e8e8;
|
|
327
|
-
overflow: hidden;
|
|
328
|
-
`,h=(0,o.styled)("div",t.default.forwardRef)`
|
|
329
|
-
position: absolute;
|
|
330
|
-
border-left: 1px solid grey;
|
|
331
|
-
padding-left: 2px;
|
|
332
|
-
`,p=(0,o.styled)("div",t.default.forwardRef)`
|
|
333
|
-
position: absolute;
|
|
334
|
-
left: 14px;
|
|
335
|
-
border-left: 1px solid grey;
|
|
336
|
-
padding-left: 2px;
|
|
337
|
-
transform: rotate(90deg);
|
|
338
|
-
transform-origin: left top;
|
|
339
|
-
overflow: hidden;
|
|
340
|
-
`,w=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4];e.TopRules=(0,i.observer)(({store:d,width:_,height:E})=>{const S=t.default.useRef(null);if(!d.activePage)return null;const m=d.activePage,g=(d.bleedVisible&&m.bleed,m.computedWidth*d.scale),v=m.computedHeight*d.scale,b=(_-g)/2,O=(I=x=>(0,a.unitToPx)({unitVal:x,dpi:d.dpi,unit:d.unit})*d.scale,w.find(x=>I(x)>30)||1e4);var I;const T=(0,a.unitToPx)({unitVal:O,dpi:d.dpi,unit:d.unit})*d.scale,M=Math.round(g/T)+1,j=Math.round(v/T)+1,C=(0,n.getTotalClientRect)(d.selectedShapes);return t.default.createElement(l,{ref:S,className:"polotno-rulers"},t.default.createElement(u,{style:{width:_+"px"},className:"polotno-x-ruler"},[...Array(M)].map((x,L)=>t.default.createElement(h,{key:L,style:{left:b+L*T+"px",width:T+"px"}},d.unit==="px"||O>=1?Math.round(O*L):(O*L).toFixed(1))),!!d.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:b+C.x*d.scale+"px",height:"14px",width:C.width*d.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),d.pages.map((x,L)=>{var A;const N=x.computedHeight*d.scale,F=(E-N)/2;return t.default.createElement(c,{key:x.id,style:{height:E+"px"},className:"polotno-y-ruler"},[...Array(j)].map((U,W)=>t.default.createElement(p,{key:W,style:{top:F+W*T-14+"px",width:T+"px"}},d.unit==="px"||O>=1?Math.round(O*W):(O*W).toFixed(1))),((A=d.selectedShapes[0])===null||A===void 0?void 0:A.page)===x&&t.default.createElement("div",{style:{position:"absolute",top:F+C.y*d.scale-14+"px",width:"14px",height:C.height*d.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(Zd)),Zd}var Qd={},d4;function qC(){return d4||(d4=1,function(e){var r=Qd&&Qd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.AudioElement=void 0;const t=r(di()),n=zs,a=fl;e.AudioElement=(0,n.observer)(({audio:i,store:o})=>{const[l,u]=function(c){const[h,p]=t.default.useState(null),[w,d]=t.default.useState("loading");return t.default.useEffect(()=>{const _=new Audio(c),E=()=>{d("loaded"),p(_)},S=()=>{d("failed"),p(null)};return _.addEventListener("canplay",E),_.addEventListener("error",S),()=>{_.removeEventListener("canplay",E),_.removeEventListener("error",S)}},[c]),[h,w]}(i.src);return t.default.useEffect(()=>{l&&o.history.ignore(()=>{i.set({duration:1e3*l.duration})})},[l,i,o.history]),t.default.useEffect(()=>{if(!l)return;const c=()=>{l.currentTime=i.startTime*i.duration/1e3},h=()=>{const w=i.endTime*i.duration/1e3;l.currentTime>=w&&(l.pause(),l.currentTime=i.startTime*i.duration/1e3)};l.addEventListener("ended",c),l.addEventListener("timeupdate",h);const p=(0,a.autorun)(()=>{const w=o.animatedElementsIds;if(w.length&&!w.includes(i.id))return;const d=o.currentTime-i.delay,_=i.duration*(i.endTime-i.startTime),E=d>=0&&d<_;if(!o.isPlaying||o.animatedElementsIds.length!==0||!E)return void l.pause();l.volume=i.volume,l.paused&&l.play();const S=d%_/1e3+i.startTime*i.duration/1e3,m=l.currentTime;Math.abs(m-S)>.5&&S!==m&&(l.currentTime=S)});return()=>{l.pause(),l.removeEventListener("ended",c),l.removeEventListener("timeupdate",h),p()}},[o.isPlaying,i.startTime,i.endTime,i.volume,l]),null})}(Qd)),Qd}var Nv={},Tv={},Jd={};let zC="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",n_=e=>crypto.getRandomValues(new Uint8Array(e)),i_=(e,r,t)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*n*r/e.length);return(i=r)=>{let o="";for(;;){let l=t(a),u=a;for(;u--;)if(o+=e[l[u]&n]||"",o.length===i)return o}}},UC=(e,r=21)=>i_(e,r,n_),HC=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((r,t)=>(t&=63,t<36?r+=t.toString(36):t<62?r+=(t-26).toString(36).toUpperCase():t>62?r+="-":r+="_",r),"");const GC=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:UC,customRandom:i_,nanoid:HC,random:n_,urlAlphabet:zC},Symbol.toStringTag,{value:"Module"})),u0=Kc(GC);var Rv={},Ms={},Mv={},Iv={},p4;function a_(){return p4||(p4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0,e.deepEqual=function(r,t){if(r===t)return!0;if(typeof r=="object"&&r!=null&&typeof t=="object"&&t!=null){if(Object.keys(r).length!=Object.keys(t).length)return!1;for(var n in r)if(!t.hasOwnProperty(n)||!(0,e.deepEqual)(r[n],t[n]))return!1;return!0}return!1}}(Iv)),Iv}var g4;function VC(){return g4||(g4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const r=hl,t=a_();Object.assign(r.types),e.UndoManager=r.types.model("UndoManager",{history:r.types.array(r.types.frozen()),undoIdx:-1,targetPath:""}).views(n=>({get canUndo(){return n.undoIdx>0},get canRedo(){return n.undoIdx<n.history.length-1}})).actions(n=>{let a,i,o=!1,l=null,u=0,c=0;const h=()=>c>0;function p(){const d=(0,r.getSnapshot)(a);return{pages:d.pages,width:d.width,height:d.height,custom:d.custom}}function w(d){const _=a.pages.map(g=>g.id),E=d.pages.map(g=>g.id),S=!(0,t.deepEqual)(_,E),m=!(0,t.deepEqual)(a.custom,d.custom);S?(0,r.applySnapshot)(a.pages,d.pages):a.pages.forEach((g,v)=>{(0,r.applySnapshot)(g,d.pages[v])}),m&&a.set({custom:d.custom}),a.setSize(d.width,d.height)}return{startTransaction(){c++},endTransaction(d){c--,d||this.requestAddState(p())},async ignore(d,_=!1,E=!1){E&&await new Promise(b=>setTimeout(b,10)),u&&n.addUndoState();let S=h();n.startTransaction();let m=c;try{await d()}catch(b){setTimeout(()=>{throw b})}const g=m!==c,v=!g;n.endTransaction(v),_||S||n.replaceState(),g||(clearTimeout(u),u=0)},async transaction(d){await n.ignore(d,!0),this.addUndoState()},requestAddState(d){l=d,u||h()||(o?o=!1:u=setTimeout(()=>{u=0,clearTimeout(u),h()||this.addUndoState()},100))},addUndoState(){if(o)return void(o=!1);const d=n.history[n.undoIdx];!(0,t.deepEqual)(l,d)&&(clearTimeout(u),u=0,n.history.splice(n.undoIdx+1),n.history.push(l),n.undoIdx=n.history.length-1)},afterCreate(){if(a=(0,r.resolvePath)(n,".."),!a)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");i=(0,r.onSnapshot)(a,()=>{this.requestAddState(p())}),n.history.length===0&&this.requestAddState(p())},clear(){clearTimeout(u),u=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(p())},beforeDestroy(){i()},undo(){u&&this.addUndoState(),n.canUndo?(n.undoIdx--,o=!0,w(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){u&&this.addUndoState(),n.canRedo?(n.undoIdx++,o=!0,w(n.history[n.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){n.history[n.undoIdx]=p()}}}),e.default=e.UndoManager}(Mv)),Mv}var jv={},v4;function WC(){return v4||(v4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=async function(r,t){const n=await(await fetch(r)).blob(),a=document.createElement("a"),i=URL.createObjectURL(n);a.href=i,a.download=t,document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(i)},0)}}(jv)),jv}var Fv={},m4;function $C(){return m4||(m4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=function(){var n;return!((n=window.jspdf)===null||n===void 0)&&n.jsPDF?Promise.resolve(window.jspdf.jsPDF):t||(t=new Promise(a=>{var i=document.createElement("script");i.onload=function(){a(window.jspdf.jsPDF)},i.src=r,document.head.appendChild(i)}),t)};const r="https://cdnjs.cloudflare.com/ajax/libs/jspdf/3.0.1/jspdf.umd.min.js";let t=null}(Fv)),Fv}var Dv={},y4;function YC(){return y4||(y4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getGIF=t,e.createGIF=async function({width:n,height:a}){return new(await t())({workers:4,width:n,height:a,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
341
|
-
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
|
|
342
|
-
`],{type:"application/javascript"}))})};const r="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function t(){return window.GIF?Promise.resolve(window.GIF):new Promise(n=>{var a=document.createElement("script");a.onload=function(){n(window.GIF)},a.src=r,document.head.appendChild(a)})}}(Dv)),Dv}var Bv={},b4;function XC(){return b4||(b4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=async function(r){for(let t=0;t<30;t++){const n=await r();if(n)return n;await new Promise(a=>setTimeout(a,50))}}}(Bv)),Bv}var ql={},qv={},w4;function D1(){return w4||(w4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=function(n){return new Promise(a=>{const i=document.createElement("img");i.onload=async()=>{i.width===0||i.height===0?a(await(0,r.getSvgSize)(n)):a({width:i.width,height:i.height})},i.crossOrigin="anonymous",i.src=n})},e.loadImage=t,e.cropImage=async function(n,a){const i=await t(n),o=document.createElement("canvas");o.width=2*i.width,o.height=2*i.height,o.getContext("2d").drawImage(i,0,0,o.width,o.height);const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const u=l.getContext("2d");let{cropX:c,cropY:h}=a;const p=o.width*a.cropWidth,w=o.height*a.cropHeight,d=a.width/a.height;let _,E;const S=p/w;return a.type==="svg"?(_=p,E=w):d>=S?(_=p,E=p/d):(_=w*d,E=w),u.drawImage(o,c*o.width,h*o.height,_,E,0,0,l.width,l.height),l.toDataURL("image/png")},e.getCrop=function(n,a){const{width:i,height:o}=n,l=i/o;let u,c;l>=a.width/a.height?(u=a.width,c=a.width/l):(u=a.height*l,c=a.height);const h=(a.width-u)/2,p=(a.height-c)/2;return{cropX:h/a.width,cropY:p/a.height,cropWidth:u/a.width,cropHeight:c/a.height}};const r=kp();function t(n){return new Promise((a,i)=>{const o=document.createElement("img");o.onload=()=>{a(o)},o.onerror=l=>{i(l)},o.crossOrigin="anonymous",o.src=n})}}(qv)),qv}var zv={},_4;function o_(){return _4||(_4=1,function(e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Effects=void 0,e.shapeFilterToCSS=function(t){let n={filter:"",html:void 0};switch(t){case r.warm:return n.filter="sepia(0.5) saturate(1.5) brightness(1.1) contrast(1.1)",n;case r.cold:return n.filter="url(#blue-boost)",n.html=`
|
|
343
|
-
<svg style="display: none">
|
|
344
|
-
<filter id="blue-boost">
|
|
345
|
-
<feColorMatrix
|
|
346
|
-
type="matrix"
|
|
347
|
-
values="
|
|
348
|
-
0.85 0 0 0 0
|
|
349
|
-
0 0.9 0 0 0
|
|
350
|
-
0 0 1.15 0 0
|
|
351
|
-
0 0 0 1 0"
|
|
352
|
-
/>
|
|
353
|
-
</filter>
|
|
354
|
-
</svg>`,n;case"natural":return n.filter="saturate(1.3) brightness(1.1) contrast(1.2)",n;default:return null}},function(t){t.sepia="sepia",t.grayscale="grayscale",t.natural="natural",t.warm="warm",t.cold="cold"}(r||(e.Effects=r={}))}(zv)),zv}var Uv={},S4;function KC(){return S4||(S4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getVideoSize=async function(r){return new Promise(t=>{const n=document.createElement("video");n.crossOrigin="anonymous",n.src=r,n.addEventListener("loadedmetadata",()=>{const{videoWidth:a,videoHeight:i}=n;t({width:a,height:i})})})},e.getVideoDuration=async function(r){return new Promise(t=>{const n=document.createElement("video");n.crossOrigin="anonymous",n.src=r,n.addEventListener("loadedmetadata",()=>{const{duration:a}=n;t(a)})})},e.getVideoPreview=async function(r,t=5){return new Promise((n,a)=>{var i=document.createElement("video"),o=document.createElement("canvas");o.width=480,o.height=360;var l=o.getContext("2d");i.crossOrigin="anonymous",i.src=r,i.addEventListener("error",u=>{a(u)}),i.addEventListener("loadeddata",function(){const u=i.videoWidth/i.videoHeight;o.width=480,o.height=480/u,i.currentTime=t}),i.addEventListener("seeked",function(){l.drawImage(i,0,0,o.width,o.height);try{var u=o.toDataURL();n(u)}catch(c){a(c)}})})},e.getVideoObjectPreview=async function(r,t,n){return new Promise((a,i)=>{const o=t.getContext("2d"),l=()=>{try{o.drawImage(r,0,0,t.width,t.height);const u=t.toDataURL();a(u),r.removeEventListener("seeked",l)}catch(u){i(u),r.removeEventListener("seeked",l)}};r.addEventListener("seeked",l),r.currentTime=n})}}(Uv)),Uv}var x4;function ZC(){return x4||(x4=1,function(e){var r,t=ql&&ql.__createBinding||(Object.create?function(b,O,I,T){T===void 0&&(T=I);var M=Object.getOwnPropertyDescriptor(O,I);M&&!("get"in M?!O.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return O[I]}}),Object.defineProperty(b,T,M)}:function(b,O,I,T){T===void 0&&(T=I),b[T]=O[I]}),n=ql&&ql.__setModuleDefault||(Object.create?function(b,O){Object.defineProperty(b,"default",{enumerable:!0,value:O})}:function(b,O){b.default=O}),a=ql&&ql.__importStar||(r=function(b){return r=Object.getOwnPropertyNames||function(O){var I=[];for(var T in O)Object.prototype.hasOwnProperty.call(O,T)&&(I[I.length]=T);return I},r(b)},function(b){if(b&&b.__esModule)return b;var O={};if(b!=null)for(var I=r(b),T=0;T<I.length;T++)I[T]!=="default"&&t(O,b,I[T]);return n(O,b),O}),i=ql&&ql.__rest||function(b,O){var I={};for(var T in b)Object.prototype.hasOwnProperty.call(b,T)&&O.indexOf(T)<0&&(I[T]=b[T]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function"){var M=0;for(T=Object.getOwnPropertySymbols(b);M<T.length;M++)O.indexOf(T[M])<0&&Object.prototype.propertyIsEnumerable.call(b,T[M])&&(I[T[M]]=b[T[M]])}return I};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=function(b){var O=new DOMParser().parseFromString(b,"image/svg+xml");return O.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(O)},e.jsonToDOM=g,e.jsonToHTML=async function({json:b,elementHook:O}){const I=await g({json:b,elementHook:O});return v({dom:I})};const o=D1(),l=a(kp()),u=D1(),c=km(),h=Z8(),p=o_(),w=KC(),d=(b,O,...I)=>({type:b,props:O,children:I||[]}),_=async({element:b,page:O,store:I})=>{let{src:T}=b;if(b.type==="svg"&&Object.keys(b.colorsReplace).length){const K=await l.urlToString(T);T=l.replaceColors(K,new Map(Object.entries(b.colorsReplace)))}let M="";b.flipX&&(M+="scaleX(-1)"),b.flipY&&(M+="scaleY(-1)"),M||(M="none");const j={};if(b.clipSrc){const K=await l.urlToBase64(b.clipSrc);j["clip-path"]=`url(${K})`}const C=await(0,u.loadImage)(T),x=C.width*b.cropWidth,L=C.height*b.cropHeight,A=b.width/b.height;let N,F;const U=x/L;b.type==="svg"?(N=x,F=L):A>=U?(N=x,F=x/A):(N=L*A,F=L);const W=N/C.width,$=F/C.height,Z=N/F>b.width/b.height?b.height/F:b.width/N,V=N*Z/W,G=F*Z/$,z=b.cropX*Z*C.width,D=b.cropY*Z*C.height;return d("div",{style:Object.assign(Object.assign({},j),{width:"100%",height:"100%","border-radius":b.cornerRadius+"px",border:b.borderSize?`${b.borderSize}px solid ${b.borderColor}`:"none",background:`url(${T})`,transform:M,"background-size":`${Math.round(V)}px ${Math.round(G)}px`,"background-position-x":-Math.round(z)+"px","background-position-y":-Math.round(D)+"px"})})},E=({element:b,type:O})=>{const I={"stroke-width":b.height,stroke:b.color,"line-cap":"round","stroke-linejoin":"round",opacity:b.opacity};return O==="arrow"||O==="triangle"?d("polyline",Object.assign({points:`${3*b.height},${2*-b.height} 0,0 ${3*b.height},${2*b.height}`},I)):O==="bar"?d("polyline",Object.assign({points:`0,${2*-b.height} 0,${2*b.height}`},I)):O==="circle"?d("circle",Object.assign({r:b.height},I)):O==="square"?d("polyline",Object.assign({points:`${-b.height},${-b.height} ${-b.height},${b.height} ${b.height},${b.height} ${b.height},${-b.height}`},I)):null},S={image:_,svg:_,text:async({element:b,page:O,store:I})=>{let T={top:0,left:0};b.fill.indexOf("gradient")>=0&&(T=Object.assign(Object.assign({},T),{"background-color":b.fill,"background-image":b.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const M=b.backgroundPadding*(b.fontSize*b.lineHeight),j=d("div",{style:{position:"absolute",top:-M/2+"px",left:-M/2+"px",display:b.backgroundEnabled?"block":"none",width:b.width+M+"px",height:b.height+M+"px","background-color":b.backgroundColor,"border-radius":b.backgroundCornerRadius*(b.fontSize*b.lineHeight*.5)+"px"}});b.verticalAlign==="middle"?(T.top="50%",T.transform="translateY(-50%)"):b.verticalAlign==="bottom"&&(T.bottom=0);const C=/<[a-z][\s\S]*>/i.test(b.text),x=Object.assign(Object.assign({},T),{position:"absolute",width:b.width+"px",color:b.fill,"white-space":"pre-wrap","font-size":b.fontSize+"px","text-align":b.align,"font-family":b.fontFamily,"text-decoration":b.textDecoration||"none","line-height":b.lineHeight,"letter-spacing":b.letterSpacing+"em","font-style":b.fontStyle,"font-weight":b.fontWeight,"-webkit-text-stroke":`${b.strokeWidth}px ${b.stroke}`,"text-stroke":`${b.strokeWidth}px ${b.stroke}`}),L="el-"+b.id,A=C?{id:L}:{},N=`<style>#${L} {${h.resetStyleContent}}</style>`,F=d("div",Object.assign(Object.assign({style:x},A),{innerHTML:C?`${N}${b.text}`:b.text.split(`
|
|
355
|
-
`).join("<br />")}));return d("div",{style:{position:"relative",width:"100%",height:"100%"}},j,F)},line:async({element:b,page:O,store:I})=>d("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},d("rect",{x:0,y:0,width:b.width,height:b.height,fill:b.color}),d("g",{transform:`translate(0 ${b.height/2})`},E({element:b,type:b.startHead})),d("g",{transform:`translate(${b.width} ${b.height/2}) rotate(180)`},E({element:b,type:b.endHead}))),figure:async({element:b,page:O,store:I,elementHook:T})=>{const M=(0,c.figureToSvg)(b),j=d("div",{innerHTML:M});return T&&T({dom:j,element:b})||j},group:async({element:b,page:O,store:I,elementHook:T})=>{const M=await Promise.all(b.children.map(C=>m({element:C,page:O,store:I,elementHook:T}))),j=d("div",{style:{"transform-origin":"top left",opacity:b.opacity}},...M);return T&&T({dom:j,element:b})||j},video:async({element:b,page:O,store:I,elementHook:T})=>{const{cropX:M,cropY:j,cropWidth:C,cropHeight:x}=b,L=await(0,w.getVideoSize)(b.src),A=L.width*C,N=L.height*x,F=b.width/b.height;let U,W;F>=A/N?(U=A,W=A/F):(U=N*F,W=N);const $=U/C,Z=W/x,V=M*L.width,G=j*L.height,z=Math.max(b.width/L.width,b.height/L.height),D={position:"absolute",width:`${Math.round($*z)}px`,height:`${Math.round(Z*z)}px`,left:-Math.round(V*z)+"px",top:-Math.round(G*z)+"px","object-fit":"fill"},K=`video-${b.id}`,ne=d("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden","border-radius":b.cornerRadius+"px",border:b.borderSize?`${b.borderSize}px solid ${b.borderColor}`:"none"}},d("video",{id:K,src:b.src,style:D,controls:!0,playsInline:!0,muted:!0,volume:b.volume}));return T&&T({dom:ne,element:b})||ne},gif:_};async function m({element:b,page:O,store:I,elementHook:T}){let M=await S[b.type];M||(M=()=>d("div",{}),console.error(`HTML export does not support ${b.type} type...`));const j=await M({element:b,page:O,store:I}),C=[],x=[];if(b.blurEnabled&&C.push(`blur(${b.blurRadius/2}px)`),b.brightnessEnabled&&C.push(`brightness(${100*b.brightness+100}%)`),b.sepiaEnabled&&C.push("sepia()"),b.grayscaleEnabled&&C.push("grayscale()"),b.filters)for(const A of Object.keys(b.filters)){const N=(0,p.shapeFilterToCSS)(p.Effects[A]);N&&(C.push(N.filter),N.html&&x.push(N.html))}b.shadowEnabled&&C.push(`drop-shadow(${b.shadowOffsetX}px ${b.shadowOffsetY}px ${b.shadowBlur}px ${b.shadowColor})`);const L=d("div",{id:b.id,style:{position:"absolute",left:b.x+"px",top:b.y+"px",width:b.width+"px",height:b.height+"px",transform:`rotate(${b.rotation}deg)`,"transform-origin":"top left",opacity:b.opacity,display:b.visible&&b.showInExport?"block":"none",filter:C.join(" ")||"none"}},j,...x);return T&&T({dom:L,element:b})||L}async function g({json:b,elementHook:O}){const I=await Promise.all(b.pages.map(j=>async function({page:C,store:x,elementHook:L}){const A=await Promise.all(C.children.map(W=>m({element:W,page:C,store:x,elementHook:L}))),N=C.width==="auto"?x.width:C.width,F=C.height==="auto"?x.height:C.height;let U={};if(C.background.indexOf("url")>=0||C.background.indexOf("http")>=0||C.background.indexOf(".jpg")>=0||C.background.indexOf(".png")>=0||C.background.indexOf(".jpeg")>=0){const{width:W,height:$}=await(0,u.loadImage)(C.background),Z=await _({element:Object.assign({x:0,y:0,width:W,height:$,src:C.background,cornerRadius:0},(0,o.getCrop)({width:W,height:$},{width:W,height:$})),page:C,store:x});A.unshift(Z)}else U=Object.assign(Object.assign({},U),{"background-color":C.background});return d("div",{className:"page",id:C.id,style:Object.assign(Object.assign({},U),{width:N+"px",height:F+"px",overflow:"hidden",position:"relative"})},...A)}({page:j,store:b,elementHook:O}))),T=[];b.pages.forEach(j=>{j.children.forEach(C=>{C.type==="text"&&T.indexOf(C.fontFamily)===-1&&T.push(C.fontFamily)})});const M=T.map(j=>b.fonts.find(C=>C.fontFamily===j)?d("style",{},""):d("link",{href:`https://fonts.googleapis.com/css?family=${j}`,rel:"stylesheet"}));return d("div",{className:"design"},...M,...I)}const v=({dom:b})=>{if(typeof b=="string")return b;if(!b)return"";const O=b.props,{innerHTML:I}=O,T=i(O,["innerHTML"]);return`<${b.type} ${Object.keys(T).map(M=>((j,C)=>typeof C=="object"?`${j}="${Object.keys(C).map(x=>`${x}:${C[x]};`).join(" ")}"`:`${j}="${C}"`)(M,b.props[M])).join(" ")}>${I||b.children.map(M=>v({dom:M})).join("")}</${b.type}>`}}(ql)),ql}var zl={},E4;function QC(){return E4||(E4=1,function(e){var r,t=zl&&zl.__createBinding||(Object.create?function(v,b,O,I){I===void 0&&(I=O);var T=Object.getOwnPropertyDescriptor(b,O);T&&!("get"in T?!b.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return b[O]}}),Object.defineProperty(v,I,T)}:function(v,b,O,I){I===void 0&&(I=O),v[I]=b[O]}),n=zl&&zl.__setModuleDefault||(Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b}),a=zl&&zl.__importStar||(r=function(v){return r=Object.getOwnPropertyNames||function(b){var O=[];for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(O[O.length]=I);return O},r(v)},function(v){if(v&&v.__esModule)return v;var b={};if(v!=null)for(var O=r(v),I=0;I<O.length;I++)O[I]!=="default"&&t(b,v,O[I]);return n(b,v),b}),i=zl&&zl.__rest||function(v,b){var O={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&b.indexOf(I)<0&&(O[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(I=Object.getOwnPropertySymbols(v);T<I.length;T++)b.indexOf(I[T])<0&&Object.prototype.propertyIsEnumerable.call(v,I[T])&&(O[I[T]]=v[I[T]])}return O};Object.defineProperty(e,"__esModule",{value:!0}),e.forEveryChild=void 0,e.fixRatio=function(v){var b=new DOMParser().parseFromString(v,"image/svg+xml");return b.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(b)},e.jsonToDOM=m,e.jsonToSVG=async function({json:v,elementHook:b}){const O=await m({json:v,elementHook:b});return g({dom:O})};const o=D1(),l=a(kp()),u=D1(),c=km(),h=o_();e.forEveryChild=(v,b)=>{if(v.children)for(const O of v.children){if(b(O)===!0)break;(0,e.forEveryChild)(O,b)}};const p=(v,b,...O)=>({type:v,props:b,children:O||[]}),w=async({element:v,page:b,store:O})=>{let{src:I}=v;if(v.type==="svg"){const K=await l.urlToString(I);I=l.replaceColors(K,new Map(Object.entries(v.colorsReplace)))}else I=await(async K=>{try{const ne=await fetch(K);if(typeof Buffer<"u"){const Q=await ne.arrayBuffer(),ee=Buffer.from(Q).toString("base64");return`data:${ne.headers.get("content-type")||"image/png"};base64,${ee}`}{const Q=await ne.blob();return new Promise((ee,ae)=>{const se=new FileReader;se.onloadend=()=>ee(se.result),se.onerror=ae,se.readAsDataURL(Q)})}}catch(ne){return console.error("Error converting URL to data URL:",ne),K}})(I);let T="";v.flipX&&(T+="scaleX(-1)"),v.flipY&&(T+="scaleY(-1)"),v.clipSrc&&await l.urlToBase64(v.clipSrc);const M=await(0,u.loadImage)(I),j=M.width*v.cropWidth,C=M.height*v.cropHeight,x=v.width/v.height;let L,A;const N=j/C;v.type==="svg"?(L=j,A=C):x>=N?(L=j,A=j/x):(L=C*x,A=C);const F=L/M.width,U=A/M.height,W=L/A>v.width/v.height?v.height/A:v.width/L,$=L*W/F,Z=A*W/U,V=v.cropX*M.width*W,G=v.cropY*M.height*W,z=`clip-${v.id}`,D=I.replace(/&/g,"&");return p("g",{style:{transform:T}},p("defs",{},p("clipPath",{id:z},p("rect",{x:0,y:0,width:v.width,height:v.height}))),p("image",{href:D,x:-V,y:-G,width:$,height:Z,preserveAspectRatio:"none","clip-path":`url(#${z})`}))},d=({element:v,type:b})=>{const O={"stroke-width":v.height,stroke:v.color,"line-cap":"round","stroke-linejoin":"round",opacity:v.opacity};return b==="arrow"||b==="triangle"?p("polyline",Object.assign({points:`${3*v.height},${2*-v.height} 0,0 ${3*v.height},${2*v.height}`},O)):b==="bar"?p("polyline",Object.assign({points:`0,${2*-v.height} 0,${2*v.height}`},O)):b==="circle"?p("circle",Object.assign({r:v.height},O)):b==="square"?p("polyline",Object.assign({points:`${-v.height},${-v.height} ${-v.height},${v.height} ${v.height},${v.height} ${v.height},${-v.height}`},O)):null},_={image:w,svg:w,text:async({element:v,page:b,store:O})=>{const I=(x,L,A,N,F)=>{const U=document.createElement("canvas").getContext("2d");return U.font=`${F} ${N} ${L}px ${A}`,U.measureText(x).width},T=((x,L,A,N,F,U)=>{const W=[];return x.split(`
|
|
356
|
-
`).forEach($=>{const Z=$.split(" ");let V="";for(let G=0;G<Z.length;G++){const z=V+Z[G]+" ";I(z,A,N,F,U)>L+.5&&G>0?(W.push(V.trim()),V=Z[G]+" "):V=z}W.push(V.trim())}),W})(v.text,v.width,v.fontSize,v.fontFamily,v.fontWeight,v.fontStyle),M=v.fontSize*v.lineHeight,j=v.align==="center"?"middle":v.align==="right"?"end":"start",C=T.map((x,L)=>p("tspan",{x:v.align==="center"?v.width/2:v.align==="right"?v.width:0,dy:L===0?0:M,innerHTML:x}));return p("g",{},p("text",{fill:v.fill,y:v.fontSize,"font-size":v.fontSize+"px","text-anchor":j,"font-family":v.fontFamily,"font-style":v.fontStyle,"font-weight":v.fontWeight,"text-decoration":v.textDecoration,"line-height":v.lineHeight,"letter-spacing":v.letterSpacing+"em","stroke-width":v.strokeWidth,stroke:v.stroke},...C))},line:async({element:v,page:b,store:O})=>p("g",{},p("line",{x1:0,y1:v.height/2,x2:v.width,y2:v.height/2,stroke:v.color,"stroke-width":v.height}),p("g",{transform:`translate(0 ${v.height/2})`},d({element:v,type:v.startHead})),p("g",{transform:`translate(${v.width} ${v.height/2}) rotate(180)`},d({element:v,type:v.endHead}))),figure:async({element:v,page:b,store:O,elementHook:I})=>{const T=function(j){let C=j.replace(/<svg[^>]*>/,"");return C=C.replace(/<\/svg>/,""),C}((0,c.figureToSvg)(v)),M=p("g",{innerHTML:T});return I&&I({dom:M,element:v})||M},group:async({element:v,page:b,store:O,elementHook:I})=>{const T=await Promise.all(v.children.map(j=>E({element:j,page:b,store:O,elementHook:I}))),M=p("g",{opacity:v.opacity,style:{"transform-origin":"top left"}},...T);return I&&I({dom:M,element:v})||M},gif:w};async function E({element:v,page:b,store:O,elementHook:I}){let T=await _[v.type];T||(T=()=>p("g",{}),console.error(`SVG export does not support ${v.type} type...`));const M=await T({element:v,page:b,store:O}),j=[],C=[];if(v.blurEnabled&&j.push(`blur(${v.blurRadius/2}px)`),v.brightnessEnabled&&j.push(`brightness(${100*v.brightness+100}%)`),v.sepiaEnabled&&j.push("sepia()"),v.grayscaleEnabled&&j.push("grayscale()"),v.shadowEnabled&&j.push(`drop-shadow(${v.shadowOffsetX}px ${v.shadowOffsetY}px ${v.shadowBlur}px ${v.shadowColor})`),v.filters)for(const L of Object.keys(v.filters)){const A=(0,h.shapeFilterToCSS)(h.Effects[L]);if(A&&(j.push(A.filter),A.html)){const N=A.html.replace(/<svg([^>]*)>/,"<g$1>").replace(/<\/svg>/,"</g>");C.push(N)}}const x=p("g",{className:"element",id:v.id,transform:v.type!=="group"?`translate(${v.x}, ${v.y}) rotate(${v.rotation})`:void 0,display:v.visible?void 0:"none",style:{"transform-origin":"top left",filter:j.join(" ")}},M,...C);return I&&I({dom:x,element:v})||x}async function S(v){try{const b=await fetch(v),O=await b.blob();return new Promise((I,T)=>{const M=new FileReader;M.onloadend=()=>I(M.result),M.onerror=T,M.readAsDataURL(O)})}catch(b){return console.error("Error embedding font:",b),v}}async function m({json:v,elementHook:b}){const O=await Promise.all(v.pages.map(M=>async function({page:j,store:C,elementHook:x}){const L=await Promise.all(j.children.map(F=>E({element:F,page:j,store:C,elementHook:x}))),A=j.background.indexOf("url")>=0||j.background.indexOf("http")>=0||j.background.indexOf(".jpg")>=0||j.background.indexOf(".png")>=0||j.background.indexOf(".jpeg")>=0;let N;if(A){const F=await(0,u.loadImage)(j.background);N=await(0,u.cropImage)(j.background,Object.assign({width:C.width,height:C.height,x:0,y:0},(0,o.getCrop)({width:C.width,height:C.height},{width:F.width,height:F.height})))}return p("g",{className:"page",style:{}},A?p("image",{"xlink:href":N,x:0,y:0,width:C.width,height:C.height,preserveAspectRatio:"none"}):p("rect",{x:0,y:0,width:C.width,height:C.height,fill:A?void 0:j.background}),...L)}({page:M,store:v,elementHook:b}))),I=[];(0,e.forEveryChild)({children:v.pages},M=>{M.type==="text"&&I.indexOf(M.fontFamily)===-1&&I.push(M.fontFamily)});const T=await async function(M,j){return await Promise.all(M.map(async C=>{var x,L;const A=j.find(N=>N.fontFamily===C);if(A){const N=await S(A.url);return p("style",{},`@font-face { font-family: ${C}; src: url(${N}); }`)}{const N=`https://fonts.googleapis.com/css?family=${C}:bi,normal,i,b`;try{const F=await fetch(N),U=await F.text(),W=(L=(x=U.match(/url\((.*?)\)/g))===null||x===void 0?void 0:x.map(Z=>Z.replace(/url\((.*?)\)/,"$1")))===null||L===void 0?void 0:L.filter(Z=>Z.startsWith("https"));if(!(W!=null&&W.length))throw new Error("No font URLs found");const $=await Promise.all(W.map(async Z=>{const V=await S(Z),G=U.match(/font-style:\s*(.*?);/),z=U.match(/font-weight:\s*(.*?);/),D=G?G[1]:"normal",K=z?z[1]:"normal";return`@font-face {
|
|
357
|
-
font-family: ${C};
|
|
358
|
-
font-style: ${D};
|
|
359
|
-
font-weight: ${K};
|
|
360
|
-
src: url(${V});
|
|
361
|
-
}`}));return p("style",{},$.join(`
|
|
362
|
-
`))}catch(F){return console.error("Error embedding Google Font:",F),p("defs",{},p("style",{type:"text/css",innerHTML:`@import url('${N}');`.replace(/&/g,"&")}))}}}))}(I,v.fonts);return p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${v.width} ${v.height}`,width:v.width,height:v.height},...T,...O)}const g=({dom:v,nestLevel:b=0})=>{if(typeof v=="string")return v;if(!v)return"";const O=v.props,{innerHTML:I}=O,T=i(O,["innerHTML"]),M=" ".repeat(b);return`${M}<${v.type} ${Object.keys(T).map(j=>((C,x)=>typeof x=="object"?`${C}="${Object.keys(x).map(L=>`${L}:${x[L]};`).join(" ")}"`:x==null||x===""?"":`${C}="${x}"`)(j,T[j])).join(" ")}>${I||`
|
|
363
|
-
`+v.children.map(j=>g({dom:j,nestLevel:b+1})).join("")}${M}</${v.type}>
|
|
364
|
-
`}}(zl)),zl}var Hv={},P4;function s_(){return P4||(P4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const r=hl,t=u0,n=gp(),a=Tm(),i=gp(),o=Fh();e.Page=r.types.model("Page",{id:r.types.identifier,children:r.types.array(r.types.late(()=>n.ElementTypes)),width:r.types.optional(r.types.union(r.types.number,r.types.literal("auto")),"auto"),height:r.types.optional(r.types.union(r.types.number,r.types.literal("auto")),"auto"),background:"white",bleed:0,custom:r.types.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(l=>{const u=Object.assign({},l),c={};for(var h in u)h[0]!=="_"&&(c[h]=l[h]);return c}).views(l=>({get store(){return(0,r.getParentOfType)(l,a.Store)}})).views(l=>({get startTime(){let u=0;for(const c of l.store.pages){if(c.id===l.id)return u;u+=c.duration}return u},get _exportingOrRendering(){return l._exporting||l._rendering}})).views(l=>({get computedWidth(){return l.width==="auto"?l.store.width:l.width},get computedHeight(){return l.height==="auto"?l.store.height:l.height}})).actions(l=>({toJSON:()=>JSON.parse(JSON.stringify((0,r.getSnapshot)(l))),_forEachElementUp(u,c){const h=u.map(p=>({id:p,index:l.children.findIndex(w=>w.id===p)}));h.sort((p,w)=>w.index-p.index);for(const{index:p}of h){if(p==-1)continue;const w=p<l.children.length-1&&l.children[p+1],d=u.indexOf(w==null?void 0:w.id)>=0;p===l.children.length-1||d||c(p)}},_forEachElementDown(u,c){const h=u.map(p=>({id:p,index:l.children.findIndex(w=>w.id===p)}));h.sort((p,w)=>p.index-w.index);for(const{index:p}of h){if(p==-1)continue;const w=p>0&&l.children[p-1],d=u.indexOf(w==null?void 0:w.id)>=0;p===0||d||c(p)}return!1}})).actions(l=>({clone(u={}){const c=l.toJSON();c.children.forEach(d=>{d.id=(0,t.nanoid)(10),(0,i.forEveryChild)(d,_=>{_.id=(0,t.nanoid)(10)})});const h=Object.assign(Object.assign(Object.assign({},c),{id:(0,t.nanoid)(10)}),u),p=l.store.addPage(h),w=l.store.pages.indexOf(l);p.setZIndex(w+1),p.select()},setZIndex(u){l.store.setPageZIndex(l.id,u)},set(u){Object.assign(l,u)},select(){l.store.selectPage(l.id)},addElement(u,{skipSelect:c=!1}={}){const h=i.TYPES_MAP[u.type];if(!h)return void console.error("Can not find model with type "+u.type);"children"in u&&Array.isArray(u.children)&&u.children.forEach(w=>{w.id=(0,t.nanoid)(10)});const p=h.create(Object.assign({id:(0,t.nanoid)(10)},u));return l.children.push(p),p.selectable&&!c&&l.store.selectElements([p.id]),p},canMoveElementsUp(u){let c=!1;return l._forEachElementUp(u,()=>{c=c||!0}),c},moveElementsUp(u){l._forEachElementUp(u,c=>{const h=l.children[c];(0,r.detach)(h),l.children.splice(c+1,0,h)})},canMoveElementsTop(u){return this.canMoveElementsUp(u)},moveElementsTop(u){const c=[],h=[];l.children.forEach(p=>{u.indexOf(p.id)>=0?c.push(p):h.push(p)}),l.children.replace(h.concat(c))},canMoveElementsDown(u){let c=!1;return l._forEachElementDown(u,()=>{c=c||!0}),c},moveElementsDown(u){l._forEachElementDown(u,c=>{const h=l.children[c];(0,r.detach)(h),l.children.splice(c-1,0,h)})},canMoveElementsBottom(u){return this.canMoveElementsDown(u)},moveElementsBottom(u){const c=[],h=[];l.children.forEach(p=>{u.indexOf(p.id)>=0?c.push(p):h.push(p)}),l.children.replace(c.concat(h))},setElementZIndex(u,c){const h=l.children.find(p=>p.id===u);h&&((0,r.detach)(h),l.children.remove(h),l.children.splice(c,0,h))},setSize({width:u,height:c,useMagic:h,softChange:p}){if(h){const w=[],d=A=>A.type==="image"&&A.x<1&&A.y<1&&A.width>=l.computedWidth-2&&A.height>=l.computedHeight-2;(0,i.forEveryChild)(l,A=>{A.type!=="group"&&(d(A)||w.push(A))});const _=w.length?(0,o.getTotalClientRect)(w):{x:0,y:0,width:l.computedWidth,height:l.computedHeight},E=1/4,S=Math.max(0,Math.min(_.x,l.computedWidth-_.x-_.width)),m=l.computedWidth*E,g=Math.max(0,S-m),v=Math.max(0,Math.min(_.y,l.computedHeight-_.y-_.height)),b=l.computedHeight*E,O=Math.max(0,v-b),I=l.computedWidth-2*g,T=l.computedHeight-2*O,M=u/I,j=c/T,C=Math.min(M,j),x=(u-I*C)/2-g*C,L=(c-T*C)/2-O*C;(0,i.forEveryChild)(l,A=>{A.type!=="group"&&(d(A)?A.set({x:A.x*C,y:A.y*C,width:A.width*M,height:A.height*j,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(A.set({x:x+A.x*C,y:L+A.y*C,width:A.width*C,height:A.height*C}),A.type==="text"?A.set({fontSize:A.fontSize*C}):A.type==="figure"&&A.set({strokeWidth:A.strokeWidth*C})))})}p||(l.width=u),p||(l.height=c)}})).actions(l=>({moveElementUp(u){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),l.moveElementsUp([u])},moveElementDown(u){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),l.moveElementsDown([u])},moveElementTop(u){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),l.moveElementsTop([u])},moveElementBottom(u){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),l.moveElementsBottom([u])},play(){l.store.play({startTime:l.startTime,endTime:l.startTime+l.duration})}}))}(Hv)),Hv}var Gv={},O4;function JC(){return O4||(O4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;const r=hl;e.Audio=r.types.model("Audio",{id:r.types.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(t=>({toJSON:()=>Object.assign({},(0,r.getSnapshot)(t))})).actions(t=>({set(n){Object.assign(t,n)}}))}(Gv)),Gv}var A4;function Tm(){return A4||(A4=1,function(e){var r,t=Ms&&Ms.__createBinding||(Object.create?function(C,x,L,A){A===void 0&&(A=L);var N=Object.getOwnPropertyDescriptor(x,L);N&&!("get"in N?!x.__esModule:N.writable||N.configurable)||(N={enumerable:!0,get:function(){return x[L]}}),Object.defineProperty(C,A,N)}:function(C,x,L,A){A===void 0&&(A=L),C[A]=x[L]}),n=Ms&&Ms.__setModuleDefault||(Object.create?function(C,x){Object.defineProperty(C,"default",{enumerable:!0,value:x})}:function(C,x){C.default=x}),a=Ms&&Ms.__importStar||(r=function(C){return r=Object.getOwnPropertyNames||function(x){var L=[];for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(L[L.length]=A);return L},r(C)},function(C){if(C&&C.__esModule)return C;var x={};if(C!=null)for(var L=r(C),A=0;A<L.length;A++)L[A]!=="default"&&t(x,C,L[A]);return n(x,C),x}),i=Ms&&Ms.__rest||function(C,x){var L={};for(var A in C)Object.prototype.hasOwnProperty.call(C,A)&&x.indexOf(A)<0&&(L[A]=C[A]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function"){var N=0;for(A=Object.getOwnPropertySymbols(C);N<A.length;N++)x.indexOf(A[N])<0&&Object.prototype.propertyIsEnumerable.call(C,A[N])&&(L[A[N]]=C[A[N]])}return L},o=Ms&&Ms.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=j;const l=hl,u=VC(),c=u0,h=o(Us()),p=WC(),w=$C(),d=YC(),_=Lm(),E=a(Op()),S=jf(),m=Nm(),g=a_(),v=XC(),b=ZC(),O=QC(),I=s_(),T=gp(),M=JC();function j({key:C,showCredit:x}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:x,_key:C})}(0,l.setLivelinessChecking)("ignore"),e.Font=l.types.model("Font",{fontFamily:l.types.string,url:l.types.optional(l.types.string,""),styles:l.types.frozen()}).preProcessSnapshot(C=>Object.assign(Object.assign({},C),{fontFamily:C.fontFamily||C.name})),e.Store=l.types.model("Store",{role:"",pages:l.types.array(I.Page),fonts:l.types.array(e.Font),audios:l.types.array(M.Audio),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:l.types.frozen(),selectedElementsIds:l.types.array(l.types.string),animatedElementsIds:l.types.array(l.types.string),history:l.types.optional(u.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(C=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),C.bleedVisible},get selectedElements(){return C.selectedElementsIds.map(x=>{for(const L of C.pages)for(const A of L.children)if(A.id===x)return A}).filter(x=>!!x)},get children(){return C.pages},get selectedShapes(){const x=[];return(0,T.forEveryChild)({children:C.selectedElements},L=>{L.type!=="group"&&x.push(L)}),x},get activePage(){return C.pages.slice().find(x=>x.id===C._activePageId)||(C.pages.length?C.pages[0]:null)},get duration(){let x=0;return C.pages.forEach(L=>{x+=L.duration}),x},get _hasCroppedImages(){return C.find(x=>x.type==="image"&&x._cropModeEnabled)},find(x){let L;return(0,T.forEveryChild)({children:C.pages},A=>{if(!L&&x(A))return L=A,!0}),L},getElementById:x=>C.find(L=>L.id===x)})).actions(C=>{let x=0,L=null,A=!1;return{afterCreate(){C.history.canUndo},setCurrentTime(N){C.currentTime=N},_togglePlaying(N=!C.isPlaying){C.isPlaying=N},play({animatedElementsIds:N=[],startTime:F=0,currentTime:U=0,endTime:W=C.duration,repeat:$=!1}={}){U&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),F=U),C.animatedElementsIds=(0,l.cast)(N),C.currentTime=F,C.isPlaying=!0,x=Date.now(),L=W,A=$,requestAnimationFrame(C.seek)},checkActivePage(){let N=0;for(const F of C.pages){if(C.currentTime>=F.startTime&&C.currentTime<F.startTime+F.duration){C.selectPage(F.id);break}N+=F.duration}},seek(){if(!C.isPlaying)return;const N=Date.now(),F=N-x;x=N,C.currentTime+=F,C.checkActivePage();const U=L||C.duration;C.isPlaying&&C.currentTime<U?requestAnimationFrame(C.seek):C.isPlaying&&A?(C.currentTime=0,requestAnimationFrame(C.seek)):C.stop()},stop(){C.isPlaying=!1,C.currentTime=0,C.animatedElementsIds=(0,l.cast)([]),C.checkActivePage()}}}).actions(C=>({__(){C._validated||((0,_.validateKey)(C._key,C._forceShowCredit),C._validated=!0)},set(x){Object.assign(C,x)},setUnit({unit:x,dpi:L}){C.unit=x||C.unit,C.dpi=L||C.dpi},setRole(x){C.role=x},addPage(x){const L=I.Page.create(Object.assign({id:(0,c.nanoid)(10)},x));return C.pages.push(L),C._activePageId=L.id,L},selectPage(x){C._activePageId=x},selectElements(x){const L=x.map(A=>C.getElementById(A)).sort((A,N)=>A.page.children.indexOf(A)-A.page.children.indexOf(N)).filter(A=>!!A).map(A=>A.id);C.selectedElementsIds=(0,l.cast)(L)},toggleBleed(x){C.bleedVisible=x??!C.bleedVisible},toggleRulers(x){C.rulesVisible=x??!C.rulesVisible},openSidePanel(x){C.openedSidePanel!==x&&(C.previousOpenedSidePanel=C.openedSidePanel,C.openedSidePanel=x)},setScale(x){C.scale=x},_setScaleToFit(x){C.scaleToFit=x},setElementsPixelRatio(x){C._elementsPixelRatio=x},setSize(x,L,A){C.pages.forEach(N=>{N.setSize({width:x,height:L,useMagic:A,softChange:!0})}),C.width=x,C.height=L},setPageZIndex(x,L){const A=C.pages.find(N=>N.id===x);A&&((0,l.detach)(A),C.pages.remove(A),C.pages.splice(L,0,A))},deletePages(x){const L=C.pages.indexOf(C.activePage);x.forEach(F=>{const U=C.pages.find(W=>W.id===F);(0,l.destroy)(U)});const A=Math.min(C.pages.length-1,L),N=C.pages[A];N&&(C._activePageId=N.id),C.selectedElementsIds=(0,l.cast)(C.selectedElementsIds.filter(F=>C.getElementById(F)))},groupElements(x){const L=x.map(F=>C.getElementById(F));L.forEach(F=>{F&&(0,l.detach)(F)});const A=C.activePage,N={id:(0,c.nanoid)(10),children:L,type:"group"};return A.children.push(N),C.selectedElementsIds=(0,l.cast)([N.id]),A.children.find(F=>F.id===N.id)},ungroupElements(x){const L=x.map(N=>C.getElementById(N)),A=[];L.forEach(N=>{if(N&&N.type==="group"){const F=N.page,U=F.children.indexOf(N);N.children.forEach(W=>{A.push(W.id)}),N.children.forEach(W=>{(0,l.detach)(W),F.children.push(W)}),F.children.splice(U,1)}}),C.selectedElementsIds=(0,l.cast)(A)},deleteElements(x){const L=[];C.find(A=>(x.includes(A.id)&&L.push(A),!1)),L.forEach(A=>{(0,l.destroy)(A)}),C.selectedElementsIds=(0,l.cast)(C.selectedElementsIds.filter(A=>C.getElementById(A)))},on(x,L){if(x==="change"){let A=C.toJSON();return(0,l.onSnapshot)(C,N=>{const F=C.toJSON();!(0,g.deepEqual)(A,F)&&(A=F,L(F))})}},async _toCanvas({pixelRatio:x,ignoreBackground:L,pageId:A,mimeType:N,includeBleed:F,_skipTimeout:U,quickMode:W=!1}={}){var $;const Z=x||1;A=A||(($=C.pages[0])===null||$===void 0?void 0:$.id);const V=C.pages.find(be=>be.id===A);if(!V)throw new Error(`No page for export with id ${A}`);W?V==null||V.set({_forceMount:!0}):V==null||V.set({_exporting:!0});const G=await(0,v.waitTillAvailable)(()=>h.default.stages.find(be=>be.getAttr("pageId")===A));if(!G)throw V==null||V.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can not find stage for page ${A}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const z=!!G.findOne(".page-container"),D=C._elementsPixelRatio;Z>C._elementsPixelRatio&&C.setElementsPixelRatio(Z),await C.waitLoading({_skipTimeout:U});const K=G.findOne(".page-container");if(!K)throw C.setElementsPixelRatio(D),V==null||V.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can't find page container. ${z}`);const ne=G.position();G.position({x:0,y:0}),G.find("Transformer").forEach(be=>{be.setAttr("oldVisible",be.visible()),be.visible(!1)}),K.find(".page-background").forEach(be=>be.shadowEnabled(!1)),K.find(".page-background").forEach(be=>be.strokeEnabled(!1)),K.find(".highlighter").forEach(be=>be.visible(!1));const Q=K.findOne(".page-background-group"),ee=Q.clip();Q.clip({x:null,y:null,width:null,height:null});const ae=K.findOne(".elements-container"),se=ae.clip();ae.clip({x:null,y:null,width:null,height:null});const ce=K.find(be=>be.getAttr("hideInExport"));ce.forEach(be=>{be.setAttr("oldVisible",be.visible()),be.hide()});const me=K.find(be=>!be.visible()&&be.getAttr("editModeEnabled"));me.forEach(be=>{be.setAttr("oldVisible",be.visible()),be.show()}),L&&K.find(".page-background").forEach(be=>be.hide());const Se=F?V.bleed:0;let Oe=Se;!C.bleedVisible&&F||(C.bleedVisible||F?C.bleedVisible&&F?Oe=0:C.bleedVisible&&!F&&(Oe=-V.bleed):Oe=0);const Ne=document.createElement("canvas");Ne.width=Math.round((V.computedWidth+2*Se)*Z),Ne.height=Math.round((V.computedHeight+2*Se)*Z);const xe=Ne.getContext("2d");N==="image/jpeg"&&(xe.fillStyle="white",xe.fillRect(0,0,Ne.width,Ne.height));const ve=K.scale();K.scale({x:1,y:1});const Xe=K.toCanvas({x:K.x()-Oe,y:K.y()-Oe,width:V.computedWidth+2*Se,height:V.computedHeight+2*Se,pixelRatio:Z});return K.scale(ve),xe.drawImage(Xe,0,0,Ne.width,Ne.height),h.default.Util.releaseCanvas(Xe),L&&K.find(".page-background").forEach(be=>be.show()),ce.forEach(be=>{be.visible(be.getAttr("oldVisible"))}),me.forEach(be=>{be.visible(be.getAttr("oldVisible"))}),K.find(".page-background").forEach(be=>be.shadowEnabled(!0)),K.find(".page-background").forEach(be=>be.strokeEnabled(!0)),G.find("Transformer").forEach(be=>{be.visible(be.getAttr("oldVisible"))}),K.find(".highlighter").forEach(be=>be.visible(!0)),Q.clip(ee),ae.clip(se),G.position(ne),C.setElementsPixelRatio(D),V==null||V.set({_exporting:!1,_forceMount:!1}),Ne},async toDataURL(x={}){var{mimeType:L,quality:A}=x,N=i(x,["mimeType","quality"]);const F=await C._toCanvas(Object.assign({mimeType:L},N)),U=F.toDataURL(L,A);return h.default.Util.releaseCanvas(F),U},async toBlob(x={}){var{mimeType:L,quality:A}=x,N=i(x,["mimeType","quality"]);const F=await C._toCanvas(Object.assign({mimeType:L},N)),U=await new Promise(W=>{F.toBlob(W,L,A)});return h.default.Util.releaseCanvas(F),U},async saveAsImage(x={}){var{fileName:L}=x,A=i(x,["fileName"]);const N=A.mimeType||"image/png",F=N.split("/")[1];(0,p.downloadFile)(await C.toDataURL(A),L||"polotno."+F,N)},async _toPDF(x){const L=x.dpi||C.dpi,A=x.parallel||1,N=x.unit||(C.unit==="px"?"mm":C.unit),F=x.pixelRatio||1,U=x.pageIds||C.pages.map(se=>se.id),W=C.pages.filter(se=>U.includes(se.id)),$=await(0,w.getJsPDF)(),Z=se=>(0,m.pxToUnit)({px:se,unit:N,dpi:L}),V=x.cropMarkSize||0,G=Z(V),z=W[0]||{},D=x.includeBleed?z.bleed:0,K=Z(z.computedWidth+2*D+2*G),ne=Z(z.computedHeight+2*D+2*G);var Q=new $({unit:N,orientation:K>ne?"landscape":"portrait",format:[K,ne],compress:!0,putOnlyUsedFonts:!0});Q.deletePage(1);const ee=((se,ce)=>{for(var me=[],Se=0;Se<se.length;Se+=ce)me.push(se.slice(Se,Se+ce));return me})(W,A);let ae=0;for(const se of ee){const ce=se.map(async me=>{const Se=x.includeBleed?me.bleed:0,Oe=me.computedWidth+2*Se+2*V,Ne=me.computedHeight+2*Se+2*V,xe=Z(Oe),ve=Z(Ne);let Xe=0,be=F;for(;Xe<10;){Xe+=1,Xe===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const Ae=await C.toDataURL(Object.assign(Object.assign({},x),{pageId:me.id,pixelRatio:be}));if(Ae.length>20)return x.onProgress&&x.onProgress(++ae/U.length*.9),{url:Ae,width:xe,height:ve,widthPx:Oe,heightPx:Ne};be*=.8}});(await Promise.all(ce)).forEach(({url:me,width:Se,height:Oe,widthPx:Ne,heightPx:xe})=>{Q.addPage([Se,Oe],Se>Oe?"landscape":"portrait");const ve=Q.getCurrentPageInfo();var Xe;switch(N){case"pt":Xe=1;break;case"mm":Xe=72/25.4;break;case"cm":Xe=72/2.54;break;case"in":Xe=72;break;case"px":Xe=.75;break;case"pc":case"em":Xe=12;break;case"ex":Xe=6;break;default:throw"Invalid unit: "+N}if(ve.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:Se*Xe,topRightY:Oe*Xe},ve.pageContext.artBox={bottomLeftX:Z(V+D)*Xe,bottomLeftY:Z(V+D)*Xe,topRightX:Z(Ne-V-D)*Xe,topRightY:Z(xe-V-D)*Xe},ve.pageContext.bleedBox={bottomLeftX:Z(V+D)*Xe,bottomLeftY:Z(V+D)*Xe,topRightX:Z(Ne-V-D)*Xe,topRightY:Z(xe-V-D)*Xe},G){Q.setLineWidth(Z(1));const be=G+Z(D);Q.line(be,0,be,G),Q.line(0,be,G,be),Q.line(Se-be,0,Se-be,G),Q.line(Se,be,Se-G,be),Q.line(0,Oe-be,G,Oe-be),Q.line(be,Oe,be,Oe-G),Q.line(Se,Oe-be,Se-G,Oe-be),Q.line(Se-be,Oe,Se-be,Oe-G)}Q.addImage(me,G,G,Se-2*G,Oe-2*G,void 0,"FAST")})}return Q},toPDFDataURL:async x=>(await C._toPDF(Object.assign({mimeType:"image/jpeg"},x))).output("datauristring"),async toGIFDataURL(x={}){const L=x.pixelRatio||1,A=await(0,d.createGIF)({width:C.width*L,height:C.height*L}),N=1e3/(x.fps||10),F=C.duration/N;for(let U=0;U<F-1;U++){const W=U*N||1;C.setCurrentTime(W);let $=0,Z="";for(const G of C.pages)if($+=G.duration,G.set({_rendering:$>W}),$>W){Z=G.id;break}const V=await C._toCanvas({pixelRatio:L,pageId:Z,_skipTimeout:!0});A.addFrame(V.getContext("2d"),{delay:N,copy:!0})}for(const U of C.pages)U.set({_rendering:!1});return C.stop(),A.render(),new Promise(U=>{A.on("finished",function(W){(function($,Z){var V=new FileReader;V.onload=function(G){Z(G.target.result)},V.readAsDataURL($)})(W,U)})})},async saveAsGIF(x={}){var{fileName:L}=x,A=i(x,["fileName"]);const N=await C.toGIFDataURL(A);(0,p.downloadFile)(N,L||"polotno.gif")},async toHTML({elementHook:x}={elementHook:void 0}){const L=C.toJSON();return(0,b.jsonToHTML)({json:L,elementHook:x})},async saveAsHTML({fileName:x}={}){const L=await C.toHTML(),A="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(L)));(0,p.downloadFile)(A,x||"polotno.html")},async toSVG({elementHook:x,pageId:L}={elementHook:void 0,pageId:void 0}){var A;const N=C.toJSON();L=L||((A=N.pages[0])===null||A===void 0?void 0:A.id);const F=N.pages.find(U=>U.id===L);return(0,O.jsonToSVG)({json:Object.assign(Object.assign({},N),{pages:F?[F]:[]}),elementHook:x})},async saveAsSVG({fileName:x,elementHook:L,pageId:A}={}){const N=await C.toSVG({elementHook:L,pageId:A}),F="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(N)));(0,p.downloadFile)(F,x||"polotno.svg")},async saveAsPDF(x={}){var{fileName:L}=x,A=i(x,["fileName"]);(await C._toPDF(Object.assign({mimeType:"image/jpeg"},A))).save(L||"polotno.pdf")},async waitLoading({_skipTimeout:x=!1}={}){x||await new Promise(L=>setTimeout(L,50)),await(0,S.whenLoaded)()},toJSON:()=>({width:C.width,height:C.height,fonts:(0,l.getSnapshot)(C.fonts),pages:(0,l.getSnapshot)(C.pages),audios:(0,l.getSnapshot)(C.audios),unit:C.unit,dpi:C.dpi,custom:C.custom}),loadJSON(x,L=!1){var A;const N=Object.assign({},x),F=C.pages.indexOf(C.activePage);let U=(A=N.pages[F]||N.pages[0])===null||A===void 0?void 0:A.id;N._activePageId=U;const W=Object.assign({},(0,l.getSnapshot)(C));Object.assign(W,N),W.history=L?C.history.toJSON():{history:[],undoIdx:-1},(0,l.applySnapshot)(C,W)},clear({keepHistory:x=!1}={}){const L=C.pages.map(A=>A.id);C.deletePages(L),C.custom=null,x||C.history.clear()},addFont(x){C.removeFont(x.fontFamily),C.fonts.push(x),C.loadFont(x.fontFamily)},removeFont(x){C.fonts.filter(L=>L.fontFamily===x).forEach(L=>(0,l.destroy)(L))},addAudio(x){const L=M.Audio.create(Object.assign({id:(0,c.nanoid)(10)},x));C.audios.push(L)},removeAudio(x){const L=C.audios.find(A=>A.id===x);L&&C.audios.remove(L)},async loadFont(x){const L=C.fonts.find(N=>N.fontFamily===x)||E.globalFonts.find(N=>N.fontFamily===x);let A=[{fontStyle:"normal",fontWeight:"normal"}];return L?(L.styles&&(A=L.styles.map(N=>({fontStyle:N.fontStyle||"normal",fontWeight:N.fontWeight||"normal"}))),E.injectCustomFont(L)):E.injectGoogleFont(x),Promise.all(A.map(N=>E.loadFont(x,N.fontStyle,N.fontWeight)))},validate:x=>e.Store.validate(x,[{path:"",type:e.Store}]).map(L=>({path:"store"+L.context.map(A=>A.path).join("."),message:L.message}))})),e.default=j}(Ms)),Ms}var C4;function l_(){return C4||(C4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const r=hl,t=u0,n=Tm(),a=s_(),i=gp();e.Node=r.types.model("Node",{id:r.types.identifier,type:"none",name:"",opacity:1,custom:r.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(o=>{for(var l in o)o[l]===null&&(o[l]=void 0);return o}).postProcessSnapshot(o=>{const l=Object.assign({},o),u={};for(var c in l)c[0]!=="_"&&(u[c]=o[c]);return u}).views(o=>({get locked(){return!(o.draggable||o.contentEditable||o.styleEditable||o.resizable)},get page(){return(0,r.getParentOfType)(o,a.Page)},get store(){return(0,r.getParentOfType)(o,n.Store)},get top(){let l=o;for(;;){if(!(0,r.hasParentOfType)(l,i.GroupElement))return l;l=(0,r.getParentOfType)(l,i.GroupElement)}},get parent(){return(0,r.hasParentOfType)(o,i.GroupElement)?(0,r.getParentOfType)(o,i.GroupElement):(0,r.hasParentOfType)(o,a.Page)?(0,r.getParentOfType)(o,a.Page):(0,r.hasParentOfType)(o,n.Store)?(0,r.getParentOfType)(o,n.Store):null},get zIndex(){return o.parent.children.indexOf(o)}})).actions(o=>({toJSON:()=>Object.assign({},(0,r.getSnapshot)(o))})).actions(o=>({clone(l={},{skipSelect:u=!1}={}){const c=JSON.parse(JSON.stringify(o.toJSON()));return l.id=l.id||(0,t.nanoid)(10),(0,i.forEveryChild)(c,h=>{h.id=(0,t.nanoid)(10)}),Object.assign(c,l),o.page.addElement(c,{skipSelect:u})},set(l){Object.assign(o,l)},moveUp(){o.page.moveElementsUp([o.id])},moveTop(){o.page.moveElementsTop([o.id])},moveDown(){o.page.moveElementsDown([o.id])},moveBottom(){o.page.moveElementsBottom([o.id])},setZIndex(l){o.parent.setElementZIndex(o.id,l)},beforeDestroy(){}}))}(Rv)),Rv}var Vv={},Wv={},k4;function ek(){return k4||(k4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const r=Fh(),t={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},n={right:{cropX:-1},left:{cropX:1},up:{cropY:1},down:{cropY:-1}};e.animations={fade:({dTime:a,element:i,animation:o})=>{const l=a/o.duration;return o.type==="enter"?{opacity:l*i.opacity}:{opacity:(1-l)*i.opacity}},rotate:({dTime:a,element:i,animation:o})=>{const l=a/o.duration*360;return(0,r.rotateAroundCenter)({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation},l)},blink:({dTime:a,element:i,animation:o})=>{const l=o.duration,u=a%l/(l/2),c=u<=1?u:2-u;return{opacity:i.opacity*c}},bounce:({dTime:a,element:i,animation:o})=>{var l;const u=o.duration,c=u/2,h=(l=o.data.strength)!==null&&l!==void 0?l:1,p={},w={x:i.x+i.width/3*h,y:i.y+i.height/3*h,width:i.width/3*h,height:i.height/3*h,fontSize:i.fontSize/3*h},d={x:i.x,y:i.y,width:i.width,height:i.height,fontSize:i.fontSize},_=a%u/c,E=_<=1?_:2-_;for(let S in w){const m=w[S],g=d[S]-m;p[S]=m+E*g}return p},move:({dTime:a,element:i,animation:o})=>{var l;const u=t[o.data.direction]||t.right,c=(l=o.data.strength)!==null&&l!==void 0?l:1,h={};for(var p in u.from){let w=u.from[p],d=u.to[p];o.type==="exit"&&(w=u.to[p],d=-u.from[p]),w*=c,d*=c;const _=i[p]+w,E=i[p]+d-_;h[p]=_+a/o.duration*E}return h},zoom:({dTime:a,element:i,animation:o})=>{var l;const u={},c=1+(((o.data.direction||"in")==="in"?.75:1.25)-1)*((l=o.data.strength)!==null&&l!==void 0?l:1),h=i.rotation*Math.PI/180,p=Math.cos(h),w=Math.sin(h),d=i.width*(1-c),_=i.height*(1-c),E=(d*p-_*w)/2,S=(d*w+_*p)/2,m={x:i.x+E,y:i.y+S,width:i.width*c,height:i.height*c,fontSize:i.fontSize*c},g={x:i.x,y:i.y,width:i.width,height:i.height,fontSize:i.fontSize};for(var v in m){let b=m[v],O=g[v];if(o.type==="exit"){const T=b;b=O,O=T}const I=O-b;u[v]=b+a/o.duration*I}return u},cameraZoom:({dTime:a,element:i,animation:o})=>{var l,u,c;const h={},p=o.data.direction||"right",w=n[p]||n.right,d=(l=o.data.movementStrength)!==null&&l!==void 0?l:.1,_=(u=o.data.shakeStrength)!==null&&u!==void 0?u:.015;c=o.data.zoomStrength;const E=a/o.duration,S=_*(1-E),m=Math.sin(12*E)*S*.7+Math.sin(8*E)*S*.3;o.type==="exit"&&Math.max(i.cropWidth||1,i.cropHeight||1),o.type;const g=1-Math.pow(1-E,2),v=i.cropX||0,b=i.cropY||0,O=i.cropWidth||1,I=i.cropHeight||1,T=O,M=I;let j,C,x=0,L=0;if(w.cropX){const A=w.cropX>0?1-(v+O):v;x=Math.min(A,Math.abs(d))*w.cropX}if(w.cropY){const A=w.cropY>0?1-(b+I):b;L=Math.min(A,Math.abs(d))*w.cropY}return o.type==="enter"?(j=w.cropX?v+x*(1-g):v,C=w.cropY?b+L*(1-g):b):(j=w.cropX?v+x*g:v,C=w.cropY?b+L*g:b),h.cropX=Math.max(0,Math.min(1-T,j+m*T)),h.cropY=Math.max(0,Math.min(1-M,C+m*M)),h.cropWidth=T,h.cropHeight=M,h}},e.animate=({element:a,dTime:i,animation:o})=>{const l=e.animations[o.name];return l?l({element:a,dTime:i,animation:o}):(console.error("Can not find animation type: "+o.name),{})},e.registerAnimation=(a,i)=>{e.animations[a]&&console.warn(`Animation "${a}" already exists and will be overridden`),e.animations[a]=i}}(Wv)),Wv}var L4;function Dh(){return L4||(L4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.ShapeFilter=e.getDiff=e.Animation=void 0;const r=hl,t=ek(),n=fl,a=l_();e.Animation=r.types.model("Animation",{delay:0,duration:500,enabled:!0,type:r.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:r.types.frozen({})}),e.getDiff=(i,o)=>{const l={};for(const u in o)if(typeof i[u]=="number"&&typeof o[u]=="number"){const c=o[u]-i[u];c!==0&&(l[u]=c)}return l},e.ShapeFilter=r.types.model("ShapeFilter",{intensity:1}),e.Shape=a.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:r.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,filters:r.types.map(e.ShapeFilter),shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(i=>{const o=Object.assign(Object.assign({},i),{x:i.x||0,y:i.y||0,filters:Array.isArray(i.filters)?{}:i.filters});return"width"in i&&(o.width=o.width||1),"height"in i&&(o.height=o.height||1),i.locked&&(o.draggable=!1,o.contentEditable=!1,o.styleEditable=!1,o.resizable=!1,o.removable=!1),o}).views(i=>{const o=(0,n.observable)({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation,opacity:i.opacity,color:i.color,fontSize:i.fontSize}),l=(0,n.action)(c=>{Object.assign(o,c)}),u=(0,n.action)(c=>{for(const h in c)typeof o[h]=="number"&&(o[h]=o[h]+c[h])});return{get a(){const{currentTime:c}=i.store;if(l({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation,opacity:i.opacity,color:i.color,fontSize:i.fontSize,cropX:i.cropX,cropY:i.cropY,cropWidth:i.cropWidth,cropHeight:i.cropHeight}),c===0)return o;const h=c-i.page.startTime;if(h>i.page.duration||h<0)return o;const p=i.store.animatedElementsIds;if(p.length&&!p.includes(i.id))return o;const w=i.animations.find(m=>m.type==="enter"),d=(w==null?void 0:w.enabled)&&h<w.delay;d&&l({opacity:0});const _=(w==null?void 0:w.enabled)&&h>=w.delay&&h<=w.delay+w.duration;if(_){const m=h-w.delay,g=(0,t.animate)({element:i,animation:w,dTime:m}),v=(0,e.getDiff)(i,g);u(v)}const E=i.animations.find(m=>m.type==="exit");if(!d&&!_&&(E!=null&&E.enabled)&&h>=i.page.duration-E.duration-E.delay&&h<=i.page.duration-E.delay){const m=h-(i.page.duration-E.duration-E.delay),g=(0,t.animate)({element:i,animation:E,dTime:m}),v=(0,e.getDiff)(i,g);u(v)}E!=null&&E.enabled&&h>=i.page.duration-E.delay&&l({opacity:0});const S=i.animations.find(m=>m.type==="loop");if(S!=null&&S.enabled){const m=h,g=(0,t.animate)({element:i,animation:S,dTime:m}),v=(0,e.getDiff)(i,g);u(v)}return o},animated:c=>i.a[c]}}).actions(i=>({setAnimation(o,l){const u=i.animations.find(c=>c.type===o);u?Object.assign(u,l):i.animations.push(Object.assign({type:o},l))},setFilter(o,l){i.filters.clear(),l!==0&&i.filters.set(o,{intensity:l})}}))}(Vv)),Vv}var $v={},N4;function tk(){return N4||(N4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const r=hl,t=Dh();e.TextElement=t.Shape.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:r.types.optional(r.types.union(r.types.number,r.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(n=>Object.assign({},n)).actions(n=>({toggleEditMode(a){n._editModeEnabled=a??!n._editModeEnabled,n._editModeEnabled?n.store.history.startTransaction():n.store.history.endTransaction()}}))}($v)),$v}var Yv={},T4;function Rm(){return T4||(T4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const r=Dh();e.ImageElement=r.Shape.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,_cropModeEnabled:!1}).actions(t=>({toggleCropMode(n){t._cropModeEnabled=n??!t._cropModeEnabled,t._cropModeEnabled?t.store.history.startTransaction():t.store.history.endTransaction()},beforeDestroy(){t._cropModeEnabled&&t.store.history.endTransaction()}}))}(Yv)),Yv}var Xv={},R4;function rk(){return R4||(R4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const r=Rm();e.VideoElement=r.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(Xv)),Xv}var Kv={},M4;function nk(){return M4||(M4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const r=hl,t=Dh();e.LineElement=t.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:r.types.array(r.types.number),startHead:"",endHead:""}).actions(n=>({}))}(Kv)),Kv}var Zv={},I4;function ik(){return I4||(I4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const r=hl,t=Dh();e.SVGElement=t.Shape.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:r.types.map(r.types.string)}).preProcessSnapshot(n=>Object.assign(Object.assign({},n),{src:n.src||n.svgSource,colorsReplace:Array.isArray(n.colorsReplace)?{}:n.colorsReplace})).actions(n=>({replaceColor(a,i){n.colorsReplace.set(a,i)}}))}(Zv)),Zv}var Qv={},j4;function ak(){return j4||(j4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const r=hl,t=Dh();e.FigureElement=t.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:r.types.array(r.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(Qv)),Qv}var Jv={},F4;function ok(){return F4||(F4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const r=Rm();e.GifElement=r.ImageElement.named("Gif").props({type:"gif",duration:0,keepRatio:!0})}(Jv)),Jv}var D4;function gp(){return D4||(D4=1,function(e){var r=Jd&&Jd.__rest||function(E,S){var m={};for(var g in E)Object.prototype.hasOwnProperty.call(E,g)&&S.indexOf(g)<0&&(m[g]=E[g]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(g=Object.getOwnPropertySymbols(E);v<g.length;v++)S.indexOf(g[v])<0&&Object.prototype.propertyIsEnumerable.call(E,g[v])&&(m[g[v]]=E[g[v]])}return m};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=function(E,S){const m=E.type;if(!m)throw new Error('You must pass "type" attribute to custom model.');let g=i.Shape.named(m).props(E);S&&(g=S(g)),e.TYPES_MAP[m]=g,_.push(g)};const t=hl,n=u0,a=l_(),i=Dh(),o=tk(),l=Rm(),u=rk(),c=nk(),h=ik(),p=ak(),w=ok();e.forEveryChild=(E,S)=>{if(E.children)for(const m of E.children){if(S(m)===!0)break;(0,e.forEveryChild)(m,S)}};const d=[...new Array(20)].map((E,S)=>t.types.late(()=>_[S]));e.ElementTypes=t.types.union({dispatcher:E=>{const S=e.TYPES_MAP[E.type];if(!S)throw new Error(`Unknown element type: "${E.type}"`);return S}},h.SVGElement,o.TextElement,l.ImageElement,c.LineElement,u.VideoElement,p.FigureElement,w.GifElement,t.types.late(()=>e.GroupElement),...d),e.GroupElement=a.Node.named("Group").props({type:"group",children:t.types.array(e.ElementTypes)}).views(E=>({get draggable(){let S=!0;return(0,e.forEveryChild)(E,m=>{m.draggable||(S=!1)}),S},get resizable(){let S=!0;return(0,e.forEveryChild)(E,m=>{m.resizable||(S=!1)}),S},get contentEditable(){let S=!0;return(0,e.forEveryChild)(E,m=>{m.contentEditable||(S=!1)}),S},get styleEditable(){let S=!0;return(0,e.forEveryChild)(E,m=>{m.styleEditable||(S=!1)}),S},get locked(){let S=!0;return(0,e.forEveryChild)(E,m=>{m.locked||(S=!1)}),S}})).actions(E=>({set(S){var{draggable:m,contentEditable:g,styleEditable:v,resizable:b}=S,O=r(S,["draggable","contentEditable","styleEditable","resizable"]);m!==void 0&&(0,e.forEveryChild)(E,I=>{I.set({draggable:m})}),g!==void 0&&(0,e.forEveryChild)(E,I=>{I.set({contentEditable:g})}),v!==void 0&&(0,e.forEveryChild)(E,I=>{I.set({styleEditable:v})}),b!==void 0&&(0,e.forEveryChild)(E,I=>{I.set({resizable:b})}),Object.assign(E,O)},addElement(S,{skipSelect:m=!1}={}){const g=e.TYPES_MAP[S.type];if(!g)return void console.error("Can not find model with type "+S.type);S.children&&S.children.forEach(b=>{b.id=(0,n.nanoid)(10)});const v=g.create(Object.assign({id:(0,n.nanoid)(10)},S));return E.children.push(v),v.selectable&&!m&&E.store.selectElements([v.id]),v},setElementZIndex(S,m){const g=E.children.find(v=>v.id===S);g&&((0,t.detach)(g),E.children.remove(g),E.children.splice(m,0,g))}}));const _=[];e.TYPES_MAP={svg:h.SVGElement,text:o.TextElement,image:l.ImageElement,group:e.GroupElement,line:c.LineElement,video:u.VideoElement,figure:p.FigureElement,gif:w.GifElement}}(Jd)),Jd}var B4;function sk(){return B4||(B4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isClipboardEmpty=e.paste=e.cut=e.copy=void 0;const r=gp(),t=Fh();let n={data:[],pageId:""};const a="polotno_clipboard",i=(l,u)=>{n={data:JSON.parse(JSON.stringify(l)),pageId:u};try{localStorage.setItem(a,JSON.stringify(l)),localStorage.setItem(a+"_page",u)}catch{}},o=()=>{try{const l=localStorage.getItem(a),u=localStorage.getItem(a+"_page");if(l)return{data:JSON.parse(l),pageId:u}}catch{}return n};e.copy=l=>{var u;l.selectedElements.length!==0&&i(l.selectedElements.map(c=>c.toJSON()),(u=l.activePage)===null||u===void 0?void 0:u.id)},e.cut=l=>{var u;i(l.selectedElements.map(h=>h.toJSON()),(u=l.activePage)===null||u===void 0?void 0:u.id);let c=l.selectedElements.filter(h=>h.removable).map(h=>h.id);l.deleteElements(c)},e.paste=l=>{l.history.transaction(()=>{var u,c;let h=0,p=0;const{data:w,pageId:d}=o();if(d===((u=l.activePage)===null||u===void 0?void 0:u.id))h=l.width/20,p=l.height/20;else{const E=[];(0,r.forEveryChild)({children:w},m=>{m.type!=="group"&&E.push(m)});const S=(0,t.getTotalClientRect)(E);S.maxX>l.width&&(h=-S.minX),S.maxY>l.height&&(p=-S.minY)}const _=[];(0,r.forEveryChild)({children:w},E=>{delete E.id,E.type!=="group"&&(E.x+=h,E.y+=p)}),w.forEach(E=>{var S;const m=(S=l.activePage)===null||S===void 0?void 0:S.addElement(E);m&&_.push(m.id)}),i(w,(c=l.activePage)===null||c===void 0?void 0:c.id),l.selectElements(_)})},e.isClipboardEmpty=()=>o().data.length===0}(Tv)),Tv}var q4;function lk(){return q4||(q4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=function(t,n){var a,i,o,l;if(((a=document.activeElement)===null||a===void 0?void 0:a.tagName)==="INPUT"||((i=document.activeElement)===null||i===void 0?void 0:i.tagName)==="TEXTAREA"||((o=document.activeElement)===null||o===void 0?void 0:o.contentEditable)==="true")return;const u=n.selectedElements.filter(p=>p.removable).map(p=>p.id);t.keyCode!==46&&t.keyCode!==8||n.deleteElements(u);const c=t.ctrlKey||t.metaKey,h=t.shiftKey;if(!c||h||t.key.toLowerCase()!=="z"&&t.key.toLowerCase()!=="y"||(t.preventDefault(),n.history.undo()),c&&h&&(t.key.toLowerCase()==="z"||t.key.toLowerCase()==="y")&&(t.preventDefault(),n.history.redo()),c&&t.code==="KeyA"){t.preventDefault();const p=(l=n.activePage)===null||l===void 0?void 0:l.children.filter(d=>d.selectable),w=(p==null?void 0:p.map(d=>d.id))||[];n.selectElements(w)}c&&t.code==="KeyC"&&(t.preventDefault(),(0,r.copy)(n)),c&&t.code==="KeyX"&&(t.preventDefault(),(0,r.cut)(n)),c&&t.code==="KeyV"&&(t.preventDefault(),(0,r.paste)(n)),t.code==="ArrowDown"&&(t.preventDefault(),n.selectedElements.forEach(p=>{p.draggable&&p.set({y:p.y+1})})),t.code==="ArrowUp"&&(t.preventDefault(),n.selectedElements.forEach(p=>{p.draggable&&p.set({y:p.y-1})})),t.code==="ArrowLeft"&&(t.preventDefault(),n.selectedElements.forEach(p=>{p.draggable&&p.set({x:p.x-1})})),t.code==="ArrowRight"&&(t.preventDefault(),n.selectedElements.forEach(p=>{p.draggable&&p.set({x:p.x+1})}))};const r=sk()}(Nv)),Nv}var e2={},z4;function uk(){return z4||(z4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const r=fl,t=(0,r.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",filters:"Filters",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",strength:"Strength",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear",angle:"Angle"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Add file",uploadTip:"Upload your assets",background:"Background",resize:"Resize",layers:"Layers",animate:"Animate",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",clipImage:"Mask image",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"},contextMenu:{duplicate:"Duplicate",remove:"Remove",lock:"Lock",unlock:"Unlock",copy:"Copy",paste:"Paste",copyStyle:"Copy style",moveUp:"Move up",moveDown:"Move down",moveBack:"Move back",moveForward:"Move forward"}}),n=l=>l&&typeof l=="object";function a(l,u){Object.keys(u).forEach(c=>{const h=l[c],p=u[c];n(p)&&n(h)?a(h,p):l[c]=p})}function i(l,u,c=""){Object.keys(u).forEach(h=>{const p=u[h],w=c?`${c}.${h}`:h;n(p)?n(l[h])?i(l[h],p,w):console.warn(`Missing nested translation object at '${w}'`):l[h]===void 0&&console.warn(`Missing translation '${w}'`)})}e.setTranslations=(0,r.action)((l,{validate:u=!1}={})=>{u&&i(l,t),a(t,l)}),e.getTranslations=()=>(0,r.toJS)(t);const o={};e.t=l=>{const u=function(p,w){var d,_=w.split("."),E=p;for(d=0;d<_.length;++d){if(E[_[d]]==null)return;E=E[_[d]]}return E}(t,l);if(u!==void 0)return u;o[l]||(o[l]=!0,console.warn(`Missing translation '${l}'`));const c=l.split("."),h=c[c.length-1]||" ";return h.charAt(0).toUpperCase()+h.slice(1)}}(e2)),e2}var U4;function ck(){return U4||(U4=1,function(e){var r=Xh&&Xh.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=r(di()),n=zs,a=r(DC()),i=BC(),o=qC(),l=lk(),u=uk(),c=({store:p})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,u.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{p.addPage()}},(0,u.t)("workspace.addPage"))),h=({width:p,height:w,xPadding:d,yPadding:_,backgroundColor:E})=>t.default.createElement("div",{style:{width:p+"px",height:w+"px",backgroundColor:E,paddingLeft:d+"px",paddingRight:d+"px",paddingTop:_+"px",paddingBottom:_+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:p,pageControlsEnabled:w,backgroundColor:d,pageBorderColor:_,activePageBorderColor:E,bleedColor:S,components:m,onKeyDown:g,paddingX:v,paddingY:b,altCloneEnabled:O=!0,visiblePagesOffset:I,renderOnlyActivePage:T})=>{var M;const j=v??20,C=b??55,[x,L]=t.default.useState({width:100,height:100}),A=t.default.useRef(x),N=t.default.useRef(null),F=t.default.useRef(null),U=p.bleedVisible?Math.max(0,...p.pages.map(Ne=>Ne.bleed)):0,W=Math.max(...p.pages.map(Ne=>Ne.computedWidth)),$=Math.max(...p.pages.map(Ne=>Ne.computedHeight)),Z=((M=p.activePage)===null||M===void 0?void 0:M.computedHeight)||0,V=W+2*U,G=(T?Z:$)+2*U,z=async({skipTimeout:Ne}={skipTimeout:!1})=>{if(Ne||await new Promise(he=>setTimeout(he,50)),N.current===null)return;const xe=N.current.getBoundingClientRect();xe.width!==0&&xe.height!==0||(console.warn(`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
365
|
-
Width or height of parent elements is equal 0.
|
|
366
|
-
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
367
|
-
For simpler debugging here is the log of the parent element:`),console.log(N.current));const ve=F.current.clientWidth||xe.width,Xe={width:ve,height:xe.height};(A.current.width!==Xe.width||A.current.height!==Xe.height)&&(L(Xe),A.current=Xe);const be=(ve-2*j)/V,Ae=p.pages.length>1?3.1:2,Ee=(xe.height-C*Ae)/G,Le=Math.max(Math.min(be,Ee),.01);p.scaleToFit!==Le&&(p.setScale(Le),p._setScaleToFit(Le))};t.default.useLayoutEffect(()=>{z({skipTimeout:!0})},[]),t.default.useEffect(()=>{z()},[V,G]),t.default.useEffect(()=>{p.__()},[]),t.default.useEffect(()=>{const Ne=N.current;if(window.ResizeObserver){const xe=new ResizeObserver(()=>{z({skipTimeout:!0})});return xe.observe(Ne),()=>xe.unobserve(Ne)}{const xe=setInterval(()=>{z({skipTimeout:!0})},100);return()=>clearInterval(xe)}},[V,G]);const D=Math.max(j,(x.width-V*p.scale)/2),K=T?1:p.pages.length,ne=G*p.scale*K,Q=Math.max(C,(x.height-ne)/K/2);t.default.useEffect(()=>{const Ne=xe=>{(g||l.handleHotkey)(xe,p)};return window.addEventListener("keydown",Ne),()=>window.removeEventListener("keydown",Ne)},[]),t.default.useEffect(()=>{var Ne;const xe=ve=>{if(ve.ctrlKey||ve.metaKey){ve.preventDefault();const Ee=Math.max(5,p.scaleToFit),Le=Math.min(.1,p.scaleToFit),he=.03,ke=(Xe=ve.deltaY<0?p.scale*(1+he):p.scale/(1+he),be=Le,Ae=Ee,Math.max(be,Math.min(Ae,Xe)));p.setScale(ke)}else var Xe,be,Ae};return(Ne=F.current)===null||Ne===void 0||Ne.addEventListener("wheel",xe),()=>{var ve;return(ve=F.current)===null||ve===void 0?void 0:ve.removeEventListener("wheel",xe)}},[]);const ee=t.default.useRef(!1);((Ne,xe,ve,Xe,be,Ae)=>{const Ee=t.default.useRef({width:xe,height:ve}),Le=t.default.useRef({top:0,left:0}),he=t.default.useRef(!1),ke=t.default.useRef(be.pages.length);he.current=ke.current!==be.pages.length,ke.current=be.pages.length,t.default.useEffect(()=>{const Re=Ne.current,$e=vt=>{Le.current={top:Re.scrollTop,left:Re.scrollLeft}};return Re.addEventListener("scroll",$e),()=>{Re.removeEventListener("scroll",$e)}},[]),t.default.useLayoutEffect(()=>{if(!Ne.current||he.current)return;const Re=Ne.current,$e=(Le.current.left+Re.offsetWidth/2)/Ee.current.width,vt=(Le.current.top+Re.offsetHeight/2)/Ee.current.height;Ae.current=!0,Re.scrollLeft=$e*xe-Re.offsetWidth/2,Re.scrollTop=vt*ve-Re.offsetHeight/2,Ee.current={width:xe,height:ve}},[Xe,xe,ve])})(F,V*p.scale+2*D,G*p.scale+2*Q,p.scale,p,ee);const{handleScroll:ae}=((Ne,xe,ve,Xe,be,Ae)=>{const Ee=t.default.useRef(!1),Le=t.default.useRef(null),he=t.default.useRef(!1);t.default.useEffect(()=>{const Re=Ne.current,$e=()=>{be.current};return Re.addEventListener("scroll",$e),()=>{Re.removeEventListener("scroll",$e)}},[]);const ke=ve.pages.indexOf(ve.activePage);return t.default.useLayoutEffect(()=>{if(Ae||!ve.activePage||!Ne.current||Ee.current)return;const Re=Ne.current,$e=ve.pages.indexOf(ve.activePage)*xe;let vt=()=>{};return(Math.abs($e-Re.scrollTop)>.5*xe||he.current)&&(he.current=!0,vt=(({element:wt,scrollTop:at=0,duration:mt=300,onFinish:Je=()=>{}})=>{const nt=wt.scrollTop,qt=at-nt;let At=0,Ht=!1;if(mt===0)return wt.scrollTop=at,()=>{};const zt=()=>{if(Ht)return;At+=20;const He=Ie(At,nt,qt,mt);wt.scrollTop=He,At<mt?setTimeout(zt,20):Je()},Ie=(He,Nt,ht,gt)=>(He/=gt/2)<1?ht/2*He*He+Nt:-ht/2*(--He*(He-2)-1)+Nt;return zt(),()=>{Ht=!0}})({element:Re,scrollTop:$e,onFinish:()=>{he.current=!1},duration:ve.isPlaying?0:300})),vt},[ve.activePage,ke,ve.isPlaying,Ae]),{handleScroll:Re=>{if(Ae||he.current)return;Ee.current=!0,clearTimeout(Le.current),Le.current=setTimeout(()=>{Ee.current=!1},300);const $e=Re.currentTarget.childNodes[0].offsetHeight,vt=Re.currentTarget.scrollTop,wt=Math.floor((vt+Xe.height/3)/$e),at=ve.pages[wt];at&&ve.activePage!==at&&at.select()}}})(F,G*p.scale+2*Q,p,x,ee,T),se=x.width>=V*p.scale+2*D,ce=d||"rgba(232, 232, 232, 0.9)",me=p.pages.indexOf(p.activePage),Se=(m==null?void 0:m.NoPages)||c,Oe=I??Math.min(3,Math.max(1,Math.ceil(x.height/2/(G*p.scale))));return t.default.createElement("div",{ref:N,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:ce,overflow:"hidden"},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:F,onScroll:ae,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:se?"hidden":"auto"},className:"polotno-workspace-inner"},p.pages.map((Ne,xe)=>{const ve=Ne===p.activePage;if(T&&!ve&&!Ne._exportingOrRendering&&!Ne._forceMount)return null;if(!(Math.abs(xe-me)<=Oe||Ne._exportingOrRendering||Ne._forceMount))return t.default.createElement(h,{key:Ne.id,width:V*p.scale+2*D,height:G*p.scale+2*Q,backgroundColor:ce,xPadding:D,yPadding:Q});const Xe=t.default.createElement(a.default,{key:Ne.id,page:Ne,xPadding:D,yPadding:Q,width:V*p.scale+2*D,height:G*p.scale+2*Q,store:p,pageControlsEnabled:w,backColor:ce,pageBorderColor:_||"lightgrey",activePageBorderColor:E||"rgb(0, 161, 255)",altCloneEnabled:O,bleedColor:S||"rgba(255, 0, 0, 0.1)",components:m,viewportSize:x});return(Ne._exportingOrRendering||Ne._forceMount)&&!ve&&T?t.default.createElement("div",{style:{display:"none"},key:Ne.id},Xe):Xe}),p.rulesVisible&&t.default.createElement(i.TopRules,{store:p,xPadding:D,yPadding:Q,width:V*p.scale+2*D,height:G*p.scale+2*Q}),p.pages.length===0&&t.default.createElement(Se,{store:p}),p.audios.map(Ne=>t.default.createElement(o.AudioElement,{key:Ne.id,audio:Ne,store:p}))))}),e.default=e.WorkspaceCanvas}(Xh)),Xh}var fk=ck(),hk=Tm(),dk=If(),np=tf(),t2=jf(),pk=Op();const gk="modulepreload",vk=function(e,r){return new URL(e,r).href},H4={},O2=function(r,t,n){let a=Promise.resolve();if(t&&t.length>0){let o=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const l=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=o(t.map(h=>{if(h=vk(h,n),h in H4)return;H4[h]=!0;const p=h.endsWith(".css"),w=p?'[rel="stylesheet"]':"";if(!!n)for(let E=l.length-1;E>=0;E--){const S=l[E];if(S.href===h&&(!p||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${w}`))return;const _=document.createElement("link");if(_.rel=p?"stylesheet":gk,p||(_.as="script"),_.crossOrigin="",_.href=h,c&&_.setAttribute("nonce",c),document.head.appendChild(_),p)return new Promise((E,S)=>{_.addEventListener("load",E),_.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return a.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return r().catch(i)})};function On(e){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},On(e)}var Po=Uint8Array,Ds=Uint16Array,Mm=Int32Array,c0=new Po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),f0=new Po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),A2=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u_=function(e,r){for(var t=new Ds(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var a=new Mm(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)a[i]=i-t[n]<<5|n;return{b:t,r:a}},c_=u_(c0,2),f_=c_.b,C2=c_.r;f_[28]=258,C2[258]=28;var h_=u_(f0,0),mk=h_.b,G4=h_.r,k2=new Ds(32768);for(var ri=0;ri<32768;++ri){var Bc=(ri&43690)>>1|(ri&21845)<<1;Bc=(Bc&52428)>>2|(Bc&13107)<<2,Bc=(Bc&61680)>>4|(Bc&3855)<<4,k2[ri]=((Bc&65280)>>8|(Bc&255)<<8)>>1}var Ru=function(e,r,t){for(var n=e.length,a=0,i=new Ds(r);a<n;++a)e[a]&&++i[e[a]-1];var o=new Ds(r);for(a=1;a<r;++a)o[a]=o[a-1]+i[a-1]<<1;var l;if(t){l=new Ds(1<<r);var u=15-r;for(a=0;a<n;++a)if(e[a])for(var c=a<<4|e[a],h=r-e[a],p=o[e[a]-1]++<<h,w=p|(1<<h)-1;p<=w;++p)l[k2[p]>>u]=c}else for(l=new Ds(n),a=0;a<n;++a)e[a]&&(l[a]=k2[o[e[a]-1]++]>>15-e[a]);return l},Yc=new Po(288);for(var ri=0;ri<144;++ri)Yc[ri]=8;for(var ri=144;ri<256;++ri)Yc[ri]=9;for(var ri=256;ri<280;++ri)Yc[ri]=7;for(var ri=280;ri<288;++ri)Yc[ri]=8;var vp=new Po(32);for(var ri=0;ri<32;++ri)vp[ri]=5;var yk=Ru(Yc,9,0),bk=Ru(Yc,9,1),wk=Ru(vp,5,0),_k=Ru(vp,5,1),r2=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Ul=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},n2=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},Im=function(e){return(e+7)/8|0},d_=function(e,r,t){return(t==null||t>e.length)&&(t=e.length),new Po(e.subarray(r,t))},Sk=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Vl=function(e,r,t){var n=new Error(r||Sk[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Vl),!t)throw n;return n},xk=function(e,r,t,n){var a=e.length,i=0;if(!a||r.f&&!r.l)return t||new Po(0);var o=!t,l=o||r.i!=2,u=r.i;o&&(t=new Po(a*3));var c=function(me){var Se=t.length;if(me>Se){var Oe=new Po(Math.max(Se*2,me));Oe.set(t),t=Oe}},h=r.f||0,p=r.p||0,w=r.b||0,d=r.l,_=r.d,E=r.m,S=r.n,m=a*8;do{if(!d){h=Ul(e,p,1);var g=Ul(e,p+1,3);if(p+=3,g)if(g==1)d=bk,_=_k,E=9,S=5;else if(g==2){var I=Ul(e,p,31)+257,T=Ul(e,p+10,15)+4,M=I+Ul(e,p+5,31)+1;p+=14;for(var j=new Po(M),C=new Po(19),x=0;x<T;++x)C[A2[x]]=Ul(e,p+x*3,7);p+=T*3;for(var L=r2(C),A=(1<<L)-1,N=Ru(C,L,1),x=0;x<M;){var F=N[Ul(e,p,A)];p+=F&15;var v=F>>4;if(v<16)j[x++]=v;else{var U=0,W=0;for(v==16?(W=3+Ul(e,p,3),p+=2,U=j[x-1]):v==17?(W=3+Ul(e,p,7),p+=3):v==18&&(W=11+Ul(e,p,127),p+=7);W--;)j[x++]=U}}var $=j.subarray(0,I),Z=j.subarray(I);E=r2($),S=r2(Z),d=Ru($,E,1),_=Ru(Z,S,1)}else Vl(1);else{var v=Im(p)+4,b=e[v-4]|e[v-3]<<8,O=v+b;if(O>a){u&&Vl(0);break}l&&c(w+b),t.set(e.subarray(v,O),w),r.b=w+=b,r.p=p=O*8,r.f=h;continue}if(p>m){u&&Vl(0);break}}l&&c(w+131072);for(var V=(1<<E)-1,G=(1<<S)-1,z=p;;z=p){var U=d[n2(e,p)&V],D=U>>4;if(p+=U&15,p>m){u&&Vl(0);break}if(U||Vl(2),D<256)t[w++]=D;else if(D==256){z=p,d=null;break}else{var K=D-254;if(D>264){var x=D-257,ne=c0[x];K=Ul(e,p,(1<<ne)-1)+f_[x],p+=ne}var Q=_[n2(e,p)&G],ee=Q>>4;Q||Vl(3),p+=Q&15;var Z=mk[ee];if(ee>3){var ne=f0[ee];Z+=n2(e,p)&(1<<ne)-1,p+=ne}if(p>m){u&&Vl(0);break}l&&c(w+131072);var ae=w+K;if(w<Z){var se=i-Z,ce=Math.min(Z,ae);for(se+w<0&&Vl(3);w<ce;++w)t[w]=n[se+w]}for(;w<ae;++w)t[w]=t[w-Z]}}r.l=d,r.p=z,r.b=w,r.f=h,d&&(h=1,r.m=E,r.d=_,r.n=S)}while(!h);return w!=t.length&&o?d_(t,0,w):t.subarray(0,w)},lc=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},ep=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8,e[n+2]|=t>>16},i2=function(e,r){for(var t=[],n=0;n<e.length;++n)e[n]&&t.push({s:n,f:e[n]});var a=t.length,i=t.slice();if(!a)return{t:g_,l:0};if(a==1){var o=new Po(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(O,I){return O.f-I.f}),t.push({s:-1,f:25001});var l=t[0],u=t[1],c=0,h=1,p=2;for(t[0]={s:-1,f:l.f+u.f,l,r:u};h!=a-1;)l=t[t[c].f<t[p].f?c++:p++],u=t[c!=h&&t[c].f<t[p].f?c++:p++],t[h++]={s:-1,f:l.f+u.f,l,r:u};for(var w=i[0].s,n=1;n<a;++n)i[n].s>w&&(w=i[n].s);var d=new Ds(w+1),_=L2(t[h-1],d,0);if(_>r){var n=0,E=0,S=_-r,m=1<<S;for(i.sort(function(I,T){return d[T.s]-d[I.s]||I.f-T.f});n<a;++n){var g=i[n].s;if(d[g]>r)E+=m-(1<<_-d[g]),d[g]=r;else break}for(E>>=S;E>0;){var v=i[n].s;d[v]<r?E-=1<<r-d[v]++-1:++n}for(;n>=0&&E;--n){var b=i[n].s;d[b]==r&&(--d[b],++E)}_=r}return{t:new Po(d),l:_}},L2=function(e,r,t){return e.s==-1?Math.max(L2(e.l,r,t+1),L2(e.r,r,t+1)):r[e.s]=t},V4=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new Ds(++r),n=0,a=e[0],i=1,o=function(u){t[n++]=u},l=1;l<=r;++l)if(e[l]==a&&l!=r)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=e[l]}return{c:t.subarray(0,n),n:r}},tp=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},p_=function(e,r,t){var n=t.length,a=Im(r+2);e[a]=n&255,e[a+1]=n>>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var i=0;i<n;++i)e[a+i+4]=t[i];return(a+4+n)*8},W4=function(e,r,t,n,a,i,o,l,u,c,h){lc(r,h++,t),++a[256];for(var p=i2(a,15),w=p.t,d=p.l,_=i2(i,15),E=_.t,S=_.l,m=V4(w),g=m.c,v=m.n,b=V4(E),O=b.c,I=b.n,T=new Ds(19),M=0;M<g.length;++M)++T[g[M]&31];for(var M=0;M<O.length;++M)++T[O[M]&31];for(var j=i2(T,7),C=j.t,x=j.l,L=19;L>4&&!C[A2[L-1]];--L);var A=c+5<<3,N=tp(a,Yc)+tp(i,vp)+o,F=tp(a,w)+tp(i,E)+o+14+3*L+tp(T,C)+2*T[16]+3*T[17]+7*T[18];if(u>=0&&A<=N&&A<=F)return p_(r,h,e.subarray(u,u+c));var U,W,$,Z;if(lc(r,h,1+(F<N)),h+=2,F<N){U=Ru(w,d,0),W=w,$=Ru(E,S,0),Z=E;var V=Ru(C,x,0);lc(r,h,v-257),lc(r,h+5,I-1),lc(r,h+10,L-4),h+=14;for(var M=0;M<L;++M)lc(r,h+3*M,C[A2[M]]);h+=3*L;for(var G=[g,O],z=0;z<2;++z)for(var D=G[z],M=0;M<D.length;++M){var K=D[M]&31;lc(r,h,V[K]),h+=C[K],K>15&&(lc(r,h,D[M]>>5&127),h+=D[M]>>12)}}else U=yk,W=Yc,$=wk,Z=vp;for(var M=0;M<l;++M){var ne=n[M];if(ne>255){var K=ne>>18&31;ep(r,h,U[K+257]),h+=W[K+257],K>7&&(lc(r,h,ne>>23&31),h+=c0[K]);var Q=ne&31;ep(r,h,$[Q]),h+=Z[Q],Q>3&&(ep(r,h,ne>>5&8191),h+=f0[Q])}else ep(r,h,U[ne]),h+=W[ne]}return ep(r,h,U[256]),h+W[256]},Ek=new Mm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),g_=new Po(0),Pk=function(e,r,t,n,a,i){var o=i.z||e.length,l=new Po(n+o+5*(1+Math.ceil(o/7e3))+a),u=l.subarray(n,l.length-a),c=i.l,h=(i.r||0)&7;if(r){h&&(u[0]=i.r>>3);for(var p=Ek[r-1],w=p>>13,d=p&8191,_=(1<<t)-1,E=i.p||new Ds(32768),S=i.h||new Ds(_+1),m=Math.ceil(t/3),g=2*m,v=function(Ne){return(e[Ne]^e[Ne+1]<<m^e[Ne+2]<<g)&_},b=new Mm(25e3),O=new Ds(288),I=new Ds(32),T=0,M=0,j=i.i||0,C=0,x=i.w||0,L=0;j+2<o;++j){var A=v(j),N=j&32767,F=S[A];if(E[N]=F,S[A]=N,x<=j){var U=o-j;if((T>7e3||C>24576)&&(U>423||!c)){h=W4(e,u,0,b,O,I,M,C,L,j-L,h),C=T=M=0,L=j;for(var W=0;W<286;++W)O[W]=0;for(var W=0;W<30;++W)I[W]=0}var $=2,Z=0,V=d,G=N-F&32767;if(U>2&&A==v(j-G))for(var z=Math.min(w,U)-1,D=Math.min(32767,j),K=Math.min(258,U);G<=D&&--V&&N!=F;){if(e[j+$]==e[j+$-G]){for(var ne=0;ne<K&&e[j+ne]==e[j+ne-G];++ne);if(ne>$){if($=ne,Z=G,ne>z)break;for(var Q=Math.min(G,ne-2),ee=0,W=0;W<Q;++W){var ae=j-G+W&32767,se=E[ae],ce=ae-se&32767;ce>ee&&(ee=ce,F=ae)}}}N=F,F=E[N],G+=N-F&32767}if(Z){b[C++]=268435456|C2[$]<<18|G4[Z];var me=C2[$]&31,Se=G4[Z]&31;M+=c0[me]+f0[Se],++O[257+me],++I[Se],x=j+$,++T}else b[C++]=e[j],++O[e[j]]}}for(j=Math.max(j,x);j<o;++j)b[C++]=e[j],++O[e[j]];h=W4(e,u,c,b,O,I,M,C,L,j-L,h),c||(i.r=h&7|u[h/8|0]<<3,h-=7,i.h=S,i.p=E,i.i=j,i.w=x)}else{for(var j=i.w||0;j<o+c;j+=65535){var Oe=j+65535;Oe>=o&&(u[h/8|0]=c,Oe=o),h=p_(u,h+1,e.subarray(j,Oe))}i.i=o}return d_(l,0,n+Im(h)+a)},v_=function(){var e=1,r=0;return{p:function(t){for(var n=e,a=r,i=t.length|0,o=0;o!=i;){for(var l=Math.min(o+2655,i);o<l;++o)a+=n+=t[o];n=(n&65535)+15*(n>>16),a=(a&65535)+15*(a>>16)}e=n,r=a},d:function(){return e%=65521,r%=65521,(e&255)<<24|(e&65280)<<8|(r&255)<<8|r>>8}}},Ok=function(e,r,t,n,a){if(!a&&(a={l:1},r.dictionary)){var i=r.dictionary.subarray(-32768),o=new Po(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return Pk(e,r.level==null?6:r.level,r.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+r.mem,t,n,a)},m_=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8},Ak=function(e,r){var t=r.level,n=t==0?0:t<6?1:t==9?3:2;if(e[0]=120,e[1]=n<<6|(r.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,r.dictionary){var a=v_();a.p(r.dictionary),m_(e,2,a.d())}},Ck=function(e,r){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Vl(6,"invalid zlib data"),(e[1]>>5&1)==1&&Vl(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function N2(e,r){r||(r={});var t=v_();t.p(e);var n=Ok(e,r,r.dictionary?6:2,4);return Ak(n,r),m_(n,n.length-4,t.d()),n}function kk(e,r){return xk(e.subarray(Ck(e),-4),{i:2},r,r)}var Lk=typeof TextDecoder<"u"&&new TextDecoder,Nk=0;try{Lk.decode(g_,{stream:!0}),Nk=1}catch{}var pr=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function a2(){pr.console&&typeof pr.console.log=="function"&&pr.console.log.apply(pr.console,arguments)}var Vn={log:a2,warn:function(e){pr.console&&(typeof pr.console.warn=="function"?pr.console.warn.apply(pr.console,arguments):a2.call(null,arguments))},error:function(e){pr.console&&(typeof pr.console.error=="function"?pr.console.error.apply(pr.console,arguments):a2(e))}};function o2(e,r,t){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){_f(n.response,r,t)},n.onerror=function(){Vn.error("could not download file")},n.send()}function $4(e){var r=new XMLHttpRequest;r.open("HEAD",e,!1);try{r.send()}catch{}return r.status>=200&&r.status<=299}function f1(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}var lp,T2,_f=pr.saveAs||((typeof window>"u"?"undefined":On(window))!=="object"||window!==pr?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,r,t){var n=pr.URL||pr.webkitURL,a=document.createElement("a");r=r||e.name||"download",a.download=r,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin!==location.origin?$4(a.href)?o2(e,r,t):f1(a,a.target="_blank"):f1(a)):(a.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(a.href)},4e4),setTimeout(function(){f1(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,t){if(r=r||e.name||"download",typeof e=="string")if($4(e))o2(e,r,t);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){f1(n)})}else navigator.msSaveOrOpenBlob(function(a,i){return i===void 0?i={autoBom:!1}:On(i)!=="object"&&(Vn.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}(e,t),r)}:function(e,r,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return o2(e,r,t);var a=e.type==="application/octet-stream",i=/constructor/i.test(pr.HTMLElement)||pr.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||a&&i)&&(typeof FileReader>"u"?"undefined":On(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var h=l.result;h=o?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=h:location=h,n=null},l.readAsDataURL(e)}else{var u=pr.URL||pr.webkitURL,c=u.createObjectURL(e);n?n.location=c:location.href=c,n=null,setTimeout(function(){u.revokeObjectURL(c)},4e4)}});/**
|
|
368
|
-
* A class to parse color values
|
|
369
|
-
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
370
|
-
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
371
|
-
* @license Use it if you like it
|
|
372
|
-
*/function y_(e){var r;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],n=0;n<t.length;n++){var a=t[n].re,i=t[n].process,o=a.exec(e);o&&(r=i(o),this.r=r[0],this.g=r[1],this.b=r[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),u=this.g.toString(16),c=this.b.toString(16);return l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),c.length==1&&(c="0"+c),"#"+l+u+c}}/**
|
|
373
|
-
* @license
|
|
374
|
-
* Joseph Myers does not specify a particular license for his work.
|
|
375
|
-
*
|
|
376
|
-
* Author: Joseph Myers
|
|
377
|
-
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
378
|
-
*
|
|
379
|
-
* Modified by: Owen Leong
|
|
380
|
-
*/function s2(e,r){var t=e[0],n=e[1],a=e[2],i=e[3];t=_o(t,n,a,i,r[0],7,-680876936),i=_o(i,t,n,a,r[1],12,-389564586),a=_o(a,i,t,n,r[2],17,606105819),n=_o(n,a,i,t,r[3],22,-1044525330),t=_o(t,n,a,i,r[4],7,-176418897),i=_o(i,t,n,a,r[5],12,1200080426),a=_o(a,i,t,n,r[6],17,-1473231341),n=_o(n,a,i,t,r[7],22,-45705983),t=_o(t,n,a,i,r[8],7,1770035416),i=_o(i,t,n,a,r[9],12,-1958414417),a=_o(a,i,t,n,r[10],17,-42063),n=_o(n,a,i,t,r[11],22,-1990404162),t=_o(t,n,a,i,r[12],7,1804603682),i=_o(i,t,n,a,r[13],12,-40341101),a=_o(a,i,t,n,r[14],17,-1502002290),t=So(t,n=_o(n,a,i,t,r[15],22,1236535329),a,i,r[1],5,-165796510),i=So(i,t,n,a,r[6],9,-1069501632),a=So(a,i,t,n,r[11],14,643717713),n=So(n,a,i,t,r[0],20,-373897302),t=So(t,n,a,i,r[5],5,-701558691),i=So(i,t,n,a,r[10],9,38016083),a=So(a,i,t,n,r[15],14,-660478335),n=So(n,a,i,t,r[4],20,-405537848),t=So(t,n,a,i,r[9],5,568446438),i=So(i,t,n,a,r[14],9,-1019803690),a=So(a,i,t,n,r[3],14,-187363961),n=So(n,a,i,t,r[8],20,1163531501),t=So(t,n,a,i,r[13],5,-1444681467),i=So(i,t,n,a,r[2],9,-51403784),a=So(a,i,t,n,r[7],14,1735328473),t=xo(t,n=So(n,a,i,t,r[12],20,-1926607734),a,i,r[5],4,-378558),i=xo(i,t,n,a,r[8],11,-2022574463),a=xo(a,i,t,n,r[11],16,1839030562),n=xo(n,a,i,t,r[14],23,-35309556),t=xo(t,n,a,i,r[1],4,-1530992060),i=xo(i,t,n,a,r[4],11,1272893353),a=xo(a,i,t,n,r[7],16,-155497632),n=xo(n,a,i,t,r[10],23,-1094730640),t=xo(t,n,a,i,r[13],4,681279174),i=xo(i,t,n,a,r[0],11,-358537222),a=xo(a,i,t,n,r[3],16,-722521979),n=xo(n,a,i,t,r[6],23,76029189),t=xo(t,n,a,i,r[9],4,-640364487),i=xo(i,t,n,a,r[12],11,-421815835),a=xo(a,i,t,n,r[15],16,530742520),t=Eo(t,n=xo(n,a,i,t,r[2],23,-995338651),a,i,r[0],6,-198630844),i=Eo(i,t,n,a,r[7],10,1126891415),a=Eo(a,i,t,n,r[14],15,-1416354905),n=Eo(n,a,i,t,r[5],21,-57434055),t=Eo(t,n,a,i,r[12],6,1700485571),i=Eo(i,t,n,a,r[3],10,-1894986606),a=Eo(a,i,t,n,r[10],15,-1051523),n=Eo(n,a,i,t,r[1],21,-2054922799),t=Eo(t,n,a,i,r[8],6,1873313359),i=Eo(i,t,n,a,r[15],10,-30611744),a=Eo(a,i,t,n,r[6],15,-1560198380),n=Eo(n,a,i,t,r[13],21,1309151649),t=Eo(t,n,a,i,r[4],6,-145523070),i=Eo(i,t,n,a,r[11],10,-1120210379),a=Eo(a,i,t,n,r[2],15,718787259),n=Eo(n,a,i,t,r[9],21,-343485551),e[0]=Hc(t,e[0]),e[1]=Hc(n,e[1]),e[2]=Hc(a,e[2]),e[3]=Hc(i,e[3])}function h0(e,r,t,n,a,i){return r=Hc(Hc(r,e),Hc(n,i)),Hc(r<<a|r>>>32-a,t)}function _o(e,r,t,n,a,i,o){return h0(r&t|~r&n,e,r,a,i,o)}function So(e,r,t,n,a,i,o){return h0(r&n|t&~n,e,r,a,i,o)}function xo(e,r,t,n,a,i,o){return h0(r^t^n,e,r,a,i,o)}function Eo(e,r,t,n,a,i,o){return h0(t^(r|~n),e,r,a,i,o)}function b_(e){var r,t=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=e.length;r+=64)s2(n,Tk(e.substring(r-64,r)));e=e.substring(r-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<e.length;r++)a[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(a[r>>2]|=128<<(r%4<<3),r>55)for(s2(n,a),r=0;r<16;r++)a[r]=0;return a[14]=8*t,s2(n,a),n}function Tk(e){var r,t=[];for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}lp=pr.atob.bind(pr),T2=pr.btoa.bind(pr);var Y4="0123456789abcdef".split("");function Rk(e){for(var r="",t=0;t<4;t++)r+=Y4[e>>8*t+4&15]+Y4[e>>8*t&15];return r}function Mk(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function R2(e){return b_(e).map(Mk).join("")}var Ik=function(e){for(var r=0;r<e.length;r++)e[r]=Rk(e[r]);return e.join("")}(b_("hello"))!="5d41402abc4b2a76b9719d911017c592";function Hc(e,r){if(Ik){var t=(65535&e)+(65535&r);return(e>>16)+(r>>16)+(t>>16)<<16|65535&t}return e+r&4294967295}/**
|
|
381
|
-
* @license
|
|
382
|
-
* FPDF is released under a permissive license: there is no usage restriction.
|
|
383
|
-
* You may embed it freely in your application (commercial or not), with or
|
|
384
|
-
* without modifications.
|
|
385
|
-
*
|
|
386
|
-
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
387
|
-
*/function M2(e,r){var t,n,a,i;if(e!==t){for(var o=(a=e,i=1+(256/e.length>>0),new Array(i+1).join(a)),l=[],u=0;u<256;u++)l[u]=u;var c=0;for(u=0;u<256;u++){var h=l[u];c=(c+h+o.charCodeAt(u))%256,l[u]=l[c],l[c]=h}t=e,n=l}else l=n;var p=r.length,w=0,d=0,_="";for(u=0;u<p;u++)d=(d+(h=l[w=(w+1)%256]))%256,l[w]=l[d],l[d]=h,o=l[(l[w]+l[d])%256],_+=String.fromCharCode(r.charCodeAt(u)^o);return _}/**
|
|
388
|
-
* @license
|
|
389
|
-
* Licensed under the MIT License.
|
|
390
|
-
* http://opensource.org/licenses/mit-license
|
|
391
|
-
* Author: Owen Leong (@owenl131)
|
|
392
|
-
* Date: 15 Oct 2020
|
|
393
|
-
* References:
|
|
394
|
-
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
395
|
-
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
396
|
-
* http://www.fpdf.org/en/script/script37.php
|
|
397
|
-
*/var X4={print:4,modify:8,copy:16,"annot-forms":32};function uh(e,r,t,n){this.v=1,this.r=2;var a=192;e.forEach(function(l){if(X4.perm!==void 0)throw new Error("Invalid permission: "+l);a+=X4[l]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(r+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^a)),this.encryptionKey=R2(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=M2(this.encryptionKey,this.padding)}function ch(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var r="",t=e.length,n=0;n<t;n++){var a=e.charCodeAt(n);a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?r+="#"+("0"+a.toString(16)).slice(-2):r+=e[n]}return r}function K4(e){if(On(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(t,n,a){if(a=a||!1,typeof t!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[n,!!a],i},this.unsubscribe=function(t){for(var n in r)if(r[n][t])return delete r[n][t],Object.keys(r[n]).length===0&&delete r[n],!0;return!1},this.publish=function(t){if(r.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var i in r[t]){var o=r[t][i];try{o[0].apply(e,n)}catch(l){pr.console&&Vn.error("jsPDF PubSub Error",l.message,l)}o[1]&&a.push(i)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function B1(e){if(!(this instanceof B1))return new B1(e);var r="opacity,stroke-opacity".split(",");for(var t in e)e.hasOwnProperty(t)&&r.indexOf(t)>=0&&(this[t]=e[t]);this.id="",this.objectNumber=-1}function w_(e,r){this.gState=e,this.matrix=r,this.id="",this.objectNumber=-1}function Sf(e,r,t,n,a){if(!(this instanceof Sf))return new Sf(e,r,t,n,a);this.type=e==="axial"?2:3,this.coords=r,this.colors=t,w_.call(this,n,a)}function ph(e,r,t,n,a){if(!(this instanceof ph))return new ph(e,r,t,n,a);this.boundingBox=e,this.xStep=r,this.yStep=t,this.stream="",this.cloneIndex=0,w_.call(this,n,a)}function hr(e){var r,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],i=arguments[3],o=[],l=1,u=16,c="S",h=null;On(e=e||{})==="object"&&(t=e.orientation,n=e.unit||n,a=e.format||a,i=e.compress||e.compressPdf||i,(h=e.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),l=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(r=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),c=e.defaultPathOperation||"S"),o=e.filters||(i===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var p=e.putOnlyUsedFonts||!1,w={},d={internal:{},__private__:{}};d.__private__.PubSub=K4;var _="1.3",E=d.__private__.getPdfVersion=function(){return _};d.__private__.setPdfVersion=function(Y){_=Y};var S={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return S};var m=d.__private__.getPageFormat=function(Y){return S[Y]};a=a||"a4";var g={COMPAT:"compat",ADVANCED:"advanced"},v=g.COMPAT;function b(){this.saveGraphicsState(),ve(new ze(nt,0,0,-nt,0,Ko()*nt).toString()+" cm"),this.setFontSize(this.getFontSize()/nt),c="n",v=g.ADVANCED}function O(){this.restoreGraphicsState(),c="S",v=g.COMPAT}var I=d.__private__.combineFontStyleAndFontWeight=function(Y,fe){if(Y=="bold"&&fe=="normal"||Y=="bold"&&fe==400||Y=="normal"&&fe=="italic"||Y=="bold"&&fe=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return fe&&(Y=fe==400||fe==="normal"?Y==="italic"?"italic":"normal":fe!=700&&fe!=="bold"||Y!=="normal"?(fe==700?"bold":fe)+""+Y:"bold"),Y};d.advancedAPI=function(Y){var fe=v===g.COMPAT;return fe&&b.call(this),typeof Y!="function"||(Y(this),fe&&O.call(this)),this},d.compatAPI=function(Y){var fe=v===g.ADVANCED;return fe&&O.call(this),typeof Y!="function"||(Y(this),fe&&b.call(this)),this},d.isAdvancedAPI=function(){return v===g.ADVANCED};var T,M=function(Y){if(v!==g.ADVANCED)throw new Error(Y+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},j=d.roundToPrecision=d.__private__.roundToPrecision=function(Y,fe){var Ce=r||fe;if(isNaN(Y)||isNaN(Ce))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return Y.toFixed(Ce).replace(/0+$/,"")};T=d.hpf=d.__private__.hpf=typeof u=="number"?function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return j(Y,u)}:u==="smart"?function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return j(Y,Y>-1&&Y<1?16:5)}:function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return j(Y,16)};var C=d.f2=d.__private__.f2=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.f2");return j(Y,2)},x=d.__private__.f3=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.f3");return j(Y,3)},L=d.scale=d.__private__.scale=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.scale");return v===g.COMPAT?Y*nt:v===g.ADVANCED?Y:void 0},A=function(Y){return v===g.COMPAT?Ko()-Y:v===g.ADVANCED?Y:void 0},N=function(Y){return L(A(Y))};d.__private__.setPrecision=d.setPrecision=function(Y){typeof parseInt(Y,10)=="number"&&(r=parseInt(Y,10))};var F,U="00000000000000000000000000000000",W=d.__private__.getFileId=function(){return U},$=d.__private__.setFileId=function(Y){return U=Y!==void 0&&/^[a-fA-F0-9]{32}$/.test(Y)?Y.toUpperCase():U.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(gn=new uh(h.userPermissions,h.userPassword,h.ownerPassword,U)),U};d.setFileId=function(Y){return $(Y),this},d.getFileId=function(){return W()};var Z=d.__private__.convertDateToPDFDate=function(Y){var fe=Y.getTimezoneOffset(),Ce=fe<0?"+":"-",je=Math.floor(Math.abs(fe/60)),et=Math.abs(fe%60),ft=[Ce,K(je),"'",K(et),"'"].join("");return["D:",Y.getFullYear(),K(Y.getMonth()+1),K(Y.getDate()),K(Y.getHours()),K(Y.getMinutes()),K(Y.getSeconds()),ft].join("")},V=d.__private__.convertPDFDateToDate=function(Y){var fe=parseInt(Y.substr(2,4),10),Ce=parseInt(Y.substr(6,2),10)-1,je=parseInt(Y.substr(8,2),10),et=parseInt(Y.substr(10,2),10),ft=parseInt(Y.substr(12,2),10),Et=parseInt(Y.substr(14,2),10);return new Date(fe,Ce,je,et,ft,Et,0)},G=d.__private__.setCreationDate=function(Y){var fe;if(Y===void 0&&(Y=new Date),Y instanceof Date)fe=Z(Y);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(Y))throw new Error("Invalid argument passed to jsPDF.setCreationDate");fe=Y}return F=fe},z=d.__private__.getCreationDate=function(Y){var fe=F;return Y==="jsDate"&&(fe=V(F)),fe};d.setCreationDate=function(Y){return G(Y),this},d.getCreationDate=function(Y){return z(Y)};var D,K=d.__private__.padd2=function(Y){return("0"+parseInt(Y)).slice(-2)},ne=d.__private__.padd2Hex=function(Y){return("00"+(Y=Y.toString())).substr(Y.length)},Q=0,ee=[],ae=[],se=0,ce=[],me=[],Se=!1,Oe=ae,Ne=function(){Q=0,se=0,ae=[],ee=[],ce=[],Lr=Yt(),Nr=Yt()};d.__private__.setCustomOutputDestination=function(Y){Se=!0,Oe=Y};var xe=function(Y){Se||(Oe=Y)};d.__private__.resetCustomOutputDestination=function(){Se=!1,Oe=ae};var ve=d.__private__.out=function(Y){return Y=Y.toString(),se+=Y.length+1,Oe.push(Y),Oe},Xe=d.__private__.write=function(Y){return ve(arguments.length===1?Y.toString():Array.prototype.join.call(arguments," "))},be=d.__private__.getArrayBuffer=function(Y){for(var fe=Y.length,Ce=new ArrayBuffer(fe),je=new Uint8Array(Ce);fe--;)je[fe]=Y.charCodeAt(fe);return Ce},Ae=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return Ae};var Ee=e.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(Y){return Ee=v===g.ADVANCED?Y/nt:Y,this};var Le,he=d.__private__.getFontSize=d.getFontSize=function(){return v===g.COMPAT?Ee:Ee*nt},ke=e.R2L||!1;d.__private__.setR2L=d.setR2L=function(Y){return ke=Y,this},d.__private__.getR2L=d.getR2L=function(){return ke};var Re,$e=d.__private__.setZoomMode=function(Y){var fe=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(Y))Le=Y;else if(isNaN(Y)){if(fe.indexOf(Y)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+Y+'" is not recognized.');Le=Y}else Le=parseInt(Y,10)};d.__private__.getZoomMode=function(){return Le};var vt,wt=d.__private__.setPageMode=function(Y){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(Y)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+Y+'" is not recognized.');Re=Y};d.__private__.getPageMode=function(){return Re};var at=d.__private__.setLayoutMode=function(Y){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(Y)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+Y+'" is not recognized.');vt=Y};d.__private__.getLayoutMode=function(){return vt},d.__private__.setDisplayMode=d.setDisplayMode=function(Y,fe,Ce){return $e(Y),at(fe),wt(Ce),this};var mt={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(Y){if(Object.keys(mt).indexOf(Y)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return mt[Y]},d.__private__.getDocumentProperties=function(){return mt},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(Y){for(var fe in mt)mt.hasOwnProperty(fe)&&Y[fe]&&(mt[fe]=Y[fe]);return this},d.__private__.setDocumentProperty=function(Y,fe){if(Object.keys(mt).indexOf(Y)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return mt[Y]=fe};var Je,nt,qt,At,Ht,zt={},Ie={},He=[],Nt={},ht={},gt={},_t={},rr=null,Wt=0,St=[],it=new K4(d),Bt=e.hotfixes||[],Ue={},De={},bt=[],ze=function Y(fe,Ce,je,et,ft,Et){if(!(this instanceof Y))return new Y(fe,Ce,je,et,ft,Et);isNaN(fe)&&(fe=1),isNaN(Ce)&&(Ce=0),isNaN(je)&&(je=0),isNaN(et)&&(et=1),isNaN(ft)&&(ft=0),isNaN(Et)&&(Et=0),this._matrix=[fe,Ce,je,et,ft,Et]};Object.defineProperty(ze.prototype,"sx",{get:function(){return this._matrix[0]},set:function(Y){this._matrix[0]=Y}}),Object.defineProperty(ze.prototype,"shy",{get:function(){return this._matrix[1]},set:function(Y){this._matrix[1]=Y}}),Object.defineProperty(ze.prototype,"shx",{get:function(){return this._matrix[2]},set:function(Y){this._matrix[2]=Y}}),Object.defineProperty(ze.prototype,"sy",{get:function(){return this._matrix[3]},set:function(Y){this._matrix[3]=Y}}),Object.defineProperty(ze.prototype,"tx",{get:function(){return this._matrix[4]},set:function(Y){this._matrix[4]=Y}}),Object.defineProperty(ze.prototype,"ty",{get:function(){return this._matrix[5]},set:function(Y){this._matrix[5]=Y}}),Object.defineProperty(ze.prototype,"a",{get:function(){return this._matrix[0]},set:function(Y){this._matrix[0]=Y}}),Object.defineProperty(ze.prototype,"b",{get:function(){return this._matrix[1]},set:function(Y){this._matrix[1]=Y}}),Object.defineProperty(ze.prototype,"c",{get:function(){return this._matrix[2]},set:function(Y){this._matrix[2]=Y}}),Object.defineProperty(ze.prototype,"d",{get:function(){return this._matrix[3]},set:function(Y){this._matrix[3]=Y}}),Object.defineProperty(ze.prototype,"e",{get:function(){return this._matrix[4]},set:function(Y){this._matrix[4]=Y}}),Object.defineProperty(ze.prototype,"f",{get:function(){return this._matrix[5]},set:function(Y){this._matrix[5]=Y}}),Object.defineProperty(ze.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(ze.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(ze.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(ze.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),ze.prototype.join=function(Y){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(T).join(Y)},ze.prototype.multiply=function(Y){var fe=Y.sx*this.sx+Y.shy*this.shx,Ce=Y.sx*this.shy+Y.shy*this.sy,je=Y.shx*this.sx+Y.sy*this.shx,et=Y.shx*this.shy+Y.sy*this.sy,ft=Y.tx*this.sx+Y.ty*this.shx+this.tx,Et=Y.tx*this.shy+Y.ty*this.sy+this.ty;return new ze(fe,Ce,je,et,ft,Et)},ze.prototype.decompose=function(){var Y=this.sx,fe=this.shy,Ce=this.shx,je=this.sy,et=this.tx,ft=this.ty,Et=Math.sqrt(Y*Y+fe*fe),Dt=(Y/=Et)*Ce+(fe/=Et)*je;Ce-=Y*Dt,je-=fe*Dt;var ir=Math.sqrt(Ce*Ce+je*je);return Dt/=ir,Y*(je/=ir)<fe*(Ce/=ir)&&(Y=-Y,fe=-fe,Dt=-Dt,Et=-Et),{scale:new ze(Et,0,0,ir,0,0),translate:new ze(1,0,0,1,et,ft),rotate:new ze(Y,fe,-fe,Y,0,0),skew:new ze(1,0,Dt,1,0,0)}},ze.prototype.toString=function(Y){return this.join(" ")},ze.prototype.inversed=function(){var Y=this.sx,fe=this.shy,Ce=this.shx,je=this.sy,et=this.tx,ft=this.ty,Et=1/(Y*je-fe*Ce),Dt=je*Et,ir=-fe*Et,gr=-Ce*Et,dr=Y*Et;return new ze(Dt,ir,gr,dr,-Dt*et-gr*ft,-ir*et-dr*ft)},ze.prototype.applyToPoint=function(Y){var fe=Y.x*this.sx+Y.y*this.shx+this.tx,Ce=Y.x*this.shy+Y.y*this.sy+this.ty;return new $n(fe,Ce)},ze.prototype.applyToRectangle=function(Y){var fe=this.applyToPoint(Y),Ce=this.applyToPoint(new $n(Y.x+Y.w,Y.y+Y.h));return new vi(fe.x,fe.y,Ce.x-fe.x,Ce.y-fe.y)},ze.prototype.clone=function(){var Y=this.sx,fe=this.shy,Ce=this.shx,je=this.sy,et=this.tx,ft=this.ty;return new ze(Y,fe,Ce,je,et,ft)},d.Matrix=ze;var xt=d.matrixMult=function(Y,fe){return fe.multiply(Y)},kt=new ze(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=kt;var Ft=function(Y,fe){if(!ht[Y]){var Ce=(fe instanceof Sf?"Sh":"P")+(Object.keys(Nt).length+1).toString(10);fe.id=Ce,ht[Y]=Ce,Nt[Ce]=fe,it.publish("addPattern",fe)}};d.ShadingPattern=Sf,d.TilingPattern=ph,d.addShadingPattern=function(Y,fe){return M("addShadingPattern()"),Ft(Y,fe),this},d.beginTilingPattern=function(Y){M("beginTilingPattern()"),Zs(Y.boundingBox[0],Y.boundingBox[1],Y.boundingBox[2]-Y.boundingBox[0],Y.boundingBox[3]-Y.boundingBox[1],Y.matrix)},d.endTilingPattern=function(Y,fe){M("endTilingPattern()"),fe.stream=me[D].join(`
|
|
398
|
-
`),Ft(Y,fe),it.publish("endTilingPattern",fe),bt.pop().restore()};var Ut=d.__private__.newObject=function(){var Y=Yt();return _r(Y,!0),Y},Yt=d.__private__.newObjectDeferred=function(){return Q++,ee[Q]=function(){return se},Q},_r=function(Y,fe){return fe=typeof fe=="boolean"&&fe,ee[Y]=se,fe&&ve(Y+" 0 obj"),Y},kr=d.__private__.newAdditionalObject=function(){var Y={objId:Yt(),content:""};return ce.push(Y),Y},Lr=Yt(),Nr=Yt(),Wn=d.__private__.decodeColorString=function(Y){var fe=Y.split(" ");if(fe.length!==2||fe[1]!=="g"&&fe[1]!=="G")fe.length===5&&(fe[4]==="k"||fe[4]==="K")&&(fe=[(1-fe[0])*(1-fe[3]),(1-fe[1])*(1-fe[3]),(1-fe[2])*(1-fe[3]),"r"]);else{var Ce=parseFloat(fe[0]);fe=[Ce,Ce,Ce,"r"]}for(var je="#",et=0;et<3;et++)je+=("0"+Math.floor(255*parseFloat(fe[et])).toString(16)).slice(-2);return je},en=d.__private__.encodeColorString=function(Y){var fe;typeof Y=="string"&&(Y={ch1:Y});var Ce=Y.ch1,je=Y.ch2,et=Y.ch3,ft=Y.ch4,Et=Y.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Ce=="string"&&Ce.charAt(0)!=="#"){var Dt=new y_(Ce);if(Dt.ok)Ce=Dt.toHex();else if(!/^\d*\.?\d*$/.test(Ce))throw new Error('Invalid color "'+Ce+'" passed to jsPDF.encodeColorString.')}if(typeof Ce=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Ce)&&(Ce="#"+Ce[1]+Ce[1]+Ce[2]+Ce[2]+Ce[3]+Ce[3]),typeof Ce=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Ce)){var ir=parseInt(Ce.substr(1),16);Ce=ir>>16&255,je=ir>>8&255,et=255&ir}if(je===void 0||ft===void 0&&Ce===je&&je===et)if(typeof Ce=="string")fe=Ce+" "+Et[0];else switch(Y.precision){case 2:fe=C(Ce/255)+" "+Et[0];break;case 3:default:fe=x(Ce/255)+" "+Et[0]}else if(ft===void 0||On(ft)==="object"){if(ft&&!isNaN(ft.a)&&ft.a===0)return fe=["1.","1.","1.",Et[1]].join(" ");if(typeof Ce=="string")fe=[Ce,je,et,Et[1]].join(" ");else switch(Y.precision){case 2:fe=[C(Ce/255),C(je/255),C(et/255),Et[1]].join(" ");break;default:case 3:fe=[x(Ce/255),x(je/255),x(et/255),Et[1]].join(" ")}}else if(typeof Ce=="string")fe=[Ce,je,et,ft,Et[2]].join(" ");else switch(Y.precision){case 2:fe=[C(Ce),C(je),C(et),C(ft),Et[2]].join(" ");break;case 3:default:fe=[x(Ce),x(je),x(et),x(ft),Et[2]].join(" ")}return fe},Qn=d.__private__.getFilters=function(){return o},_i=d.__private__.putStream=function(Y){var fe=(Y=Y||{}).data||"",Ce=Y.filters||Qn(),je=Y.alreadyAppliedFilters||[],et=Y.addLength1||!1,ft=fe.length,Et=Y.objectId,Dt=function(Jn){return Jn};if(h!==null&&Et===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(Dt=gn.encryptor(Et,0));var ir={};Ce===!0&&(Ce=["FlateEncode"]);var gr=Y.additionalKeyValues||[],dr=(ir=hr.API.processDataByFilters!==void 0?hr.API.processDataByFilters(fe,Ce):{data:fe,reverseChain:[]}).reverseChain+(Array.isArray(je)?je.join(" "):je.toString());if(ir.data.length!==0&&(gr.push({key:"Length",value:ir.data.length}),et===!0&&gr.push({key:"Length1",value:ft})),dr.length!=0)if(dr.split("/").length-1==1)gr.push({key:"Filter",value:dr});else{gr.push({key:"Filter",value:"["+dr+"]"});for(var Sr=0;Sr<gr.length;Sr+=1)if(gr[Sr].key==="DecodeParms"){for(var Cn=[],Sn=0;Sn<ir.reverseChain.split("/").length-1;Sn+=1)Cn.push("null");Cn.push(gr[Sr].value),gr[Sr].value="["+Cn.join(" ")+"]"}}ve("<<");for(var jn=0;jn<gr.length;jn++)ve("/"+gr[jn].key+" "+gr[jn].value);ve(">>"),ir.data.length!==0&&(ve("stream"),ve(Dt(ir.data)),ve("endstream"))},Ni=d.__private__.putPage=function(Y){var fe=Y.number,Ce=Y.data,je=Y.objId,et=Y.contentsObjId;_r(je,!0),ve("<</Type /Page"),ve("/Parent "+Y.rootDictionaryObjId+" 0 R"),ve("/Resources "+Y.resourceDictionaryObjId+" 0 R"),ve("/MediaBox ["+parseFloat(T(Y.mediaBox.bottomLeftX))+" "+parseFloat(T(Y.mediaBox.bottomLeftY))+" "+T(Y.mediaBox.topRightX)+" "+T(Y.mediaBox.topRightY)+"]"),Y.cropBox!==null&&ve("/CropBox ["+T(Y.cropBox.bottomLeftX)+" "+T(Y.cropBox.bottomLeftY)+" "+T(Y.cropBox.topRightX)+" "+T(Y.cropBox.topRightY)+"]"),Y.bleedBox!==null&&ve("/BleedBox ["+T(Y.bleedBox.bottomLeftX)+" "+T(Y.bleedBox.bottomLeftY)+" "+T(Y.bleedBox.topRightX)+" "+T(Y.bleedBox.topRightY)+"]"),Y.trimBox!==null&&ve("/TrimBox ["+T(Y.trimBox.bottomLeftX)+" "+T(Y.trimBox.bottomLeftY)+" "+T(Y.trimBox.topRightX)+" "+T(Y.trimBox.topRightY)+"]"),Y.artBox!==null&&ve("/ArtBox ["+T(Y.artBox.bottomLeftX)+" "+T(Y.artBox.bottomLeftY)+" "+T(Y.artBox.topRightX)+" "+T(Y.artBox.topRightY)+"]"),typeof Y.userUnit=="number"&&Y.userUnit!==1&&ve("/UserUnit "+Y.userUnit),it.publish("putPage",{objId:je,pageContext:St[fe],pageNumber:fe,page:Ce}),ve("/Contents "+et+" 0 R"),ve(">>"),ve("endobj");var ft=Ce.join(`
|
|
399
|
-
`);return v===g.ADVANCED&&(ft+=`
|
|
400
|
-
Q`),_r(et,!0),_i({data:ft,filters:Qn(),objectId:et}),ve("endobj"),je},Si=d.__private__.putPages=function(){var Y,fe,Ce=[];for(Y=1;Y<=Wt;Y++)St[Y].objId=Yt(),St[Y].contentsObjId=Yt();for(Y=1;Y<=Wt;Y++)Ce.push(Ni({number:Y,data:me[Y],objId:St[Y].objId,contentsObjId:St[Y].contentsObjId,mediaBox:St[Y].mediaBox,cropBox:St[Y].cropBox,bleedBox:St[Y].bleedBox,trimBox:St[Y].trimBox,artBox:St[Y].artBox,userUnit:St[Y].userUnit,rootDictionaryObjId:Lr,resourceDictionaryObjId:Nr}));_r(Lr,!0),ve("<</Type /Pages");var je="/Kids [";for(fe=0;fe<Wt;fe++)je+=Ce[fe]+" 0 R ";ve(je+"]"),ve("/Count "+Wt),ve(">>"),ve("endobj"),it.publish("postPutPages")},fa=function(Y){it.publish("putFont",{font:Y,out:ve,newObject:Ut,putStream:_i}),Y.isAlreadyPutted!==!0&&(Y.objectNumber=Ut(),ve("<<"),ve("/Type /Font"),ve("/BaseFont /"+ch(Y.postScriptName)),ve("/Subtype /Type1"),typeof Y.encoding=="string"&&ve("/Encoding /"+Y.encoding),ve("/FirstChar 32"),ve("/LastChar 255"),ve(">>"),ve("endobj"))},ws=function(){for(var Y in zt)zt.hasOwnProperty(Y)&&(p===!1||p===!0&&w.hasOwnProperty(Y))&&fa(zt[Y])},Vo=function(Y){Y.objectNumber=Ut();var fe=[];fe.push({key:"Type",value:"/XObject"}),fe.push({key:"Subtype",value:"/Form"}),fe.push({key:"BBox",value:"["+[T(Y.x),T(Y.y),T(Y.x+Y.width),T(Y.y+Y.height)].join(" ")+"]"}),fe.push({key:"Matrix",value:"["+Y.matrix.toString()+"]"});var Ce=Y.pages[1].join(`
|
|
401
|
-
`);_i({data:Ce,additionalKeyValues:fe,objectId:Y.objectNumber}),ve("endobj")},tu=function(){for(var Y in Ue)Ue.hasOwnProperty(Y)&&Vo(Ue[Y])},vc=function(Y,fe){var Ce,je=[],et=1/(fe-1);for(Ce=0;Ce<1;Ce+=et)je.push(Ce);if(je.push(1),Y[0].offset!=0){var ft={offset:0,color:Y[0].color};Y.unshift(ft)}if(Y[Y.length-1].offset!=1){var Et={offset:1,color:Y[Y.length-1].color};Y.push(Et)}for(var Dt="",ir=0,gr=0;gr<je.length;gr++){for(Ce=je[gr];Ce>Y[ir+1].offset;)ir++;var dr=Y[ir].offset,Sr=(Ce-dr)/(Y[ir+1].offset-dr),Cn=Y[ir].color,Sn=Y[ir+1].color;Dt+=ne(Math.round((1-Sr)*Cn[0]+Sr*Sn[0]).toString(16))+ne(Math.round((1-Sr)*Cn[1]+Sr*Sn[1]).toString(16))+ne(Math.round((1-Sr)*Cn[2]+Sr*Sn[2]).toString(16))}return Dt.trim()},Mn=function(Y,fe){fe||(fe=21);var Ce=Ut(),je=vc(Y.colors,fe),et=[];et.push({key:"FunctionType",value:"0"}),et.push({key:"Domain",value:"[0.0 1.0]"}),et.push({key:"Size",value:"["+fe+"]"}),et.push({key:"BitsPerSample",value:"8"}),et.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),et.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),_i({data:je,additionalKeyValues:et,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Ce}),ve("endobj"),Y.objectNumber=Ut(),ve("<< /ShadingType "+Y.type),ve("/ColorSpace /DeviceRGB");var ft="/Coords ["+T(parseFloat(Y.coords[0]))+" "+T(parseFloat(Y.coords[1]))+" ";Y.type===2?ft+=T(parseFloat(Y.coords[2]))+" "+T(parseFloat(Y.coords[3])):ft+=T(parseFloat(Y.coords[2]))+" "+T(parseFloat(Y.coords[3]))+" "+T(parseFloat(Y.coords[4]))+" "+T(parseFloat(Y.coords[5])),ve(ft+="]"),Y.matrix&&ve("/Matrix ["+Y.matrix.toString()+"]"),ve("/Function "+Ce+" 0 R"),ve("/Extend [true true]"),ve(">>"),ve("endobj")},Bu=function(Y,fe){var Ce=Yt(),je=Ut();fe.push({resourcesOid:Ce,objectOid:je}),Y.objectNumber=je;var et=[];et.push({key:"Type",value:"/Pattern"}),et.push({key:"PatternType",value:"1"}),et.push({key:"PaintType",value:"1"}),et.push({key:"TilingType",value:"1"}),et.push({key:"BBox",value:"["+Y.boundingBox.map(T).join(" ")+"]"}),et.push({key:"XStep",value:T(Y.xStep)}),et.push({key:"YStep",value:T(Y.yStep)}),et.push({key:"Resources",value:Ce+" 0 R"}),Y.matrix&&et.push({key:"Matrix",value:"["+Y.matrix.toString()+"]"}),_i({data:Y.stream,additionalKeyValues:et,objectId:Y.objectNumber}),ve("endobj")},oo=function(Y){var fe;for(fe in Nt)Nt.hasOwnProperty(fe)&&(Nt[fe]instanceof Sf?Mn(Nt[fe]):Nt[fe]instanceof ph&&Bu(Nt[fe],Y))},dl=function(Y){for(var fe in Y.objectNumber=Ut(),ve("<<"),Y)switch(fe){case"opacity":ve("/ca "+C(Y[fe]));break;case"stroke-opacity":ve("/CA "+C(Y[fe]))}ve(">>"),ve("endobj")},Hs=function(){var Y;for(Y in gt)gt.hasOwnProperty(Y)&&dl(gt[Y])},qu=function(){for(var Y in ve("/XObject <<"),Ue)Ue.hasOwnProperty(Y)&&Ue[Y].objectNumber>=0&&ve("/"+Y+" "+Ue[Y].objectNumber+" 0 R");it.publish("putXobjectDict"),ve(">>")},ru=function(){gn.oid=Ut(),ve("<<"),ve("/Filter /Standard"),ve("/V "+gn.v),ve("/R "+gn.r),ve("/U <"+gn.toHexString(gn.U)+">"),ve("/O <"+gn.toHexString(gn.O)+">"),ve("/P "+gn.P),ve(">>"),ve("endobj")},so=function(){for(var Y in ve("/Font <<"),zt)zt.hasOwnProperty(Y)&&(p===!1||p===!0&&w.hasOwnProperty(Y))&&ve("/"+Y+" "+zt[Y].objectNumber+" 0 R");ve(">>")},pi=function(){if(Object.keys(Nt).length>0){for(var Y in ve("/Shading <<"),Nt)Nt.hasOwnProperty(Y)&&Nt[Y]instanceof Sf&&Nt[Y].objectNumber>=0&&ve("/"+Y+" "+Nt[Y].objectNumber+" 0 R");it.publish("putShadingPatternDict"),ve(">>")}},Kr=function(Y){if(Object.keys(Nt).length>0){for(var fe in ve("/Pattern <<"),Nt)Nt.hasOwnProperty(fe)&&Nt[fe]instanceof d.TilingPattern&&Nt[fe].objectNumber>=0&&Nt[fe].objectNumber<Y&&ve("/"+fe+" "+Nt[fe].objectNumber+" 0 R");it.publish("putTilingPatternDict"),ve(">>")}},Ar=function(){if(Object.keys(gt).length>0){var Y;for(Y in ve("/ExtGState <<"),gt)gt.hasOwnProperty(Y)&>[Y].objectNumber>=0&&ve("/"+Y+" "+gt[Y].objectNumber+" 0 R");it.publish("putGStateDict"),ve(">>")}},ln=function(Y){_r(Y.resourcesOid,!0),ve("<<"),ve("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),so(),pi(),Kr(Y.objectOid),Ar(),qu(),ve(">>"),ve("endobj")},gi=function(){var Y=[];ws(),Hs(),tu(),oo(Y),it.publish("putResources"),Y.forEach(ln),ln({resourcesOid:Nr,objectOid:Number.MAX_SAFE_INTEGER}),it.publish("postPutResources")},Ti=function(){it.publish("putAdditionalObjects");for(var Y=0;Y<ce.length;Y++){var fe=ce[Y];_r(fe.objId,!0),ve(fe.content),ve("endobj")}it.publish("postPutAdditionalObjects")},Ia=function(Y){Ie[Y.fontName]=Ie[Y.fontName]||{},Ie[Y.fontName][Y.fontStyle]=Y.id},ja=function(Y,fe,Ce,je,et){var ft={id:"F"+(Object.keys(zt).length+1).toString(10),postScriptName:Y,fontName:fe,fontStyle:Ce,encoding:je,isStandardFont:et||!1,metadata:{}};return it.publish("addFont",{font:ft,instance:this}),zt[ft.id]=ft,Ia(ft),ft.id},ii=function(Y){for(var fe=0,Ce=Ae.length;fe<Ce;fe++){var je=ja.call(this,Y[fe][0],Y[fe][1],Y[fe][2],Ae[fe][3],!0);p===!1&&(w[je]=!0);var et=Y[fe][0].split("-");Ia({id:je,fontName:et[0],fontStyle:et[1]||""})}it.publish("addFonts",{fonts:zt,dictionary:Ie})},Ri=function(Y){return Y.foo=function(){try{return Y.apply(this,arguments)}catch(je){var fe=je.stack||"";~fe.indexOf(" at ")&&(fe=fe.split(" at ")[1]);var Ce="Error in function "+fe.split(`
|
|
402
|
-
`)[0].split("<")[0]+": "+je.message;if(!pr.console)throw new Error(Ce);pr.console.error(Ce,je),pr.alert&&alert(Ce)}},Y.foo.bar=Y,Y.foo},pl=function(Y,fe){var Ce,je,et,ft,Et,Dt,ir,gr,dr;if(et=(fe=fe||{}).sourceEncoding||"Unicode",Et=fe.outputEncoding,(fe.autoencode||Et)&&zt[Je].metadata&&zt[Je].metadata[et]&&zt[Je].metadata[et].encoding&&(ft=zt[Je].metadata[et].encoding,!Et&&zt[Je].encoding&&(Et=zt[Je].encoding),!Et&&ft.codePages&&(Et=ft.codePages[0]),typeof Et=="string"&&(Et=ft[Et]),Et)){for(ir=!1,Dt=[],Ce=0,je=Y.length;Ce<je;Ce++)(gr=Et[Y.charCodeAt(Ce)])?Dt.push(String.fromCharCode(gr)):Dt.push(Y[Ce]),Dt[Ce].charCodeAt(0)>>8&&(ir=!0);Y=Dt.join("")}for(Ce=Y.length;ir===void 0&&Ce!==0;)Y.charCodeAt(Ce-1)>>8&&(ir=!0),Ce--;if(!ir)return Y;for(Dt=fe.noBOM?[]:[254,255],Ce=0,je=Y.length;Ce<je;Ce++){if((dr=(gr=Y.charCodeAt(Ce))>>8)>>8)throw new Error("Character at position "+Ce+" of string '"+Y+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Dt.push(dr),Dt.push(gr-(dr<<8))}return String.fromCharCode.apply(void 0,Dt)},ha=d.__private__.pdfEscape=d.pdfEscape=function(Y,fe){return pl(Y,fe).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Wo=d.__private__.beginPage=function(Y){me[++Wt]=[],St[Wt]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(Y[0]),topRightY:Number(Y[1])}},Gs(Wt),xe(me[D])},nu=function(Y,fe){var Ce,je,et;switch(t=fe||t,typeof Y=="string"&&(Ce=m(Y.toLowerCase()),Array.isArray(Ce)&&(je=Ce[0],et=Ce[1])),Array.isArray(Y)&&(je=Y[0]*nt,et=Y[1]*nt),isNaN(je)&&(je=a[0],et=a[1]),(je>14400||et>14400)&&(Vn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),je=Math.min(14400,je),et=Math.min(14400,et)),a=[je,et],t.substr(0,1)){case"l":et>je&&(a=[et,je]);break;case"p":je>et&&(a=[et,je])}Wo(a),Ps(Ba),ve(wn),lu!==0&&ve(lu+" J"),Os!==0&&ve(Os+" j"),it.publish("addPage",{pageNumber:Wt})},da=function(Y){Y>0&&Y<=Wt&&(me.splice(Y,1),St.splice(Y,1),Wt--,D>Wt&&(D=Wt),this.setPage(D))},Gs=function(Y){Y>0&&Y<=Wt&&(D=Y)},af=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return me.length-1},iu=function(Y,fe,Ce){var je,et=void 0;return Ce=Ce||{},Y=Y!==void 0?Y:zt[Je].fontName,fe=fe!==void 0?fe:zt[Je].fontStyle,je=Y.toLowerCase(),Ie[je]!==void 0&&Ie[je][fe]!==void 0?et=Ie[je][fe]:Ie[Y]!==void 0&&Ie[Y][fe]!==void 0?et=Ie[Y][fe]:Ce.disableWarning===!1&&Vn.warn("Unable to look up font label for font '"+Y+"', '"+fe+"'. Refer to getFontList() for available fonts."),et||Ce.noFallback||(et=Ie.times[fe])==null&&(et=Ie.times.normal),et},Ir=d.__private__.putInfo=function(){var Y=Ut(),fe=function(je){return je};for(var Ce in h!==null&&(fe=gn.encryptor(Y,0)),ve("<<"),ve("/Producer ("+ha(fe("jsPDF "+hr.version))+")"),mt)mt.hasOwnProperty(Ce)&&mt[Ce]&&ve("/"+Ce.substr(0,1).toUpperCase()+Ce.substr(1)+" ("+ha(fe(mt[Ce]))+")");ve("/CreationDate ("+ha(fe(F))+")"),ve(">>"),ve("endobj")},_s=d.__private__.putCatalog=function(Y){var fe=(Y=Y||{}).rootDictionaryObjId||Lr;switch(Ut(),ve("<<"),ve("/Type /Catalog"),ve("/Pages "+fe+" 0 R"),Le||(Le="fullwidth"),Le){case"fullwidth":ve("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ve("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ve("/OpenAction [3 0 R /Fit]");break;case"original":ve("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Ce=""+Le;Ce.substr(Ce.length-1)==="%"&&(Le=parseInt(Le)/100),typeof Le=="number"&&ve("/OpenAction [3 0 R /XYZ null null "+C(Le)+"]")}switch(vt||(vt="continuous"),vt){case"continuous":ve("/PageLayout /OneColumn");break;case"single":ve("/PageLayout /SinglePage");break;case"two":case"twoleft":ve("/PageLayout /TwoColumnLeft");break;case"tworight":ve("/PageLayout /TwoColumnRight")}Re&&ve("/PageMode /"+Re),it.publish("putCatalog"),ve(">>"),ve("endobj")},Vs=d.__private__.putTrailer=function(){ve("trailer"),ve("<<"),ve("/Size "+(Q+1)),ve("/Root "+Q+" 0 R"),ve("/Info "+(Q-1)+" 0 R"),h!==null&&ve("/Encrypt "+gn.oid+" 0 R"),ve("/ID [ <"+U+"> <"+U+"> ]"),ve(">>")},Ws=d.__private__.putHeader=function(){ve("%PDF-"+_),ve("%ºß¬à")},mc=d.__private__.putXRef=function(){var Y="0000000000";ve("xref"),ve("0 "+(Q+1)),ve("0000000000 65535 f ");for(var fe=1;fe<=Q;fe++)typeof ee[fe]=="function"?ve((Y+ee[fe]()).slice(-10)+" 00000 n "):ee[fe]!==void 0?ve((Y+ee[fe]).slice(-10)+" 00000 n "):ve("0000000000 00000 n ")},$o=d.__private__.buildDocument=function(){Ne(),xe(ae),it.publish("buildDocument"),Ws(),Si(),Ti(),gi(),h!==null&&ru(),Ir(),_s();var Y=se;return mc(),Vs(),ve("startxref"),ve(""+Y),ve("%%EOF"),xe(me[D]),ae.join(`
|
|
403
|
-
`)},Ss=d.__private__.getBlob=function(Y){return new Blob([be(Y)],{type:"application/pdf"})},xs=d.output=d.__private__.output=Ri(function(Y,fe){switch(typeof(fe=fe||{})=="string"?fe={filename:fe}:fe.filename=fe.filename||"generated.pdf",Y){case void 0:return $o();case"save":d.save(fe.filename);break;case"arraybuffer":return be($o());case"blob":return Ss($o());case"bloburi":case"bloburl":if(pr.URL!==void 0&&typeof pr.URL.createObjectURL=="function")return pr.URL&&pr.URL.createObjectURL(Ss($o()))||void 0;Vn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Ce="",je=$o();try{Ce=T2(je)}catch{Ce=T2(unescape(encodeURIComponent(je)))}return"data:application/pdf;filename="+fe.filename+";base64,"+Ce;case"pdfobjectnewwindow":if(Object.prototype.toString.call(pr)==="[object Window]"){var et="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ft=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';fe.pdfObjectUrl&&(et=fe.pdfObjectUrl,ft="");var Et='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+et+'"'+ft+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(fe)+");<\/script></body></html>",Dt=pr.open();return Dt!==null&&Dt.document.write(Et),Dt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(pr)==="[object Window]"){var ir='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(fe.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+fe.filename+'" width="500px" height="400px" /></body></html>',gr=pr.open();if(gr!==null){gr.document.write(ir);var dr=this;gr.document.documentElement.querySelector("#pdfViewer").onload=function(){gr.document.title=fe.filename,gr.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(dr.output("bloburl"))}}return gr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(pr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Sr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",fe)+'"></iframe></body></html>',Cn=pr.open();if(Cn!==null&&(Cn.document.write(Sr),Cn.document.title=fe.filename),Cn||typeof safari>"u")return Cn;break;case"datauri":case"dataurl":return pr.document.location.href=this.output("datauristring",fe);default:return null}}),Es=function(Y){return Array.isArray(Bt)===!0&&Bt.indexOf(Y)>-1};switch(n){case"pt":nt=1;break;case"mm":nt=72/25.4;break;case"cm":nt=72/2.54;break;case"in":nt=72;break;case"px":nt=Es("px_scaling")==1?.75:96/72;break;case"pc":case"em":nt=12;break;case"ex":nt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);nt=n}var gn=null;G(),$();var Yo=function(Y){return h!==null?gn.encryptor(Y,0):function(fe){return fe}},Fa=d.__private__.getPageInfo=d.getPageInfo=function(Y){if(isNaN(Y)||Y%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:St[Y].objId,pageNumber:Y,pageContext:St[Y]}},It=d.__private__.getPageInfoByObjId=function(Y){if(isNaN(Y)||Y%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var fe in St)if(St[fe].objId===Y)break;return Fa(fe)},$s=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:St[D].objId,pageNumber:D,pageContext:St[D]}};d.addPage=function(){return nu.apply(this,arguments),this},d.setPage=function(){return Gs.apply(this,arguments),xe.call(this,me[D]),this},d.insertPage=function(Y){return this.addPage(),this.movePage(D,Y),this},d.movePage=function(Y,fe){var Ce,je;if(Y>fe){Ce=me[Y],je=St[Y];for(var et=Y;et>fe;et--)me[et]=me[et-1],St[et]=St[et-1];me[fe]=Ce,St[fe]=je,this.setPage(fe)}else if(Y<fe){Ce=me[Y],je=St[Y];for(var ft=Y;ft<fe;ft++)me[ft]=me[ft+1],St[ft]=St[ft+1];me[fe]=Ce,St[fe]=je,this.setPage(fe)}return this},d.deletePage=function(){return da.apply(this,arguments),this},d.__private__.text=d.text=function(Y,fe,Ce,je,et){var ft,Et,Dt,ir,gr,dr,Sr,Cn,Sn,jn=(je=je||{}).scope||this;if(typeof Y=="number"&&typeof fe=="number"&&(typeof Ce=="string"||Array.isArray(Ce))){var Jn=Ce;Ce=fe,fe=Y,Y=Jn}if(arguments[3]instanceof ze?(M("The transform parameter of text() with a Matrix value"),Sn=et):(Dt=arguments[4],ir=arguments[5],On(Sr=arguments[3])==="object"&&Sr!==null||(typeof Dt=="string"&&(ir=Dt,Dt=null),typeof Sr=="string"&&(ir=Sr,Sr=null),typeof Sr=="number"&&(Dt=Sr,Sr=null),je={flags:Sr,angle:Dt,align:ir})),isNaN(fe)||isNaN(Ce)||Y==null)throw new Error("Invalid arguments passed to jsPDF.text");if(Y.length===0)return jn;var si="",Ua=!1,Ea=typeof je.lineHeightFactor=="number"?je.lineHeightFactor:Mi,Pa=jn.internal.scaleFactor;function Zo(nn){return nn=nn.split(" ").join(Array(je.TabLen||9).join(" ")),ha(nn,Sr)}function Qo(nn){for(var Yr,Fn=nn.concat(),ei=[],Io=Fn.length;Io--;)typeof(Yr=Fn.shift())=="string"?ei.push(Yr):Array.isArray(nn)&&(Yr.length===1||Yr[1]===void 0&&Yr[2]===void 0)?ei.push(Yr[0]):ei.push([Yr[0],Yr[1],Yr[2]]);return ei}function Di(nn,Yr){var Fn;if(typeof nn=="string")Fn=Yr(nn)[0];else if(Array.isArray(nn)){for(var ei,Io,_l=nn.concat(),rl=[],cu=_l.length;cu--;)typeof(ei=_l.shift())=="string"?rl.push(Yr(ei)[0]):Array.isArray(ei)&&typeof ei[0]=="string"&&(Io=Yr(ei[0],ei[1],ei[2]),rl.push([Io[0],Io[1],Io[2]]));Fn=rl}return Fn}var Ha=!1,Qs=!0;if(typeof Y=="string")Ha=!0;else if(Array.isArray(Y)){var bl=Y.concat();Et=[];for(var ra,rn=bl.length;rn--;)(typeof(ra=bl.shift())!="string"||Array.isArray(ra)&&typeof ra[0]!="string")&&(Qs=!1);Ha=Qs}if(Ha===!1)throw new Error('Type of text must be string or Array. "'+Y+'" is not recognized.');typeof Y=="string"&&(Y=Y.match(/[\r?\n]/)?Y.split(/\r\n|\r|\n/g):[Y]);var Js=Ee/jn.internal.scaleFactor,wl=Js*(Ea-1);switch(je.baseline){case"bottom":Ce-=wl;break;case"top":Ce+=Js-wl;break;case"hanging":Ce+=Js-2*wl;break;case"middle":Ce+=Js/2-wl}if((dr=je.maxWidth||0)>0&&(typeof Y=="string"?Y=jn.splitTextToSize(Y,dr):Object.prototype.toString.call(Y)==="[object Array]"&&(Y=Y.reduce(function(nn,Yr){return nn.concat(jn.splitTextToSize(Yr,dr))},[]))),ft={text:Y,x:fe,y:Ce,options:je,mutex:{pdfEscape:ha,activeFontKey:Je,fonts:zt,activeFontSize:Ee}},it.publish("preProcessText",ft),Y=ft.text,Dt=(je=ft.options).angle,!(Sn instanceof ze)&&Dt&&typeof Dt=="number"){Dt*=Math.PI/180,je.rotationDirection===0&&(Dt=-Dt),v===g.ADVANCED&&(Dt=-Dt);var Oa=Math.cos(Dt),Ga=Math.sin(Dt);Sn=new ze(Oa,Ga,-Ga,Oa,0,0)}else Dt&&Dt instanceof ze&&(Sn=Dt);v!==g.ADVANCED||Sn||(Sn=kt),(gr=je.charSpace||ta)!==void 0&&(si+=T(L(gr))+` Tc
|
|
404
|
-
`,this.setCharSpace(this.getCharSpace()||0)),(Cn=je.horizontalScale)!==void 0&&(si+=T(100*Cn)+` Tz
|
|
405
|
-
`),je.lang;var xi=-1,el=je.renderingMode!==void 0?je.renderingMode:je.stroke,co=jn.internal.getCurrentPageInfo().pageContext;switch(el){case 0:case!1:case"fill":xi=0;break;case 1:case!0:case"stroke":xi=1;break;case 2:case"fillThenStroke":xi=2;break;case 3:case"invisible":xi=3;break;case 4:case"fillAndAddForClipping":xi=4;break;case 5:case"strokeAndAddPathForClipping":xi=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":xi=6;break;case 7:case"addToPathForClipping":xi=7}var Hu=co.usedRenderingMode!==void 0?co.usedRenderingMode:-1;xi!==-1?si+=xi+` Tr
|
|
406
|
-
`:Hu!==-1&&(si+=`0 Tr
|
|
407
|
-
`),xi!==-1&&(co.usedRenderingMode=xi),ir=je.align||"left";var mi,Bi=Ee*Ea,As=jn.internal.pageSize.getWidth(),Co=zt[Je];gr=je.charSpace||ta,dr=je.maxWidth||0,Sr=Object.assign({autoencode:!0,noBOM:!0},je.flags);var yi=[],Jo=function(nn){return jn.getStringUnitWidth(nn,{font:Co,charSpace:gr,fontSize:Ee,doKerning:!1})*Ee/Pa};if(Object.prototype.toString.call(Y)==="[object Array]"){var li;Et=Qo(Y),ir!=="left"&&(mi=Et.map(Jo));var qi,es=0;if(ir==="right"){fe-=mi[0],Y=[],rn=Et.length;for(var $r=0;$r<rn;$r++)$r===0?(qi=Ii(fe),li=ji(Ce)):(qi=L(es-mi[$r]),li=-Bi),Y.push([Et[$r],qi,li]),es=mi[$r]}else if(ir==="center"){fe-=mi[0]/2,Y=[],rn=Et.length;for(var fo=0;fo<rn;fo++)fo===0?(qi=Ii(fe),li=ji(Ce)):(qi=L((es-mi[fo])/2),li=-Bi),Y.push([Et[fo],qi,li]),es=mi[fo]}else if(ir==="left"){Y=[],rn=Et.length;for(var tl=0;tl<rn;tl++)Y.push(Et[tl])}else if(ir==="justify"&&Co.encoding==="Identity-H"){Y=[],rn=Et.length,dr=dr!==0?dr:As;for(var ko=0,jr=0;jr<rn;jr++)if(li=jr===0?ji(Ce):-Bi,qi=jr===0?Ii(fe):ko,jr<rn-1){var Lo=L((dr-mi[jr])/(Et[jr].split(" ").length-1)),Yn=Et[jr].split(" ");Y.push([Yn[0]+" ",qi,li]),ko=0;for(var Tr=1;Tr<Yn.length;Tr++){var xn=(Jo(Yn[Tr-1]+" "+Yn[Tr])-Jo(Yn[Tr]))*Pa+Lo;Tr==Yn.length-1?Y.push([Yn[Tr],xn,0]):Y.push([Yn[Tr]+" ",xn,0]),ko-=xn}}else Y.push([Et[jr],qi,li]);Y.push(["",ko,0])}else{if(ir!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(Y=[],rn=Et.length,dr=dr!==0?dr:As,jr=0;jr<rn;jr++)li=jr===0?ji(Ce):-Bi,qi=jr===0?Ii(fe):0,jr<rn-1?yi.push(T(L((dr-mi[jr])/(Et[jr].split(" ").length-1)))):yi.push(0),Y.push([Et[jr],qi,li])}}var Xn=typeof je.R2L=="boolean"?je.R2L:ke;Xn===!0&&(Y=Di(Y,function(nn,Yr,Fn){return[nn.split("").reverse().join(""),Yr,Fn]})),ft={text:Y,x:fe,y:Ce,options:je,mutex:{pdfEscape:ha,activeFontKey:Je,fonts:zt,activeFontSize:Ee}},it.publish("postProcessText",ft),Y=ft.text,Ua=ft.mutex.isHex||!1;var ts=zt[Je].encoding;ts!=="WinAnsiEncoding"&&ts!=="StandardEncoding"||(Y=Di(Y,function(nn,Yr,Fn){return[Zo(nn),Yr,Fn]})),Et=Qo(Y),Y=[];for(var No,To,Va,kn=0,ho=1,Ro=Array.isArray(Et[0])?ho:kn,Mo="",zi=function(nn,Yr,Fn){var ei="";return Fn instanceof ze?(Fn=typeof je.angle=="number"?xt(Fn,new ze(1,0,0,1,nn,Yr)):xt(new ze(1,0,0,1,nn,Yr),Fn),v===g.ADVANCED&&(Fn=xt(new ze(1,0,0,-1,0,0),Fn)),ei=Fn.join(" ")+` Tm
|
|
408
|
-
`):ei=T(nn)+" "+T(Yr)+` Td
|
|
409
|
-
`,ei},un=0;un<Et.length;un++){switch(Mo="",Ro){case ho:Va=(Ua?"<":"(")+Et[un][0]+(Ua?">":")"),No=parseFloat(Et[un][1]),To=parseFloat(Et[un][2]);break;case kn:Va=(Ua?"<":"(")+Et[un]+(Ua?">":")"),No=Ii(fe),To=ji(Ce)}yi!==void 0&&yi[un]!==void 0&&(Mo=yi[un]+` Tw
|
|
410
|
-
`),un===0?Y.push(Mo+zi(No,To,Sn)+Va):Ro===kn?Y.push(Mo+Va):Ro===ho&&Y.push(Mo+zi(No,To,Sn)+Va)}Y=Ro===kn?Y.join(` Tj
|
|
411
|
-
T* `):Y.join(` Tj
|
|
412
|
-
`),Y+=` Tj
|
|
413
|
-
`;var Ei=`BT
|
|
414
|
-
/`;return Ei+=Je+" "+Ee+` Tf
|
|
415
|
-
`,Ei+=T(Ee*Ea)+` TL
|
|
416
|
-
`,Ei+=_n+`
|
|
417
|
-
`,Ei+=si,Ei+=Y,ve(Ei+="ET"),w[Je]=!0,jn};var lo=d.__private__.clip=d.clip=function(Y){return ve(Y==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return lo("evenodd")},d.__private__.discardPath=d.discardPath=function(){return ve("n"),this};var Oo=d.__private__.isValidStyle=function(Y){var fe=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(Y)!==-1&&(fe=!0),fe};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(Y){return Oo(Y)&&(c=Y),this};var zu=d.__private__.getStyle=d.getStyle=function(Y){var fe=c;switch(Y){case"D":case"S":fe="S";break;case"F":fe="f";break;case"FD":case"DF":fe="B";break;case"f":case"f*":case"B":case"B*":fe=Y}return fe},Ys=d.close=function(){return ve("h"),this};d.stroke=function(){return ve("S"),this},d.fill=function(Y){return In("f",Y),this},d.fillEvenOdd=function(Y){return In("f*",Y),this},d.fillStroke=function(Y){return In("B",Y),this},d.fillStrokeEvenOdd=function(Y){return In("B*",Y),this};var In=function(Y,fe){On(fe)==="object"?ou(fe,Y):ve(Y)},Xs=function(Y){Y===null||v===g.ADVANCED&&Y===void 0||(Y=zu(Y),ve(Y))};function au(Y,fe,Ce,je,et){var ft=new ph(fe||this.boundingBox,Ce||this.xStep,je||this.yStep,this.gState,et||this.matrix);ft.stream=this.stream;var Et=Y+"$$"+this.cloneIndex+++"$$";return Ft(Et,ft),ft}var ou=function(Y,fe){var Ce=ht[Y.key],je=Nt[Ce];if(je instanceof Sf)ve("q"),ve(of(fe)),je.gState&&d.setGState(je.gState),ve(Y.matrix.toString()+" cm"),ve("/"+Ce+" sh"),ve("Q");else if(je instanceof ph){var et=new ze(1,0,0,-1,0,Ko());Y.matrix&&(et=et.multiply(Y.matrix||kt),Ce=au.call(je,Y.key,Y.boundingBox,Y.xStep,Y.yStep,et).id),ve("q"),ve("/Pattern cs"),ve("/"+Ce+" scn"),je.gState&&d.setGState(je.gState),ve(fe),ve("Q")}},of=function(Y){switch(Y){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},uo=d.moveTo=function(Y,fe){return ve(T(L(Y))+" "+T(N(fe))+" m"),this},ai=d.lineTo=function(Y,fe){return ve(T(L(Y))+" "+T(N(fe))+" l"),this},Da=d.curveTo=function(Y,fe,Ce,je,et,ft){return ve([T(L(Y)),T(N(fe)),T(L(Ce)),T(N(je)),T(L(et)),T(N(ft)),"c"].join(" ")),this};d.__private__.line=d.line=function(Y,fe,Ce,je,et){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(je)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.line");return v===g.COMPAT?this.lines([[Ce-Y,je-fe]],Y,fe,[1,1],et||"S"):this.lines([[Ce-Y,je-fe]],Y,fe,[1,1]).stroke()},d.__private__.lines=d.lines=function(Y,fe,Ce,je,et,ft){var Et,Dt,ir,gr,dr,Sr,Cn,Sn,jn,Jn,si,Ua;if(typeof Y=="number"&&(Ua=Ce,Ce=fe,fe=Y,Y=Ua),je=je||[1,1],ft=ft||!1,isNaN(fe)||isNaN(Ce)||!Array.isArray(Y)||!Array.isArray(je)||!Oo(et)||typeof ft!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(uo(fe,Ce),Et=je[0],Dt=je[1],gr=Y.length,Jn=fe,si=Ce,ir=0;ir<gr;ir++)(dr=Y[ir]).length===2?(Jn=dr[0]*Et+Jn,si=dr[1]*Dt+si,ai(Jn,si)):(Sr=dr[0]*Et+Jn,Cn=dr[1]*Dt+si,Sn=dr[2]*Et+Jn,jn=dr[3]*Dt+si,Jn=dr[4]*Et+Jn,si=dr[5]*Dt+si,Da(Sr,Cn,Sn,jn,Jn,si));return ft&&Ys(),Xs(et),this},d.path=function(Y){for(var fe=0;fe<Y.length;fe++){var Ce=Y[fe],je=Ce.c;switch(Ce.op){case"m":uo(je[0],je[1]);break;case"l":ai(je[0],je[1]);break;case"c":Da.apply(this,je);break;case"h":Ys()}}return this},d.__private__.rect=d.rect=function(Y,fe,Ce,je,et){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(je)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.rect");return v===g.COMPAT&&(je=-je),ve([T(L(Y)),T(N(fe)),T(L(Ce)),T(L(je)),"re"].join(" ")),Xs(et),this},d.__private__.triangle=d.triangle=function(Y,fe,Ce,je,et,ft,Et){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(je)||isNaN(et)||isNaN(ft)||!Oo(Et))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Ce-Y,je-fe],[et-Ce,ft-je],[Y-et,fe-ft]],Y,fe,[1,1],Et,!0),this},d.__private__.roundedRect=d.roundedRect=function(Y,fe,Ce,je,et,ft,Et){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(je)||isNaN(et)||isNaN(ft)||!Oo(Et))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Dt=4/3*(Math.SQRT2-1);return et=Math.min(et,.5*Ce),ft=Math.min(ft,.5*je),this.lines([[Ce-2*et,0],[et*Dt,0,et,ft-ft*Dt,et,ft],[0,je-2*ft],[0,ft*Dt,-et*Dt,ft,-et,ft],[2*et-Ce,0],[-et*Dt,0,-et,-ft*Dt,-et,-ft],[0,2*ft-je],[0,-ft*Dt,et*Dt,-ft,et,-ft]],Y+et,fe,[1,1],Et,!0),this},d.__private__.ellipse=d.ellipse=function(Y,fe,Ce,je,et){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||isNaN(je)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ft=4/3*(Math.SQRT2-1)*Ce,Et=4/3*(Math.SQRT2-1)*je;return uo(Y+Ce,fe),Da(Y+Ce,fe-Et,Y+ft,fe-je,Y,fe-je),Da(Y-ft,fe-je,Y-Ce,fe-Et,Y-Ce,fe),Da(Y-Ce,fe+Et,Y-ft,fe+je,Y,fe+je),Da(Y+ft,fe+je,Y+Ce,fe+Et,Y+Ce,fe),Xs(et),this},d.__private__.circle=d.circle=function(Y,fe,Ce,je){if(isNaN(Y)||isNaN(fe)||isNaN(Ce)||!Oo(je))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(Y,fe,Ce,Ce,je)},d.setFont=function(Y,fe,Ce){return Ce&&(fe=I(fe,Ce)),Je=iu(Y,fe,{disableWarning:!1}),this};var su=d.__private__.getFont=d.getFont=function(){return zt[iu.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var Y,fe,Ce={};for(Y in Ie)if(Ie.hasOwnProperty(Y))for(fe in Ce[Y]=[],Ie[Y])Ie[Y].hasOwnProperty(fe)&&Ce[Y].push(fe);return Ce},d.addFont=function(Y,fe,Ce,je,et){var ft=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ft.indexOf(arguments[3])!==-1?et=arguments[3]:arguments[3]&&ft.indexOf(arguments[3])==-1&&(Ce=I(Ce,je)),et=et||"Identity-H",ja.call(this,Y,fe,Ce,et)};var Mi,Ba=e.lineWidth||.200025,Ao=d.__private__.getLineWidth=d.getLineWidth=function(){return Ba},Ps=d.__private__.setLineWidth=d.setLineWidth=function(Y){return Ba=Y,ve(T(L(Y))+" w"),this};d.__private__.setLineDash=hr.API.setLineDash=hr.API.setLineDashPattern=function(Y,fe){if(Y=Y||[],fe=fe||0,isNaN(fe)||!Array.isArray(Y))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return Y=Y.map(function(Ce){return T(L(Ce))}).join(" "),fe=T(L(fe)),ve("["+Y+"] "+fe+" d"),this};var gl=d.__private__.getLineHeight=d.getLineHeight=function(){return Ee*Mi};d.__private__.getLineHeight=d.getLineHeight=function(){return Ee*Mi};var Uu=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(Y){return typeof(Y=Y||1.15)=="number"&&(Mi=Y),this},oi=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Mi};Uu(e.lineHeight);var Ii=d.__private__.getHorizontalCoordinate=function(Y){return L(Y)},ji=d.__private__.getVerticalCoordinate=function(Y){return v===g.ADVANCED?Y:St[D].mediaBox.topRightY-St[D].mediaBox.bottomLeftY-L(Y)},vl=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(Y){return T(Ii(Y))},xa=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(Y){return T(ji(Y))},wn=e.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Wn(wn)},d.__private__.setStrokeColor=d.setDrawColor=function(Y,fe,Ce,je){return wn=en({ch1:Y,ch2:fe,ch3:Ce,ch4:je,pdfColorType:"draw",precision:2}),ve(wn),this};var Fi=e.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Wn(Fi)},d.__private__.setFillColor=d.setFillColor=function(Y,fe,Ce,je){return Fi=en({ch1:Y,ch2:fe,ch3:Ce,ch4:je,pdfColorType:"fill",precision:2}),ve(Fi),this};var _n=e.textColor||"0 g",ea=d.__private__.getTextColor=d.getTextColor=function(){return Wn(_n)};d.__private__.setTextColor=d.setTextColor=function(Y,fe,Ce,je){return _n=en({ch1:Y,ch2:fe,ch3:Ce,ch4:je,pdfColorType:"text",precision:3}),this};var ta=e.charSpace,qa=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(ta||0)};d.__private__.setCharSpace=d.setCharSpace=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return ta=Y,this};var lu=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(Y){var fe=d.CapJoinStyles[Y];if(fe===void 0)throw new Error("Line cap style of '"+Y+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return lu=fe,ve(fe+" J"),this};var Os=0;d.__private__.setLineJoin=d.setLineJoin=function(Y){var fe=d.CapJoinStyles[Y];if(fe===void 0)throw new Error("Line join style of '"+Y+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Os=fe,ve(fe+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(Y){if(Y=Y||0,isNaN(Y))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ve(T(L(Y))+" M"),this},d.GState=B1,d.setGState=function(Y){(Y=typeof Y=="string"?gt[_t[Y]]:Ks(null,Y)).equals(rr)||(ve("/"+Y.id+" gs"),rr=Y)};var Ks=function(Y,fe){if(!Y||!_t[Y]){var Ce=!1;for(var je in gt)if(gt.hasOwnProperty(je)&>[je].equals(fe)){Ce=!0;break}if(Ce)fe=gt[je];else{var et="GS"+(Object.keys(gt).length+1).toString(10);gt[et]=fe,fe.id=et}return Y&&(_t[Y]=fe.id),it.publish("addGState",fe),fe}};d.addGState=function(Y,fe){return Ks(Y,fe),this},d.saveGraphicsState=function(){return ve("q"),He.push({key:Je,size:Ee,color:_n}),this},d.restoreGraphicsState=function(){ve("Q");var Y=He.pop();return Je=Y.key,Ee=Y.size,_n=Y.color,rr=null,this},d.setCurrentTransformationMatrix=function(Y){return ve(Y.toString()+" cm"),this},d.comment=function(Y){return ve("#"+Y),this};var $n=function(Y,fe){var Ce=Y||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Ce},set:function(ft){isNaN(ft)||(Ce=parseFloat(ft))}});var je=fe||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return je},set:function(ft){isNaN(ft)||(je=parseFloat(ft))}});var et="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return et},set:function(ft){et=ft.toString()}}),this},vi=function(Y,fe,Ce,je){$n.call(this,Y,fe),this.type="rect";var et=Ce||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return et},set:function(Et){isNaN(Et)||(et=parseFloat(Et))}});var ft=je||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ft},set:function(Et){isNaN(Et)||(ft=parseFloat(Et))}}),this},tn=function(){this.page=Wt,this.currentPage=D,this.pages=me.slice(0),this.pagesContext=St.slice(0),this.x=qt,this.y=At,this.matrix=Ht,this.width=Xo(D),this.height=Ko(D),this.outputDestination=Oe,this.id="",this.objectNumber=-1};tn.prototype.restore=function(){Wt=this.page,D=this.currentPage,St=this.pagesContext,me=this.pages,qt=this.x,At=this.y,Ht=this.matrix,yl(D,this.width),uu(D,this.height),Oe=this.outputDestination};var Zs=function(Y,fe,Ce,je,et){bt.push(new tn),Wt=D=0,me=[],qt=Y,At=fe,Ht=et,Wo([Ce,je])},za=function(Y){if(De[Y])bt.pop().restore();else{var fe=new tn,Ce="Xo"+(Object.keys(Ue).length+1).toString(10);fe.id=Ce,De[Y]=Ce,Ue[Ce]=fe,it.publish("addFormObject",fe),bt.pop().restore()}};for(var ml in d.beginFormObject=function(Y,fe,Ce,je,et){return Zs(Y,fe,Ce,je,et),this},d.endFormObject=function(Y){return za(Y),this},d.doFormObject=function(Y,fe){var Ce=Ue[De[Y]];return ve("q"),ve(fe.toString()+" cm"),ve("/"+Ce.id+" Do"),ve("Q"),this},d.getFormObject=function(Y){var fe=Ue[De[Y]];return{x:fe.x,y:fe.y,width:fe.width,height:fe.height,matrix:fe.matrix}},d.save=function(Y,fe){return Y=Y||"generated.pdf",(fe=fe||{}).returnPromise=fe.returnPromise||!1,fe.returnPromise===!1?(_f(Ss($o()),Y),typeof _f.unload=="function"&&pr.setTimeout&&setTimeout(_f.unload,911),this):new Promise(function(Ce,je){try{var et=_f(Ss($o()),Y);typeof _f.unload=="function"&&pr.setTimeout&&setTimeout(_f.unload,911),Ce(et)}catch(ft){je(ft.message)}})},hr.API)hr.API.hasOwnProperty(ml)&&(ml==="events"&&hr.API.events.length?function(Y,fe){var Ce,je,et;for(et=fe.length-1;et!==-1;et--)Ce=fe[et][0],je=fe[et][1],Y.subscribe.apply(Y,[Ce].concat(typeof je=="function"?[je]:je))}(it,hr.API.events):d[ml]=hr.API[ml]);var Xo=d.getPageWidth=function(Y){return(St[Y=Y||D].mediaBox.topRightX-St[Y].mediaBox.bottomLeftX)/nt},yl=d.setPageWidth=function(Y,fe){St[Y].mediaBox.topRightX=fe*nt+St[Y].mediaBox.bottomLeftX},Ko=d.getPageHeight=function(Y){return(St[Y=Y||D].mediaBox.topRightY-St[Y].mediaBox.bottomLeftY)/nt},uu=d.setPageHeight=function(Y,fe){St[Y].mediaBox.topRightY=fe*nt+St[Y].mediaBox.bottomLeftY};return d.internal={pdfEscape:ha,getStyle:zu,getFont:su,getFontSize:he,getCharSpace:qa,getTextColor:ea,getLineHeight:gl,getLineHeightFactor:oi,getLineWidth:Ao,write:Xe,getHorizontalCoordinate:Ii,getVerticalCoordinate:ji,getCoordinateString:vl,getVerticalCoordinateString:xa,collections:{},newObject:Ut,newAdditionalObject:kr,newObjectDeferred:Yt,newObjectDeferredBegin:_r,getFilters:Qn,putStream:_i,events:it,scaleFactor:nt,pageSize:{getWidth:function(){return Xo(D)},setWidth:function(Y){yl(D,Y)},getHeight:function(){return Ko(D)},setHeight:function(Y){uu(D,Y)}},encryptionOptions:h,encryption:gn,getEncryptor:Yo,output:xs,getNumberOfPages:af,pages:me,out:ve,f2:C,f3:x,getPageInfo:Fa,getPageInfoByObjId:It,getCurrentPageInfo:$s,getPDFVersion:E,Point:$n,Rectangle:vi,Matrix:ze,hasHotfix:Es},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return Xo(D)},set:function(Y){yl(D,Y)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return Ko(D)},set:function(Y){uu(D,Y)},enumerable:!0,configurable:!0}),ii.call(d,Ae),Je="F1",nu(a,t),it.publish("initialized"),d}uh.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},uh.prototype.toHexString=function(e){return e.split("").map(function(r){return("0"+(255&r.charCodeAt(0)).toString(16)).slice(-2)}).join("")},uh.prototype.hexToBytes=function(e){for(var r=[],t=0;t<e.length;t+=2)r.push(String.fromCharCode(parseInt(e.substr(t,2),16)));return r.join("")},uh.prototype.processOwnerPassword=function(e,r){return M2(R2(r).substr(0,5),e)},uh.prototype.encryptor=function(e,r){var t=R2(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&r,r>>8&255)).substr(0,10);return function(n){return M2(t,n)}},B1.prototype.equals=function(e){var r,t="id,objectNumber,equals";if(!e||On(e)!==On(this))return!1;var n=0;for(r in this)if(!(t.indexOf(r)>=0)){if(this.hasOwnProperty(r)&&!e.hasOwnProperty(r)||this[r]!==e[r])return!1;n++}for(r in e)e.hasOwnProperty(r)&&t.indexOf(r)<0&&n--;return n===0},hr.API={events:[]},hr.version="3.0.1";var ki=hr.API,jm=1,Bf=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ah=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Er=function(e){return e.toFixed(2)},qc=function(e){return e.toFixed(5)};ki.__acroform__={};var bs=function(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e},Z4=function(e){return e*jm},Au=function(e){var r=new S_,t=tr.internal.getHeight(e)||0,n=tr.internal.getWidth(e)||0;return r.BBox=[0,0,Number(Er(n)),Number(Er(t))],r},jk=ki.__acroform__.setBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|=1<<r},Fk=ki.__acroform__.clearBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&=~(1<<r)},Dk=ki.__acroform__.getBit=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return(e&1<<r)==0?0:1},Ki=ki.__acroform__.getBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Dk(e,r-1)},Zi=ki.__acroform__.setBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return jk(e,r-1)},Qi=ki.__acroform__.clearBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Fk(e,r-1)},Bk=ki.__acroform__.calculateCoordinates=function(e,r){var t=r.internal.getHorizontalCoordinate,n=r.internal.getVerticalCoordinate,a=e[0],i=e[1],o=e[2],l=e[3],u={};return u.lowerLeft_X=t(a)||0,u.lowerLeft_Y=n(i+l)||0,u.upperRight_X=t(a+o)||0,u.upperRight_Y=n(i)||0,[Number(Er(u.lowerLeft_X)),Number(Er(u.lowerLeft_Y)),Number(Er(u.upperRight_X)),Number(Er(u.upperRight_Y))]},qk=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var r=[],t=e._V||e.DV,n=I2(e,t),a=e.scope.internal.getFont(e.fontName,e.fontStyle).id;r.push("/Tx BMC"),r.push("q"),r.push("BT"),r.push(e.scope.__private__.encodeColorString(e.color)),r.push("/"+a+" "+Er(n.fontSize)+" Tf"),r.push("1 0 0 1 0 0 Tm"),r.push(n.text),r.push("ET"),r.push("Q"),r.push("EMC");var i=Au(e);return i.scope=e.scope,i.stream=r.join(`
|
|
418
|
-
`),i}},I2=function(e,r){var t=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},a=(r=(r=r.substr(0,1)=="("?r.substr(1):r).substr(r.length-1)==")"?r.substr(0,r.length-1):r).split(" ");a=e.multiline?a.map(function(x){return x.split(`
|
|
419
|
-
`)}):a.map(function(x){return[x]});var i=t,o=tr.internal.getHeight(e)||0;o=o<0?-o:o;var l=tr.internal.getWidth(e)||0;l=l<0?-l:l;var u=function(x,L,A){if(x+1<a.length){var N=L+" "+a[x+1][0];return h1(N,e,A).width<=l-4}return!1};i++;e:for(;i>0;){r="",i--;var c,h,p=h1("3",e,i).height,w=e.multiline?o-i:(o-p)/2,d=w+=2,_=0,E=0,S=0;if(i<=0){r=`(...) Tj
|
|
420
|
-
`,r+="% Width of Text: "+h1(r,e,i=12).width+", FieldWidth:"+l+`
|
|
421
|
-
`;break}for(var m="",g=0,v=0;v<a.length;v++)if(a.hasOwnProperty(v)){var b=!1;if(a[v].length!==1&&S!==a[v].length-1){if((p+2)*(g+2)+2>o)continue e;m+=a[v][S],b=!0,E=v,v--}else{m=(m+=a[v][S]+" ").substr(m.length-1)==" "?m.substr(0,m.length-1):m;var O=parseInt(v),I=u(O,m,i),T=v>=a.length-1;if(I&&!T){m+=" ",S=0;continue}if(I||T){if(T)E=O;else if(e.multiline&&(p+2)*(g+2)+2>o)continue e}else{if(!e.multiline||(p+2)*(g+2)+2>o)continue e;E=O}}for(var M="",j=_;j<=E;j++){var C=a[j];if(e.multiline){if(j===E){M+=C[S]+" ",S=(S+1)%C.length;continue}if(j===_){M+=C[C.length-1]+" ";continue}}M+=C[0]+" "}switch(M=M.substr(M.length-1)==" "?M.substr(0,M.length-1):M,h=h1(M,e,i).width,e.textAlign){case"right":c=l-h-2;break;case"center":c=(l-h)/2;break;case"left":default:c=2}r+=Er(c)+" "+Er(d)+` Td
|
|
422
|
-
`,r+="("+Bf(M)+`) Tj
|
|
423
|
-
`,r+=-Er(c)+` 0 Td
|
|
424
|
-
`,d=-(i+2),h=0,_=b?E:E+1,g++,m=""}break}return n.text=r,n.fontSize=i,n},h1=function(e,r,t){var n=r.scope.internal.getFont(r.fontName,r.fontStyle),a=r.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:r.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:a}},zk={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Uk=function(e,r){var t={type:"reference",object:e};r.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&r.internal.getPageInfo(e.page).pageContext.annotations.push(t)},Hk=function(e,r){for(var t in e)if(e.hasOwnProperty(t)){var n=t,a=e[t];r.internal.newObjectDeferredBegin(a.objId,!0),On(a)==="object"&&typeof a.putStream=="function"&&a.putStream(),delete e[n]}},Gk=function(e,r){if(r.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(Jl.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(zk)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");jm=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new x_,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in n)if(n.hasOwnProperty(a)){var i=n[a];i.objId=void 0,i.hasAnnotation&&Uk(i,t)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(t){(function(n,a){var i=!n;for(var o in n||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var l=n[o],u=[],c=l.Rect;if(l.Rect&&(l.Rect=Bk(l.Rect,a)),a.internal.newObjectDeferredBegin(l.objId,!0),l.DA=tr.createDefaultAppearanceStream(l),On(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(u=l.getKeyValueListForStream()),l.Rect=c,l.hasAppearanceStream&&!l.appearanceStreamContent){var h=qk(l);u.push({key:"AP",value:"<</N "+h+">>"}),a.internal.acroformPlugin.xForms.push(h)}if(l.appearanceStreamContent){var p="";for(var w in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(w)){var d=l.appearanceStreamContent[w];if(p+="/"+w+" ",p+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var o in d)if(d.hasOwnProperty(o)){var _=d[o];typeof _=="function"&&(_=_.call(a,l)),p+="/"+o+" "+_+" ",a.internal.acroformPlugin.xForms.indexOf(_)>=0||a.internal.acroformPlugin.xForms.push(_)}}else typeof(_=d)=="function"&&(_=_.call(a,l)),p+="/"+o+" "+_,a.internal.acroformPlugin.xForms.indexOf(_)>=0||a.internal.acroformPlugin.xForms.push(_);p+=">>"}u.push({key:"AP",value:`<<
|
|
425
|
-
`+p+">>"})}a.internal.putStream({additionalKeyValues:u,objectId:l.objId}),a.internal.out("endobj")}i&&Hk(a.internal.acroformPlugin.xForms,a)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},__=ki.__acroform__.arrayToPdfArray=function(e,r,t){var n=function(o){return o};if(Array.isArray(e)){for(var a="[",i=0;i<e.length;i++)switch(i!==0&&(a+=" "),On(e[i])){case"boolean":case"number":case"object":a+=e[i].toString();break;case"string":e[i].substr(0,1)!=="/"?(r!==void 0&&t&&(n=t.internal.getEncryptor(r)),a+="("+Bf(n(e[i].toString()))+")"):a+=e[i].toString()}return a+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},l2=function(e,r,t){var n=function(a){return a};return r!==void 0&&t&&(n=t.internal.getEncryptor(r)),(e=e||"").toString(),e="("+Bf(n(e))+")"},Lu=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Lu.prototype.toString=function(){return this.objId+" 0 R"},Lu.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Lu.prototype.getKeyValueListForStream=function(){var e=[],r=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var t in r)if(Object.getOwnPropertyDescriptor(this,r[t]).configurable===!1){var n=r[t],a=this[n];a&&(Array.isArray(a)?e.push({key:n,value:__(a,this.objId,this.scope)}):a instanceof Lu?(a.scope=this.scope,e.push({key:n,value:a.objId+" 0 R"})):typeof a!="function"&&e.push({key:n,value:a}))}return e};var S_=function(){Lu.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,r=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};bs(S_,Lu);var x_=function(){Lu.call(this);var e,r=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return r.length>0?r:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return r}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Bf(t(e))+")"}},set:function(t){e=t}})};bs(x_,Lu);var Jl=function e(){Lu.call(this);var r=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return r},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute F supplied.');r=m}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ki(r,3)},set:function(m){m?this.F=Zi(r,3):this.F=Qi(r,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute Ff supplied.');t=m}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(m){n=m!==void 0?m:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(m){n[0]=m}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(m){n[1]=m}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(m){n[2]=m}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(m){n[3]=m}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(m){switch(m){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=m;break;default:throw new Error('Invalid value "'+m+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof q1)return;i="FieldObject"+e.FieldNum++}var m=function(g){return g};return this.scope&&(m=this.scope.internal.getEncryptor(this.objId)),"("+Bf(m(i))+")"},set:function(m){i=m.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(m){i=m}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(m){o=m}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(m){l=m}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(m){u=m}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return c===void 0?50/jm:c},set:function(m){c=m}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(m){h=m}});var p="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!p||this instanceof q1||this instanceof Of))return l2(p,this.objId,this.scope)},set:function(m){m=m.toString(),p=m}});var w=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof Ta?w:l2(w,this.objId,this.scope)},set:function(m){m=m.toString(),w=this instanceof Ta?m:m.substr(0,1)==="("?ah(m.substr(1,m.length-2)):ah(m)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ta?ah(w.substr(1,w.length-1)):w},set:function(m){m=m.toString(),w=this instanceof Ta?"/"+m:m}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(m){this.V=m}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof Ta?d:l2(d,this.objId,this.scope)},set:function(m){m=m.toString(),d=this instanceof Ta?m:m.substr(0,1)==="("?ah(m.substr(1,m.length-2)):ah(m)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ta?ah(d.substr(1,d.length-1)):d},set:function(m){m=m.toString(),d=this instanceof Ta?"/"+m:m}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var _,E=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return E},set:function(m){m=!!m,E=m}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(_)return _},set:function(m){_=m}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,1)},set:function(m){m?this.Ff=Zi(this.Ff,1):this.Ff=Qi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,2)},set:function(m){m?this.Ff=Zi(this.Ff,2):this.Ff=Qi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,3)},set:function(m){m?this.Ff=Zi(this.Ff,3):this.Ff=Qi(this.Ff,3)}});var S=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(S!==null)return S},set:function(m){if([0,1,2].indexOf(m)===-1)throw new Error('Invalid value "'+m+'" for attribute Q supplied.');S=m}}),Object.defineProperty(this,"textAlign",{get:function(){var m;switch(S){case 0:default:m="left";break;case 1:m="center";break;case 2:m="right"}return m},configurable:!0,enumerable:!0,set:function(m){switch(m){case"right":case 2:S=2;break;case"center":case 1:S=1;break;case"left":case 0:default:S=0}}})};bs(Jl,Lu);var vh=function(){Jl.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var r=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return __(r,this.objId,this.scope)},set:function(t){var n,a;a=[],typeof(n=t)=="string"&&(a=function(i,o,l){l||(l=1);for(var u,c=[];u=o.exec(i);)c.push(u[l]);return c}(n,/\((.*?)\)/g)),r=a}}),this.getOptions=function(){return r},this.setOptions=function(t){r=t,this.sort&&r.sort()},this.addOption=function(t){t=(t=t||"").toString(),r.push(t),this.sort&&r.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();r.indexOf(t)!==-1&&(r.splice(r.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,18)},set:function(t){t?this.Ff=Zi(this.Ff,18):this.Ff=Qi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Zi(this.Ff,19):this.Ff=Qi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,20)},set:function(t){t?(this.Ff=Zi(this.Ff,20),r.sort()):this.Ff=Qi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,22)},set:function(t){t?this.Ff=Zi(this.Ff,22):this.Ff=Qi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,23)},set:function(t){t?this.Ff=Zi(this.Ff,23):this.Ff=Qi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,27)},set:function(t){t?this.Ff=Zi(this.Ff,27):this.Ff=Qi(this.Ff,27)}}),this.hasAppearanceStream=!1};bs(vh,Jl);var mh=function(){vh.call(this),this.fontName="helvetica",this.combo=!1};bs(mh,vh);var yh=function(){mh.call(this),this.combo=!0};bs(yh,mh);var _1=function(){yh.call(this),this.edit=!0};bs(_1,yh);var Ta=function(){Jl.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,15)},set:function(t){t?this.Ff=Zi(this.Ff,15):this.Ff=Qi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,16)},set:function(t){t?this.Ff=Zi(this.Ff,16):this.Ff=Qi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,17)},set:function(t){t?this.Ff=Zi(this.Ff,17):this.Ff=Qi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,26)},set:function(t){t?this.Ff=Zi(this.Ff,26):this.Ff=Qi(this.Ff,26)}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(i){return i};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(r).length!==0){var n,a=[];for(n in a.push("<<"),r)a.push("/"+n+" ("+Bf(t(r[n]))+")");return a.push(">>"),a.join(`
|
|
426
|
-
`)}},set:function(t){On(t)==="object"&&(r=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(t){typeof t=="string"&&(r.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};bs(Ta,Jl);var S1=function(){Ta.call(this),this.pushButton=!0};bs(S1,Ta);var bh=function(){Ta.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r!==void 0?r:[]}})};bs(bh,Ta);var q1=function(){var e,r;Jl.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){e=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(a){r=a}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(l){return l};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var i,o=[];for(i in o.push("<<"),n)o.push("/"+i+" ("+Bf(a(n[i]))+")");return o.push(">>"),o.join(`
|
|
427
|
-
`)},set:function(a){On(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(a){t="/"+a}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=tr.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};bs(q1,Jl),bh.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var r in this.Kids)if(this.Kids.hasOwnProperty(r)){var t=this.Kids[r];t.appearanceStreamContent=e.createAppearanceStream(t.optionName),t.caption=e.getCA()}},bh.prototype.createOption=function(e){var r=new q1;return r.Parent=this,r.optionName=e,this.Kids.push(r),Vk.call(this.scope,r),r};var x1=function(){Ta.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=tr.CheckBox.createAppearanceStream()};bs(x1,Ta);var Of=function(){Jl.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,13)},set:function(r){r?this.Ff=Zi(this.Ff,13):this.Ff=Qi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,21)},set:function(r){r?this.Ff=Zi(this.Ff,21):this.Ff=Qi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,23)},set:function(r){r?this.Ff=Zi(this.Ff,23):this.Ff=Qi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,24)},set:function(r){r?this.Ff=Zi(this.Ff,24):this.Ff=Qi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,25)},set:function(r){r?this.Ff=Zi(this.Ff,25):this.Ff=Qi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,26)},set:function(r){r?this.Ff=Zi(this.Ff,26):this.Ff=Qi(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){Number.isInteger(r)&&(e=r)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};bs(Of,Jl);var E1=function(){Of.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ki(this.Ff,14)},set:function(e){e?this.Ff=Zi(this.Ff,14):this.Ff=Qi(this.Ff,14)}}),this.password=!0};bs(E1,Of);var tr={CheckBox:{createAppearanceStream:function(){return{N:{On:tr.CheckBox.YesNormal},D:{On:tr.CheckBox.YesPushDown,Off:tr.CheckBox.OffPushDown}}},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),i=I2(e,e.caption);return t.push("0.749023 g"),t.push("0 0 "+Er(tr.internal.getWidth(e))+" "+Er(tr.internal.getHeight(e))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+Er(i.fontSize)+" Tf "+a),t.push("BT"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC"),r.stream=t.join(`
|
|
428
|
-
`),r},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),a=[],i=tr.internal.getHeight(e),o=tr.internal.getWidth(e),l=I2(e,e.caption);return a.push("1 g"),a.push("0 0 "+Er(o)+" "+Er(i)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+Er(o-1)+" "+Er(i-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+t+" "+Er(l.fontSize)+" Tf "+n),a.push(l.text),a.push("ET"),a.push("Q"),r.stream=a.join(`
|
|
429
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Er(tr.internal.getWidth(e))+" "+Er(tr.internal.getHeight(e))+" re"),t.push("f"),r.stream=t.join(`
|
|
430
|
-
`),r}},RadioButton:{Circle:{createAppearanceStream:function(e){var r={D:{Off:tr.RadioButton.Circle.OffPushDown},N:{}};return r.N[e]=tr.RadioButton.Circle.YesNormal,r.D[e]=tr.RadioButton.Circle.YesPushDown,r},getCA:function(){return"l"},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=tr.internal.getWidth(e)<=tr.internal.getHeight(e)?tr.internal.getWidth(e)/4:tr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=tr.internal.Bezier_C,i=Number((n*a).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+qc(tr.internal.getWidth(e)/2)+" "+qc(tr.internal.getHeight(e)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),t.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),t.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),t.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
431
|
-
`),r},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=tr.internal.getWidth(e)<=tr.internal.getHeight(e)?tr.internal.getWidth(e)/4:tr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),i=Number((a*tr.internal.Bezier_C).toFixed(5)),o=Number((n*tr.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+qc(tr.internal.getWidth(e)/2)+" "+qc(tr.internal.getHeight(e)/2)+" cm"),t.push(a+" 0 m"),t.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),t.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),t.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),t.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+qc(tr.internal.getWidth(e)/2)+" "+qc(tr.internal.getHeight(e)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),t.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),t.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),t.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
432
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=tr.internal.getWidth(e)<=tr.internal.getHeight(e)?tr.internal.getWidth(e)/4:tr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),i=Number((a*tr.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+qc(tr.internal.getWidth(e)/2)+" "+qc(tr.internal.getHeight(e)/2)+" cm"),t.push(a+" 0 m"),t.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),t.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),t.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),t.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
433
|
-
`),r}},Cross:{createAppearanceStream:function(e){var r={D:{Off:tr.RadioButton.Cross.OffPushDown},N:{}};return r.N[e]=tr.RadioButton.Cross.YesNormal,r.D[e]=tr.RadioButton.Cross.YesPushDown,r},getCA:function(){return"8"},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=tr.internal.calculateCross(e);return t.push("q"),t.push("1 1 "+Er(tr.internal.getWidth(e)-2)+" "+Er(tr.internal.getHeight(e)-2)+" re"),t.push("W"),t.push("n"),t.push(Er(n.x1.x)+" "+Er(n.x1.y)+" m"),t.push(Er(n.x2.x)+" "+Er(n.x2.y)+" l"),t.push(Er(n.x4.x)+" "+Er(n.x4.y)+" m"),t.push(Er(n.x3.x)+" "+Er(n.x3.y)+" l"),t.push("s"),t.push("Q"),r.stream=t.join(`
|
|
434
|
-
`),r},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=tr.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+Er(tr.internal.getWidth(e))+" "+Er(tr.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Er(tr.internal.getWidth(e)-2)+" "+Er(tr.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Er(t.x1.x)+" "+Er(t.x1.y)+" m"),n.push(Er(t.x2.x)+" "+Er(t.x2.y)+" l"),n.push(Er(t.x4.x)+" "+Er(t.x4.y)+" m"),n.push(Er(t.x3.x)+" "+Er(t.x3.y)+" l"),n.push("s"),n.push("Q"),r.stream=n.join(`
|
|
435
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Er(tr.internal.getWidth(e))+" "+Er(tr.internal.getHeight(e))+" re"),t.push("f"),r.stream=t.join(`
|
|
436
|
-
`),r}}},createDefaultAppearanceStream:function(e){var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,t=e.scope.__private__.encodeColorString(e.color);return"/"+r+" "+e.fontSize+" Tf "+t}};tr.internal={Bezier_C:.551915024494,calculateCross:function(e){var r=tr.internal.getWidth(e),t=tr.internal.getHeight(e),n=Math.min(r,t);return{x1:{x:(r-n)/2,y:(t-n)/2+n},x2:{x:(r-n)/2+n,y:(t-n)/2},x3:{x:(r-n)/2,y:(t-n)/2},x4:{x:(r-n)/2+n,y:(t-n)/2+n}}}},tr.internal.getWidth=function(e){var r=0;return On(e)==="object"&&(r=Z4(e.Rect[2])),r},tr.internal.getHeight=function(e){var r=0;return On(e)==="object"&&(r=Z4(e.Rect[3])),r};var Vk=ki.addField=function(e){if(Gk(this,e),!(e instanceof Jl))throw new Error("Invalid argument passed to jsPDF.addField.");var r;return(r=e).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=!1,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};ki.AcroFormChoiceField=vh,ki.AcroFormListBox=mh,ki.AcroFormComboBox=yh,ki.AcroFormEditBox=_1,ki.AcroFormButton=Ta,ki.AcroFormPushButton=S1,ki.AcroFormRadioButton=bh,ki.AcroFormCheckBox=x1,ki.AcroFormTextField=Of,ki.AcroFormPasswordField=E1,ki.AcroFormAppearance=tr,ki.AcroForm={ChoiceField:vh,ListBox:mh,ComboBox:yh,EditBox:_1,Button:Ta,PushButton:S1,RadioButton:bh,CheckBox:x1,TextField:Of,PasswordField:E1,Appearance:tr},hr.AcroForm={ChoiceField:vh,ListBox:mh,ComboBox:yh,EditBox:_1,Button:Ta,PushButton:S1,RadioButton:bh,CheckBox:x1,TextField:Of,PasswordField:E1,Appearance:tr};hr.AcroForm;function E_(e){return e.reduce(function(r,t,n){return r[t]=n,r},{})}(function(e){e.__addimage__={};var r="UNKNOWN",t={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=e.__addimage__.getImageFileTypeByImageData=function(x,L){var A,N,F,U,W,$=r;if((L=L||r)==="RGBA"||x.data!==void 0&&x.data instanceof Uint8ClampedArray&&"height"in x&&"width"in x)return"RGBA";if(I(x))for(W in t)for(F=t[W],A=0;A<F.length;A+=1){for(U=!0,N=0;N<F[A].length;N+=1)if(F[A][N]!==void 0&&F[A][N]!==x[N]){U=!1;break}if(U===!0){$=W;break}}else for(W in t)for(F=t[W],A=0;A<F.length;A+=1){for(U=!0,N=0;N<F[A].length;N+=1)if(F[A][N]!==void 0&&F[A][N]!==x.charCodeAt(N)){U=!1;break}if(U===!0){$=W;break}}return $===r&&L!==r&&($=L),$},a=function x(L){for(var A=this.internal.write,N=this.internal.putStream,F=(0,this.internal.getFilters)();F.indexOf("FlateEncode")!==-1;)F.splice(F.indexOf("FlateEncode"),1);L.objectId=this.internal.newObject();var U=[];if(U.push({key:"Type",value:"/XObject"}),U.push({key:"Subtype",value:"/Image"}),U.push({key:"Width",value:L.width}),U.push({key:"Height",value:L.height}),L.colorSpace===S.INDEXED?U.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(L.palette.length/3-1)+" "+("sMask"in L&&L.sMask!==void 0?L.objectId+2:L.objectId+1)+" 0 R]"}):(U.push({key:"ColorSpace",value:"/"+L.colorSpace}),L.colorSpace===S.DEVICE_CMYK&&U.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),U.push({key:"BitsPerComponent",value:L.bitsPerComponent}),"decodeParameters"in L&&L.decodeParameters!==void 0&&U.push({key:"DecodeParms",value:"<<"+L.decodeParameters+">>"}),"transparency"in L&&Array.isArray(L.transparency)){for(var W="",$=0,Z=L.transparency.length;$<Z;$++)W+=L.transparency[$]+" "+L.transparency[$]+" ";U.push({key:"Mask",value:"["+W+"]"})}L.sMask!==void 0&&U.push({key:"SMask",value:L.objectId+1+" 0 R"});var V=L.filter!==void 0?["/"+L.filter]:void 0;if(N({data:L.data,additionalKeyValues:U,alreadyAppliedFilters:V,objectId:L.objectId}),A("endobj"),"sMask"in L&&L.sMask!==void 0){var G="/Predictor "+L.predictor+" /Colors 1 /BitsPerComponent "+L.bitsPerComponent+" /Columns "+L.width,z={width:L.width,height:L.height,colorSpace:"DeviceGray",bitsPerComponent:L.bitsPerComponent,decodeParameters:G,data:L.sMask};"filter"in L&&(z.filter=L.filter),x.call(this,z)}if(L.colorSpace===S.INDEXED){var D=this.internal.newObject();N({data:M(new Uint8Array(L.palette)),objectId:D}),A("endobj")}},i=function(){var x=this.internal.collections.addImage_images;for(var L in x)a.call(this,x[L])},o=function(){var x,L=this.internal.collections.addImage_images,A=this.internal.write;for(var N in L)A("/I"+(x=L[N]).index,x.objectId,"0","R")},l=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",o))},u=function(){var x=this.internal.collections.addImage_images;return l.call(this),x},c=function(){return Object.keys(this.internal.collections.addImage_images).length},h=function(x){return typeof e["process"+x.toUpperCase()]=="function"},p=function(x){return On(x)==="object"&&x.nodeType===1},w=function(x,L){if(x.nodeName==="IMG"&&x.hasAttribute("src")){var A=""+x.getAttribute("src");if(A.indexOf("data:image/")===0)return lp(unescape(A).split("base64,").pop());var N=e.loadFile(A,!0);if(N!==void 0)return N}if(x.nodeName==="CANVAS"){if(x.width===0||x.height===0)throw new Error("Given canvas must have data. Canvas width: "+x.width+", height: "+x.height);var F;switch(L){case"PNG":F="image/png";break;case"WEBP":F="image/webp";break;case"JPEG":case"JPG":default:F="image/jpeg"}return lp(x.toDataURL(F,1).split("base64,").pop())}},d=function(x){var L=this.internal.collections.addImage_images;if(L){for(var A in L)if(x===L[A].alias)return L[A]}},_=function(x,L,A){return x||L||(x=-96,L=-96),x<0&&(x=-1*A.width*72/x/this.internal.scaleFactor),L<0&&(L=-1*A.height*72/L/this.internal.scaleFactor),x===0&&(x=L*A.width/A.height),L===0&&(L=x*A.height/A.width),[x,L]},E=function(x,L,A,N,F,U){var W=_.call(this,A,N,F),$=this.internal.getCoordinateString,Z=this.internal.getVerticalCoordinateString,V=u.call(this);if(A=W[0],N=W[1],V[F.index]=F,U){U*=Math.PI/180;var G=Math.cos(U),z=Math.sin(U),D=function(ne){return ne.toFixed(4)},K=[D(G),D(z),D(-1*z),D(G),0,0,"cm"]}this.internal.write("q"),U?(this.internal.write([1,"0","0",1,$(x),Z(L+N),"cm"].join(" ")),this.internal.write(K.join(" ")),this.internal.write([$(A),"0","0",$(N),"0","0","cm"].join(" "))):this.internal.write([$(A),"0","0",$(N),$(x),Z(L+N),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+F.index+" Do"),this.internal.write("Q")},S=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var m=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},g=e.__addimage__.sHashCode=function(x){var L,A,N=0;if(typeof x=="string")for(A=x.length,L=0;L<A;L++)N=(N<<5)-N+x.charCodeAt(L),N|=0;else if(I(x))for(A=x.byteLength/2,L=0;L<A;L++)N=(N<<5)-N+x[L],N|=0;return N},v=e.__addimage__.validateStringAsBase64=function(x){(x=x||"").toString().trim();var L=!0;return x.length===0&&(L=!1),x.length%4!=0&&(L=!1),/^[A-Za-z0-9+/]+$/.test(x.substr(0,x.length-2))===!1&&(L=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(x.substr(-2))===!1&&(L=!1),L},b=e.__addimage__.extractImageFromDataUrl=function(x){if(x==null||!(x=x.trim()).startsWith("data:"))return null;var L=x.indexOf(",");return L<0?null:x.substring(0,L).trim().endsWith("base64")?x.substring(L+1):null},O=e.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};e.__addimage__.isArrayBuffer=function(x){return O()&&x instanceof ArrayBuffer};var I=e.__addimage__.isArrayBufferView=function(x){return O()&&typeof Uint32Array<"u"&&(x instanceof Int8Array||x instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)},T=e.__addimage__.binaryStringToUint8Array=function(x){for(var L=x.length,A=new Uint8Array(L),N=0;N<L;N++)A[N]=x.charCodeAt(N);return A},M=e.__addimage__.arrayBufferToBinaryString=function(x){for(var L="",A=I(x)?x:new Uint8Array(x),N=0;N<A.length;N+=8192)L+=String.fromCharCode.apply(null,A.subarray(N,N+8192));return L};e.addImage=function(){var x,L,A,N,F,U,W,$,Z;if(typeof arguments[1]=="number"?(L=r,A=arguments[1],N=arguments[2],F=arguments[3],U=arguments[4],W=arguments[5],$=arguments[6],Z=arguments[7]):(L=arguments[1],A=arguments[2],N=arguments[3],F=arguments[4],U=arguments[5],W=arguments[6],$=arguments[7],Z=arguments[8]),On(x=arguments[0])==="object"&&!p(x)&&"imageData"in x){var V=x;x=V.imageData,L=V.format||L||r,A=V.x||A||0,N=V.y||N||0,F=V.w||V.width||F,U=V.h||V.height||U,W=V.alias||W,$=V.compression||$,Z=V.rotation||V.angle||Z}var G=this.internal.getFilters();if($===void 0&&G.indexOf("FlateEncode")!==-1&&($="SLOW"),isNaN(A)||isNaN(N))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var z=j.call(this,x,L,W,$);return E.call(this,A,N,F,U,z,Z),this};var j=function(x,L,A,N){var F,U,W;if(typeof x=="string"&&n(x)===r){x=unescape(x);var $=C(x,!1);($!==""||($=e.loadFile(x,!0))!==void 0)&&(x=$)}if(p(x)&&(x=w(x,L)),L=n(x,L),!h(L))throw new Error("addImage does not support files of type '"+L+"', please ensure that a plugin for '"+L+"' support is added.");if(((W=A)==null||W.length===0)&&(A=function(Z){return typeof Z=="string"||I(Z)?g(Z):I(Z.data)?g(Z.data):null}(x)),(F=d.call(this,A))||(O()&&(x instanceof Uint8Array||L==="RGBA"||(U=x,x=T(x))),F=this["process"+L.toUpperCase()](x,c.call(this),A,function(Z){return Z&&typeof Z=="string"&&(Z=Z.toUpperCase()),Z in e.image_compression?Z:m.NONE}(N),U)),!F)throw new Error("An unknown error occurred whilst processing the image.");return F},C=e.__addimage__.convertBase64ToBinaryString=function(x,L){L=typeof L!="boolean"||L;var A,N="";if(typeof x=="string"){var F;A=(F=b(x))!==null&&F!==void 0?F:x;try{N=lp(A)}catch(U){if(L)throw v(A)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+U.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return N};e.getImageProperties=function(x){var L,A,N="";if(p(x)&&(x=w(x)),typeof x=="string"&&n(x)===r&&((N=C(x,!1))===""&&(N=e.loadFile(x)||""),x=N),A=n(x),!h(A))throw new Error("addImage does not support files of type '"+A+"', please ensure that a plugin for '"+A+"' support is added.");if(!O()||x instanceof Uint8Array||(x=T(x)),!(L=this["process"+A.toUpperCase()](x)))throw new Error("An unknown error occurred whilst processing the image");return L.fileType=A,L}})(hr.API),function(e){var r=function(t){if(t!==void 0&&t!="")return!0};hr.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(t){for(var n,a,i,o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(t.objId),c=t.pageContext.annotations,h=!1,p=0;p<c.length&&!h;p++)switch((n=c[p]).type){case"link":(r(n.options.url)||r(n.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var w=0;w<c.length;w++){n=c[w];var d=this.internal.pdfEscape,_=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var E=this.internal.newAdditionalObject(),S=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(E.objId),g=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(a="/Rect ["+o(n.bounds.x)+" "+l(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y)+"] ")+"/Contents ("+d(m(n.contents))+")",i+=" /Popup "+S.objId+" 0 R",i+=" /P "+u.objId+" 0 R",i+=" /T ("+d(m(g))+") >>",E.content=i;var v=E.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+o(n.bounds.x+30)+" "+l(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+l(n.bounds.y)+"] ")+" /Parent "+v,n.open&&(i+=" /Open true"),i+=" >>",S.content=i,this.internal.write(E.objId,"0 R",S.objId,"0 R");break;case"freetext":a="/Rect ["+o(n.bounds.x)+" "+l(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y+n.bounds.h)+"] ";var b=n.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+d(_(n.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+b+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var O=this.annotations._nameMap[n.options.name];n.options.pageNumber=O.page,n.options.top=O.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+d(_(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var I=l(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+I+" "+n.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),e.createAnnotation=function(t){var n=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":n.pageContext.annotations.push(t)}},e.link=function(t,n,a,i,o){var l=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:u(t),y:c(n),w:u(t+a),h:c(n+i)},options:o,type:"link"})},e.textWithLink=function(t,n,a,i){var o,l,u=this.getTextWidth(t),c=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){l=i.maxWidth;var h=this.splitTextToSize(t,l).length;o=Math.ceil(c*h)}else l=u,o=c;return this.text(t,n,a,i),a+=.2*c,i.align==="center"&&(n-=u/2),i.align==="right"&&(n-=u),this.link(n,a-c,l,o,i),u},e.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}}(hr.API),function(e){var r={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var i=e.__arabicParser__.isInArabicSubstitutionA=function(E){return r[E.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(E){return typeof E=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(E)},l=e.__arabicParser__.isArabicEndLetter=function(E){return o(E)&&i(E)&&r[E.charCodeAt(0)].length<=2},u=e.__arabicParser__.isArabicAlfLetter=function(E){return o(E)&&a.indexOf(E.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(E){return o(E)&&i(E)&&r[E.charCodeAt(0)].length>=1};var c=e.__arabicParser__.arabicLetterHasFinalForm=function(E){return o(E)&&i(E)&&r[E.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(E){return o(E)&&i(E)&&r[E.charCodeAt(0)].length>=3};var h=e.__arabicParser__.arabicLetterHasMedialForm=function(E){return o(E)&&i(E)&&r[E.charCodeAt(0)].length==4},p=e.__arabicParser__.resolveLigatures=function(E){var S=0,m=t,g="",v=0;for(S=0;S<E.length;S+=1)m[E.charCodeAt(S)]!==void 0?(v++,typeof(m=m[E.charCodeAt(S)])=="number"&&(g+=String.fromCharCode(m),m=t,v=0),S===E.length-1&&(m=t,g+=E.charAt(S-(v-1)),S-=v-1,v=0)):(m=t,g+=E.charAt(S-v),S-=v,v=0);return g};e.__arabicParser__.isArabicDiacritic=function(E){return E!==void 0&&n[E.charCodeAt(0)]!==void 0};var w=e.__arabicParser__.getCorrectForm=function(E,S,m){return o(E)?i(E)===!1?-1:!c(E)||!o(S)&&!o(m)||!o(m)&&l(S)||l(E)&&!o(S)||l(E)&&u(S)||l(E)&&l(S)?0:h(E)&&o(S)&&!l(S)&&o(m)&&c(m)?3:l(E)||!o(m)?1:2:-1},d=function(E){var S=0,m=0,g=0,v="",b="",O="",I=(E=E||"").split("\\s+"),T=[];for(S=0;S<I.length;S+=1){for(T.push(""),m=0;m<I[S].length;m+=1)v=I[S][m],b=I[S][m-1],O=I[S][m+1],o(v)?(g=w(v,b,O),T[S]+=g!==-1?String.fromCharCode(r[v.charCodeAt(0)][g]):v):T[S]+=v;T[S]=p(T[S])}return T.join(" ")},_=e.__arabicParser__.processArabic=e.processArabic=function(){var E,S=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,m=[];if(Array.isArray(S)){var g=0;for(m=[],g=0;g<S.length;g+=1)Array.isArray(S[g])?m.push([d(S[g][0]),S[g][1],S[g][2]]):m.push([d(S[g])]);E=m}else E=d(S);return typeof arguments[0]=="string"?E:(arguments[0].text=E,arguments[0])};e.events.push(["preProcessText",_])}(hr.API),hr.API.autoPrint=function(e){var r;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+r+" 0 R")})}return this},function(e){var r=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(l){t=l}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(l){n=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(l){o=l}}),Object.defineProperty(this,"parentNode",{})};r.prototype.getContext=function(t,n){var a;if((t=t||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}])}(hr.API),function(e){var r={left:0,top:0,bottom:0,right:0},t=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},r),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(E){u=E}});var c=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return c},set:function(E){c=E}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(E){h=E}});var p=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return p},set:function(E){p=E}});var w=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return w},set:function(E){w=E}});var d=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return d},set:function(E){d=E}});var _=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return _},set:function(E){_=E}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(u){return n.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},e.getTextDimensions=function(u,c){n.call(this);var h=(c=c||{}).fontSize||this.getFontSize(),p=c.font||this.getFont(),w=c.scaleFactor||this.internal.scaleFactor,d=0,_=0,E=0,S=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var m=c.maxWidth;m>0?typeof u=="string"?u=this.splitTextToSize(u,m):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(v,b){return v.concat(S.splitTextToSize(b,m))},[])):u=Array.isArray(u)?u:[u];for(var g=0;g<u.length;g++)d<(E=this.getStringUnitWidth(u[g],{font:p})*h)&&(d=E);return d!==0&&(_=u.length),{w:d/=w,h:Math.max((_*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/w,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var u=this.internal.__cell__.margins||r;return this.internal.__cell__.lastCell=new i(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var u;u=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var c=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,p=this.internal.__cell__.margins||r,w=this.internal.__cell__.tableHeaderRow,d=this.internal.__cell__.printHeaders;return c.lineNumber!==void 0&&(c.lineNumber===u.lineNumber?(u.x=(c.x||0)+(c.width||0),u.y=c.y||0):c.y+c.height+u.height+p.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=p.top,d&&w&&(this.printHeaderRow(u.lineNumber,!0),u.y+=w[0].height)):u.y=c.y+c.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,t===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-h,u.y+h,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+h,{align:"center",baseline:"top",maxWidth:u.width-h-h}):this.text(u.text,u.x+h,u.y+h,{align:"left",baseline:"top",maxWidth:u.width-h-h})),this.internal.__cell__.lastCell=u,this};e.table=function(u,c,h,p,w){if(n.call(this),!h)throw new Error("No data for PDF table.");var d,_,E,S,m=[],g=[],v=[],b={},O={},I=[],T=[],M=(w=w||{}).autoSize||!1,j=w.printHeaders!==!1,C=w.css&&w.css["font-size"]!==void 0?16*w.css["font-size"]:w.fontSize||12,x=w.margins||Object.assign({width:this.getPageWidth()},r),L=typeof w.padding=="number"?w.padding:3,A=w.headerBackgroundColor||"#c8c8c8",N=w.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=j,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=C,this.internal.__cell__.padding=L,this.internal.__cell__.headerBackgroundColor=A,this.internal.__cell__.headerTextColor=N,this.setFontSize(C),p==null)g=m=Object.keys(h[0]),v=m.map(function(){return"left"});else if(Array.isArray(p)&&On(p[0])==="object")for(m=p.map(function(V){return V.name}),g=p.map(function(V){return V.prompt||V.name||""}),v=p.map(function(V){return V.align||"left"}),d=0;d<p.length;d+=1)O[p[d].name]=p[d].width*(19.049976/25.4);else Array.isArray(p)&&typeof p[0]=="string"&&(g=m=p,v=m.map(function(){return"left"}));if(M||Array.isArray(p)&&typeof p[0]=="string")for(d=0;d<m.length;d+=1){for(b[S=m[d]]=h.map(function(V){return V[S]}),this.setFont(void 0,"bold"),I.push(this.getTextDimensions(g[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),_=b[S],this.setFont(void 0,"normal"),E=0;E<_.length;E+=1)I.push(this.getTextDimensions(_[E],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);O[S]=Math.max.apply(null,I)+L+L,I=[]}if(j){var F={};for(d=0;d<m.length;d+=1)F[m[d]]={},F[m[d]].text=g[d],F[m[d]].align=v[d];var U=l.call(this,F,O);T=m.map(function(V){return new i(u,c,O[V],U,F[V].text,void 0,F[V].align)}),this.setTableHeaderRow(T),this.printHeaderRow(1,!1)}var W=p.reduce(function(V,G){return V[G.name]=G.align,V},{});for(d=0;d<h.length;d+=1){"rowStart"in w&&w.rowStart instanceof Function&&w.rowStart({row:d,data:h[d]},this);var $=l.call(this,h[d],O);for(E=0;E<m.length;E+=1){var Z=h[d][m[E]];"cellStart"in w&&w.cellStart instanceof Function&&w.cellStart({row:d,col:E,data:Z},this),o.call(this,new i(u,c,O[m[E]],$,Z,d+2,W[m[E]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=c,this};var l=function(u,c){var h=this.internal.__cell__.padding,p=this.internal.__cell__.table_font_size,w=this.internal.scaleFactor;return Object.keys(u).map(function(d){var _=u[d];return this.splitTextToSize(_.hasOwnProperty("text")?_.text:_,c[d]-h-h)},this).map(function(d){return this.getLineHeightFactor()*d.length*p/w+h+h},this).reduce(function(d,_){return Math.max(d,_)},0)};e.setTableHeaderRow=function(u){n.call(this),this.internal.__cell__.tableHeaderRow=u},e.printHeaderRow=function(u,c){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var p=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(p[0],p[1],p[2],p[3],void 0,-1)}this.setFont(void 0,"bold");for(var w=[],d=0;d<this.internal.__cell__.tableHeaderRow.length;d+=1){h=this.internal.__cell__.tableHeaderRow[d].clone(),c&&(h.y=this.internal.__cell__.margins.top||0,w.push(h)),h.lineNumber=u;var _=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,h),this.setTextColor(_)}w.length>0&&this.setTableHeaderRow(w),this.setFont(void 0,"normal"),t=!1}}(hr.API);var P_={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},O_=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],j2=E_(O_),A_=[100,200,300,400,500,600,700,800,900],Wk=E_(A_);function F2(e){var r=e.family.replace(/"|'/g,"").toLowerCase(),t=function(i){return P_[i=i||"normal"]?i:"normal"}(e.style),n=function(i){if(!i)return 400;if(typeof i=="number")return i>=100&&i<=900&&i%100==0?i:400;if(/^\d00$/.test(i))return parseInt(i);switch(i){case"bold":return 700;case"normal":default:return 400}}(e.weight),a=function(i){return typeof j2[i=i||"normal"]=="number"?i:"normal"}(e.stretch);return{family:r,style:t,weight:n,stretch:a,src:e.src||[],ref:e.ref||{name:r,style:[a,t,n].join(" ")}}}function Q4(e,r,t,n){var a;for(a=t;a>=0&&a<r.length;a+=n)if(e[r[a]])return e[r[a]];for(a=t;a>=0&&a<r.length;a-=n)if(e[r[a]])return e[r[a]]}var $k={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},J4={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function ew(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Yk(e,r,t){for(var n=(t=t||{}).defaultFontFamily||"times",a=Object.assign({},$k,t.genericFontFamilies||{}),i=null,o=null,l=0;l<r.length;++l)if(a[(i=F2(r[l])).family]&&(i.family=a[i.family]),e.hasOwnProperty(i.family)){o=e[i.family];break}if(!(o=o||e[n]))throw new Error("Could not find a font-family for the rule '"+ew(i)+"' and default family '"+n+"'.");if(o=function(u,c){if(c[u])return c[u];var h=j2[u],p=h<=j2.normal?-1:1,w=Q4(c,O_,h,p);if(!w)throw new Error("Could not find a matching font-stretch value for "+u);return w}(i.stretch,o),o=function(u,c){if(c[u])return c[u];for(var h=P_[u],p=0;p<h.length;++p)if(c[h[p]])return c[h[p]];throw new Error("Could not find a matching font-style for "+u)}(i.style,o),!(o=function(u,c){if(c[u])return c[u];if(u===400&&c[500])return c[500];if(u===500&&c[400])return c[400];var h=Wk[u],p=Q4(c,A_,h,u<400?-1:1);if(!p)throw new Error("Could not find a matching font-weight for value "+u);return p}(i.weight,o)))throw new Error("Failed to resolve a font for the rule '"+ew(i)+"'.");return o}function tw(e){return e.trimLeft()}function Xk(e,r){for(var t=0;t<e.length;){if(e.charAt(t)===r)return[e.substring(0,t),e.substring(t+1)];t+=1}return null}function Kk(e){var r=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return r===null?null:[r[0],e.substring(r[0].length)]}var d1,rw,nw,u2=["times"];(function(e){var r,t,n,a,i,o,l,u,c,h=function(z){return z=z||{},this.isStrokeTransparent=z.isStrokeTransparent||!1,this.strokeOpacity=z.strokeOpacity||1,this.strokeStyle=z.strokeStyle||"#000000",this.fillStyle=z.fillStyle||"#000000",this.isFillTransparent=z.isFillTransparent||!1,this.fillOpacity=z.fillOpacity||1,this.font=z.font||"10px sans-serif",this.textBaseline=z.textBaseline||"alphabetic",this.textAlign=z.textAlign||"left",this.lineWidth=z.lineWidth||1,this.lineJoin=z.lineJoin||"miter",this.lineCap=z.lineCap||"butt",this.path=z.path||[],this.transform=z.transform!==void 0?z.transform.clone():new u,this.globalCompositeOperation=z.globalCompositeOperation||"normal",this.globalAlpha=z.globalAlpha||1,this.clip_path=z.clip_path||[],this.currentPoint=z.currentPoint||new o,this.miterLimit=z.miterLimit||10,this.lastPoint=z.lastPoint||new o,this.lineDashOffset=z.lineDashOffset||0,this.lineDash=z.lineDash||[],this.margin=z.margin||[0,0,0,0],this.prevPageLastElemOffset=z.prevPageLastElemOffset||0,this.ignoreClearRect=typeof z.ignoreClearRect!="boolean"||z.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new p(this),r=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,o=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,c=new h}]);var p=function(z){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=z;Object.defineProperty(this,"pdf",{get:function(){return D}});var K=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return K},set:function(xe){K=!!xe}});var ne=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return ne},set:function(xe){ne=!!xe}});var Q=0;Object.defineProperty(this,"posX",{get:function(){return Q},set:function(xe){isNaN(xe)||(Q=xe)}});var ee=0;Object.defineProperty(this,"posY",{get:function(){return ee},set:function(xe){isNaN(xe)||(ee=xe)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(xe){var ve;typeof xe=="number"?ve=[xe,xe,xe,xe]:((ve=new Array(4))[0]=xe[0],ve[1]=xe.length>=2?xe[1]:ve[0],ve[2]=xe.length>=3?xe[2]:ve[0],ve[3]=xe.length>=4?xe[3]:ve[1]),c.margin=ve}});var ae=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ae},set:function(xe){ae=xe}});var se=0;Object.defineProperty(this,"lastBreak",{get:function(){return se},set:function(xe){se=xe}});var ce=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ce},set:function(xe){ce=xe}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(xe){xe instanceof h&&(c=xe)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(xe){c.path=xe}});var me=[];Object.defineProperty(this,"ctxStack",{get:function(){return me},set:function(xe){me=xe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(xe){var ve;ve=w(xe),this.ctx.fillStyle=ve.style,this.ctx.isFillTransparent=ve.a===0,this.ctx.fillOpacity=ve.a,this.pdf.setFillColor(ve.r,ve.g,ve.b,{a:ve.a}),this.pdf.setTextColor(ve.r,ve.g,ve.b,{a:ve.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(xe){var ve=w(xe);this.ctx.strokeStyle=ve.style,this.ctx.isStrokeTransparent=ve.a===0,this.ctx.strokeOpacity=ve.a,ve.a===0?this.pdf.setDrawColor(255,255,255):(ve.a,this.pdf.setDrawColor(ve.r,ve.g,ve.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(xe){["butt","round","square"].indexOf(xe)!==-1&&(this.ctx.lineCap=xe,this.pdf.setLineCap(xe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(xe){isNaN(xe)||(this.ctx.lineWidth=xe,this.pdf.setLineWidth(xe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(xe){["bevel","round","miter"].indexOf(xe)!==-1&&(this.ctx.lineJoin=xe,this.pdf.setLineJoin(xe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(xe){isNaN(xe)||(this.ctx.miterLimit=xe,this.pdf.setMiterLimit(xe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(xe){this.ctx.textBaseline=xe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(xe){["right","end","center","left","start"].indexOf(xe)!==-1&&(this.ctx.textAlign=xe)}});var Se=null;function Oe(xe,ve){if(Se===null){var Xe=function(be){var Ae=[];return Object.keys(be).forEach(function(Ee){be[Ee].forEach(function(Le){var he=null;switch(Le){case"bold":he={family:Ee,weight:"bold"};break;case"italic":he={family:Ee,style:"italic"};break;case"bolditalic":he={family:Ee,weight:"bold",style:"italic"};break;case"":case"normal":he={family:Ee}}he!==null&&(he.ref={name:Ee,style:Le},Ae.push(he))})}),Ae}(xe.getFontList());Se=function(be){for(var Ae={},Ee=0;Ee<be.length;++Ee){var Le=F2(be[Ee]),he=Le.family,ke=Le.stretch,Re=Le.style,$e=Le.weight;Ae[he]=Ae[he]||{},Ae[he][ke]=Ae[he][ke]||{},Ae[he][ke][Re]=Ae[he][ke][Re]||{},Ae[he][ke][Re][$e]=Le}return Ae}(Xe.concat(ve))}return Se}var Ne=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ne},set:function(xe){Se=null,Ne=xe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(xe){var ve;if(this.ctx.font=xe,(ve=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(xe))!==null){var Xe=ve[1];ve[2];var be=ve[3],Ae=ve[4];ve[5];var Ee=ve[6],Le=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ae)[2];Ae=Math.floor(Le==="px"?parseFloat(Ae)*this.pdf.internal.scaleFactor:Le==="em"?parseFloat(Ae)*this.pdf.getFontSize():parseFloat(Ae)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ae);var he=function(mt){var Je,nt,qt=[],At=mt.trim();if(At==="")return u2;if(At in J4)return[J4[At]];for(;At!=="";){switch(nt=null,Je=(At=tw(At)).charAt(0)){case'"':case"'":nt=Xk(At.substring(1),Je);break;default:nt=Kk(At)}if(nt===null||(qt.push(nt[0]),(At=tw(nt[1]))!==""&&At.charAt(0)!==","))return u2;At=At.replace(/^,/,"")}return qt}(Ee);if(this.fontFaces){var ke=Yk(Oe(this.pdf,this.fontFaces),he.map(function(mt){return{family:mt,stretch:"normal",weight:be,style:Xe}}));this.pdf.setFont(ke.ref.name,ke.ref.style)}else{var Re="";(be==="bold"||parseInt(be,10)>=700||Xe==="bold")&&(Re="bold"),Xe==="italic"&&(Re+="italic"),Re.length===0&&(Re="normal");for(var $e="",vt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},wt=0;wt<he.length;wt++){if(this.pdf.internal.getFont(he[wt],Re,{noFallback:!0,disableWarning:!0})!==void 0){$e=he[wt];break}if(Re==="bolditalic"&&this.pdf.internal.getFont(he[wt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)$e=he[wt],Re="bold";else if(this.pdf.internal.getFont(he[wt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){$e=he[wt],Re="normal";break}}if($e===""){for(var at=0;at<he.length;at++)if(vt[he[at]]){$e=vt[he[at]];break}}$e=$e===""?"Times":$e,this.pdf.setFont($e,Re)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(xe){this.ctx.globalCompositeOperation=xe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(xe){this.ctx.globalAlpha=xe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(xe){this.ctx.lineDashOffset=xe,G.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(xe){this.ctx.lineDash=xe,G.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(xe){this.ctx.ignoreClearRect=!!xe}})};p.prototype.setLineDash=function(z){this.lineDash=z},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){b.call(this,"fill",!1)},p.prototype.stroke=function(){b.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(z,D){if(isNaN(z)||isNaN(D))throw Vn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var K=this.ctx.transform.applyToPoint(new o(z,D));this.path.push({type:"mt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(z,D)},p.prototype.closePath=function(){var z=new o(0,0),D=0;for(D=this.path.length-1;D!==-1;D--)if(this.path[D].type==="begin"&&On(this.path[D+1])==="object"&&typeof this.path[D+1].x=="number"){z=new o(this.path[D+1].x,this.path[D+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(z.x,z.y)},p.prototype.lineTo=function(z,D){if(isNaN(z)||isNaN(D))throw Vn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var K=this.ctx.transform.applyToPoint(new o(z,D));this.path.push({type:"lt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(K.x,K.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),b.call(this,null,!0)},p.prototype.quadraticCurveTo=function(z,D,K,ne){if(isNaN(K)||isNaN(ne)||isNaN(z)||isNaN(D))throw Vn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Q=this.ctx.transform.applyToPoint(new o(K,ne)),ee=this.ctx.transform.applyToPoint(new o(z,D));this.path.push({type:"qct",x1:ee.x,y1:ee.y,x:Q.x,y:Q.y}),this.ctx.lastPoint=new o(Q.x,Q.y)},p.prototype.bezierCurveTo=function(z,D,K,ne,Q,ee){if(isNaN(Q)||isNaN(ee)||isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne))throw Vn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ae=this.ctx.transform.applyToPoint(new o(Q,ee)),se=this.ctx.transform.applyToPoint(new o(z,D)),ce=this.ctx.transform.applyToPoint(new o(K,ne));this.path.push({type:"bct",x1:se.x,y1:se.y,x2:ce.x,y2:ce.y,x:ae.x,y:ae.y}),this.ctx.lastPoint=new o(ae.x,ae.y)},p.prototype.arc=function(z,D,K,ne,Q,ee){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne)||isNaN(Q))throw Vn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ee=!!ee,!this.ctx.transform.isIdentity){var ae=this.ctx.transform.applyToPoint(new o(z,D));z=ae.x,D=ae.y;var se=this.ctx.transform.applyToPoint(new o(0,K)),ce=this.ctx.transform.applyToPoint(new o(0,0));K=Math.sqrt(Math.pow(se.x-ce.x,2)+Math.pow(se.y-ce.y,2))}Math.abs(Q-ne)>=2*Math.PI&&(ne=0,Q=2*Math.PI),this.path.push({type:"arc",x:z,y:D,radius:K,startAngle:ne,endAngle:Q,counterclockwise:ee})},p.prototype.arcTo=function(z,D,K,ne,Q){throw new Error("arcTo not implemented.")},p.prototype.rect=function(z,D,K,ne){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne))throw Vn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(z,D),this.lineTo(z+K,D),this.lineTo(z+K,D+ne),this.lineTo(z,D+ne),this.lineTo(z,D),this.lineTo(z+K,D),this.lineTo(z,D)},p.prototype.fillRect=function(z,D,K,ne){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne))throw Vn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!d.call(this)){var Q={};this.lineCap!=="butt"&&(Q.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Q.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(z,D,K,ne),this.fill(),Q.hasOwnProperty("lineCap")&&(this.lineCap=Q.lineCap),Q.hasOwnProperty("lineJoin")&&(this.lineJoin=Q.lineJoin)}},p.prototype.strokeRect=function(z,D,K,ne){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne))throw Vn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");_.call(this)||(this.beginPath(),this.rect(z,D,K,ne),this.stroke())},p.prototype.clearRect=function(z,D,K,ne){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne))throw Vn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(z,D,K,ne))},p.prototype.save=function(z){z=typeof z!="boolean"||z;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("q");if(this.pdf.setPage(D),z){this.ctx.fontSize=this.pdf.internal.getFontSize();var ne=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=ne}},p.prototype.restore=function(z){z=typeof z!="boolean"||z;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("Q");this.pdf.setPage(D),z&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var w=function(z){var D,K,ne,Q;if(z.isCanvasGradient===!0&&(z=z.getColor()),!z)return{r:0,g:0,b:0,a:0,style:z};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(z))D=0,K=0,ne=0,Q=0;else{var ee=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(z);if(ee!==null)D=parseInt(ee[1]),K=parseInt(ee[2]),ne=parseInt(ee[3]),Q=1;else if((ee=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(z))!==null)D=parseInt(ee[1]),K=parseInt(ee[2]),ne=parseInt(ee[3]),Q=parseFloat(ee[4]);else{if(Q=1,typeof z=="string"&&z.charAt(0)!=="#"){var ae=new y_(z);z=ae.ok?ae.toHex():"#000000"}z.length===4?(D=z.substring(1,2),D+=D,K=z.substring(2,3),K+=K,ne=z.substring(3,4),ne+=ne):(D=z.substring(1,3),K=z.substring(3,5),ne=z.substring(5,7)),D=parseInt(D,16),K=parseInt(K,16),ne=parseInt(ne,16)}}return{r:D,g:K,b:ne,a:Q,style:z}},d=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},_=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};p.prototype.fillText=function(z,D,K,ne){if(isNaN(D)||isNaN(K)||typeof z!="string")throw Vn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(ne=isNaN(ne)?void 0:ne,!d.call(this)){var Q=$(this.ctx.transform.rotation),ee=this.ctx.transform.scaleX;L.call(this,{text:z,x:D,y:K,scale:ee,angle:Q,align:this.textAlign,maxWidth:ne})}},p.prototype.strokeText=function(z,D,K,ne){if(isNaN(D)||isNaN(K)||typeof z!="string")throw Vn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!_.call(this)){ne=isNaN(ne)?void 0:ne;var Q=$(this.ctx.transform.rotation),ee=this.ctx.transform.scaleX;L.call(this,{text:z,x:D,y:K,scale:ee,renderingMode:"stroke",angle:Q,align:this.textAlign,maxWidth:ne})}},p.prototype.measureText=function(z){if(typeof z!="string")throw Vn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var D=this.pdf,K=this.pdf.internal.scaleFactor,ne=D.internal.getFontSize(),Q=D.getStringUnitWidth(z)*ne/D.internal.scaleFactor,ee=function(ae){var se=(ae=ae||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return se}}),this};return new ee({width:Q*=Math.round(96*K/72*1e4)/1e4})},p.prototype.scale=function(z,D){if(isNaN(z)||isNaN(D))throw Vn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var K=new u(z,0,0,D,0,0);this.ctx.transform=this.ctx.transform.multiply(K)},p.prototype.rotate=function(z){if(isNaN(z))throw Vn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var D=new u(Math.cos(z),Math.sin(z),-Math.sin(z),Math.cos(z),0,0);this.ctx.transform=this.ctx.transform.multiply(D)},p.prototype.translate=function(z,D){if(isNaN(z)||isNaN(D))throw Vn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var K=new u(1,0,0,1,z,D);this.ctx.transform=this.ctx.transform.multiply(K)},p.prototype.transform=function(z,D,K,ne,Q,ee){if(isNaN(z)||isNaN(D)||isNaN(K)||isNaN(ne)||isNaN(Q)||isNaN(ee))throw Vn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ae=new u(z,D,K,ne,Q,ee);this.ctx.transform=this.ctx.transform.multiply(ae)},p.prototype.setTransform=function(z,D,K,ne,Q,ee){z=isNaN(z)?1:z,D=isNaN(D)?0:D,K=isNaN(K)?0:K,ne=isNaN(ne)?1:ne,Q=isNaN(Q)?0:Q,ee=isNaN(ee)?0:ee,this.ctx.transform=new u(z,D,K,ne,Q,ee)};var E=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(z,D,K,ne,Q,ee,ae,se,ce){var me=this.pdf.getImageProperties(z),Se=1,Oe=1,Ne=1,xe=1;ne!==void 0&&se!==void 0&&(Ne=se/ne,xe=ce/Q,Se=me.width/ne*se/ne,Oe=me.height/Q*ce/Q),ee===void 0&&(ee=D,ae=K,D=0,K=0),ne!==void 0&&se===void 0&&(se=ne,ce=Q),ne===void 0&&se===void 0&&(se=me.width,ce=me.height);for(var ve,Xe=this.ctx.transform.decompose(),be=$(Xe.rotate.shx),Ae=new u,Ee=(Ae=(Ae=(Ae=Ae.multiply(Xe.translate)).multiply(Xe.skew)).multiply(Xe.scale)).applyToRectangle(new l(ee-D*Ne,ae-K*xe,ne*Se,Q*Oe)),Le=S.call(this,Ee),he=[],ke=0;ke<Le.length;ke+=1)he.indexOf(Le[ke])===-1&&he.push(Le[ke]);if(v(he),this.autoPaging)for(var Re=he[0],$e=he[he.length-1],vt=Re;vt<$e+1;vt++){this.pdf.setPage(vt);var wt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],at=vt===1?this.posY+this.margin[0]:this.margin[0],mt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Je=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],nt=vt===1?0:mt+(vt-2)*Je;if(this.ctx.clip_path.length!==0){var qt=this.path;ve=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g(ve,this.posX+this.margin[3],-nt+at+this.ctx.prevPageLastElemOffset),O.call(this,"fill",!0),this.path=qt}var At=JSON.parse(JSON.stringify(Ee));At=g([At],this.posX+this.margin[3],-nt+at+this.ctx.prevPageLastElemOffset)[0];var Ht=(vt>Re||vt<$e)&&E.call(this);Ht&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],wt,Je,null).clip().discardPath()),this.pdf.addImage(z,"JPEG",At.x,At.y,At.w,At.h,null,null,be),Ht&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(z,"JPEG",Ee.x,Ee.y,Ee.w,Ee.h,null,null,be)};var S=function(z,D,K){var ne=[];D=D||this.pdf.internal.pageSize.width,K=K||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Q=this.posY+this.ctx.prevPageLastElemOffset;switch(z.type){default:case"mt":case"lt":ne.push(Math.floor((z.y+Q)/K)+1);break;case"arc":ne.push(Math.floor((z.y+Q-z.radius)/K)+1),ne.push(Math.floor((z.y+Q+z.radius)/K)+1);break;case"qct":var ee=Z(this.ctx.lastPoint.x,this.ctx.lastPoint.y,z.x1,z.y1,z.x,z.y);ne.push(Math.floor((ee.y+Q)/K)+1),ne.push(Math.floor((ee.y+ee.h+Q)/K)+1);break;case"bct":var ae=V(this.ctx.lastPoint.x,this.ctx.lastPoint.y,z.x1,z.y1,z.x2,z.y2,z.x,z.y);ne.push(Math.floor((ae.y+Q)/K)+1),ne.push(Math.floor((ae.y+ae.h+Q)/K)+1);break;case"rect":ne.push(Math.floor((z.y+Q)/K)+1),ne.push(Math.floor((z.y+z.h+Q)/K)+1)}for(var se=0;se<ne.length;se+=1)for(;this.pdf.internal.getNumberOfPages()<ne[se];)m.call(this);return ne},m=function(){var z=this.fillStyle,D=this.strokeStyle,K=this.font,ne=this.lineCap,Q=this.lineWidth,ee=this.lineJoin;this.pdf.addPage(),this.fillStyle=z,this.strokeStyle=D,this.font=K,this.lineCap=ne,this.lineWidth=Q,this.lineJoin=ee},g=function(z,D,K){for(var ne=0;ne<z.length;ne++)switch(z[ne].type){case"bct":z[ne].x2+=D,z[ne].y2+=K;case"qct":z[ne].x1+=D,z[ne].y1+=K;case"mt":case"lt":case"arc":default:z[ne].x+=D,z[ne].y+=K}return z},v=function(z){return z.sort(function(D,K){return D-K})},b=function(z,D){for(var K,ne,Q=this.fillStyle,ee=this.strokeStyle,ae=this.lineCap,se=this.lineWidth,ce=Math.abs(se*this.ctx.transform.scaleX),me=this.lineJoin,Se=JSON.parse(JSON.stringify(this.path)),Oe=JSON.parse(JSON.stringify(this.path)),Ne=[],xe=0;xe<Oe.length;xe++)if(Oe[xe].x!==void 0)for(var ve=S.call(this,Oe[xe]),Xe=0;Xe<ve.length;Xe+=1)Ne.indexOf(ve[Xe])===-1&&Ne.push(ve[Xe]);for(var be=0;be<Ne.length;be++)for(;this.pdf.internal.getNumberOfPages()<Ne[be];)m.call(this);if(v(Ne),this.autoPaging)for(var Ae=Ne[0],Ee=Ne[Ne.length-1],Le=Ae;Le<Ee+1;Le++){this.pdf.setPage(Le),this.fillStyle=Q,this.strokeStyle=ee,this.lineCap=ae,this.lineWidth=ce,this.lineJoin=me;var he=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ke=Le===1?this.posY+this.margin[0]:this.margin[0],Re=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],$e=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],vt=Le===1?0:Re+(Le-2)*$e;if(this.ctx.clip_path.length!==0){var wt=this.path;K=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g(K,this.posX+this.margin[3],-vt+ke+this.ctx.prevPageLastElemOffset),O.call(this,z,!0),this.path=wt}if(ne=JSON.parse(JSON.stringify(Se)),this.path=g(ne,this.posX+this.margin[3],-vt+ke+this.ctx.prevPageLastElemOffset),D===!1||Le===0){var at=(Le>Ae||Le<Ee)&&E.call(this);at&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],he,$e,null).clip().discardPath()),O.call(this,z,D),at&&this.pdf.restoreGraphicsState()}this.lineWidth=se}else this.lineWidth=ce,O.call(this,z,D),this.lineWidth=se;this.path=Se},O=function(z,D){if((z!=="stroke"||D||!_.call(this))&&(z==="stroke"||D||!d.call(this))){for(var K,ne,Q=[],ee=this.path,ae=0;ae<ee.length;ae++){var se=ee[ae];switch(se.type){case"begin":Q.push({begin:!0});break;case"close":Q.push({close:!0});break;case"mt":Q.push({start:se,deltas:[],abs:[]});break;case"lt":var ce=Q.length;if(ee[ae-1]&&!isNaN(ee[ae-1].x)&&(K=[se.x-ee[ae-1].x,se.y-ee[ae-1].y],ce>0)){for(;ce>=0;ce--)if(Q[ce-1].close!==!0&&Q[ce-1].begin!==!0){Q[ce-1].deltas.push(K),Q[ce-1].abs.push(se);break}}break;case"bct":K=[se.x1-ee[ae-1].x,se.y1-ee[ae-1].y,se.x2-ee[ae-1].x,se.y2-ee[ae-1].y,se.x-ee[ae-1].x,se.y-ee[ae-1].y],Q[Q.length-1].deltas.push(K);break;case"qct":var me=ee[ae-1].x+2/3*(se.x1-ee[ae-1].x),Se=ee[ae-1].y+2/3*(se.y1-ee[ae-1].y),Oe=se.x+2/3*(se.x1-se.x),Ne=se.y+2/3*(se.y1-se.y),xe=se.x,ve=se.y;K=[me-ee[ae-1].x,Se-ee[ae-1].y,Oe-ee[ae-1].x,Ne-ee[ae-1].y,xe-ee[ae-1].x,ve-ee[ae-1].y],Q[Q.length-1].deltas.push(K);break;case"arc":Q.push({deltas:[],abs:[],arc:!0}),Array.isArray(Q[Q.length-1].abs)&&Q[Q.length-1].abs.push(se)}}ne=D?null:z==="stroke"?"stroke":"fill";for(var Xe=!1,be=0;be<Q.length;be++)if(Q[be].arc)for(var Ae=Q[be].abs,Ee=0;Ee<Ae.length;Ee++){var Le=Ae[Ee];Le.type==="arc"?M.call(this,Le.x,Le.y,Le.radius,Le.startAngle,Le.endAngle,Le.counterclockwise,void 0,D,!Xe):A.call(this,Le.x,Le.y),Xe=!0}else if(Q[be].close===!0)this.pdf.internal.out("h"),Xe=!1;else if(Q[be].begin!==!0){var he=Q[be].start.x,ke=Q[be].start.y;N.call(this,Q[be].deltas,he,ke),Xe=!0}ne&&j.call(this,ne),D&&C.call(this)}},I=function(z){var D=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,K=D*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return z-K;case"top":return z+D-K;case"hanging":return z+D-2*K;case"middle":return z+D/2-K;case"ideographic":return z;case"alphabetic":default:return z}},T=function(z){return z+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.prototype.createLinearGradient=function(){var z=function(){};return z.colorStops=[],z.addColorStop=function(D,K){this.colorStops.push([D,K])},z.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},z.isCanvasGradient=!0,z},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var M=function(z,D,K,ne,Q,ee,ae,se,ce){for(var me=U.call(this,K,ne,Q,ee),Se=0;Se<me.length;Se++){var Oe=me[Se];Se===0&&(ce?x.call(this,Oe.x1+z,Oe.y1+D):A.call(this,Oe.x1+z,Oe.y1+D)),F.call(this,z,D,Oe.x2,Oe.y2,Oe.x3,Oe.y3,Oe.x4,Oe.y4)}se?C.call(this):j.call(this,ae)},j=function(z){switch(z){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},C=function(){this.pdf.clip(),this.pdf.discardPath()},x=function(z,D){this.pdf.internal.out(t(z)+" "+n(D)+" m")},L=function(z){var D;switch(z.align){case"right":case"end":D="right";break;case"center":D="center";break;case"left":case"start":default:D="left"}var K=this.pdf.getTextDimensions(z.text),ne=I.call(this,z.y),Q=T.call(this,ne)-K.h,ee=this.ctx.transform.applyToPoint(new o(z.x,ne)),ae=this.ctx.transform.decompose(),se=new u;se=(se=(se=se.multiply(ae.translate)).multiply(ae.skew)).multiply(ae.scale);for(var ce,me,Se,Oe=this.ctx.transform.applyToRectangle(new l(z.x,ne,K.w,K.h)),Ne=se.applyToRectangle(new l(z.x,Q,K.w,K.h)),xe=S.call(this,Ne),ve=[],Xe=0;Xe<xe.length;Xe+=1)ve.indexOf(xe[Xe])===-1&&ve.push(xe[Xe]);if(v(ve),this.autoPaging)for(var be=ve[0],Ae=ve[ve.length-1],Ee=be;Ee<Ae+1;Ee++){this.pdf.setPage(Ee);var Le=Ee===1?this.posY+this.margin[0]:this.margin[0],he=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ke=this.pdf.internal.pageSize.height-this.margin[2],Re=ke-this.margin[0],$e=this.pdf.internal.pageSize.width-this.margin[1],vt=$e-this.margin[3],wt=Ee===1?0:he+(Ee-2)*Re;if(this.ctx.clip_path.length!==0){var at=this.path;ce=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g(ce,this.posX+this.margin[3],-1*wt+Le),O.call(this,"fill",!0),this.path=at}var mt=g([JSON.parse(JSON.stringify(Ne))],this.posX+this.margin[3],-wt+Le+this.ctx.prevPageLastElemOffset)[0];z.scale>=.01&&(me=this.pdf.internal.getFontSize(),this.pdf.setFontSize(me*z.scale),Se=this.lineWidth,this.lineWidth=Se*z.scale);var Je=this.autoPaging!=="text";if(Je||mt.y+mt.h<=ke){if(Je||mt.y>=Le&&mt.x<=$e){var nt=Je?z.text:this.pdf.splitTextToSize(z.text,z.maxWidth||$e-mt.x)[0],qt=g([JSON.parse(JSON.stringify(Oe))],this.posX+this.margin[3],-wt+Le+this.ctx.prevPageLastElemOffset)[0],At=Je&&(Ee>be||Ee<Ae)&&E.call(this);At&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],vt,Re,null).clip().discardPath()),this.pdf.text(nt,qt.x,qt.y,{angle:z.angle,align:D,renderingMode:z.renderingMode}),At&&this.pdf.restoreGraphicsState()}}else mt.y<ke&&(this.ctx.prevPageLastElemOffset+=ke-mt.y);z.scale>=.01&&(this.pdf.setFontSize(me),this.lineWidth=Se)}else z.scale>=.01&&(me=this.pdf.internal.getFontSize(),this.pdf.setFontSize(me*z.scale),Se=this.lineWidth,this.lineWidth=Se*z.scale),this.pdf.text(z.text,ee.x+this.posX,ee.y+this.posY,{angle:z.angle,align:D,renderingMode:z.renderingMode,maxWidth:z.maxWidth}),z.scale>=.01&&(this.pdf.setFontSize(me),this.lineWidth=Se)},A=function(z,D,K,ne){K=K||0,ne=ne||0,this.pdf.internal.out(t(z+K)+" "+n(D+ne)+" l")},N=function(z,D,K){return this.pdf.lines(z,D,K,null,null)},F=function(z,D,K,ne,Q,ee,ae,se){this.pdf.internal.out([r(a(K+z)),r(i(ne+D)),r(a(Q+z)),r(i(ee+D)),r(a(ae+z)),r(i(se+D)),"c"].join(" "))},U=function(z,D,K,ne){for(var Q=2*Math.PI,ee=Math.PI/2;D>K;)D-=Q;var ae=Math.abs(K-D);ae<Q&&ne&&(ae=Q-ae);for(var se=[],ce=ne?-1:1,me=D;ae>1e-5;){var Se=me+ce*Math.min(ae,ee);se.push(W.call(this,z,me,Se)),ae-=Math.abs(Se-me),me=Se}return se},W=function(z,D,K){var ne=(K-D)/2,Q=z*Math.cos(ne),ee=z*Math.sin(ne),ae=Q,se=-ee,ce=ae*ae+se*se,me=ce+ae*Q+se*ee,Se=4/3*(Math.sqrt(2*ce*me)-me)/(ae*ee-se*Q),Oe=ae-Se*se,Ne=se+Se*ae,xe=Oe,ve=-Ne,Xe=ne+D,be=Math.cos(Xe),Ae=Math.sin(Xe);return{x1:z*Math.cos(D),y1:z*Math.sin(D),x2:Oe*be-Ne*Ae,y2:Oe*Ae+Ne*be,x3:xe*be-ve*Ae,y3:xe*Ae+ve*be,x4:z*Math.cos(K),y4:z*Math.sin(K)}},$=function(z){return 180*z/Math.PI},Z=function(z,D,K,ne,Q,ee){var ae=z+.5*(K-z),se=D+.5*(ne-D),ce=Q+.5*(K-Q),me=ee+.5*(ne-ee),Se=Math.min(z,Q,ae,ce),Oe=Math.max(z,Q,ae,ce),Ne=Math.min(D,ee,se,me),xe=Math.max(D,ee,se,me);return new l(Se,Ne,Oe-Se,xe-Ne)},V=function(z,D,K,ne,Q,ee,ae,se){var ce,me,Se,Oe,Ne,xe,ve,Xe,be,Ae,Ee,Le,he,ke,Re=K-z,$e=ne-D,vt=Q-K,wt=ee-ne,at=ae-Q,mt=se-ee;for(me=0;me<41;me++)be=(ve=(Se=z+(ce=me/40)*Re)+ce*((Ne=K+ce*vt)-Se))+ce*(Ne+ce*(Q+ce*at-Ne)-ve),Ae=(Xe=(Oe=D+ce*$e)+ce*((xe=ne+ce*wt)-Oe))+ce*(xe+ce*(ee+ce*mt-xe)-Xe),me==0?(Ee=be,Le=Ae,he=be,ke=Ae):(Ee=Math.min(Ee,be),Le=Math.min(Le,Ae),he=Math.max(he,be),ke=Math.max(ke,Ae));return new l(Math.round(Ee),Math.round(Le),Math.round(he-Ee),Math.round(ke-Le))},G=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var z,D,K=(z=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:z,lineDashOffset:D}));this.prevLineDash!==K&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=K)}}})(hr.API),function(e){var r=function(i){var o,l,u,c,h,p,w,d,_,E;for(l=[],u=0,c=(i+=o="\0\0\0\0".slice(i.length%4||4)).length;c>u;u+=4)(h=(i.charCodeAt(u)<<24)+(i.charCodeAt(u+1)<<16)+(i.charCodeAt(u+2)<<8)+i.charCodeAt(u+3))!==0?(p=(h=((h=((h=((h=(h-(E=h%85))/85)-(_=h%85))/85)-(d=h%85))/85)-(w=h%85))/85)%85,l.push(p+33,w+33,d+33,_+33,E+33)):l.push(122);return function(S,m){for(var g=m;g>0;g--)S.pop()}(l,o.length),String.fromCharCode.apply(String,l)+"~>"},t=function(i){var o,l,u,c,h,p=String,w="length",d=255,_="charCodeAt",E="slice",S="replace";for(i[E](-2),i=i[E](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),u=[],c=0,h=(i+=o="uuuuu"[E](i[w]%5||5))[w];h>c;c+=5)l=52200625*(i[_](c)-33)+614125*(i[_](c+1)-33)+7225*(i[_](c+2)-33)+85*(i[_](c+3)-33)+(i[_](c+4)-33),u.push(d&l>>24,d&l>>16,d&l>>8,d&l);return function(m,g){for(var v=g;v>0;v--)m.pop()}(u,o[w]),p.fromCharCode.apply(p,u)},n=function(i){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((i=i.replace(/\s/g,"")).indexOf(">")!==-1&&(i=i.substr(0,i.indexOf(">"))),i.length%2&&(i+="0"),o.test(i)===!1)return"";for(var l="",u=0;u<i.length;u+=2)l+=String.fromCharCode("0x"+(i[u]+i[u+1]));return l},a=function(i){for(var o=new Uint8Array(i.length),l=i.length;l--;)o[l]=i.charCodeAt(l);return i=(o=N2(o)).reduce(function(u,c){return u+String.fromCharCode(c)},"")};e.processDataByFilters=function(i,o){var l=0,u=i||"",c=[];for(typeof(o=o||[])=="string"&&(o=[o]),l=0;l<o.length;l+=1)switch(o[l]){case"ASCII85Decode":case"/ASCII85Decode":u=t(u),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=r(u),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=n(u),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=u.split("").map(function(h){return("0"+h.charCodeAt().toString(16)).slice(-2)}).join("")+">",c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=a(u),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[l]+'" is not implemented')}return{data:u,reverseChain:c.reverse().join(" ")}}}(hr.API),function(e){e.loadFile=function(r,t,n){return function(a,i,o){i=i!==!1,o=typeof o=="function"?o:function(){};var l=void 0;try{l=function(u,c,h){var p=new XMLHttpRequest,w=0,d=function(_){var E=_.length,S=[],m=String.fromCharCode;for(w=0;w<E;w+=1)S.push(m(255&_.charCodeAt(w)));return S.join("")};if(p.open("GET",u,!c),p.overrideMimeType("text/plain; charset=x-user-defined"),c===!1&&(p.onload=function(){p.status===200?h(d(this.responseText)):h(void 0)}),p.send(null),c&&p.status===200)return d(p.responseText)}(a,i,o)}catch{}return l}(r,t,n)},e.loadImageFile=e.loadFile}(hr.API),function(e){function r(){return(pr.html2canvas?Promise.resolve(pr.html2canvas):O2(()=>import("./html2canvas.esm-CBrSDip1.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(pr.DOMPurify?Promise.resolve(pr.DOMPurify):O2(()=>import("./purify.es-Ci5xwkH_.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var l=On(o);return l==="undefined"?"undefined":l==="string"||o instanceof String?"string":l==="number"||o instanceof Number?"number":l==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":l==="object"?"object":"unknown"},a=function(o,l){var u=document.createElement(o);for(var c in l.className&&(u.className=l.className),l.innerHTML&&l.dompurify&&(u.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)u.style[c]=l.style[c];return u},i=function o(l){var u=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),c=o.convert(Promise.resolve(),u);return c=(c=c.setProgress(1,o,1,[o])).set(l)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(o,l){return o.__proto__=l||i.prototype,o},i.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},i.prototype.from=function(o,l){return this.then(function(){switch(l=l||function(u){switch(n(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o)){case"string":return this.then(t).then(function(u){return this.set({src:a("div",{innerHTML:o,dompurify:u})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},i.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},i.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},l=function u(c,h){for(var p=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),w=c.firstChild;w;w=w.nextSibling)h!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||p.appendChild(u(w,h));return c.nodeType===1&&(c.nodeName==="CANVAS"?(p.width=c.width,p.height=c.height,p.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(p.value=c.value),p.addEventListener("load",function(){p.scrollTop=c.scrollTop,p.scrollLeft=c.scrollLeft},!0)),p}(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},i.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(r).then(function(l){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,l(this.prop.container,u)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},i.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(r).then(function(l){var u=this.opt.jsPDF,c=this.opt.fontFaces,h=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,p=Object.assign({async:!0,allowTaint:!0,scale:h,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete p.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=c,c)for(var w=0;w<c.length;++w){var d=c[w],_=d.src.find(function(E){return E.format==="truetype"});_&&u.addFont(_.url,d.ref.name,d.ref.style)}return p.windowHeight=p.windowHeight||0,p.windowHeight=p.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):p.windowHeight,u.context2d.save(!0),l(this.prop.container,p)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},i.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},i.prototype.output=function(o,l,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(o,l):this.outputPdf(o,l)},i.prototype.outputPdf=function(o,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,l)})},i.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},i.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},i.prototype.set=function(o){if(n(o)!=="object")return this;var l=Object.keys(o||{}).map(function(u){if(u in i.template.prop)return function(){this.prop[u]=o[u]};switch(u){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[u]=o[u]}}},this);return this.then(function(){return this.thenList(l)})},i.prototype.get=function(o,l){return this.then(function(){var u=o in i.template.prop?this.prop[o]:this.opt[o];return l?l(u):u})},i.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},i.prototype.setPageSize=function(o){function l(u,c){return Math.floor(u*c/72*96)}return this.then(function(){(o=o||hr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:l(o.inner.width,o.k),height:l(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},i.prototype.setProgress=function(o,l,u,c){return o!=null&&(this.progress.val=o),l!=null&&(this.progress.state=l),u!=null&&(this.progress.n=u),c!=null&&(this.progress.stack=c),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(o,l,u,c){return this.setProgress(o?this.progress.val+o:null,l||null,u?this.progress.n+u:null,c?this.progress.stack.concat(c):null)},i.prototype.then=function(o,l){var u=this;return this.thenCore(o,l,function(c,h){return u.updateProgress(null,null,1,[c]),Promise.prototype.then.call(this,function(p){return u.updateProgress(null,c),p}).then(c,h).then(function(p){return u.updateProgress(1),p})})},i.prototype.thenCore=function(o,l,u){u=u||Promise.prototype.then,o&&(o=o.bind(this)),l&&(l=l.bind(this));var c=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:i.convert(Object.assign({},this),Promise.prototype),h=u.call(c,o,l);return i.convert(h,this.__proto__)},i.prototype.thenExternal=function(o,l){return Promise.prototype.then.call(this,o,l)},i.prototype.thenList=function(o){var l=this;return o.forEach(function(u){l=l.thenCore(u)}),l},i.prototype.catch=function(o){o&&(o=o.bind(this));var l=Promise.prototype.catch.call(this,o);return i.convert(l,this)},i.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},i.prototype.error=function(o){return this.then(function(){throw new Error(o)})},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,hr.getPageSize=function(o,l,u){if(On(o)==="object"){var c=o;o=c.orientation,l=c.unit||l,u=c.format||u}l=l||"mm",u=u||"a4",o=(""+(o||"P")).toLowerCase();var h,p=(""+u).toLowerCase(),w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":h=1;break;case"mm":h=72/25.4;break;case"cm":h=72/2.54;break;case"in":h=72;break;case"px":h=.75;break;case"pc":case"em":h=12;break;case"ex":h=6;break;default:throw"Invalid unit: "+l}var d,_=0,E=0;if(w.hasOwnProperty(p))_=w[p][1]/h,E=w[p][0]/h;else try{_=u[1],E=u[0]}catch{throw new Error("Invalid format: "+u)}if(o==="p"||o==="portrait")o="p",E>_&&(d=E,E=_,_=d);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",_>E&&(d=E,E=_,_=d)}return{width:E,height:_,unit:l,k:h,orientation:o}},e.html=function(o,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(F2):null;var u=new i(l);return l.worker?u:u.from(o).doCallback()}}(hr.API),hr.API.addJS=function(e){return nw=e,this.internal.events.subscribe("postPutResources",function(){d1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(d1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),rw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+nw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){d1!==void 0&&rw!==void 0&&this.internal.out("/Names <</JavaScript "+d1+" 0 R>>")}),this},function(e){var r;e.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=t.outline.render().split(/\r\n/),i=0;i<a.length;i++){var o=a[i],l=n.exec(o);if(l!=null){var u=l[1];t.internal.newObjectDeferredBegin(u,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,h=[];for(i=0;i<c;i++){var p=t.internal.newObject();h.push(p);var w=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+w.objId+" 0 R /XYZ null null null]>> endobj")}var d=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<h.length;i++)t.internal.write("(page_"+(i+1)+")"+h[i]+" 0 R");t.internal.write(" ] >>","endobj"),r=t.internal.newObject(),t.internal.write("<< /Dests "+d+" 0 R"),t.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+r+" 0 R"))}]),e.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,a,i){var o={title:a,options:i,children:[]};return n==null&&(n=this.root),n.children.push(o),o},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(n){n.id=t.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},t.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},t.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<n.children.length;i++){var o=n.children[i];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),i>0&&this.line("/Prev "+this.makeRef(n.children[i-1])),i<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[i+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var l=this.count=this.count_r({count:0},o);if(l>0&&this.line("/Count "+l),o.options&&o.options.pageNumber){var u=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var c=0;c<n.children.length;c++)this.renderItems(n.children[c])},t.outline.line=function(n){this.ctx.val+=n+`\r
|
|
437
|
-
`},t.outline.makeRef=function(n){return n.id+" 0 R"},t.outline.makeString=function(n){return"("+t.internal.pdfEscape(n)+")"},t.outline.objStart=function(n){this.ctx.val+=`\r
|
|
438
|
-
`+n.id+` 0 obj\r
|
|
439
|
-
<<\r
|
|
440
|
-
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
441
|
-
endobj\r
|
|
442
|
-
`},t.outline.count_r=function(n,a){for(var i=0;i<a.children.length;i++)n.count++,this.count_r(n,a.children[i]);return n.count}}])}(hr.API),function(e){var r=[192,193,194,195,196,197,198,199];e.processJPEG=function(t,n,a,i,o,l){var u,c=this.decode.DCT_DECODE,h=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(u=function(p){for(var w,d=256*p.charCodeAt(4)+p.charCodeAt(5),_=p.length,E={width:0,height:0,numcomponents:1},S=4;S<_;S+=2){if(S+=d,r.indexOf(p.charCodeAt(S+1))!==-1){w=256*p.charCodeAt(S+5)+p.charCodeAt(S+6),E={width:256*p.charCodeAt(S+7)+p.charCodeAt(S+8),height:w,numcomponents:p.charCodeAt(S+9)};break}d=256*p.charCodeAt(S+2)+p.charCodeAt(S+3)}return E}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}h={data:t,width:u.width,height:u.height,colorSpace:l,bitsPerComponent:8,filter:c,index:n,alias:a}}return h}}(hr.API);var oh,p1,iw,aw,ow,Zk=function(){var e,r,t;function n(i){var o,l,u,c,h,p,w,d,_,E,S,m,g,v;for(this.data=i,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},p=null;;){switch(o=this.readUInt32(),_=(function(){var b,O;for(O=[],b=0;b<4;++b)O.push(String.fromCharCode(this.data[this.pos++]));return O}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(o);break;case"fcTL":p&&this.animation.frames.push(p),this.pos+=4,p={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},h=this.readUInt16(),c=this.readUInt16()||100,p.delay=1e3*h/c,p.disposeOp=this.data[this.pos++],p.blendOp=this.data[this.pos++],p.data=[];break;case"IDAT":case"fdAT":for(_==="fdAT"&&(this.pos+=4,o-=4),i=(p!=null?p.data:void 0)||this.imgData,m=0;0<=o?m<o:m>o;0<=o?++m:--m)i.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(u=this.palette.length/3,this.transparency.indexed=this.read(o),this.transparency.indexed.length>u)throw new Error("More transparent colors than palette size");if((E=u-this.transparency.indexed.length)>0)for(g=0;0<=E?g<E:g>E;0<=E?++g:--g)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(o)[0];break;case 2:this.transparency.rgb=this.read(o)}break;case"tEXt":w=(S=this.read(o)).indexOf(0),d=String.fromCharCode.apply(String,S.slice(0,w)),this.text[d]=String.fromCharCode.apply(String,S.slice(w+1));break;case"IEND":return p&&this.animation.frames.push(p),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(v=this.colorType)===4||v===6,l=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*l,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=o}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(i){var o,l;for(l=[],o=0;0<=i?o<i:o>i;0<=i?++o:--o)l.push(this.data[this.pos++]);return l},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(i){var o=this.pixelBitlength/8,l=new Uint8Array(this.width*this.height*o),u=0,c=this;if(i==null&&(i=this.imgData),i.length===0)return new Uint8Array(0);function h(p,w,d,_){var E,S,m,g,v,b,O,I,T,M,j,C,x,L,A,N,F,U,W,$,Z,V=Math.ceil((c.width-p)/d),G=Math.ceil((c.height-w)/_),z=c.width==V&&c.height==G;for(L=o*V,C=z?l:new Uint8Array(L*G),b=i.length,x=0,S=0;x<G&&u<b;){switch(i[u++]){case 0:for(g=F=0;F<L;g=F+=1)C[S++]=i[u++];break;case 1:for(g=U=0;U<L;g=U+=1)E=i[u++],v=g<o?0:C[S-o],C[S++]=(E+v)%256;break;case 2:for(g=W=0;W<L;g=W+=1)E=i[u++],m=(g-g%o)/o,A=x&&C[(x-1)*L+m*o+g%o],C[S++]=(A+E)%256;break;case 3:for(g=$=0;$<L;g=$+=1)E=i[u++],m=(g-g%o)/o,v=g<o?0:C[S-o],A=x&&C[(x-1)*L+m*o+g%o],C[S++]=(E+Math.floor((v+A)/2))%256;break;case 4:for(g=Z=0;Z<L;g=Z+=1)E=i[u++],m=(g-g%o)/o,v=g<o?0:C[S-o],x===0?A=N=0:(A=C[(x-1)*L+m*o+g%o],N=m&&C[(x-1)*L+(m-1)*o+g%o]),O=v+A-N,I=Math.abs(O-v),M=Math.abs(O-A),j=Math.abs(O-N),T=I<=M&&I<=j?v:M<=j?A:N,C[S++]=(E+T)%256;break;default:throw new Error("Invalid filter algorithm: "+i[u-1])}if(!z){var D=((w+x*_)*c.width+p)*o,K=x*L;for(g=0;g<V;g+=1){for(var ne=0;ne<o;ne+=1)l[D++]=C[K++];D+=(d-1)*o}}x++}}return i=kk(i),c.interlaceMethod==1?(h(0,0,8,8),h(4,0,8,8),h(0,4,4,8),h(2,0,4,4),h(0,2,2,4),h(1,0,2,2),h(0,1,1,2)):h(0,0,1,1),l},n.prototype.decodePalette=function(){var i,o,l,u,c,h,p,w,d;for(l=this.palette,h=this.transparency.indexed||[],c=new Uint8Array((h.length||0)+l.length),u=0,i=0,o=p=0,w=l.length;p<w;o=p+=3)c[u++]=l[o],c[u++]=l[o+1],c[u++]=l[o+2],c[u++]=(d=h[i++])!=null?d:255;return c},n.prototype.copyToImageData=function(i,o){var l,u,c,h,p,w,d,_,E,S,m;if(u=this.colors,E=null,l=this.hasAlphaChannel,this.palette.length&&(E=(m=this._decodedPalette)!=null?m:this._decodedPalette=this.decodePalette(),u=4,l=!0),_=(c=i.data||i).length,p=E||o,h=w=0,u===1)for(;h<_;)d=E?4*o[h/4]:w,S=p[d++],c[h++]=S,c[h++]=S,c[h++]=S,c[h++]=l?p[d++]:255,w=d;else for(;h<_;)d=E?4*o[h/4]:w,c[h++]=p[d++],c[h++]=p[d++],c[h++]=p[d++],c[h++]=l?p[d++]:255,w=d},n.prototype.decode=function(){var i;return i=new Uint8Array(this.width*this.height*4),this.copyToImageData(i,this.decodePixels()),i};var a=function(){if(Object.prototype.toString.call(pr)==="[object Window]"){try{r=pr.document.createElement("canvas"),t=r.getContext("2d")}catch{return!1}return!0}return!1};return a(),e=function(i){var o;if(a()===!0)return t.width=i.width,t.height=i.height,t.clearRect(0,0,i.width,i.height),t.putImageData(i,0,0),(o=new Image).src=r.toDataURL(),o;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(i){var o,l,u,c,h,p,w,d;if(this.animation){for(d=[],l=h=0,p=(w=this.animation.frames).length;h<p;l=++h)o=w[l],u=i.createImageData(o.width,o.height),c=this.decodePixels(new Uint8Array(o.data)),this.copyToImageData(u,c),o.imageData=u,d.push(o.image=e(u));return d}},n.prototype.renderFrame=function(i,o){var l,u,c;return l=(u=this.animation.frames)[o],c=u[o-1],o===0&&i.clearRect(0,0,this.width,this.height),(c!=null?c.disposeOp:void 0)===1?i.clearRect(c.xOffset,c.yOffset,c.width,c.height):(c!=null?c.disposeOp:void 0)===2&&i.putImageData(c.imageData,c.xOffset,c.yOffset),l.blendOp===0&&i.clearRect(l.xOffset,l.yOffset,l.width,l.height),i.drawImage(l.image,l.xOffset,l.yOffset)},n.prototype.animate=function(i){var o,l,u,c,h,p,w=this;return l=0,p=this.animation,c=p.numFrames,u=p.frames,h=p.numPlays,(o=function(){var d,_;if(d=l++%c,_=u[d],w.renderFrame(i,d),c>1&&l/c<h)return w.animation._timeout=setTimeout(o,_.delay)})()},n.prototype.stopAnimation=function(){var i;return clearTimeout((i=this.animation)!=null?i._timeout:void 0)},n.prototype.render=function(i){var o,l;return i._png&&i._png.stopAnimation(),i._png=this,i.width=this.width,i.height=this.height,o=i.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(l=o.createImageData(this.width,this.height),this.copyToImageData(l,this.decodePixels()),o.putImageData(l,0,0))},n}();/**
|
|
443
|
-
* @license
|
|
444
|
-
*
|
|
445
|
-
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
|
446
|
-
*
|
|
447
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
448
|
-
* a copy of this software and associated documentation files (the
|
|
449
|
-
* "Software"), to deal in the Software without restriction, including
|
|
450
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
451
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
452
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
453
|
-
* the following conditions:
|
|
454
|
-
*
|
|
455
|
-
* The above copyright notice and this permission notice shall be
|
|
456
|
-
* included in all copies or substantial portions of the Software.
|
|
457
|
-
*
|
|
458
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
459
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
460
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
461
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
462
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
463
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
464
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
465
|
-
* ====================================================================
|
|
466
|
-
*//**
|
|
467
|
-
* @license
|
|
468
|
-
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
|
469
|
-
*
|
|
470
|
-
* https://github.com/deanm/omggif
|
|
471
|
-
*
|
|
472
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
473
|
-
* of this software and associated documentation files (the "Software"), to
|
|
474
|
-
* deal in the Software without restriction, including without limitation the
|
|
475
|
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
476
|
-
* sell copies of the Software, and to permit persons to whom the Software is
|
|
477
|
-
* furnished to do so, subject to the following conditions:
|
|
478
|
-
*
|
|
479
|
-
* The above copyright notice and this permission notice shall be included in
|
|
480
|
-
* all copies or substantial portions of the Software.
|
|
481
|
-
*
|
|
482
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
483
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
484
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
485
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
486
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
487
|
-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
488
|
-
* IN THE SOFTWARE.
|
|
489
|
-
*
|
|
490
|
-
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
|
491
|
-
* including animation and compression. It does not rely on any specific
|
|
492
|
-
* underlying system, so should run in the browser, Node, or Plask.
|
|
493
|
-
*/function Qk(e){var r=0;if(e[r++]!==71||e[r++]!==73||e[r++]!==70||e[r++]!==56||(e[r++]+1&253)!=56||e[r++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=e[r++]|e[r++]<<8,n=e[r++]|e[r++]<<8,a=e[r++],i=a>>7,o=1<<(7&a)+1;e[r++],e[r++];var l=null,u=null;i&&(l=r,u=o,r+=3*o);var c=!0,h=[],p=0,w=null,d=0,_=null;for(this.width=t,this.height=n;c&&r<e.length;)switch(e[r++]){case 33:switch(e[r++]){case 255:if(e[r]!==11||e[r+1]==78&&e[r+2]==69&&e[r+3]==84&&e[r+4]==83&&e[r+5]==67&&e[r+6]==65&&e[r+7]==80&&e[r+8]==69&&e[r+9]==50&&e[r+10]==46&&e[r+11]==48&&e[r+12]==3&&e[r+13]==1&&e[r+16]==0)r+=14,_=e[r++]|e[r++]<<8,r++;else for(r+=12;;){if(!((x=e[r++])>=0))throw Error("Invalid block size");if(x===0)break;r+=x}break;case 249:if(e[r++]!==4||e[r+4]!==0)throw new Error("Invalid graphics extension block.");var E=e[r++];p=e[r++]|e[r++]<<8,w=e[r++],(1&E)==0&&(w=null),d=E>>2&7,r++;break;case 254:for(;;){if(!((x=e[r++])>=0))throw Error("Invalid block size");if(x===0)break;r+=x}break;default:throw new Error("Unknown graphic control label: 0x"+e[r-1].toString(16))}break;case 44:var S=e[r++]|e[r++]<<8,m=e[r++]|e[r++]<<8,g=e[r++]|e[r++]<<8,v=e[r++]|e[r++]<<8,b=e[r++],O=b>>6&1,I=1<<(7&b)+1,T=l,M=u,j=!1;b>>7&&(j=!0,T=r,M=I,r+=3*I);var C=r;for(r++;;){var x;if(!((x=e[r++])>=0))throw Error("Invalid block size");if(x===0)break;r+=x}h.push({x:S,y:m,width:g,height:v,has_local_palette:j,palette_offset:T,palette_size:M,data_offset:C,data_length:r-C,transparent_index:w,interlaced:!!O,delay:p,disposal:d});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+e[r-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return _},this.frameInfo=function(L){if(L<0||L>=h.length)throw new Error("Frame index out of range.");return h[L]},this.decodeAndBlitFrameBGRA=function(L,A){var N=this.frameInfo(L),F=N.width*N.height,U=new Uint8Array(F);sw(e,N.data_offset,U,F);var W=N.palette_offset,$=N.transparent_index;$===null&&($=256);var Z=N.width,V=t-Z,G=Z,z=4*(N.y*t+N.x),D=4*((N.y+N.height)*t+N.x),K=z,ne=4*V;N.interlaced===!0&&(ne+=4*t*7);for(var Q=8,ee=0,ae=U.length;ee<ae;++ee){var se=U[ee];if(G===0&&(G=Z,(K+=ne)>=D&&(ne=4*V+4*t*(Q-1),K=z+(Z+V)*(Q<<1),Q>>=1)),se===$)K+=4;else{var ce=e[W+3*se],me=e[W+3*se+1],Se=e[W+3*se+2];A[K++]=Se,A[K++]=me,A[K++]=ce,A[K++]=255}--G}},this.decodeAndBlitFrameRGBA=function(L,A){var N=this.frameInfo(L),F=N.width*N.height,U=new Uint8Array(F);sw(e,N.data_offset,U,F);var W=N.palette_offset,$=N.transparent_index;$===null&&($=256);var Z=N.width,V=t-Z,G=Z,z=4*(N.y*t+N.x),D=4*((N.y+N.height)*t+N.x),K=z,ne=4*V;N.interlaced===!0&&(ne+=4*t*7);for(var Q=8,ee=0,ae=U.length;ee<ae;++ee){var se=U[ee];if(G===0&&(G=Z,(K+=ne)>=D&&(ne=4*V+4*t*(Q-1),K=z+(Z+V)*(Q<<1),Q>>=1)),se===$)K+=4;else{var ce=e[W+3*se],me=e[W+3*se+1],Se=e[W+3*se+2];A[K++]=ce,A[K++]=me,A[K++]=Se,A[K++]=255}--G}}}function sw(e,r,t,n){for(var a=e[r++],i=1<<a,o=i+1,l=o+1,u=a+1,c=(1<<u)-1,h=0,p=0,w=0,d=e[r++],_=new Int32Array(4096),E=null;;){for(;h<16&&d!==0;)p|=e[r++]<<h,h+=8,d===1?d=e[r++]:--d;if(h<u)break;var S=p&c;if(p>>=u,h-=u,S!==i){if(S===o)break;for(var m=S<l?S:E,g=0,v=m;v>i;)v=_[v]>>8,++g;var b=v;if(w+g+(m!==S?1:0)>n)return void Vn.log("Warning, gif stream longer than expected.");t[w++]=b;var O=w+=g;for(m!==S&&(t[w++]=b),v=m;g--;)v=_[v],t[--O]=255&v,v>>=8;E!==null&&l<4096&&(_[l++]=E<<8|b,l>=c+1&&u<12&&(++u,c=c<<1|1)),E=S}else l=o+1,c=(1<<(u=a+1))-1,E=null}return w!==n&&Vn.log("Warning, gif stream shorter than expected."),t}/**
|
|
494
|
-
* @license
|
|
495
|
-
Copyright (c) 2008, Adobe Systems Incorporated
|
|
496
|
-
All rights reserved.
|
|
497
|
-
|
|
498
|
-
Redistribution and use in source and binary forms, with or without
|
|
499
|
-
modification, are permitted provided that the following conditions are
|
|
500
|
-
met:
|
|
501
|
-
|
|
502
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
503
|
-
this list of conditions and the following disclaimer.
|
|
504
|
-
|
|
505
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
506
|
-
notice, this list of conditions and the following disclaimer in the
|
|
507
|
-
documentation and/or other materials provided with the distribution.
|
|
508
|
-
|
|
509
|
-
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
510
|
-
contributors may be used to endorse or promote products derived from
|
|
511
|
-
this software without specific prior written permission.
|
|
512
|
-
|
|
513
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
514
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
515
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
516
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
517
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
518
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
519
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
520
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
521
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
522
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
523
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
524
|
-
*/function c2(e){var r,t,n,a,i,o=Math.floor,l=new Array(64),u=new Array(64),c=new Array(64),h=new Array(64),p=new Array(65535),w=new Array(65535),d=new Array(64),_=new Array(64),E=[],S=0,m=7,g=new Array(64),v=new Array(64),b=new Array(64),O=new Array(256),I=new Array(2048),T=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],M=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],x=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],N=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],F=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function U(z,D){for(var K=0,ne=0,Q=new Array,ee=1;ee<=16;ee++){for(var ae=1;ae<=z[ee];ae++)Q[D[ne]]=[],Q[D[ne]][0]=K,Q[D[ne]][1]=ee,ne++,K++;K*=2}return Q}function W(z){for(var D=z[0],K=z[1]-1;K>=0;)D&1<<K&&(S|=1<<m),K--,--m<0&&(S==255?($(255),$(0)):$(S),m=7,S=0)}function $(z){E.push(z)}function Z(z){$(z>>8&255),$(255&z)}function V(z,D,K,ne,Q){for(var ee,ae=Q[0],se=Q[240],ce=function(Ae,Ee){var Le,he,ke,Re,$e,vt,wt,at,mt,Je,nt=0;for(mt=0;mt<8;++mt){Le=Ae[nt],he=Ae[nt+1],ke=Ae[nt+2],Re=Ae[nt+3],$e=Ae[nt+4],vt=Ae[nt+5],wt=Ae[nt+6];var qt=Le+(at=Ae[nt+7]),At=Le-at,Ht=he+wt,zt=he-wt,Ie=ke+vt,He=ke-vt,Nt=Re+$e,ht=Re-$e,gt=qt+Nt,_t=qt-Nt,rr=Ht+Ie,Wt=Ht-Ie;Ae[nt]=gt+rr,Ae[nt+4]=gt-rr;var St=.707106781*(Wt+_t);Ae[nt+2]=_t+St,Ae[nt+6]=_t-St;var it=.382683433*((gt=ht+He)-(Wt=zt+At)),Bt=.5411961*gt+it,Ue=1.306562965*Wt+it,De=.707106781*(rr=He+zt),bt=At+De,ze=At-De;Ae[nt+5]=ze+Bt,Ae[nt+3]=ze-Bt,Ae[nt+1]=bt+Ue,Ae[nt+7]=bt-Ue,nt+=8}for(nt=0,mt=0;mt<8;++mt){Le=Ae[nt],he=Ae[nt+8],ke=Ae[nt+16],Re=Ae[nt+24],$e=Ae[nt+32],vt=Ae[nt+40],wt=Ae[nt+48];var xt=Le+(at=Ae[nt+56]),kt=Le-at,Ft=he+wt,Ut=he-wt,Yt=ke+vt,_r=ke-vt,kr=Re+$e,Lr=Re-$e,Nr=xt+kr,Wn=xt-kr,en=Ft+Yt,Qn=Ft-Yt;Ae[nt]=Nr+en,Ae[nt+32]=Nr-en;var _i=.707106781*(Qn+Wn);Ae[nt+16]=Wn+_i,Ae[nt+48]=Wn-_i;var Ni=.382683433*((Nr=Lr+_r)-(Qn=Ut+kt)),Si=.5411961*Nr+Ni,fa=1.306562965*Qn+Ni,ws=.707106781*(en=_r+Ut),Vo=kt+ws,tu=kt-ws;Ae[nt+40]=tu+Si,Ae[nt+24]=tu-Si,Ae[nt+8]=Vo+fa,Ae[nt+56]=Vo-fa,nt++}for(mt=0;mt<64;++mt)Je=Ae[mt]*Ee[mt],d[mt]=Je>0?Je+.5|0:Je-.5|0;return d}(z,D),me=0;me<64;++me)_[T[me]]=ce[me];var Se=_[0]-K;K=_[0],Se==0?W(ne[0]):(W(ne[w[ee=32767+Se]]),W(p[ee]));for(var Oe=63;Oe>0&&_[Oe]==0;)Oe--;if(Oe==0)return W(ae),K;for(var Ne,xe=1;xe<=Oe;){for(var ve=xe;_[xe]==0&&xe<=Oe;)++xe;var Xe=xe-ve;if(Xe>=16){Ne=Xe>>4;for(var be=1;be<=Ne;++be)W(se);Xe&=15}ee=32767+_[xe],W(Q[(Xe<<4)+w[ee]]),W(p[ee]),xe++}return Oe!=63&&W(ae),K}function G(z){z=Math.min(Math.max(z,1),100),i!=z&&(function(D){for(var K=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ne=0;ne<64;ne++){var Q=o((K[ne]*D+50)/100);Q=Math.min(Math.max(Q,1),255),l[T[ne]]=Q}for(var ee=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ae=0;ae<64;ae++){var se=o((ee[ae]*D+50)/100);se=Math.min(Math.max(se,1),255),u[T[ae]]=se}for(var ce=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],me=0,Se=0;Se<8;Se++)for(var Oe=0;Oe<8;Oe++)c[me]=1/(l[T[me]]*ce[Se]*ce[Oe]*8),h[me]=1/(u[T[me]]*ce[Se]*ce[Oe]*8),me++}(z<50?Math.floor(5e3/z):Math.floor(200-2*z)),i=z)}this.encode=function(z,D){D&&G(D),E=new Array,S=0,m=7,Z(65496),Z(65504),Z(16),$(74),$(70),$(73),$(70),$(0),$(1),$(1),$(0),Z(1),Z(1),$(0),$(0),function(){Z(65499),Z(132),$(0);for(var he=0;he<64;he++)$(l[he]);$(1);for(var ke=0;ke<64;ke++)$(u[ke])}(),function(he,ke){Z(65472),Z(17),$(8),Z(ke),Z(he),$(3),$(1),$(17),$(0),$(2),$(17),$(1),$(3),$(17),$(1)}(z.width,z.height),function(){Z(65476),Z(418),$(0);for(var he=0;he<16;he++)$(M[he+1]);for(var ke=0;ke<=11;ke++)$(j[ke]);$(16);for(var Re=0;Re<16;Re++)$(C[Re+1]);for(var $e=0;$e<=161;$e++)$(x[$e]);$(1);for(var vt=0;vt<16;vt++)$(L[vt+1]);for(var wt=0;wt<=11;wt++)$(A[wt]);$(17);for(var at=0;at<16;at++)$(N[at+1]);for(var mt=0;mt<=161;mt++)$(F[mt])}(),Z(65498),Z(12),$(3),$(1),$(0),$(2),$(17),$(3),$(17),$(0),$(63),$(0);var K=0,ne=0,Q=0;S=0,m=7,this.encode.displayName="_encode_";for(var ee,ae,se,ce,me,Se,Oe,Ne,xe,ve=z.data,Xe=z.width,be=z.height,Ae=4*Xe,Ee=0;Ee<be;){for(ee=0;ee<Ae;){for(me=Ae*Ee+ee,Oe=-1,Ne=0,xe=0;xe<64;xe++)Se=me+(Ne=xe>>3)*Ae+(Oe=4*(7&xe)),Ee+Ne>=be&&(Se-=Ae*(Ee+1+Ne-be)),ee+Oe>=Ae&&(Se-=ee+Oe-Ae+4),ae=ve[Se++],se=ve[Se++],ce=ve[Se++],g[xe]=(I[ae]+I[se+256>>0]+I[ce+512>>0]>>16)-128,v[xe]=(I[ae+768>>0]+I[se+1024>>0]+I[ce+1280>>0]>>16)-128,b[xe]=(I[ae+1280>>0]+I[se+1536>>0]+I[ce+1792>>0]>>16)-128;K=V(g,c,K,r,n),ne=V(v,h,ne,t,a),Q=V(b,h,Q,t,a),ee+=32}Ee+=8}if(m>=0){var Le=[];Le[1]=m+1,Le[0]=(1<<m+1)-1,W(Le)}return Z(65497),new Uint8Array(E)},e=e||50,function(){for(var z=String.fromCharCode,D=0;D<256;D++)O[D]=z(D)}(),r=U(M,j),t=U(L,A),n=U(C,x),a=U(N,F),function(){for(var z=1,D=2,K=1;K<=15;K++){for(var ne=z;ne<D;ne++)w[32767+ne]=K,p[32767+ne]=[],p[32767+ne][1]=K,p[32767+ne][0]=ne;for(var Q=-(D-1);Q<=-z;Q++)w[32767+Q]=K,p[32767+Q]=[],p[32767+Q][1]=K,p[32767+Q][0]=D-1+Q;z<<=1,D<<=1}}(),function(){for(var z=0;z<256;z++)I[z]=19595*z,I[z+256>>0]=38470*z,I[z+512>>0]=7471*z+32768,I[z+768>>0]=-11059*z,I[z+1024>>0]=-21709*z,I[z+1280>>0]=32768*z+8421375,I[z+1536>>0]=-27439*z,I[z+1792>>0]=-5329*z}(),G(e)}/**
|
|
525
|
-
* @license
|
|
526
|
-
* Copyright (c) 2017 Aras Abbasi
|
|
527
|
-
*
|
|
528
|
-
* Licensed under the MIT License.
|
|
529
|
-
* http://opensource.org/licenses/mit-license
|
|
530
|
-
*/function Hl(e,r){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!r,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function lw(e){function r(M){if(!M)throw Error("assert :P")}function t(M,j,C){for(var x=0;4>x;x++)if(M[j+x]!=C.charCodeAt(x))return!0;return!1}function n(M,j,C,x,L){for(var A=0;A<L;A++)M[j+A]=C[x+A]}function a(M,j,C,x){for(var L=0;L<x;L++)M[j+L]=C}function i(M){return new Int32Array(M)}function o(M,j){for(var C=[],x=0;x<M;x++)C.push(new j);return C}function l(M,j){var C=[];return function x(L,A,N){for(var F=N[A],U=0;U<F&&(L.push(N.length>A+1?[]:new j),!(N.length<A+1));U++)x(L[U],A+1,N)}(C,0,M),C}var u=function(){var M=this;function j(R,H){for(var te=1<<H-1>>>0;R&te;)te>>>=1;return te?(R&te-1)+te:R}function C(R,H,te,oe,ue){r(!(oe%te));do R[H+(oe-=te)]=ue;while(0<oe)}function x(R,H,te,oe,ue){if(r(2328>=ue),512>=ue)var de=i(512);else if((de=i(ue))==null)return 0;return function(ge,ye,we,Pe,Fe,Qe){var Ye,We,yt=ye,lt=1<<we,Me=i(16),qe=i(16);for(r(Fe!=0),r(Pe!=null),r(ge!=null),r(0<we),We=0;We<Fe;++We){if(15<Pe[We])return 0;++Me[Pe[We]]}if(Me[0]==Fe)return 0;for(qe[1]=0,Ye=1;15>Ye;++Ye){if(Me[Ye]>1<<Ye)return 0;qe[Ye+1]=qe[Ye]+Me[Ye]}for(We=0;We<Fe;++We)Ye=Pe[We],0<Pe[We]&&(Qe[qe[Ye]++]=We);if(qe[15]==1)return(Pe=new L).g=0,Pe.value=Qe[0],C(ge,yt,1,lt,Pe),lt;var Ge,ct=-1,pt=lt-1,Gt=0,jt=1,ar=1,Mt=1<<we;for(We=0,Ye=1,Fe=2;Ye<=we;++Ye,Fe<<=1){if(jt+=ar<<=1,0>(ar-=Me[Ye]))return 0;for(;0<Me[Ye];--Me[Ye])(Pe=new L).g=Ye,Pe.value=Qe[We++],C(ge,yt+Gt,Fe,Mt,Pe),Gt=j(Gt,Ye)}for(Ye=we+1,Fe=2;15>=Ye;++Ye,Fe<<=1){if(jt+=ar<<=1,0>(ar-=Me[Ye]))return 0;for(;0<Me[Ye];--Me[Ye]){if(Pe=new L,(Gt&pt)!=ct){for(yt+=Mt,Ge=1<<(ct=Ye)-we;15>ct&&!(0>=(Ge-=Me[ct]));)++ct,Ge<<=1;lt+=Mt=1<<(Ge=ct-we),ge[ye+(ct=Gt&pt)].g=Ge+we,ge[ye+ct].value=yt-ye-ct}Pe.g=Ye-we,Pe.value=Qe[We++],C(ge,yt+(Gt>>we),Fe,Mt,Pe),Gt=j(Gt,Ye)}}return jt!=2*qe[15]-1?0:lt}(R,H,te,oe,ue,de)}function L(){this.value=this.g=0}function A(){this.value=this.g=0}function N(){this.G=o(5,L),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(rn,A)}function F(R,H,te,oe){r(R!=null),r(H!=null),r(2147483648>oe),R.Ca=254,R.I=0,R.b=-8,R.Ka=0,R.oa=H,R.pa=te,R.Jd=H,R.Yc=te+oe,R.Zc=4<=oe?te+oe-4+1:te,ee(R)}function U(R,H){for(var te=0;0<H--;)te|=se(R,128)<<H;return te}function W(R,H){var te=U(R,H);return ae(R)?-te:te}function $(R,H,te,oe){var ue,de=0;for(r(R!=null),r(H!=null),r(4294967288>oe),R.Sb=oe,R.Ra=0,R.u=0,R.h=0,4<oe&&(oe=4),ue=0;ue<oe;++ue)de+=H[te+ue]<<8*ue;R.Ra=de,R.bb=oe,R.oa=H,R.pa=te}function Z(R){for(;8<=R.u&&R.bb<R.Sb;)R.Ra>>>=8,R.Ra+=R.oa[R.pa+R.bb]<<Oa-8>>>0,++R.bb,R.u-=8;K(R)&&(R.h=1,R.u=0)}function V(R,H){if(r(0<=H),!R.h&&H<=wl){var te=D(R)&Js[H];return R.u+=H,Z(R),te}return R.h=1,R.u=0}function G(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function D(R){return R.Ra>>>(R.u&Oa-1)>>>0}function K(R){return r(R.bb<=R.Sb),R.h||R.bb==R.Sb&&R.u>Oa}function ne(R,H){R.u=H,R.h=K(R)}function Q(R){R.u>=Ga&&(r(R.u>=Ga),Z(R))}function ee(R){r(R!=null&&R.oa!=null),R.pa<R.Zc?(R.I=(R.oa[R.pa++]|R.I<<8)>>>0,R.b+=8):(r(R!=null&&R.oa!=null),R.pa<R.Yc?(R.b+=8,R.I=R.oa[R.pa++]|R.I<<8):R.Ka?R.b=0:(R.I<<=8,R.b+=8,R.Ka=1))}function ae(R){return U(R,1)}function se(R,H){var te=R.Ca;0>R.b&&ee(R);var oe=R.b,ue=te*H>>>8,de=(R.I>>>oe>ue)+0;for(de?(te-=ue,R.I-=ue+1<<oe>>>0):te=ue+1,oe=te,ue=0;256<=oe;)ue+=8,oe>>=8;return oe=7^ue+xi[oe],R.b-=oe,R.Ca=(te<<oe)-1,de}function ce(R,H,te){R[H+0]=te>>24&255,R[H+1]=te>>16&255,R[H+2]=te>>8&255,R[H+3]=te>>0&255}function me(R,H){return R[H+0]<<0|R[H+1]<<8}function Se(R,H){return me(R,H)|R[H+2]<<16}function Oe(R,H){return me(R,H)|me(R,H+2)<<16}function Ne(R,H){var te=1<<H;return r(R!=null),r(0<H),R.X=i(te),R.X==null?0:(R.Mb=32-H,R.Xa=H,1)}function xe(R,H){r(R!=null),r(H!=null),r(R.Xa==H.Xa),n(H.X,0,R.X,0,1<<H.Xa)}function ve(){this.X=[],this.Xa=this.Mb=0}function Xe(R,H,te,oe){r(te!=null),r(oe!=null);var ue=te[0],de=oe[0];return ue==0&&(ue=(R*de+H/2)/H),de==0&&(de=(H*ue+R/2)/R),0>=ue||0>=de?0:(te[0]=ue,oe[0]=de,1)}function be(R,H){return R+(1<<H)-1>>>H}function Ae(R,H){return((4278255360&R)+(4278255360&H)>>>0&4278255360)+((16711935&R)+(16711935&H)>>>0&16711935)>>>0}function Ee(R,H){M[H]=function(te,oe,ue,de,ge,ye,we){var Pe;for(Pe=0;Pe<ge;++Pe){var Fe=M[R](ye[we+Pe-1],ue,de+Pe);ye[we+Pe]=Ae(te[oe+Pe],Fe)}}}function Le(){this.ud=this.hd=this.jd=0}function he(R,H){return((4278124286&(R^H))>>>1)+(R&H)>>>0}function ke(R){return 0<=R&&256>R?R:0>R?0:255<R?255:void 0}function Re(R,H){return ke(R+(R-H+.5>>1))}function $e(R,H,te){return Math.abs(H-te)-Math.abs(R-te)}function vt(R,H,te,oe,ue,de,ge){for(oe=de[ge-1],te=0;te<ue;++te)de[ge+te]=oe=Ae(R[H+te],oe)}function wt(R,H,te,oe,ue){var de;for(de=0;de<te;++de){var ge=R[H+de],ye=ge>>8&255,we=16711935&(we=(we=16711935&ge)+((ye<<16)+ye));oe[ue+de]=(4278255360&ge)+we>>>0}}function at(R,H){H.jd=R>>0&255,H.hd=R>>8&255,H.ud=R>>16&255}function mt(R,H,te,oe,ue,de){var ge;for(ge=0;ge<oe;++ge){var ye=H[te+ge],we=ye>>>8,Pe=ye,Fe=255&(Fe=(Fe=ye>>>16)+((R.jd<<24>>24)*(we<<24>>24)>>>5));Pe=255&(Pe=(Pe=Pe+((R.hd<<24>>24)*(we<<24>>24)>>>5))+((R.ud<<24>>24)*(Fe<<24>>24)>>>5)),ue[de+ge]=(4278255360&ye)+(Fe<<16)+Pe}}function Je(R,H,te,oe,ue){M[H]=function(de,ge,ye,we,Pe,Fe,Qe,Ye,We){for(we=Qe;we<Ye;++we)for(Qe=0;Qe<We;++Qe)Pe[Fe++]=ue(ye[oe(de[ge++])])},M[R]=function(de,ge,ye,we,Pe,Fe,Qe){var Ye=8>>de.b,We=de.Ea,yt=de.K[0],lt=de.w;if(8>Ye)for(de=(1<<de.b)-1,lt=(1<<Ye)-1;ge<ye;++ge){var Me,qe=0;for(Me=0;Me<We;++Me)Me&de||(qe=oe(we[Pe++])),Fe[Qe++]=ue(yt[qe<]),qe>>=Ye}else M["VP8LMapColor"+te](we,Pe,yt,lt,Fe,Qe,ge,ye,We)}}function nt(R,H,te,oe,ue){for(te=H+te;H<te;){var de=R[H++];oe[ue++]=de>>16&255,oe[ue++]=de>>8&255,oe[ue++]=de>>0&255}}function qt(R,H,te,oe,ue){for(te=H+te;H<te;){var de=R[H++];oe[ue++]=de>>16&255,oe[ue++]=de>>8&255,oe[ue++]=de>>0&255,oe[ue++]=de>>24&255}}function At(R,H,te,oe,ue){for(te=H+te;H<te;){var de=(ge=R[H++])>>16&240|ge>>12&15,ge=ge>>0&240|ge>>28&15;oe[ue++]=de,oe[ue++]=ge}}function Ht(R,H,te,oe,ue){for(te=H+te;H<te;){var de=(ge=R[H++])>>16&248|ge>>13&7,ge=ge>>5&224|ge>>3&31;oe[ue++]=de,oe[ue++]=ge}}function zt(R,H,te,oe,ue){for(te=H+te;H<te;){var de=R[H++];oe[ue++]=de>>0&255,oe[ue++]=de>>8&255,oe[ue++]=de>>16&255}}function Ie(R,H,te,oe,ue,de){if(de==0)for(te=H+te;H<te;)ce(oe,((de=R[H++])[0]>>24|de[1]>>8&65280|de[2]<<8&16711680|de[3]<<24)>>>0),ue+=32;else n(oe,ue,R,H,te)}function He(R,H){M[H][0]=M[R+"0"],M[H][1]=M[R+"1"],M[H][2]=M[R+"2"],M[H][3]=M[R+"3"],M[H][4]=M[R+"4"],M[H][5]=M[R+"5"],M[H][6]=M[R+"6"],M[H][7]=M[R+"7"],M[H][8]=M[R+"8"],M[H][9]=M[R+"9"],M[H][10]=M[R+"10"],M[H][11]=M[R+"11"],M[H][12]=M[R+"12"],M[H][13]=M[R+"13"],M[H][14]=M[R+"0"],M[H][15]=M[R+"0"]}function Nt(R){return R==Pl||R==Cs||R==hu||R==du}function ht(){this.eb=[],this.size=this.A=this.fb=0}function gt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function _t(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ht,this.f.kb=new gt,this.sd=null}function rr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Wt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function St(R){return alert("todo:WebPSamplerProcessPlane"),R.T}function it(R,H){var te=R.T,oe=H.ba.f.RGBA,ue=oe.eb,de=oe.fb+R.ka*oe.A,ge=pa[H.ba.S],ye=R.y,we=R.O,Pe=R.f,Fe=R.N,Qe=R.ea,Ye=R.W,We=H.cc,yt=H.dc,lt=H.Mc,Me=H.Nc,qe=R.ka,Ge=R.ka+R.T,ct=R.U,pt=ct+1>>1;for(qe==0?ge(ye,we,null,null,Pe,Fe,Qe,Ye,Pe,Fe,Qe,Ye,ue,de,null,null,ct):(ge(H.ec,H.fc,ye,we,We,yt,lt,Me,Pe,Fe,Qe,Ye,ue,de-oe.A,ue,de,ct),++te);qe+2<Ge;qe+=2)We=Pe,yt=Fe,lt=Qe,Me=Ye,Fe+=R.Rc,Ye+=R.Rc,de+=2*oe.A,ge(ye,(we+=2*R.fa)-R.fa,ye,we,We,yt,lt,Me,Pe,Fe,Qe,Ye,ue,de-oe.A,ue,de,ct);return we+=R.fa,R.j+Ge<R.o?(n(H.ec,H.fc,ye,we,ct),n(H.cc,H.dc,Pe,Fe,pt),n(H.Mc,H.Nc,Qe,Ye,pt),te--):1&Ge||ge(ye,we,null,null,Pe,Fe,Qe,Ye,Pe,Fe,Qe,Ye,ue,de+oe.A,null,null,ct),te}function Bt(R,H,te){var oe=R.F,ue=[R.J];if(oe!=null){var de=R.U,ge=H.ba.S,ye=ge==fu||ge==hu;H=H.ba.f.RGBA;var we=[0],Pe=R.ka;we[0]=R.T,R.Kb&&(Pe==0?--we[0]:(--Pe,ue[0]-=R.width),R.j+R.ka+R.T==R.o&&(we[0]=R.o-R.j-Pe));var Fe=H.eb;Pe=H.fb+Pe*H.A,R=Yr(oe,ue[0],R.width,de,we,Fe,Pe+(ye?0:3),H.A),r(te==we),R&&Nt(ge)&&Ei(Fe,Pe,ye,de,we,H.A)}return 0}function Ue(R){var H=R.ma,te=H.ba.S,oe=11>te,ue=te==Fo||te==El||te==fu||te==cn||te==12||Nt(te);if(H.memory=null,H.Ib=null,H.Jb=null,H.Nd=null,!Qs(H.Oa,R,ue?11:12))return 0;if(ue&&Nt(te)&&Et(),R.da)alert("todo:use_scaling");else{if(oe){if(H.Ib=St,R.Kb){if(te=R.U+1>>1,H.memory=i(R.U+2*te),H.memory==null)return 0;H.ec=H.memory,H.fc=0,H.cc=H.ec,H.dc=H.fc+R.U,H.Mc=H.cc,H.Nc=H.dc+te,H.Ib=it,Et()}}else alert("todo:EmitYUV");ue&&(H.Jb=Bt,oe&&et())}if(oe&&!Pi){for(R=0;256>R;++R)ia[R]=89858*(R-128)+go>>rs,aa[R]=-22014*(R-128)+go,Al[R]=-45773*(R-128),il[R]=113618*(R-128)+go>>rs;for(R=Zr;R<an;++R)H=76283*(R-16)+go>>rs,mu[R-Zr]=Ea(H,255),cf[R-Zr]=Ea(H+8>>4,15);Pi=1}return 1}function De(R){var H=R.ma,te=R.U,oe=R.T;return r(!(1&R.ka)),0>=te||0>=oe?0:(te=H.Ib(R,H),H.Jb!=null&&H.Jb(R,H,te),H.Dc+=te,1)}function bt(R){R.ma.memory=null}function ze(R,H,te,oe){return V(R,8)!=47?0:(H[0]=V(R,14)+1,te[0]=V(R,14)+1,oe[0]=V(R,1),V(R,3)!=0?0:!R.h)}function xt(R,H){if(4>R)return R+1;var te=R-2>>1;return(2+(1&R)<<te)+V(H,te)+1}function kt(R,H){return 120<H?H-120:1<=(te=((te=zf[H-1])>>4)*R+(8-(15&te)))?te:1;var te}function Ft(R,H,te){var oe=D(te),ue=R[H+=255&oe].g-8;return 0<ue&&(ne(te,te.u+8),oe=D(te),H+=R[H].value,H+=oe&(1<<ue)-1),ne(te,te.u+R[H].g),R[H].value}function Ut(R,H,te){return te.g+=R.g,te.value+=R.value<<H>>>0,r(8>=te.g),R.g}function Yt(R,H,te){var oe=R.xc;return r((H=oe==0?0:R.vc[R.md*(te>>oe)+(H>>oe)])<R.Wb),R.Ya[H]}function _r(R,H,te,oe){var ue=R.ab,de=R.c*H,ge=R.C;H=ge+H;var ye=te,we=oe;for(oe=R.Ta,te=R.Ua;0<ue--;){var Pe=R.gc[ue],Fe=ge,Qe=H,Ye=ye,We=we,yt=(we=oe,ye=te,Pe.Ea);switch(r(Fe<Qe),r(Qe<=Pe.nc),Pe.hc){case 2:Hu(Ye,We,(Qe-Fe)*yt,we,ye);break;case 0:var lt=Fe,Me=Qe,qe=we,Ge=ye,ct=(Mt=Pe).Ea;lt==0&&(el(Ye,We,null,null,1,qe,Ge),vt(Ye,We+1,0,0,ct-1,qe,Ge+1),We+=ct,Ge+=ct,++lt);for(var pt=1<<Mt.b,Gt=pt-1,jt=be(ct,Mt.b),ar=Mt.K,Mt=Mt.w+(lt>>Mt.b)*jt;lt<Me;){var Fr=ar,qr=Mt,Rr=1;for(co(Ye,We,qe,Ge-ct,1,qe,Ge);Rr<ct;){var yr=(Rr&~Gt)+pt;yr>ct&&(yr=ct),(0,yi[Fr[qr++]>>8&15])(Ye,We+ +Rr,qe,Ge+Rr-ct,yr-Rr,qe,Ge+Rr),Rr=yr}We+=ct,Ge+=ct,++lt&Gt||(Mt+=jt)}Qe!=Pe.nc&&n(we,ye-yt,we,ye+(Qe-Fe-1)*yt,yt);break;case 1:for(yt=Ye,Me=We,ct=(Ye=Pe.Ea)-(Ge=Ye&~(qe=(We=1<<Pe.b)-1)),lt=be(Ye,Pe.b),pt=Pe.K,Pe=Pe.w+(Fe>>Pe.b)*lt;Fe<Qe;){for(Gt=pt,jt=Pe,ar=new Le,Mt=Me+Ge,Fr=Me+Ye;Me<Mt;)at(Gt[jt++],ar),Jo(ar,yt,Me,We,we,ye),Me+=We,ye+=We;Me<Fr&&(at(Gt[jt++],ar),Jo(ar,yt,Me,ct,we,ye),Me+=ct,ye+=ct),++Fe&qe||(Pe+=lt)}break;case 3:if(Ye==we&&We==ye&&0<Pe.b){for(Me=we,Ye=yt=ye+(Qe-Fe)*yt-(Ge=(Qe-Fe)*be(Pe.Ea,Pe.b)),We=we,qe=ye,lt=[],Ge=(ct=Ge)-1;0<=Ge;--Ge)lt[Ge]=We[qe+Ge];for(Ge=ct-1;0<=Ge;--Ge)Me[Ye+Ge]=lt[Ge];mi(Pe,Fe,Qe,we,yt,we,ye)}else mi(Pe,Fe,Qe,Ye,We,we,ye)}ye=oe,we=te}we!=te&&n(oe,te,ye,we,de)}function kr(R,H){var te=R.V,oe=R.Ba+R.c*R.C,ue=H-R.C;if(r(H<=R.l.o),r(16>=ue),0<ue){var de=R.l,ge=R.Ta,ye=R.Ua,we=de.width;if(_r(R,ue,te,oe),ue=ye=[ye],r((te=R.C)<(oe=H)),r(de.v<de.va),oe>de.o&&(oe=de.o),te<de.j){var Pe=de.j-te;te=de.j,ue[0]+=Pe*we}if(te>=oe?te=0:(ue[0]+=4*de.v,de.ka=te-de.j,de.U=de.va-de.v,de.T=oe-te,te=1),te){if(ye=ye[0],11>(te=R.ca).S){var Fe=te.f.RGBA,Qe=(oe=te.S,ue=de.U,de=de.T,Pe=Fe.eb,Fe.A),Ye=de;for(Fe=Fe.fb+R.Ma*Fe.A;0<Ye--;){var We=ge,yt=ye,lt=ue,Me=Pe,qe=Fe;switch(oe){case xl:li(We,yt,lt,Me,qe);break;case Fo:qi(We,yt,lt,Me,qe);break;case Pl:qi(We,yt,lt,Me,qe),Ei(Me,qe,0,lt,1,0);break;case sf:fo(We,yt,lt,Me,qe);break;case El:Ie(We,yt,lt,Me,qe,1);break;case Cs:Ie(We,yt,lt,Me,qe,1),Ei(Me,qe,0,lt,1,0);break;case fu:Ie(We,yt,lt,Me,qe,0);break;case hu:Ie(We,yt,lt,Me,qe,0),Ei(Me,qe,1,lt,1,0);break;case cn:es(We,yt,lt,Me,qe);break;case du:es(We,yt,lt,Me,qe),nn(Me,qe,lt,1,0);break;case Gu:$r(We,yt,lt,Me,qe);break;default:r(0)}ye+=we,Fe+=Qe}R.Ma+=de}else alert("todo:EmitRescaledRowsYUVA");r(R.Ma<=te.height)}}R.C=H,r(R.C<=R.i)}function Lr(R){var H;if(0<R.ua)return 0;for(H=0;H<R.Wb;++H){var te=R.Ya[H].G,oe=R.Ya[H].H;if(0<te[1][oe[1]+0].g||0<te[2][oe[2]+0].g||0<te[3][oe[3]+0].g)return 0}return 1}function Nr(R,H,te,oe,ue,de){if(R.Z!=0){var ge=R.qd,ye=R.rd;for(r(Gi[R.Z]!=null);H<te;++H)Gi[R.Z](ge,ye,oe,ue,oe,ue,de),ge=oe,ye=ue,ue+=de;R.qd=ge,R.rd=ye}}function Wn(R,H){var te=R.l.ma,oe=te.Z==0||te.Z==1?R.l.j:R.C;if(oe=R.C<oe?oe:R.C,r(H<=R.l.o),H>oe){var ue=R.l.width,de=te.ca,ge=te.tb+ue*oe,ye=R.V,we=R.Ba+R.c*oe,Pe=R.gc;r(R.ab==1),r(Pe[0].hc==3),As(Pe[0],oe,H,ye,we,de,ge),Nr(te,oe,H,de,ge,ue)}R.C=R.Ma=H}function en(R,H,te,oe,ue,de,ge){var ye=R.$/oe,we=R.$%oe,Pe=R.m,Fe=R.s,Qe=te+R.$,Ye=Qe;ue=te+oe*ue;var We=te+oe*de,yt=280+Fe.ua,lt=R.Pb?ye:16777216,Me=0<Fe.ua?Fe.Wa:null,qe=Fe.wc,Ge=Qe<We?Yt(Fe,we,ye):null;r(R.C<de),r(We<=ue);var ct=!1;e:for(;;){for(;ct||Qe<We;){var pt=0;if(ye>=lt){var Gt=Qe-te;r((lt=R).Pb),lt.wd=lt.m,lt.xd=Gt,0<lt.s.ua&&xe(lt.s.Wa,lt.s.vb),lt=ye+Vu}if(we&qe||(Ge=Yt(Fe,we,ye)),r(Ge!=null),Ge.Qb&&(H[Qe]=Ge.qb,ct=!0),!ct)if(Q(Pe),Ge.jc){pt=Pe,Gt=H;var jt=Qe,ar=Ge.pd[D(pt)&rn-1];r(Ge.jc),256>ar.g?(ne(pt,pt.u+ar.g),Gt[jt]=ar.value,pt=0):(ne(pt,pt.u+ar.g-256),r(256<=ar.value),pt=ar.value),pt==0&&(ct=!0)}else pt=Ft(Ge.G[0],Ge.H[0],Pe);if(Pe.h)break;if(ct||256>pt){if(!ct)if(Ge.nd)H[Qe]=(Ge.qb|pt<<8)>>>0;else{if(Q(Pe),ct=Ft(Ge.G[1],Ge.H[1],Pe),Q(Pe),Gt=Ft(Ge.G[2],Ge.H[2],Pe),jt=Ft(Ge.G[3],Ge.H[3],Pe),Pe.h)break;H[Qe]=(jt<<24|ct<<16|pt<<8|Gt)>>>0}if(ct=!1,++Qe,++we>=oe&&(we=0,++ye,ge!=null&&ye<=de&&!(ye%16)&&ge(R,ye),Me!=null))for(;Ye<Qe;)pt=H[Ye++],Me.X[(506832829*pt&4294967295)>>>Me.Mb]=pt}else if(280>pt){if(pt=xt(pt-256,Pe),Gt=Ft(Ge.G[4],Ge.H[4],Pe),Q(Pe),Gt=kt(oe,Gt=xt(Gt,Pe)),Pe.h)break;if(Qe-te<Gt||ue-Qe<pt)break e;for(jt=0;jt<pt;++jt)H[Qe+jt]=H[Qe+jt-Gt];for(Qe+=pt,we+=pt;we>=oe;)we-=oe,++ye,ge!=null&&ye<=de&&!(ye%16)&&ge(R,ye);if(r(Qe<=ue),we&qe&&(Ge=Yt(Fe,we,ye)),Me!=null)for(;Ye<Qe;)pt=H[Ye++],Me.X[(506832829*pt&4294967295)>>>Me.Mb]=pt}else{if(!(pt<yt))break e;for(ct=pt-280,r(Me!=null);Ye<Qe;)pt=H[Ye++],Me.X[(506832829*pt&4294967295)>>>Me.Mb]=pt;pt=Qe,r(!(ct>>>(Gt=Me).Xa)),H[pt]=Gt.X[ct],ct=!0}ct||r(Pe.h==K(Pe))}if(R.Pb&&Pe.h&&Qe<ue)r(R.m.h),R.a=5,R.m=R.wd,R.$=R.xd,0<R.s.ua&&xe(R.s.vb,R.s.Wa);else{if(Pe.h)break e;ge!=null&&ge(R,ye>de?de:ye),R.a=0,R.$=Qe-te}return 1}return R.a=3,0}function Qn(R){r(R!=null),R.vc=null,R.yc=null,R.Ya=null;var H=R.Wa;H!=null&&(H.X=null),R.vb=null,r(R!=null)}function _i(){var R=new za;return R==null?null:(R.a=0,R.xb=gu,He("Predictor","VP8LPredictors"),He("Predictor","VP8LPredictors_C"),He("PredictorAdd","VP8LPredictorsAdd"),He("PredictorAdd","VP8LPredictorsAdd_C"),Hu=wt,Jo=mt,li=nt,qi=qt,es=At,$r=Ht,fo=zt,M.VP8LMapColor32b=Bi,M.VP8LMapColor8b=Co,R)}function Ni(R,H,te,oe,ue){var de=1,ge=[R],ye=[H],we=oe.m,Pe=oe.s,Fe=null,Qe=0;e:for(;;){if(te)for(;de&&V(we,1);){var Ye=ge,We=ye,yt=oe,lt=1,Me=yt.m,qe=yt.gc[yt.ab],Ge=V(Me,2);if(yt.Oc&1<<Ge)de=0;else{switch(yt.Oc|=1<<Ge,qe.hc=Ge,qe.Ea=Ye[0],qe.nc=We[0],qe.K=[null],++yt.ab,r(4>=yt.ab),Ge){case 0:case 1:qe.b=V(Me,3)+2,lt=Ni(be(qe.Ea,qe.b),be(qe.nc,qe.b),0,yt,qe.K),qe.K=qe.K[0];break;case 3:var ct,pt=V(Me,8)+1,Gt=16<pt?0:4<pt?1:2<pt?2:3;if(Ye[0]=be(qe.Ea,Gt),qe.b=Gt,ct=lt=Ni(pt,1,0,yt,qe.K)){var jt,ar=pt,Mt=qe,Fr=1<<(8>>Mt.b),qr=i(Fr);if(qr==null)ct=0;else{var Rr=Mt.K[0],yr=Mt.w;for(qr[0]=Mt.K[0][0],jt=1;jt<1*ar;++jt)qr[jt]=Ae(Rr[yr+jt],qr[jt-1]);for(;jt<4*Fr;++jt)qr[jt]=0;Mt.K[0]=null,Mt.K[0]=qr,ct=1}}lt=ct;break;case 2:break;default:r(0)}de=lt}}if(ge=ge[0],ye=ye[0],de&&V(we,1)&&!(de=1<=(Qe=V(we,4))&&11>=Qe)){oe.a=3;break e}var Xr;if(Xr=de)t:{var Qr,Qt,zr,Ln=oe,Dn=ge,ci=ye,xr=Qe,Vi=te,En=Ln.m,Bn=Ln.s,fi=[null],Oi=1,ga=0,Ya=lf[xr];r:for(;;){if(Vi&&V(En,1)){var yn=V(En,3)+2,qn=be(Dn,yn),oa=be(ci,yn),Do=qn*oa;if(!Ni(qn,oa,0,Ln,fi))break r;for(fi=fi[0],Bn.xc=yn,Qr=0;Qr<Do;++Qr){var vo=fi[Qr]>>8&65535;fi[Qr]=vo,vo>=Oi&&(Oi=vo+1)}}if(En.h)break r;for(Qt=0;5>Qt;++Qt){var Dr=nl[Qt];!Qt&&0<xr&&(Dr+=1<<xr),ga<Dr&&(ga=Dr)}var mo=o(Oi*Ya,L),yu=Oi,Xu=o(yu,N);if(Xu==null)var Xa=null;else r(65536>=yu),Xa=Xu;var Aa=i(ga);if(Xa==null||Aa==null||mo==null){Ln.a=1;break r}var kl=mo;for(Qr=zr=0;Qr<Oi;++Qr){var va=Xa[Qr],Bo=va.G,vn=va.H,vr=0,Jr=1,Pn=0;for(Qt=0;5>Qt;++Qt){Dr=nl[Qt],Bo[Qt]=kl,vn[Qt]=zr,!Qt&&0<xr&&(Dr+=1<<xr);i:{var Nn,ti=Dr,qo=Ln,fn=Aa,bu=kl,Ns=zr,hn=0,Ka=qo.m,Ll=V(Ka,1);if(a(fn,0,0,ti),Ll){var sa=V(Ka,1)+1,wu=V(Ka,1),_u=V(Ka,wu==0?1:8);fn[_u]=1,sa==2&&(fn[_u=V(Ka,8)]=1);var Ai=1}else{var on=i(19),zn=V(Ka,4)+4;if(19<zn){qo.a=3;var Un=0;break i}for(Nn=0;Nn<zn;++Nn)on[Bh[Nn]]=V(Ka,3);var Za=void 0,yo=void 0,Qa=qo,Sc=on,Hn=ti,Su=fn,al=0,Ja=Qa.m,bn=8,hi=o(128,L);n:for(;x(hi,0,7,Sc,19);){if(V(Ja,1)){var la=2+2*V(Ja,3);if((Za=2+V(Ja,la))>Hn)break n}else Za=Hn;for(yo=0;yo<Hn&&Za--;){Q(Ja);var Wi=hi[0+(127&D(Ja))];ne(Ja,Ja.u+Wi.g);var Ts=Wi.value;if(16>Ts)Su[yo++]=Ts,Ts!=0&&(bn=Ts);else{var xc=Ts==16,Ku=Ts-16,$f=yc[Ku],os=V(Ja,pu[Ku])+$f;if(yo+os>Hn)break n;for(var ff=xc?bn:0;0<os--;)Su[yo++]=ff}}al=1;break n}al||(Qa.a=3),Ai=al}(Ai=Ai&&!Ka.h)&&(hn=x(bu,Ns,8,fn,ti)),Ai&&hn!=0?Un=hn:(qo.a=3,Un=0)}if(Un==0)break r;if(Jr&&qf[Qt]==1&&(Jr=kl[zr].g==0),vr+=kl[zr].g,zr+=Un,3>=Qt){var Nl,xu=Aa[0];for(Nl=1;Nl<Dr;++Nl)Aa[Nl]>xu&&(xu=Aa[Nl]);Pn+=xu}}if(va.nd=Jr,va.Qb=0,Jr&&(va.qb=(Bo[3][vn[3]+0].value<<24|Bo[1][vn[1]+0].value<<16|Bo[2][vn[2]+0].value)>>>0,vr==0&&256>Bo[0][vn[0]+0].value&&(va.Qb=1,va.qb+=Bo[0][vn[0]+0].value<<8)),va.jc=!va.Qb&&6>Pn,va.jc){var zo,Ca=va;for(zo=0;zo<rn;++zo){var ss=zo,eo=Ca.pd[ss],ls=Ca.G[0][Ca.H[0]+ss];256<=ls.value?(eo.g=ls.g+256,eo.value=ls.value):(eo.g=0,eo.value=0,ss>>=Ut(ls,8,eo),ss>>=Ut(Ca.G[1][Ca.H[1]+ss],16,eo),ss>>=Ut(Ca.G[2][Ca.H[2]+ss],0,eo),Ut(Ca.G[3][Ca.H[3]+ss],24,eo))}}}Bn.vc=fi,Bn.Wb=Oi,Bn.Ya=Xa,Bn.yc=mo,Xr=1;break t}Xr=0}if(!(de=Xr)){oe.a=3;break e}if(0<Qe){if(Pe.ua=1<<Qe,!Ne(Pe.Wa,Qe)){oe.a=1,de=0;break e}}else Pe.ua=0;var Ec=oe,Pc=ge,hf=ye,Zu=Ec.s,us=Zu.xc;if(Ec.c=Pc,Ec.i=hf,Zu.md=be(Pc,us),Zu.wc=us==0?-1:(1<<us)-1,te){oe.xb=po;break e}if((Fe=i(ge*ye))==null){oe.a=1,de=0;break e}de=(de=en(oe,Fe,0,ge,ye,ye,null))&&!we.h;break e}return de?(ue!=null?ue[0]=Fe:(r(Fe==null),r(te)),oe.$=0,te||Qn(Pe)):Qn(Pe),de}function Si(R,H){var te=R.c*R.i,oe=te+H+16*H;return r(R.c<=H),R.V=i(oe),R.V==null?(R.Ta=null,R.Ua=0,R.a=1,0):(R.Ta=R.V,R.Ua=R.Ba+te+H,1)}function fa(R,H){var te=R.C,oe=H-te,ue=R.V,de=R.Ba+R.c*te;for(r(H<=R.l.o);0<oe;){var ge=16<oe?16:oe,ye=R.l.ma,we=R.l.width,Pe=we*ge,Fe=ye.ca,Qe=ye.tb+we*te,Ye=R.Ta,We=R.Ua;_r(R,ge,ue,de),Fn(Ye,We,Fe,Qe,Pe),Nr(ye,te,te+ge,Fe,Qe,we),oe-=ge,ue+=ge*R.c,te+=ge}r(te==H),R.C=R.Ma=H}function ws(){this.ub=this.yd=this.td=this.Rb=0}function Vo(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function tu(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function vc(){this.Yb=function(){var R=[];return function H(te,oe,ue){for(var de=ue[oe],ge=0;ge<de&&(te.push(ue.length>oe+1?[]:0),!(ue.length<oe+1));ge++)H(te[ge],oe+1,ue)}(R,0,[3,11]),R}()}function Mn(){this.jb=i(3),this.Wc=l([4,8],vc),this.Xc=l([4,17],vc)}function Bu(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function oo(){this.ld=this.La=this.dd=this.tc=0}function dl(){this.Na=this.la=0}function Hs(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qu(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ru(){this.uc=this.M=this.Nb=0,this.wa=Array(new oo),this.Y=0,this.ya=Array(new qu),this.aa=0,this.l=new Kr}function so(){this.y=i(16),this.f=i(8),this.ea=i(8)}function pi(){this.cb=this.a=0,this.sc="",this.m=new G,this.Od=new ws,this.Kc=new Vo,this.ed=new Bu,this.Qa=new tu,this.Ic=this.$c=this.Aa=0,this.D=new ru,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,G),this.ia=0,this.pb=o(4,Hs),this.Pa=new Mn,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new so),this.Hd=0,this.rb=Array(new dl),this.sb=0,this.wa=Array(new oo),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new qu),this.L=this.aa=0,this.gd=l([4,2],oo),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Kr(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ar(){var R=new pi;return R!=null&&(R.a=0,R.sc="OK",R.cb=0,R.Xb=0,Ol||(Ol=Ia)),R}function ln(R,H,te){return R.a==0&&(R.a=H,R.sc=te,R.cb=0),0}function gi(R,H,te){return 3<=te&&R[H+0]==157&&R[H+1]==1&&R[H+2]==42}function Ti(R,H){if(R==null)return 0;if(R.a=0,R.sc="OK",H==null)return ln(R,2,"null VP8Io passed to VP8GetHeaders()");var te=H.data,oe=H.w,ue=H.ha;if(4>ue)return ln(R,7,"Truncated header.");var de=te[oe+0]|te[oe+1]<<8|te[oe+2]<<16,ge=R.Od;if(ge.Rb=!(1&de),ge.td=de>>1&7,ge.yd=de>>4&1,ge.ub=de>>5,3<ge.td)return ln(R,3,"Incorrect keyframe parameters.");if(!ge.yd)return ln(R,4,"Frame not displayable.");oe+=3,ue-=3;var ye=R.Kc;if(ge.Rb){if(7>ue)return ln(R,7,"cannot parse picture header");if(!gi(te,oe,ue))return ln(R,3,"Bad code word");ye.c=16383&(te[oe+4]<<8|te[oe+3]),ye.Td=te[oe+4]>>6,ye.i=16383&(te[oe+6]<<8|te[oe+5]),ye.Ud=te[oe+6]>>6,oe+=7,ue-=7,R.za=ye.c+15>>4,R.Ub=ye.i+15>>4,H.width=ye.c,H.height=ye.i,H.Da=0,H.j=0,H.v=0,H.va=H.width,H.o=H.height,H.da=0,H.ib=H.width,H.hb=H.height,H.U=H.width,H.T=H.height,a((de=R.Pa).jb,0,255,de.jb.length),r((de=R.Qa)!=null),de.Cb=0,de.Bb=0,de.Fb=1,a(de.Zb,0,0,de.Zb.length),a(de.Lb,0,0,de.Lb)}if(ge.ub>ue)return ln(R,7,"bad partition length");F(de=R.m,te,oe,ge.ub),oe+=ge.ub,ue-=ge.ub,ge.Rb&&(ye.Ld=ae(de),ye.Kd=ae(de)),ye=R.Qa;var we,Pe=R.Pa;if(r(de!=null),r(ye!=null),ye.Cb=ae(de),ye.Cb){if(ye.Bb=ae(de),ae(de)){for(ye.Fb=ae(de),we=0;4>we;++we)ye.Zb[we]=ae(de)?W(de,7):0;for(we=0;4>we;++we)ye.Lb[we]=ae(de)?W(de,6):0}if(ye.Bb)for(we=0;3>we;++we)Pe.jb[we]=ae(de)?U(de,8):255}else ye.Bb=0;if(de.Ka)return ln(R,3,"cannot parse segment header");if((ye=R.ed).zd=ae(de),ye.Tb=U(de,6),ye.wb=U(de,3),ye.Pc=ae(de),ye.Pc&&ae(de)){for(Pe=0;4>Pe;++Pe)ae(de)&&(ye.vd[Pe]=W(de,6));for(Pe=0;4>Pe;++Pe)ae(de)&&(ye.od[Pe]=W(de,6))}if(R.L=ye.Tb==0?0:ye.zd?1:2,de.Ka)return ln(R,3,"cannot parse filter header");var Fe=ue;if(ue=we=oe,oe=we+Fe,ye=Fe,R.Xb=(1<<U(R.m,2))-1,Fe<3*(Pe=R.Xb))te=7;else{for(we+=3*Pe,ye-=3*Pe,Fe=0;Fe<Pe;++Fe){var Qe=te[ue+0]|te[ue+1]<<8|te[ue+2]<<16;Qe>ye&&(Qe=ye),F(R.Jc[+Fe],te,we,Qe),we+=Qe,ye-=Qe,ue+=3}F(R.Jc[+Pe],te,we,ye),te=we<oe?0:5}if(te!=0)return ln(R,te,"cannot parse partitions");for(te=U(we=R.m,7),ue=ae(we)?W(we,4):0,oe=ae(we)?W(we,4):0,ye=ae(we)?W(we,4):0,Pe=ae(we)?W(we,4):0,we=ae(we)?W(we,4):0,Fe=R.Qa,Qe=0;4>Qe;++Qe){if(Fe.Cb){var Ye=Fe.Zb[Qe];Fe.Fb||(Ye+=te)}else{if(0<Qe){R.pb[Qe]=R.pb[0];continue}Ye=te}var We=R.pb[Qe];We.Sc[0]=ks[Ea(Ye+ue,127)],We.Sc[1]=Wu[Ea(Ye+0,127)],We.Eb[0]=2*ks[Ea(Ye+oe,127)],We.Eb[1]=101581*Wu[Ea(Ye+ye,127)]>>16,8>We.Eb[1]&&(We.Eb[1]=8),We.Qc[0]=ks[Ea(Ye+Pe,117)],We.Qc[1]=Wu[Ea(Ye+we,127)],We.lc=Ye+we}if(!ge.Rb)return ln(R,4,"Not a key frame.");for(ae(de),ge=R.Pa,te=0;4>te;++te){for(ue=0;8>ue;++ue)for(oe=0;3>oe;++oe)for(ye=0;11>ye;++ye)Pe=se(de,Hf[te][ue][oe][ye])?U(de,8):$u[te][ue][oe][ye],ge.Wc[te][ue].Yb[oe][ye]=Pe;for(ue=0;17>ue;++ue)ge.Xc[te][ue]=ge.Wc[te][wc[ue]]}return R.kc=ae(de),R.kc&&(R.Bd=U(de,8)),R.cb=1}function Ia(R,H,te,oe,ue,de,ge){var ye=H[ue].Yb[te];for(te=0;16>ue;++ue){if(!se(R,ye[te+0]))return ue;for(;!se(R,ye[te+1]);)if(ye=H[++ue].Yb[0],te=0,ue==16)return 16;var we=H[ue+1].Yb;if(se(R,ye[te+2])){var Pe=R,Fe=0;if(se(Pe,(Ye=ye)[(Qe=te)+3]))if(se(Pe,Ye[Qe+6])){for(ye=0,Qe=2*(Fe=se(Pe,Ye[Qe+8]))+(Ye=se(Pe,Ye[Qe+9+Fe])),Fe=0,Ye=uf[Qe];Ye[ye];++ye)Fe+=Fe+se(Pe,Ye[ye]);Fe+=3+(8<<Qe)}else se(Pe,Ye[Qe+7])?(Fe=7+2*se(Pe,165),Fe+=se(Pe,145)):Fe=5+se(Pe,159);else Fe=se(Pe,Ye[Qe+4])?3+se(Pe,Ye[Qe+5]):2;ye=we[2]}else Fe=1,ye=we[1];we=ge+$a[ue],0>(Pe=R).b&&ee(Pe);var Qe,Ye=Pe.b,We=(Qe=Pe.Ca>>1)-(Pe.I>>Ye)>>31;--Pe.b,Pe.Ca+=We,Pe.Ca|=1,Pe.I-=(Qe+1&We)<<Ye,de[we]=((Fe^We)-We)*oe[(0<ue)+0]}return 16}function ja(R){var H=R.rb[R.sb-1];H.la=0,H.Na=0,a(R.zc,0,0,R.zc.length),R.ja=0}function ii(R,H){if(R==null)return 0;if(H==null)return ln(R,2,"NULL VP8Io parameter in VP8Decode().");if(!R.cb&&!Ti(R,H))return 0;if(r(R.cb),H.ac==null||H.ac(H)){H.ob&&(R.L=0);var te=is[R.L];if(R.L==2?(R.yb=0,R.zb=0):(R.yb=H.v-te>>4,R.zb=H.j-te>>4,0>R.yb&&(R.yb=0),0>R.zb&&(R.zb=0)),R.Va=H.o+15+te>>4,R.Hb=H.va+15+te>>4,R.Hb>R.za&&(R.Hb=R.za),R.Va>R.Ub&&(R.Va=R.Ub),0<R.L){var oe=R.ed;for(te=0;4>te;++te){var ue;if(R.Qa.Cb){var de=R.Qa.Lb[te];R.Qa.Fb||(de+=oe.Tb)}else de=oe.Tb;for(ue=0;1>=ue;++ue){var ge=R.gd[te][ue],ye=de;if(oe.Pc&&(ye+=oe.vd[0],ue&&(ye+=oe.od[0])),0<(ye=0>ye?0:63<ye?63:ye)){var we=ye;0<oe.wb&&(we=4<oe.wb?we>>2:we>>1)>9-oe.wb&&(we=9-oe.wb),1>we&&(we=1),ge.dd=we,ge.tc=2*ye+we,ge.ld=40<=ye?2:15<=ye?1:0}else ge.tc=0;ge.La=ue}}}te=0}else ln(R,6,"Frame setup failed"),te=R.a;if(te=te==0){if(te){R.$c=0,0<R.Aa||(R.Ic=as);e:{te=R.Ic,oe=4*(we=R.za);var Pe=32*we,Fe=we+1,Qe=0<R.L?we*(0<R.Aa?2:1):0,Ye=(R.Aa==2?2:1)*we;if((ge=oe+832+(ue=3*(16*te+is[R.L])/2*Pe)+(de=R.Fa!=null&&0<R.Fa.length?R.Kc.c*R.Kc.i:0))!=ge)te=0;else{if(ge>R.Vb){if(R.Vb=0,R.Ec=i(ge),R.Fc=0,R.Ec==null){te=ln(R,1,"no memory during frame initialization.");break e}R.Vb=ge}ge=R.Ec,ye=R.Fc,R.Ac=ge,R.Bc=ye,ye+=oe,R.Gd=o(Pe,so),R.Hd=0,R.rb=o(Fe+1,dl),R.sb=1,R.wa=Qe?o(Qe,oo):null,R.Y=0,R.D.Nb=0,R.D.wa=R.wa,R.D.Y=R.Y,0<R.Aa&&(R.D.Y+=we),r(!0),R.oc=ge,R.pc=ye,ye+=832,R.ya=o(Ye,qu),R.aa=0,R.D.ya=R.ya,R.D.aa=R.aa,R.Aa==2&&(R.D.aa+=we),R.R=16*we,R.B=8*we,we=(Pe=is[R.L])*R.R,Pe=Pe/2*R.B,R.sa=ge,R.ta=ye+we,R.qa=R.sa,R.ra=R.ta+16*te*R.R+Pe,R.Ha=R.qa,R.Ia=R.ra+8*te*R.B+Pe,R.$c=0,ye+=ue,R.mb=de?ge:null,R.nb=de?ye:null,r(ye+de<=R.Fc+R.Vb),ja(R),a(R.Ac,R.Bc,0,oe),te=1}}if(te){if(H.ka=0,H.y=R.sa,H.O=R.ta,H.f=R.qa,H.N=R.ra,H.ea=R.Ha,H.Vd=R.Ia,H.fa=R.R,H.Rc=R.B,H.F=null,H.J=0,!cu){for(te=-255;255>=te;++te)ei[255+te]=0>te?-te:te;for(te=-1020;1020>=te;++te)Io[1020+te]=-128>te?-128:127<te?127:te;for(te=-112;112>=te;++te)_l[112+te]=-16>te?-16:15<te?15:te;for(te=-255;510>=te;++te)rl[255+te]=0>te?0:255<te?255:te;cu=1}tl=Ir,ko=da,Lo=Gs,Yn=af,Tr=iu,jr=nu,xn=Fi,Xn=_n,ts=qa,No=lu,To=ea,Va=ta,kn=Os,ho=Ks,Ro=oi,Mo=Ii,zi=ji,un=vl,Hi[0]=Oo,Hi[1]=Vs,Hi[2]=$s,Hi[3]=lo,Hi[4]=zu,Hi[5]=In,Hi[6]=Ys,Hi[7]=Xs,Hi[8]=ou,Hi[9]=au,Ui[0]=Es,Ui[1]=mc,Ui[2]=$o,Ui[3]=Ss,Ui[4]=gn,Ui[5]=Yo,Ui[6]=Fa,na[0]=Da,na[1]=Ws,na[2]=of,na[3]=uo,na[4]=Mi,na[5]=su,na[6]=Ba,te=1}else te=0}te&&(te=function(We,yt){for(We.M=0;We.M<We.Va;++We.M){var lt,Me=We.Jc[We.M&We.Xb],qe=We.m,Ge=We;for(lt=0;lt<Ge.za;++lt){var ct=qe,pt=Ge,Gt=pt.Ac,jt=pt.Bc+4*lt,ar=pt.zc,Mt=pt.ya[pt.aa+lt];if(pt.Qa.Bb?Mt.$b=se(ct,pt.Pa.jb[0])?2+se(ct,pt.Pa.jb[2]):se(ct,pt.Pa.jb[1]):Mt.$b=0,pt.kc&&(Mt.Ad=se(ct,pt.Bd)),Mt.Za=!se(ct,145)+0,Mt.Za){var Fr=Mt.Ob,qr=0;for(pt=0;4>pt;++pt){var Rr,yr=ar[0+pt];for(Rr=0;4>Rr;++Rr){yr=Uf[Gt[jt+Rr]][yr];for(var Xr=bc[se(ct,yr[0])];0<Xr;)Xr=bc[2*Xr+se(ct,yr[Xr])];yr=-Xr,Gt[jt+Rr]=yr}n(Fr,qr,Gt,jt,4),qr+=4,ar[0+pt]=yr}}else yr=se(ct,156)?se(ct,128)?1:3:se(ct,163)?2:0,Mt.Ob[0]=yr,a(Gt,jt,yr,4),a(ar,0,yr,4);Mt.Dd=se(ct,142)?se(ct,114)?se(ct,183)?1:3:2:0}if(Ge.m.Ka)return ln(We,7,"Premature end-of-partition0 encountered.");for(;We.ja<We.za;++We.ja){if(Ge=Me,ct=(qe=We).rb[qe.sb-1],Gt=qe.rb[qe.sb+qe.ja],lt=qe.ya[qe.aa+qe.ja],jt=qe.kc?lt.Ad:0)ct.la=Gt.la=0,lt.Za||(ct.Na=Gt.Na=0),lt.Hc=0,lt.Gc=0,lt.ia=0;else{var Qr,Qt;if(ct=Gt,Gt=Ge,jt=qe.Pa.Xc,ar=qe.ya[qe.aa+qe.ja],Mt=qe.pb[ar.$b],pt=ar.ad,Fr=0,qr=qe.rb[qe.sb-1],yr=Rr=0,a(pt,Fr,0,384),ar.Za)var zr=0,Ln=jt[3];else{Xr=i(16);var Dn=ct.Na+qr.Na;if(Dn=Ol(Gt,jt[1],Dn,Mt.Eb,0,Xr,0),ct.Na=qr.Na=(0<Dn)+0,1<Dn)tl(Xr,0,pt,Fr);else{var ci=Xr[0]+3>>3;for(Xr=0;256>Xr;Xr+=16)pt[Fr+Xr]=ci}zr=1,Ln=jt[0]}var xr=15&ct.la,Vi=15&qr.la;for(Xr=0;4>Xr;++Xr){var En=1&Vi;for(ci=Qt=0;4>ci;++ci)xr=xr>>1|(En=(Dn=Ol(Gt,Ln,Dn=En+(1&xr),Mt.Sc,zr,pt,Fr))>zr)<<7,Qt=Qt<<2|(3<Dn?3:1<Dn?2:pt[Fr+0]!=0),Fr+=16;xr>>=4,Vi=Vi>>1|En<<7,Rr=(Rr<<8|Qt)>>>0}for(Ln=xr,zr=Vi>>4,Qr=0;4>Qr;Qr+=2){for(Qt=0,xr=ct.la>>4+Qr,Vi=qr.la>>4+Qr,Xr=0;2>Xr;++Xr){for(En=1&Vi,ci=0;2>ci;++ci)Dn=En+(1&xr),xr=xr>>1|(En=0<(Dn=Ol(Gt,jt[2],Dn,Mt.Qc,0,pt,Fr)))<<3,Qt=Qt<<2|(3<Dn?3:1<Dn?2:pt[Fr+0]!=0),Fr+=16;xr>>=2,Vi=Vi>>1|En<<5}yr|=Qt<<4*Qr,Ln|=xr<<4<<Qr,zr|=(240&Vi)<<Qr}ct.la=Ln,qr.la=zr,ar.Hc=Rr,ar.Gc=yr,ar.ia=43690&yr?0:Mt.ia,jt=!(Rr|yr)}if(0<qe.L&&(qe.wa[qe.Y+qe.ja]=qe.gd[lt.$b][lt.Za],qe.wa[qe.Y+qe.ja].La|=!jt),Ge.Ka)return ln(We,7,"Premature end-of-file encountered.")}if(ja(We),qe=yt,Ge=1,lt=(Me=We).D,ct=0<Me.L&&Me.M>=Me.zb&&Me.M<=Me.Va,Me.Aa==0)e:{if(lt.M=Me.M,lt.uc=ct,Di(Me,lt),Ge=1,lt=(Qt=Me.D).Nb,ct=(yr=is[Me.L])*Me.R,Gt=yr/2*Me.B,Xr=16*lt*Me.R,ci=8*lt*Me.B,jt=Me.sa,ar=Me.ta-ct+Xr,Mt=Me.qa,pt=Me.ra-Gt+ci,Fr=Me.Ha,qr=Me.Ia-Gt+ci,Vi=(xr=Qt.M)==0,Rr=xr>=Me.Va-1,Me.Aa==2&&Di(Me,Qt),Qt.uc)for(En=(Dn=Me).D.M,r(Dn.D.uc),Qt=Dn.yb;Qt<Dn.Hb;++Qt){zr=Qt,Ln=En;var Bn=(fi=(Dr=Dn).D).Nb;Qr=Dr.R;var fi=fi.wa[fi.Y+zr],Oi=Dr.sa,ga=Dr.ta+16*Bn*Qr+16*zr,Ya=fi.dd,yn=fi.tc;if(yn!=0)if(r(3<=yn),Dr.L==1)0<zr&&Mo(Oi,ga,Qr,yn+4),fi.La&&un(Oi,ga,Qr,yn),0<Ln&&Ro(Oi,ga,Qr,yn+4),fi.La&&zi(Oi,ga,Qr,yn);else{var qn=Dr.B,oa=Dr.qa,Do=Dr.ra+8*Bn*qn+8*zr,vo=Dr.Ha,Dr=Dr.Ia+8*Bn*qn+8*zr;Bn=fi.ld,0<zr&&(Xn(Oi,ga,Qr,yn+4,Ya,Bn),No(oa,Do,vo,Dr,qn,yn+4,Ya,Bn)),fi.La&&(Va(Oi,ga,Qr,yn,Ya,Bn),ho(oa,Do,vo,Dr,qn,yn,Ya,Bn)),0<Ln&&(xn(Oi,ga,Qr,yn+4,Ya,Bn),ts(oa,Do,vo,Dr,qn,yn+4,Ya,Bn)),fi.La&&(To(Oi,ga,Qr,yn,Ya,Bn),kn(oa,Do,vo,Dr,qn,yn,Ya,Bn))}}if(Me.ia&&alert("todo:DitherRow"),qe.put!=null){if(Qt=16*xr,xr=16*(xr+1),Vi?(qe.y=Me.sa,qe.O=Me.ta+Xr,qe.f=Me.qa,qe.N=Me.ra+ci,qe.ea=Me.Ha,qe.W=Me.Ia+ci):(Qt-=yr,qe.y=jt,qe.O=ar,qe.f=Mt,qe.N=pt,qe.ea=Fr,qe.W=qr),Rr||(xr-=yr),xr>qe.o&&(xr=qe.o),qe.F=null,qe.J=null,Me.Fa!=null&&0<Me.Fa.length&&Qt<xr&&(qe.J=uu(Me,qe,Qt,xr-Qt),qe.F=Me.mb,qe.F==null&&qe.F.length==0)){Ge=ln(Me,3,"Could not decode alpha data.");break e}Qt<qe.j&&(yr=qe.j-Qt,Qt=qe.j,r(!(1&yr)),qe.O+=Me.R*yr,qe.N+=Me.B*(yr>>1),qe.W+=Me.B*(yr>>1),qe.F!=null&&(qe.J+=qe.width*yr)),Qt<xr&&(qe.O+=qe.v,qe.N+=qe.v>>1,qe.W+=qe.v>>1,qe.F!=null&&(qe.J+=qe.v),qe.ka=Qt-qe.j,qe.U=qe.va-qe.v,qe.T=xr-Qt,Ge=qe.put(qe))}lt+1!=Me.Ic||Rr||(n(Me.sa,Me.ta-ct,jt,ar+16*Me.R,ct),n(Me.qa,Me.ra-Gt,Mt,pt+8*Me.B,Gt),n(Me.Ha,Me.Ia-Gt,Fr,qr+8*Me.B,Gt))}if(!Ge)return ln(We,6,"Output aborted.")}return 1}(R,H)),H.bc!=null&&H.bc(H),te&=1}return te?(R.cb=0,te):0}function Ri(R,H,te,oe,ue){ue=R[H+te+32*oe]+(ue>>3),R[H+te+32*oe]=-256&ue?0>ue?0:255:ue}function pl(R,H,te,oe,ue,de){Ri(R,H,0,te,oe+ue),Ri(R,H,1,te,oe+de),Ri(R,H,2,te,oe-de),Ri(R,H,3,te,oe-ue)}function ha(R){return(20091*R>>16)+R}function Wo(R,H,te,oe){var ue,de=0,ge=i(16);for(ue=0;4>ue;++ue){var ye=R[H+0]+R[H+8],we=R[H+0]-R[H+8],Pe=(35468*R[H+4]>>16)-ha(R[H+12]),Fe=ha(R[H+4])+(35468*R[H+12]>>16);ge[de+0]=ye+Fe,ge[de+1]=we+Pe,ge[de+2]=we-Pe,ge[de+3]=ye-Fe,de+=4,H++}for(ue=de=0;4>ue;++ue)ye=(R=ge[de+0]+4)+ge[de+8],we=R-ge[de+8],Pe=(35468*ge[de+4]>>16)-ha(ge[de+12]),Ri(te,oe,0,0,ye+(Fe=ha(ge[de+4])+(35468*ge[de+12]>>16))),Ri(te,oe,1,0,we+Pe),Ri(te,oe,2,0,we-Pe),Ri(te,oe,3,0,ye-Fe),de++,oe+=32}function nu(R,H,te,oe){var ue=R[H+0]+4,de=35468*R[H+4]>>16,ge=ha(R[H+4]),ye=35468*R[H+1]>>16;pl(te,oe,0,ue+ge,R=ha(R[H+1]),ye),pl(te,oe,1,ue+de,R,ye),pl(te,oe,2,ue-de,R,ye),pl(te,oe,3,ue-ge,R,ye)}function da(R,H,te,oe,ue){Wo(R,H,te,oe),ue&&Wo(R,H+16,te,oe+4)}function Gs(R,H,te,oe){ko(R,H+0,te,oe,1),ko(R,H+32,te,oe+128,1)}function af(R,H,te,oe){var ue;for(R=R[H+0]+4,ue=0;4>ue;++ue)for(H=0;4>H;++H)Ri(te,oe,H,ue,R)}function iu(R,H,te,oe){R[H+0]&&Yn(R,H+0,te,oe),R[H+16]&&Yn(R,H+16,te,oe+4),R[H+32]&&Yn(R,H+32,te,oe+128),R[H+48]&&Yn(R,H+48,te,oe+128+4)}function Ir(R,H,te,oe){var ue,de=i(16);for(ue=0;4>ue;++ue){var ge=R[H+0+ue]+R[H+12+ue],ye=R[H+4+ue]+R[H+8+ue],we=R[H+4+ue]-R[H+8+ue],Pe=R[H+0+ue]-R[H+12+ue];de[0+ue]=ge+ye,de[8+ue]=ge-ye,de[4+ue]=Pe+we,de[12+ue]=Pe-we}for(ue=0;4>ue;++ue)ge=(R=de[0+4*ue]+3)+de[3+4*ue],ye=de[1+4*ue]+de[2+4*ue],we=de[1+4*ue]-de[2+4*ue],Pe=R-de[3+4*ue],te[oe+0]=ge+ye>>3,te[oe+16]=Pe+we>>3,te[oe+32]=ge-ye>>3,te[oe+48]=Pe-we>>3,oe+=64}function _s(R,H,te){var oe,ue=H-32,de=bi,ge=255-R[ue-1];for(oe=0;oe<te;++oe){var ye,we=de,Pe=ge+R[H-1];for(ye=0;ye<te;++ye)R[H+ye]=we[Pe+R[ue+ye]];H+=32}}function Vs(R,H){_s(R,H,4)}function Ws(R,H){_s(R,H,8)}function mc(R,H){_s(R,H,16)}function $o(R,H){var te;for(te=0;16>te;++te)n(R,H+32*te,R,H-32,16)}function Ss(R,H){var te;for(te=16;0<te;--te)a(R,H,R[H-1],16),H+=32}function xs(R,H,te){var oe;for(oe=0;16>oe;++oe)a(H,te+32*oe,R,16)}function Es(R,H){var te,oe=16;for(te=0;16>te;++te)oe+=R[H-1+32*te]+R[H+te-32];xs(oe>>5,R,H)}function gn(R,H){var te,oe=8;for(te=0;16>te;++te)oe+=R[H-1+32*te];xs(oe>>4,R,H)}function Yo(R,H){var te,oe=8;for(te=0;16>te;++te)oe+=R[H+te-32];xs(oe>>4,R,H)}function Fa(R,H){xs(128,R,H)}function It(R,H,te){return R+2*H+te+2>>2}function $s(R,H){var te,oe=H-32;for(oe=new Uint8Array([It(R[oe-1],R[oe+0],R[oe+1]),It(R[oe+0],R[oe+1],R[oe+2]),It(R[oe+1],R[oe+2],R[oe+3]),It(R[oe+2],R[oe+3],R[oe+4])]),te=0;4>te;++te)n(R,H+32*te,oe,0,oe.length)}function lo(R,H){var te=R[H-1],oe=R[H-1+32],ue=R[H-1+64],de=R[H-1+96];ce(R,H+0,16843009*It(R[H-1-32],te,oe)),ce(R,H+32,16843009*It(te,oe,ue)),ce(R,H+64,16843009*It(oe,ue,de)),ce(R,H+96,16843009*It(ue,de,de))}function Oo(R,H){var te,oe=4;for(te=0;4>te;++te)oe+=R[H+te-32]+R[H-1+32*te];for(oe>>=3,te=0;4>te;++te)a(R,H+32*te,oe,4)}function zu(R,H){var te=R[H-1+0],oe=R[H-1+32],ue=R[H-1+64],de=R[H-1-32],ge=R[H+0-32],ye=R[H+1-32],we=R[H+2-32],Pe=R[H+3-32];R[H+0+96]=It(oe,ue,R[H-1+96]),R[H+1+96]=R[H+0+64]=It(te,oe,ue),R[H+2+96]=R[H+1+64]=R[H+0+32]=It(de,te,oe),R[H+3+96]=R[H+2+64]=R[H+1+32]=R[H+0+0]=It(ge,de,te),R[H+3+64]=R[H+2+32]=R[H+1+0]=It(ye,ge,de),R[H+3+32]=R[H+2+0]=It(we,ye,ge),R[H+3+0]=It(Pe,we,ye)}function Ys(R,H){var te=R[H+1-32],oe=R[H+2-32],ue=R[H+3-32],de=R[H+4-32],ge=R[H+5-32],ye=R[H+6-32],we=R[H+7-32];R[H+0+0]=It(R[H+0-32],te,oe),R[H+1+0]=R[H+0+32]=It(te,oe,ue),R[H+2+0]=R[H+1+32]=R[H+0+64]=It(oe,ue,de),R[H+3+0]=R[H+2+32]=R[H+1+64]=R[H+0+96]=It(ue,de,ge),R[H+3+32]=R[H+2+64]=R[H+1+96]=It(de,ge,ye),R[H+3+64]=R[H+2+96]=It(ge,ye,we),R[H+3+96]=It(ye,we,we)}function In(R,H){var te=R[H-1+0],oe=R[H-1+32],ue=R[H-1+64],de=R[H-1-32],ge=R[H+0-32],ye=R[H+1-32],we=R[H+2-32],Pe=R[H+3-32];R[H+0+0]=R[H+1+64]=de+ge+1>>1,R[H+1+0]=R[H+2+64]=ge+ye+1>>1,R[H+2+0]=R[H+3+64]=ye+we+1>>1,R[H+3+0]=we+Pe+1>>1,R[H+0+96]=It(ue,oe,te),R[H+0+64]=It(oe,te,de),R[H+0+32]=R[H+1+96]=It(te,de,ge),R[H+1+32]=R[H+2+96]=It(de,ge,ye),R[H+2+32]=R[H+3+96]=It(ge,ye,we),R[H+3+32]=It(ye,we,Pe)}function Xs(R,H){var te=R[H+0-32],oe=R[H+1-32],ue=R[H+2-32],de=R[H+3-32],ge=R[H+4-32],ye=R[H+5-32],we=R[H+6-32],Pe=R[H+7-32];R[H+0+0]=te+oe+1>>1,R[H+1+0]=R[H+0+64]=oe+ue+1>>1,R[H+2+0]=R[H+1+64]=ue+de+1>>1,R[H+3+0]=R[H+2+64]=de+ge+1>>1,R[H+0+32]=It(te,oe,ue),R[H+1+32]=R[H+0+96]=It(oe,ue,de),R[H+2+32]=R[H+1+96]=It(ue,de,ge),R[H+3+32]=R[H+2+96]=It(de,ge,ye),R[H+3+64]=It(ge,ye,we),R[H+3+96]=It(ye,we,Pe)}function au(R,H){var te=R[H-1+0],oe=R[H-1+32],ue=R[H-1+64],de=R[H-1+96];R[H+0+0]=te+oe+1>>1,R[H+2+0]=R[H+0+32]=oe+ue+1>>1,R[H+2+32]=R[H+0+64]=ue+de+1>>1,R[H+1+0]=It(te,oe,ue),R[H+3+0]=R[H+1+32]=It(oe,ue,de),R[H+3+32]=R[H+1+64]=It(ue,de,de),R[H+3+64]=R[H+2+64]=R[H+0+96]=R[H+1+96]=R[H+2+96]=R[H+3+96]=de}function ou(R,H){var te=R[H-1+0],oe=R[H-1+32],ue=R[H-1+64],de=R[H-1+96],ge=R[H-1-32],ye=R[H+0-32],we=R[H+1-32],Pe=R[H+2-32];R[H+0+0]=R[H+2+32]=te+ge+1>>1,R[H+0+32]=R[H+2+64]=oe+te+1>>1,R[H+0+64]=R[H+2+96]=ue+oe+1>>1,R[H+0+96]=de+ue+1>>1,R[H+3+0]=It(ye,we,Pe),R[H+2+0]=It(ge,ye,we),R[H+1+0]=R[H+3+32]=It(te,ge,ye),R[H+1+32]=R[H+3+64]=It(oe,te,ge),R[H+1+64]=R[H+3+96]=It(ue,oe,te),R[H+1+96]=It(de,ue,oe)}function of(R,H){var te;for(te=0;8>te;++te)n(R,H+32*te,R,H-32,8)}function uo(R,H){var te;for(te=0;8>te;++te)a(R,H,R[H-1],8),H+=32}function ai(R,H,te){var oe;for(oe=0;8>oe;++oe)a(H,te+32*oe,R,8)}function Da(R,H){var te,oe=8;for(te=0;8>te;++te)oe+=R[H+te-32]+R[H-1+32*te];ai(oe>>4,R,H)}function su(R,H){var te,oe=4;for(te=0;8>te;++te)oe+=R[H+te-32];ai(oe>>3,R,H)}function Mi(R,H){var te,oe=4;for(te=0;8>te;++te)oe+=R[H-1+32*te];ai(oe>>3,R,H)}function Ba(R,H){ai(128,R,H)}function Ao(R,H,te){var oe=R[H-te],ue=R[H+0],de=3*(ue-oe)+jo[1020+R[H-2*te]-R[H+te]],ge=Sl[112+(de+4>>3)];R[H-te]=bi[255+oe+Sl[112+(de+3>>3)]],R[H+0]=bi[255+ue-ge]}function Ps(R,H,te,oe){var ue=R[H+0],de=R[H+te];return Wa[255+R[H-2*te]-R[H-te]]>oe||Wa[255+de-ue]>oe}function gl(R,H,te,oe){return 4*Wa[255+R[H-te]-R[H+0]]+Wa[255+R[H-2*te]-R[H+te]]<=oe}function Uu(R,H,te,oe,ue){var de=R[H-3*te],ge=R[H-2*te],ye=R[H-te],we=R[H+0],Pe=R[H+te],Fe=R[H+2*te],Qe=R[H+3*te];return 4*Wa[255+ye-we]+Wa[255+ge-Pe]>oe?0:Wa[255+R[H-4*te]-de]<=ue&&Wa[255+de-ge]<=ue&&Wa[255+ge-ye]<=ue&&Wa[255+Qe-Fe]<=ue&&Wa[255+Fe-Pe]<=ue&&Wa[255+Pe-we]<=ue}function oi(R,H,te,oe){var ue=2*oe+1;for(oe=0;16>oe;++oe)gl(R,H+oe,te,ue)&&Ao(R,H+oe,te)}function Ii(R,H,te,oe){var ue=2*oe+1;for(oe=0;16>oe;++oe)gl(R,H+oe*te,1,ue)&&Ao(R,H+oe*te,1)}function ji(R,H,te,oe){var ue;for(ue=3;0<ue;--ue)oi(R,H+=4*te,te,oe)}function vl(R,H,te,oe){var ue;for(ue=3;0<ue;--ue)Ii(R,H+=4,te,oe)}function xa(R,H,te,oe,ue,de,ge,ye){for(de=2*de+1;0<ue--;){if(Uu(R,H,te,de,ge))if(Ps(R,H,te,ye))Ao(R,H,te);else{var we=R,Pe=H,Fe=te,Qe=we[Pe-2*Fe],Ye=we[Pe-Fe],We=we[Pe+0],yt=we[Pe+Fe],lt=we[Pe+2*Fe],Me=27*(Ge=jo[1020+3*(We-Ye)+jo[1020+Qe-yt]])+63>>7,qe=18*Ge+63>>7,Ge=9*Ge+63>>7;we[Pe-3*Fe]=bi[255+we[Pe-3*Fe]+Ge],we[Pe-2*Fe]=bi[255+Qe+qe],we[Pe-Fe]=bi[255+Ye+Me],we[Pe+0]=bi[255+We-Me],we[Pe+Fe]=bi[255+yt-qe],we[Pe+2*Fe]=bi[255+lt-Ge]}H+=oe}}function wn(R,H,te,oe,ue,de,ge,ye){for(de=2*de+1;0<ue--;){if(Uu(R,H,te,de,ge))if(Ps(R,H,te,ye))Ao(R,H,te);else{var we=R,Pe=H,Fe=te,Qe=we[Pe-Fe],Ye=we[Pe+0],We=we[Pe+Fe],yt=Sl[112+((lt=3*(Ye-Qe))+4>>3)],lt=Sl[112+(lt+3>>3)],Me=yt+1>>1;we[Pe-2*Fe]=bi[255+we[Pe-2*Fe]+Me],we[Pe-Fe]=bi[255+Qe+lt],we[Pe+0]=bi[255+Ye-yt],we[Pe+Fe]=bi[255+We-Me]}H+=oe}}function Fi(R,H,te,oe,ue,de){xa(R,H,te,1,16,oe,ue,de)}function _n(R,H,te,oe,ue,de){xa(R,H,1,te,16,oe,ue,de)}function ea(R,H,te,oe,ue,de){var ge;for(ge=3;0<ge;--ge)wn(R,H+=4*te,te,1,16,oe,ue,de)}function ta(R,H,te,oe,ue,de){var ge;for(ge=3;0<ge;--ge)wn(R,H+=4,1,te,16,oe,ue,de)}function qa(R,H,te,oe,ue,de,ge,ye){xa(R,H,ue,1,8,de,ge,ye),xa(te,oe,ue,1,8,de,ge,ye)}function lu(R,H,te,oe,ue,de,ge,ye){xa(R,H,1,ue,8,de,ge,ye),xa(te,oe,1,ue,8,de,ge,ye)}function Os(R,H,te,oe,ue,de,ge,ye){wn(R,H+4*ue,ue,1,8,de,ge,ye),wn(te,oe+4*ue,ue,1,8,de,ge,ye)}function Ks(R,H,te,oe,ue,de,ge,ye){wn(R,H+4,1,ue,8,de,ge,ye),wn(te,oe+4,1,ue,8,de,ge,ye)}function $n(){this.ba=new _t,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Wt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function vi(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function tn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Zs(){this.ua=0,this.Wa=new ve,this.vb=new ve,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new N,this.yc=new L}function za(){this.xb=this.a=0,this.l=new Kr,this.ca=new _t,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Zs,this.ab=0,this.gc=o(4,tn),this.Oc=0}function ml(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Kr,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Xo(R,H,te,oe,ue,de,ge){for(R=R==null?0:R[H+0],H=0;H<ge;++H)ue[de+H]=R+te[oe+H]&255,R=ue[de+H]}function yl(R,H,te,oe,ue,de,ge){var ye;if(R==null)Xo(null,null,te,oe,ue,de,ge);else for(ye=0;ye<ge;++ye)ue[de+ye]=R[H+ye]+te[oe+ye]&255}function Ko(R,H,te,oe,ue,de,ge){if(R==null)Xo(null,null,te,oe,ue,de,ge);else{var ye,we=R[H+0],Pe=we,Fe=we;for(ye=0;ye<ge;++ye)Pe=Fe+(we=R[H+ye])-Pe,Fe=te[oe+ye]+(-256&Pe?0>Pe?0:255:Pe)&255,Pe=we,ue[de+ye]=Fe}}function uu(R,H,te,oe){var ue=H.width,de=H.o;if(r(R!=null&&H!=null),0>te||0>=oe||te+oe>de)return null;if(!R.Cc){if(R.ga==null){var ge;if(R.ga=new ml,(ge=R.ga==null)||(ge=H.width*H.o,r(R.Gb.length==0),R.Gb=i(ge),R.Uc=0,R.Gb==null?ge=0:(R.mb=R.Gb,R.nb=R.Uc,R.rc=null,ge=1),ge=!ge),!ge){ge=R.ga;var ye=R.Fa,we=R.P,Pe=R.qc,Fe=R.mb,Qe=R.nb,Ye=we+1,We=Pe-1,yt=ge.l;if(r(ye!=null&&Fe!=null&&H!=null),Gi[0]=null,Gi[1]=Xo,Gi[2]=yl,Gi[3]=Ko,ge.ca=Fe,ge.tb=Qe,ge.c=H.width,ge.i=H.height,r(0<ge.c&&0<ge.i),1>=Pe)H=0;else if(ge.$a=ye[we+0]>>0&3,ge.Z=ye[we+0]>>2&3,ge.Lc=ye[we+0]>>4&3,we=ye[we+0]>>6&3,0>ge.$a||1<ge.$a||4<=ge.Z||1<ge.Lc||we)H=0;else if(yt.put=De,yt.ac=Ue,yt.bc=bt,yt.ma=ge,yt.width=H.width,yt.height=H.height,yt.Da=H.Da,yt.v=H.v,yt.va=H.va,yt.j=H.j,yt.o=H.o,ge.$a)e:{r(ge.$a==1),H=_i();t:for(;;){if(H==null){H=0;break e}if(r(ge!=null),ge.mc=H,H.c=ge.c,H.i=ge.i,H.l=ge.l,H.l.ma=ge,H.l.width=ge.c,H.l.height=ge.i,H.a=0,$(H.m,ye,Ye,We),!Ni(ge.c,ge.i,1,H,null)||(H.ab==1&&H.gc[0].hc==3&&Lr(H.s)?(ge.ic=1,ye=H.c*H.i,H.Ta=null,H.Ua=0,H.V=i(ye),H.Ba=0,H.V==null?(H.a=1,H=0):H=1):(ge.ic=0,H=Si(H,ge.c)),!H))break t;H=1;break e}ge.mc=null,H=0}else H=We>=ge.c*ge.i;ge=!H}if(ge)return null;R.ga.Lc!=1?R.Ga=0:oe=de-te}r(R.ga!=null),r(te+oe<=de);e:{if(H=(ye=R.ga).c,de=ye.l.o,ye.$a==0){if(Ye=R.rc,We=R.Vc,yt=R.Fa,we=R.P+1+te*H,Pe=R.mb,Fe=R.nb+te*H,r(we<=R.P+R.qc),ye.Z!=0)for(r(Gi[ye.Z]!=null),ge=0;ge<oe;++ge)Gi[ye.Z](Ye,We,yt,we,Pe,Fe,H),Ye=Pe,We=Fe,Fe+=H,we+=H;else for(ge=0;ge<oe;++ge)n(Pe,Fe,yt,we,H),Ye=Pe,We=Fe,Fe+=H,we+=H;R.rc=Ye,R.Vc=We}else{if(r(ye.mc!=null),H=te+oe,r((ge=ye.mc)!=null),r(H<=ge.i),ge.C>=H)H=1;else if(ye.ic||et(),ye.ic){ye=ge.V,Ye=ge.Ba,We=ge.c;var lt=ge.i,Me=(yt=1,we=ge.$/We,Pe=ge.$%We,Fe=ge.m,Qe=ge.s,ge.$),qe=We*lt,Ge=We*H,ct=Qe.wc,pt=Me<Ge?Yt(Qe,Pe,we):null;r(Me<=qe),r(H<=lt),r(Lr(Qe));t:for(;;){for(;!Fe.h&&Me<Ge;){if(Pe&ct||(pt=Yt(Qe,Pe,we)),r(pt!=null),Q(Fe),256>(lt=Ft(pt.G[0],pt.H[0],Fe)))ye[Ye+Me]=lt,++Me,++Pe>=We&&(Pe=0,++we<=H&&!(we%16)&&Wn(ge,we));else{if(!(280>lt)){yt=0;break t}lt=xt(lt-256,Fe);var Gt,jt=Ft(pt.G[4],pt.H[4],Fe);if(Q(Fe),!(Me>=(jt=kt(We,jt=xt(jt,Fe)))&&qe-Me>=lt)){yt=0;break t}for(Gt=0;Gt<lt;++Gt)ye[Ye+Me+Gt]=ye[Ye+Me+Gt-jt];for(Me+=lt,Pe+=lt;Pe>=We;)Pe-=We,++we<=H&&!(we%16)&&Wn(ge,we);Me<Ge&&Pe&ct&&(pt=Yt(Qe,Pe,we))}r(Fe.h==K(Fe))}Wn(ge,we>H?H:we);break t}!yt||Fe.h&&Me<qe?(yt=0,ge.a=Fe.h?5:3):ge.$=Me,H=yt}else H=en(ge,ge.V,ge.Ba,ge.c,ge.i,H,fa);if(!H){oe=0;break e}}te+oe>=de&&(R.Cc=1),oe=1}if(!oe)return null;if(R.Cc&&((oe=R.ga)!=null&&(oe.mc=null),R.ga=null,0<R.Ga))return alert("todo:WebPDequantizeLevels"),null}return R.nb+te*ue}function Y(R,H,te,oe,ue,de){for(;0<ue--;){var ge,ye=R,we=H+(te?1:0),Pe=R,Fe=H+(te?0:3);for(ge=0;ge<oe;++ge){var Qe=Pe[Fe+4*ge];Qe!=255&&(Qe*=32897,ye[we+4*ge+0]=ye[we+4*ge+0]*Qe>>23,ye[we+4*ge+1]=ye[we+4*ge+1]*Qe>>23,ye[we+4*ge+2]=ye[we+4*ge+2]*Qe>>23)}H+=de}}function fe(R,H,te,oe,ue){for(;0<oe--;){var de;for(de=0;de<te;++de){var ge=R[H+2*de+0],ye=15&(Pe=R[H+2*de+1]),we=4369*ye,Pe=(240&Pe|Pe>>4)*we>>16;R[H+2*de+0]=(240&ge|ge>>4)*we>>16&240|(15&ge|ge<<4)*we>>16>>4&15,R[H+2*de+1]=240&Pe|ye}H+=ue}}function Ce(R,H,te,oe,ue,de,ge,ye){var we,Pe,Fe=255;for(Pe=0;Pe<ue;++Pe){for(we=0;we<oe;++we){var Qe=R[H+we];de[ge+4*we]=Qe,Fe&=Qe}H+=te,ge+=ye}return Fe!=255}function je(R,H,te,oe,ue){var de;for(de=0;de<ue;++de)te[oe+de]=R[H+de]>>8}function et(){Ei=Y,nn=fe,Yr=Ce,Fn=je}function ft(R,H,te){M[R]=function(oe,ue,de,ge,ye,we,Pe,Fe,Qe,Ye,We,yt,lt,Me,qe,Ge,ct){var pt,Gt=ct-1>>1,jt=ye[we+0]|Pe[Fe+0]<<16,ar=Qe[Ye+0]|We[yt+0]<<16;r(oe!=null);var Mt=3*jt+ar+131074>>2;for(H(oe[ue+0],255&Mt,Mt>>16,lt,Me),de!=null&&(Mt=3*ar+jt+131074>>2,H(de[ge+0],255&Mt,Mt>>16,qe,Ge)),pt=1;pt<=Gt;++pt){var Fr=ye[we+pt]|Pe[Fe+pt]<<16,qr=Qe[Ye+pt]|We[yt+pt]<<16,Rr=jt+Fr+ar+qr+524296,yr=Rr+2*(Fr+ar)>>3;Mt=yr+jt>>1,jt=(Rr=Rr+2*(jt+qr)>>3)+Fr>>1,H(oe[ue+2*pt-1],255&Mt,Mt>>16,lt,Me+(2*pt-1)*te),H(oe[ue+2*pt-0],255&jt,jt>>16,lt,Me+(2*pt-0)*te),de!=null&&(Mt=Rr+ar>>1,jt=yr+qr>>1,H(de[ge+2*pt-1],255&Mt,Mt>>16,qe,Ge+(2*pt-1)*te),H(de[ge+2*pt+0],255&jt,jt>>16,qe,Ge+(2*pt+0)*te)),jt=Fr,ar=qr}1&ct||(Mt=3*jt+ar+131074>>2,H(oe[ue+ct-1],255&Mt,Mt>>16,lt,Me+(ct-1)*te),de!=null&&(Mt=3*ar+jt+131074>>2,H(de[ge+ct-1],255&Mt,Mt>>16,qe,Ge+(ct-1)*te)))}}function Et(){pa[xl]=Gf,pa[Fo]=Ls,pa[sf]=Vf,pa[El]=vu,pa[fu]=ui,pa[cn]=wi,pa[Gu]=_c,pa[Pl]=Ls,pa[Cs]=vu,pa[hu]=ui,pa[du]=wi}function Dt(R){return R&-16384?0>R?0:255:R>>ns}function ir(R,H){return Dt((19077*R>>8)+(26149*H>>8)-14234)}function gr(R,H,te){return Dt((19077*R>>8)-(6419*H>>8)-(13320*te>>8)+8708)}function dr(R,H){return Dt((19077*R>>8)+(33050*H>>8)-17685)}function Sr(R,H,te,oe,ue){oe[ue+0]=ir(R,te),oe[ue+1]=gr(R,H,te),oe[ue+2]=dr(R,H)}function Cn(R,H,te,oe,ue){oe[ue+0]=dr(R,H),oe[ue+1]=gr(R,H,te),oe[ue+2]=ir(R,te)}function Sn(R,H,te,oe,ue){var de=gr(R,H,te);H=de<<3&224|dr(R,H)>>3,oe[ue+0]=248&ir(R,te)|de>>5,oe[ue+1]=H}function jn(R,H,te,oe,ue){var de=240&dr(R,H)|15;oe[ue+0]=240&ir(R,te)|gr(R,H,te)>>4,oe[ue+1]=de}function Jn(R,H,te,oe,ue){oe[ue+0]=255,Sr(R,H,te,oe,ue+1)}function si(R,H,te,oe,ue){Cn(R,H,te,oe,ue),oe[ue+3]=255}function Ua(R,H,te,oe,ue){Sr(R,H,te,oe,ue),oe[ue+3]=255}function Ea(R,H){return 0>R?0:R>H?H:R}function Pa(R,H,te){M[R]=function(oe,ue,de,ge,ye,we,Pe,Fe,Qe){for(var Ye=Fe+(-2&Qe)*te;Fe!=Ye;)H(oe[ue+0],de[ge+0],ye[we+0],Pe,Fe),H(oe[ue+1],de[ge+0],ye[we+0],Pe,Fe+te),ue+=2,++ge,++we,Fe+=2*te;1&Qe&&H(oe[ue+0],de[ge+0],ye[we+0],Pe,Fe)}}function Zo(R,H,te){return te==0?R==0?H==0?6:5:H==0?4:0:te}function Qo(R,H,te,oe,ue){switch(R>>>30){case 3:ko(H,te,oe,ue,0);break;case 2:jr(H,te,oe,ue);break;case 1:Yn(H,te,oe,ue)}}function Di(R,H){var te,oe,ue=H.M,de=H.Nb,ge=R.oc,ye=R.pc+40,we=R.oc,Pe=R.pc+584,Fe=R.oc,Qe=R.pc+600;for(te=0;16>te;++te)ge[ye+32*te-1]=129;for(te=0;8>te;++te)we[Pe+32*te-1]=129,Fe[Qe+32*te-1]=129;for(0<ue?ge[ye-1-32]=we[Pe-1-32]=Fe[Qe-1-32]=129:(a(ge,ye-32-1,127,21),a(we,Pe-32-1,127,9),a(Fe,Qe-32-1,127,9)),oe=0;oe<R.za;++oe){var Ye=H.ya[H.aa+oe];if(0<oe){for(te=-1;16>te;++te)n(ge,ye+32*te-4,ge,ye+32*te+12,4);for(te=-1;8>te;++te)n(we,Pe+32*te-4,we,Pe+32*te+4,4),n(Fe,Qe+32*te-4,Fe,Qe+32*te+4,4)}var We=R.Gd,yt=R.Hd+oe,lt=Ye.ad,Me=Ye.Hc;if(0<ue&&(n(ge,ye-32,We[yt].y,0,16),n(we,Pe-32,We[yt].f,0,8),n(Fe,Qe-32,We[yt].ea,0,8)),Ye.Za){var qe=ge,Ge=ye-32+16;for(0<ue&&(oe>=R.za-1?a(qe,Ge,We[yt].y[15],4):n(qe,Ge,We[yt+1].y,0,4)),te=0;4>te;te++)qe[Ge+128+te]=qe[Ge+256+te]=qe[Ge+384+te]=qe[Ge+0+te];for(te=0;16>te;++te,Me<<=2)qe=ge,Ge=ye+Yu[te],Hi[Ye.Ob[te]](qe,Ge),Qo(Me,lt,16*+te,qe,Ge)}else if(qe=Zo(oe,ue,Ye.Ob[0]),Ui[qe](ge,ye),Me!=0)for(te=0;16>te;++te,Me<<=2)Qo(Me,lt,16*+te,ge,ye+Yu[te]);for(te=Ye.Gc,qe=Zo(oe,ue,Ye.Dd),na[qe](we,Pe),na[qe](Fe,Qe),Me=lt,qe=we,Ge=Pe,255&(Ye=te>>0)&&(170&Ye?Lo(Me,256,qe,Ge):Tr(Me,256,qe,Ge)),Ye=Fe,Me=Qe,255&(te>>=8)&&(170&te?Lo(lt,320,Ye,Me):Tr(lt,320,Ye,Me)),ue<R.Ub-1&&(n(We[yt].y,0,ge,ye+480,16),n(We[yt].f,0,we,Pe+224,8),n(We[yt].ea,0,Fe,Qe+224,8)),te=8*de*R.B,We=R.sa,yt=R.ta+16*oe+16*de*R.R,lt=R.qa,Ye=R.ra+8*oe+te,Me=R.Ha,qe=R.Ia+8*oe+te,te=0;16>te;++te)n(We,yt+te*R.R,ge,ye+32*te,16);for(te=0;8>te;++te)n(lt,Ye+te*R.B,we,Pe+32*te,8),n(Me,qe+te*R.B,Fe,Qe+32*te,8)}}function Ha(R,H,te,oe,ue,de,ge,ye,we){var Pe=[0],Fe=[0],Qe=0,Ye=we!=null?we.kd:0,We=we??new vi;if(R==null||12>te)return 7;We.data=R,We.w=H,We.ha=te,H=[H],te=[te],We.gb=[We.gb];e:{var yt=H,lt=te,Me=We.gb;if(r(R!=null),r(lt!=null),r(Me!=null),Me[0]=0,12<=lt[0]&&!t(R,yt[0],"RIFF")){if(t(R,yt[0]+8,"WEBP")){Me=3;break e}var qe=Oe(R,yt[0]+4);if(12>qe||4294967286<qe){Me=3;break e}if(Ye&&qe>lt[0]-8){Me=7;break e}Me[0]=qe,yt[0]+=12,lt[0]-=12}Me=0}if(Me!=0)return Me;for(qe=0<We.gb[0],te=te[0];;){e:{var Ge=R;lt=H,Me=te;var ct=Pe,pt=Fe,Gt=yt=[0];if((Mt=Qe=[Qe])[0]=0,8>Me[0])Me=7;else{if(!t(Ge,lt[0],"VP8X")){if(Oe(Ge,lt[0]+4)!=10){Me=3;break e}if(18>Me[0]){Me=7;break e}var jt=Oe(Ge,lt[0]+8),ar=1+Se(Ge,lt[0]+12);if(2147483648<=ar*(Ge=1+Se(Ge,lt[0]+15))){Me=3;break e}Gt!=null&&(Gt[0]=jt),ct!=null&&(ct[0]=ar),pt!=null&&(pt[0]=Ge),lt[0]+=18,Me[0]-=18,Mt[0]=1}Me=0}}if(Qe=Qe[0],yt=yt[0],Me!=0)return Me;if(lt=!!(2&yt),!qe&&Qe)return 3;if(de!=null&&(de[0]=!!(16&yt)),ge!=null&&(ge[0]=lt),ye!=null&&(ye[0]=0),ge=Pe[0],yt=Fe[0],Qe&<&&we==null){Me=0;break}if(4>te){Me=7;break}if(qe&&Qe||!qe&&!Qe&&!t(R,H[0],"ALPH")){te=[te],We.na=[We.na],We.P=[We.P],We.Sa=[We.Sa];e:{jt=R,Me=H,qe=te;var Mt=We.gb;ct=We.na,pt=We.P,Gt=We.Sa,ar=22,r(jt!=null),r(qe!=null),Ge=Me[0];var Fr=qe[0];for(r(ct!=null),r(Gt!=null),ct[0]=null,pt[0]=null,Gt[0]=0;;){if(Me[0]=Ge,qe[0]=Fr,8>Fr){Me=7;break e}var qr=Oe(jt,Ge+4);if(4294967286<qr){Me=3;break e}var Rr=8+qr+1&-2;if(ar+=Rr,0<Mt&&ar>Mt){Me=3;break e}if(!t(jt,Ge,"VP8 ")||!t(jt,Ge,"VP8L")){Me=0;break e}if(Fr[0]<Rr){Me=7;break e}t(jt,Ge,"ALPH")||(ct[0]=jt,pt[0]=Ge+8,Gt[0]=qr),Ge+=Rr,Fr-=Rr}}if(te=te[0],We.na=We.na[0],We.P=We.P[0],We.Sa=We.Sa[0],Me!=0)break}te=[te],We.Ja=[We.Ja],We.xa=[We.xa];e:if(Mt=R,Me=H,qe=te,ct=We.gb[0],pt=We.Ja,Gt=We.xa,jt=Me[0],Ge=!t(Mt,jt,"VP8 "),ar=!t(Mt,jt,"VP8L"),r(Mt!=null),r(qe!=null),r(pt!=null),r(Gt!=null),8>qe[0])Me=7;else{if(Ge||ar){if(Mt=Oe(Mt,jt+4),12<=ct&&Mt>ct-12){Me=3;break e}if(Ye&&Mt>qe[0]-8){Me=7;break e}pt[0]=Mt,Me[0]+=8,qe[0]-=8,Gt[0]=ar}else Gt[0]=5<=qe[0]&&Mt[jt+0]==47&&!(Mt[jt+4]>>5),pt[0]=qe[0];Me=0}if(te=te[0],We.Ja=We.Ja[0],We.xa=We.xa[0],H=H[0],Me!=0)break;if(4294967286<We.Ja)return 3;if(ye==null||lt||(ye[0]=We.xa?2:1),ge=[ge],yt=[yt],We.xa){if(5>te){Me=7;break}ye=ge,Ye=yt,lt=de,R==null||5>te?R=0:5<=te&&R[H+0]==47&&!(R[H+4]>>5)?(qe=[0],Mt=[0],ct=[0],$(pt=new z,R,H,te),ze(pt,qe,Mt,ct)?(ye!=null&&(ye[0]=qe[0]),Ye!=null&&(Ye[0]=Mt[0]),lt!=null&&(lt[0]=ct[0]),R=1):R=0):R=0}else{if(10>te){Me=7;break}ye=yt,R==null||10>te||!gi(R,H+3,te-3)?R=0:(Ye=R[H+0]|R[H+1]<<8|R[H+2]<<16,lt=16383&(R[H+7]<<8|R[H+6]),R=16383&(R[H+9]<<8|R[H+8]),1&Ye||3<(Ye>>1&7)||!(Ye>>4&1)||Ye>>5>=We.Ja||!lt||!R?R=0:(ge&&(ge[0]=lt),ye&&(ye[0]=R),R=1))}if(!R||(ge=ge[0],yt=yt[0],Qe&&(Pe[0]!=ge||Fe[0]!=yt)))return 3;we!=null&&(we[0]=We,we.offset=H-we.w,r(4294967286>H-we.w),r(we.offset==we.ha-te));break}return Me==0||Me==7&&Qe&&we==null?(de!=null&&(de[0]|=We.na!=null&&0<We.na.length),oe!=null&&(oe[0]=ge),ue!=null&&(ue[0]=yt),0):Me}function Qs(R,H,te){var oe=H.width,ue=H.height,de=0,ge=0,ye=oe,we=ue;if(H.Da=R!=null&&0<R.Da,H.Da&&(ye=R.cd,we=R.bd,de=R.v,ge=R.j,11>te||(de&=-2,ge&=-2),0>de||0>ge||0>=ye||0>=we||de+ye>oe||ge+we>ue))return 0;if(H.v=de,H.j=ge,H.va=de+ye,H.o=ge+we,H.U=ye,H.T=we,H.da=R!=null&&0<R.da,H.da){if(!Xe(ye,we,te=[R.ib],de=[R.hb]))return 0;H.ib=te[0],H.hb=de[0]}return H.ob=R!=null&&R.ob,H.Kb=R==null||!R.Sd,H.da&&(H.ob=H.ib<3*oe/4&&H.hb<3*ue/4,H.Kb=0),1}function bl(R){if(R==null)return 2;if(11>R.S){var H=R.f.RGBA;H.fb+=(R.height-1)*H.A,H.A=-H.A}else H=R.f.kb,R=R.height,H.O+=(R-1)*H.fa,H.fa=-H.fa,H.N+=(R-1>>1)*H.Ab,H.Ab=-H.Ab,H.W+=(R-1>>1)*H.Db,H.Db=-H.Db,H.F!=null&&(H.J+=(R-1)*H.lb,H.lb=-H.lb);return 0}function ra(R,H,te,oe){if(oe==null||0>=R||0>=H)return 2;if(te!=null){if(te.Da){var ue=te.cd,de=te.bd,ge=-2&te.v,ye=-2&te.j;if(0>ge||0>ye||0>=ue||0>=de||ge+ue>R||ye+de>H)return 2;R=ue,H=de}if(te.da){if(!Xe(R,H,ue=[te.ib],de=[te.hb]))return 2;R=ue[0],H=de[0]}}oe.width=R,oe.height=H;e:{var we=oe.width,Pe=oe.height;if(R=oe.S,0>=we||0>=Pe||!(R>=xl&&13>R))R=2;else{if(0>=oe.Rd&&oe.sd==null){ge=de=ue=H=0;var Fe=(ye=we*Cl[R])*Pe;if(11>R||(de=(Pe+1)/2*(H=(we+1)/2),R==12&&(ge=(ue=we)*Pe)),(Pe=i(Fe+2*de+ge))==null){R=1;break e}oe.sd=Pe,11>R?((we=oe.f.RGBA).eb=Pe,we.fb=0,we.A=ye,we.size=Fe):((we=oe.f.kb).y=Pe,we.O=0,we.fa=ye,we.Fd=Fe,we.f=Pe,we.N=0+Fe,we.Ab=H,we.Cd=de,we.ea=Pe,we.W=0+Fe+de,we.Db=H,we.Ed=de,R==12&&(we.F=Pe,we.J=0+Fe+2*de),we.Tc=ge,we.lb=ue)}if(H=1,ue=oe.S,de=oe.width,ge=oe.height,ue>=xl&&13>ue)if(11>ue)R=oe.f.RGBA,H&=(ye=Math.abs(R.A))*(ge-1)+de<=R.size,H&=ye>=de*Cl[ue],H&=R.eb!=null;else{R=oe.f.kb,ye=(de+1)/2,Fe=(ge+1)/2,we=Math.abs(R.fa),Pe=Math.abs(R.Ab);var Qe=Math.abs(R.Db),Ye=Math.abs(R.lb),We=Ye*(ge-1)+de;H&=we*(ge-1)+de<=R.Fd,H&=Pe*(Fe-1)+ye<=R.Cd,H=(H&=Qe*(Fe-1)+ye<=R.Ed)&we>=de&Pe>=ye&Qe>=ye,H&=R.y!=null,H&=R.f!=null,H&=R.ea!=null,ue==12&&(H&=Ye>=de,H&=We<=R.Tc,H&=R.F!=null)}else H=0;R=H?0:2}}return R!=0||te!=null&&te.fd&&(R=bl(oe)),R}var rn=64,Js=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],wl=24,Oa=32,Ga=8,xi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ee("Predictor0","PredictorAdd0"),M.Predictor0=function(){return 4278190080},M.Predictor1=function(R){return R},M.Predictor2=function(R,H,te){return H[te+0]},M.Predictor3=function(R,H,te){return H[te+1]},M.Predictor4=function(R,H,te){return H[te-1]},M.Predictor5=function(R,H,te){return he(he(R,H[te+1]),H[te+0])},M.Predictor6=function(R,H,te){return he(R,H[te-1])},M.Predictor7=function(R,H,te){return he(R,H[te+0])},M.Predictor8=function(R,H,te){return he(H[te-1],H[te+0])},M.Predictor9=function(R,H,te){return he(H[te+0],H[te+1])},M.Predictor10=function(R,H,te){return he(he(R,H[te-1]),he(H[te+0],H[te+1]))},M.Predictor11=function(R,H,te){var oe=H[te+0];return 0>=$e(oe>>24&255,R>>24&255,(H=H[te-1])>>24&255)+$e(oe>>16&255,R>>16&255,H>>16&255)+$e(oe>>8&255,R>>8&255,H>>8&255)+$e(255&oe,255&R,255&H)?oe:R},M.Predictor12=function(R,H,te){var oe=H[te+0];return(ke((R>>24&255)+(oe>>24&255)-((H=H[te-1])>>24&255))<<24|ke((R>>16&255)+(oe>>16&255)-(H>>16&255))<<16|ke((R>>8&255)+(oe>>8&255)-(H>>8&255))<<8|ke((255&R)+(255&oe)-(255&H)))>>>0},M.Predictor13=function(R,H,te){var oe=H[te-1];return(Re((R=he(R,H[te+0]))>>24&255,oe>>24&255)<<24|Re(R>>16&255,oe>>16&255)<<16|Re(R>>8&255,oe>>8&255)<<8|Re(R>>0&255,oe>>0&255))>>>0};var el=M.PredictorAdd0;M.PredictorAdd1=vt,Ee("Predictor2","PredictorAdd2"),Ee("Predictor3","PredictorAdd3"),Ee("Predictor4","PredictorAdd4"),Ee("Predictor5","PredictorAdd5"),Ee("Predictor6","PredictorAdd6"),Ee("Predictor7","PredictorAdd7"),Ee("Predictor8","PredictorAdd8"),Ee("Predictor9","PredictorAdd9"),Ee("Predictor10","PredictorAdd10"),Ee("Predictor11","PredictorAdd11"),Ee("Predictor12","PredictorAdd12"),Ee("Predictor13","PredictorAdd13");var co=M.PredictorAdd2;Je("ColorIndexInverseTransform","MapARGB","32b",function(R){return R>>8&255},function(R){return R}),Je("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(R){return R},function(R){return R>>8&255});var Hu,mi=M.ColorIndexInverseTransform,Bi=M.MapARGB,As=M.VP8LColorIndexInverseTransformAlpha,Co=M.MapAlpha,yi=M.VP8LPredictorsAdd=[];yi.length=16,(M.VP8LPredictors=[]).length=16,(M.VP8LPredictorsAdd_C=[]).length=16,(M.VP8LPredictors_C=[]).length=16;var Jo,li,qi,es,$r,fo,tl,ko,jr,Lo,Yn,Tr,xn,Xn,ts,No,To,Va,kn,ho,Ro,Mo,zi,un,Ei,nn,Yr,Fn,ei=i(511),Io=i(2041),_l=i(225),rl=i(767),cu=0,jo=Io,Sl=_l,bi=rl,Wa=ei,xl=0,Fo=1,sf=2,El=3,fu=4,cn=5,Gu=6,Pl=7,Cs=8,hu=9,du=10,pu=[2,3,7],yc=[3,3,11],nl=[280,256,256,256,40],qf=[0,1,1,1,0],Bh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],zf=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],lf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Vu=8,ks=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Wu=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Ol=null,uf=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],$a=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],bc=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],$u=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Uf=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Hf=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],wc=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ui=[],Hi=[],na=[],po=1,gu=2,Gi=[],pa=[];ft("UpsampleRgbLinePair",Sr,3),ft("UpsampleBgrLinePair",Cn,3),ft("UpsampleRgbaLinePair",Ua,4),ft("UpsampleBgraLinePair",si,4),ft("UpsampleArgbLinePair",Jn,4),ft("UpsampleRgba4444LinePair",jn,2),ft("UpsampleRgb565LinePair",Sn,2);var Gf=M.UpsampleRgbLinePair,Vf=M.UpsampleBgrLinePair,Ls=M.UpsampleRgbaLinePair,vu=M.UpsampleBgraLinePair,ui=M.UpsampleArgbLinePair,wi=M.UpsampleRgba4444LinePair,_c=M.UpsampleRgb565LinePair,rs=16,go=1<<rs-1,Zr=-227,an=482,ns=6,Pi=0,ia=i(256),il=i(256),Al=i(256),aa=i(256),mu=i(an-Zr),cf=i(an-Zr);Pa("YuvToRgbRow",Sr,3),Pa("YuvToBgrRow",Cn,3),Pa("YuvToRgbaRow",Ua,4),Pa("YuvToBgraRow",si,4),Pa("YuvToArgbRow",Jn,4),Pa("YuvToRgba4444Row",jn,2),Pa("YuvToRgb565Row",Sn,2);var Yu=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],is=[0,2,8],Wf=[8,7,6,4,4,2,2,2,1,1,1,1],as=1;this.WebPDecodeRGBA=function(R,H,te,oe,ue){var de=Fo,ge=new $n,ye=new _t;ge.ba=ye,ye.S=de,ye.width=[ye.width],ye.height=[ye.height];var we=ye.width,Pe=ye.height,Fe=new rr;if(Fe==null||R==null)var Qe=2;else r(Fe!=null),Qe=Ha(R,H,te,Fe.width,Fe.height,Fe.Pd,Fe.Qd,Fe.format,null);if(Qe!=0?we=0:(we!=null&&(we[0]=Fe.width[0]),Pe!=null&&(Pe[0]=Fe.height[0]),we=1),we){ye.width=ye.width[0],ye.height=ye.height[0],oe!=null&&(oe[0]=ye.width),ue!=null&&(ue[0]=ye.height);e:{if(oe=new Kr,(ue=new vi).data=R,ue.w=H,ue.ha=te,ue.kd=1,H=[0],r(ue!=null),((R=Ha(ue.data,ue.w,ue.ha,null,null,null,H,null,ue))==0||R==7)&&H[0]&&(R=4),(H=R)==0){if(r(ge!=null),oe.data=ue.data,oe.w=ue.w+ue.offset,oe.ha=ue.ha-ue.offset,oe.put=De,oe.ac=Ue,oe.bc=bt,oe.ma=ge,ue.xa){if((R=_i())==null){ge=1;break e}if(function(Ye,We){var yt=[0],lt=[0],Me=[0];t:for(;;){if(Ye==null)return 0;if(We==null)return Ye.a=2,0;if(Ye.l=We,Ye.a=0,$(Ye.m,We.data,We.w,We.ha),!ze(Ye.m,yt,lt,Me)){Ye.a=3;break t}if(Ye.xb=gu,We.width=yt[0],We.height=lt[0],!Ni(yt[0],lt[0],1,Ye,null))break t;return 1}return r(Ye.a!=0),0}(R,oe)){if(oe=(H=ra(oe.width,oe.height,ge.Oa,ge.ba))==0){t:{oe=R;r:for(;;){if(oe==null){oe=0;break t}if(r(oe.s.yc!=null),r(oe.s.Ya!=null),r(0<oe.s.Wb),r((te=oe.l)!=null),r((ue=te.ma)!=null),oe.xb!=0){if(oe.ca=ue.ba,oe.tb=ue.tb,r(oe.ca!=null),!Qs(ue.Oa,te,El)){oe.a=2;break r}if(!Si(oe,te.width)||te.da)break r;if((te.da||Nt(oe.ca.S))&&et(),11>oe.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),oe.ca.f.kb.F!=null&&et()),oe.Pb&&0<oe.s.ua&&oe.s.vb.X==null&&!Ne(oe.s.vb,oe.s.Wa.Xa)){oe.a=1;break r}oe.xb=0}if(!en(oe,oe.V,oe.Ba,oe.c,oe.i,te.o,kr))break r;ue.Dc=oe.Ma,oe=1;break t}r(oe.a!=0),oe=0}oe=!oe}oe&&(H=R.a)}else H=R.a}else{if((R=new Ar)==null){ge=1;break e}if(R.Fa=ue.na,R.P=ue.P,R.qc=ue.Sa,Ti(R,oe)){if((H=ra(oe.width,oe.height,ge.Oa,ge.ba))==0){if(R.Aa=0,te=ge.Oa,r((ue=R)!=null),te!=null){if(0<(we=0>(we=te.Md)?0:100<we?255:255*we/100)){for(Pe=Fe=0;4>Pe;++Pe)12>(Qe=ue.pb[Pe]).lc&&(Qe.ia=we*Wf[0>Qe.lc?0:Qe.lc]>>3),Fe|=Qe.ia;Fe&&(alert("todo:VP8InitRandom"),ue.ia=1)}ue.Ga=te.Id,100<ue.Ga?ue.Ga=100:0>ue.Ga&&(ue.Ga=0)}ii(R,oe)||(H=R.a)}}else H=R.a}H==0&&ge.Oa!=null&&ge.Oa.fd&&(H=bl(ge.ba))}ge=H}de=ge!=0?null:11>de?ye.f.RGBA.eb:ye.f.kb.y}else de=null;return de};var Cl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(M,j){for(var C="",x=0;x<4;x++)C+=String.fromCharCode(M[j++]);return C}function h(M,j){return(M[j+0]<<0|M[j+1]<<8|M[j+2]<<16)>>>0}function p(M,j){return(M[j+0]<<0|M[j+1]<<8|M[j+2]<<16|M[j+3]<<24)>>>0}new u;var w=[0],d=[0],_=[],E=new u,S=e,m=function(M,j){var C={},x=0,L=!1,A=0,N=0;if(C.frames=[],!function(D,K,ne,Q){for(var ee=0;ee<Q;ee++)if(D[K+ee]!=ne.charCodeAt(ee))return!0;return!1}(M,j,"RIFF",4)){for(p(M,j+=4),j+=8;j<M.length;){var F=c(M,j),U=p(M,j+=4);j+=4;var W=U+(1&U);switch(F){case"VP8 ":case"VP8L":C.frames[x]===void 0&&(C.frames[x]={}),(V=C.frames[x]).src_off=L?N:j-8,V.src_size=A+U+8,x++,L&&(L=!1,A=0,N=0);break;case"VP8X":(V=C.header={}).feature_flags=M[j];var $=j+4;V.canvas_width=1+h(M,$),$+=3,V.canvas_height=1+h(M,$),$+=3;break;case"ALPH":L=!0,A=W+8,N=j-8;break;case"ANIM":(V=C.header).bgcolor=p(M,j),$=j+4,V.loop_count=(G=M)[(z=$)+0]<<0|G[z+1]<<8,$+=2;break;case"ANMF":var Z,V;(V=C.frames[x]={}).offset_x=2*h(M,j),j+=3,V.offset_y=2*h(M,j),j+=3,V.width=1+h(M,j),j+=3,V.height=1+h(M,j),j+=3,V.duration=h(M,j),j+=3,Z=M[j++],V.dispose=1&Z,V.blend=Z>>1&1}F!="ANMF"&&(j+=W)}var G,z;return C}}(S,0);m.response=S,m.rgbaoutput=!0,m.dataurl=!1;var g=m.header?m.header:null,v=m.frames?m.frames:null;if(g){g.loop_counter=g.loop_count,w=[g.canvas_height],d=[g.canvas_width];for(var b=0;b<v.length&&v[b].blend!=0;b++);}var O=v[0],I=E.WebPDecodeRGBA(S,O.src_off,O.src_size,d,w);O.rgba=I,O.imgwidth=d[0],O.imgheight=w[0];for(var T=0;T<d[0]*w[0]*4;T++)_[T]=I[T];return this.width=d,this.height=w,this.data=_,this}(function(e){var r=function(){return typeof N2=="function"},t=function(w,d,_,E){var S=4,m=o;switch(E){case e.image_compression.FAST:S=1,m=i;break;case e.image_compression.MEDIUM:S=6,m=l;break;case e.image_compression.SLOW:S=9,m=u}w=n(w,d,_,m);var g=N2(w,{level:S});return e.__addimage__.arrayBufferToBinaryString(g)},n=function(w,d,_,E){for(var S,m,g,v=w.length/d,b=new Uint8Array(w.length+v),O=h(),I=0;I<v;I+=1){if(g=I*d,S=w.subarray(g,g+d),E)b.set(E(S,_,m),g+I);else{for(var T,M=O.length,j=[];T<M;T+=1)j[T]=O[T](S,_,m);var C=p(j.concat());b.set(j[C],g+I)}m=S}return b},a=function(w){var d=Array.apply([],w);return d.unshift(0),d},i=function(w,d){var _,E=[],S=w.length;E[0]=1;for(var m=0;m<S;m+=1)_=w[m-d]||0,E[m+1]=w[m]-_+256&255;return E},o=function(w,d,_){var E,S=[],m=w.length;S[0]=2;for(var g=0;g<m;g+=1)E=_&&_[g]||0,S[g+1]=w[g]-E+256&255;return S},l=function(w,d,_){var E,S,m=[],g=w.length;m[0]=3;for(var v=0;v<g;v+=1)E=w[v-d]||0,S=_&&_[v]||0,m[v+1]=w[v]+256-(E+S>>>1)&255;return m},u=function(w,d,_){var E,S,m,g,v=[],b=w.length;v[0]=4;for(var O=0;O<b;O+=1)E=w[O-d]||0,S=_&&_[O]||0,m=_&&_[O-d]||0,g=c(E,S,m),v[O+1]=w[O]-g+256&255;return v},c=function(w,d,_){if(w===d&&d===_)return w;var E=Math.abs(d-_),S=Math.abs(w-_),m=Math.abs(w+d-_-_);return E<=S&&E<=m?w:S<=m?d:_},h=function(){return[a,i,o,l,u]},p=function(w){var d=w.map(function(_){return _.reduce(function(E,S){return E+Math.abs(S)},0)});return d.indexOf(Math.min.apply(null,d))};e.processPNG=function(w,d,_,E){var S,m,g,v,b,O,I,T,M,j,C,x,L,A,N,F=this.decode.FLATE_DECODE,U="";if(this.__addimage__.isArrayBuffer(w)&&(w=new Uint8Array(w)),this.__addimage__.isArrayBufferView(w)){if(w=(g=new Zk(w)).imgData,m=g.bits,S=g.colorSpace,b=g.colors,[4,6].indexOf(g.colorType)!==-1){if(g.bits===8){M=(T=g.pixelBitlength==32?new Uint32Array(g.decodePixels().buffer):g.pixelBitlength==16?new Uint16Array(g.decodePixels().buffer):new Uint8Array(g.decodePixels().buffer)).length,C=new Uint8Array(M*g.colors),j=new Uint8Array(M);var W,$=g.pixelBitlength-g.bits;for(A=0,N=0;A<M;A++){for(L=T[A],W=0;W<$;)C[N++]=L>>>W&255,W+=g.bits;j[A]=L>>>W&255}}if(g.bits===16){M=(T=new Uint32Array(g.decodePixels().buffer)).length,C=new Uint8Array(M*(32/g.pixelBitlength)*g.colors),j=new Uint8Array(M*(32/g.pixelBitlength)),x=g.colors>1,A=0,N=0;for(var Z=0;A<M;)L=T[A++],C[N++]=L>>>0&255,x&&(C[N++]=L>>>16&255,L=T[A++],C[N++]=L>>>0&255),j[Z++]=L>>>16&255;m=8}E!==e.image_compression.NONE&&r()?(w=t(C,g.width*g.colors,g.colors,E),I=t(j,g.width,1,E)):(w=C,I=j,F=void 0)}if(g.colorType===3&&(S=this.color_spaces.INDEXED,O=g.palette,g.transparency.indexed)){var V=g.transparency.indexed,G=0;for(A=0,M=V.length;A<M;++A)G+=V[A];if((G/=255)===M-1&&V.indexOf(0)!==-1)v=[V.indexOf(0)];else if(G!==M){for(T=g.decodePixels(),j=new Uint8Array(T.length),A=0,M=T.length;A<M;A++)j[A]=V[T[A]];I=t(j,g.width,1)}}var z=function(D){var K;switch(D){case e.image_compression.FAST:K=11;break;case e.image_compression.MEDIUM:K=13;break;case e.image_compression.SLOW:K=14;break;default:K=12}return K}(E);return F===this.decode.FLATE_DECODE&&(U="/Predictor "+z+" "),U+="/Colors "+b+" /BitsPerComponent "+m+" /Columns "+g.width,(this.__addimage__.isArrayBuffer(w)||this.__addimage__.isArrayBufferView(w))&&(w=this.__addimage__.arrayBufferToBinaryString(w)),(I&&this.__addimage__.isArrayBuffer(I)||this.__addimage__.isArrayBufferView(I))&&(I=this.__addimage__.arrayBufferToBinaryString(I)),{alias:_,data:w,index:d,filter:F,decodeParameters:U,transparency:v,palette:O,sMask:I,predictor:z,width:g.width,height:g.height,bitsPerComponent:m,colorSpace:S}}}})(hr.API),function(e){e.processGIF89A=function(r,t,n,a){var i=new Qk(r),o=i.width,l=i.height,u=[];i.decodeAndBlitFrameRGBA(0,u);var c={data:u,width:o,height:l},h=new c2(100).encode(c,100);return e.processJPEG.call(this,h,t,n,a)},e.processGIF87A=e.processGIF89A}(hr.API),Hl.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var r=0;r<e;r++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[r]={red:a,green:n,blue:t,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Hl.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,r=this.width*this.height*4;this.data=new Uint8Array(r),this[e]()}catch(t){Vn.log("bit decode error:"+t)}},Hl.prototype.bit1=function(){var e,r=Math.ceil(this.width/8),t=r%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<r;a++)for(var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*a*4,l=0;l<8&&8*a+l<this.width;l++){var u=this.palette[i>>7-l&1];this.data[o+4*l]=u.blue,this.data[o+4*l+1]=u.green,this.data[o+4*l+2]=u.red,this.data[o+4*l+3]=255}t!==0&&(this.pos+=4-t)}},Hl.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),r=e%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<e;a++){var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*a*4,l=i>>4,u=15&i,c=this.palette[l];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*a+1>=this.width)break;c=this.palette[u],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}r!==0&&(this.pos+=4-r)}},Hl.prototype.bit8=function(){for(var e=this.width%4,r=this.height-1;r>=0;r--){for(var t=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),i=t*this.width*4+4*n;if(a<this.palette.length){var o=this.palette[a];this.data[i]=o.red,this.data[i+1]=o.green,this.data[i+2]=o.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}e!==0&&(this.pos+=4-e)}},Hl.prototype.bit15=function(){for(var e=this.width%3,r=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(i&r)/r*255|0,l=(i>>5&r)/r*255|0,u=(i>>10&r)/r*255|0,c=i>>15?255:0,h=n*this.width*4+4*a;this.data[h]=u,this.data[h+1]=l,this.data[h+2]=o,this.data[h+3]=c}this.pos+=e}},Hl.prototype.bit16=function(){for(var e=this.width%3,r=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(o&r)/r*255|0,u=(o>>5&t)/t*255|0,c=(o>>11)/r*255|0,h=a*this.width*4+4*i;this.data[h]=c,this.data[h+1]=u,this.data[h+2]=l,this.data[h+3]=255}this.pos+=e}},Hl.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+4*t;this.data[o]=i,this.data[o+1]=a,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},Hl.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var r=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+4*t;this.data[l]=i,this.data[l+1]=a,this.data[l+2]=n,this.data[l+3]=o}},Hl.prototype.getData=function(){return this.data},function(e){e.processBMP=function(r,t,n,a){var i=new Hl(r,!1),o=i.width,l=i.height,u={data:i.getData(),width:o,height:l},c=new c2(100).encode(u,100);return e.processJPEG.call(this,c,t,n,a)}}(hr.API),lw.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(r,t,n,a){var i=new lw(r),o=i.width,l=i.height,u={data:i.getData(),width:o,height:l},c=new c2(100).encode(u,100);return e.processJPEG.call(this,c,t,n,a)}}(hr.API),hr.API.processRGBA=function(e,r,t){for(var n=e.data,a=n.length,i=new Uint8Array(a/4*3),o=new Uint8Array(a/4),l=0,u=0,c=0;c<a;c+=4){var h=n[c],p=n[c+1],w=n[c+2],d=n[c+3];i[l++]=h,i[l++]=p,i[l++]=w,o[u++]=d}var _=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:_,index:r,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},hr.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},oh=hr.API,p1=oh.getCharWidthsArray=function(e,r){var t,n,a=(r=r||{}).font||this.internal.getFont(),i=r.fontSize||this.internal.getFontSize(),o=r.charSpace||this.internal.getCharSpace(),l=r.widths?r.widths:a.metadata.Unicode.widths,u=l.fof?l.fof:1,c=r.kerning?r.kerning:a.metadata.Unicode.kerning,h=c.fof?c.fof:1,p=r.doKerning!==!1,w=0,d=e.length,_=0,E=l[0]||u,S=[];for(t=0;t<d;t++)n=e.charCodeAt(t),typeof a.metadata.widthOfString=="function"?S.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+o*(1e3/i)||0)/1e3):(w=p&&On(c[n])==="object"&&!isNaN(parseInt(c[n][_],10))?c[n][_]/h:0,S.push((l[n]||E)/u+w)),_=n;return S},iw=oh.getStringUnitWidth=function(e,r){var t=(r=r||{}).fontSize||this.internal.getFontSize(),n=r.font||this.internal.getFont(),a=r.charSpace||this.internal.getCharSpace();return oh.processArabic&&(e=oh.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,t,a)/t:p1.apply(this,arguments).reduce(function(i,o){return i+o},0)},aw=function(e,r,t,n){for(var a=[],i=0,o=e.length,l=0;i!==o&&l+r[i]<t;)l+=r[i],i++;a.push(e.slice(0,i));var u=i;for(l=0;i!==o;)l+r[i]>n&&(a.push(e.slice(u,i)),l=0,u=i),l+=r[i],i++;return u!==i&&a.push(e.slice(u,i)),a},ow=function(e,r,t){t||(t={});var n,a,i,o,l,u,c,h=[],p=[h],w=t.textIndent||0,d=0,_=0,E=e.split(" "),S=p1.apply(this,[" ",t])[0];if(u=t.lineIndent===-1?E[0].length+2:t.lineIndent||0){var m=Array(u).join(" "),g=[];E.map(function(b){(b=b.split(/\s*\n/)).length>1?g=g.concat(b.map(function(O,I){return(I&&O.length?`
|
|
531
|
-
`:"")+O})):g.push(b[0])}),E=g,u=iw.apply(this,[m,t])}for(i=0,o=E.length;i<o;i++){var v=0;if(n=E[i],u&&n[0]==`
|
|
532
|
-
`&&(n=n.substr(1),v=1),w+d+(_=(a=p1.apply(this,[n,t])).reduce(function(b,O){return b+O},0))>r||v){if(_>r){for(l=aw.apply(this,[n,a,r-(w+d),r]),h.push(l.shift()),h=[l.pop()];l.length;)p.push([l.shift()]);_=a.slice(n.length-(h[0]?h[0].length:0)).reduce(function(b,O){return b+O},0)}else h=[n];p.push(h),w=_+u,d=S}else h.push(n),w+=d+_,d=S}return c=u?function(b,O){return(O?m:"")+b.join(" ")}:function(b){return b.join(" ")},p.map(c)},oh.splitTextToSize=function(e,r,t){var n,a=(t=t||{}).fontSize||this.internal.getFontSize(),i=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var p=this.internal.getFont(h.fontName,h.fontStyle);return p.metadata.Unicode?{widths:p.metadata.Unicode.widths||{0:1},kerning:p.metadata.Unicode.kerning||{}}:{font:p.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*r/a;i.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=t.lineIndent;var l,u,c=[];for(l=0,u=n.length;l<u;l++)c=c.concat(ow.apply(this,[n[l],o,i]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var r="klmnopqrstuvwxyz",t={},n={},a=0;a<r.length;a++)t[r[a]]="0123456789abcdef"[a],n["0123456789abcdef"[a]]=r[a];var i=function(p){return"0x"+parseInt(p,10).toString(16)},o=e.__fontmetrics__.compress=function(p){var w,d,_,E,S=["{"];for(var m in p){if(w=p[m],isNaN(parseInt(m,10))?d="'"+m+"'":(m=parseInt(m,10),d=(d=i(m).slice(2)).slice(0,-1)+n[d.slice(-1)]),typeof w=="number")w<0?(_=i(w).slice(3),E="-"):(_=i(w).slice(2),E=""),_=E+_.slice(0,-1)+n[_.slice(-1)];else{if(On(w)!=="object")throw new Error("Don't know what to do with value type "+On(w)+".");_=o(w)}S.push(d+_)}return S.push("}"),S.join("")},l=e.__fontmetrics__.uncompress=function(p){if(typeof p!="string")throw new Error("Invalid argument passed to uncompress.");for(var w,d,_,E,S={},m=1,g=S,v=[],b="",O="",I=p.length-1,T=1;T<I;T+=1)(E=p[T])=="'"?w?(_=w.join(""),w=void 0):w=[]:w?w.push(E):E=="{"?(v.push([g,_]),g={},_=void 0):E=="}"?((d=v.pop())[0][d[1]]=g,_=void 0,g=d[0]):E=="-"?m=-1:_===void 0?t.hasOwnProperty(E)?(b+=t[E],_=parseInt(b,16)*m,m=1,b=""):b+=E:t.hasOwnProperty(E)?(O+=t[E],g[_]=parseInt(O,16)*m,m=1,_=void 0,O=""):O+=E;return S},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},h={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(p){var w=p.font,d=h.Unicode[w.postScriptName];d&&(w.metadata.Unicode={},w.metadata.Unicode.widths=d.widths,w.metadata.Unicode.kerning=d.kerning);var _=c.Unicode[w.postScriptName];_&&(w.metadata.Unicode.encoding=_,w.encoding=_.codePages[0])}])}(hr.API),function(e){var r=function(t){for(var n=t.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=t.charCodeAt(i);return a};e.API.events.push(["addFont",function(t){var n=void 0,a=t.font,i=t.instance;if(!a.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=i.existsFileInVFS(a.postScriptName)===!1?i.loadFile(a.postScriptName):i.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(o,l){l=/^\x00\x01\x00\x00/.test(l)?r(l):r(lp(l)),o.metadata=e.API.TTFFont.open(l),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(a,n)}}])}(hr),function(e){function r(){return(pr.canvg?Promise.resolve(pr.canvg):O2(()=>import("./index.es-IW0gGbW7.js"),[],import.meta.url)).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}hr.API.addSvgAsImage=function(t,n,a,i,o,l,u,c){if(isNaN(n)||isNaN(a))throw Vn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Vn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var p=h.getContext("2d");p.fillStyle="#fff",p.fillRect(0,0,h.width,h.height);var w={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return r().then(function(_){return _.fromString(p,t,w)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(_){return _.render(w)}).then(function(){d.addImage(h.toDataURL("image/jpeg",1),n,a,i,o,u,c)})}}(),hr.API.putTotalPages=function(e){var r,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(e,"g"),t=this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(r,t);return this},hr.API.viewerPreferences=function(e,r){var t;e=e||{},r=r||!1;var n,a,i,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(o),u=[],c=0,h=0,p=0;function w(_,E){var S,m=!1;for(S=0;S<_.length;S+=1)_[S]===E&&(m=!0);return m}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,e==="reset"||r===!0){var d=l.length;for(p=0;p<d;p+=1)t[l[p]].value=t[l[p]].defaultValue,t[l[p]].explicitSet=!1}if(On(e)==="object"){for(a in e)if(i=e[a],w(l,a)&&i!==void 0){if(t[a].type==="boolean"&&typeof i=="boolean")t[a].value=i;else if(t[a].type==="name"&&w(t[a].valueSet,i))t[a].value=i;else if(t[a].type==="integer"&&Number.isInteger(i))t[a].value=i;else if(t[a].type==="array"){for(c=0;c<i.length;c+=1)if(n=!0,i[c].length===1&&typeof i[c][0]=="number")u.push(String(i[c]-1));else if(i[c].length>1){for(h=0;h<i[c].length;h+=1)typeof i[c][h]!="number"&&(n=!1);n===!0&&u.push([i[c][0]-1,i[c][1]-1].join(" "))}t[a].value="["+u.join(" ")+"]"}else t[a].value=t[a].defaultValue;t[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var _,E=[];for(_ in t)t[_].explicitSet===!0&&(t[_].type==="name"?E.push("/"+_+" /"+t[_].value):E.push("/"+_+" "+t[_].value));E.length!==0&&this.internal.write(`/ViewerPreferences
|
|
533
|
-
<<
|
|
534
|
-
`+E.join(`
|
|
535
|
-
`)+`
|
|
536
|
-
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(e){var r=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',a=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),i=unescape(encodeURIComponent(n)),o=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),l=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),u=unescape(encodeURIComponent("</x:xmpmeta>")),c=i.length+o.length+l.length+a.length+u.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+c+" >>"),this.internal.write("stream"),this.internal.write(a+i+o+l+u),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(n,a){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:a||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",r)),this}}(hr.API),function(e){var r=e.API,t=r.pdfEscape16=function(i,o){for(var l,u=o.metadata.Unicode.widths,c=["","0","00","000","0000"],h=[""],p=0,w=i.length;p<w;++p){if(l=o.metadata.characterToGlyph(i.charCodeAt(p)),o.metadata.glyIdsUsed.push(l),o.metadata.toUnicode[l]=i.charCodeAt(p),u.indexOf(l)==-1&&(u.push(l),u.push([parseInt(o.metadata.widthOfGlyph(l),10)])),l=="0")return h.join("");l=l.toString(16),h.push(c[4-l.length],l)}return h.join("")},n=function(i){var o,l,u,c,h,p,w;for(h=`/CIDInit /ProcSet findresource begin
|
|
537
|
-
12 dict begin
|
|
538
|
-
begincmap
|
|
539
|
-
/CIDSystemInfo <<
|
|
540
|
-
/Registry (Adobe)
|
|
541
|
-
/Ordering (UCS)
|
|
542
|
-
/Supplement 0
|
|
543
|
-
>> def
|
|
544
|
-
/CMapName /Adobe-Identity-UCS def
|
|
545
|
-
/CMapType 2 def
|
|
546
|
-
1 begincodespacerange
|
|
547
|
-
<0000><ffff>
|
|
548
|
-
endcodespacerange`,u=[],p=0,w=(l=Object.keys(i).sort(function(d,_){return d-_})).length;p<w;p++)o=l[p],u.length>=100&&(h+=`
|
|
549
|
-
`+u.length+` beginbfchar
|
|
550
|
-
`+u.join(`
|
|
551
|
-
`)+`
|
|
552
|
-
endbfchar`,u=[]),i[o]!==void 0&&i[o]!==null&&typeof i[o].toString=="function"&&(c=("0000"+i[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),u.push("<"+o+"><"+c+">"));return u.length&&(h+=`
|
|
553
|
-
`+u.length+` beginbfchar
|
|
554
|
-
`+u.join(`
|
|
555
|
-
`)+`
|
|
556
|
-
endbfchar
|
|
557
|
-
`),h+=`endcmap
|
|
558
|
-
CMapName currentdict /CMap defineresource pop
|
|
559
|
-
end
|
|
560
|
-
end`};r.events.push(["putFont",function(i){(function(o){var l=o.font,u=o.out,c=o.newObject,h=o.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="Identity-H"){for(var p=l.metadata.Unicode.widths,w=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),d="",_=0;_<w.length;_++)d+=String.fromCharCode(w[_]);var E=c();h({data:d,addLength1:!0,objectId:E}),u("endobj");var S=c();h({data:n(l.metadata.toUnicode),addLength1:!0,objectId:S}),u("endobj");var m=c();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+ch(l.fontName)),u("/FontFile2 "+E+" 0 R"),u("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),u("/Flags "+l.metadata.flags),u("/StemV "+l.metadata.stemV),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u(">>"),u("endobj");var g=c();u("<<"),u("/Type /Font"),u("/BaseFont /"+ch(l.fontName)),u("/FontDescriptor "+m+" 0 R"),u("/W "+e.API.PDFObject.convert(p)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+l.encoding+")"),u(">>"),u(">>"),u("endobj"),l.objectNumber=c(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+S+" 0 R"),u("/BaseFont /"+ch(l.fontName)),u("/Encoding /"+l.encoding),u("/DescendantFonts ["+g+" 0 R]"),u(">>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]),r.events.push(["putFont",function(i){(function(o){var l=o.font,u=o.out,c=o.newObject,h=o.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var p=l.metadata.rawData,w="",d=0;d<p.length;d++)w+=String.fromCharCode(p[d]);var _=c();h({data:w,addLength1:!0,objectId:_}),u("endobj");var E=c();h({data:n(l.metadata.toUnicode),addLength1:!0,objectId:E}),u("endobj");var S=c();u("<<"),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u("/StemV "+l.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+_+" 0 R"),u("/Flags 96"),u("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),u("/FontName /"+ch(l.fontName)),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u(">>"),u("endobj"),l.objectNumber=c();for(var m=0;m<l.metadata.hmtx.widths.length;m++)l.metadata.hmtx.widths[m]=parseInt(l.metadata.hmtx.widths[m]*(1e3/l.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+E+" 0 R/BaseFont/"+ch(l.fontName)+"/FontDescriptor "+S+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]);var a=function(i){var o,l=i.text||"",u=i.x,c=i.y,h=i.options||{},p=i.mutex||{},w=p.pdfEscape,d=p.activeFontKey,_=p.fonts,E=d,S="",m=0,g="",v=_[E].encoding;if(_[E].encoding!=="Identity-H")return{text:l,x:u,y:c,options:h,mutex:p};for(g=l,E=d,Array.isArray(l)&&(g=l[0]),m=0;m<g.length;m+=1)_[E].metadata.hasOwnProperty("cmap")&&(o=_[E].metadata.cmap.unicode.codeMap[g[m].charCodeAt(0)]),o||g[m].charCodeAt(0)<256&&_[E].metadata.hasOwnProperty("Unicode")?S+=g[m]:S+="";var b="";return parseInt(E.slice(1))<14||v==="WinAnsiEncoding"?b=w(S,E).split("").map(function(O){return O.charCodeAt(0).toString(16)}).join(""):v==="Identity-H"&&(b=t(S,_[E])),p.isHex=!0,{text:b,x:u,y:c,options:h,mutex:p}};r.events.push(["postProcessText",function(i){var o=i.text||"",l=[],u={text:o,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(o)){var c=0;for(c=0;c<o.length;c+=1)Array.isArray(o[c])&&o[c].length===3?l.push([a(Object.assign({},u,{text:o[c][0]})).text,o[c][1],o[c][2]]):l.push(a(Object.assign({},u,{text:o[c]})).text);i.text=l}else i.text=a(Object.assign({},u,{text:o})).text}])}(hr),function(e){var r=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(t){return r.call(this),this.internal.vFS[t]!==void 0},e.addFileToVFS=function(t,n){return r.call(this),this.internal.vFS[t]=n,this},e.getFileFromVFS=function(t){return r.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(hr.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var a,i,o,l,u,c,h,p=r,w=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},E={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},S=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,v=0;this.__bidiEngine__={};var b=function(x){var L=x.charCodeAt(),A=L>>8,N=E[A];return N!==void 0?p[256*N+(255&L)]:A===252||A===253?"AL":m.test(A)?"L":A===8?"R":"N"},O=function(x){for(var L,A=0;A<x.length;A++){if((L=b(x.charAt(A)))==="L")return!1;if(L==="R")return!0}return!1},I=function(x,L,A,N){var F,U,W,$,Z=L[N];switch(Z){case"L":case"R":g=!1;break;case"N":case"AN":break;case"EN":g&&(Z="AN");break;case"AL":g=!0,Z="R";break;case"WS":Z="N";break;case"CS":N<1||N+1>=L.length||(F=A[N-1])!=="EN"&&F!=="AN"||(U=L[N+1])!=="EN"&&U!=="AN"?Z="N":g&&(U="AN"),Z=U===F?U:"N";break;case"ES":Z=(F=N>0?A[N-1]:"B")==="EN"&&N+1<L.length&&L[N+1]==="EN"?"EN":"N";break;case"ET":if(N>0&&A[N-1]==="EN"){Z="EN";break}if(g){Z="N";break}for(W=N+1,$=L.length;W<$&&L[W]==="ET";)W++;Z=W<$&&L[W]==="EN"?"EN":"N";break;case"NSM":if(o&&!l){for($=L.length,W=N+1;W<$&&L[W]==="NSM";)W++;if(W<$){var V=x[N],G=V>=1425&&V<=2303||V===64286;if(F=L[W],G&&(F==="R"||F==="AL")){Z="R";break}}}Z=N<1||(F=L[N-1])==="B"?"N":A[N-1];break;case"B":g=!1,a=!0,Z=v;break;case"S":i=!0,Z="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"BN":Z="N"}return Z},T=function(x,L,A){var N=x.split("");return A&&M(N,A,{hiLevel:v}),N.reverse(),L&&L.reverse(),N.join("")},M=function(x,L,A){var N,F,U,W,$,Z=-1,V=x.length,G=0,z=[],D=v?d:w,K=[];for(g=!1,a=!1,i=!1,F=0;F<V;F++)K[F]=b(x[F]);for(U=0;U<V;U++){if($=G,z[U]=I(x,K,z,U),N=240&(G=D[$][_[z[U]]]),G&=15,L[U]=W=D[G][5],N>0)if(N===16){for(F=Z;F<U;F++)L[F]=1;Z=-1}else Z=-1;if(D[G][6])Z===-1&&(Z=U);else if(Z>-1){for(F=Z;F<U;F++)L[F]=W;Z=-1}K[U]==="B"&&(L[U]=0),A.hiLevel|=W}i&&function(ne,Q,ee){for(var ae=0;ae<ee;ae++)if(ne[ae]==="S"){Q[ae]=v;for(var se=ae-1;se>=0&&ne[se]==="WS";se--)Q[se]=v}}(K,L,V)},j=function(x,L,A,N,F){if(!(F.hiLevel<x)){if(x===1&&v===1&&!a)return L.reverse(),void(A&&A.reverse());for(var U,W,$,Z,V=L.length,G=0;G<V;){if(N[G]>=x){for($=G+1;$<V&&N[$]>=x;)$++;for(Z=G,W=$-1;Z<W;Z++,W--)U=L[Z],L[Z]=L[W],L[W]=U,A&&(U=A[Z],A[Z]=A[W],A[W]=U);G=$}G++}}},C=function(x,L,A){var N=x.split(""),F={hiLevel:v};return A||(A=[]),M(N,A,F),function(U,W,$){if($.hiLevel!==0&&h)for(var Z,V=0;V<U.length;V++)W[V]===1&&(Z=S.indexOf(U[V]))>=0&&(U[V]=S[Z+1])}(N,A,F),j(2,N,L,A,F),j(1,N,L,A,F),N.join("")};return this.__bidiEngine__.doBidiReorder=function(x,L,A){if(function(F,U){if(U)for(var W=0;W<F.length;W++)U[W]=W;l===void 0&&(l=O(F)),c===void 0&&(c=O(F))}(x,L),o||!u||c)if(o&&u&&l^c)v=l?1:0,x=T(x,L,A);else if(!o&&u&&c)v=l?1:0,x=C(x,L,A),x=T(x,L);else if(!o||l||u||c){if(o&&!u&&l^c)x=T(x,L),l?(v=0,x=C(x,L,A)):(v=1,x=C(x,L,A),x=T(x,L));else if(o&&l&&!u&&c)v=1,x=C(x,L,A),x=T(x,L);else if(!o&&!u&&l^c){var N=h;l?(v=1,x=C(x,L,A),v=0,h=!1,x=C(x,L,A),h=N):(v=0,x=C(x,L,A),x=T(x,L),v=1,h=!1,x=C(x,L,A),h=N,x=T(x,L))}}else v=0,x=C(x,L,A);else v=l?1:0,x=C(x,L,A);return x},this.__bidiEngine__.setOptions=function(x){x&&(o=x.isInputVisual,u=x.isOutputVisual,l=x.isInputRtl,c=x.isOutputRtl,h=x.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var r=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(n){var a=n.text;n.x,n.y;var i=n.options||{};n.mutex,i.lang;var o=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,t.setOptions(i),Object.prototype.toString.call(a)==="[object Array]"){var l=0;for(o=[],l=0;l<a.length;l+=1)Object.prototype.toString.call(a[l])==="[object Array]"?o.push([t.doBidiReorder(a[l][0]),a[l][1],a[l][2]]):o.push([t.doBidiReorder(a[l])]);n.text=o}else n.text=t.doBidiReorder(a);t.setOptions({isInputVisual:!0})}])}(hr),hr.API.TTFFont=function(){function e(r){var t;if(this.rawData=r,t=this.contents=new Xc(r),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new dL(this),this.registerTTF()}return e.open=function(r){return new e(r)},e.prototype.parse=function(){return this.directory=new Jk(this.contents),this.head=new tL(this),this.name=new oL(this),this.cmap=new C_(this),this.toUnicode={},this.hhea=new rL(this),this.maxp=new sL(this),this.hmtx=new lL(this),this.post=new iL(this),this.os2=new nL(this),this.loca=new hL(this),this.glyf=new uL(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var r,t,n,a,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,l,u,c;for(c=[],o=0,l=(u=this.bbox).length;o<l;o++)r=u[o],c.push(Math.round(r*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(n=255&(a=this.post.italic_angle),(32768&(t=a>>16))!=0&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(r){var t;return((t=this.cmap.unicode)!=null?t.codeMap[r]:void 0)||0},e.prototype.widthOfGlyph=function(r){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(r).advance*t},e.prototype.widthOfString=function(r,t,n){var a,i,o,l;for(o=0,i=0,l=(r=""+r).length;0<=l?i<l:i>l;i=0<=l?++i:--i)a=r.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/t)||0;return o*(t/1e3)},e.prototype.lineHeight=function(r,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*r},e}();var eu,Xc=function(){function e(r){this.data=r??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(r){return this.data[this.pos++]=r},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(r){return this.writeByte(r>>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt32=function(){var r;return(r=this.readUInt32())>=2147483648?r-4294967296:r},e.prototype.writeInt32=function(r){return r<0&&(r+=4294967296),this.writeUInt32(r)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(r){return this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt16=function(){var r;return(r=this.readUInt16())>=32768?r-65536:r},e.prototype.writeInt16=function(r){return r<0&&(r+=65536),this.writeUInt16(r)},e.prototype.readString=function(r){var t,n;for(n=[],t=0;0<=r?t<r:t>r;t=0<=r?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(r){var t,n,a;for(a=[],t=0,n=r.length;0<=n?t<n:t>n;t=0<=n?++t:--t)a.push(this.writeByte(r.charCodeAt(t)));return a},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(r){return this.writeInt16(r)},e.prototype.readLongLong=function(){var r,t,n,a,i,o,l,u;return r=this.readByte(),t=this.readByte(),n=this.readByte(),a=this.readByte(),i=this.readByte(),o=this.readByte(),l=this.readByte(),u=this.readByte(),128&r?-1*(72057594037927940*(255^r)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^i)+65536*(255^o)+256*(255^l)+(255^u)+1):72057594037927940*r+281474976710656*t+1099511627776*n+4294967296*a+16777216*i+65536*o+256*l+u},e.prototype.writeLongLong=function(r){var t,n;return t=Math.floor(r/4294967296),n=4294967295&r,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(r){return this.writeInt32(r)},e.prototype.read=function(r){var t,n;for(t=[],n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(r){var t,n,a,i;for(i=[],n=0,a=r.length;n<a;n++)t=r[n],i.push(this.writeByte(t));return i},e}(),Jk=function(){var e;function r(t){var n,a,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},a=0,i=this.tableCount;0<=i?a<i:a>i;a=0<=i?++a:--a)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return r.prototype.encode=function(t){var n,a,i,o,l,u,c,h,p,w,d,_,E;for(E in d=Object.keys(t).length,u=Math.log(2),p=16*Math.floor(Math.log(d)/u),o=Math.floor(p/u),h=16*d-p,(a=new Xc).writeInt(this.scalarType),a.writeShort(d),a.writeShort(p),a.writeShort(o),a.writeShort(h),i=16*d,c=a.pos+i,l=null,_=[],t)for(w=t[E],a.writeString(E),a.writeInt(e(w)),a.writeInt(c),a.writeInt(w.length),_=_.concat(w),E==="head"&&(l=c),c+=w.length;c%4;)_.push(0),c++;return a.write(_),n=2981146554-e(a.data),a.pos=l+8,a.writeUInt32(n),a.data},e=function(t){var n,a,i,o;for(t=k_.call(t);t.length%4;)t.push(0);for(i=new Xc(t),a=0,n=0,o=t.length;n<o;n=n+=4)a+=i.readUInt32();return 4294967295&a},r}(),eL={}.hasOwnProperty,Du=function(e,r){for(var t in r)eL.call(r,t)&&(e[t]=r[t]);function n(){this.constructor=e}return n.prototype=r.prototype,e.prototype=new n,e.__super__=r.prototype,e};eu=function(){function e(r){var t;this.file=r,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var tL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="head",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},r.prototype.encode=function(t){var n;return(n=new Xc).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},r}(),uw=function(){function e(r,t){var n,a,i,o,l,u,c,h,p,w,d,_,E,S,m,g,v;switch(this.platformID=r.readUInt16(),this.encodingID=r.readShort(),this.offset=t+r.readInt(),p=r.pos,r.pos=this.offset,this.format=r.readUInt16(),this.length=r.readUInt16(),this.language=r.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=r.readByte();break;case 4:for(d=r.readUInt16(),w=d/2,r.pos+=6,i=function(){var b,O;for(O=[],u=b=0;0<=w?b<w:b>w;u=0<=w?++b:--b)O.push(r.readUInt16());return O}(),r.pos+=2,E=function(){var b,O;for(O=[],u=b=0;0<=w?b<w:b>w;u=0<=w?++b:--b)O.push(r.readUInt16());return O}(),c=function(){var b,O;for(O=[],u=b=0;0<=w?b<w:b>w;u=0<=w?++b:--b)O.push(r.readUInt16());return O}(),h=function(){var b,O;for(O=[],u=b=0;0<=w?b<w:b>w;u=0<=w?++b:--b)O.push(r.readUInt16());return O}(),a=(this.length-r.pos+this.offset)/2,l=function(){var b,O;for(O=[],u=b=0;0<=a?b<a:b>a;u=0<=a?++b:--b)O.push(r.readUInt16());return O}(),u=m=0,v=i.length;m<v;u=++m)for(S=i[u],n=g=_=E[u];_<=S?g<=S:g>=S;n=_<=S?++g:--g)h[u]===0?o=n+c[u]:(o=l[h[u]/2+(n-_)-(w-u)]||0)!==0&&(o+=c[u]),this.codeMap[n]=65535&o}r.pos=p}return e.encode=function(r,t){var n,a,i,o,l,u,c,h,p,w,d,_,E,S,m,g,v,b,O,I,T,M,j,C,x,L,A,N,F,U,W,$,Z,V,G,z,D,K,ne,Q,ee,ae,se,ce,me,Se;switch(N=new Xc,o=Object.keys(r).sort(function(Oe,Ne){return Oe-Ne}),t){case"macroman":for(E=0,S=function(){var Oe=[];for(_=0;_<256;++_)Oe.push(0);return Oe}(),g={0:0},i={},F=0,Z=o.length;F<Z;F++)g[se=r[a=o[F]]]==null&&(g[se]=++E),i[a]={old:r[a],new:g[r[a]]},S[a]=g[r[a]];return N.writeUInt16(1),N.writeUInt16(0),N.writeUInt32(12),N.writeUInt16(0),N.writeUInt16(262),N.writeUInt16(0),N.write(S),{charMap:i,subtable:N.data,maxGlyphID:E+1};case"unicode":for(L=[],p=[],v=0,g={},n={},m=c=null,U=0,V=o.length;U<V;U++)g[O=r[a=o[U]]]==null&&(g[O]=++v),n[a]={old:O,new:g[O]},l=g[O]-a,m!=null&&l===c||(m&&p.push(m),L.push(a),c=l),m=a;for(m&&p.push(m),p.push(65535),L.push(65535),C=2*(j=L.length),M=2*Math.pow(Math.log(j)/Math.LN2,2),w=Math.log(M/2)/Math.LN2,T=2*j-M,u=[],I=[],d=[],_=W=0,G=L.length;W<G;_=++W){if(x=L[_],h=p[_],x===65535){u.push(0),I.push(0);break}if(x-(A=n[x].new)>=32768)for(u.push(0),I.push(2*(d.length+j-_)),a=$=x;x<=h?$<=h:$>=h;a=x<=h?++$:--$)d.push(n[a].new);else u.push(A-x),I.push(0)}for(N.writeUInt16(3),N.writeUInt16(1),N.writeUInt32(12),N.writeUInt16(4),N.writeUInt16(16+8*j+2*d.length),N.writeUInt16(0),N.writeUInt16(C),N.writeUInt16(M),N.writeUInt16(w),N.writeUInt16(T),ee=0,z=p.length;ee<z;ee++)a=p[ee],N.writeUInt16(a);for(N.writeUInt16(0),ae=0,D=L.length;ae<D;ae++)a=L[ae],N.writeUInt16(a);for(ce=0,K=u.length;ce<K;ce++)l=u[ce],N.writeUInt16(l);for(me=0,ne=I.length;me<ne;me++)b=I[me],N.writeUInt16(b);for(Se=0,Q=d.length;Se<Q;Se++)E=d[Se],N.writeUInt16(E);return{charMap:n,subtable:N.data,maxGlyphID:v+1}}},e}(),C_=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="cmap",r.prototype.parse=function(t){var n,a,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,a=0;0<=i?a<i:a>i;a=0<=i?++a:--a)n=new uw(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},r.encode=function(t,n){var a,i;return n==null&&(n="macroman"),a=uw.encode(t,n),(i=new Xc).writeUInt16(0),i.writeUInt16(1),a.table=i.data.concat(a.subtable),a},r}(),rL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="hhea",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},r}(),nL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="OS/2",r.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,a;for(a=[],n=0;n<10;++n)a.push(t.readByte());return a}(),this.charRange=function(){var n,a;for(a=[],n=0;n<4;++n)a.push(t.readInt());return a}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,a;for(a=[],n=0;n<2;n=++n)a.push(t.readInt());return a}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},r}(),iL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="post",r.prototype.parse=function(t){var n,a,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:var o;for(a=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=a?o<a:o>a;o=0<=a?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)n=t.readByte(),i.push(this.names.push(t.readString(n)));return i;case 151552:return a=t.readUInt16(),this.offsets=t.read(a);case 196608:break;case 262144:return this.map=(function(){var l,u,c;for(c=[],o=l=0,u=this.file.maxp.numGlyphs;0<=u?l<u:l>u;o=0<=u?++l:--l)c.push(t.readUInt32());return c}).call(this)}},r}(),aL=function(e,r){this.raw=e,this.length=e.length,this.platformID=r.platformID,this.encodingID=r.encodingID,this.languageID=r.languageID},oL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="name",r.prototype.parse=function(t){var n,a,i,o,l,u,c,h,p,w,d;for(t.pos=this.offset,t.readShort(),n=t.readShort(),u=t.readShort(),a=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)a.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+u+t.readShort()});for(c={},o=p=0,w=a.length;p<w;o=++p)i=a[o],t.pos=i.offset,h=t.readString(i.length),l=new aL(h,i),c[d=i.nameID]==null&&(c[d]=[]),c[i.nameID].push(l);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},r}(),sL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="maxp",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},r}(),lL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="hmtx",r.prototype.parse=function(t){var n,a,i,o,l,u,c;for(t.pos=this.offset,this.metrics=[],n=0,u=this.file.hhea.numberOfMetrics;0<=u?n<u:n>u;n=0<=u?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var h,p;for(p=[],n=h=0;0<=i?h<i:h>i;n=0<=i?++h:--h)p.push(t.readInt16());return p}(),this.widths=(function(){var h,p,w,d;for(d=[],h=0,p=(w=this.metrics).length;h<p;h++)o=w[h],d.push(o.advance);return d}).call(this),a=this.widths[this.widths.length-1],c=[],n=l=0;0<=i?l<i:l>i;n=0<=i?++l:--l)c.push(this.widths.push(a));return c},r.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},r}(),k_=[].slice,uL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(t){var n,a,i,o,l,u,c,h,p,w;return t in this.cache?this.cache[t]:(o=this.file.loca,n=this.file.contents,a=o.indexOf(t),(i=o.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+a,l=(u=new Xc(n.read(i))).readShort(),h=u.readShort(),w=u.readShort(),c=u.readShort(),p=u.readShort(),this.cache[t]=l===-1?new fL(u,h,w,c,p):new cL(u,l,h,w,c,p),this.cache[t]))},r.prototype.encode=function(t,n,a){var i,o,l,u,c;for(l=[],o=[],u=0,c=n.length;u<c;u++)i=t[n[u]],o.push(l.length),i&&(l=l.concat(i.encode(a)));return o.push(l.length),{table:l,offsets:o}},r}(),cL=function(){function e(r,t,n,a,i,o){this.raw=r,this.numberOfContours=t,this.xMin=n,this.yMin=a,this.xMax=i,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),fL=function(){function e(r,t,n,a,i){var o,l;for(this.raw=r,this.xMin=t,this.yMin=n,this.xMax=a,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;l=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&l;)o.pos+=1&l?4:2,128&l?o.pos+=8:64&l?o.pos+=4:8&l&&(o.pos+=2)}return e.prototype.encode=function(){var r,t,n;for(t=new Xc(k_.call(this.raw.data)),r=0,n=this.glyphIDs.length;r<n;++r)t.pos=this.glyphOffsets[r];return t.data},e}(),hL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="loca",r.prototype.parse=function(t){var n,a;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,o;for(o=[],a=0,i=this.length;a<i;a+=2)o.push(2*t.readUInt16());return o}).call(this):(function(){var i,o;for(o=[],a=0,i=this.length;a<i;a+=4)o.push(t.readUInt32());return o}).call(this)},r.prototype.indexOf=function(t){return this.offsets[t]},r.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},r.prototype.encode=function(t,n){for(var a=new Uint32Array(this.offsets.length),i=0,o=0,l=0;l<a.length;++l)if(a[l]=i,o<n.length&&n[o]==l){++o,a[l]=i;var u=this.offsets[l],c=this.offsets[l+1]-u;c>0&&(i+=c)}for(var h=new Array(4*a.length),p=0;p<a.length;++p)h[4*p+3]=255&a[p],h[4*p+2]=(65280&a[p])>>8,h[4*p+1]=(16711680&a[p])>>16,h[4*p]=(4278190080&a[p])>>24;return h},r}(),dL=function(){function e(r){this.font=r,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var r,t,n,a,i;for(t in a=this.font.cmap.tables[0].codeMap,r={},i=this.subset)n=i[t],r[t]=a[n];return r},e.prototype.glyphsFor=function(r){var t,n,a,i,o,l,u;for(a={},o=0,l=r.length;o<l;o++)a[i=r[o]]=this.font.glyf.glyphFor(i);for(i in t=[],a)(n=a[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in u=this.glyphsFor(t))n=u[i],a[i]=n;return a},e.prototype.encode=function(r,t){var n,a,i,o,l,u,c,h,p,w,d,_,E,S,m;for(a in n=C_.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(r),d={0:0},m=n.charMap)d[(u=m[a]).old]=u.new;for(_ in w=n.maxGlyphID,o)_ in d||(d[_]=w++);return h=function(g){var v,b;for(v in b={},g)b[g[v]]=v;return b}(d),p=Object.keys(h).sort(function(g,v){return g-v}),E=function(){var g,v,b;for(b=[],g=0,v=p.length;g<v;g++)l=p[g],b.push(h[l]);return b}(),i=this.font.glyf.encode(o,E,d),c=this.font.loca.encode(i.offsets,E),S={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(S["OS/2"]=this.font.os2.raw()),this.font.directory.encode(S)},e}();hr.API.PDFObject=function(){var e;function r(){}return e=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},r.convert=function(t){var n,a,i,o;if(Array.isArray(t))return"["+function(){var l,u,c;for(c=[],l=0,u=t.length;l<u;l++)n=t[l],c.push(r.convert(n));return c}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+e(t.getUTCFullYear(),4)+e(t.getUTCMonth(),2)+e(t.getUTCDate(),2)+e(t.getUTCHours(),2)+e(t.getUTCMinutes(),2)+e(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(a in i=["<<"],t)o=t[a],i.push("/"+a+" "+r.convert(o));return i.push(">>"),i.join(`
|
|
561
|
-
`)}return""+t},r}();window.jspdf={jsPDF:hr};dk.toggleFadeInAnimation(!1);np.setTextOverflow("change-font-size");const pL=new URLSearchParams(location.search).get("key"),L_=hk.createStore({key:pL});window.store=L_;window.config={addGlobalFont:pk.addGlobalFont,unstable_useHtmlTextRender:np.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:np.setTextVerticalResizeEnabled,unstable_setTextOverflow:np.setTextOverflow,onLoadError:t2.onLoadError,setAssetLoadTimeout:t2.setAssetLoadTimeout,setFontLoadTimeout:t2.setFontLoadTimeout,unstable_setTextSplitAllowed:np.setTextSplitAllowed};const gL=fw.createRoot(document.getElementById("root"));gL.render(Vr.createElement(fk.WorkspaceCanvas,{visiblePagesOffset:0,renderOnlyActivePage:!0,store:L_,components:{PageControls:()=>null,Tooltip:()=>null}}));export{On as _,wh as c,mp as g};
|