memctx 1.0.10 → 1.0.12
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/dashboard/dist/assets/index-BlydT9ue.js +712 -0
- package/dashboard/dist/assets/index-CahA5NDR.css +1 -0
- package/dashboard/dist/assets/{index.es-D85_UUf8.js → index.es-DQCQVjyb.js} +1 -1
- package/dashboard/dist/assets/{jszip.min-CSBY1G_D.js → jszip.min-B4jg4J0T.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/src/api/graph.d.ts +3 -0
- package/dist/src/api/graph.js +144 -0
- package/dist/src/api/graph.js.map +1 -0
- package/dist/src/db/graph-queries.d.ts +28 -0
- package/dist/src/db/graph-queries.js +65 -0
- package/dist/src/db/graph-queries.js.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/middleware/rate-limit.js +2 -2
- package/dist/src/middleware/rate-limit.js.map +1 -1
- package/dist/src/services/graph-extractor.d.ts +26 -0
- package/dist/src/services/graph-extractor.js +68 -0
- package/dist/src/services/graph-extractor.js.map +1 -0
- package/package.json +1 -1
- package/dashboard/dist/assets/index-B83_W4qH.css +0 -1
- package/dashboard/dist/assets/index-DDN6Gx1_.js +0 -628
|
@@ -0,0 +1,712 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();var wwe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pV(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var k0={exports:{}},rv={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 VC;function iJ(){if(VC)return rv;VC=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var u in i)u!=="key"&&(a[u]=i[u])}else a=i;return i=a.ref,{$$typeof:r,type:n,key:o,ref:i!==void 0?i:null,props:a}}return rv.Fragment=e,rv.jsx=t,rv.jsxs=t,rv}var YC;function aJ(){return YC||(YC=1,k0.exports=iJ()),k0.exports}var w=aJ(),N0={exports:{}},ir={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 KC;function sJ(){if(KC)return ir;KC=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),v=Symbol.iterator;function y(Z){return Z===null||typeof Z!="object"?null:(Z=v&&Z[v]||Z["@@iterator"],typeof Z=="function"?Z:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function A(Z,oe,L){this.props=Z,this.context=oe,this.refs=E,this.updater=L||g}A.prototype.isReactComponent={},A.prototype.setState=function(Z,oe){if(typeof Z!="object"&&typeof Z!="function"&&Z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Z,oe,"setState")},A.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};function T(){}T.prototype=A.prototype;function C(Z,oe,L){this.props=Z,this.context=oe,this.refs=E,this.updater=L||g}var N=C.prototype=new T;N.constructor=C,_(N,A.prototype),N.isPureReactComponent=!0;var k=Array.isArray,j={H:null,A:null,T:null,S:null,V:null},W=Object.prototype.hasOwnProperty;function G(Z,oe,L,Y,te,de){return L=de.ref,{$$typeof:r,type:Z,key:oe,ref:L!==void 0?L:null,props:de}}function D(Z,oe){return G(Z.type,oe,void 0,void 0,void 0,Z.props)}function M(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===r}function U(Z){var oe={"=":"=0",":":"=2"};return"$"+Z.replace(/[=:]/g,function(L){return oe[L]})}var I=/\/+/g;function q(Z,oe){return typeof Z=="object"&&Z!==null&&Z.key!=null?U(""+Z.key):oe.toString(36)}function z(){}function Q(Z){switch(Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason;default:switch(typeof Z.status=="string"?Z.then(z,z):(Z.status="pending",Z.then(function(oe){Z.status==="pending"&&(Z.status="fulfilled",Z.value=oe)},function(oe){Z.status==="pending"&&(Z.status="rejected",Z.reason=oe)})),Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason}}throw Z}function ce(Z,oe,L,Y,te){var de=typeof Z;(de==="undefined"||de==="boolean")&&(Z=null);var ue=!1;if(Z===null)ue=!0;else switch(de){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(Z.$$typeof){case r:case e:ue=!0;break;case f:return ue=Z._init,ce(ue(Z._payload),oe,L,Y,te)}}if(ue)return te=te(Z),ue=Y===""?"."+q(Z,0):Y,k(te)?(L="",ue!=null&&(L=ue.replace(I,"$&/")+"/"),ce(te,oe,L,"",function(Ie){return Ie})):te!=null&&(M(te)&&(te=D(te,L+(te.key==null||Z&&Z.key===te.key?"":(""+te.key).replace(I,"$&/")+"/")+ue)),oe.push(te)),1;ue=0;var we=Y===""?".":Y+":";if(k(Z))for(var Se=0;Se<Z.length;Se++)Y=Z[Se],de=we+q(Y,Se),ue+=ce(Y,oe,L,de,te);else if(Se=y(Z),typeof Se=="function")for(Z=Se.call(Z),Se=0;!(Y=Z.next()).done;)Y=Y.value,de=we+q(Y,Se++),ue+=ce(Y,oe,L,de,te);else if(de==="object"){if(typeof Z.then=="function")return ce(Q(Z),oe,L,Y,te);throw oe=String(Z),Error("Objects are not valid as a React child (found: "+(oe==="[object Object]"?"object with keys {"+Object.keys(Z).join(", ")+"}":oe)+"). If you meant to render a collection of children, use an array instead.")}return ue}function re(Z,oe,L){if(Z==null)return Z;var Y=[],te=0;return ce(Z,Y,"","",function(de){return oe.call(L,de,te++)}),Y}function J(Z){if(Z._status===-1){var oe=Z._result;oe=oe(),oe.then(function(L){(Z._status===0||Z._status===-1)&&(Z._status=1,Z._result=L)},function(L){(Z._status===0||Z._status===-1)&&(Z._status=2,Z._result=L)}),Z._status===-1&&(Z._status=0,Z._result=oe)}if(Z._status===1)return Z._result.default;throw Z._result}var le=typeof reportError=="function"?reportError:function(Z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var oe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z=="object"&&Z!==null&&typeof Z.message=="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(oe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Z);return}console.error(Z)};function ye(){}return ir.Children={map:re,forEach:function(Z,oe,L){re(Z,function(){oe.apply(this,arguments)},L)},count:function(Z){var oe=0;return re(Z,function(){oe++}),oe},toArray:function(Z){return re(Z,function(oe){return oe})||[]},only:function(Z){if(!M(Z))throw Error("React.Children.only expected to receive a single React element child.");return Z}},ir.Component=A,ir.Fragment=t,ir.Profiler=i,ir.PureComponent=C,ir.StrictMode=n,ir.Suspense=c,ir.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,ir.__COMPILER_RUNTIME={__proto__:null,c:function(Z){return j.H.useMemoCache(Z)}},ir.cache=function(Z){return function(){return Z.apply(null,arguments)}},ir.cloneElement=function(Z,oe,L){if(Z==null)throw Error("The argument must be a React element, but you passed "+Z+".");var Y=_({},Z.props),te=Z.key,de=void 0;if(oe!=null)for(ue in oe.ref!==void 0&&(de=void 0),oe.key!==void 0&&(te=""+oe.key),oe)!W.call(oe,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&oe.ref===void 0||(Y[ue]=oe[ue]);var ue=arguments.length-2;if(ue===1)Y.children=L;else if(1<ue){for(var we=Array(ue),Se=0;Se<ue;Se++)we[Se]=arguments[Se+2];Y.children=we}return G(Z.type,te,void 0,void 0,de,Y)},ir.createContext=function(Z){return Z={$$typeof:o,_currentValue:Z,_currentValue2:Z,_threadCount:0,Provider:null,Consumer:null},Z.Provider=Z,Z.Consumer={$$typeof:a,_context:Z},Z},ir.createElement=function(Z,oe,L){var Y,te={},de=null;if(oe!=null)for(Y in oe.key!==void 0&&(de=""+oe.key),oe)W.call(oe,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(te[Y]=oe[Y]);var ue=arguments.length-2;if(ue===1)te.children=L;else if(1<ue){for(var we=Array(ue),Se=0;Se<ue;Se++)we[Se]=arguments[Se+2];te.children=we}if(Z&&Z.defaultProps)for(Y in ue=Z.defaultProps,ue)te[Y]===void 0&&(te[Y]=ue[Y]);return G(Z,de,void 0,void 0,null,te)},ir.createRef=function(){return{current:null}},ir.forwardRef=function(Z){return{$$typeof:u,render:Z}},ir.isValidElement=M,ir.lazy=function(Z){return{$$typeof:f,_payload:{_status:-1,_result:Z},_init:J}},ir.memo=function(Z,oe){return{$$typeof:h,type:Z,compare:oe===void 0?null:oe}},ir.startTransition=function(Z){var oe=j.T,L={};j.T=L;try{var Y=Z(),te=j.S;te!==null&&te(L,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(ye,le)}catch(de){le(de)}finally{j.T=oe}},ir.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},ir.use=function(Z){return j.H.use(Z)},ir.useActionState=function(Z,oe,L){return j.H.useActionState(Z,oe,L)},ir.useCallback=function(Z,oe){return j.H.useCallback(Z,oe)},ir.useContext=function(Z){return j.H.useContext(Z)},ir.useDebugValue=function(){},ir.useDeferredValue=function(Z,oe){return j.H.useDeferredValue(Z,oe)},ir.useEffect=function(Z,oe,L){var Y=j.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Y.useEffect(Z,oe)},ir.useId=function(){return j.H.useId()},ir.useImperativeHandle=function(Z,oe,L){return j.H.useImperativeHandle(Z,oe,L)},ir.useInsertionEffect=function(Z,oe){return j.H.useInsertionEffect(Z,oe)},ir.useLayoutEffect=function(Z,oe){return j.H.useLayoutEffect(Z,oe)},ir.useMemo=function(Z,oe){return j.H.useMemo(Z,oe)},ir.useOptimistic=function(Z,oe){return j.H.useOptimistic(Z,oe)},ir.useReducer=function(Z,oe,L){return j.H.useReducer(Z,oe,L)},ir.useRef=function(Z){return j.H.useRef(Z)},ir.useState=function(Z){return j.H.useState(Z)},ir.useSyncExternalStore=function(Z,oe,L){return j.H.useSyncExternalStore(Z,oe,L)},ir.useTransition=function(){return j.H.useTransition()},ir.version="19.1.0",ir}var XC;function w6(){return XC||(XC=1,N0.exports=sJ()),N0.exports}var he=w6();const oJ=pV(he);var I0={exports:{}},nv={},P0={exports:{}},j0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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 QC;function lJ(){return QC||(QC=1,(function(r){function e(re,J){var le=re.length;re.push(J);e:for(;0<le;){var ye=le-1>>>1,Z=re[ye];if(0<i(Z,J))re[ye]=J,re[le]=Z,le=ye;else break e}}function t(re){return re.length===0?null:re[0]}function n(re){if(re.length===0)return null;var J=re[0],le=re.pop();if(le!==J){re[0]=le;e:for(var ye=0,Z=re.length,oe=Z>>>1;ye<oe;){var L=2*(ye+1)-1,Y=re[L],te=L+1,de=re[te];if(0>i(Y,le))te<Z&&0>i(de,Y)?(re[ye]=de,re[te]=le,ye=te):(re[ye]=Y,re[L]=le,ye=L);else if(te<Z&&0>i(de,le))re[ye]=de,re[te]=le,ye=te;else break e}}return J}function i(re,J){var le=re.sortIndex-J.sortIndex;return le!==0?le:re.id-J.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;r.unstable_now=function(){return a.now()}}else{var o=Date,u=o.now();r.unstable_now=function(){return o.now()-u}}var c=[],h=[],f=1,v=null,y=3,g=!1,_=!1,E=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function k(re){for(var J=t(h);J!==null;){if(J.callback===null)n(h);else if(J.startTime<=re)n(h),J.sortIndex=J.expirationTime,e(c,J);else break;J=t(h)}}function j(re){if(E=!1,k(re),!_)if(t(c)!==null)_=!0,W||(W=!0,q());else{var J=t(h);J!==null&&ce(j,J.startTime-re)}}var W=!1,G=-1,D=5,M=-1;function U(){return A?!0:!(r.unstable_now()-M<D)}function I(){if(A=!1,W){var re=r.unstable_now();M=re;var J=!0;try{e:{_=!1,E&&(E=!1,C(G),G=-1),g=!0;var le=y;try{t:{for(k(re),v=t(c);v!==null&&!(v.expirationTime>re&&U());){var ye=v.callback;if(typeof ye=="function"){v.callback=null,y=v.priorityLevel;var Z=ye(v.expirationTime<=re);if(re=r.unstable_now(),typeof Z=="function"){v.callback=Z,k(re),J=!0;break t}v===t(c)&&n(c),k(re)}else n(c);v=t(c)}if(v!==null)J=!0;else{var oe=t(h);oe!==null&&ce(j,oe.startTime-re),J=!1}}break e}finally{v=null,y=le,g=!1}J=void 0}}finally{J?q():W=!1}}}var q;if(typeof N=="function")q=function(){N(I)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,Q=z.port2;z.port1.onmessage=I,q=function(){Q.postMessage(null)}}else q=function(){T(I,0)};function ce(re,J){G=T(function(){re(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(re){re.callback=null},r.unstable_forceFrameRate=function(re){0>re||125<re?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<re?Math.floor(1e3/re):5},r.unstable_getCurrentPriorityLevel=function(){return y},r.unstable_next=function(re){switch(y){case 1:case 2:case 3:var J=3;break;default:J=y}var le=y;y=J;try{return re()}finally{y=le}},r.unstable_requestPaint=function(){A=!0},r.unstable_runWithPriority=function(re,J){switch(re){case 1:case 2:case 3:case 4:case 5:break;default:re=3}var le=y;y=re;try{return J()}finally{y=le}},r.unstable_scheduleCallback=function(re,J,le){var ye=r.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?ye+le:ye):le=ye,re){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=le+Z,re={id:f++,callback:J,priorityLevel:re,startTime:le,expirationTime:Z,sortIndex:-1},le>ye?(re.sortIndex=le,e(h,re),t(c)===null&&re===t(h)&&(E?(C(G),G=-1):E=!0,ce(j,le-ye))):(re.sortIndex=Z,e(c,re),_||g||(_=!0,W||(W=!0,q()))),re},r.unstable_shouldYield=U,r.unstable_wrapCallback=function(re){var J=y;return function(){var le=y;y=J;try{return re.apply(this,arguments)}finally{y=le}}}})(j0)),j0}var ZC;function uJ(){return ZC||(ZC=1,P0.exports=lJ()),P0.exports}var M0={exports:{}},Ji={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var JC;function cJ(){if(JC)return Ji;JC=1;var r=w6();function e(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)h+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(c,h,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:v==null?null:""+v,children:c,containerInfo:h,implementation:f}}var o=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ji.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ji.createPortal=function(c,h){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return a(c,h,null,f)},Ji.flushSync=function(c){var h=o.T,f=n.p;try{if(o.T=null,n.p=2,c)return c()}finally{o.T=h,n.p=f,n.d.f()}},Ji.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(c,h))},Ji.prefetchDNS=function(c){typeof c=="string"&&n.d.D(c)},Ji.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var f=h.as,v=u(f,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,g=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;f==="style"?n.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:g}):f==="script"&&n.d.X(c,{crossOrigin:v,integrity:y,fetchPriority:g,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ji.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var f=u(h.as,h.crossOrigin);n.d.M(c,{crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(c)},Ji.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var f=h.as,v=u(f,h.crossOrigin);n.d.L(c,f,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ji.preloadModule=function(c,h){if(typeof c=="string")if(h){var f=u(h.as,h.crossOrigin);n.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(c)},Ji.requestFormReset=function(c){n.d.r(c)},Ji.unstable_batchedUpdates=function(c,h){return c(h)},Ji.useFormState=function(c,h,f){return o.H.useFormState(c,h,f)},Ji.useFormStatus=function(){return o.H.useHostTransitionStatus()},Ji.version="19.1.0",Ji}var ek;function dJ(){if(ek)return M0.exports;ek=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),M0.exports=cJ(),M0.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var tk;function hJ(){if(tk)return nv;tk=1;var r=uJ(),e=w6(),t=dJ();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function o(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(a(s)!==s)throw Error(n(188))}function c(s){var l=s.alternate;if(!l){if(l=a(s),l===null)throw Error(n(188));return l!==s?null:s}for(var d=s,p=l;;){var b=d.return;if(b===null)break;var S=b.alternate;if(S===null){if(p=b.return,p!==null){d=p;continue}break}if(b.child===S.child){for(S=b.child;S;){if(S===d)return u(b),s;if(S===p)return u(b),l;S=S.sibling}throw Error(n(188))}if(d.return!==p.return)d=b,p=S;else{for(var $=!1,K=b.child;K;){if(K===d){$=!0,d=b,p=S;break}if(K===p){$=!0,p=b,d=S;break}K=K.sibling}if(!$){for(K=S.child;K;){if(K===d){$=!0,d=S,p=b;break}if(K===p){$=!0,p=S,d=b;break}K=K.sibling}if(!$)throw Error(n(189))}}if(d.alternate!==p)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var f=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),N=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function q(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var z=Symbol.for("react.client.reference");function Q(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===z?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case W:return"SuspenseList";case M:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case g:return"Portal";case N:return(s.displayName||"Context")+".Provider";case C:return(s._context.displayName||"Context")+".Consumer";case k:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case G:return l=s.displayName||null,l!==null?l:Q(s.type)||"Memo";case D:l=s._payload,s=s._init;try{return Q(s(l))}catch{}}return null}var ce=Array.isArray,re=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ye=[],Z=-1;function oe(s){return{current:s}}function L(s){0>Z||(s.current=ye[Z],ye[Z]=null,Z--)}function Y(s,l){Z++,ye[Z]=s.current,s.current=l}var te=oe(null),de=oe(null),ue=oe(null),we=oe(null);function Se(s,l){switch(Y(ue,l),Y(de,s),Y(te,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?xC(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=xC(l),s=_C(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}L(te),Y(te,s)}function Ie(){L(te),L(de),L(ue)}function Le(s){s.memoizedState!==null&&Y(we,s);var l=te.current,d=_C(l,s.type);l!==d&&(Y(de,s),Y(te,d))}function Ve(s){de.current===s&&(L(te),L(de)),we.current===s&&(L(we),Qp._currentValue=le)}var tt=Object.prototype.hasOwnProperty,Xe=r.unstable_scheduleCallback,dt=r.unstable_cancelCallback,ne=r.unstable_shouldYield,et=r.unstable_requestPaint,st=r.unstable_now,ot=r.unstable_getCurrentPriorityLevel,We=r.unstable_ImmediatePriority,vt=r.unstable_UserBlockingPriority,it=r.unstable_NormalPriority,yt=r.unstable_LowPriority,ut=r.unstable_IdlePriority,qt=r.log,Wt=r.unstable_setDisableYieldValue,At=null,Tt=null;function It(s){if(typeof qt=="function"&&Wt(s),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(At,s)}catch{}}var nt=Math.clz32?Math.clz32:Ke,jt=Math.log,ze=Math.LN2;function Ke(s){return s>>>=0,s===0?32:31-(jt(s)/ze|0)|0}var fe=256,ke=4194304;function Be(s){var l=s&42;if(l!==0)return l;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ht(s,l,d){var p=s.pendingLanes;if(p===0)return 0;var b=0,S=s.suspendedLanes,$=s.pingedLanes;s=s.warmLanes;var K=p&134217727;return K!==0?(p=K&~S,p!==0?b=Be(p):($&=K,$!==0?b=Be($):d||(d=K&~s,d!==0&&(b=Be(d))))):(K=p&~S,K!==0?b=Be(K):$!==0?b=Be($):d||(d=p&~s,d!==0&&(b=Be(d)))),b===0?0:l!==0&&l!==b&&(l&S)===0&&(S=b&-b,d=l&-l,S>=d||S===32&&(d&4194048)!==0)?l:b}function lt(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function or(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ct(){var s=fe;return fe<<=1,(fe&4194048)===0&&(fe=256),s}function Mt(){var s=ke;return ke<<=1,(ke&62914560)===0&&(ke=4194304),s}function zt(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Ht(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Pt(s,l,d,p,b,S){var $=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var K=s.entanglements,pe=s.expirationTimes,Re=s.hiddenUpdates;for(d=$&~d;0<d;){var $e=31-nt(d),He=1<<$e;K[$e]=0,pe[$e]=-1;var Ce=Re[$e];if(Ce!==null)for(Re[$e]=null,$e=0;$e<Ce.length;$e++){var Ne=Ce[$e];Ne!==null&&(Ne.lane&=-536870913)}d&=~He}p!==0&&yr(s,p,0),S!==0&&b===0&&s.tag!==0&&(s.suspendedLanes|=S&~($&~l))}function yr(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var p=31-nt(l);s.entangledLanes|=l,s.entanglements[p]=s.entanglements[p]|1073741824|d&4194090}function vs(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var p=31-nt(d),b=1<<p;b&l|s[p]&l&&(s[p]|=l),d&=~b}}function Cr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Ua(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Ha(){var s=J.p;return s!==0?s:(s=window.event,s===void 0?32:FC(s.type))}function Dt(s,l){var d=J.p;try{return J.p=s,l()}finally{J.p=d}}var pi=Math.random().toString(36).slice(2),Qr="__reactFiber$"+pi,Hr="__reactProps$"+pi,ai="__reactContainer$"+pi,Zr="__reactEvents$"+pi,Yn="__reactListeners$"+pi,si="__reactHandles$"+pi,Ro="__reactResources$"+pi,_a="__reactMarker$"+pi;function ia(s){delete s[Qr],delete s[Hr],delete s[Zr],delete s[Yn],delete s[si]}function Mi(s){var l=s[Qr];if(l)return l;for(var d=s.parentNode;d;){if(l=d[ai]||d[Qr]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=OC(s);s!==null;){if(d=s[Qr])return d;s=OC(s)}return l}s=d,d=s.parentNode}return null}function vi(s){if(s=s[Qr]||s[ai]){var l=s.tag;if(l===5||l===6||l===13||l===26||l===27||l===3)return s}return null}function Di(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function oi(s){var l=s[Ro];return l||(l=s[Ro]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Jr(s){s[_a]=!0}var Wa=new Set,Co={};function Sa(s,l){Ga(s,l),Ga(s+"Capture",l)}function Ga(s,l){for(Co[s]=l,s=0;s<l.length;s++)Wa.add(l[s])}var xu=RegExp("^[: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]*$"),lh={},_u={};function uh(s){return tt.call(_u,s)?!0:tt.call(lh,s)?!1:xu.test(s)?_u[s]=!0:(lh[s]=!0,!1)}function yl(s,l,d){if(uh(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function qi(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function aa(s,l,d,p){if(p===null)s.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+p)}}var Su,Eu;function Us(s){if(Su===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Su=l&&l[1]||"",Eu=-1<d.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Su+s+Eu}var Tu=!1;function Ou(s,l){if(!s||Tu)return"";Tu=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var He=function(){throw Error()};if(Object.defineProperty(He.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(He,[])}catch(Ne){var Ce=Ne}Reflect.construct(s,[],He)}else{try{He.call()}catch(Ne){Ce=Ne}s.call(He.prototype)}}else{try{throw Error()}catch(Ne){Ce=Ne}(He=s())&&typeof He.catch=="function"&&He.catch(function(){})}}catch(Ne){if(Ne&&Ce&&typeof Ne.stack=="string")return[Ne.stack,Ce.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=p.DetermineComponentFrameRoot(),$=S[0],K=S[1];if($&&K){var pe=$.split(`
|
|
44
|
+
`),Re=K.split(`
|
|
45
|
+
`);for(b=p=0;p<pe.length&&!pe[p].includes("DetermineComponentFrameRoot");)p++;for(;b<Re.length&&!Re[b].includes("DetermineComponentFrameRoot");)b++;if(p===pe.length||b===Re.length)for(p=pe.length-1,b=Re.length-1;1<=p&&0<=b&&pe[p]!==Re[b];)b--;for(;1<=p&&0<=b;p--,b--)if(pe[p]!==Re[b]){if(p!==1||b!==1)do if(p--,b--,0>b||pe[p]!==Re[b]){var $e=`
|
|
46
|
+
`+pe[p].replace(" at new "," at ");return s.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",s.displayName)),$e}while(1<=p&&0<=b);break}}}finally{Tu=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?Us(d):""}function gs(s){switch(s.tag){case 26:case 27:case 5:return Us(s.type);case 16:return Us("Lazy");case 13:return Us("Suspense");case 19:return Us("SuspenseList");case 0:case 15:return Ou(s.type,!1);case 11:return Ou(s.type.render,!1);case 1:return Ou(s.type,!0);case 31:return Us("Activity");default:return""}}function bl(s){try{var l="";do l+=gs(s),s=s.return;while(s);return l}catch(d){return`
|
|
47
|
+
Error generating stack: `+d.message+`
|
|
48
|
+
`+d.stack}}function Zi(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function yn(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ch(s){var l=yn(s)?"checked":"value",d=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),p=""+s[l];if(!s.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var b=d.get,S=d.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return b.call(this)},set:function($){p=""+$,S.call(this,$)}}),Object.defineProperty(s,l,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function($){p=""+$},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function sa(s){s._valueTracker||(s._valueTracker=ch(s))}function wl(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return s&&(p=yn(s)?s.checked?"true":"false":s.value),s=p,s!==d?(l.setValue(s),!0):!1}function ko(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}}var oa=/[\n"\\]/g;function li(s){return s.replace(oa,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Va(s,l,d,p,b,S,$,K){s.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?s.type=$:s.removeAttribute("type"),l!=null?$==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Zi(l)):s.value!==""+Zi(l)&&(s.value=""+Zi(l)):$!=="submit"&&$!=="reset"||s.removeAttribute("value"),l!=null?Au(s,$,Zi(l)):d!=null?Au(s,$,Zi(d)):p!=null&&s.removeAttribute("value"),b==null&&S!=null&&(s.defaultChecked=!!S),b!=null&&(s.checked=b&&typeof b!="function"&&typeof b!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Zi(K):s.removeAttribute("name")}function Kn(s,l,d,p,b,S,$,K){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||d!=null){if(!(S!=="submit"&&S!=="reset"||l!=null))return;d=d!=null?""+Zi(d):"",l=l!=null?""+Zi(l):d,K||l===s.value||(s.value=l),s.defaultValue=l}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,s.checked=K?s.checked:!!p,s.defaultChecked=!!p,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(s.name=$)}function Au(s,l,d){l==="number"&&ko(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function No(s,l,d,p){if(s=s.options,l){l={};for(var b=0;b<d.length;b++)l["$"+d[b]]=!0;for(d=0;d<s.length;d++)b=l.hasOwnProperty("$"+s[d].value),s[d].selected!==b&&(s[d].selected=b),b&&p&&(s[d].defaultSelected=!0)}else{for(d=""+Zi(d),l=null,b=0;b<s.length;b++){if(s[b].value===d){s[b].selected=!0,p&&(s[b].defaultSelected=!0);return}l!==null||s[b].disabled||(l=s[b])}l!==null&&(l.selected=!0)}}function dh(s,l,d){if(l!=null&&(l=""+Zi(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Zi(d):""}function hh(s,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(n(92));if(ce(p)){if(1<p.length)throw Error(n(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=Zi(l),s.defaultValue=d,p=s.textContent,p===d&&p!==""&&p!==null&&(s.value=p)}function Li(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var fh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xl(s,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":p?s.setProperty(l,d):typeof d!="number"||d===0||fh.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function _l(s,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?s.setProperty(p,""):p==="float"?s.cssFloat="":s[p]="");for(var b in l)p=l[b],l.hasOwnProperty(b)&&d[b]!==p&&xl(s,b,p)}else for(var S in l)l.hasOwnProperty(S)&&xl(s,S,l[S])}function Sl(s){if(s.indexOf("-")===-1)return!1;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 vp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ru(s){return gp.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}var ms=null;function Cu(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var la=null,Io=null;function Po(s){var l=vi(s);if(l&&(s=l.stateNode)){var d=s[Hr]||null;e:switch(s=l.stateNode,l.type){case"input":if(Va(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+li(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==s&&p.form===s.form){var b=p[Hr]||null;if(!b)throw Error(n(90));Va(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===s.form&&wl(p)}break e;case"textarea":dh(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&No(s,!!d.multiple,l,!1)}}}var Lt=!1;function ph(s,l,d){if(Lt)return s(l,d);Lt=!0;try{var p=s(l);return p}finally{if(Lt=!1,(la!==null||Io!==null)&&(vm(),la&&(l=la,s=Io,Io=la=null,Po(l),s)))for(l=0;l<s.length;l++)Po(s[l])}}function El(s,l){var d=s.stateNode;if(d===null)return null;var p=d[Hr]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var Ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(Ya)try{var Tl={};Object.defineProperty(Tl,"passive",{get:function(){zc=!0}}),window.addEventListener("test",Tl,Tl),window.removeEventListener("test",Tl,Tl)}catch{zc=!1}var gi=null,Ka=null,ku=null;function vh(){if(ku)return ku;var s,l=Ka,d=l.length,p,b="value"in gi?gi.value:gi.textContent,S=b.length;for(s=0;s<d&&l[s]===b[s];s++);var $=d-s;for(p=1;p<=$&&l[d-p]===b[S-p];p++);return ku=b.slice(s,1<p?1-p:void 0)}function Hs(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function jo(){return!0}function Xa(){return!1}function mi(s){function l(d,p,b,S,$){this._reactName=d,this._targetInst=b,this.type=p,this.nativeEvent=S,this.target=$,this.currentTarget=null;for(var K in s)s.hasOwnProperty(K)&&(d=s[K],this[K]=d?d(S):S[K]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?jo:Xa,this.isPropagationStopped=Xa,this}return f(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=jo)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=jo)},persist:function(){},isPersistent:jo}),l}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nu=mi(Ea),Ws=f({},Ea,{view:0,detail:0}),Mo=mi(Ws),Ol,Gs,Vs,Ys=f({},Ws,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Me,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!==Vs&&(Vs&&s.type==="mousemove"?(Ol=s.screenX-Vs.screenX,Gs=s.screenY-Vs.screenY):Gs=Ol=0,Vs=s),Ol)},movementY:function(s){return"movementY"in s?s.movementY:Gs}}),Iu=mi(Ys),Pu=f({},Ys,{dataTransfer:0}),gh=mi(Pu),Ks=f({},Ws,{relatedTarget:0}),Qa=mi(Ks),mh=f({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),yh=mi(mh),bh=f({},Ea,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Al=mi(bh),wh=f({},Ea,{data:0}),O=mi(wh),B={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ie={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"},ve={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xe(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=ve[s])?!!l[s]:!1}function Me(){return xe}var Ge=f({},Ws,{key:function(s){if(s.key){var l=B[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Hs(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?ie[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Me,charCode:function(s){return s.type==="keypress"?Hs(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Hs(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),bt=mi(Ge),gt=f({},Ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gt=mi(gt),er=f({},Ws,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Me}),fr=mi(er),Rn=f({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nr=mi(Rn),kr=f({},Ys,{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}),Wr=mi(kr),an=f({},Ea,{newState:0,oldState:0}),sn=mi(an),yi=[9,13,27,32],Za=Ya&&"CompositionEvent"in window,Xs=null;Ya&&"documentMode"in document&&(Xs=document.documentMode);var Rl=Ya&&"TextEvent"in window&&!Xs,Do=Ya&&(!Za||Xs&&8<Xs&&11>=Xs),Qs=" ",qo=!1;function Cl(s,l){switch(s){case"keyup":return yi.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kl(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var bn=!1;function Nl(s,l){switch(s){case"compositionend":return kl(l);case"keypress":return l.which!==32?null:(qo=!0,Qs);case"textInput":return s=l.data,s===Qs&&qo?null:s;default:return null}}function Il(s,l){if(bn)return s==="compositionend"||!Za&&Cl(s,l)?(s=vh(),ku=Ka=gi=null,bn=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Do&&l.locale!=="ko"?null:l.data;default:return null}}var Uc={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 Ja(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!Uc[s.type]:l==="textarea"}function bi(s,l,d,p){la?Io?Io.push(p):Io=[p]:la=p,l=xm(l,"onChange"),0<l.length&&(d=new Nu("onChange","change",null,d,p),s.push({event:d,listeners:l}))}var Lo=null,ys=null;function xh(s){gC(s,0)}function $i(s){var l=Di(s);if(wl(l))return s}function $o(s,l){if(s==="change")return l}var ju=!1;if(Ya){var Bo;if(Ya){var Zs="oninput"in document;if(!Zs){var Mu=document.createElement("div");Mu.setAttribute("oninput","return;"),Zs=typeof Mu.oninput=="function"}Bo=Zs}else Bo=!1;ju=Bo&&(!document.documentMode||9<document.documentMode)}function wi(){Lo&&(Lo.detachEvent("onpropertychange",Bi),ys=Lo=null)}function Bi(s){if(s.propertyName==="value"&&$i(ys)){var l=[];bi(l,ys,s,Cu(s)),ph(xh,l)}}function Du(s,l,d){s==="focusin"?(wi(),Lo=l,ys=d,Lo.attachEvent("onpropertychange",Bi)):s==="focusout"&&wi()}function Fo(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return $i(ys)}function zo(s,l){if(s==="click")return $i(l)}function qu(s,l){if(s==="input"||s==="change")return $i(l)}function Pl(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var wr=typeof Object.is=="function"?Object.is:Pl;function jl(s,l){if(wr(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var b=d[p];if(!tt.call(l,b)||!wr(s[b],l[b]))return!1}return!0}function es(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ta(s,l){var d=es(s);s=0;for(var p;d;){if(d.nodeType===3){if(p=s+d.textContent.length,s<=l&&p>=l)return{node:d,offset:l-s};s=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=es(d)}}function Uo(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Uo(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function Lu(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=ko(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=ko(s.document)}return l}function Ml(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var $u=Ya&&"documentMode"in document&&11>=document.documentMode,Oa=null,Js=null,Aa=null,ts=!1;function eo(s,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;ts||Oa==null||Oa!==ko(p)||(p=Oa,"selectionStart"in p&&Ml(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Aa&&jl(Aa,p)||(Aa=p,p=xm(Js,"onSelect"),0<p.length&&(l=new Nu("onSelect","select",null,l,d),s.push({event:l,listeners:p}),l.target=Oa)))}function Ra(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var wn={animationend:Ra("Animation","AnimationEnd"),animationiteration:Ra("Animation","AnimationIteration"),animationstart:Ra("Animation","AnimationStart"),transitionrun:Ra("Transition","TransitionRun"),transitionstart:Ra("Transition","TransitionStart"),transitioncancel:Ra("Transition","TransitionCancel"),transitionend:Ra("Transition","TransitionEnd")},Ca={},Ir={};Ya&&(Ir=document.createElement("div").style,"AnimationEvent"in window||(delete wn.animationend.animation,delete wn.animationiteration.animation,delete wn.animationstart.animation),"TransitionEvent"in window||delete wn.transitionend.transition);function xr(s){if(Ca[s])return Ca[s];if(!wn[s])return s;var l=wn[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in Ir)return Ca[s]=l[d];return s}var un=xr("animationend"),Cn=xr("animationiteration"),bs=xr("animationstart"),Hc=xr("transitionrun"),Bu=xr("transitionstart"),_h=xr("transitioncancel"),mp=xr("transitionend"),yp=new Map,Sh="abort auxClick beforeToggle 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(" ");Sh.push("scrollEnd");function ka(s,l){yp.set(s,l),Sa(l,[s])}var Fu=new WeakMap;function ua(s,l){if(typeof s=="object"&&s!==null){var d=Fu.get(s);return d!==void 0?d:(l={value:s,source:l,stack:bl(l)},Fu.set(s,l),l)}return{value:s,source:l,stack:bl(l)}}var ca=[],Dl=0,Eh=0;function Wc(){for(var s=Dl,l=Eh=Dl=0;l<s;){var d=ca[l];ca[l++]=null;var p=ca[l];ca[l++]=null;var b=ca[l];ca[l++]=null;var S=ca[l];if(ca[l++]=null,p!==null&&b!==null){var $=p.pending;$===null?b.next=b:(b.next=$.next,$.next=b),p.pending=b}S!==0&&Oh(d,b,S)}}function Gc(s,l,d,p){ca[Dl++]=s,ca[Dl++]=l,ca[Dl++]=d,ca[Dl++]=p,Eh|=p,s.lanes|=p,s=s.alternate,s!==null&&(s.lanes|=p)}function Th(s,l,d,p){return Gc(s,l,d,p),Ll(s)}function ql(s,l){return Gc(s,null,null,l),Ll(s)}function Oh(s,l,d){s.lanes|=d;var p=s.alternate;p!==null&&(p.lanes|=d);for(var b=!1,S=s.return;S!==null;)S.childLanes|=d,p=S.alternate,p!==null&&(p.childLanes|=d),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(b=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,b&&l!==null&&(b=31-nt(d),s=S.hiddenUpdates,p=s[b],p===null?s[b]=[l]:p.push(l),l.lane=d|536870912),S):null}function Ll(s){if(50<Up)throw Up=0,e0=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Xn={};function Na(s,l,d,p){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(s,l,d,p){return new Na(s,l,d,p)}function zu(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ws(s,l){var d=s.alternate;return d===null?(d=xi(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function Vc(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function $l(s,l,d,p,b,S){var $=0;if(p=s,typeof s=="function")zu(s)&&($=1);else if(typeof s=="string")$=WZ(s,d,te.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case M:return s=xi(31,d,l,b),s.elementType=M,s.lanes=S,s;case _:return to(d.children,b,S,l);case E:$=8,b|=24;break;case A:return s=xi(12,d,l,b|2),s.elementType=A,s.lanes=S,s;case j:return s=xi(13,d,l,b),s.elementType=j,s.lanes=S,s;case W:return s=xi(19,d,l,b),s.elementType=W,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:case N:$=10;break e;case C:$=9;break e;case k:$=11;break e;case G:$=14;break e;case D:$=16,p=null;break e}$=29,d=Error(n(130,s===null?"null":typeof s,"")),p=null}return l=xi($,d,l,b),l.elementType=s,l.type=p,l.lanes=S,l}function to(s,l,d,p){return s=xi(7,s,p,l),s.lanes=d,s}function Ah(s,l,d){return s=xi(6,s,null,l),s.lanes=d,s}function Yc(s,l,d){return l=xi(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var Ho=[],ro=0,Uu=null,Rh=0,Ia=[],da=0,Bl=null,no=1,io="";function Fl(s,l){Ho[ro++]=Rh,Ho[ro++]=Uu,Uu=s,Rh=l}function $g(s,l,d){Ia[da++]=no,Ia[da++]=io,Ia[da++]=Bl,Bl=s;var p=no;s=io;var b=32-nt(p)-1;p&=~(1<<b),d+=1;var S=32-nt(l)+b;if(30<S){var $=b-b%5;S=(p&(1<<$)-1).toString(32),p>>=$,b-=$,no=1<<32-nt(l)+b|d<<b|p,io=S+s}else no=1<<S|d<<b|p,io=s}function Kc(s){s.return!==null&&(Fl(s,1),$g(s,1,0))}function Xc(s){for(;s===Uu;)Uu=Ho[--ro],Ho[ro]=null,Rh=Ho[--ro],Ho[ro]=null;for(;s===Bl;)Bl=Ia[--da],Ia[da]=null,io=Ia[--da],Ia[da]=null,no=Ia[--da],Ia[da]=null}var Dn=null,cn=null,Tr=!1,Wo=null,xs=!1,bp=Error(n(519));function zl(s){var l=Error(n(418,""));throw Hu(ua(l,s)),bp}function Bg(s){var l=s.stateNode,d=s.type,p=s.memoizedProps;switch(l[Qr]=s,l[Hr]=p,d){case"dialog":hr("cancel",l),hr("close",l);break;case"iframe":case"object":case"embed":hr("load",l);break;case"video":case"audio":for(d=0;d<Wp.length;d++)hr(Wp[d],l);break;case"source":hr("error",l);break;case"img":case"image":case"link":hr("error",l),hr("load",l);break;case"details":hr("toggle",l);break;case"input":hr("invalid",l),Kn(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0),sa(l);break;case"select":hr("invalid",l);break;case"textarea":hr("invalid",l),hh(l,p.value,p.defaultValue,p.children),sa(l)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||wC(l.textContent,d)?(p.popover!=null&&(hr("beforetoggle",l),hr("toggle",l)),p.onScroll!=null&&hr("scroll",l),p.onScrollEnd!=null&&hr("scrollend",l),p.onClick!=null&&(l.onclick=_m),l=!0):l=!1,l||zl(s)}function ao(s){for(Dn=s.return;Dn;)switch(Dn.tag){case 5:case 13:xs=!1;return;case 27:case 3:xs=!0;return;default:Dn=Dn.return}}function Fi(s){if(s!==Dn)return!1;if(!Tr)return ao(s),Tr=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||g0(s.type,s.memoizedProps)),d=!d),d&&cn&&zl(s),ao(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8)if(d=s.data,d==="/$"){if(l===0){cn=po(s.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++;s=s.nextSibling}cn=null}}else l===27?(l=cn,sc(s.type)?(s=w0,w0=null,cn=s):cn=l):cn=Dn?po(s.stateNode.nextSibling):null;return!0}function ha(){cn=Dn=null,Tr=!1}function Fg(){var s=Wo;return s!==null&&(ja===null?ja=s:ja.push.apply(ja,s),Wo=null),s}function Hu(s){Wo===null?Wo=[s]:Wo.push(s)}var _s=oe(null),Qn=null,so=null;function Go(s,l,d){Y(_s,l._currentValue),l._currentValue=d}function Ss(s){s._currentValue=_s.current,L(_s)}function Ch(s,l,d){for(;s!==null;){var p=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),s===d)break;s=s.return}}function kh(s,l,d,p){var b=s.child;for(b!==null&&(b.return=s);b!==null;){var S=b.dependencies;if(S!==null){var $=b.child;S=S.firstContext;e:for(;S!==null;){var K=S;S=b;for(var pe=0;pe<l.length;pe++)if(K.context===l[pe]){S.lanes|=d,K=S.alternate,K!==null&&(K.lanes|=d),Ch(S.return,d,s),p||($=null);break e}S=K.next}}else if(b.tag===18){if($=b.return,$===null)throw Error(n(341));$.lanes|=d,S=$.alternate,S!==null&&(S.lanes|=d),Ch($,d,s),$=null}else $=b.child;if($!==null)$.return=b;else for($=b;$!==null;){if($===s){$=null;break}if(b=$.sibling,b!==null){b.return=$.return,$=b;break}$=$.return}b=$}}function Wu(s,l,d,p){s=null;for(var b=l,S=!1;b!==null;){if(!S){if((b.flags&524288)!==0)S=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var $=b.alternate;if($===null)throw Error(n(387));if($=$.memoizedProps,$!==null){var K=b.type;wr(b.pendingProps.value,$.value)||(s!==null?s.push(K):s=[K])}}else if(b===we.current){if($=b.alternate,$===null)throw Error(n(387));$.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(s!==null?s.push(Qp):s=[Qp])}b=b.return}s!==null&&kh(l,s,d,p),l.flags|=262144}function Nh(s){for(s=s.firstContext;s!==null;){if(!wr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Es(s){Qn=s,so=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function qn(s){return Ih(Qn,s)}function Vo(s,l){return Qn===null&&Es(s),Ih(s,l)}function Ih(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},so===null){if(s===null)throw Error(n(308));so=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else so=so.next=l;return d}var Ty=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,p){s.push(p)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},zg=r.unstable_scheduleCallback,Oy=r.unstable_NormalPriority,Ln={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wp(){return{controller:new Ty,data:new Map,refCount:0}}function Qc(s){s.refCount--,s.refCount===0&&zg(Oy,function(){s.controller.abort()})}var Zc=null,xp=0,Ul=0,oo=null;function Ay(s,l){if(Zc===null){var d=Zc=[];xp=0,Ul=o0(),oo={status:"pending",value:void 0,then:function(p){d.push(p)}}}return xp++,l.then(Ug,Ug),l}function Ug(){if(--xp===0&&Zc!==null){oo!==null&&(oo.status="fulfilled");var s=Zc;Zc=null,Ul=0,oo=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function Hg(s,l){var d=[],p={status:"pending",value:null,reason:null,then:function(b){d.push(b)}};return s.then(function(){p.status="fulfilled",p.value=l;for(var b=0;b<d.length;b++)(0,d[b])(l)},function(b){for(p.status="rejected",p.reason=b,b=0;b<d.length;b++)(0,d[b])(void 0)}),p}var m=re.S;re.S=function(s,l){typeof l=="object"&&l!==null&&typeof l.then=="function"&&Ay(s,l),m!==null&&m(s,l)};var x=oe(null);function R(){var s=x.current;return s!==null?s:en.pooledCache}function P(s,l){l===null?Y(x,x.current):Y(x,l.pool)}function F(){var s=R();return s===null?null:{parent:Ln._currentValue,pool:s}}var H=Error(n(460)),V=Error(n(474)),X=Error(n(542)),ee={then:function(){}};function se(s){return s=s.status,s==="fulfilled"||s==="rejected"}function ge(){}function Ae(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(ge,ge),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ee(s),s;default:if(typeof l.status=="string")l.then(ge,ge);else{if(s=en,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(p){if(l.status==="pending"){var b=l;b.status="fulfilled",b.value=p}},function(p){if(l.status==="pending"){var b=l;b.status="rejected",b.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ee(s),s}throw ae=l,H}}var ae=null;function be(){if(ae===null)throw Error(n(459));var s=ae;return ae=null,s}function Ee(s){if(s===H||s===X)throw Error(n(483))}var Pe=!1;function Oe(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qe(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function De(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ye(s,l,d){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(jr&2)!==0){var b=p.pending;return b===null?l.next=l:(l.next=b.next,b.next=l),p.pending=l,l=Ll(s),Oh(s,null,d),l}return Gc(s,p,l,d),Ll(s)}function Ue(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=s.pendingLanes,d|=p,l.lanes=d,vs(s,d)}}function St(s,l){var d=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var b=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var $={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};S===null?b=S=$:S=S.next=$,d=d.next}while(d!==null);S===null?b=S=l:S=S.next=l}else b=S=l;d={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:S,shared:p.shared,callbacks:p.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var ct=!1;function Kt(){if(ct){var s=oo;if(s!==null)throw s}}function ft(s,l,d,p){ct=!1;var b=s.updateQueue;Pe=!1;var S=b.firstBaseUpdate,$=b.lastBaseUpdate,K=b.shared.pending;if(K!==null){b.shared.pending=null;var pe=K,Re=pe.next;pe.next=null,$===null?S=Re:$.next=Re,$=pe;var $e=s.alternate;$e!==null&&($e=$e.updateQueue,K=$e.lastBaseUpdate,K!==$&&(K===null?$e.firstBaseUpdate=Re:K.next=Re,$e.lastBaseUpdate=pe))}if(S!==null){var He=b.baseState;$=0,$e=Re=pe=null,K=S;do{var Ce=K.lane&-536870913,Ne=Ce!==K.lane;if(Ne?(Sr&Ce)===Ce:(p&Ce)===Ce){Ce!==0&&Ce===Ul&&(ct=!0),$e!==null&&($e=$e.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var Yt=s,Bt=K;Ce=l;var Ur=d;switch(Bt.tag){case 1:if(Yt=Bt.payload,typeof Yt=="function"){He=Yt.call(Ur,He,Ce);break e}He=Yt;break e;case 3:Yt.flags=Yt.flags&-65537|128;case 0:if(Yt=Bt.payload,Ce=typeof Yt=="function"?Yt.call(Ur,He,Ce):Yt,Ce==null)break e;He=f({},He,Ce);break e;case 2:Pe=!0}}Ce=K.callback,Ce!==null&&(s.flags|=64,Ne&&(s.flags|=8192),Ne=b.callbacks,Ne===null?b.callbacks=[Ce]:Ne.push(Ce))}else Ne={lane:Ce,tag:K.tag,payload:K.payload,callback:K.callback,next:null},$e===null?(Re=$e=Ne,pe=He):$e=$e.next=Ne,$|=Ce;if(K=K.next,K===null){if(K=b.shared.pending,K===null)break;Ne=K,K=Ne.next,Ne.next=null,b.lastBaseUpdate=Ne,b.shared.pending=null}}while(!0);$e===null&&(pe=He),b.baseState=pe,b.firstBaseUpdate=Re,b.lastBaseUpdate=$e,S===null&&(b.shared.lanes=0),rc|=$,s.lanes=$,s.memoizedState=He}}function lr(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function kn(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)lr(d[s],l)}var Vt=oe(null),pt=oe(0);function rt(s,l){s=Ql,Y(pt,s),Y(Vt,l),Ql=s|l.baseLanes}function on(){Y(pt,Ql),Y(Vt,Vt.current)}function Xt(){Ql=pt.current,L(Vt),L(pt)}var rr=0,mt=null,Zt=null,pr=null,Gr=!1,xn=!1,_n=!1,dn=0,ar=0,vr=null,hn=0;function $t(){throw Error(n(321))}function $n(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!wr(s[d],l[d]))return!1;return!0}function fa(s,l,d,p,b,S){return rr=S,mt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,re.H=s===null||s.memoizedState===null?eR:tR,_n=!1,S=d(p,b),_n=!1,xn&&(S=zi(l,d,p,b)),fn(s),S}function fn(s){re.H=rm;var l=Zt!==null&&Zt.next!==null;if(rr=0,pr=Zt=mt=null,Gr=!1,ar=0,vr=null,l)throw Error(n(300));s===null||Si||(s=s.dependencies,s!==null&&Nh(s)&&(Si=!0))}function zi(s,l,d,p){mt=s;var b=0;do{if(xn&&(vr=null),ar=0,xn=!1,25<=b)throw Error(n(301));if(b+=1,pr=Zt=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}re.H=rZ,S=l(d,p)}while(xn);return S}function Pr(){var s=re.H,l=s.useState()[0];return l=typeof l.then=="function"?ci(l):l,s=s.useState()[0],(Zt!==null?Zt.memoizedState:null)!==s&&(mt.flags|=1024),l}function Sn(){var s=dn!==0;return dn=0,s}function Ui(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function ui(s){if(Gr){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Gr=!1}rr=0,pr=Zt=mt=null,xn=!1,ar=dn=0,vr=null}function Fr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pr===null?mt.memoizedState=pr=s:pr=pr.next=s,pr}function _r(){if(Zt===null){var s=mt.alternate;s=s!==null?s.memoizedState:null}else s=Zt.next;var l=pr===null?mt.memoizedState:pr.next;if(l!==null)pr=l,Zt=s;else{if(s===null)throw mt.alternate===null?Error(n(467)):Error(n(310));Zt=s,s={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},pr===null?mt.memoizedState=pr=s:pr=pr.next=s}return pr}function _i(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(s){var l=ar;return ar+=1,vr===null&&(vr=[]),s=Ae(vr,s,l),l=mt,(pr===null?l.memoizedState:pr.next)===null&&(l=l.alternate,re.H=l===null||l.memoizedState===null?eR:tR),s}function Rr(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return ci(s);if(s.$$typeof===N)return qn(s)}throw Error(n(438,String(s)))}function Hi(s){var l=null,d=mt.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=mt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(b){return b.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=_i(),mt.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),p=0;p<s;p++)d[p]=U;return l.index++,d}function Bn(s,l){return typeof l=="function"?l(s):l}function Ts(s){var l=_r();return rs(l,Zt,s)}function rs(s,l,d){var p=s.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=d;var b=s.baseQueue,S=p.pending;if(S!==null){if(b!==null){var $=b.next;b.next=S.next,S.next=$}l.baseQueue=b=S,p.pending=null}if(S=s.baseState,b===null)s.memoizedState=S;else{l=b.next;var K=$=null,pe=null,Re=l,$e=!1;do{var He=Re.lane&-536870913;if(He!==Re.lane?(Sr&He)===He:(rr&He)===He){var Ce=Re.revertLane;if(Ce===0)pe!==null&&(pe=pe.next={lane:0,revertLane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),He===Ul&&($e=!0);else if((rr&Ce)===Ce){Re=Re.next,Ce===Ul&&($e=!0);continue}else He={lane:0,revertLane:Re.revertLane,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},pe===null?(K=pe=He,$=S):pe=pe.next=He,mt.lanes|=Ce,rc|=Ce;He=Re.action,_n&&d(S,He),S=Re.hasEagerState?Re.eagerState:d(S,He)}else Ce={lane:He,revertLane:Re.revertLane,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},pe===null?(K=pe=Ce,$=S):pe=pe.next=Ce,mt.lanes|=He,rc|=He;Re=Re.next}while(Re!==null&&Re!==l);if(pe===null?$=S:pe.next=K,!wr(S,s.memoizedState)&&(Si=!0,$e&&(d=oo,d!==null)))throw d;s.memoizedState=S,s.baseState=$,s.baseQueue=pe,p.lastRenderedState=S}return b===null&&(p.lanes=0),[s.memoizedState,p.dispatch]}function Fn(s){var l=_r(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var p=d.dispatch,b=d.pending,S=l.memoizedState;if(b!==null){d.pending=null;var $=b=b.next;do S=s(S,$.action),$=$.next;while($!==b);wr(S,l.memoizedState)||(Si=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,p]}function Jc(s,l,d){var p=mt,b=_r(),S=Tr;if(S){if(d===void 0)throw Error(n(407));d=d()}else d=l();var $=!wr((Zt||b).memoizedState,d);$&&(b.memoizedState=d,Si=!0),b=b.queue;var K=Gu.bind(null,p,b,s);if(Ku(2048,8,K,[s]),b.getSnapshot!==l||$||pr!==null&&pr.memoizedState.tag&1){if(p.flags|=2048,uo(9,nd(),ed.bind(null,p,b,d,l),null),en===null)throw Error(n(349));S||(rr&124)!==0||Ph(p,l,d)}return d}function Ph(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=mt.updateQueue,l===null?(l=_i(),mt.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function ed(s,l,d,p){l.value=d,l.getSnapshot=p,Wg(l)&&Gg(s)}function Gu(s,l,d){return d(function(){Wg(l)&&Gg(s)})}function Wg(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!wr(s,d)}catch{return!0}}function Gg(s){var l=ql(s,2);l!==null&&ls(l,s,2)}function td(s){var l=Fr();if(typeof s=="function"){var d=s;if(s=d(),_n){It(!0);try{d()}finally{It(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:s},l}function lo(s,l,d,p){return s.baseState=d,rs(s,Zt,typeof p=="function"?p:Bn)}function Ry(s,l,d,p,b){if(tm(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:b,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){S.listeners.push($)}};re.T!==null?d(!0):S.isTransition=!1,p(S),d=l.pending,d===null?(S.next=l.pending=S,Vg(l,S)):(S.next=d.next,l.pending=d.next=S)}}function Vg(s,l){var d=l.action,p=l.payload,b=s.state;if(l.isTransition){var S=re.T,$={};re.T=$;try{var K=d(b,p),pe=re.S;pe!==null&&pe($,K),Yg(s,l,K)}catch(Re){Vu(s,l,Re)}finally{re.T=S}}else try{S=d(b,p),Yg(s,l,S)}catch(Re){Vu(s,l,Re)}}function Yg(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){_p(s,l,p)},function(p){return Vu(s,l,p)}):_p(s,l,d)}function _p(s,l,d){l.status="fulfilled",l.value=d,Sp(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Vg(s,d)))}function Vu(s,l,d){var p=s.pending;if(s.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,Sp(l),l=l.next;while(l!==p)}s.action=null}function Sp(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function Ep(s,l){return l}function rd(s,l){if(Tr){var d=en.formState;if(d!==null){e:{var p=mt;if(Tr){if(cn){t:{for(var b=cn,S=xs;b.nodeType!==8;){if(!S){b=null;break t}if(b=po(b.nextSibling),b===null){b=null;break t}}S=b.data,b=S==="F!"||S==="F"?b:null}if(b){cn=po(b.nextSibling),p=b.data==="F!";break e}}zl(p)}p=!1}p&&(l=d[0])}}return d=Fr(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ep,lastRenderedState:l},d.queue=p,d=QA.bind(null,mt,p),p.dispatch=d,p=td(!1),S=Cy.bind(null,mt,!1,p.queue),p=Fr(),b={state:l,dispatch:null,action:s,pending:null},p.queue=b,d=Ry.bind(null,mt,b,S,d),b.dispatch=d,p.memoizedState=s,[l,d,!1]}function jh(s){var l=_r();return Yu(l,Zt,s)}function Yu(s,l,d){if(l=rs(s,l,Ep)[0],s=Ts(Bn)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ci(l)}catch($){throw $===H?X:$}else p=l;l=_r();var b=l.queue,S=b.dispatch;return d!==l.memoizedState&&(mt.flags|=2048,uo(9,nd(),Kg.bind(null,b,d),null)),[p,S,s]}function Kg(s,l){s.action=l}function Xg(s){var l=_r(),d=Zt;if(d!==null)return Yu(l,d,s);_r(),l=l.memoizedState,d=_r();var p=d.queue.dispatch;return d.memoizedState=s,[l,p,!1]}function uo(s,l,d,p){return s={tag:s,create:d,deps:p,inst:l,next:null},l=mt.updateQueue,l===null&&(l=_i(),mt.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(p=d.next,d.next=s,s.next=p,l.lastEffect=s),s}function nd(){return{destroy:void 0,resource:void 0}}function Mh(){return _r().memoizedState}function ns(s,l,d,p){var b=Fr();p=p===void 0?null:p,mt.flags|=s,b.memoizedState=uo(1|l,nd(),d,p)}function Ku(s,l,d,p){var b=_r();p=p===void 0?null:p;var S=b.memoizedState.inst;Zt!==null&&p!==null&&$n(p,Zt.memoizedState.deps)?b.memoizedState=uo(l,S,d,p):(mt.flags|=s,b.memoizedState=uo(1|l,S,d,p))}function Tp(s,l){ns(8390656,8,s,l)}function Qg(s,l){Ku(2048,8,s,l)}function Op(s,l){return Ku(4,2,s,l)}function Hl(s,l){return Ku(4,4,s,l)}function Zg(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function Ap(s,l,d){d=d!=null?d.concat([s]):null,Ku(4,4,Zg.bind(null,l,s),d)}function Rp(){}function Cp(s,l){var d=_r();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&$n(l,p[1])?p[0]:(d.memoizedState=[s,l],s)}function Jg(s,l){var d=_r();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&$n(l,p[1]))return p[0];if(p=s(),_n){It(!0);try{s()}finally{It(!1)}}return d.memoizedState=[p,l],p}function Wl(s,l,d){return d===void 0||(rr&1073741824)!==0?s.memoizedState=l:(s.memoizedState=d,s=VR(),mt.lanes|=s,rc|=s,d)}function Dh(s,l,d,p){return wr(d,l)?d:Vt.current!==null?(s=Wl(s,d,p),wr(s,l)||(Si=!0),s):(rr&42)===0?(Si=!0,s.memoizedState=d):(s=VR(),mt.lanes|=s,rc|=s,l)}function id(s,l,d,p,b){var S=J.p;J.p=S!==0&&8>S?S:8;var $=re.T,K={};re.T=K,Cy(s,!1,l,d);try{var pe=b(),Re=re.S;if(Re!==null&&Re(K,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var $e=Hg(pe,p);Pp(s,l,$e,os(s))}else Pp(s,l,p,os(s))}catch(He){Pp(s,l,{then:function(){},status:"rejected",reason:He},os())}finally{J.p=S,re.T=$}}function co(){}function Os(s,l,d,p){if(s.tag!==5)throw Error(n(476));var b=ho(s).queue;id(s,b,l,le,d===null?co:function(){return ad(s),d(p)})}function ho(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:le},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function ad(s){var l=ho(s).next.queue;Pp(s,l,{},os())}function sd(){return qn(Qp)}function kp(){return _r().memoizedState}function em(){return _r().memoizedState}function Np(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=os();s=De(d);var p=Ye(l,s,d);p!==null&&(ls(p,l,d),Ue(p,l,d)),l={cache:wp()},s.payload=l;return}l=l.return}}function Ip(s,l,d){var p=os();d={lane:p,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null},tm(s)?ZA(l,d):(d=Th(s,l,d,p),d!==null&&(ls(d,s,p),JA(d,l,p)))}function QA(s,l,d){var p=os();Pp(s,l,d,p)}function Pp(s,l,d,p){var b={lane:p,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null};if(tm(s))ZA(l,b);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var $=l.lastRenderedState,K=S($,d);if(b.hasEagerState=!0,b.eagerState=K,wr(K,$))return Gc(s,l,b,0),en===null&&Wc(),!1}catch{}if(d=Th(s,l,b,p),d!==null)return ls(d,s,p),JA(d,l,p),!0}return!1}function Cy(s,l,d,p){if(p={lane:2,revertLane:o0(),action:p,hasEagerState:!1,eagerState:null,next:null},tm(s)){if(l)throw Error(n(479))}else l=Th(s,d,p,2),l!==null&&ls(l,s,2)}function tm(s){var l=s.alternate;return s===mt||l!==null&&l===mt}function ZA(s,l){xn=Gr=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function JA(s,l,d){if((d&4194048)!==0){var p=l.lanes;p&=s.pendingLanes,d|=p,l.lanes=d,vs(s,d)}}var rm={readContext:qn,use:Rr,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t},eR={readContext:qn,use:Rr,useCallback:function(s,l){return Fr().memoizedState=[s,l===void 0?null:l],s},useContext:qn,useEffect:Tp,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,ns(4194308,4,Zg.bind(null,l,s),d)},useLayoutEffect:function(s,l){return ns(4194308,4,s,l)},useInsertionEffect:function(s,l){ns(4,2,s,l)},useMemo:function(s,l){var d=Fr();l=l===void 0?null:l;var p=s();if(_n){It(!0);try{s()}finally{It(!1)}}return d.memoizedState=[p,l],p},useReducer:function(s,l,d){var p=Fr();if(d!==void 0){var b=d(l);if(_n){It(!0);try{d(l)}finally{It(!1)}}}else b=l;return p.memoizedState=p.baseState=b,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:b},p.queue=s,s=s.dispatch=Ip.bind(null,mt,s),[p.memoizedState,s]},useRef:function(s){var l=Fr();return s={current:s},l.memoizedState=s},useState:function(s){s=td(s);var l=s.queue,d=QA.bind(null,mt,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:Rp,useDeferredValue:function(s,l){var d=Fr();return Wl(d,s,l)},useTransition:function(){var s=td(!1);return s=id.bind(null,mt,s.queue,!0,!1),Fr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var p=mt,b=Fr();if(Tr){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),en===null)throw Error(n(349));(Sr&124)!==0||Ph(p,l,d)}b.memoizedState=d;var S={value:d,getSnapshot:l};return b.queue=S,Tp(Gu.bind(null,p,S,s),[s]),p.flags|=2048,uo(9,nd(),ed.bind(null,p,S,d,l),null),d},useId:function(){var s=Fr(),l=en.identifierPrefix;if(Tr){var d=io,p=no;d=(p&~(1<<32-nt(p)-1)).toString(32)+d,l="«"+l+"R"+d,d=dn++,0<d&&(l+="H"+d.toString(32)),l+="»"}else d=hn++,l="«"+l+"r"+d.toString(32)+"»";return s.memoizedState=l},useHostTransitionStatus:sd,useFormState:rd,useActionState:rd,useOptimistic:function(s){var l=Fr();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Cy.bind(null,mt,!0,d),d.dispatch=l,[s,l]},useMemoCache:Hi,useCacheRefresh:function(){return Fr().memoizedState=Np.bind(null,mt)}},tR={readContext:qn,use:Rr,useCallback:Cp,useContext:qn,useEffect:Qg,useImperativeHandle:Ap,useInsertionEffect:Op,useLayoutEffect:Hl,useMemo:Jg,useReducer:Ts,useRef:Mh,useState:function(){return Ts(Bn)},useDebugValue:Rp,useDeferredValue:function(s,l){var d=_r();return Dh(d,Zt.memoizedState,s,l)},useTransition:function(){var s=Ts(Bn)[0],l=_r().memoizedState;return[typeof s=="boolean"?s:ci(s),l]},useSyncExternalStore:Jc,useId:kp,useHostTransitionStatus:sd,useFormState:jh,useActionState:jh,useOptimistic:function(s,l){var d=_r();return lo(d,Zt,s,l)},useMemoCache:Hi,useCacheRefresh:em},rZ={readContext:qn,use:Rr,useCallback:Cp,useContext:qn,useEffect:Qg,useImperativeHandle:Ap,useInsertionEffect:Op,useLayoutEffect:Hl,useMemo:Jg,useReducer:Fn,useRef:Mh,useState:function(){return Fn(Bn)},useDebugValue:Rp,useDeferredValue:function(s,l){var d=_r();return Zt===null?Wl(d,s,l):Dh(d,Zt.memoizedState,s,l)},useTransition:function(){var s=Fn(Bn)[0],l=_r().memoizedState;return[typeof s=="boolean"?s:ci(s),l]},useSyncExternalStore:Jc,useId:kp,useHostTransitionStatus:sd,useFormState:Xg,useActionState:Xg,useOptimistic:function(s,l){var d=_r();return Zt!==null?lo(d,Zt,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:Hi,useCacheRefresh:em},qh=null,jp=0;function nm(s){var l=jp;return jp+=1,qh===null&&(qh=[]),Ae(qh,s,l)}function Mp(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function im(s,l){throw l.$$typeof===v?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function rR(s){var l=s._init;return l(s._payload)}function nR(s){function l(_e,me){if(s){var Te=_e.deletions;Te===null?(_e.deletions=[me],_e.flags|=16):Te.push(me)}}function d(_e,me){if(!s)return null;for(;me!==null;)l(_e,me),me=me.sibling;return null}function p(_e){for(var me=new Map;_e!==null;)_e.key!==null?me.set(_e.key,_e):me.set(_e.index,_e),_e=_e.sibling;return me}function b(_e,me){return _e=ws(_e,me),_e.index=0,_e.sibling=null,_e}function S(_e,me,Te){return _e.index=Te,s?(Te=_e.alternate,Te!==null?(Te=Te.index,Te<me?(_e.flags|=67108866,me):Te):(_e.flags|=67108866,me)):(_e.flags|=1048576,me)}function $(_e){return s&&_e.alternate===null&&(_e.flags|=67108866),_e}function K(_e,me,Te,Fe){return me===null||me.tag!==6?(me=Ah(Te,_e.mode,Fe),me.return=_e,me):(me=b(me,Te),me.return=_e,me)}function pe(_e,me,Te,Fe){var wt=Te.type;return wt===_?$e(_e,me,Te.props.children,Fe,Te.key):me!==null&&(me.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===D&&rR(wt)===me.type)?(me=b(me,Te.props),Mp(me,Te),me.return=_e,me):(me=$l(Te.type,Te.key,Te.props,null,_e.mode,Fe),Mp(me,Te),me.return=_e,me)}function Re(_e,me,Te,Fe){return me===null||me.tag!==4||me.stateNode.containerInfo!==Te.containerInfo||me.stateNode.implementation!==Te.implementation?(me=Yc(Te,_e.mode,Fe),me.return=_e,me):(me=b(me,Te.children||[]),me.return=_e,me)}function $e(_e,me,Te,Fe,wt){return me===null||me.tag!==7?(me=to(Te,_e.mode,Fe,wt),me.return=_e,me):(me=b(me,Te),me.return=_e,me)}function He(_e,me,Te){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return me=Ah(""+me,_e.mode,Te),me.return=_e,me;if(typeof me=="object"&&me!==null){switch(me.$$typeof){case y:return Te=$l(me.type,me.key,me.props,null,_e.mode,Te),Mp(Te,me),Te.return=_e,Te;case g:return me=Yc(me,_e.mode,Te),me.return=_e,me;case D:var Fe=me._init;return me=Fe(me._payload),He(_e,me,Te)}if(ce(me)||q(me))return me=to(me,_e.mode,Te,null),me.return=_e,me;if(typeof me.then=="function")return He(_e,nm(me),Te);if(me.$$typeof===N)return He(_e,Vo(_e,me),Te);im(_e,me)}return null}function Ce(_e,me,Te,Fe){var wt=me!==null?me.key:null;if(typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint")return wt!==null?null:K(_e,me,""+Te,Fe);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case y:return Te.key===wt?pe(_e,me,Te,Fe):null;case g:return Te.key===wt?Re(_e,me,Te,Fe):null;case D:return wt=Te._init,Te=wt(Te._payload),Ce(_e,me,Te,Fe)}if(ce(Te)||q(Te))return wt!==null?null:$e(_e,me,Te,Fe,null);if(typeof Te.then=="function")return Ce(_e,me,nm(Te),Fe);if(Te.$$typeof===N)return Ce(_e,me,Vo(_e,Te),Fe);im(_e,Te)}return null}function Ne(_e,me,Te,Fe,wt){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number"||typeof Fe=="bigint")return _e=_e.get(Te)||null,K(me,_e,""+Fe,wt);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case y:return _e=_e.get(Fe.key===null?Te:Fe.key)||null,pe(me,_e,Fe,wt);case g:return _e=_e.get(Fe.key===null?Te:Fe.key)||null,Re(me,_e,Fe,wt);case D:var ur=Fe._init;return Fe=ur(Fe._payload),Ne(_e,me,Te,Fe,wt)}if(ce(Fe)||q(Fe))return _e=_e.get(Te)||null,$e(me,_e,Fe,wt,null);if(typeof Fe.then=="function")return Ne(_e,me,Te,nm(Fe),wt);if(Fe.$$typeof===N)return Ne(_e,me,Te,Vo(me,Fe),wt);im(me,Fe)}return null}function Yt(_e,me,Te,Fe){for(var wt=null,ur=null,kt=me,Ut=me=0,Ti=null;kt!==null&&Ut<Te.length;Ut++){kt.index>Ut?(Ti=kt,kt=null):Ti=kt.sibling;var Ar=Ce(_e,kt,Te[Ut],Fe);if(Ar===null){kt===null&&(kt=Ti);break}s&&kt&&Ar.alternate===null&&l(_e,kt),me=S(Ar,me,Ut),ur===null?wt=Ar:ur.sibling=Ar,ur=Ar,kt=Ti}if(Ut===Te.length)return d(_e,kt),Tr&&Fl(_e,Ut),wt;if(kt===null){for(;Ut<Te.length;Ut++)kt=He(_e,Te[Ut],Fe),kt!==null&&(me=S(kt,me,Ut),ur===null?wt=kt:ur.sibling=kt,ur=kt);return Tr&&Fl(_e,Ut),wt}for(kt=p(kt);Ut<Te.length;Ut++)Ti=Ne(kt,_e,Ut,Te[Ut],Fe),Ti!==null&&(s&&Ti.alternate!==null&&kt.delete(Ti.key===null?Ut:Ti.key),me=S(Ti,me,Ut),ur===null?wt=Ti:ur.sibling=Ti,ur=Ti);return s&&kt.forEach(function(dc){return l(_e,dc)}),Tr&&Fl(_e,Ut),wt}function Bt(_e,me,Te,Fe){if(Te==null)throw Error(n(151));for(var wt=null,ur=null,kt=me,Ut=me=0,Ti=null,Ar=Te.next();kt!==null&&!Ar.done;Ut++,Ar=Te.next()){kt.index>Ut?(Ti=kt,kt=null):Ti=kt.sibling;var dc=Ce(_e,kt,Ar.value,Fe);if(dc===null){kt===null&&(kt=Ti);break}s&&kt&&dc.alternate===null&&l(_e,kt),me=S(dc,me,Ut),ur===null?wt=dc:ur.sibling=dc,ur=dc,kt=Ti}if(Ar.done)return d(_e,kt),Tr&&Fl(_e,Ut),wt;if(kt===null){for(;!Ar.done;Ut++,Ar=Te.next())Ar=He(_e,Ar.value,Fe),Ar!==null&&(me=S(Ar,me,Ut),ur===null?wt=Ar:ur.sibling=Ar,ur=Ar);return Tr&&Fl(_e,Ut),wt}for(kt=p(kt);!Ar.done;Ut++,Ar=Te.next())Ar=Ne(kt,_e,Ut,Ar.value,Fe),Ar!==null&&(s&&Ar.alternate!==null&&kt.delete(Ar.key===null?Ut:Ar.key),me=S(Ar,me,Ut),ur===null?wt=Ar:ur.sibling=Ar,ur=Ar);return s&&kt.forEach(function(nJ){return l(_e,nJ)}),Tr&&Fl(_e,Ut),wt}function Ur(_e,me,Te,Fe){if(typeof Te=="object"&&Te!==null&&Te.type===_&&Te.key===null&&(Te=Te.props.children),typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case y:e:{for(var wt=Te.key;me!==null;){if(me.key===wt){if(wt=Te.type,wt===_){if(me.tag===7){d(_e,me.sibling),Fe=b(me,Te.props.children),Fe.return=_e,_e=Fe;break e}}else if(me.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===D&&rR(wt)===me.type){d(_e,me.sibling),Fe=b(me,Te.props),Mp(Fe,Te),Fe.return=_e,_e=Fe;break e}d(_e,me);break}else l(_e,me);me=me.sibling}Te.type===_?(Fe=to(Te.props.children,_e.mode,Fe,Te.key),Fe.return=_e,_e=Fe):(Fe=$l(Te.type,Te.key,Te.props,null,_e.mode,Fe),Mp(Fe,Te),Fe.return=_e,_e=Fe)}return $(_e);case g:e:{for(wt=Te.key;me!==null;){if(me.key===wt)if(me.tag===4&&me.stateNode.containerInfo===Te.containerInfo&&me.stateNode.implementation===Te.implementation){d(_e,me.sibling),Fe=b(me,Te.children||[]),Fe.return=_e,_e=Fe;break e}else{d(_e,me);break}else l(_e,me);me=me.sibling}Fe=Yc(Te,_e.mode,Fe),Fe.return=_e,_e=Fe}return $(_e);case D:return wt=Te._init,Te=wt(Te._payload),Ur(_e,me,Te,Fe)}if(ce(Te))return Yt(_e,me,Te,Fe);if(q(Te)){if(wt=q(Te),typeof wt!="function")throw Error(n(150));return Te=wt.call(Te),Bt(_e,me,Te,Fe)}if(typeof Te.then=="function")return Ur(_e,me,nm(Te),Fe);if(Te.$$typeof===N)return Ur(_e,me,Vo(_e,Te),Fe);im(_e,Te)}return typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint"?(Te=""+Te,me!==null&&me.tag===6?(d(_e,me.sibling),Fe=b(me,Te),Fe.return=_e,_e=Fe):(d(_e,me),Fe=Ah(Te,_e.mode,Fe),Fe.return=_e,_e=Fe),$(_e)):d(_e,me)}return function(_e,me,Te,Fe){try{jp=0;var wt=Ur(_e,me,Te,Fe);return qh=null,wt}catch(kt){if(kt===H||kt===X)throw kt;var ur=xi(29,kt,null,_e.mode);return ur.lanes=Fe,ur.return=_e,ur}}}var Lh=nR(!0),iR=nR(!1),As=oe(null),Yo=null;function Xu(s){var l=s.alternate;Y(di,di.current&1),Y(As,s),Yo===null&&(l===null||Vt.current!==null||l.memoizedState!==null)&&(Yo=s)}function aR(s){if(s.tag===22){if(Y(di,di.current),Y(As,s),Yo===null){var l=s.alternate;l!==null&&l.memoizedState!==null&&(Yo=s)}}else Qu()}function Qu(){Y(di,di.current),Y(As,As.current)}function Gl(s){L(As),Yo===s&&(Yo=null),L(di)}var di=oe(0);function am(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||b0(d)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function ky(s,l,d,p){l=s.memoizedState,d=d(p,l),d=d==null?l:f({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Ny={enqueueSetState:function(s,l,d){s=s._reactInternals;var p=os(),b=De(p);b.payload=l,d!=null&&(b.callback=d),l=Ye(s,b,p),l!==null&&(ls(l,s,p),Ue(l,s,p))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var p=os(),b=De(p);b.tag=1,b.payload=l,d!=null&&(b.callback=d),l=Ye(s,b,p),l!==null&&(ls(l,s,p),Ue(l,s,p))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=os(),p=De(d);p.tag=2,l!=null&&(p.callback=l),l=Ye(s,p,d),l!==null&&(ls(l,s,d),Ue(l,s,d))}};function sR(s,l,d,p,b,S,$){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,S,$):l.prototype&&l.prototype.isPureReactComponent?!jl(d,p)||!jl(b,S):!0}function oR(s,l,d,p){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==s&&Ny.enqueueReplaceState(l,l.state,null)}function od(s,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(s=s.defaultProps){d===l&&(d=f({},d));for(var b in s)d[b]===void 0&&(d[b]=s[b])}return d}var sm=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)};function lR(s){sm(s)}function uR(s){console.error(s)}function cR(s){sm(s)}function om(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function dR(s,l,d){try{var p=s.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Iy(s,l,d){return d=De(d),d.tag=3,d.payload={element:null},d.callback=function(){om(s,l)},d}function hR(s){return s=De(s),s.tag=3,s}function fR(s,l,d,p){var b=d.type.getDerivedStateFromError;if(typeof b=="function"){var S=p.value;s.payload=function(){return b(S)},s.callback=function(){dR(l,d,p)}}var $=d.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(s.callback=function(){dR(l,d,p),typeof b!="function"&&(nc===null?nc=new Set([this]):nc.add(this));var K=p.stack;this.componentDidCatch(p.value,{componentStack:K!==null?K:""})})}function nZ(s,l,d,p,b){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Wu(l,d,b,!0),d=As.current,d!==null){switch(d.tag){case 13:return Yo===null?r0():d.alternate===null&&Nn===0&&(Nn=3),d.flags&=-257,d.flags|=65536,d.lanes=b,p===ee?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),i0(s,p,b)),!1;case 22:return d.flags|=65536,p===ee?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),i0(s,p,b)),!1}throw Error(n(435,d.tag))}return i0(s,p,b),r0(),!1}if(Tr)return l=As.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=b,p!==bp&&(s=Error(n(422),{cause:p}),Hu(ua(s,d)))):(p!==bp&&(l=Error(n(423),{cause:p}),Hu(ua(l,d))),s=s.current.alternate,s.flags|=65536,b&=-b,s.lanes|=b,p=ua(p,d),b=Iy(s.stateNode,p,b),St(s,b),Nn!==4&&(Nn=2)),!1;var S=Error(n(520),{cause:p});if(S=ua(S,d),zp===null?zp=[S]:zp.push(S),Nn!==4&&(Nn=2),l===null)return!0;p=ua(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=b&-b,d.lanes|=s,s=Iy(d.stateNode,p,s),St(d,s),!1;case 1:if(l=d.type,S=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(nc===null||!nc.has(S))))return d.flags|=65536,b&=-b,d.lanes|=b,b=hR(b),fR(b,s,d,p),St(d,b),!1}d=d.return}while(d!==null);return!1}var pR=Error(n(461)),Si=!1;function Wi(s,l,d,p){l.child=s===null?iR(l,null,d,p):Lh(l,s.child,d,p)}function vR(s,l,d,p,b){d=d.render;var S=l.ref;if("ref"in p){var $={};for(var K in p)K!=="ref"&&($[K]=p[K])}else $=p;return Es(l),p=fa(s,l,d,$,S,b),K=Sn(),s!==null&&!Si?(Ui(s,l,b),Vl(s,l,b)):(Tr&&K&&Kc(l),l.flags|=1,Wi(s,l,p,b),l.child)}function gR(s,l,d,p,b){if(s===null){var S=d.type;return typeof S=="function"&&!zu(S)&&S.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=S,mR(s,l,S,p,b)):(s=$l(d.type,null,p,l,l.mode,b),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!By(s,b)){var $=S.memoizedProps;if(d=d.compare,d=d!==null?d:jl,d($,p)&&s.ref===l.ref)return Vl(s,l,b)}return l.flags|=1,s=ws(S,p),s.ref=l.ref,s.return=l,l.child=s}function mR(s,l,d,p,b){if(s!==null){var S=s.memoizedProps;if(jl(S,p)&&s.ref===l.ref)if(Si=!1,l.pendingProps=p=S,By(s,b))(s.flags&131072)!==0&&(Si=!0);else return l.lanes=s.lanes,Vl(s,l,b)}return Py(s,l,d,p,b)}function yR(s,l,d){var p=l.pendingProps,b=p.children,S=s!==null?s.memoizedState:null;if(p.mode==="hidden"){if((l.flags&128)!==0){if(p=S!==null?S.baseLanes|d:d,s!==null){for(b=l.child=s.child,S=0;b!==null;)S=S|b.lanes|b.childLanes,b=b.sibling;l.childLanes=S&~p}else l.childLanes=0,l.child=null;return bR(s,l,p,d)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&P(l,S!==null?S.cachePool:null),S!==null?rt(l,S):on(),aR(l);else return l.lanes=l.childLanes=536870912,bR(s,l,S!==null?S.baseLanes|d:d,d)}else S!==null?(P(l,S.cachePool),rt(l,S),Qu(),l.memoizedState=null):(s!==null&&P(l,null),on(),Qu());return Wi(s,l,b,d),l.child}function bR(s,l,d,p){var b=R();return b=b===null?null:{parent:Ln._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},s!==null&&P(l,null),on(),aR(l),s!==null&&Wu(s,l,p,!0),null}function lm(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Py(s,l,d,p,b){return Es(l),d=fa(s,l,d,p,void 0,b),p=Sn(),s!==null&&!Si?(Ui(s,l,b),Vl(s,l,b)):(Tr&&p&&Kc(l),l.flags|=1,Wi(s,l,d,b),l.child)}function wR(s,l,d,p,b,S){return Es(l),l.updateQueue=null,d=zi(l,p,d,b),fn(s),p=Sn(),s!==null&&!Si?(Ui(s,l,S),Vl(s,l,S)):(Tr&&p&&Kc(l),l.flags|=1,Wi(s,l,d,S),l.child)}function xR(s,l,d,p,b){if(Es(l),l.stateNode===null){var S=Xn,$=d.contextType;typeof $=="object"&&$!==null&&(S=qn($)),S=new d(p,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Ny,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=p,S.state=l.memoizedState,S.refs={},Oe(l),$=d.contextType,S.context=typeof $=="object"&&$!==null?qn($):Xn,S.state=l.memoizedState,$=d.getDerivedStateFromProps,typeof $=="function"&&(ky(l,d,$,p),S.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||($=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),$!==S.state&&Ny.enqueueReplaceState(S,S.state,null),ft(l,p,S,b),Kt(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(s===null){S=l.stateNode;var K=l.memoizedProps,pe=od(d,K);S.props=pe;var Re=S.context,$e=d.contextType;$=Xn,typeof $e=="object"&&$e!==null&&($=qn($e));var He=d.getDerivedStateFromProps;$e=typeof He=="function"||typeof S.getSnapshotBeforeUpdate=="function",K=l.pendingProps!==K,$e||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(K||Re!==$)&&oR(l,S,p,$),Pe=!1;var Ce=l.memoizedState;S.state=Ce,ft(l,p,S,b),Kt(),Re=l.memoizedState,K||Ce!==Re||Pe?(typeof He=="function"&&(ky(l,d,He,p),Re=l.memoizedState),(pe=Pe||sR(l,d,pe,p,Ce,Re,$))?($e||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=Re),S.props=p,S.state=Re,S.context=$,p=pe):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{S=l.stateNode,qe(s,l),$=l.memoizedProps,$e=od(d,$),S.props=$e,He=l.pendingProps,Ce=S.context,Re=d.contextType,pe=Xn,typeof Re=="object"&&Re!==null&&(pe=qn(Re)),K=d.getDerivedStateFromProps,(Re=typeof K=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||($!==He||Ce!==pe)&&oR(l,S,p,pe),Pe=!1,Ce=l.memoizedState,S.state=Ce,ft(l,p,S,b),Kt();var Ne=l.memoizedState;$!==He||Ce!==Ne||Pe||s!==null&&s.dependencies!==null&&Nh(s.dependencies)?(typeof K=="function"&&(ky(l,d,K,p),Ne=l.memoizedState),($e=Pe||sR(l,d,$e,p,Ce,Ne,pe)||s!==null&&s.dependencies!==null&&Nh(s.dependencies))?(Re||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,Ne,pe),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,Ne,pe)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||$===s.memoizedProps&&Ce===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&Ce===s.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=Ne),S.props=p,S.state=Ne,S.context=pe,p=$e):(typeof S.componentDidUpdate!="function"||$===s.memoizedProps&&Ce===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&Ce===s.memoizedState||(l.flags|=1024),p=!1)}return S=p,lm(s,l),p=(l.flags&128)!==0,S||p?(S=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&p?(l.child=Lh(l,s.child,null,b),l.child=Lh(l,null,d,b)):Wi(s,l,d,b),l.memoizedState=S.state,s=l.child):s=Vl(s,l,b),s}function _R(s,l,d,p){return ha(),l.flags|=256,Wi(s,l,d,p),l.child}var jy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function My(s){return{baseLanes:s,cachePool:F()}}function Dy(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Rs),s}function SR(s,l,d){var p=l.pendingProps,b=!1,S=(l.flags&128)!==0,$;if(($=S)||($=s!==null&&s.memoizedState===null?!1:(di.current&2)!==0),$&&(b=!0,l.flags&=-129),$=(l.flags&32)!==0,l.flags&=-33,s===null){if(Tr){if(b?Xu(l):Qu(),Tr){var K=cn,pe;if(pe=K){e:{for(pe=K,K=xs;pe.nodeType!==8;){if(!K){K=null;break e}if(pe=po(pe.nextSibling),pe===null){K=null;break e}}K=pe}K!==null?(l.memoizedState={dehydrated:K,treeContext:Bl!==null?{id:no,overflow:io}:null,retryLane:536870912,hydrationErrors:null},pe=xi(18,null,null,0),pe.stateNode=K,pe.return=l,l.child=pe,Dn=l,cn=null,pe=!0):pe=!1}pe||zl(l)}if(K=l.memoizedState,K!==null&&(K=K.dehydrated,K!==null))return b0(K)?l.lanes=32:l.lanes=536870912,null;Gl(l)}return K=p.children,p=p.fallback,b?(Qu(),b=l.mode,K=um({mode:"hidden",children:K},b),p=to(p,b,d,null),K.return=l,p.return=l,K.sibling=p,l.child=K,b=l.child,b.memoizedState=My(d),b.childLanes=Dy(s,$,d),l.memoizedState=jy,p):(Xu(l),qy(l,K))}if(pe=s.memoizedState,pe!==null&&(K=pe.dehydrated,K!==null)){if(S)l.flags&256?(Xu(l),l.flags&=-257,l=Ly(s,l,d)):l.memoizedState!==null?(Qu(),l.child=s.child,l.flags|=128,l=null):(Qu(),b=p.fallback,K=l.mode,p=um({mode:"visible",children:p.children},K),b=to(b,K,d,null),b.flags|=2,p.return=l,b.return=l,p.sibling=b,l.child=p,Lh(l,s.child,null,d),p=l.child,p.memoizedState=My(d),p.childLanes=Dy(s,$,d),l.memoizedState=jy,l=b);else if(Xu(l),b0(K)){if($=K.nextSibling&&K.nextSibling.dataset,$)var Re=$.dgst;$=Re,p=Error(n(419)),p.stack="",p.digest=$,Hu({value:p,source:null,stack:null}),l=Ly(s,l,d)}else if(Si||Wu(s,l,d,!1),$=(d&s.childLanes)!==0,Si||$){if($=en,$!==null&&(p=d&-d,p=(p&42)!==0?1:Cr(p),p=(p&($.suspendedLanes|d))!==0?0:p,p!==0&&p!==pe.retryLane))throw pe.retryLane=p,ql(s,p),ls($,s,p),pR;K.data==="$?"||r0(),l=Ly(s,l,d)}else K.data==="$?"?(l.flags|=192,l.child=s.child,l=null):(s=pe.treeContext,cn=po(K.nextSibling),Dn=l,Tr=!0,Wo=null,xs=!1,s!==null&&(Ia[da++]=no,Ia[da++]=io,Ia[da++]=Bl,no=s.id,io=s.overflow,Bl=l),l=qy(l,p.children),l.flags|=4096);return l}return b?(Qu(),b=p.fallback,K=l.mode,pe=s.child,Re=pe.sibling,p=ws(pe,{mode:"hidden",children:p.children}),p.subtreeFlags=pe.subtreeFlags&65011712,Re!==null?b=ws(Re,b):(b=to(b,K,d,null),b.flags|=2),b.return=l,p.return=l,p.sibling=b,l.child=p,p=b,b=l.child,K=s.child.memoizedState,K===null?K=My(d):(pe=K.cachePool,pe!==null?(Re=Ln._currentValue,pe=pe.parent!==Re?{parent:Re,pool:Re}:pe):pe=F(),K={baseLanes:K.baseLanes|d,cachePool:pe}),b.memoizedState=K,b.childLanes=Dy(s,$,d),l.memoizedState=jy,p):(Xu(l),d=s.child,s=d.sibling,d=ws(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,s!==null&&($=l.deletions,$===null?(l.deletions=[s],l.flags|=16):$.push(s)),l.child=d,l.memoizedState=null,d)}function qy(s,l){return l=um({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function um(s,l){return s=xi(22,s,null,l),s.lanes=0,s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},s}function Ly(s,l,d){return Lh(l,s.child,null,d),s=qy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function ER(s,l,d){s.lanes|=l;var p=s.alternate;p!==null&&(p.lanes|=l),Ch(s.return,l,d)}function $y(s,l,d,p,b){var S=s.memoizedState;S===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:b}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=p,S.tail=d,S.tailMode=b)}function TR(s,l,d){var p=l.pendingProps,b=p.revealOrder,S=p.tail;if(Wi(s,l,p.children,d),p=di.current,(p&2)!==0)p=p&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ER(s,d,l);else if(s.tag===19)ER(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}p&=1}switch(Y(di,p),b){case"forwards":for(d=l.child,b=null;d!==null;)s=d.alternate,s!==null&&am(s)===null&&(b=d),d=d.sibling;d=b,d===null?(b=l.child,l.child=null):(b=d.sibling,d.sibling=null),$y(l,!1,b,d,S);break;case"backwards":for(d=null,b=l.child,l.child=null;b!==null;){if(s=b.alternate,s!==null&&am(s)===null){l.child=b;break}s=b.sibling,b.sibling=d,d=b,b=s}$y(l,!0,d,null,S);break;case"together":$y(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Vl(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),rc|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Wu(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,d=ws(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=ws(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function By(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Nh(s)))}function iZ(s,l,d){switch(l.tag){case 3:Se(l,l.stateNode.containerInfo),Go(l,Ln,s.memoizedState.cache),ha();break;case 27:case 5:Le(l);break;case 4:Se(l,l.stateNode.containerInfo);break;case 10:Go(l,l.type,l.memoizedProps.value);break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(Xu(l),l.flags|=128,null):(d&l.child.childLanes)!==0?SR(s,l,d):(Xu(l),s=Vl(s,l,d),s!==null?s.sibling:null);Xu(l);break;case 19:var b=(s.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Wu(s,l,d,!1),p=(d&l.childLanes)!==0),b){if(p)return TR(s,l,d);l.flags|=128}if(b=l.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Y(di,di.current),p)break;return null;case 22:case 23:return l.lanes=0,yR(s,l,d);case 24:Go(l,Ln,s.memoizedState.cache)}return Vl(s,l,d)}function OR(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Si=!0;else{if(!By(s,d)&&(l.flags&128)===0)return Si=!1,iZ(s,l,d);Si=(s.flags&131072)!==0}else Si=!1,Tr&&(l.flags&1048576)!==0&&$g(l,Rh,l.index);switch(l.lanes=0,l.tag){case 16:e:{s=l.pendingProps;var p=l.elementType,b=p._init;if(p=b(p._payload),l.type=p,typeof p=="function")zu(p)?(s=od(p,s),l.tag=1,l=xR(null,l,p,s,d)):(l.tag=0,l=Py(null,l,p,s,d));else{if(p!=null){if(b=p.$$typeof,b===k){l.tag=11,l=vR(null,l,p,s,d);break e}else if(b===G){l.tag=14,l=gR(null,l,p,s,d);break e}}throw l=Q(p)||p,Error(n(306,l,""))}}return l;case 0:return Py(s,l,l.type,l.pendingProps,d);case 1:return p=l.type,b=od(p,l.pendingProps),xR(s,l,p,b,d);case 3:e:{if(Se(l,l.stateNode.containerInfo),s===null)throw Error(n(387));p=l.pendingProps;var S=l.memoizedState;b=S.element,qe(s,l),ft(l,p,null,d);var $=l.memoizedState;if(p=$.cache,Go(l,Ln,p),p!==S.cache&&kh(l,[Ln],d,!0),Kt(),p=$.element,S.isDehydrated)if(S={element:p,isDehydrated:!1,cache:$.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=_R(s,l,p,d);break e}else if(p!==b){b=ua(Error(n(424)),l),Hu(b),l=_R(s,l,p,d);break e}else for(s=l.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,cn=po(s.firstChild),Dn=l,Tr=!0,Wo=null,xs=!0,d=iR(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(ha(),p===b){l=Vl(s,l,d);break e}Wi(s,l,p,d)}l=l.child}return l;case 26:return lm(s,l),s===null?(d=kC(l.type,null,l.pendingProps,null))?l.memoizedState=d:Tr||(d=l.type,s=l.pendingProps,p=Sm(ue.current).createElement(d),p[Qr]=l,p[Hr]=s,Vi(p,d,s),Jr(p),l.stateNode=p):l.memoizedState=kC(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Le(l),s===null&&Tr&&(p=l.stateNode=AC(l.type,l.pendingProps,ue.current),Dn=l,xs=!0,b=cn,sc(l.type)?(w0=b,cn=po(p.firstChild)):cn=b),Wi(s,l,l.pendingProps.children,d),lm(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Tr&&((b=p=cn)&&(p=IZ(p,l.type,l.pendingProps,xs),p!==null?(l.stateNode=p,Dn=l,cn=po(p.firstChild),xs=!1,b=!0):b=!1),b||zl(l)),Le(l),b=l.type,S=l.pendingProps,$=s!==null?s.memoizedProps:null,p=S.children,g0(b,S)?p=null:$!==null&&g0(b,$)&&(l.flags|=32),l.memoizedState!==null&&(b=fa(s,l,Pr,null,null,d),Qp._currentValue=b),lm(s,l),Wi(s,l,p,d),l.child;case 6:return s===null&&Tr&&((s=d=cn)&&(d=PZ(d,l.pendingProps,xs),d!==null?(l.stateNode=d,Dn=l,cn=null,s=!0):s=!1),s||zl(l)),null;case 13:return SR(s,l,d);case 4:return Se(l,l.stateNode.containerInfo),p=l.pendingProps,s===null?l.child=Lh(l,null,p,d):Wi(s,l,p,d),l.child;case 11:return vR(s,l,l.type,l.pendingProps,d);case 7:return Wi(s,l,l.pendingProps,d),l.child;case 8:return Wi(s,l,l.pendingProps.children,d),l.child;case 12:return Wi(s,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Go(l,l.type,p.value),Wi(s,l,p.children,d),l.child;case 9:return b=l.type._context,p=l.pendingProps.children,Es(l),b=qn(b),p=p(b),l.flags|=1,Wi(s,l,p,d),l.child;case 14:return gR(s,l,l.type,l.pendingProps,d);case 15:return mR(s,l,l.type,l.pendingProps,d);case 19:return TR(s,l,d);case 31:return p=l.pendingProps,d=l.mode,p={mode:p.mode,children:p.children},s===null?(d=um(p,d),d.ref=l.ref,l.child=d,d.return=l,l=d):(d=ws(s.child,p),d.ref=l.ref,l.child=d,d.return=l,l=d),l;case 22:return yR(s,l,d);case 24:return Es(l),p=qn(Ln),s===null?(b=R(),b===null&&(b=en,S=wp(),b.pooledCache=S,S.refCount++,S!==null&&(b.pooledCacheLanes|=d),b=S),l.memoizedState={parent:p,cache:b},Oe(l),Go(l,Ln,b)):((s.lanes&d)!==0&&(qe(s,l),ft(l,null,null,d),Kt()),b=s.memoizedState,S=l.memoizedState,b.parent!==p?(b={parent:p,cache:p},l.memoizedState=b,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=b),Go(l,Ln,p)):(p=S.cache,Go(l,Ln,p),p!==b.cache&&kh(l,[Ln],d,!0))),Wi(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function Yl(s){s.flags|=4}function AR(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!MC(l)){if(l=As.current,l!==null&&((Sr&4194048)===Sr?Yo!==null:(Sr&62914560)!==Sr&&(Sr&536870912)===0||l!==Yo))throw ae=ee,V;s.flags|=8192}}function cm(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?Mt():536870912,s.lanes|=l,zh|=l)}function Dp(s,l){if(!Tr)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function En(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,p=0;if(l)for(var b=s.child;b!==null;)d|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=s,b=b.sibling;else for(b=s.child;b!==null;)d|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=s,b=b.sibling;return s.subtreeFlags|=p,s.childLanes=d,l}function aZ(s,l,d){var p=l.pendingProps;switch(Xc(l),l.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(l),null;case 1:return En(l),null;case 3:return d=l.stateNode,p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),Ss(Ln),Ie(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Fi(l)?Yl(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Fg())),En(l),null;case 26:return d=l.memoizedState,s===null?(Yl(l),d!==null?(En(l),AR(l,d)):(En(l),l.flags&=-16777217)):d?d!==s.memoizedState?(Yl(l),En(l),AR(l,d)):(En(l),l.flags&=-16777217):(s.memoizedProps!==p&&Yl(l),En(l),l.flags&=-16777217),null;case 27:Ve(l),d=ue.current;var b=l.type;if(s!==null&&l.stateNode!=null)s.memoizedProps!==p&&Yl(l);else{if(!p){if(l.stateNode===null)throw Error(n(166));return En(l),null}s=te.current,Fi(l)?Bg(l):(s=AC(b,p,d),l.stateNode=s,Yl(l))}return En(l),null;case 5:if(Ve(l),d=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==p&&Yl(l);else{if(!p){if(l.stateNode===null)throw Error(n(166));return En(l),null}if(s=te.current,Fi(l))Bg(l);else{switch(b=Sm(ue.current),s){case 1:s=b.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:s=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":s=b.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":s=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":s=b.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof p.is=="string"?b.createElement("select",{is:p.is}):b.createElement("select"),p.multiple?s.multiple=!0:p.size&&(s.size=p.size);break;default:s=typeof p.is=="string"?b.createElement(d,{is:p.is}):b.createElement(d)}}s[Qr]=l,s[Hr]=p;e:for(b=l.child;b!==null;){if(b.tag===5||b.tag===6)s.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===l)break e;for(;b.sibling===null;){if(b.return===null||b.return===l)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}l.stateNode=s;e:switch(Vi(s,d,p),d){case"button":case"input":case"select":case"textarea":s=!!p.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Yl(l)}}return En(l),l.flags&=-16777217,null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==p&&Yl(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(n(166));if(s=ue.current,Fi(l)){if(s=l.stateNode,d=l.memoizedProps,p=null,b=Dn,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}s[Qr]=l,s=!!(s.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||wC(s.nodeValue,d)),s||zl(l)}else s=Sm(s).createTextNode(p),s[Qr]=l,l.stateNode=s}return En(l),null;case 13:if(p=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(b=Fi(l),p!==null&&p.dehydrated!==null){if(s===null){if(!b)throw Error(n(318));if(b=l.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Qr]=l}else ha(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;En(l),b=!1}else b=Fg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=b),b=!0;if(!b)return l.flags&256?(Gl(l),l):(Gl(l),null)}if(Gl(l),(l.flags&128)!==0)return l.lanes=d,l;if(d=p!==null,s=s!==null&&s.memoizedState!==null,d){p=l.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool);var S=null;p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==b&&(p.flags|=2048)}return d!==s&&d&&(l.child.flags|=8192),cm(l,l.updateQueue),En(l),null;case 4:return Ie(),s===null&&d0(l.stateNode.containerInfo),En(l),null;case 10:return Ss(l.type),En(l),null;case 19:if(L(di),b=l.memoizedState,b===null)return En(l),null;if(p=(l.flags&128)!==0,S=b.rendering,S===null)if(p)Dp(b,!1);else{if(Nn!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=am(s),S!==null){for(l.flags|=128,Dp(b,!1),s=S.updateQueue,l.updateQueue=s,cm(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)Vc(d,s),d=d.sibling;return Y(di,di.current&1|2),l.child}s=s.sibling}b.tail!==null&&st()>fm&&(l.flags|=128,p=!0,Dp(b,!1),l.lanes=4194304)}else{if(!p)if(s=am(S),s!==null){if(l.flags|=128,p=!0,s=s.updateQueue,l.updateQueue=s,cm(l,s),Dp(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Tr)return En(l),null}else 2*st()-b.renderingStartTime>fm&&d!==536870912&&(l.flags|=128,p=!0,Dp(b,!1),l.lanes=4194304);b.isBackwards?(S.sibling=l.child,l.child=S):(s=b.last,s!==null?s.sibling=S:l.child=S,b.last=S)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=st(),l.sibling=null,s=di.current,Y(di,p?s&1|2:s&1),l):(En(l),null);case 22:case 23:return Gl(l),Xt(),p=l.memoizedState!==null,s!==null?s.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(En(l),l.subtreeFlags&6&&(l.flags|=8192)):En(l),d=l.updateQueue,d!==null&&cm(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),s!==null&&L(x),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Ss(Ln),En(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function sZ(s,l){switch(Xc(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Ss(Ln),Ie(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ve(l),null;case 13:if(Gl(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));ha()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return L(di),null;case 4:return Ie(),null;case 10:return Ss(l.type),null;case 22:case 23:return Gl(l),Xt(),s!==null&&L(x),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return Ss(Ln),null;case 25:return null;default:return null}}function RR(s,l){switch(Xc(l),l.tag){case 3:Ss(Ln),Ie();break;case 26:case 27:case 5:Ve(l);break;case 4:Ie();break;case 13:Gl(l);break;case 19:L(di);break;case 10:Ss(l.type);break;case 22:case 23:Gl(l),Xt(),s!==null&&L(x);break;case 24:Ss(Ln)}}function qp(s,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var b=p.next;d=b;do{if((d.tag&s)===s){p=void 0;var S=d.create,$=d.inst;p=S(),$.destroy=p}d=d.next}while(d!==b)}}catch(K){Vr(l,l.return,K)}}function Zu(s,l,d){try{var p=l.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var S=b.next;p=S;do{if((p.tag&s)===s){var $=p.inst,K=$.destroy;if(K!==void 0){$.destroy=void 0,b=l;var pe=d,Re=K;try{Re()}catch($e){Vr(b,pe,$e)}}}p=p.next}while(p!==S)}}catch($e){Vr(l,l.return,$e)}}function CR(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{kn(l,d)}catch(p){Vr(s,s.return,p)}}}function kR(s,l,d){d.props=od(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(p){Vr(s,l,p)}}function Lp(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var p=s.stateNode;break;case 30:p=s.stateNode;break;default:p=s.stateNode}typeof d=="function"?s.refCleanup=d(p):d.current=p}}catch(b){Vr(s,l,b)}}function Ko(s,l){var d=s.ref,p=s.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(b){Vr(s,l,b)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(b){Vr(s,l,b)}else d.current=null}function NR(s){var l=s.type,d=s.memoizedProps,p=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(b){Vr(s,s.return,b)}}function Fy(s,l,d){try{var p=s.stateNode;AZ(p,s.type,d,l),p[Hr]=l}catch(b){Vr(s,s.return,b)}}function IR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&sc(s.type)||s.tag===4}function zy(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||IR(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.tag===27&&sc(s.type)||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 Uy(s,l,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=_m));else if(p!==4&&(p===27&&sc(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Uy(s,l,d),s=s.sibling;s!==null;)Uy(s,l,d),s=s.sibling}function dm(s,l,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(p!==4&&(p===27&&sc(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(dm(s,l,d),s=s.sibling;s!==null;)dm(s,l,d),s=s.sibling}function PR(s){var l=s.stateNode,d=s.memoizedProps;try{for(var p=s.type,b=l.attributes;b.length;)l.removeAttributeNode(b[0]);Vi(l,p,d),l[Qr]=s,l[Hr]=d}catch(S){Vr(s,s.return,S)}}var Kl=!1,zn=!1,Hy=!1,jR=typeof WeakSet=="function"?WeakSet:Set,Ei=null;function oZ(s,l){if(s=s.containerInfo,p0=Cm,s=Lu(s),Ml(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var b=p.anchorOffset,S=p.focusNode;p=p.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break e}var $=0,K=-1,pe=-1,Re=0,$e=0,He=s,Ce=null;t:for(;;){for(var Ne;He!==d||b!==0&&He.nodeType!==3||(K=$+b),He!==S||p!==0&&He.nodeType!==3||(pe=$+p),He.nodeType===3&&($+=He.nodeValue.length),(Ne=He.firstChild)!==null;)Ce=He,He=Ne;for(;;){if(He===s)break t;if(Ce===d&&++Re===b&&(K=$),Ce===S&&++$e===p&&(pe=$),(Ne=He.nextSibling)!==null)break;He=Ce,Ce=He.parentNode}He=Ne}d=K===-1||pe===-1?null:{start:K,end:pe}}else d=null}d=d||{start:0,end:0}}else d=null;for(v0={focusedElem:s,selectionRange:d},Cm=!1,Ei=l;Ei!==null;)if(l=Ei,s=l.child,(l.subtreeFlags&1024)!==0&&s!==null)s.return=l,Ei=s;else for(;Ei!==null;){switch(l=Ei,S=l.alternate,s=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,d=l,b=S.memoizedProps,S=S.memoizedState,p=d.stateNode;try{var Yt=od(d.type,b,d.elementType===d.type);s=p.getSnapshotBeforeUpdate(Yt,S),p.__reactInternalSnapshotBeforeUpdate=s}catch(Bt){Vr(d,d.return,Bt)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)y0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":y0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Ei=s;break}Ei=l.return}}function MR(s,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:Ju(s,d),p&4&&qp(5,d);break;case 1:if(Ju(s,d),p&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch($){Vr(d,d.return,$)}else{var b=od(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(b,l,s.__reactInternalSnapshotBeforeUpdate)}catch($){Vr(d,d.return,$)}}p&64&&CR(d),p&512&&Lp(d,d.return);break;case 3:if(Ju(s,d),p&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{kn(s,l)}catch($){Vr(d,d.return,$)}}break;case 27:l===null&&p&4&&PR(d);case 26:case 5:Ju(s,d),l===null&&p&4&&NR(d),p&512&&Lp(d,d.return);break;case 12:Ju(s,d);break;case 13:Ju(s,d),p&4&&LR(s,d),p&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=gZ.bind(null,d),jZ(s,d))));break;case 22:if(p=d.memoizedState!==null||Kl,!p){l=l!==null&&l.memoizedState!==null||zn,b=Kl;var S=zn;Kl=p,(zn=l)&&!S?ec(s,d,(d.subtreeFlags&8772)!==0):Ju(s,d),Kl=b,zn=S}break;case 30:break;default:Ju(s,d)}}function DR(s){var l=s.alternate;l!==null&&(s.alternate=null,DR(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&ia(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var pn=null,Pa=!1;function Xl(s,l,d){for(d=d.child;d!==null;)qR(s,l,d),d=d.sibling}function qR(s,l,d){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(At,d)}catch{}switch(d.tag){case 26:zn||Ko(d,l),Xl(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:zn||Ko(d,l);var p=pn,b=Pa;sc(d.type)&&(pn=d.stateNode,Pa=!1),Xl(s,l,d),Vp(d.stateNode),pn=p,Pa=b;break;case 5:zn||Ko(d,l);case 6:if(p=pn,b=Pa,pn=null,Xl(s,l,d),pn=p,Pa=b,pn!==null)if(Pa)try{(pn.nodeType===9?pn.body:pn.nodeName==="HTML"?pn.ownerDocument.body:pn).removeChild(d.stateNode)}catch(S){Vr(d,l,S)}else try{pn.removeChild(d.stateNode)}catch(S){Vr(d,l,S)}break;case 18:pn!==null&&(Pa?(s=pn,TC(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),tv(s)):TC(pn,d.stateNode));break;case 4:p=pn,b=Pa,pn=d.stateNode.containerInfo,Pa=!0,Xl(s,l,d),pn=p,Pa=b;break;case 0:case 11:case 14:case 15:zn||Zu(2,d,l),zn||Zu(4,d,l),Xl(s,l,d);break;case 1:zn||(Ko(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&kR(d,l,p)),Xl(s,l,d);break;case 21:Xl(s,l,d);break;case 22:zn=(p=zn)||d.memoizedState!==null,Xl(s,l,d),zn=p;break;default:Xl(s,l,d)}}function LR(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{tv(s)}catch(d){Vr(l,l.return,d)}}function lZ(s){switch(s.tag){case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new jR),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new jR),l;default:throw Error(n(435,s.tag))}}function Wy(s,l){var d=lZ(s);l.forEach(function(p){var b=mZ.bind(null,s,p);d.has(p)||(d.add(p),p.then(b,b))})}function is(s,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var b=d[p],S=s,$=l,K=$;e:for(;K!==null;){switch(K.tag){case 27:if(sc(K.type)){pn=K.stateNode,Pa=!1;break e}break;case 5:pn=K.stateNode,Pa=!1;break e;case 3:case 4:pn=K.stateNode.containerInfo,Pa=!0;break e}K=K.return}if(pn===null)throw Error(n(160));qR(S,$,b),pn=null,Pa=!1,S=b.alternate,S!==null&&(S.return=null),b.return=null}if(l.subtreeFlags&13878)for(l=l.child;l!==null;)$R(l,s),l=l.sibling}var fo=null;function $R(s,l){var d=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:is(l,s),as(s),p&4&&(Zu(3,s,s.return),qp(3,s),Zu(5,s,s.return));break;case 1:is(l,s),as(s),p&512&&(zn||d===null||Ko(d,d.return)),p&64&&Kl&&(s=s.updateQueue,s!==null&&(p=s.callbacks,p!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var b=fo;if(is(l,s),as(s),p&512&&(zn||d===null||Ko(d,d.return)),p&4){var S=d!==null?d.memoizedState:null;if(p=s.memoizedState,d===null)if(p===null)if(s.stateNode===null){e:{p=s.type,d=s.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":S=b.getElementsByTagName("title")[0],(!S||S[_a]||S[Qr]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=b.createElement(p),b.head.insertBefore(S,b.querySelector("head > title"))),Vi(S,p,d),S[Qr]=s,Jr(S),p=S;break e;case"link":var $=PC("link","href",b).get(p+(d.href||""));if($){for(var K=0;K<$.length;K++)if(S=$[K],S.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&S.getAttribute("rel")===(d.rel==null?null:d.rel)&&S.getAttribute("title")===(d.title==null?null:d.title)&&S.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){$.splice(K,1);break t}}S=b.createElement(p),Vi(S,p,d),b.head.appendChild(S);break;case"meta":if($=PC("meta","content",b).get(p+(d.content||""))){for(K=0;K<$.length;K++)if(S=$[K],S.getAttribute("content")===(d.content==null?null:""+d.content)&&S.getAttribute("name")===(d.name==null?null:d.name)&&S.getAttribute("property")===(d.property==null?null:d.property)&&S.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&S.getAttribute("charset")===(d.charSet==null?null:d.charSet)){$.splice(K,1);break t}}S=b.createElement(p),Vi(S,p,d),b.head.appendChild(S);break;default:throw Error(n(468,p))}S[Qr]=s,Jr(S),p=S}s.stateNode=p}else jC(b,s.type,s.stateNode);else s.stateNode=IC(b,p,s.memoizedProps);else S!==p?(S===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):S.count--,p===null?jC(b,s.type,s.stateNode):IC(b,p,s.memoizedProps)):p===null&&s.stateNode!==null&&Fy(s,s.memoizedProps,d.memoizedProps)}break;case 27:is(l,s),as(s),p&512&&(zn||d===null||Ko(d,d.return)),d!==null&&p&4&&Fy(s,s.memoizedProps,d.memoizedProps);break;case 5:if(is(l,s),as(s),p&512&&(zn||d===null||Ko(d,d.return)),s.flags&32){b=s.stateNode;try{Li(b,"")}catch(Ne){Vr(s,s.return,Ne)}}p&4&&s.stateNode!=null&&(b=s.memoizedProps,Fy(s,b,d!==null?d.memoizedProps:b)),p&1024&&(Hy=!0);break;case 6:if(is(l,s),as(s),p&4){if(s.stateNode===null)throw Error(n(162));p=s.memoizedProps,d=s.stateNode;try{d.nodeValue=p}catch(Ne){Vr(s,s.return,Ne)}}break;case 3:if(Om=null,b=fo,fo=Em(l.containerInfo),is(l,s),fo=b,as(s),p&4&&d!==null&&d.memoizedState.isDehydrated)try{tv(l.containerInfo)}catch(Ne){Vr(s,s.return,Ne)}Hy&&(Hy=!1,BR(s));break;case 4:p=fo,fo=Em(s.stateNode.containerInfo),is(l,s),as(s),fo=p;break;case 12:is(l,s),as(s);break;case 13:is(l,s),as(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Qy=st()),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Wy(s,p)));break;case 22:b=s.memoizedState!==null;var pe=d!==null&&d.memoizedState!==null,Re=Kl,$e=zn;if(Kl=Re||b,zn=$e||pe,is(l,s),zn=$e,Kl=Re,as(s),p&8192)e:for(l=s.stateNode,l._visibility=b?l._visibility&-2:l._visibility|1,b&&(d===null||pe||Kl||zn||ld(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){pe=d=l;try{if(S=pe.stateNode,b)$=S.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{K=pe.stateNode;var He=pe.memoizedProps.style,Ce=He!=null&&He.hasOwnProperty("display")?He.display:null;K.style.display=Ce==null||typeof Ce=="boolean"?"":(""+Ce).trim()}}catch(Ne){Vr(pe,pe.return,Ne)}}}else if(l.tag===6){if(d===null){pe=l;try{pe.stateNode.nodeValue=b?"":pe.memoizedProps}catch(Ne){Vr(pe,pe.return,Ne)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=s.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,Wy(s,d))));break;case 19:is(l,s),as(s),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Wy(s,p)));break;case 30:break;case 21:break;default:is(l,s),as(s)}}function as(s){var l=s.flags;if(l&2){try{for(var d,p=s.return;p!==null;){if(IR(p)){d=p;break}p=p.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var b=d.stateNode,S=zy(s);dm(s,S,b);break;case 5:var $=d.stateNode;d.flags&32&&(Li($,""),d.flags&=-33);var K=zy(s);dm(s,K,$);break;case 3:case 4:var pe=d.stateNode.containerInfo,Re=zy(s);Uy(s,Re,pe);break;default:throw Error(n(161))}}catch($e){Vr(s,s.return,$e)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function BR(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;BR(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ju(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)MR(s,l.alternate,l),l=l.sibling}function ld(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Zu(4,l,l.return),ld(l);break;case 1:Ko(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&kR(l,l.return,d),ld(l);break;case 27:Vp(l.stateNode);case 26:case 5:Ko(l,l.return),ld(l);break;case 22:l.memoizedState===null&&ld(l);break;case 30:ld(l);break;default:ld(l)}s=s.sibling}}function ec(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,b=s,S=l,$=S.flags;switch(S.tag){case 0:case 11:case 15:ec(b,S,d),qp(4,S);break;case 1:if(ec(b,S,d),p=S,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(Re){Vr(p,p.return,Re)}if(p=S,b=p.updateQueue,b!==null){var K=p.stateNode;try{var pe=b.shared.hiddenCallbacks;if(pe!==null)for(b.shared.hiddenCallbacks=null,b=0;b<pe.length;b++)lr(pe[b],K)}catch(Re){Vr(p,p.return,Re)}}d&&$&64&&CR(S),Lp(S,S.return);break;case 27:PR(S);case 26:case 5:ec(b,S,d),d&&p===null&&$&4&&NR(S),Lp(S,S.return);break;case 12:ec(b,S,d);break;case 13:ec(b,S,d),d&&$&4&&LR(b,S);break;case 22:S.memoizedState===null&&ec(b,S,d),Lp(S,S.return);break;case 30:break;default:ec(b,S,d)}l=l.sibling}}function Gy(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Qc(d))}function Vy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Qc(s))}function Xo(s,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)FR(s,l,d,p),l=l.sibling}function FR(s,l,d,p){var b=l.flags;switch(l.tag){case 0:case 11:case 15:Xo(s,l,d,p),b&2048&&qp(9,l);break;case 1:Xo(s,l,d,p);break;case 3:Xo(s,l,d,p),b&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Qc(s)));break;case 12:if(b&2048){Xo(s,l,d,p),s=l.stateNode;try{var S=l.memoizedProps,$=S.id,K=S.onPostCommit;typeof K=="function"&&K($,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(pe){Vr(l,l.return,pe)}}else Xo(s,l,d,p);break;case 13:Xo(s,l,d,p);break;case 23:break;case 22:S=l.stateNode,$=l.alternate,l.memoizedState!==null?S._visibility&2?Xo(s,l,d,p):$p(s,l):S._visibility&2?Xo(s,l,d,p):(S._visibility|=2,$h(s,l,d,p,(l.subtreeFlags&10256)!==0)),b&2048&&Gy($,l);break;case 24:Xo(s,l,d,p),b&2048&&Vy(l.alternate,l);break;default:Xo(s,l,d,p)}}function $h(s,l,d,p,b){for(b=b&&(l.subtreeFlags&10256)!==0,l=l.child;l!==null;){var S=s,$=l,K=d,pe=p,Re=$.flags;switch($.tag){case 0:case 11:case 15:$h(S,$,K,pe,b),qp(8,$);break;case 23:break;case 22:var $e=$.stateNode;$.memoizedState!==null?$e._visibility&2?$h(S,$,K,pe,b):$p(S,$):($e._visibility|=2,$h(S,$,K,pe,b)),b&&Re&2048&&Gy($.alternate,$);break;case 24:$h(S,$,K,pe,b),b&&Re&2048&&Vy($.alternate,$);break;default:$h(S,$,K,pe,b)}l=l.sibling}}function $p(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,p=l,b=p.flags;switch(p.tag){case 22:$p(d,p),b&2048&&Gy(p.alternate,p);break;case 24:$p(d,p),b&2048&&Vy(p.alternate,p);break;default:$p(d,p)}l=l.sibling}}var Bp=8192;function Bh(s){if(s.subtreeFlags&Bp)for(s=s.child;s!==null;)zR(s),s=s.sibling}function zR(s){switch(s.tag){case 26:Bh(s),s.flags&Bp&&s.memoizedState!==null&&VZ(fo,s.memoizedState,s.memoizedProps);break;case 5:Bh(s);break;case 3:case 4:var l=fo;fo=Em(s.stateNode.containerInfo),Bh(s),fo=l;break;case 22:s.memoizedState===null&&(l=s.alternate,l!==null&&l.memoizedState!==null?(l=Bp,Bp=16777216,Bh(s),Bp=l):Bh(s));break;default:Bh(s)}}function UR(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function Fp(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Ei=p,WR(p,s)}UR(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)HR(s),s=s.sibling}function HR(s){switch(s.tag){case 0:case 11:case 15:Fp(s),s.flags&2048&&Zu(9,s,s.return);break;case 3:Fp(s);break;case 12:Fp(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,hm(s)):Fp(s);break;default:Fp(s)}}function hm(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Ei=p,WR(p,s)}UR(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Zu(8,l,l.return),hm(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,hm(l));break;default:hm(l)}s=s.sibling}}function WR(s,l){for(;Ei!==null;){var d=Ei;switch(d.tag){case 0:case 11:case 15:Zu(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Qc(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,Ei=p;else e:for(d=s;Ei!==null;){p=Ei;var b=p.sibling,S=p.return;if(DR(p),p===d){Ei=null;break e}if(b!==null){b.return=S,Ei=b;break e}Ei=S}}}var uZ={getCacheForType:function(s){var l=qn(Ln),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d}},cZ=typeof WeakMap=="function"?WeakMap:Map,jr=0,en=null,dr=null,Sr=0,Mr=0,ss=null,tc=!1,Fh=!1,Yy=!1,Ql=0,Nn=0,rc=0,ud=0,Ky=0,Rs=0,zh=0,zp=null,ja=null,Xy=!1,Qy=0,fm=1/0,pm=null,nc=null,Gi=0,ic=null,Uh=null,Hh=0,Zy=0,Jy=null,GR=null,Up=0,e0=null;function os(){if((jr&2)!==0&&Sr!==0)return Sr&-Sr;if(re.T!==null){var s=Ul;return s!==0?s:o0()}return Ha()}function VR(){Rs===0&&(Rs=(Sr&536870912)===0||Tr?Ct():536870912);var s=As.current;return s!==null&&(s.flags|=32),Rs}function ls(s,l,d){(s===en&&(Mr===2||Mr===9)||s.cancelPendingCommit!==null)&&(Wh(s,0),ac(s,Sr,Rs,!1)),Ht(s,d),((jr&2)===0||s!==en)&&(s===en&&((jr&2)===0&&(ud|=d),Nn===4&&ac(s,Sr,Rs,!1)),Qo(s))}function YR(s,l,d){if((jr&6)!==0)throw Error(n(327));var p=!d&&(l&124)===0&&(l&s.expiredLanes)===0||lt(s,l),b=p?fZ(s,l):n0(s,l,!0),S=p;do{if(b===0){Fh&&!p&&ac(s,l,0,!1);break}else{if(d=s.current.alternate,S&&!dZ(d)){b=n0(s,l,!1),S=!1;continue}if(b===2){if(S=l,s.errorRecoveryDisabledLanes&S)var $=0;else $=s.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){l=$;e:{var K=s;b=zp;var pe=K.current.memoizedState.isDehydrated;if(pe&&(Wh(K,$).flags|=256),$=n0(K,$,!1),$!==2){if(Yy&&!pe){K.errorRecoveryDisabledLanes|=S,ud|=S,b=4;break e}S=ja,ja=b,S!==null&&(ja===null?ja=S:ja.push.apply(ja,S))}b=$}if(S=!1,b!==2)continue}}if(b===1){Wh(s,0),ac(s,l,0,!0);break}e:{switch(p=s,S=b,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:ac(p,l,Rs,!tc);break e;case 2:ja=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(b=Qy+300-st(),10<b)){if(ac(p,l,Rs,!tc),ht(p,0,!0)!==0)break e;p.timeoutHandle=SC(KR.bind(null,p,d,ja,pm,Xy,l,Rs,ud,zh,tc,S,2,-0,0),b);break e}KR(p,d,ja,pm,Xy,l,Rs,ud,zh,tc,S,0,-0,0)}}break}while(!0);Qo(s)}function KR(s,l,d,p,b,S,$,K,pe,Re,$e,He,Ce,Ne){if(s.timeoutHandle=-1,He=l.subtreeFlags,(He&8192||(He&16785408)===16785408)&&(Xp={stylesheets:null,count:0,unsuspend:GZ},zR(l),He=YZ(),He!==null)){s.cancelPendingCommit=He(rC.bind(null,s,l,S,d,p,b,$,K,pe,$e,1,Ce,Ne)),ac(s,S,$,!Re);return}rC(s,l,S,d,p,b,$,K,pe)}function dZ(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var b=d[p],S=b.getSnapshot;b=b.value;try{if(!wr(S(),b))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ac(s,l,d,p){l&=~Ky,l&=~ud,s.suspendedLanes|=l,s.pingedLanes&=~l,p&&(s.warmLanes|=l),p=s.expirationTimes;for(var b=l;0<b;){var S=31-nt(b),$=1<<S;p[S]=-1,b&=~$}d!==0&&yr(s,d,l)}function vm(){return(jr&6)===0?(Hp(0),!1):!0}function t0(){if(dr!==null){if(Mr===0)var s=dr.return;else s=dr,so=Qn=null,ui(s),qh=null,jp=0,s=dr;for(;s!==null;)RR(s.alternate,s),s=s.return;dr=null}}function Wh(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,CZ(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),t0(),en=s,dr=d=ws(s.current,null),Sr=l,Mr=0,ss=null,tc=!1,Fh=lt(s,l),Yy=!1,zh=Rs=Ky=ud=rc=Nn=0,ja=zp=null,Xy=!1,(l&8)!==0&&(l|=l&32);var p=s.entangledLanes;if(p!==0)for(s=s.entanglements,p&=l;0<p;){var b=31-nt(p),S=1<<b;l|=s[b],p&=~S}return Ql=l,Wc(),d}function XR(s,l){mt=null,re.H=rm,l===H||l===X?(l=be(),Mr=3):l===V?(l=be(),Mr=4):Mr=l===pR?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,ss=l,dr===null&&(Nn=1,om(s,ua(l,s.current)))}function QR(){var s=re.H;return re.H=rm,s===null?rm:s}function ZR(){var s=re.A;return re.A=uZ,s}function r0(){Nn=4,tc||(Sr&4194048)!==Sr&&As.current!==null||(Fh=!0),(rc&134217727)===0&&(ud&134217727)===0||en===null||ac(en,Sr,Rs,!1)}function n0(s,l,d){var p=jr;jr|=2;var b=QR(),S=ZR();(en!==s||Sr!==l)&&(pm=null,Wh(s,l)),l=!1;var $=Nn;e:do try{if(Mr!==0&&dr!==null){var K=dr,pe=ss;switch(Mr){case 8:t0(),$=6;break e;case 3:case 2:case 9:case 6:As.current===null&&(l=!0);var Re=Mr;if(Mr=0,ss=null,Gh(s,K,pe,Re),d&&Fh){$=0;break e}break;default:Re=Mr,Mr=0,ss=null,Gh(s,K,pe,Re)}}hZ(),$=Nn;break}catch($e){XR(s,$e)}while(!0);return l&&s.shellSuspendCounter++,so=Qn=null,jr=p,re.H=b,re.A=S,dr===null&&(en=null,Sr=0,Wc()),$}function hZ(){for(;dr!==null;)JR(dr)}function fZ(s,l){var d=jr;jr|=2;var p=QR(),b=ZR();en!==s||Sr!==l?(pm=null,fm=st()+500,Wh(s,l)):Fh=lt(s,l);e:do try{if(Mr!==0&&dr!==null){l=dr;var S=ss;t:switch(Mr){case 1:Mr=0,ss=null,Gh(s,l,S,1);break;case 2:case 9:if(se(S)){Mr=0,ss=null,eC(l);break}l=function(){Mr!==2&&Mr!==9||en!==s||(Mr=7),Qo(s)},S.then(l,l);break e;case 3:Mr=7;break e;case 4:Mr=5;break e;case 7:se(S)?(Mr=0,ss=null,eC(l)):(Mr=0,ss=null,Gh(s,l,S,7));break;case 5:var $=null;switch(dr.tag){case 26:$=dr.memoizedState;case 5:case 27:var K=dr;if(!$||MC($)){Mr=0,ss=null;var pe=K.sibling;if(pe!==null)dr=pe;else{var Re=K.return;Re!==null?(dr=Re,gm(Re)):dr=null}break t}}Mr=0,ss=null,Gh(s,l,S,5);break;case 6:Mr=0,ss=null,Gh(s,l,S,6);break;case 8:t0(),Nn=6;break e;default:throw Error(n(462))}}pZ();break}catch($e){XR(s,$e)}while(!0);return so=Qn=null,re.H=p,re.A=b,jr=d,dr!==null?0:(en=null,Sr=0,Wc(),Nn)}function pZ(){for(;dr!==null&&!ne();)JR(dr)}function JR(s){var l=OR(s.alternate,s,Ql);s.memoizedProps=s.pendingProps,l===null?gm(s):dr=l}function eC(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=wR(d,l,l.pendingProps,l.type,void 0,Sr);break;case 11:l=wR(d,l,l.pendingProps,l.type.render,l.ref,Sr);break;case 5:ui(l);default:RR(d,l),l=dr=Vc(l,Ql),l=OR(d,l,Ql)}s.memoizedProps=s.pendingProps,l===null?gm(s):dr=l}function Gh(s,l,d,p){so=Qn=null,ui(l),qh=null,jp=0;var b=l.return;try{if(nZ(s,b,l,d,Sr)){Nn=1,om(s,ua(d,s.current)),dr=null;return}}catch(S){if(b!==null)throw dr=b,S;Nn=1,om(s,ua(d,s.current)),dr=null;return}l.flags&32768?(Tr||p===1?s=!0:Fh||(Sr&536870912)!==0?s=!1:(tc=s=!0,(p===2||p===9||p===3||p===6)&&(p=As.current,p!==null&&p.tag===13&&(p.flags|=16384))),tC(l,s)):gm(l)}function gm(s){var l=s;do{if((l.flags&32768)!==0){tC(l,tc);return}s=l.return;var d=aZ(l.alternate,l,Ql);if(d!==null){dr=d;return}if(l=l.sibling,l!==null){dr=l;return}dr=l=s}while(l!==null);Nn===0&&(Nn=5)}function tC(s,l){do{var d=sZ(s.alternate,s);if(d!==null){d.flags&=32767,dr=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){dr=s;return}dr=s=d}while(s!==null);Nn=6,dr=null}function rC(s,l,d,p,b,S,$,K,pe){s.cancelPendingCommit=null;do mm();while(Gi!==0);if((jr&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Eh,Pt(s,d,S,$,K,pe),s===en&&(dr=en=null,Sr=0),Uh=l,ic=s,Hh=d,Zy=S,Jy=b,GR=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,yZ(it,function(){return oC(),null})):(s.callbackNode=null,s.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=re.T,re.T=null,b=J.p,J.p=2,$=jr,jr|=4;try{oZ(s,l,d)}finally{jr=$,J.p=b,re.T=p}}Gi=1,nC(),iC(),aC()}}function nC(){if(Gi===1){Gi=0;var s=ic,l=Uh,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=re.T,re.T=null;var p=J.p;J.p=2;var b=jr;jr|=4;try{$R(l,s);var S=v0,$=Lu(s.containerInfo),K=S.focusedElem,pe=S.selectionRange;if($!==K&&K&&K.ownerDocument&&Uo(K.ownerDocument.documentElement,K)){if(pe!==null&&Ml(K)){var Re=pe.start,$e=pe.end;if($e===void 0&&($e=Re),"selectionStart"in K)K.selectionStart=Re,K.selectionEnd=Math.min($e,K.value.length);else{var He=K.ownerDocument||document,Ce=He&&He.defaultView||window;if(Ce.getSelection){var Ne=Ce.getSelection(),Yt=K.textContent.length,Bt=Math.min(pe.start,Yt),Ur=pe.end===void 0?Bt:Math.min(pe.end,Yt);!Ne.extend&&Bt>Ur&&($=Ur,Ur=Bt,Bt=$);var _e=Ta(K,Bt),me=Ta(K,Ur);if(_e&&me&&(Ne.rangeCount!==1||Ne.anchorNode!==_e.node||Ne.anchorOffset!==_e.offset||Ne.focusNode!==me.node||Ne.focusOffset!==me.offset)){var Te=He.createRange();Te.setStart(_e.node,_e.offset),Ne.removeAllRanges(),Bt>Ur?(Ne.addRange(Te),Ne.extend(me.node,me.offset)):(Te.setEnd(me.node,me.offset),Ne.addRange(Te))}}}}for(He=[],Ne=K;Ne=Ne.parentNode;)Ne.nodeType===1&&He.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<He.length;K++){var Fe=He[K];Fe.element.scrollLeft=Fe.left,Fe.element.scrollTop=Fe.top}}Cm=!!p0,v0=p0=null}finally{jr=b,J.p=p,re.T=d}}s.current=l,Gi=2}}function iC(){if(Gi===2){Gi=0;var s=ic,l=Uh,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=re.T,re.T=null;var p=J.p;J.p=2;var b=jr;jr|=4;try{MR(s,l.alternate,l)}finally{jr=b,J.p=p,re.T=d}}Gi=3}}function aC(){if(Gi===4||Gi===3){Gi=0,et();var s=ic,l=Uh,d=Hh,p=GR;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Gi=5:(Gi=0,Uh=ic=null,sC(s,s.pendingLanes));var b=s.pendingLanes;if(b===0&&(nc=null),Ua(d),l=l.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(At,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=re.T,b=J.p,J.p=2,re.T=null;try{for(var S=s.onRecoverableError,$=0;$<p.length;$++){var K=p[$];S(K.value,{componentStack:K.stack})}}finally{re.T=l,J.p=b}}(Hh&3)!==0&&mm(),Qo(s),b=s.pendingLanes,(d&4194090)!==0&&(b&42)!==0?s===e0?Up++:(Up=0,e0=s):Up=0,Hp(0)}}function sC(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Qc(l)))}function mm(s){return nC(),iC(),aC(),oC()}function oC(){if(Gi!==5)return!1;var s=ic,l=Zy;Zy=0;var d=Ua(Hh),p=re.T,b=J.p;try{J.p=32>d?32:d,re.T=null,d=Jy,Jy=null;var S=ic,$=Hh;if(Gi=0,Uh=ic=null,Hh=0,(jr&6)!==0)throw Error(n(331));var K=jr;if(jr|=4,HR(S.current),FR(S,S.current,$,d),jr=K,Hp(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(At,S)}catch{}return!0}finally{J.p=b,re.T=p,sC(s,l)}}function lC(s,l,d){l=ua(d,l),l=Iy(s.stateNode,l,2),s=Ye(s,l,2),s!==null&&(Ht(s,2),Qo(s))}function Vr(s,l,d){if(s.tag===3)lC(s,s,d);else for(;l!==null;){if(l.tag===3){lC(l,s,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(nc===null||!nc.has(p))){s=ua(d,s),d=hR(2),p=Ye(l,d,2),p!==null&&(fR(d,p,l,s),Ht(p,2),Qo(p));break}}l=l.return}}function i0(s,l,d){var p=s.pingCache;if(p===null){p=s.pingCache=new cZ;var b=new Set;p.set(l,b)}else b=p.get(l),b===void 0&&(b=new Set,p.set(l,b));b.has(d)||(Yy=!0,b.add(d),s=vZ.bind(null,s,l,d),l.then(s,s))}function vZ(s,l,d){var p=s.pingCache;p!==null&&p.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,en===s&&(Sr&d)===d&&(Nn===4||Nn===3&&(Sr&62914560)===Sr&&300>st()-Qy?(jr&2)===0&&Wh(s,0):Ky|=d,zh===Sr&&(zh=0)),Qo(s)}function uC(s,l){l===0&&(l=Mt()),s=ql(s,l),s!==null&&(Ht(s,l),Qo(s))}function gZ(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),uC(s,d)}function mZ(s,l){var d=0;switch(s.tag){case 13:var p=s.stateNode,b=s.memoizedState;b!==null&&(d=b.retryLane);break;case 19:p=s.stateNode;break;case 22:p=s.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(l),uC(s,d)}function yZ(s,l){return Xe(s,l)}var ym=null,Vh=null,a0=!1,bm=!1,s0=!1,cd=0;function Qo(s){s!==Vh&&s.next===null&&(Vh===null?ym=Vh=s:Vh=Vh.next=s),bm=!0,a0||(a0=!0,wZ())}function Hp(s,l){if(!s0&&bm){s0=!0;do for(var d=!1,p=ym;p!==null;){if(s!==0){var b=p.pendingLanes;if(b===0)var S=0;else{var $=p.suspendedLanes,K=p.pingedLanes;S=(1<<31-nt(42|s)+1)-1,S&=b&~($&~K),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(d=!0,fC(p,S))}else S=Sr,S=ht(p,p===en?S:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(S&3)===0||lt(p,S)||(d=!0,fC(p,S));p=p.next}while(d);s0=!1}}function bZ(){cC()}function cC(){bm=a0=!1;var s=0;cd!==0&&(RZ()&&(s=cd),cd=0);for(var l=st(),d=null,p=ym;p!==null;){var b=p.next,S=dC(p,l);S===0?(p.next=null,d===null?ym=b:d.next=b,b===null&&(Vh=d)):(d=p,(s!==0||(S&3)!==0)&&(bm=!0)),p=b}Hp(s)}function dC(s,l){for(var d=s.suspendedLanes,p=s.pingedLanes,b=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var $=31-nt(S),K=1<<$,pe=b[$];pe===-1?((K&d)===0||(K&p)!==0)&&(b[$]=or(K,l)):pe<=l&&(s.expiredLanes|=K),S&=~K}if(l=en,d=Sr,d=ht(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p=s.callbackNode,d===0||s===l&&(Mr===2||Mr===9)||s.cancelPendingCommit!==null)return p!==null&&p!==null&&dt(p),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||lt(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(p!==null&&dt(p),Ua(d)){case 2:case 8:d=vt;break;case 32:d=it;break;case 268435456:d=ut;break;default:d=it}return p=hC.bind(null,s),d=Xe(d,p),s.callbackPriority=l,s.callbackNode=d,l}return p!==null&&p!==null&&dt(p),s.callbackPriority=2,s.callbackNode=null,2}function hC(s,l){if(Gi!==0&&Gi!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(mm()&&s.callbackNode!==d)return null;var p=Sr;return p=ht(s,s===en?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p===0?null:(YR(s,p,l),dC(s,st()),s.callbackNode!=null&&s.callbackNode===d?hC.bind(null,s):null)}function fC(s,l){if(mm())return null;YR(s,l,!0)}function wZ(){kZ(function(){(jr&6)!==0?Xe(We,bZ):cC()})}function o0(){return cd===0&&(cd=Ct()),cd}function pC(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Ru(""+s)}function vC(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function xZ(s,l,d,p,b){if(l==="submit"&&d&&d.stateNode===b){var S=pC((b[Hr]||null).action),$=p.submitter;$&&(l=(l=$[Hr]||null)?pC(l.formAction):$.getAttribute("formAction"),l!==null&&(S=l,$=null));var K=new Nu("action","action",null,p,b);s.push({event:K,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(cd!==0){var pe=$?vC(b,$):new FormData(b);Os(d,{pending:!0,data:pe,method:b.method,action:S},null,pe)}}else typeof S=="function"&&(K.preventDefault(),pe=$?vC(b,$):new FormData(b),Os(d,{pending:!0,data:pe,method:b.method,action:S},S,pe))},currentTarget:b}]})}}for(var l0=0;l0<Sh.length;l0++){var u0=Sh[l0],_Z=u0.toLowerCase(),SZ=u0[0].toUpperCase()+u0.slice(1);ka(_Z,"on"+SZ)}ka(un,"onAnimationEnd"),ka(Cn,"onAnimationIteration"),ka(bs,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(Hc,"onTransitionRun"),ka(Bu,"onTransitionStart"),ka(_h,"onTransitionCancel"),ka(mp,"onTransitionEnd"),Ga("onMouseEnter",["mouseout","mouseover"]),Ga("onMouseLeave",["mouseout","mouseover"]),Ga("onPointerEnter",["pointerout","pointerover"]),Ga("onPointerLeave",["pointerout","pointerover"]),Sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wp="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(" "),EZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wp));function gC(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var p=s[d],b=p.event;p=p.listeners;e:{var S=void 0;if(l)for(var $=p.length-1;0<=$;$--){var K=p[$],pe=K.instance,Re=K.currentTarget;if(K=K.listener,pe!==S&&b.isPropagationStopped())break e;S=K,b.currentTarget=Re;try{S(b)}catch($e){sm($e)}b.currentTarget=null,S=pe}else for($=0;$<p.length;$++){if(K=p[$],pe=K.instance,Re=K.currentTarget,K=K.listener,pe!==S&&b.isPropagationStopped())break e;S=K,b.currentTarget=Re;try{S(b)}catch($e){sm($e)}b.currentTarget=null,S=pe}}}}function hr(s,l){var d=l[Zr];d===void 0&&(d=l[Zr]=new Set);var p=s+"__bubble";d.has(p)||(mC(l,s,2,!1),d.add(p))}function c0(s,l,d){var p=0;l&&(p|=4),mC(d,s,p,l)}var wm="_reactListening"+Math.random().toString(36).slice(2);function d0(s){if(!s[wm]){s[wm]=!0,Wa.forEach(function(d){d!=="selectionchange"&&(EZ.has(d)||c0(d,!1,s),c0(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[wm]||(l[wm]=!0,c0("selectionchange",!1,l))}}function mC(s,l,d,p){switch(FC(l)){case 2:var b=QZ;break;case 8:b=ZZ;break;default:b=T0}d=b.bind(null,l,d,s),b=void 0,!zc||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(b=!0),p?b!==void 0?s.addEventListener(l,d,{capture:!0,passive:b}):s.addEventListener(l,d,!0):b!==void 0?s.addEventListener(l,d,{passive:b}):s.addEventListener(l,d,!1)}function h0(s,l,d,p,b){var S=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var $=p.tag;if($===3||$===4){var K=p.stateNode.containerInfo;if(K===b)break;if($===4)for($=p.return;$!==null;){var pe=$.tag;if((pe===3||pe===4)&&$.stateNode.containerInfo===b)return;$=$.return}for(;K!==null;){if($=Mi(K),$===null)return;if(pe=$.tag,pe===5||pe===6||pe===26||pe===27){p=S=$;continue e}K=K.parentNode}}p=p.return}ph(function(){var Re=S,$e=Cu(d),He=[];e:{var Ce=yp.get(s);if(Ce!==void 0){var Ne=Nu,Yt=s;switch(s){case"keypress":if(Hs(d)===0)break e;case"keydown":case"keyup":Ne=bt;break;case"focusin":Yt="focus",Ne=Qa;break;case"focusout":Yt="blur",Ne=Qa;break;case"beforeblur":case"afterblur":Ne=Qa;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ne=Iu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ne=gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ne=fr;break;case un:case Cn:case bs:Ne=yh;break;case mp:Ne=Nr;break;case"scroll":case"scrollend":Ne=Mo;break;case"wheel":Ne=Wr;break;case"copy":case"cut":case"paste":Ne=Al;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ne=Gt;break;case"toggle":case"beforetoggle":Ne=sn}var Bt=(l&4)!==0,Ur=!Bt&&(s==="scroll"||s==="scrollend"),_e=Bt?Ce!==null?Ce+"Capture":null:Ce;Bt=[];for(var me=Re,Te;me!==null;){var Fe=me;if(Te=Fe.stateNode,Fe=Fe.tag,Fe!==5&&Fe!==26&&Fe!==27||Te===null||_e===null||(Fe=El(me,_e),Fe!=null&&Bt.push(Gp(me,Fe,Te))),Ur)break;me=me.return}0<Bt.length&&(Ce=new Ne(Ce,Yt,null,d,$e),He.push({event:Ce,listeners:Bt}))}}if((l&7)===0){e:{if(Ce=s==="mouseover"||s==="pointerover",Ne=s==="mouseout"||s==="pointerout",Ce&&d!==ms&&(Yt=d.relatedTarget||d.fromElement)&&(Mi(Yt)||Yt[ai]))break e;if((Ne||Ce)&&(Ce=$e.window===$e?$e:(Ce=$e.ownerDocument)?Ce.defaultView||Ce.parentWindow:window,Ne?(Yt=d.relatedTarget||d.toElement,Ne=Re,Yt=Yt?Mi(Yt):null,Yt!==null&&(Ur=a(Yt),Bt=Yt.tag,Yt!==Ur||Bt!==5&&Bt!==27&&Bt!==6)&&(Yt=null)):(Ne=null,Yt=Re),Ne!==Yt)){if(Bt=Iu,Fe="onMouseLeave",_e="onMouseEnter",me="mouse",(s==="pointerout"||s==="pointerover")&&(Bt=Gt,Fe="onPointerLeave",_e="onPointerEnter",me="pointer"),Ur=Ne==null?Ce:Di(Ne),Te=Yt==null?Ce:Di(Yt),Ce=new Bt(Fe,me+"leave",Ne,d,$e),Ce.target=Ur,Ce.relatedTarget=Te,Fe=null,Mi($e)===Re&&(Bt=new Bt(_e,me+"enter",Yt,d,$e),Bt.target=Te,Bt.relatedTarget=Ur,Fe=Bt),Ur=Fe,Ne&&Yt)t:{for(Bt=Ne,_e=Yt,me=0,Te=Bt;Te;Te=Yh(Te))me++;for(Te=0,Fe=_e;Fe;Fe=Yh(Fe))Te++;for(;0<me-Te;)Bt=Yh(Bt),me--;for(;0<Te-me;)_e=Yh(_e),Te--;for(;me--;){if(Bt===_e||_e!==null&&Bt===_e.alternate)break t;Bt=Yh(Bt),_e=Yh(_e)}Bt=null}else Bt=null;Ne!==null&&yC(He,Ce,Ne,Bt,!1),Yt!==null&&Ur!==null&&yC(He,Ur,Yt,Bt,!0)}}e:{if(Ce=Re?Di(Re):window,Ne=Ce.nodeName&&Ce.nodeName.toLowerCase(),Ne==="select"||Ne==="input"&&Ce.type==="file")var wt=$o;else if(Ja(Ce))if(ju)wt=qu;else{wt=Fo;var ur=Du}else Ne=Ce.nodeName,!Ne||Ne.toLowerCase()!=="input"||Ce.type!=="checkbox"&&Ce.type!=="radio"?Re&&Sl(Re.elementType)&&(wt=$o):wt=zo;if(wt&&(wt=wt(s,Re))){bi(He,wt,d,$e);break e}ur&&ur(s,Ce,Re),s==="focusout"&&Re&&Ce.type==="number"&&Re.memoizedProps.value!=null&&Au(Ce,"number",Ce.value)}switch(ur=Re?Di(Re):window,s){case"focusin":(Ja(ur)||ur.contentEditable==="true")&&(Oa=ur,Js=Re,Aa=null);break;case"focusout":Aa=Js=Oa=null;break;case"mousedown":ts=!0;break;case"contextmenu":case"mouseup":case"dragend":ts=!1,eo(He,d,$e);break;case"selectionchange":if($u)break;case"keydown":case"keyup":eo(He,d,$e)}var kt;if(Za)e:{switch(s){case"compositionstart":var Ut="onCompositionStart";break e;case"compositionend":Ut="onCompositionEnd";break e;case"compositionupdate":Ut="onCompositionUpdate";break e}Ut=void 0}else bn?Cl(s,d)&&(Ut="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Ut="onCompositionStart");Ut&&(Do&&d.locale!=="ko"&&(bn||Ut!=="onCompositionStart"?Ut==="onCompositionEnd"&&bn&&(kt=vh()):(gi=$e,Ka="value"in gi?gi.value:gi.textContent,bn=!0)),ur=xm(Re,Ut),0<ur.length&&(Ut=new O(Ut,s,null,d,$e),He.push({event:Ut,listeners:ur}),kt?Ut.data=kt:(kt=kl(d),kt!==null&&(Ut.data=kt)))),(kt=Rl?Nl(s,d):Il(s,d))&&(Ut=xm(Re,"onBeforeInput"),0<Ut.length&&(ur=new O("onBeforeInput","beforeinput",null,d,$e),He.push({event:ur,listeners:Ut}),ur.data=kt)),xZ(He,s,Re,d,$e)}gC(He,l)})}function Gp(s,l,d){return{instance:s,listener:l,currentTarget:d}}function xm(s,l){for(var d=l+"Capture",p=[];s!==null;){var b=s,S=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||S===null||(b=El(s,d),b!=null&&p.unshift(Gp(s,b,S)),b=El(s,l),b!=null&&p.push(Gp(s,b,S))),s.tag===3)return p;s=s.return}return[]}function Yh(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function yC(s,l,d,p,b){for(var S=l._reactName,$=[];d!==null&&d!==p;){var K=d,pe=K.alternate,Re=K.stateNode;if(K=K.tag,pe!==null&&pe===p)break;K!==5&&K!==26&&K!==27||Re===null||(pe=Re,b?(Re=El(d,S),Re!=null&&$.unshift(Gp(d,Re,pe))):b||(Re=El(d,S),Re!=null&&$.push(Gp(d,Re,pe)))),d=d.return}$.length!==0&&s.push({event:l,listeners:$})}var TZ=/\r\n?/g,OZ=/\u0000|\uFFFD/g;function bC(s){return(typeof s=="string"?s:""+s).replace(TZ,`
|
|
49
|
+
`).replace(OZ,"")}function wC(s,l){return l=bC(l),bC(s)===l}function _m(){}function zr(s,l,d,p,b,S){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||Li(s,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&Li(s,""+p);break;case"className":qi(s,"class",p);break;case"tabIndex":qi(s,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":qi(s,d,p);break;case"style":_l(s,p,S);break;case"data":if(l!=="object"){qi(s,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(d);break}p=Ru(""+p),s.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(d==="formAction"?(l!=="input"&&zr(s,l,"name",b.name,b,null),zr(s,l,"formEncType",b.formEncType,b,null),zr(s,l,"formMethod",b.formMethod,b,null),zr(s,l,"formTarget",b.formTarget,b,null)):(zr(s,l,"encType",b.encType,b,null),zr(s,l,"method",b.method,b,null),zr(s,l,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(d);break}p=Ru(""+p),s.setAttribute(d,p);break;case"onClick":p!=null&&(s.onclick=_m);break;case"onScroll":p!=null&&hr("scroll",s);break;case"onScrollEnd":p!=null&&hr("scrollend",s);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(d=p.__html,d!=null){if(b.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"multiple":s.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":s.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){s.removeAttribute("xlink:href");break}d=Ru(""+p),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,""+p):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":p===!0?s.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,p):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?s.setAttribute(d,p):s.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?s.removeAttribute(d):s.setAttribute(d,p);break;case"popover":hr("beforetoggle",s),hr("toggle",s),yl(s,"popover",p);break;case"xlinkActuate":aa(s,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":aa(s,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":aa(s,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":aa(s,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":aa(s,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":aa(s,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":aa(s,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":aa(s,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":aa(s,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":yl(s,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=vp.get(d)||d,yl(s,d,p))}}function f0(s,l,d,p,b,S){switch(d){case"style":_l(s,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(d=p.__html,d!=null){if(b.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"children":typeof p=="string"?Li(s,p):(typeof p=="number"||typeof p=="bigint")&&Li(s,""+p);break;case"onScroll":p!=null&&hr("scroll",s);break;case"onScrollEnd":p!=null&&hr("scrollend",s);break;case"onClick":p!=null&&(s.onclick=_m);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Co.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(b=d.endsWith("Capture"),l=d.slice(2,b?d.length-7:void 0),S=s[Hr]||null,S=S!=null?S[d]:null,typeof S=="function"&&s.removeEventListener(l,S,b),typeof p=="function")){typeof S!="function"&&S!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,p,b);break e}d in s?s[d]=p:p===!0?s.setAttribute(d,""):yl(s,d,p)}}}function Vi(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":hr("error",s),hr("load",s);var p=!1,b=!1,S;for(S in d)if(d.hasOwnProperty(S)){var $=d[S];if($!=null)switch(S){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:zr(s,l,S,$,d,null)}}b&&zr(s,l,"srcSet",d.srcSet,d,null),p&&zr(s,l,"src",d.src,d,null);return;case"input":hr("invalid",s);var K=S=$=b=null,pe=null,Re=null;for(p in d)if(d.hasOwnProperty(p)){var $e=d[p];if($e!=null)switch(p){case"name":b=$e;break;case"type":$=$e;break;case"checked":pe=$e;break;case"defaultChecked":Re=$e;break;case"value":S=$e;break;case"defaultValue":K=$e;break;case"children":case"dangerouslySetInnerHTML":if($e!=null)throw Error(n(137,l));break;default:zr(s,l,p,$e,d,null)}}Kn(s,S,K,pe,Re,$,b,!1),sa(s);return;case"select":hr("invalid",s),p=$=S=null;for(b in d)if(d.hasOwnProperty(b)&&(K=d[b],K!=null))switch(b){case"value":S=K;break;case"defaultValue":$=K;break;case"multiple":p=K;default:zr(s,l,b,K,d,null)}l=S,d=$,s.multiple=!!p,l!=null?No(s,!!p,l,!1):d!=null&&No(s,!!p,d,!0);return;case"textarea":hr("invalid",s),S=b=p=null;for($ in d)if(d.hasOwnProperty($)&&(K=d[$],K!=null))switch($){case"value":p=K;break;case"defaultValue":b=K;break;case"children":S=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(n(91));break;default:zr(s,l,$,K,d,null)}hh(s,p,b,S),sa(s);return;case"option":for(pe in d)d.hasOwnProperty(pe)&&(p=d[pe],p!=null)&&(pe==="selected"?s.selected=p&&typeof p!="function"&&typeof p!="symbol":zr(s,l,pe,p,d,null));return;case"dialog":hr("beforetoggle",s),hr("toggle",s),hr("cancel",s),hr("close",s);break;case"iframe":case"object":hr("load",s);break;case"video":case"audio":for(p=0;p<Wp.length;p++)hr(Wp[p],s);break;case"image":hr("error",s),hr("load",s);break;case"details":hr("toggle",s);break;case"embed":case"source":case"link":hr("error",s),hr("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Re in d)if(d.hasOwnProperty(Re)&&(p=d[Re],p!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:zr(s,l,Re,p,d,null)}return;default:if(Sl(l)){for($e in d)d.hasOwnProperty($e)&&(p=d[$e],p!==void 0&&f0(s,l,$e,p,d,void 0));return}}for(K in d)d.hasOwnProperty(K)&&(p=d[K],p!=null&&zr(s,l,K,p,d,null))}function AZ(s,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,S=null,$=null,K=null,pe=null,Re=null,$e=null;for(Ne in d){var He=d[Ne];if(d.hasOwnProperty(Ne)&&He!=null)switch(Ne){case"checked":break;case"value":break;case"defaultValue":pe=He;default:p.hasOwnProperty(Ne)||zr(s,l,Ne,null,p,He)}}for(var Ce in p){var Ne=p[Ce];if(He=d[Ce],p.hasOwnProperty(Ce)&&(Ne!=null||He!=null))switch(Ce){case"type":S=Ne;break;case"name":b=Ne;break;case"checked":Re=Ne;break;case"defaultChecked":$e=Ne;break;case"value":$=Ne;break;case"defaultValue":K=Ne;break;case"children":case"dangerouslySetInnerHTML":if(Ne!=null)throw Error(n(137,l));break;default:Ne!==He&&zr(s,l,Ce,Ne,p,He)}}Va(s,$,K,pe,Re,$e,S,b);return;case"select":Ne=$=K=Ce=null;for(S in d)if(pe=d[S],d.hasOwnProperty(S)&&pe!=null)switch(S){case"value":break;case"multiple":Ne=pe;default:p.hasOwnProperty(S)||zr(s,l,S,null,p,pe)}for(b in p)if(S=p[b],pe=d[b],p.hasOwnProperty(b)&&(S!=null||pe!=null))switch(b){case"value":Ce=S;break;case"defaultValue":K=S;break;case"multiple":$=S;default:S!==pe&&zr(s,l,b,S,p,pe)}l=K,d=$,p=Ne,Ce!=null?No(s,!!d,Ce,!1):!!p!=!!d&&(l!=null?No(s,!!d,l,!0):No(s,!!d,d?[]:"",!1));return;case"textarea":Ne=Ce=null;for(K in d)if(b=d[K],d.hasOwnProperty(K)&&b!=null&&!p.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:zr(s,l,K,null,p,b)}for($ in p)if(b=p[$],S=d[$],p.hasOwnProperty($)&&(b!=null||S!=null))switch($){case"value":Ce=b;break;case"defaultValue":Ne=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(n(91));break;default:b!==S&&zr(s,l,$,b,p,S)}dh(s,Ce,Ne);return;case"option":for(var Yt in d)Ce=d[Yt],d.hasOwnProperty(Yt)&&Ce!=null&&!p.hasOwnProperty(Yt)&&(Yt==="selected"?s.selected=!1:zr(s,l,Yt,null,p,Ce));for(pe in p)Ce=p[pe],Ne=d[pe],p.hasOwnProperty(pe)&&Ce!==Ne&&(Ce!=null||Ne!=null)&&(pe==="selected"?s.selected=Ce&&typeof Ce!="function"&&typeof Ce!="symbol":zr(s,l,pe,Ce,p,Ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Bt in d)Ce=d[Bt],d.hasOwnProperty(Bt)&&Ce!=null&&!p.hasOwnProperty(Bt)&&zr(s,l,Bt,null,p,Ce);for(Re in p)if(Ce=p[Re],Ne=d[Re],p.hasOwnProperty(Re)&&Ce!==Ne&&(Ce!=null||Ne!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(n(137,l));break;default:zr(s,l,Re,Ce,p,Ne)}return;default:if(Sl(l)){for(var Ur in d)Ce=d[Ur],d.hasOwnProperty(Ur)&&Ce!==void 0&&!p.hasOwnProperty(Ur)&&f0(s,l,Ur,void 0,p,Ce);for($e in p)Ce=p[$e],Ne=d[$e],!p.hasOwnProperty($e)||Ce===Ne||Ce===void 0&&Ne===void 0||f0(s,l,$e,Ce,p,Ne);return}}for(var _e in d)Ce=d[_e],d.hasOwnProperty(_e)&&Ce!=null&&!p.hasOwnProperty(_e)&&zr(s,l,_e,null,p,Ce);for(He in p)Ce=p[He],Ne=d[He],!p.hasOwnProperty(He)||Ce===Ne||Ce==null&&Ne==null||zr(s,l,He,Ce,p,Ne)}var p0=null,v0=null;function Sm(s){return s.nodeType===9?s:s.ownerDocument}function xC(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _C(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function g0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var m0=null;function RZ(){var s=window.event;return s&&s.type==="popstate"?s===m0?!1:(m0=s,!0):(m0=null,!1)}var SC=typeof setTimeout=="function"?setTimeout:void 0,CZ=typeof clearTimeout=="function"?clearTimeout:void 0,EC=typeof Promise=="function"?Promise:void 0,kZ=typeof queueMicrotask=="function"?queueMicrotask:typeof EC<"u"?function(s){return EC.resolve(null).then(s).catch(NZ)}:SC;function NZ(s){setTimeout(function(){throw s})}function sc(s){return s==="head"}function TC(s,l){var d=l,p=0,b=0;do{var S=d.nextSibling;if(s.removeChild(d),S&&S.nodeType===8)if(d=S.data,d==="/$"){if(0<p&&8>p){d=p;var $=s.ownerDocument;if(d&1&&Vp($.documentElement),d&2&&Vp($.body),d&4)for(d=$.head,Vp(d),$=d.firstChild;$;){var K=$.nextSibling,pe=$.nodeName;$[_a]||pe==="SCRIPT"||pe==="STYLE"||pe==="LINK"&&$.rel.toLowerCase()==="stylesheet"||d.removeChild($),$=K}}if(b===0){s.removeChild(S),tv(l);return}b--}else d==="$"||d==="$?"||d==="$!"?b++:p=d.charCodeAt(0)-48;else p=0;d=S}while(d);tv(l)}function y0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":y0(d),ia(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function IZ(s,l,d,p){for(;s.nodeType===1;){var b=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(p){if(!s[_a])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==b.rel||s.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||s.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||s.getAttribute("title")!==(b.title==null?null:b.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(b.src==null?null:b.src)||s.getAttribute("type")!==(b.type==null?null:b.type)||s.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=b.name==null?null:""+b.name;if(b.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=po(s.nextSibling),s===null)break}return null}function PZ(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=po(s.nextSibling),s===null))return null;return s}function b0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState==="complete"}function jZ(s,l){var d=s.ownerDocument;if(s.data!=="$?"||d.readyState==="complete")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),s._reactRetry=p}}function po(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="F!"||l==="F")break;if(l==="/$")return null}}return s}var w0=null;function OC(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return s;l--}else d==="/$"&&l++}s=s.previousSibling}return null}function AC(s,l,d){switch(l=Sm(d),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function Vp(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);ia(s)}var Cs=new Map,RC=new Set;function Em(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Zl=J.d;J.d={f:MZ,r:DZ,D:qZ,C:LZ,L:$Z,m:BZ,X:zZ,S:FZ,M:UZ};function MZ(){var s=Zl.f(),l=vm();return s||l}function DZ(s){var l=vi(s);l!==null&&l.tag===5&&l.type==="form"?ad(l):Zl.r(s)}var Kh=typeof document>"u"?null:document;function CC(s,l,d){var p=Kh;if(p&&typeof l=="string"&&l){var b=li(l);b='link[rel="'+s+'"][href="'+b+'"]',typeof d=="string"&&(b+='[crossorigin="'+d+'"]'),RC.has(b)||(RC.add(b),s={rel:s,crossOrigin:d,href:l},p.querySelector(b)===null&&(l=p.createElement("link"),Vi(l,"link",s),Jr(l),p.head.appendChild(l)))}}function qZ(s){Zl.D(s),CC("dns-prefetch",s,null)}function LZ(s,l){Zl.C(s,l),CC("preconnect",s,l)}function $Z(s,l,d){Zl.L(s,l,d);var p=Kh;if(p&&s&&l){var b='link[rel="preload"][as="'+li(l)+'"]';l==="image"&&d&&d.imageSrcSet?(b+='[imagesrcset="'+li(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(b+='[imagesizes="'+li(d.imageSizes)+'"]')):b+='[href="'+li(s)+'"]';var S=b;switch(l){case"style":S=Xh(s);break;case"script":S=Qh(s)}Cs.has(S)||(s=f({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),Cs.set(S,s),p.querySelector(b)!==null||l==="style"&&p.querySelector(Yp(S))||l==="script"&&p.querySelector(Kp(S))||(l=p.createElement("link"),Vi(l,"link",s),Jr(l),p.head.appendChild(l)))}}function BZ(s,l){Zl.m(s,l);var d=Kh;if(d&&s){var p=l&&typeof l.as=="string"?l.as:"script",b='link[rel="modulepreload"][as="'+li(p)+'"][href="'+li(s)+'"]',S=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Qh(s)}if(!Cs.has(S)&&(s=f({rel:"modulepreload",href:s},l),Cs.set(S,s),d.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Kp(S)))return}p=d.createElement("link"),Vi(p,"link",s),Jr(p),d.head.appendChild(p)}}}function FZ(s,l,d){Zl.S(s,l,d);var p=Kh;if(p&&s){var b=oi(p).hoistableStyles,S=Xh(s);l=l||"default";var $=b.get(S);if(!$){var K={loading:0,preload:null};if($=p.querySelector(Yp(S)))K.loading=5;else{s=f({rel:"stylesheet",href:s,"data-precedence":l},d),(d=Cs.get(S))&&x0(s,d);var pe=$=p.createElement("link");Jr(pe),Vi(pe,"link",s),pe._p=new Promise(function(Re,$e){pe.onload=Re,pe.onerror=$e}),pe.addEventListener("load",function(){K.loading|=1}),pe.addEventListener("error",function(){K.loading|=2}),K.loading|=4,Tm($,l,p)}$={type:"stylesheet",instance:$,count:1,state:K},b.set(S,$)}}}function zZ(s,l){Zl.X(s,l);var d=Kh;if(d&&s){var p=oi(d).hoistableScripts,b=Qh(s),S=p.get(b);S||(S=d.querySelector(Kp(b)),S||(s=f({src:s,async:!0},l),(l=Cs.get(b))&&_0(s,l),S=d.createElement("script"),Jr(S),Vi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function UZ(s,l){Zl.M(s,l);var d=Kh;if(d&&s){var p=oi(d).hoistableScripts,b=Qh(s),S=p.get(b);S||(S=d.querySelector(Kp(b)),S||(s=f({src:s,async:!0,type:"module"},l),(l=Cs.get(b))&&_0(s,l),S=d.createElement("script"),Jr(S),Vi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function kC(s,l,d,p){var b=(b=ue.current)?Em(b):null;if(!b)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Xh(d.href),d=oi(b).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Xh(d.href);var S=oi(b).hoistableStyles,$=S.get(s);if($||(b=b.ownerDocument||b,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,$),(S=b.querySelector(Yp(s)))&&!S._p&&($.instance=S,$.state.loading=5),Cs.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Cs.set(s,d),S||HZ(b,s,d,$.state))),l&&p===null)throw Error(n(528,""));return $}if(l&&p!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Qh(d),d=oi(b).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function Xh(s){return'href="'+li(s)+'"'}function Yp(s){return'link[rel="stylesheet"]['+s+"]"}function NC(s){return f({},s,{"data-precedence":s.precedence,precedence:null})}function HZ(s,l,d,p){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=s.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Vi(l,"link",d),Jr(l),s.head.appendChild(l))}function Qh(s){return'[src="'+li(s)+'"]'}function Kp(s){return"script[async]"+s}function IC(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=s.querySelector('style[data-href~="'+li(d.href)+'"]');if(p)return l.instance=p,Jr(p),p;var b=f({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(s.ownerDocument||s).createElement("style"),Jr(p),Vi(p,"style",b),Tm(p,d.precedence,s),l.instance=p;case"stylesheet":b=Xh(d.href);var S=s.querySelector(Yp(b));if(S)return l.state.loading|=4,l.instance=S,Jr(S),S;p=NC(d),(b=Cs.get(b))&&x0(p,b),S=(s.ownerDocument||s).createElement("link"),Jr(S);var $=S;return $._p=new Promise(function(K,pe){$.onload=K,$.onerror=pe}),Vi(S,"link",p),l.state.loading|=4,Tm(S,d.precedence,s),l.instance=S;case"script":return S=Qh(d.src),(b=s.querySelector(Kp(S)))?(l.instance=b,Jr(b),b):(p=d,(b=Cs.get(S))&&(p=f({},d),_0(p,b)),s=s.ownerDocument||s,b=s.createElement("script"),Jr(b),Vi(b,"link",p),s.head.appendChild(b),l.instance=b);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,Tm(p,d.precedence,s));return l.instance}function Tm(s,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,S=b,$=0;$<p.length;$++){var K=p[$];if(K.dataset.precedence===l)S=K;else if(S!==b)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function x0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function _0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Om=null;function PC(s,l,d){if(Om===null){var p=new Map,b=Om=new Map;b.set(d,p)}else b=Om,p=b.get(d),p||(p=new Map,b.set(d,p));if(p.has(s))return p;for(p.set(s,null),d=d.getElementsByTagName(s),b=0;b<d.length;b++){var S=d[b];if(!(S[_a]||S[Qr]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var $=S.getAttribute(l)||"";$=s+$;var K=p.get($);K?K.push(S):p.set($,[S])}}return p}function jC(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function WZ(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(s=l.disabled,typeof l.precedence=="string"&&s==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function MC(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}var Xp=null;function GZ(){}function VZ(s,l,d){if(Xp===null)throw Error(n(475));var p=Xp;if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=Xh(d.href),S=s.querySelector(Yp(b));if(S){s=S._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(p.count++,p=Am.bind(p),s.then(p,p)),l.state.loading|=4,l.instance=S,Jr(S);return}S=s.ownerDocument||s,d=NC(d),(b=Cs.get(b))&&x0(d,b),S=S.createElement("link"),Jr(S);var $=S;$._p=new Promise(function(K,pe){$.onload=K,$.onerror=pe}),Vi(S,"link",d),l.instance=S}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(p.count++,l=Am.bind(p),s.addEventListener("load",l),s.addEventListener("error",l))}}function YZ(){if(Xp===null)throw Error(n(475));var s=Xp;return s.stylesheets&&s.count===0&&S0(s,s.stylesheets),0<s.count?function(l){var d=setTimeout(function(){if(s.stylesheets&&S0(s,s.stylesheets),s.unsuspend){var p=s.unsuspend;s.unsuspend=null,p()}},6e4);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(d)}}:null}function Am(){if(this.count--,this.count===0){if(this.stylesheets)S0(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Rm=null;function S0(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Rm=new Map,l.forEach(KZ,s),Rm=null,Am.call(s))}function KZ(s,l){if(!(l.state.loading&4)){var d=Rm.get(s);if(d)var p=d.get(null);else{d=new Map,Rm.set(s,d);for(var b=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<b.length;S++){var $=b[S];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(d.set($.dataset.precedence,$),p=$)}p&&d.set(null,p)}b=l.instance,$=b.getAttribute("data-precedence"),S=d.get($)||p,S===p&&d.set(null,b),d.set($,b),this.count++,p=Am.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),S?S.parentNode.insertBefore(b,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(b,s.firstChild)),l.state.loading|=4}}var Qp={$$typeof:N,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function XZ(s,l,d,p,b,S,$,K){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.hiddenUpdates=zt(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=S,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function DC(s,l,d,p,b,S,$,K,pe,Re,$e,He){return s=new XZ(s,l,d,$,K,pe,Re,He),l=1,S===!0&&(l|=24),S=xi(3,null,null,l),s.current=S,S.stateNode=s,l=wp(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:p,isDehydrated:d,cache:l},Oe(S),s}function qC(s){return s?(s=Xn,s):Xn}function LC(s,l,d,p,b,S){b=qC(b),p.context===null?p.context=b:p.pendingContext=b,p=De(l),p.payload={element:d},S=S===void 0?null:S,S!==null&&(p.callback=S),d=Ye(s,p,l),d!==null&&(ls(d,s,l),Ue(d,s,l))}function $C(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function E0(s,l){$C(s,l),(s=s.alternate)&&$C(s,l)}function BC(s){if(s.tag===13){var l=ql(s,67108864);l!==null&&ls(l,s,67108864),E0(s,67108864)}}var Cm=!0;function QZ(s,l,d,p){var b=re.T;re.T=null;var S=J.p;try{J.p=2,T0(s,l,d,p)}finally{J.p=S,re.T=b}}function ZZ(s,l,d,p){var b=re.T;re.T=null;var S=J.p;try{J.p=8,T0(s,l,d,p)}finally{J.p=S,re.T=b}}function T0(s,l,d,p){if(Cm){var b=O0(p);if(b===null)h0(s,l,p,km,d),zC(s,p);else if(eJ(b,s,l,d,p))p.stopPropagation();else if(zC(s,p),l&4&&-1<JZ.indexOf(s)){for(;b!==null;){var S=vi(b);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var $=Be(S.pendingLanes);if($!==0){var K=S;for(K.pendingLanes|=2,K.entangledLanes|=2;$;){var pe=1<<31-nt($);K.entanglements[1]|=pe,$&=~pe}Qo(S),(jr&6)===0&&(fm=st()+500,Hp(0))}}break;case 13:K=ql(S,2),K!==null&&ls(K,S,2),vm(),E0(S,2)}if(S=O0(p),S===null&&h0(s,l,p,km,d),S===b)break;b=S}b!==null&&p.stopPropagation()}else h0(s,l,p,null,d)}}function O0(s){return s=Cu(s),A0(s)}var km=null;function A0(s){if(km=null,s=Mi(s),s!==null){var l=a(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=o(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return km=s,null}function FC(s){switch(s){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ot()){case We:return 2;case vt:return 8;case it:case yt:return 32;case ut:return 268435456;default:return 32}default:return 32}}var R0=!1,oc=null,lc=null,uc=null,Zp=new Map,Jp=new Map,cc=[],JZ="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".split(" ");function zC(s,l){switch(s){case"focusin":case"focusout":oc=null;break;case"dragenter":case"dragleave":lc=null;break;case"mouseover":case"mouseout":uc=null;break;case"pointerover":case"pointerout":Zp.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jp.delete(l.pointerId)}}function ev(s,l,d,p,b,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:S,targetContainers:[b]},l!==null&&(l=vi(l),l!==null&&BC(l)),s):(s.eventSystemFlags|=p,l=s.targetContainers,b!==null&&l.indexOf(b)===-1&&l.push(b),s)}function eJ(s,l,d,p,b){switch(l){case"focusin":return oc=ev(oc,s,l,d,p,b),!0;case"dragenter":return lc=ev(lc,s,l,d,p,b),!0;case"mouseover":return uc=ev(uc,s,l,d,p,b),!0;case"pointerover":var S=b.pointerId;return Zp.set(S,ev(Zp.get(S)||null,s,l,d,p,b)),!0;case"gotpointercapture":return S=b.pointerId,Jp.set(S,ev(Jp.get(S)||null,s,l,d,p,b)),!0}return!1}function UC(s){var l=Mi(s.target);if(l!==null){var d=a(l);if(d!==null){if(l=d.tag,l===13){if(l=o(d),l!==null){s.blockedOn=l,Dt(s.priority,function(){if(d.tag===13){var p=os();p=Cr(p);var b=ql(d,p);b!==null&&ls(b,d,p),E0(d,p)}});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Nm(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=O0(s.nativeEvent);if(d===null){d=s.nativeEvent;var p=new d.constructor(d.type,d);ms=p,d.target.dispatchEvent(p),ms=null}else return l=vi(d),l!==null&&BC(l),s.blockedOn=d,!1;l.shift()}return!0}function HC(s,l,d){Nm(s)&&d.delete(l)}function tJ(){R0=!1,oc!==null&&Nm(oc)&&(oc=null),lc!==null&&Nm(lc)&&(lc=null),uc!==null&&Nm(uc)&&(uc=null),Zp.forEach(HC),Jp.forEach(HC)}function Im(s,l){s.blockedOn===l&&(s.blockedOn=null,R0||(R0=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,tJ)))}var Pm=null;function WC(s){Pm!==s&&(Pm=s,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Pm===s&&(Pm=null);for(var l=0;l<s.length;l+=3){var d=s[l],p=s[l+1],b=s[l+2];if(typeof p!="function"){if(A0(p||d)===null)continue;break}var S=vi(d);S!==null&&(s.splice(l,3),l-=3,Os(S,{pending:!0,data:b,method:d.method,action:p},p,b))}}))}function tv(s){function l(pe){return Im(pe,s)}oc!==null&&Im(oc,s),lc!==null&&Im(lc,s),uc!==null&&Im(uc,s),Zp.forEach(l),Jp.forEach(l);for(var d=0;d<cc.length;d++){var p=cc[d];p.blockedOn===s&&(p.blockedOn=null)}for(;0<cc.length&&(d=cc[0],d.blockedOn===null);)UC(d),d.blockedOn===null&&cc.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var b=d[p],S=d[p+1],$=b[Hr]||null;if(typeof S=="function")$||WC(d);else if($){var K=null;if(S&&S.hasAttribute("formAction")){if(b=S,$=S[Hr]||null)K=$.formAction;else if(A0(b)!==null)continue}else K=$.action;typeof K=="function"?d[p+1]=K:(d.splice(p,3),p-=3),WC(d)}}}function C0(s){this._internalRoot=s}jm.prototype.render=C0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,p=os();LC(d,p,s,l,null,null)},jm.prototype.unmount=C0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;LC(s.current,2,null,s,null,null),vm(),l[ai]=null}};function jm(s){this._internalRoot=s}jm.prototype.unstable_scheduleHydration=function(s){if(s){var l=Ha();s={blockedOn:null,target:s,priority:l};for(var d=0;d<cc.length&&l!==0&&l<cc[d].priority;d++);cc.splice(d,0,s),d===0&&UC(s)}};var GC=e.version;if(GC!=="19.1.0")throw Error(n(527,GC,"19.1.0"));J.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=c(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var rJ={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mm.isDisabled&&Mm.supportsFiber)try{At=Mm.inject(rJ),Tt=Mm}catch{}}return nv.createRoot=function(s,l){if(!i(s))throw Error(n(299));var d=!1,p="",b=lR,S=uR,$=cR,K=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&($=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(K=l.unstable_transitionCallbacks)),l=DC(s,1,!1,null,null,d,p,b,S,$,K,null),s[ai]=l.current,d0(s),new C0(l)},nv.hydrateRoot=function(s,l,d){if(!i(s))throw Error(n(299));var p=!1,b="",S=lR,$=uR,K=cR,pe=null,Re=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onUncaughtError!==void 0&&(S=d.onUncaughtError),d.onCaughtError!==void 0&&($=d.onCaughtError),d.onRecoverableError!==void 0&&(K=d.onRecoverableError),d.unstable_transitionCallbacks!==void 0&&(pe=d.unstable_transitionCallbacks),d.formState!==void 0&&(Re=d.formState)),l=DC(s,1,!0,l,d??null,p,b,S,$,K,pe,Re),l.context=qC(null),d=l.current,p=os(),p=Cr(p),b=De(p),b.callback=null,Ye(d,b,p),d=p,l.current.lanes=d,Ht(l,d),Qo(l),s[ai]=l.current,d0(s),new jm(l)},nv.version="19.1.0",nv}var rk;function fJ(){if(rk)return I0.exports;rk=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),I0.exports=hJ(),I0.exports}var pJ=fJ();const vJ=pV(pJ);var Df=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},gJ={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},mJ=class{#e=gJ;#t=!1;setTimeoutProvider(r){this.#e=r}setTimeout(r,e){return this.#e.setTimeout(r,e)}clearTimeout(r){this.#e.clearTimeout(r)}setInterval(r,e){return this.#e.setInterval(r,e)}clearInterval(r){this.#e.clearInterval(r)}},gd=new mJ;function yJ(r){setTimeout(r,0)}var Rd=typeof window>"u"||"Deno"in globalThis;function pa(){}function bJ(r,e){return typeof r=="function"?r(e):r}function MO(r){return typeof r=="number"&&r>=0&&r!==1/0}function vV(r,e){return Math.max(r+(e||0)-Date.now(),0)}function wc(r,e){return typeof r=="function"?r(e):r}function ks(r,e){return typeof r=="function"?r(e):r}function nk(r,e){const{type:t="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:u}=r;if(o){if(n){if(e.queryHash!==x6(o,e.options))return!1}else if(!Nv(e.queryKey,o))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||a&&!a(e))}function ik(r,e){const{exact:t,status:n,predicate:i,mutationKey:a}=r;if(a){if(!e.options.mutationKey)return!1;if(t){if(Cd(e.options.mutationKey)!==Cd(a))return!1}else if(!Nv(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function x6(r,e){return(e?.queryKeyHashFn||Cd)(r)}function Cd(r){return JSON.stringify(r,(e,t)=>DO(t)?Object.keys(t).sort().reduce((n,i)=>(n[i]=t[i],n),{}):t)}function Nv(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(t=>Nv(r[t],e[t])):!1}var wJ=Object.prototype.hasOwnProperty;function gV(r,e,t=0){if(r===e)return r;if(t>500)return e;const n=ak(r)&&ak(e);if(!n&&!(DO(r)&&DO(e)))return e;const a=(n?r:Object.keys(r)).length,o=n?e:Object.keys(e),u=o.length,c=n?new Array(u):{};let h=0;for(let f=0;f<u;f++){const v=n?f:o[f],y=r[v],g=e[v];if(y===g){c[v]=y,(n?f<a:wJ.call(r,v))&&h++;continue}if(y===null||g===null||typeof y!="object"||typeof g!="object"){c[v]=g;continue}const _=gV(y,g,t+1);c[v]=_,_===y&&h++}return a===u&&h===a?r:c}function p1(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}function ak(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function DO(r){if(!sk(r))return!1;const e=r.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!sk(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function sk(r){return Object.prototype.toString.call(r)==="[object Object]"}function xJ(r){return new Promise(e=>{gd.setTimeout(e,r)})}function qO(r,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(r,e):t.structuralSharing!==!1?gV(r,e):e}function _J(r,e,t=0){const n=[...r,e];return t&&n.length>t?n.slice(1):n}function SJ(r,e,t=0){const n=[e,...r];return t&&n.length>t?n.slice(0,-1):n}var _6=Symbol();function mV(r,e){return!r.queryFn&&e?.initialPromise?()=>e.initialPromise:!r.queryFn||r.queryFn===_6?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function S6(r,e){return typeof r=="function"?r(...e):!!r}function EJ(r,e,t){let n=!1,i;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(i??=e(),n||(n=!0,i.aborted?t():i.addEventListener("abort",t,{once:!0})),i)}),r}var TJ=class extends Df{#e;#t;#r;constructor(){super(),this.#r=r=>{if(!Rd&&window.addEventListener){const e=()=>r();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(r){this.#e!==r&&(this.#e=r,this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(e=>{e(r)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},E6=new TJ;function LO(){let r,e;const t=new Promise((i,a)=>{r=i,e=a});t.status="pending",t.catch(()=>{});function n(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{n({status:"fulfilled",value:i}),r(i)},t.reject=i=>{n({status:"rejected",reason:i}),e(i)},t}var OJ=yJ;function AJ(){let r=[],e=0,t=u=>{u()},n=u=>{u()},i=OJ;const a=u=>{e?r.push(u):i(()=>{t(u)})},o=()=>{const u=r;r=[],u.length&&i(()=>{n(()=>{u.forEach(c=>{t(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||o()}return c},batchCalls:u=>(...c)=>{a(()=>{u(...c)})},schedule:a,setNotifyFunction:u=>{t=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var hi=AJ(),RJ=class extends Df{#e=!0;#t;#r;constructor(){super(),this.#r=r=>{if(!Rd&&window.addEventListener){const e=()=>r(!0),t=()=>r(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(r){this.#r=r,this.#t?.(),this.#t=r(this.setOnline.bind(this))}setOnline(r){this.#e!==r&&(this.#e=r,this.listeners.forEach(t=>{t(r)}))}isOnline(){return this.#e}},v1=new RJ;function CJ(r){return Math.min(1e3*2**r,3e4)}function yV(r){return(r??"online")==="online"?v1.isOnline():!0}var $O=class extends Error{constructor(r){super("CancelledError"),this.revert=r?.revert,this.silent=r?.silent}};function bV(r){let e=!1,t=0,n;const i=LO(),a=()=>i.status!=="pending",o=E=>{if(!a()){const A=new $O(E);y(A),r.onCancel?.(A)}},u=()=>{e=!0},c=()=>{e=!1},h=()=>E6.isFocused()&&(r.networkMode==="always"||v1.isOnline())&&r.canRun(),f=()=>yV(r.networkMode)&&r.canRun(),v=E=>{a()||(n?.(),i.resolve(E))},y=E=>{a()||(n?.(),i.reject(E))},g=()=>new Promise(E=>{n=A=>{(a()||h())&&E(A)},r.onPause?.()}).then(()=>{n=void 0,a()||r.onContinue?.()}),_=()=>{if(a())return;let E;const A=t===0?r.initialPromise:void 0;try{E=A??r.fn()}catch(T){E=Promise.reject(T)}Promise.resolve(E).then(v).catch(T=>{if(a())return;const C=r.retry??(Rd?0:3),N=r.retryDelay??CJ,k=typeof N=="function"?N(t,T):N,j=C===!0||typeof C=="number"&&t<C||typeof C=="function"&&C(t,T);if(e||!j){y(T);return}t++,r.onFail?.(t,T),xJ(k).then(()=>h()?void 0:g()).then(()=>{e?y(T):_()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n?.(),i),cancelRetry:u,continueRetry:c,canStart:f,start:()=>(f()?_():g().then(_),i)}}var wV=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),MO(this.gcTime)&&(this.#e=gd.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Rd?1/0:300*1e3))}clearGcTimeout(){this.#e&&(gd.clearTimeout(this.#e),this.#e=void 0)}},kJ=class extends wV{#e;#t;#r;#i;#n;#s;#o;constructor(r){super(),this.#o=!1,this.#s=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.#i=r.client,this.#r=this.#i.getQueryCache(),this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.#e=lk(this.options),this.state=r.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(r){if(this.options={...this.#s,...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=lk(this.options);e.data!==void 0&&(this.setState(ok(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(r,e){const t=qO(this.state.data,r,this.options);return this.#a({data:t,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),t}setState(r,e){this.#a({type:"setState",state:r,setStateOptions:e})}cancel(r){const e=this.#n?.promise;return this.#n?.cancel(r),e?e.then(pa).catch(pa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(r=>ks(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_6||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>wc(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!vV(this.state.dataUpdatedAt,r)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(e=>e!==r),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(r,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(r&&this.setOptions(r),!this.options.queryFn){const u=this.observers.find(c=>c.options.queryFn);u&&this.setOptions(u.options)}const t=new AbortController,n=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#o=!0,t.signal)})},i=()=>{const u=mV(this.options,e),h=(()=>{const f={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(f),f})();return this.#o=!1,this.options.persister?this.options.persister(u,h,this):u(h)},o=(()=>{const u={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return n(u),u})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#a({type:"fetch",meta:o.fetchOptions?.meta}),this.#n=bV({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:u=>{u instanceof $O&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),t.abort()},onFail:(u,c)=>{this.#a({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const u=await this.#n.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof $O){if(u.silent)return this.#n.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(r){const e=t=>{switch(r.type){case"failed":return{...t,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...xV(t.data,this.options),fetchMeta:r.meta??null};case"success":const n={...t,...ok(r.data,r.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=r.manual?n:void 0,n;case"error":const i=r.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...r.state}}};this.state=e(this.state),hi.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:r})})}};function xV(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yV(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function ok(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lk(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,t=e!==void 0,n=t?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var NJ=class extends Df{constructor(r,e){super(),this.options=e,this.#e=r,this.#a=null,this.#o=LO(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#r=void 0;#i=void 0;#n;#s;#o;#a;#v;#h;#f;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),uk(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return BO(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return BO(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#x(),this.#t.removeObserver(this)}setOptions(r){const e=this.options,t=this.#t;if(this.options=this.#e.defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ks(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),e._defaulted&&!p1(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const n=this.hasListeners();n&&ck(this.#t,t,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#t!==t||ks(this.options.enabled,this.#t)!==ks(e.enabled,this.#t)||wc(this.options.staleTime,this.#t)!==wc(e.staleTime,this.#t))&&this.#g();const i=this.#m();n&&(this.#t!==t||ks(this.options.enabled,this.#t)!==ks(e.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(r){const e=this.#e.getQueryCache().build(this.#e,r),t=this.createResult(e,r);return PJ(this,t)&&(this.#i=t,this.#s=this.options,this.#n=this.#t.state),t}getCurrentResult(){return this.#i}trackResult(r,e){return new Proxy(r,{get:(t,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(r){this.#p.add(r)}getCurrentQuery(){return this.#t}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const e=this.#e.defaultQueryOptions(r),t=this.#e.getQueryCache().build(this.#e,e);return t.fetch().then(()=>this.createResult(t,e))}fetch(r){return this.#d({...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(r){this.#_();let e=this.#t.fetch(this.options,r);return r?.throwOnError||(e=e.catch(pa)),e}#g(){this.#w();const r=wc(this.options.staleTime,this.#t);if(Rd||this.#i.isStale||!MO(r))return;const t=vV(this.#i.dataUpdatedAt,r)+1;this.#u=gd.setTimeout(()=>{this.#i.isStale||this.updateResult()},t)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(r){this.#x(),this.#l=r,!(Rd||ks(this.options.enabled,this.#t)===!1||!MO(this.#l)||this.#l===0)&&(this.#c=gd.setInterval(()=>{(this.options.refetchIntervalInBackground||E6.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#m())}#w(){this.#u&&(gd.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#c&&(gd.clearInterval(this.#c),this.#c=void 0)}createResult(r,e){const t=this.#t,n=this.options,i=this.#i,a=this.#n,o=this.#s,c=r!==t?r.state:this.#r,{state:h}=r;let f={...h},v=!1,y;if(e._optimisticResults){const D=this.hasListeners(),M=!D&&uk(r,e),U=D&&ck(r,t,e,n);(M||U)&&(f={...f,...xV(h.data,r.options)}),e._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:_,status:E}=f;y=f.data;let A=!1;if(e.placeholderData!==void 0&&y===void 0&&E==="pending"){let D;i?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(D=i.data,A=!0):D=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,D!==void 0&&(E="success",y=qO(i?.data,D,e),v=!0)}if(e.select&&y!==void 0&&!A)if(i&&y===a?.data&&e.select===this.#v)y=this.#h;else try{this.#v=e.select,y=e.select(y),y=qO(i?.data,y,e),this.#h=y,this.#a=null}catch(D){this.#a=D}this.#a&&(g=this.#a,y=this.#h,_=Date.now(),E="error");const T=f.fetchStatus==="fetching",C=E==="pending",N=E==="error",k=C&&T,j=y!==void 0,G={status:E,fetchStatus:f.fetchStatus,isPending:C,isSuccess:E==="success",isError:N,isInitialLoading:k,isLoading:k,data:y,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:T,isRefetching:T&&!C,isLoadingError:N&&!j,isPaused:f.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:N&&j,isStale:T6(r,e),refetch:this.refetch,promise:this.#o,isEnabled:ks(e.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const D=G.data!==void 0,M=G.status==="error"&&!D,U=z=>{M?z.reject(G.error):D&&z.resolve(G.data)},I=()=>{const z=this.#o=G.promise=LO();U(z)},q=this.#o;switch(q.status){case"pending":r.queryHash===t.queryHash&&U(q);break;case"fulfilled":(M||G.data!==q.value)&&I();break;case"rejected":(!M||G.error!==q.reason)&&I();break}}return G}updateResult(){const r=this.#i,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#s=this.options,this.#n.data!==void 0&&(this.#f=this.#t),p1(e,r))return;this.#i=e;const t=()=>{if(!r)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;const a=new Set(i??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(o=>{const u=o;return this.#i[u]!==r[u]&&a.has(u)})};this.#S({listeners:t()})}#_(){const r=this.#e.getQueryCache().build(this.#e,this.options);if(r===this.#t)return;const e=this.#t;this.#t=r,this.#r=r.state,this.hasListeners()&&(e?.removeObserver(this),r.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(r){hi.batch(()=>{r.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function IJ(r,e){return ks(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function uk(r,e){return IJ(r,e)||r.state.data!==void 0&&BO(r,e,e.refetchOnMount)}function BO(r,e,t){if(ks(e.enabled,r)!==!1&&wc(e.staleTime,r)!=="static"){const n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&T6(r,e)}return!1}function ck(r,e,t,n){return(r!==e||ks(n.enabled,r)===!1)&&(!t.suspense||r.state.status!=="error")&&T6(r,t)}function T6(r,e){return ks(e.enabled,r)!==!1&&r.isStaleByTime(wc(e.staleTime,r))}function PJ(r,e){return!p1(r.getCurrentResult(),e)}function dk(r){return{onFetch:(e,t)=>{const n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const h=async()=>{let f=!1;const v=_=>{EJ(_,()=>e.signal,()=>f=!0)},y=mV(e.options,e.fetchOptions),g=async(_,E,A)=>{if(f)return Promise.reject();if(E==null&&_.pages.length)return Promise.resolve(_);const C=(()=>{const W={client:e.client,queryKey:e.queryKey,pageParam:E,direction:A?"backward":"forward",meta:e.options.meta};return v(W),W})(),N=await y(C),{maxPages:k}=e.options,j=A?SJ:_J;return{pages:j(_.pages,N,k),pageParams:j(_.pageParams,E,k)}};if(i&&a.length){const _=i==="backward",E=_?jJ:hk,A={pages:a,pageParams:o},T=E(n,A);u=await g(A,T,_)}else{const _=r??a.length;do{const E=c===0?o[0]??n.initialPageParam:hk(n,u);if(c>0&&E==null)break;u=await g(u,E),c++}while(c<_)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t):e.fetchFn=h}}}function hk(r,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,t[n],t):void 0}function jJ(r,{pages:e,pageParams:t}){return e.length>0?r.getPreviousPageParam?.(e[0],e,t[0],t):void 0}var MJ=class extends wV{#e;#t;#r;#i;constructor(r){super(),this.#e=r.client,this.mutationId=r.mutationId,this.#r=r.mutationCache,this.#t=[],this.state=r.state||_V(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){this.#t.includes(r)||(this.#t.push(r),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){this.#t=this.#t.filter(e=>e!==r),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(r){const e=()=>{this.#n({type:"continue"})},t={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=bV({fn:()=>this.options.mutationFn?this.options.mutationFn(r,t):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#n({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const n=this.state.status==="pending",i=!this.#i.canStart();try{if(n)e();else{this.#n({type:"pending",variables:r,isPaused:i}),this.#r.config.onMutate&&await this.#r.config.onMutate(r,this,t);const o=await this.options.onMutate?.(r,t);o!==this.state.context&&this.#n({type:"pending",context:o,variables:r,isPaused:i})}const a=await this.#i.start();return await this.#r.config.onSuccess?.(a,r,this.state.context,this,t),await this.options.onSuccess?.(a,r,this.state.context,t),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(a,null,r,this.state.context,t),this.#n({type:"success",data:a}),a}catch(a){try{await this.#r.config.onError?.(a,r,this.state.context,this,t)}catch(o){Promise.reject(o)}try{await this.options.onError?.(a,r,this.state.context,t)}catch(o){Promise.reject(o)}try{await this.#r.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,t)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,a,r,this.state.context,t)}catch(o){Promise.reject(o)}throw this.#n({type:"error",error:a}),a}finally{this.#r.runNext(this)}}#n(r){const e=t=>{switch(r.type){case"failed":return{...t,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...t,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:r.error,failureCount:t.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=e(this.state),hi.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(r)}),this.#r.notify({mutation:this,type:"updated",action:r})})}};function _V(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var DJ=class extends Df{constructor(r={}){super(),this.config=r,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(r,e,t){const n=new MJ({client:r,mutationCache:this,mutationId:++this.#r,options:r.defaultMutationOptions(e),state:t});return this.add(n),n}add(r){this.#e.add(r);const e=Dm(r);if(typeof e=="string"){const t=this.#t.get(e);t?t.push(r):this.#t.set(e,[r])}this.notify({type:"added",mutation:r})}remove(r){if(this.#e.delete(r)){const e=Dm(r);if(typeof e=="string"){const t=this.#t.get(e);if(t)if(t.length>1){const n=t.indexOf(r);n!==-1&&t.splice(n,1)}else t[0]===r&&this.#t.delete(e)}}this.notify({type:"removed",mutation:r})}canRun(r){const e=Dm(r);if(typeof e=="string"){const n=this.#t.get(e)?.find(i=>i.state.status==="pending");return!n||n===r}else return!0}runNext(r){const e=Dm(r);return typeof e=="string"?this.#t.get(e)?.find(n=>n!==r&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){hi.batch(()=>{this.#e.forEach(r=>{this.notify({type:"removed",mutation:r})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(r){const e={exact:!0,...r};return this.getAll().find(t=>ik(e,t))}findAll(r={}){return this.getAll().filter(e=>ik(r,e))}notify(r){hi.batch(()=>{this.listeners.forEach(e=>{e(r)})})}resumePausedMutations(){const r=this.getAll().filter(e=>e.state.isPaused);return hi.batch(()=>Promise.all(r.map(e=>e.continue().catch(pa))))}};function Dm(r){return r.options.scope?.id}var qJ=class extends Df{#e;#t=void 0;#r;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),p1(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&Cd(t.mutationKey)!==Cd(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#s()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){const e=this.#r?.state??_V();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#s(e){hi.batch(()=>{if(this.#i&&this.hasListeners()){const t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,n,i)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(e.data,null,t,n,i)}catch(a){Promise.reject(a)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,n,i)}catch(a){Promise.reject(a)}try{this.#i.onSettled?.(void 0,e.error,t,n,i)}catch(a){Promise.reject(a)}}}this.listeners.forEach(t=>{t(this.#t)})})}},LJ=class extends Df{constructor(r={}){super(),this.config=r,this.#e=new Map}#e;build(r,e,t){const n=e.queryKey,i=e.queryHash??x6(n,e);let a=this.get(i);return a||(a=new kJ({client:r,queryKey:n,queryHash:i,options:r.defaultQueryOptions(e),state:t,defaultOptions:r.getQueryDefaults(n)}),this.add(a)),a}add(r){this.#e.has(r.queryHash)||(this.#e.set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const e=this.#e.get(r.queryHash);e&&(r.destroy(),e===r&&this.#e.delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){hi.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return this.#e.get(r)}getAll(){return[...this.#e.values()]}find(r){const e={exact:!0,...r};return this.getAll().find(t=>nk(e,t))}findAll(r={}){const e=this.getAll();return Object.keys(r).length>0?e.filter(t=>nk(r,t)):e}notify(r){hi.batch(()=>{this.listeners.forEach(e=>{e(r)})})}onFocus(){hi.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){hi.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},$J=class{#e;#t;#r;#i;#n;#s;#o;#a;constructor(r={}){this.#e=r.queryCache||new LJ,this.#t=r.mutationCache||new DJ,this.#r=r.defaultOptions||{},this.#i=new Map,this.#n=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=E6.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=v1.subscribe(async r=>{r&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(r){return this.#e.findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return this.#t.findAll({...r,status:"pending"}).length}getQueryData(r){const e=this.defaultQueryOptions({queryKey:r});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),t=this.#e.build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&t.isStaleByTime(wc(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return this.#e.findAll(r).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(r,e,t){const n=this.defaultQueryOptions({queryKey:r}),a=this.#e.get(n.queryHash)?.state.data,o=bJ(e,a);if(o!==void 0)return this.#e.build(this,n).setData(o,{...t,manual:!0})}setQueriesData(r,e,t){return hi.batch(()=>this.#e.findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(r){const e=this.defaultQueryOptions({queryKey:r});return this.#e.get(e.queryHash)?.state}removeQueries(r){const e=this.#e;hi.batch(()=>{e.findAll(r).forEach(t=>{e.remove(t)})})}resetQueries(r,e){const t=this.#e;return hi.batch(()=>(t.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const t={revert:!0,...e},n=hi.batch(()=>this.#e.findAll(r).map(i=>i.cancel(t)));return Promise.all(n).then(pa).catch(pa)}invalidateQueries(r,e={}){return hi.batch(()=>(this.#e.findAll(r).forEach(t=>{t.invalidate()}),r?.refetchType==="none"?Promise.resolve():this.refetchQueries({...r,type:r?.refetchType??r?.type??"active"},e)))}refetchQueries(r,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=hi.batch(()=>this.#e.findAll(r).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,t);return t.throwOnError||(a=a.catch(pa)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(pa)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const t=this.#e.build(this,e);return t.isStaleByTime(wc(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(pa).catch(pa)}fetchInfiniteQuery(r){return r.behavior=dk(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(pa).catch(pa)}ensureInfiniteQueryData(r){return r.behavior=dk(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return v1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(r){this.#r=r}setQueryDefaults(r,e){this.#i.set(Cd(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...this.#i.values()],t={};return e.forEach(n=>{Nv(r,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(r,e){this.#n.set(Cd(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...this.#n.values()],t={};return e.forEach(n=>{Nv(r,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(r){if(r._defaulted)return r;const e={...this.#r.queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=x6(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===_6&&(e.enabled=!1),e}defaultMutationOptions(r){return r?._defaulted?r:{...this.#r.mutations,...r?.mutationKey&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},SV=he.createContext(void 0),Qv=r=>{const e=he.useContext(SV);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},BJ=({client:r,children:e})=>(he.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),w.jsx(SV.Provider,{value:r,children:e})),EV=he.createContext(!1),FJ=()=>he.useContext(EV);EV.Provider;function zJ(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var UJ=he.createContext(zJ()),HJ=()=>he.useContext(UJ),WJ=(r,e,t)=>{const n=t?.state.error&&typeof r.throwOnError=="function"?S6(r.throwOnError,[t.state.error,t]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},GJ=r=>{he.useEffect(()=>{r.clearReset()},[r])},VJ=({result:r,errorResetBoundary:e,throwOnError:t,query:n,suspense:i})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(i&&r.data===void 0||S6(t,[r.error,n])),YJ=r=>{if(r.suspense){const t=i=>i==="static"?i:Math.max(i??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...i)=>t(n(...i)):t(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},KJ=(r,e)=>r.isLoading&&r.isFetching&&!e,XJ=(r,e)=>r?.suspense&&e.isPending,fk=(r,e,t)=>e.fetchOptimistic(r).catch(()=>{t.clearReset()});function QJ(r,e,t){const n=FJ(),i=HJ(),a=Qv(),o=a.defaultQueryOptions(r);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const u=a.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",YJ(o),WJ(o,i,u),GJ(i);const c=!a.getQueryCache().get(o.queryHash),[h]=he.useState(()=>new e(a,o)),f=h.getOptimisticResult(o),v=!n&&r.subscribed!==!1;if(he.useSyncExternalStore(he.useCallback(y=>{const g=v?h.subscribe(hi.batchCalls(y)):pa;return h.updateResult(),g},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),he.useEffect(()=>{h.setOptions(o)},[o,h]),XJ(o,f))throw fk(o,h,i);if(VJ({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:u,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!Rd&&KJ(f,n)&&(c?fk(o,h,i):u?.promise)?.catch(pa).finally(()=>{h.updateResult()}),o.notifyOnChangeProps?f:h.trackResult(f)}function ya(r,e){return QJ(r,NJ)}function bv(r,e){const t=Qv(),[n]=he.useState(()=>new qJ(t,r));he.useEffect(()=>{n.setOptions(r)},[n,r]);const i=he.useSyncExternalStore(he.useCallback(o=>n.subscribe(hi.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=he.useCallback((o,u)=>{n.mutate(o,u).catch(pa)},[n]);if(i.error&&S6(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}/**
|
|
50
|
+
* react-router v7.14.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var pk="popstate";function vk(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function ZJ(r={}){function e(n,i){let a=i.state?.masked,{pathname:o,search:u,hash:c}=a||n.location;return FO("",{pathname:o,search:u,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function t(n,i){return typeof i=="string"?i:Iv(i)}return eee(e,t,null,r)}function Tn(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function ul(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function JJ(){return Math.random().toString(36).substring(2,10)}function gk(r,e){return{usr:r.state,key:r.key,idx:e,masked:r.unstable_mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function FO(r,e,t=null,n,i){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof e=="string"?qf(e):e,state:t,key:e&&e.key||n||JJ(),unstable_mask:i}}function Iv({pathname:r="/",search:e="",hash:t=""}){return e&&e!=="?"&&(r+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(r+=t.charAt(0)==="#"?t:"#"+t),r}function qf(r){let e={};if(r){let t=r.indexOf("#");t>=0&&(e.hash=r.substring(t),r=r.substring(0,t));let n=r.indexOf("?");n>=0&&(e.search=r.substring(n),r=r.substring(0,n)),r&&(e.pathname=r)}return e}function eee(r,e,t,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,u="POP",c=null,h=f();h==null&&(h=0,o.replaceState({...o.state,idx:h},""));function f(){return(o.state||{idx:null}).idx}function v(){u="POP";let A=f(),T=A==null?null:A-h;h=A,c&&c({action:u,location:E.location,delta:T})}function y(A,T){u="PUSH";let C=vk(A)?A:FO(E.location,A,T);h=f()+1;let N=gk(C,h),k=E.createHref(C.unstable_mask||C);try{o.pushState(N,"",k)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(k)}a&&c&&c({action:u,location:E.location,delta:1})}function g(A,T){u="REPLACE";let C=vk(A)?A:FO(E.location,A,T);h=f();let N=gk(C,h),k=E.createHref(C.unstable_mask||C);o.replaceState(N,"",k),a&&c&&c({action:u,location:E.location,delta:0})}function _(A){return tee(A)}let E={get action(){return u},get location(){return r(i,o)},listen(A){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(pk,v),c=A,()=>{i.removeEventListener(pk,v),c=null}},createHref(A){return e(i,A)},createURL:_,encodeLocation(A){let T=_(A);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:y,replace:g,go(A){return o.go(A)}};return E}function tee(r,e=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Tn(t,"No window.location.(origin|href) available to create URL");let n=typeof r=="string"?r:Iv(r);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function TV(r,e,t="/"){return ree(r,e,t,!1)}function ree(r,e,t,n){let i=typeof e=="string"?qf(e):e,a=fu(i.pathname||"/",t);if(a==null)return null;let o=OV(r);nee(o);let u=null;for(let c=0;u==null&&c<o.length;++c){let h=pee(a);u=hee(o[c],h,n)}return u}function OV(r,e=[],t=[],n="",i=!1){let a=(o,u,c=i,h)=>{let f={relativePath:h===void 0?o.path||"":h,caseSensitive:o.caseSensitive===!0,childrenIndex:u,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&c)return;Tn(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let v=sl([n,f.relativePath]),y=t.concat(f);o.children&&o.children.length>0&&(Tn(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),OV(o.children,e,y,v,c)),!(o.path==null&&!o.index)&&e.push({path:v,score:cee(v,o.index),routesMeta:y})};return r.forEach((o,u)=>{if(o.path===""||!o.path?.includes("?"))a(o,u);else for(let c of AV(o.path))a(o,u,!0,c)}),e}function AV(r){let e=r.split("/");if(e.length===0)return[];let[t,...n]=e,i=t.endsWith("?"),a=t.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=AV(n.join("/")),u=[];return u.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&u.push(...o),u.map(c=>r.startsWith("/")&&c===""?"/":c)}function nee(r){r.sort((e,t)=>e.score!==t.score?t.score-e.score:dee(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var iee=/^:[\w-]+$/,aee=3,see=2,oee=1,lee=10,uee=-2,mk=r=>r==="*";function cee(r,e){let t=r.split("/"),n=t.length;return t.some(mk)&&(n+=uee),e&&(n+=see),t.filter(i=>!mk(i)).reduce((i,a)=>i+(iee.test(a)?aee:a===""?oee:lee),n)}function dee(r,e){return r.length===e.length&&r.slice(0,-1).every((n,i)=>n===e[i])?r[r.length-1]-e[e.length-1]:0}function hee(r,e,t=!1){let{routesMeta:n}=r,i={},a="/",o=[];for(let u=0;u<n.length;++u){let c=n[u],h=u===n.length-1,f=a==="/"?e:e.slice(a.length)||"/",v=g1({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},f),y=c.route;if(!v&&h&&t&&!n[n.length-1].route.index&&(v=g1({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!v)return null;Object.assign(i,v.params),o.push({params:i,pathname:sl([a,v.pathname]),pathnameBase:yee(sl([a,v.pathnameBase])),route:y}),v.pathnameBase!=="/"&&(a=sl([a,v.pathnameBase]))}return o}function g1(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[t,n]=fee(r.path,r.caseSensitive,r.end),i=e.match(t);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:n.reduce((h,{paramName:f,isOptional:v},y)=>{if(f==="*"){let _=u[y]||"";o=a.slice(0,a.length-_.length).replace(/(.)\/+$/,"$1")}const g=u[y];return v&&!g?h[f]=void 0:h[f]=(g||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:o,pattern:r}}function fee(r,e=!1,t=!0){ul(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let n=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,c,h,f)=>{if(n.push({paramName:u,isOptional:c!=null}),c){let v=f.charAt(h+o.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(n.push({paramName:"*"}),i+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":r!==""&&r!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function pee(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ul(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),r}}function fu(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=r.charAt(t);return n&&n!=="/"?null:r.slice(t)||"/"}var vee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gee(r,e="/"){let{pathname:t,search:n="",hash:i=""}=typeof r=="string"?qf(r):r,a;return t?(t=t.replace(/\/\/+/g,"/"),t.startsWith("/")?a=yk(t.substring(1),"/"):a=yk(t,e)):a=e,{pathname:a,search:bee(n),hash:wee(i)}}function yk(r,e){let t=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function D0(r,e,t,n){return`Cannot include a '${r}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mee(r){return r.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function RV(r){let e=mee(r);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function O6(r,e,t,n=!1){let i;typeof r=="string"?i=qf(r):(i={...r},Tn(!i.pathname||!i.pathname.includes("?"),D0("?","pathname","search",i)),Tn(!i.pathname||!i.pathname.includes("#"),D0("#","pathname","hash",i)),Tn(!i.search||!i.search.includes("#"),D0("#","search","hash",i)));let a=r===""||i.pathname==="",o=a?"/":i.pathname,u;if(o==null)u=t;else{let v=e.length-1;if(!n&&o.startsWith("..")){let y=o.split("/");for(;y[0]==="..";)y.shift(),v-=1;i.pathname=y.join("/")}u=v>=0?e[v]:"/"}let c=gee(i,u),h=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(h||f)&&(c.pathname+="/"),c}var sl=r=>r.join("/").replace(/\/\/+/g,"/"),yee=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),bee=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,wee=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,xee=class{constructor(r,e,t,n=!1){this.status=r,this.statusText=e||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function _ee(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function See(r){return r.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var CV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kV(r,e){let t=r;if(typeof t!="string"||!vee.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,i=!1;if(CV)try{let a=new URL(window.location.href),o=t.startsWith("//")?new URL(a.protocol+t):new URL(t),u=fu(o.pathname,e);o.origin===a.origin&&u!=null?t=u+o.search+o.hash:i=!0}catch{ul(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var NV=["POST","PUT","PATCH","DELETE"];new Set(NV);var Eee=["GET",...NV];new Set(Eee);var Lf=he.createContext(null);Lf.displayName="DataRouter";var $1=he.createContext(null);$1.displayName="DataRouterState";var IV=he.createContext(!1);function Tee(){return he.useContext(IV)}var PV=he.createContext({isTransitioning:!1});PV.displayName="ViewTransition";var Oee=he.createContext(new Map);Oee.displayName="Fetchers";var Aee=he.createContext(null);Aee.displayName="Await";var qs=he.createContext(null);qs.displayName="Navigation";var Zv=he.createContext(null);Zv.displayName="Location";var hl=he.createContext({outlet:null,matches:[],isDataRoute:!1});hl.displayName="Route";var A6=he.createContext(null);A6.displayName="RouteError";var jV="REACT_ROUTER_ERROR",Ree="REDIRECT",Cee="ROUTE_ERROR_RESPONSE";function kee(r){if(r.startsWith(`${jV}:${Ree}:{`))try{let e=JSON.parse(r.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function Nee(r){if(r.startsWith(`${jV}:${Cee}:{`))try{let e=JSON.parse(r.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new xee(e.status,e.statusText,e.data)}catch{}}function Iee(r,{relative:e}={}){Tn(Jv(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=he.useContext(qs),{hash:i,pathname:a,search:o}=eg(r,{relative:e}),u=a;return t!=="/"&&(u=a==="/"?t:sl([t,a])),n.createHref({pathname:u,search:o,hash:i})}function Jv(){return he.useContext(Zv)!=null}function So(){return Tn(Jv(),"useLocation() may be used only in the context of a <Router> component."),he.useContext(Zv).location}var MV="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function DV(r){he.useContext(qs).static||he.useLayoutEffect(r)}function $f(){let{isDataRoute:r}=he.useContext(hl);return r?Wee():Pee()}function Pee(){Tn(Jv(),"useNavigate() may be used only in the context of a <Router> component.");let r=he.useContext(Lf),{basename:e,navigator:t}=he.useContext(qs),{matches:n}=he.useContext(hl),{pathname:i}=So(),a=JSON.stringify(RV(n)),o=he.useRef(!1);return DV(()=>{o.current=!0}),he.useCallback((c,h={})=>{if(ul(o.current,MV),!o.current)return;if(typeof c=="number"){t.go(c);return}let f=O6(c,JSON.parse(a),i,h.relative==="path");r==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:sl([e,f.pathname])),(h.replace?t.replace:t.push)(f,h.state,h)},[e,t,a,i,r])}he.createContext(null);function R6(){let{matches:r}=he.useContext(hl),e=r[r.length-1];return e?e.params:{}}function eg(r,{relative:e}={}){let{matches:t}=he.useContext(hl),{pathname:n}=So(),i=JSON.stringify(RV(t));return he.useMemo(()=>O6(r,JSON.parse(i),n,e==="path"),[r,i,n,e])}function jee(r,e){return qV(r,e)}function qV(r,e,t){Tn(Jv(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=he.useContext(qs),{matches:i}=he.useContext(hl),a=i[i.length-1],o=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",h=a&&a.route;{let A=h&&h.path||"";$V(u,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let f=So(),v;if(e){let A=typeof e=="string"?qf(e):e;Tn(c==="/"||A.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=f;let y=v.pathname||"/",g=y;if(c!=="/"){let A=c.replace(/^\//,"").split("/");g="/"+y.replace(/^\//,"").split("/").slice(A.length).join("/")}let _=TV(r,{pathname:g});ul(h||_!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),ul(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=$ee(_&&_.map(A=>Object.assign({},A,{params:Object.assign({},o,A.params),pathname:sl([c,n.encodeLocation?n.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?c:sl([c,n.encodeLocation?n.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,t);return e&&E?he.createElement(Zv.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},E):E}function Mee(){let r=Hee(),e=_ee(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),t=r instanceof Error?r.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",r),o=he.createElement(he.Fragment,null,he.createElement("p",null,"💿 Hey developer 👋"),he.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",he.createElement("code",{style:a},"ErrorBoundary")," or"," ",he.createElement("code",{style:a},"errorElement")," prop on your route.")),he.createElement(he.Fragment,null,he.createElement("h2",null,"Unexpected Application Error!"),he.createElement("h3",{style:{fontStyle:"italic"}},e),t?he.createElement("pre",{style:i},t):null,o)}var Dee=he.createElement(Mee,null),LV=class extends he.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,e){return e.location!==r.location||e.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:e.error,location:e.location,revalidation:r.revalidation||e.revalidation}}componentDidCatch(r,e){this.props.onError?this.props.onError(r,e):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const t=Nee(r.digest);t&&(r=t)}let e=r!==void 0?he.createElement(hl.Provider,{value:this.props.routeContext},he.createElement(A6.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?he.createElement(qee,{error:r},e):e}};LV.contextType=IV;var q0=new WeakMap;function qee({children:r,error:e}){let{basename:t}=he.useContext(qs);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=kee(e.digest);if(n){let i=q0.get(e);if(i)throw i;let a=kV(n.location,t);if(CV&&!q0.get(e))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw q0.set(e,o),o}return he.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return r}function Lee({routeContext:r,match:e,children:t}){let n=he.useContext(Lf);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),he.createElement(hl.Provider,{value:r},t)}function $ee(r,e=[],t){let n=t?.state;if(r==null){if(!n)return null;if(n.errors)r=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)r=n.matches;else return null}let i=r,a=n?.errors;if(a!=null){let f=i.findIndex(v=>v.route.id&&a?.[v.route.id]!==void 0);Tn(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let o=!1,u=-1;if(t&&n){o=n.renderFallback;for(let f=0;f<i.length;f++){let v=i[f];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(u=f),v.route.id){let{loaderData:y,errors:g}=n,_=v.route.loader&&!y.hasOwnProperty(v.route.id)&&(!g||g[v.route.id]===void 0);if(v.route.lazy||_){t.isStatic&&(o=!0),u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}}let c=t?.onError,h=n&&c?(f,v)=>{c(f,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:See(n.matches),errorInfo:v})}:void 0;return i.reduceRight((f,v,y)=>{let g,_=!1,E=null,A=null;n&&(g=a&&v.route.id?a[v.route.id]:void 0,E=v.route.errorElement||Dee,o&&(u<0&&y===0?($V("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,A=null):u===y&&(_=!0,A=v.route.hydrateFallbackElement||null)));let T=e.concat(i.slice(0,y+1)),C=()=>{let N;return g?N=E:_?N=A:v.route.Component?N=he.createElement(v.route.Component,null):v.route.element?N=v.route.element:N=f,he.createElement(Lee,{match:v,routeContext:{outlet:f,matches:T,isDataRoute:n!=null},children:N})};return n&&(v.route.ErrorBoundary||v.route.errorElement||y===0)?he.createElement(LV,{location:n.location,revalidation:n.revalidation,component:E,error:g,children:C(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:h}):C()},null)}function C6(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bee(r){let e=he.useContext(Lf);return Tn(e,C6(r)),e}function Fee(r){let e=he.useContext($1);return Tn(e,C6(r)),e}function zee(r){let e=he.useContext(hl);return Tn(e,C6(r)),e}function k6(r){let e=zee(r),t=e.matches[e.matches.length-1];return Tn(t.route.id,`${r} can only be used on routes that contain a unique "id"`),t.route.id}function Uee(){return k6("useRouteId")}function Hee(){let r=he.useContext(A6),e=Fee("useRouteError"),t=k6("useRouteError");return r!==void 0?r:e.errors?.[t]}function Wee(){let{router:r}=Bee("useNavigate"),e=k6("useNavigate"),t=he.useRef(!1);return DV(()=>{t.current=!0}),he.useCallback(async(i,a={})=>{ul(t.current,MV),t.current&&(typeof i=="number"?await r.navigate(i):await r.navigate(i,{fromRouteId:e,...a}))},[r,e])}var bk={};function $V(r,e,t){!e&&!bk[r]&&(bk[r]=!0,ul(!1,t))}he.memo(Gee);function Gee({routes:r,future:e,state:t,isStatic:n,onError:i}){return qV(r,void 0,{state:t,isStatic:n,onError:i})}function mo(r){Tn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Vee({basename:r="/",children:e=null,location:t,navigationType:n="POP",navigator:i,static:a=!1,unstable_useTransitions:o}){Tn(!Jv(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=r.replace(/^\/*/,"/"),c=he.useMemo(()=>({basename:u,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[u,i,a,o]);typeof t=="string"&&(t=qf(t));let{pathname:h="/",search:f="",hash:v="",state:y=null,key:g="default",unstable_mask:_}=t,E=he.useMemo(()=>{let A=fu(h,u);return A==null?null:{location:{pathname:A,search:f,hash:v,state:y,key:g,unstable_mask:_},navigationType:n}},[u,h,f,v,y,g,n,_]);return ul(E!=null,`<Router basename="${u}"> is not able to match the URL "${h}${f}${v}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:he.createElement(qs.Provider,{value:c},he.createElement(Zv.Provider,{children:e,value:E}))}function Yee({children:r,location:e}){return jee(zO(r),e)}function zO(r,e=[]){let t=[];return he.Children.forEach(r,(n,i)=>{if(!he.isValidElement(n))return;let a=[...e,i];if(n.type===he.Fragment){t.push.apply(t,zO(n.props.children,a));return}Tn(n.type===mo,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Tn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=zO(n.props.children,a)),t.push(o)}),t}var t1="get",r1="application/x-www-form-urlencoded";function B1(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Kee(r){return B1(r)&&r.tagName.toLowerCase()==="button"}function Xee(r){return B1(r)&&r.tagName.toLowerCase()==="form"}function Qee(r){return B1(r)&&r.tagName.toLowerCase()==="input"}function Zee(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Jee(r,e){return r.button===0&&(!e||e==="_self")&&!Zee(r)}var qm=null;function ete(){if(qm===null)try{new FormData(document.createElement("form"),0),qm=!1}catch{qm=!0}return qm}var tte=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function L0(r){return r!=null&&!tte.has(r)?(ul(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${r1}"`),null):r}function rte(r,e){let t,n,i,a,o;if(Xee(r)){let u=r.getAttribute("action");n=u?fu(u,e):null,t=r.getAttribute("method")||t1,i=L0(r.getAttribute("enctype"))||r1,a=new FormData(r)}else if(Kee(r)||Qee(r)&&(r.type==="submit"||r.type==="image")){let u=r.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=r.getAttribute("formaction")||u.getAttribute("action");if(n=c?fu(c,e):null,t=r.getAttribute("formmethod")||u.getAttribute("method")||t1,i=L0(r.getAttribute("formenctype"))||L0(u.getAttribute("enctype"))||r1,a=new FormData(u,r),!ete()){let{name:h,type:f,value:v}=r;if(f==="image"){let y=h?`${h}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else h&&a.append(h,v)}}else{if(B1(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=t1,n=null,i=r1,o=r}return a&&i==="text/plain"&&(o=a,a=void 0),{action:n,method:t.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function N6(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function BV(r,e,t,n){let i=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return t?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:e&&fu(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function nte(r,e){if(r.id in e)return e[r.id];try{let t=await import(r.module);return e[r.id]=t,t}catch(t){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ite(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function ate(r,e,t){let n=await Promise.all(r.map(async i=>{let a=e.routes[i.route.id];if(a){let o=await nte(a,t);return o.links?o.links():[]}return[]}));return ute(n.flat(1).filter(ite).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function wk(r,e,t,n,i,a){let o=(c,h)=>t[h]?c.route.id!==t[h].route.id:!0,u=(c,h)=>t[h].pathname!==c.pathname||t[h].route.path?.endsWith("*")&&t[h].params["*"]!==c.params["*"];return a==="assets"?e.filter((c,h)=>o(c,h)||u(c,h)):a==="data"?e.filter((c,h)=>{let f=n.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(o(c,h)||u(c,h))return!0;if(c.route.shouldRevalidate){let v=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function ste(r,e,{includeHydrateFallback:t}={}){return ote(r.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),t&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function ote(r){return[...new Set(r)]}function lte(r){let e={},t=Object.keys(r).sort();for(let n of t)e[n]=r[n];return e}function ute(r,e){let t=new Set;return new Set(e),r.reduce((n,i)=>{let a=JSON.stringify(lte(i));return t.has(a)||(t.add(a),n.push({key:a,link:i})),n},[])}function I6(){let r=he.useContext(Lf);return N6(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function cte(){let r=he.useContext($1);return N6(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var P6=he.createContext(void 0);P6.displayName="FrameworkContext";function j6(){let r=he.useContext(P6);return N6(r,"You must render this element inside a <HydratedRouter> element"),r}function dte(r,e){let t=he.useContext(P6),[n,i]=he.useState(!1),[a,o]=he.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:h,onMouseLeave:f,onTouchStart:v}=e,y=he.useRef(null);he.useEffect(()=>{if(r==="render"&&o(!0),r==="viewport"){let E=T=>{T.forEach(C=>{o(C.isIntersecting)})},A=new IntersectionObserver(E,{threshold:.5});return y.current&&A.observe(y.current),()=>{A.disconnect()}}},[r]),he.useEffect(()=>{if(n){let E=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(E)}}},[n]);let g=()=>{i(!0)},_=()=>{i(!1),o(!1)};return t?r!=="intent"?[a,y,{}]:[a,y,{onFocus:iv(u,g),onBlur:iv(c,_),onMouseEnter:iv(h,g),onMouseLeave:iv(f,_),onTouchStart:iv(v,g)}]:[!1,y,{}]}function iv(r,e){return t=>{r&&r(t),t.defaultPrevented||e(t)}}function hte({page:r,...e}){let t=Tee(),{router:n}=I6(),i=he.useMemo(()=>TV(n.routes,r,n.basename),[n.routes,r,n.basename]);return i?t?he.createElement(pte,{page:r,matches:i,...e}):he.createElement(vte,{page:r,matches:i,...e}):null}function fte(r){let{manifest:e,routeModules:t}=j6(),[n,i]=he.useState([]);return he.useEffect(()=>{let a=!1;return ate(r,e,t).then(o=>{a||i(o)}),()=>{a=!0}},[r,e,t]),n}function pte({page:r,matches:e,...t}){let n=So(),{future:i}=j6(),{basename:a}=I6(),o=he.useMemo(()=>{if(r===n.pathname+n.search+n.hash)return[];let u=BV(r,a,i.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,h=[];for(let f of e)typeof f.route.shouldRevalidate=="function"?c=!0:h.push(f.route.id);return c&&h.length>0&&u.searchParams.set("_routes",h.join(",")),[u.pathname+u.search]},[a,i.unstable_trailingSlashAwareDataRequests,r,n,e]);return he.createElement(he.Fragment,null,o.map(u=>he.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...t})))}function vte({page:r,matches:e,...t}){let n=So(),{future:i,manifest:a,routeModules:o}=j6(),{basename:u}=I6(),{loaderData:c,matches:h}=cte(),f=he.useMemo(()=>wk(r,e,h,a,n,"data"),[r,e,h,a,n]),v=he.useMemo(()=>wk(r,e,h,a,n,"assets"),[r,e,h,a,n]),y=he.useMemo(()=>{if(r===n.pathname+n.search+n.hash)return[];let E=new Set,A=!1;if(e.forEach(C=>{let N=a.routes[C.route.id];!N||!N.hasLoader||(!f.some(k=>k.route.id===C.route.id)&&C.route.id in c&&o[C.route.id]?.shouldRevalidate||N.hasClientLoader?A=!0:E.add(C.route.id))}),E.size===0)return[];let T=BV(r,u,i.unstable_trailingSlashAwareDataRequests,"data");return A&&E.size>0&&T.searchParams.set("_routes",e.filter(C=>E.has(C.route.id)).map(C=>C.route.id).join(",")),[T.pathname+T.search]},[u,i.unstable_trailingSlashAwareDataRequests,c,n,a,f,e,r,o]),g=he.useMemo(()=>ste(v,a),[v,a]),_=fte(v);return he.createElement(he.Fragment,null,y.map(E=>he.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...t})),g.map(E=>he.createElement("link",{key:E,rel:"modulepreload",href:E,...t})),_.map(({key:E,link:A})=>he.createElement("link",{key:E,nonce:t.nonce,...A,crossOrigin:A.crossOrigin??t.crossOrigin})))}function gte(...r){return e=>{r.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var mte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mte&&(window.__reactRouterVersion="7.14.0")}catch{}function yte({basename:r,children:e,unstable_useTransitions:t,window:n}){let i=he.useRef();i.current==null&&(i.current=ZJ({window:n,v5Compat:!0}));let a=i.current,[o,u]=he.useState({action:a.action,location:a.location}),c=he.useCallback(h=>{t===!1?u(h):he.startTransition(()=>u(h))},[t]);return he.useLayoutEffect(()=>a.listen(c),[a,c]),he.createElement(Vee,{basename:r,children:e,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:t})}var FV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cl=he.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:i,reloadDocument:a,replace:o,unstable_mask:u,state:c,target:h,to:f,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:g,..._},E){let{basename:A,navigator:T,unstable_useTransitions:C}=he.useContext(qs),N=typeof f=="string"&&FV.test(f),k=kV(f,A);f=k.to;let j=Iee(f,{relative:i}),W=So(),G=null;if(u){let ce=O6(u,[],W.unstable_mask?W.unstable_mask.pathname:"/",!0);A!=="/"&&(ce.pathname=ce.pathname==="/"?A:sl([A,ce.pathname])),G=T.createHref(ce)}let[D,M,U]=dte(n,_),I=_te(f,{replace:o,unstable_mask:u,state:c,target:h,preventScrollReset:v,relative:i,viewTransition:y,unstable_defaultShouldRevalidate:g,unstable_useTransitions:C});function q(ce){e&&e(ce),ce.defaultPrevented||I(ce)}let z=!(k.isExternal||a),Q=he.createElement("a",{..._,...U,href:(z?G:void 0)||k.absoluteURL||j,onClick:z?q:e,ref:gte(E,M),target:h,"data-discover":!N&&t==="render"?"true":void 0});return D&&!N?he.createElement(he.Fragment,null,Q,he.createElement(hte,{page:j})):Q});cl.displayName="Link";var bte=he.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:i=!1,style:a,to:o,viewTransition:u,children:c,...h},f){let v=eg(o,{relative:h.relative}),y=So(),g=he.useContext($1),{navigator:_,basename:E}=he.useContext(qs),A=g!=null&&Ate(v)&&u===!0,T=_.encodeLocation?_.encodeLocation(v).pathname:v.pathname,C=y.pathname,N=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;t||(C=C.toLowerCase(),N=N?N.toLowerCase():null,T=T.toLowerCase()),N&&E&&(N=fu(N,E)||N);const k=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let j=C===T||!i&&C.startsWith(T)&&C.charAt(k)==="/",W=N!=null&&(N===T||!i&&N.startsWith(T)&&N.charAt(T.length)==="/"),G={isActive:j,isPending:W,isTransitioning:A},D=j?e:void 0,M;typeof n=="function"?M=n(G):M=[n,j?"active":null,W?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof a=="function"?a(G):a;return he.createElement(cl,{...h,"aria-current":D,className:M,ref:f,style:U,to:o,viewTransition:u},typeof c=="function"?c(G):c)});bte.displayName="NavLink";var wte=he.forwardRef(({discover:r="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:i,state:a,method:o=t1,action:u,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:v,unstable_defaultShouldRevalidate:y,...g},_)=>{let{unstable_useTransitions:E}=he.useContext(qs),A=Tte(),T=Ote(u,{relative:h}),C=o.toLowerCase()==="get"?"get":"post",N=typeof u=="string"&&FV.test(u),k=j=>{if(c&&c(j),j.defaultPrevented)return;j.preventDefault();let W=j.nativeEvent.submitter,G=W?.getAttribute("formmethod")||o,D=()=>A(W||j.currentTarget,{fetcherKey:e,method:G,navigate:t,replace:i,state:a,relative:h,preventScrollReset:f,viewTransition:v,unstable_defaultShouldRevalidate:y});E&&t!==!1?he.startTransition(()=>D()):D()};return he.createElement("form",{ref:_,method:C,action:T,onSubmit:n?c:k,...g,"data-discover":!N&&r==="render"?"true":void 0})});wte.displayName="Form";function xte(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zV(r){let e=he.useContext(Lf);return Tn(e,xte(r)),e}function _te(r,{target:e,replace:t,unstable_mask:n,state:i,preventScrollReset:a,relative:o,viewTransition:u,unstable_defaultShouldRevalidate:c,unstable_useTransitions:h}={}){let f=$f(),v=So(),y=eg(r,{relative:o});return he.useCallback(g=>{if(Jee(g,e)){g.preventDefault();let _=t!==void 0?t:Iv(v)===Iv(y),E=()=>f(r,{replace:_,unstable_mask:n,state:i,preventScrollReset:a,relative:o,viewTransition:u,unstable_defaultShouldRevalidate:c});h?he.startTransition(()=>E()):E()}},[v,f,y,t,n,i,e,r,a,o,u,c,h])}var Ste=0,Ete=()=>`__${String(++Ste)}__`;function Tte(){let{router:r}=zV("useSubmit"),{basename:e}=he.useContext(qs),t=Uee(),n=r.fetch,i=r.navigate;return he.useCallback(async(a,o={})=>{let{action:u,method:c,encType:h,formData:f,body:v}=rte(a,e);if(o.navigate===!1){let y=o.fetcherKey||Ete();await n(y,t,o.action||u,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:v,formMethod:o.method||c,formEncType:o.encType||h,flushSync:o.flushSync})}else await i(o.action||u,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:v,formMethod:o.method||c,formEncType:o.encType||h,replace:o.replace,state:o.state,fromRouteId:t,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,i,e,t])}function Ote(r,{relative:e}={}){let{basename:t}=he.useContext(qs),n=he.useContext(hl);Tn(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...eg(r||".",{relative:e})},o=So();if(r==null){a.search=o.search;let u=new URLSearchParams(a.search),c=u.getAll("index");if(c.some(f=>f==="")){u.delete("index"),c.filter(v=>v).forEach(v=>u.append("index",v));let f=u.toString();a.search=f?`?${f}`:""}}return(!r||r===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:sl([t,a.pathname])),Iv(a)}function Ate(r,{relative:e}={}){let t=he.useContext(PV);Tn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=zV("useViewTransitionState"),i=eg(r,{relative:e});if(!t.isTransitioning)return!1;let a=fu(t.currentLocation.pathname,n)||t.currentLocation.pathname,o=fu(t.nextLocation.pathname,n)||t.nextLocation.pathname;return g1(i.pathname,o)!=null||g1(i.pathname,a)!=null}const Rte="";async function Er(r,e){const t=await fetch(Rte+r,{...e,headers:{"Content-Type":"application/json",...e?.headers}});if(!t.ok)throw new Error(`API error ${t.status}: ${await t.text()}`);return t.json()}const Or={getProjects:()=>Er("/api/projects"),getProject:r=>Er(`/api/projects/${r}`),getSessions:(r={})=>{const e=new URLSearchParams(Object.entries(r).map(([t,n])=>[t,String(n)]));return Er(`/api/sessions?${e}`)},getSession:r=>Er(`/api/sessions/${r}`),getHealth:()=>Er("/api/health"),getContext:(r,e=3)=>Er(`/api/context?cwd=${encodeURIComponent(r)}&n=${e}`),search:(r,e)=>Er("/api/search",{method:"POST",body:JSON.stringify({query:r,project_id:e})}),getObservations:r=>Er(`/api/observations?session_id=${r}`),getMemory:r=>Er(`/api/memory?project_id=${r}`),getPreferences:r=>Er(`/api/memory/preferences?project_id=${r}`),getKnowledge:(r,e)=>Er(`/api/memory/knowledge?project_id=${r}${e?`&category=${e}`:""}`),getPatterns:(r,e)=>Er(`/api/memory/patterns?project_id=${r}${e?`&type=${e}`:""}`),getTasks:(r,e)=>Er(`/api/memory/tasks?project_id=${r}${e?`&status=${e}`:""}`),getContacts:r=>Er(`/api/memory/contacts?project_id=${r}`),getMetrics:async()=>(await Er("/api/metrics")).metrics,consolidateMemory:r=>Er(`/api/consolidate/${r}`,{method:"POST"}),resyncProject:(r,e)=>Er(`/api/resync/${r}${e?"?force=true":""}`,{method:"POST"}),resyncSession:r=>Er(`/api/resync/session/${r}`,{method:"POST"}),syncSession:r=>Er(`/api/sessions/${r}/sync`,{method:"POST"}),updateSessionActivity:r=>Er(`/api/sessions/${r}/activity`,{method:"POST"}),resyncAll:r=>Er(`/api/resync/all${r?"?force=true":""}`,{method:"POST"}),forceEndSession:r=>Er(`/api/force-end-session/${r}`,{method:"POST"}),deleteSession:r=>Er(`/api/sessions/${r}`,{method:"DELETE"}),toggleBookmark:(r,e)=>Er(`/api/sessions/${r}/bookmark`,{method:"POST",body:JSON.stringify({bookmarked:e})}),getTags:r=>Er(`/api/tags?project_id=${r}`),createTag:(r,e,t)=>Er("/api/tags",{method:"POST",body:JSON.stringify({project_id:r,name:e,color:t})}),deleteTag:r=>Er(`/api/tags/${r}`,{method:"DELETE"}),getSessionTags:r=>Er(`/api/tags/session/${r}`),addSessionTag:(r,e)=>Er(`/api/tags/session/${r}`,{method:"POST",body:JSON.stringify({tag_id:e})}),removeSessionTag:(r,e)=>Er(`/api/tags/session/${r}/${e}`,{method:"DELETE"}),updateSessionNotes:(r,e)=>Er(`/api/sessions/${r}/notes`,{method:"POST",body:JSON.stringify({notes:e})}),toggleArchive:(r,e)=>Er(`/api/sessions/${r}/archive`,{method:"POST",body:JSON.stringify({archived:e})}),getSettings:()=>Er("/api/settings"),updateSettings:r=>Er("/api/settings",{method:"POST",body:JSON.stringify(r)})};function M6(){const r=location.protocol==="https:"?"wss:":"ws:";return new WebSocket(`${r}//${location.host}`)}/**
|
|
61
|
+
* @license lucide-react v1.7.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const UV=(...r)=>r.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v1.7.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Cte=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v1.7.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const kte=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v1.7.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const xk=r=>{const e=kte(r);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
|
81
|
+
* @license lucide-react v1.7.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var $0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
86
|
+
* @license lucide-react v1.7.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Nte=r=>{for(const e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},Ite=he.createContext({}),Pte=()=>he.useContext(Ite),jte=he.forwardRef(({color:r,size:e,strokeWidth:t,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...u},c)=>{const{size:h=24,strokeWidth:f=2,absoluteStrokeWidth:v=!1,color:y="currentColor",className:g=""}=Pte()??{},_=n??v?Number(t??f)*24/Number(e??h):t??f;return he.createElement("svg",{ref:c,...$0,width:e??h??$0.width,height:e??h??$0.height,stroke:r??y,strokeWidth:_,className:UV("lucide",g,i),...!a&&!Nte(u)&&{"aria-hidden":"true"},...u},[...o.map(([E,A])=>he.createElement(E,A)),...Array.isArray(a)?a:[a]])});/**
|
|
91
|
+
* @license lucide-react v1.7.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const _t=(r,e)=>{const t=he.forwardRef(({className:n,...i},a)=>he.createElement(jte,{ref:a,iconNode:e,className:UV(`lucide-${Cte(xk(r))}`,`lucide-${r}`,n),...i}));return t.displayName=xk(r),t};/**
|
|
96
|
+
* @license lucide-react v1.7.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Mte=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Dte=_t("activity",Mte);/**
|
|
101
|
+
* @license lucide-react v1.7.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const qte=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],Lte=_t("archive-restore",qte);/**
|
|
106
|
+
* @license lucide-react v1.7.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const $te=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Bte=_t("archive",$te);/**
|
|
111
|
+
* @license lucide-react v1.7.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Fte=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zte=_t("arrow-down",Fte);/**
|
|
116
|
+
* @license lucide-react v1.7.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Ute=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],D6=_t("arrow-left",Ute);/**
|
|
121
|
+
* @license lucide-react v1.7.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Hte=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Wte=_t("arrow-right",Hte);/**
|
|
126
|
+
* @license lucide-react v1.7.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Gte=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vte=_t("arrow-up",Gte);/**
|
|
131
|
+
* @license lucide-react v1.7.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Yte=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],_k=_t("book-open",Yte);/**
|
|
136
|
+
* @license lucide-react v1.7.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Kte=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Pv=_t("brain",Kte);/**
|
|
141
|
+
* @license lucide-react v1.7.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Xte=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],m1=_t("calendar",Xte);/**
|
|
146
|
+
* @license lucide-react v1.7.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Qte=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],q6=_t("chart-column",Qte);/**
|
|
151
|
+
* @license lucide-react v1.7.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Zte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],HV=_t("check",Zte);/**
|
|
156
|
+
* @license lucide-react v1.7.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Jte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ere=_t("chevron-down",Jte);/**
|
|
161
|
+
* @license lucide-react v1.7.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const tre=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rre=_t("chevron-left",tre);/**
|
|
166
|
+
* @license lucide-react v1.7.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const nre=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ire=_t("chevron-right",nre);/**
|
|
171
|
+
* @license lucide-react v1.7.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const are=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Tf=_t("circle-alert",are);/**
|
|
176
|
+
* @license lucide-react v1.7.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const sre=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Pc=_t("circle-check-big",sre);/**
|
|
181
|
+
* @license lucide-react v1.7.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const ore=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],UO=_t("circle-check",ore);/**
|
|
186
|
+
* @license lucide-react v1.7.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const lre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],WV=_t("circle",lre);/**
|
|
191
|
+
* @license lucide-react v1.7.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const ure=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],fl=_t("clock",ure);/**
|
|
196
|
+
* @license lucide-react v1.7.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const cre=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],dre=_t("code-xml",cre);/**
|
|
201
|
+
* @license lucide-react v1.7.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const hre=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],GV=_t("copy",hre);/**
|
|
206
|
+
* @license lucide-react v1.7.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const fre=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],F1=_t("download",fre);/**
|
|
211
|
+
* @license lucide-react v1.7.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const pre=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],vre=_t("file-pen",pre);/**
|
|
216
|
+
* @license lucide-react v1.7.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const gre=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],mre=_t("file-search",gre);/**
|
|
221
|
+
* @license lucide-react v1.7.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const yre=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ms=_t("file-text",yre);/**
|
|
226
|
+
* @license lucide-react v1.7.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const bre=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],VV=_t("flame",bre);/**
|
|
231
|
+
* @license lucide-react v1.7.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const wre=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],YV=_t("folder-git-2",wre);/**
|
|
236
|
+
* @license lucide-react v1.7.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const xre=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],KV=_t("folder-open",xre);/**
|
|
241
|
+
* @license lucide-react v1.7.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const _re=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Sre=_t("frown",_re);/**
|
|
246
|
+
* @license lucide-react v1.7.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const Ere=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],XV=_t("git-branch",Ere);/**
|
|
251
|
+
* @license lucide-react v1.7.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const Tre=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ore=_t("layers",Tre);/**
|
|
256
|
+
* @license lucide-react v1.7.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const Are=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Rre=_t("layout-grid",Are);/**
|
|
261
|
+
* @license lucide-react v1.7.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Cre=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],HO=_t("lightbulb",Cre);/**
|
|
266
|
+
* @license lucide-react v1.7.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const kre=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Nre=_t("link-2",kre);/**
|
|
271
|
+
* @license lucide-react v1.7.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const Ire=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Pre=_t("list",Ire);/**
|
|
276
|
+
* @license lucide-react v1.7.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const jre=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Mre=_t("loader",jre);/**
|
|
281
|
+
* @license lucide-react v1.7.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const Dre=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],qre=_t("menu",Dre);/**
|
|
286
|
+
* @license lucide-react v1.7.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const Lre=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],QV=_t("message-square",Lre);/**
|
|
291
|
+
* @license lucide-react v1.7.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const $re=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Bre=_t("monitor",$re);/**
|
|
296
|
+
* @license lucide-react v1.7.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Fre=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],zre=_t("moon",Fre);/**
|
|
301
|
+
* @license lucide-react v1.7.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const Ure=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Hre=_t("pause",Ure);/**
|
|
306
|
+
* @license lucide-react v1.7.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const Wre=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Gre=_t("play",Wre);/**
|
|
311
|
+
* @license lucide-react v1.7.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Vre=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sk=_t("plus",Vre);/**
|
|
316
|
+
* @license lucide-react v1.7.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const Yre=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],jv=_t("radio",Yre);/**
|
|
321
|
+
* @license lucide-react v1.7.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const Kre=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],xc=_t("refresh-cw",Kre);/**
|
|
326
|
+
* @license lucide-react v1.7.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const Xre=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Qre=_t("save",Xre);/**
|
|
331
|
+
* @license lucide-react v1.7.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const Zre=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],L6=_t("search",Zre);/**
|
|
336
|
+
* @license lucide-react v1.7.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const Jre=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZV=_t("settings",Jre);/**
|
|
341
|
+
* @license lucide-react v1.7.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const ene=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],tne=_t("smile",ene);/**
|
|
346
|
+
* @license lucide-react v1.7.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const rne=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],y1=_t("square-check-big",rne);/**
|
|
351
|
+
* @license lucide-react v1.7.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const nne=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],JV=_t("square",nne);/**
|
|
356
|
+
* @license lucide-react v1.7.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const ine=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],eY=_t("star",ine);/**
|
|
361
|
+
* @license lucide-react v1.7.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const ane=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],sne=_t("sun",ane);/**
|
|
366
|
+
* @license lucide-react v1.7.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const one=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],tY=_t("tag",one);/**
|
|
371
|
+
* @license lucide-react v1.7.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const lne=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],une=_t("terminal",lne);/**
|
|
376
|
+
* @license lucide-react v1.7.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const cne=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],rY=_t("trash-2",cne);/**
|
|
381
|
+
* @license lucide-react v1.7.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const dne=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],_c=_t("trending-up",dne);/**
|
|
386
|
+
* @license lucide-react v1.7.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const hne=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fne=_t("triangle-alert",hne);/**
|
|
391
|
+
* @license lucide-react v1.7.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const pne=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ek=_t("users",pne);/**
|
|
396
|
+
* @license lucide-react v1.7.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const vne=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],dl=_t("wrench",vne);/**
|
|
401
|
+
* @license lucide-react v1.7.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const gne=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ds=_t("x",gne);/**
|
|
406
|
+
* @license lucide-react v1.7.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const mne=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Mv=_t("zap",mne);function yne(){const[r,e]=he.useState(()=>localStorage.getItem("theme")||"system");return he.useEffect(()=>{const t=document.documentElement,n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(r==="system"?n:r)==="dark"?t.classList.add("dark"):t.classList.remove("dark"),localStorage.setItem("theme",r)},[r]),he.useEffect(()=>{if(r!=="system")return;const t=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{const i=document.documentElement;t.matches?i.classList.add("dark"):i.classList.remove("dark")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[r]),{theme:r,setTheme:e}}function bne(){const{theme:r,setTheme:e}=yne(),t=[{value:"light",icon:sne,label:"Light"},{value:"dark",icon:zre,label:"Dark"},{value:"system",icon:Bre,label:"System"}];return w.jsx("div",{style:{display:"flex",gap:4,padding:"8px",background:"var(--surface2)",borderRadius:8},children:t.map(({value:n,icon:i,label:a})=>w.jsx("button",{onClick:()=>e(n),title:a,style:{padding:"6px 8px",background:r===n?"var(--accent)":"transparent",color:r===n?"white":"var(--text-muted)",border:"none",borderRadius:6,cursor:"pointer",display:"flex",alignItems:"center",transition:"all 0.15s"},children:w.jsx(i,{size:16})},n))})}function wne({children:r}){const e=So(),[t,n]=he.useState(!1),{data:i}=ya({queryKey:["health"],queryFn:Or.getHealth,refetchInterval:1e4}),a=[{path:"/",icon:KV,label:"Projects"},{path:"/search",icon:L6,label:"Search"},{path:"/live",icon:jv,label:"Live"},{path:"/metrics",icon:q6,label:"Metrics"},{path:"/logs",icon:Ms,label:"Logs"},{path:"/settings",icon:ZV,label:"Settings"}];return w.jsxs("div",{style:{display:"flex",minHeight:"100vh",position:"relative"},children:[w.jsx("button",{onClick:()=>n(!t),style:{position:"fixed",top:16,left:16,zIndex:1001,display:"none",padding:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",cursor:"pointer"},className:"mobile-only",children:t?w.jsx(ds,{size:20}):w.jsx(qre,{size:20})}),t&&w.jsx("div",{onClick:()=>n(!1),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:999,display:"none"},className:"mobile-only"}),w.jsxs("aside",{style:{width:240,background:"var(--surface)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",flexShrink:0,position:"fixed",height:"100vh",left:0,top:0,zIndex:1e3,transition:"left 0.3s ease"},className:"sidebar",children:[w.jsxs("div",{style:{padding:"24px 20px 20px",borderBottom:"1px solid var(--border)"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[w.jsx(Mv,{size:22,color:"var(--accent)"}),w.jsx("span",{style:{fontWeight:700,fontSize:17,color:"var(--text)"},children:"MemCTX"})]}),w.jsxs("div",{style:{marginTop:10,fontSize:12,color:i?.status==="ok"?"var(--green)":"var(--red)",display:"flex",alignItems:"center",gap:6},children:[w.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:i?.status==="ok"?"var(--green)":"var(--red)",display:"inline-block"}}),i?.status==="ok"?"Worker online":"Connecting..."]})]}),w.jsx("nav",{style:{padding:"12px 10px",flex:1},children:a.map(({path:o,icon:u,label:c})=>{const h=e.pathname===o||o!=="/"&&e.pathname.startsWith(o);return w.jsxs(cl,{to:o,onClick:()=>n(!1),style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px",borderRadius:8,marginBottom:4,color:h?"var(--text)":"var(--text-muted)",background:h?"var(--surface2)":"transparent",transition:"all 0.15s",fontSize:14,fontWeight:h?600:500},children:[w.jsx(u,{size:17}),c]},o)})}),w.jsxs("div",{style:{padding:"16px 20px",borderTop:"1px solid var(--border)"},children:[w.jsx(bne,{}),i&&w.jsxs("div",{style:{marginTop:16,fontSize:12,color:"var(--text-muted)",lineHeight:1.8},children:[w.jsxs("div",{children:["DB: ",i.db]}),w.jsxs("div",{children:["AI: ",i.api_key?"enabled":"no key"]}),w.jsxs("div",{children:["Queue: ",i.queue_size??0," pending"]}),w.jsxs("div",{children:["v",i.version]})]})]})]}),w.jsx("main",{style:{flex:1,overflow:"auto",minWidth:0,marginLeft:240,paddingBottom:60,transition:"margin-left 0.3s ease"},className:"main-content",children:r}),w.jsx("style",{children:`
|
|
411
|
+
@media (max-width: 768px) {
|
|
412
|
+
.mobile-only {
|
|
413
|
+
display: block !important;
|
|
414
|
+
}
|
|
415
|
+
.sidebar {
|
|
416
|
+
left: ${t?"0":"-240px"} !important;
|
|
417
|
+
}
|
|
418
|
+
.main-content {
|
|
419
|
+
margin-left: 0 !important;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
`})]})}const nY=6048e5,xne=864e5,Tk=6e4,Ok=525600,uf=43200,b1=1440,Ak=Symbol.for("constructDateFrom");function pu(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Ak in r?r[Ak](e):r instanceof Date?new r.constructor(e):new Date(e)}function Ri(r,e){return pu(e||r,r)}let _ne={};function Bf(){return _ne}function Dv(r,e){const t=Bf(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=Ri(r,e?.in),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function w1(r,e){return Dv(r,{...e,weekStartsOn:1})}function iY(r,e){const t=Ri(r,e?.in),n=t.getFullYear(),i=pu(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=w1(i),o=pu(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const u=w1(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function Of(r){const e=Ri(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function tg(r,...e){const t=pu.bind(null,r||e.find(n=>typeof n=="object"));return e.map(t)}function WO(r,e){const t=Ri(r,e?.in);return t.setHours(0,0,0,0),t}function Sne(r,e,t){const[n,i]=tg(t?.in,r,e),a=WO(n),o=WO(i),u=+a-Of(a),c=+o-Of(o);return Math.round((u-c)/xne)}function Ene(r,e){const t=iY(r,e),n=pu(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),w1(n)}function wv(r,e){const t=+Ri(r)-+Ri(e);return t<0?-1:t>0?1:t}function Tne(r){return pu(r,Date.now())}function One(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function Ane(r){return!(!One(r)&&typeof r!="number"||isNaN(+Ri(r)))}function Rne(r,e,t){const[n,i]=tg(t?.in,r,e),a=n.getFullYear()-i.getFullYear(),o=n.getMonth()-i.getMonth();return a*12+o}function aY(r){return e=>{const n=(r?Math[r]:Math.trunc)(e);return n===0?0:n}}function Cne(r,e){return+Ri(r)-+Ri(e)}function kne(r,e){const t=Ri(r,e?.in);return t.setHours(23,59,59,999),t}function Nne(r,e){const t=Ri(r,e?.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Ine(r,e){const t=Ri(r,e?.in);return+kne(t,e)==+Nne(t,e)}function Pne(r,e,t){const[n,i,a]=tg(t?.in,r,r,e),o=wv(i,a),u=Math.abs(Rne(i,a));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*u);let c=wv(i,a)===-o;Ine(n)&&u===1&&wv(n,a)===1&&(c=!1);const h=o*(u-+c);return h===0?0:h}function jne(r,e,t){const n=Cne(r,e)/1e3;return aY(t?.roundingMethod)(n)}function Mne(r,e){const t=Ri(r,e?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const Dne={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qne=(r,e,t)=>{let n;const i=Dne[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function B0(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const Lne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$ne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fne={date:B0({formats:Lne,defaultWidth:"full"}),time:B0({formats:$ne,defaultWidth:"full"}),dateTime:B0({formats:Bne,defaultWidth:"full"})},zne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Une=(r,e,t,n)=>zne[r];function av(r){return(e,t)=>{const n=t?.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,u=t?.width?String(t.width):o;i=r.formattingValues[u]||r.formattingValues[o]}else{const o=r.defaultWidth,u=t?.width?String(t.width):r.defaultWidth;i=r.values[u]||r.values[o]}const a=r.argumentCallback?r.argumentCallback(e):e;return i[a]}}const Hne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Vne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Yne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Kne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xne=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Qne={ordinalNumber:Xne,era:av({values:Hne,defaultWidth:"wide"}),quarter:av({values:Wne,defaultWidth:"wide",argumentCallback:r=>r-1}),month:av({values:Gne,defaultWidth:"wide"}),day:av({values:Vne,defaultWidth:"wide"}),dayPeriod:av({values:Yne,defaultWidth:"wide",formattingValues:Kne,defaultFormattingWidth:"wide"})};function sv(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],a=e.match(i);if(!a)return null;const o=a[0],u=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],c=Array.isArray(u)?Jne(u,v=>v.test(o)):Zne(u,v=>v.test(o));let h;h=r.valueCallback?r.valueCallback(c):c,h=t.valueCallback?t.valueCallback(h):h;const f=e.slice(o.length);return{value:h,rest:f}}}function Zne(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function Jne(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function eie(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],a=e.match(r.parsePattern);if(!a)return null;let o=r.valueCallback?r.valueCallback(a[0]):a[0];o=t.valueCallback?t.valueCallback(o):o;const u=e.slice(i.length);return{value:o,rest:u}}}const tie=/^(\d+)(th|st|nd|rd)?/i,rie=/\d+/i,nie={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iie={any:[/^b/i,/^(a|c)/i]},aie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sie={any:[/1/i,/2/i,/3/i,/4/i]},oie={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uie={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},die={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hie={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fie={ordinalNumber:eie({matchPattern:tie,parsePattern:rie,valueCallback:r=>parseInt(r,10)}),era:sv({matchPatterns:nie,defaultMatchWidth:"wide",parsePatterns:iie,defaultParseWidth:"any"}),quarter:sv({matchPatterns:aie,defaultMatchWidth:"wide",parsePatterns:sie,defaultParseWidth:"any",valueCallback:r=>r+1}),month:sv({matchPatterns:oie,defaultMatchWidth:"wide",parsePatterns:lie,defaultParseWidth:"any"}),day:sv({matchPatterns:uie,defaultMatchWidth:"wide",parsePatterns:cie,defaultParseWidth:"any"}),dayPeriod:sv({matchPatterns:die,defaultMatchWidth:"any",parsePatterns:hie,defaultParseWidth:"any"})},$6={code:"en-US",formatDistance:qne,formatLong:Fne,formatRelative:Une,localize:Qne,match:fie,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pie(r,e){const t=Ri(r,e?.in);return Sne(t,Mne(t))+1}function vie(r,e){const t=Ri(r,e?.in),n=+w1(t)-+Ene(t);return Math.round(n/nY)+1}function sY(r,e){const t=Ri(r,e?.in),n=t.getFullYear(),i=Bf(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=pu(e?.in||r,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const u=Dv(o,e),c=pu(e?.in||r,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const h=Dv(c,e);return+t>=+u?n+1:+t>=+h?n:n-1}function gie(r,e){const t=Bf(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=sY(r,e),a=pu(e?.in||r,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),Dv(a,e)}function mie(r,e){const t=Ri(r,e?.in),n=+Dv(t,e)-+gie(t,e);return Math.round(n/nY)+1}function Dr(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const hc={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Dr(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Dr(t+1,2)},d(r,e){return Dr(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Dr(r.getHours()%12||12,e.length)},H(r,e){return Dr(r.getHours(),e.length)},m(r,e){return Dr(r.getMinutes(),e.length)},s(r,e){return Dr(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Dr(i,e.length)}},Zh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rk={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return hc.y(r,e)},Y:function(r,e,t,n){const i=sY(r,n),a=i>0?i:1-i;if(e==="YY"){const o=a%100;return Dr(o,2)}return e==="Yo"?t.ordinalNumber(a,{unit:"year"}):Dr(a,e.length)},R:function(r,e){const t=iY(r);return Dr(t,e.length)},u:function(r,e){const t=r.getFullYear();return Dr(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Dr(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Dr(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return hc.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Dr(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=mie(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Dr(i,e.length)},I:function(r,e,t){const n=vie(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Dr(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):hc.d(r,e)},D:function(r,e,t){const n=pie(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Dr(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return Dr(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return Dr(a,e.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Dr(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=Zh.noon:n===0?i=Zh.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=Zh.evening:n>=12?i=Zh.afternoon:n>=4?i=Zh.morning:i=Zh.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return hc.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):hc.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Dr(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Dr(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):hc.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):hc.s(r,e)},S:function(r,e){return hc.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return kk(n);case"XXXX":case"XX":return fd(n);default:return fd(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return kk(n);case"xxxx":case"xx":return fd(n);default:return fd(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ck(n,":");default:return"GMT"+fd(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ck(n,":");default:return"GMT"+fd(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Dr(n,e.length)},T:function(r,e,t){return Dr(+r,e.length)}};function Ck(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),a=n%60;return a===0?t+String(i):t+String(i)+e+Dr(a,2)}function kk(r,e){return r%60===0?(r>0?"-":"+")+Dr(Math.abs(r)/60,2):fd(r,e)}function fd(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Dr(Math.trunc(n/60),2),a=Dr(n%60,2);return t+i+e+a}const Nk=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},oY=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},yie=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Nk(r,e);let a;switch(n){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",Nk(n,e)).replace("{{time}}",oY(i,e))},bie={p:oY,P:yie},wie=/^D+$/,xie=/^Y+$/,_ie=["D","DD","YY","YYYY"];function Sie(r){return wie.test(r)}function Eie(r){return xie.test(r)}function Tie(r,e,t){const n=Oie(r,e,t);if(console.warn(n),_ie.includes(r))throw new RangeError(n)}function Oie(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Aie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cie=/^'([^]*?)'?$/,kie=/''/g,Nie=/[a-zA-Z]/;function iu(r,e,t){const n=Bf(),i=n.locale??$6,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,u=Ri(r,t?.in);if(!Ane(u))throw new RangeError("Invalid time value");let c=e.match(Rie).map(f=>{const v=f[0];if(v==="p"||v==="P"){const y=bie[v];return y(f,i.formatLong)}return f}).join("").match(Aie).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const v=f[0];if(v==="'")return{isToken:!1,value:Iie(f)};if(Rk[v])return{isToken:!0,value:f};if(v.match(Nie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(c=i.localize.preprocessor(u,c));const h={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(f=>{if(!f.isToken)return f.value;const v=f.value;(Eie(v)||Sie(v))&&Tie(v,e,String(r));const y=Rk[v[0]];return y(u,v,i.localize,h)}).join("")}function Iie(r){const e=r.match(Cie);return e?e[1].replace(kie,"'"):r}function Pie(r,e,t){const n=Bf(),i=t?.locale??n.locale??$6,a=2520,o=wv(r,e);if(isNaN(o))throw new RangeError("Invalid time value");const u=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:o}),[c,h]=tg(t?.in,...o>0?[e,r]:[r,e]),f=jne(h,c),v=(Of(h)-Of(c))/1e3,y=Math.round((f-v)/60);let g;if(y<2)return t?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,u):f<10?i.formatDistance("lessThanXSeconds",10,u):f<20?i.formatDistance("lessThanXSeconds",20,u):f<40?i.formatDistance("halfAMinute",0,u):f<60?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",1,u):y===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",y,u);if(y<45)return i.formatDistance("xMinutes",y,u);if(y<90)return i.formatDistance("aboutXHours",1,u);if(y<b1){const _=Math.round(y/60);return i.formatDistance("aboutXHours",_,u)}else{if(y<a)return i.formatDistance("xDays",1,u);if(y<uf){const _=Math.round(y/b1);return i.formatDistance("xDays",_,u)}else if(y<uf*2)return g=Math.round(y/uf),i.formatDistance("aboutXMonths",g,u)}if(g=Pne(h,c),g<12){const _=Math.round(y/uf);return i.formatDistance("xMonths",_,u)}else{const _=g%12,E=Math.trunc(g/12);return _<3?i.formatDistance("aboutXYears",E,u):_<9?i.formatDistance("overXYears",E,u):i.formatDistance("almostXYears",E+1,u)}}function jie(r,e,t){const i=Bf().locale??$6,a=wv(r,e);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:a}),[u,c]=tg(t?.in,...a>0?[e,r]:[r,e]),h=aY("round"),f=c.getTime()-u.getTime(),v=f/Tk,y=Of(c)-Of(u),g=(f-y)/Tk,_=t?.unit;let E;if(v<1?E="second":v<60?E="minute":v<b1?E="hour":g<uf?E="day":g<Ok?E="month":E="year",E==="second"){const A=h(f/1e3);return i.formatDistance("xSeconds",A,o)}else if(E==="minute"){const A=h(v);return i.formatDistance("xMinutes",A,o)}else if(E==="hour"){const A=h(v/60);return i.formatDistance("xHours",A,o)}else if(E==="day"){const A=h(g/b1);return i.formatDistance("xDays",A,o)}else if(E==="month"){const A=h(g/uf);return A===12&&_!=="month"?i.formatDistance("xYears",1,o):i.formatDistance("xMonths",A,o)}else{const A=h(g/Ok);return i.formatDistance("xYears",A,o)}}function lY(r,e){return Pie(r,Tne(r),e)}function x1({isOpen:r,title:e,message:t,confirmText:n="Confirm",cancelText:i="Cancel",confirmColor:a="var(--accent)",onConfirm:o,onCancel:u}){return r?w.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",padding:20,animation:"fadeIn 0.2s ease-out"},onClick:u,children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:16,maxWidth:480,width:"100%",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",animation:"scaleIn 0.2s ease-out"},onClick:c=>c.stopPropagation(),children:[w.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:e}),w.jsx("button",{onClick:u,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex",alignItems:"center",borderRadius:6,transition:"background 0.15s"},onMouseEnter:c=>c.currentTarget.style.background="var(--surface2)",onMouseLeave:c=>c.currentTarget.style.background="transparent",children:w.jsx(ds,{size:20})})]}),w.jsx("div",{style:{padding:"24px",fontSize:14,lineHeight:1.6,color:"var(--text)"},children:t}),w.jsxs("div",{style:{padding:"16px 24px",borderTop:"1px solid var(--border)",display:"flex",gap:12,justifyContent:"flex-end"},children:[w.jsx("button",{onClick:u,style:{padding:"10px 20px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:c=>c.currentTarget.style.background="var(--border)",onMouseLeave:c=>c.currentTarget.style.background="var(--surface2)",children:i}),w.jsx("button",{onClick:o,style:{padding:"10px 20px",background:a,border:"none",borderRadius:8,fontSize:14,fontWeight:600,color:"white",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:c=>c.currentTarget.style.opacity="0.9",onMouseLeave:c=>c.currentTarget.style.opacity="1",children:n})]})]})}):null}function Mie({projects:r,onOpenProject:e}){const{data:t}=ya({queryKey:["all-sessions"],queryFn:async()=>{const I=r.map(z=>Or.getSessions({project_id:z.id,limit:1e3}));return(await Promise.all(I)).flat()},enabled:r.length>0}),n=t||[],i=n.length,a=n.filter(I=>I.status==="completed").length,o=i>0?Math.round(a/i*100):0,u=n.reduce((I,q)=>q.ended_at?I+(q.ended_at-q.started_at):I,0),c=i>0?Math.round(u/i/60):0,h=Math.round(u/3600),v=new Set(n.flatMap(I=>{try{const q=typeof I.summary_files_changed=="string"?JSON.parse(I.summary_files_changed):I.summary_files_changed;return Array.isArray(q)?q:[]}catch{return[]}})).size,y=n.reduce((I,q)=>I+(q.tool_use_count||0),0),g=new Set(n.map(I=>{const q=new Date(I.started_at*1e3);return q.setHours(0,0,0,0),q.getTime()})),_=Array.from(g).sort((I,q)=>q-I);let E=0;const A=new Date;A.setHours(0,0,0,0);const T=A.getTime(),C=T-864e5;if(_.includes(T)||_.includes(C)){let I=_.includes(T)?T:C;for(;_.includes(I);)E++,I-=864e5}const k=Date.now()/1e3-10080*60,j=n.filter(I=>I.started_at>=k),W={};j.forEach(I=>{const q=new Date(I.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});W[q]=(W[q]||0)+1});const G=[];for(let I=6;I>=0;I--){const z=new Date(Date.now()-I*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});G.push({date:z,count:W[z]||0})}const D=Math.max(...G.map(I=>I.count),1),M=r.map(I=>({name:I.name,sessions:(I.sessions||[]).length})).sort((I,q)=>q.sessions-I.sessions),U=M[0];return w.jsxs("div",{style:{marginBottom:32},children:[w.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[w.jsx(_c,{size:20}),"Overview Dashboard"]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(Pc,{size:16,style:{color:"var(--green)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Sessions"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:i}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[o,"% completed"]})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(fl,{size:16,style:{color:"var(--blue)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Time"})]}),w.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[h,"h"]}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[c,"m avg per session"]})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(Ms,{size:16,style:{color:"var(--purple)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:v}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"across all projects"})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(dl,{size:16,style:{color:"var(--orange)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:y}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(VV,{size:16,style:{color:E>0?"var(--orange)":"var(--text-muted)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:E>0?"var(--orange)":"var(--text)"},children:E}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[E===1?"day":"days"," in a row"]})]})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[w.jsx(_c,{size:16}),"Last 7 Days Activity"]}),w.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:G.map((I,q)=>w.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[w.jsx("div",{style:{width:"100%",height:Math.max(I.count/D*100,4),background:I.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:I.count>0&&w.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:I.count})}),w.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:I.date.split(" ")[1]})]},q))})]}),U&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[w.jsx(_c,{size:16}),"Most Active Projects"]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:M.slice(0,5).map((I,q)=>w.jsxs("div",{children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[w.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--accent)",cursor:"pointer",textDecoration:"none"},onClick:()=>{e(I.id,I.name),window.location.href=`/project/${I.id}`},onMouseEnter:z=>z.currentTarget.style.textDecoration="underline",onMouseLeave:z=>z.currentTarget.style.textDecoration="none",children:I.name}),w.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:I.sessions})]}),w.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:w.jsx("div",{style:{width:`${I.sessions/U.sessions*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},q))})]})]})]})}let Die=0;const xv=new Set;let gv=[];function F0(r){r.forEach(e=>e([...gv]))}const at={show:(r,e="info",t)=>{const n=`toast-${Die++}`;return gv.push({id:n,type:e,message:r,progress:t}),F0(xv),e!=="loading"&&setTimeout(()=>at.dismiss(n),5e3),n},loading:(r,e)=>at.show(r,"loading",e),success:r=>at.show(r,"success"),error:r=>at.show(r,"error"),update:(r,e,t)=>{const n=gv.find(i=>i.id===r);n&&(n.message=e,t!==void 0&&(n.progress=t),F0(xv))},dismiss:r=>{gv=gv.filter(e=>e.id!==r),F0(xv)}};function qie(){const[r,e]=he.useState([]);return he.useEffect(()=>(xv.add(e),()=>{xv.delete(e)}),[]),r.length===0?null:w.jsx("div",{style:{position:"fixed",bottom:20,right:20,zIndex:9999,display:"flex",flexDirection:"column",gap:10,maxWidth:400},children:r.map(t=>w.jsx(Lie,{toast:t,onDismiss:()=>at.dismiss(t.id)},t.id))})}function Lie({toast:r,onDismiss:e}){const n={success:{bg:"var(--green)15",border:"var(--green)",icon:"var(--green)"},error:{bg:"var(--red)15",border:"var(--red)",icon:"var(--red)"},info:{bg:"var(--blue)15",border:"var(--blue)",icon:"var(--blue)"},loading:{bg:"var(--accent)15",border:"var(--accent)",icon:"var(--accent)"}}[r.type],i=r.type==="success"?Pc:r.type==="error"?Tf:Mre;return w.jsxs("div",{style:{background:"var(--surface)",border:`1px solid ${n.border}`,borderRadius:12,padding:"14px 16px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",display:"flex",alignItems:"flex-start",gap:12,minWidth:300,animation:"slideIn 0.3s ease-out"},children:[w.jsx(i,{size:20,style:{color:n.icon,flexShrink:0,animation:r.type==="loading"?"spin 1s linear infinite":"none"}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:r.progress!==void 0?8:0},children:r.message}),r.progress!==void 0&&w.jsx("div",{style:{height:4,background:"var(--border)",borderRadius:2,overflow:"hidden"},children:w.jsx("div",{style:{height:"100%",background:n.icon,width:`${r.progress}%`,transition:"width 0.3s ease"}})})]}),r.type!=="loading"&&w.jsx("button",{onClick:e,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:0,display:"flex",alignItems:"center"},children:w.jsx(ds,{size:16})})]})}function z0(){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,animation:"fadeIn 0.3s"},children:[w.jsx("div",{style:{height:20,width:"60%",background:"var(--surface2)",borderRadius:4,marginBottom:12,animation:"pulse 1.5s ease-in-out infinite"}}),w.jsx("div",{style:{height:14,width:"40%",background:"var(--surface2)",borderRadius:4,marginBottom:16,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.1s"}}),w.jsx("div",{style:{height:14,width:"80%",background:"var(--surface2)",borderRadius:4,marginBottom:8,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.2s"}}),w.jsx("div",{style:{height:14,width:"70%",background:"var(--surface2)",borderRadius:4,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.3s"}})]})}function $ie({onOpenProject:r}){const[e,t]=he.useState(!1),[n,i]=he.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:a,isLoading:o,error:u,refetch:c}=ya({queryKey:["projects"],queryFn:Or.getProjects,refetchInterval:15e3}),h=async(f=!1)=>{i({isOpen:!0,title:f?"Force Resync All Projects":"Resync All Projects",message:f?"This will regenerate ALL summaries across ALL projects with v2.0 fields. This may take a very long time. Continue?":'This will only process sessions without summaries across all projects. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:f?"Force Resync":"Resync",confirmColor:f?"var(--orange)":"var(--blue)",onConfirm:async()=>{i({...n,isOpen:!1}),t(!0);const v=at.loading("Queueing sessions across all projects...",0);try{const y=await Or.resyncAll(f);at.update(v,`Queued ${y.result.queued} sessions. Processing...`,50),setTimeout(()=>{at.dismiss(v),at.success(y.result.message)},2e3),c()}catch(y){at.dismiss(v),at.error("Resync failed: "+y)}finally{t(!1)}}})};return o?w.jsx(Bie,{}):u?w.jsx(Fie,{message:String(u)}):w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsx("div",{style:{marginBottom:24},children:w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[w.jsxs("div",{children:[w.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),w.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13},children:["All tracked workspaces — ",a?.length??0," total"]})]}),w.jsxs("div",{style:{display:"flex",gap:8},children:[w.jsxs("button",{onClick:()=>h(!1),disabled:e,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:e?"var(--surface)":"var(--blue)15",color:e?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:e?"var(--border)":"var(--blue)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:e?"not-allowed":"pointer",transition:"all 0.15s"},children:[w.jsx(xc,{size:16,style:{animation:e?"spin 1s linear infinite":"none"}}),e?"Resyncing...":"Resync New"]}),w.jsxs("button",{onClick:()=>h(!0),disabled:e,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:e?"var(--surface)":"var(--orange)15",color:e?"var(--text-muted)":"var(--orange)",border:"1px solid",borderColor:e?"var(--border)":"var(--orange)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:e?"not-allowed":"pointer",transition:"all 0.15s"},children:[w.jsx(xc,{size:16,style:{animation:e?"spin 1s linear infinite":"none"}}),e?"Resyncing...":"Force Resync All"]})]})]})}),!a||a.length===0?w.jsx(zie,{}):w.jsxs(w.Fragment,{children:[w.jsx(Mie,{projects:a,onOpenProject:r}),w.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:16,marginTop:32},children:"All Projects"}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:14},className:"projects-grid",children:a.map(f=>w.jsx(cl,{to:`/project/${f.id}`,style:{display:"block"},children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:v=>{v.currentTarget.style.borderColor="var(--accent)",v.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:v=>{v.currentTarget.style.borderColor="var(--border)",v.currentTarget.style.transform="none"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,marginBottom:10},children:[w.jsx(YV,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),w.jsxs("div",{style:{minWidth:0},children:[w.jsx("div",{style:{fontWeight:700,fontSize:15,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name}),f.git_remote&&w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")})]})]}),w.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[w.jsx(Ore,{size:12,color:"var(--text-muted)"}),w.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[f.session_count??0," sessions"]})]}),f.last_session_at&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[w.jsx(fl,{size:12,color:"var(--text-muted)"}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:lY(new Date(f.last_session_at*1e3),{addSuffix:!0})})]})]})]})},f.id))})]}),w.jsx(x1,{isOpen:n.isOpen,title:n.title,message:n.message,confirmText:n.confirmText,cancelText:"Cancel",confirmColor:n.confirmColor,onConfirm:n.onConfirm,onCancel:()=>i({...n,isOpen:!1})})]})}function Bie(){return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs("div",{style:{marginBottom:24},children:[w.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Loading..."})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16},children:[w.jsx(z0,{}),w.jsx(z0,{}),w.jsx(z0,{})]})]})}function Fie({message:r}){return w.jsxs("div",{style:{padding:32},children:[w.jsxs("div",{style:{color:"var(--red)",fontSize:13},children:["Error: ",r]}),w.jsx("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:8},children:"Make sure the ClaudeContext worker is running on port 9999."})]})}function zie(){return w.jsxs("div",{style:{textAlign:"center",padding:"60px 32px",color:"var(--text-muted)"},children:[w.jsx(YV,{size:40,color:"var(--border)",style:{marginBottom:16}}),w.jsx("div",{style:{fontSize:16,fontWeight:600,marginBottom:8,color:"var(--text)"},children:"No projects yet"}),w.jsx("div",{style:{fontSize:13,maxWidth:360,margin:"0 auto",lineHeight:1.6},children:"Start a Claude Code session in any project to begin tracking. ClaudeContext will automatically capture sessions when hooks fire."}),w.jsx("div",{style:{marginTop:20,padding:"12px 16px",background:"var(--surface2)",borderRadius:8,display:"inline-block",fontFamily:"monospace",fontSize:12},children:"claudectx install"})]})}const Uie="modulepreload",Hie=function(r){return"/"+r},Ik={},n1=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=o?.nonce||o?.getAttribute("nonce");i=Promise.allSettled(t.map(c=>{if(c=Hie(c),c in Ik)return;Ik[c]=!0;const h=c.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":Uie,h||(v.as="script"),v.crossOrigin="",v.href=c,u&&v.setAttribute("nonce",u),document.head.appendChild(v),h)return new Promise((y,g)=>{v.addEventListener("load",y),v.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return i.then(o=>{for(const u of o||[])u.status==="rejected"&&a(u.reason);return e().catch(a)})},Wie={completed:{bg:"#16301e",color:"#22c55e",label:"Completed"},in_progress:{bg:"#2d2505",color:"#eab308",label:"In Progress"},blocked:{bg:"#2d0808",color:"#ef4444",label:"Blocked"},active:{bg:"#0f1f3d",color:"#60a5fa",label:"Active"},compacted:{bg:"#1e1e24",color:"#7a7a99",label:"Compacted"},error:{bg:"#2d0808",color:"#ef4444",label:"Error"}};function uY({status:r}){const e=Wie[r]||{bg:"#1e1e24",color:"#7a7a99",label:r},t=r==="active";return w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:20,background:e.bg,color:e.color,fontSize:11,fontWeight:600,letterSpacing:"0.02em",textTransform:"uppercase"},children:[t&&w.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:e.color,display:"inline-block",animation:"pulse 1.5s infinite"}}),e.label,w.jsx("style",{children:`
|
|
423
|
+
@keyframes pulse {
|
|
424
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
425
|
+
50% { opacity: 0.5; transform: scale(0.8); }
|
|
426
|
+
}
|
|
427
|
+
`})]})}function Gie({checked:r,onChange:e,disabled:t}){return w.jsx("button",{onClick:n=>{n.preventDefault(),n.stopPropagation(),t||e(!r)},disabled:t,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,background:"transparent",color:r?"var(--accent)":"var(--text-muted)",border:"none",cursor:t?"not-allowed":"pointer",transition:"color 0.15s"},onMouseEnter:n=>{t||(n.currentTarget.style.color="var(--accent)")},onMouseLeave:n=>{t||(n.currentTarget.style.color=r?"var(--accent)":"var(--text-muted)")},children:r?w.jsx(y1,{size:18}):w.jsx(JV,{size:18})})}const Vie={productive:tne,frustrated:Sre,exploratory:HO,debugging:dl,blocked:Tf},Yie={trivial:"var(--green)",simple:"var(--green)",moderate:"var(--yellow)",complex:"var(--orange)",very_complex:"var(--red)"};function Kie({session:r,onSessionUpdated:e,selectionMode:t,selected:n,onSelectionChange:i}){const[a,o]=he.useState(!1),[u,c]=he.useState(!1),[h,f]=he.useState(!1),[v,y]=he.useState(!1),[g,_]=he.useState(!1),[E,A]=he.useState(!1),[T,C]=he.useState(!1),N=new Date(r.started_at*1e3),k=r.duration_seconds?Math.floor(r.duration_seconds/60):r.ended_at?Math.floor((r.ended_at-r.started_at)/60):null,j=Array.isArray(r.summary_files_changed)?r.summary_files_changed:[],W=r.summary_mood?Vie[r.summary_mood]:null,G=r.summary_complexity?Yie[r.summary_complexity]:"var(--text-muted)",D=r.status==="active"||!r.status||r.summary_status&&r.summary_status.toLowerCase()==="in_progress",M=!!r.summary_title,U=async J=>{J.preventDefault(),J.stopPropagation(),f(!0);try{await Or.toggleBookmark(r.id,!r.is_bookmarked),e&&e()}catch(le){at.error("Failed to update bookmark: "+le)}finally{f(!1)}},I=async J=>{J.preventDefault(),J.stopPropagation(),C(!0)},q=async()=>{C(!1),o(!0);const J=at.loading("Ending session...");try{await Or.forceEndSession(r.id),at.dismiss(J),at.success("Session ended successfully"),e&&setTimeout(()=>e(),1e3)}catch(le){at.dismiss(J),at.error("Failed to end session: "+le)}finally{o(!1)}},z=async J=>{J.preventDefault(),J.stopPropagation(),A(!0)},Q=async J=>{J.preventDefault(),J.stopPropagation(),y(!0);try{await Or.toggleArchive(r.id,!r.is_archived),at.success(r.is_archived?"Session unarchived":"Session archived"),e&&e()}catch(le){at.error("Failed to update archive status: "+le)}finally{y(!1)}},ce=async J=>{J.preventDefault(),J.stopPropagation(),_(!0);const le=at.loading(M?"Resyncing summary...":"Syncing summary...");try{M?await Or.resyncSession(r.id):await Or.syncSession(r.id),at.dismiss(le),at.success("Session queued for summarization"),e&&setTimeout(()=>e(),2e3)}catch(ye){at.dismiss(le),at.error("Failed to sync: "+ye)}finally{_(!1)}},re=async()=>{A(!1),c(!0);const J=at.loading("Deleting session...");try{await Or.deleteSession(r.id),at.dismiss(J),at.success("Session deleted successfully"),e&&setTimeout(()=>e(),500)}catch(le){at.dismiss(J),at.error("Failed to delete session: "+le)}finally{c(!1)}};return w.jsxs(w.Fragment,{children:[w.jsx(cl,{to:`/session/${r.id}`,style:{display:"block"},children:w.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s, background 0.15s"},onMouseEnter:J=>{J.currentTarget.style.borderColor="var(--accent)",J.currentTarget.style.background="var(--surface2)"},onMouseLeave:J=>{J.currentTarget.style.borderColor="var(--border)",J.currentTarget.style.background="var(--surface)"},children:w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[t&&w.jsx("div",{style:{paddingTop:2,marginRight:8},children:w.jsx(Gie,{checked:n||!1,onChange:J=>i?.(J)})}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[w.jsx("div",{style:{fontWeight:600,fontSize:14,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:r.summary_title||"Session "+r.id.slice(0,8)}),W&&w.jsx(W,{size:14,style:{color:"var(--text-muted)",flexShrink:0}})]}),r.summary_what_we_did&&Array.isArray(r.summary_what_we_did)&&w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8},children:r.summary_what_we_did[0]}),r.summary_key_insight&&w.jsxs("div",{style:{fontSize:11,color:"var(--accent)",marginBottom:8,display:"flex",alignItems:"center",gap:4},children:[w.jsx(Mv,{size:11}),r.summary_key_insight]}),w.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[w.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[w.jsx(fl,{size:11}),lY(N,{addSuffix:!0})]}),k!==null&&w.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:[k,"m"]}),r.summary_complexity&&w.jsx("span",{style:{fontSize:10,color:G,padding:"2px 6px",background:`${G}15`,borderRadius:4,fontWeight:600},children:r.summary_complexity.replace("_"," ")}),r.total_tool_calls>0&&w.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[w.jsx(dl,{size:11}),r.total_tool_calls," calls"]}),j.length>0&&w.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[w.jsx(Ms,{size:11}),j.length," files"]})]})]}),w.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[w.jsx("button",{onClick:U,disabled:h,title:r.is_bookmarked?"Remove bookmark":"Bookmark session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:r.is_bookmarked?"var(--yellow)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:h?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{h||(J.currentTarget.style.background="var(--yellow)15",J.currentTarget.style.color="var(--yellow)",J.currentTarget.style.borderColor="var(--yellow)30")},onMouseLeave:J=>{h||(J.currentTarget.style.background="transparent",J.currentTarget.style.color=r.is_bookmarked?"var(--yellow)":"var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:w.jsx(eY,{size:14,fill:r.is_bookmarked?"var(--yellow)":"none"})}),w.jsx("button",{onClick:Q,disabled:v,title:r.is_archived?"Unarchive session":"Archive session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:r.is_archived?"var(--blue)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:v?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{v||(J.currentTarget.style.background="var(--blue)15",J.currentTarget.style.color="var(--blue)",J.currentTarget.style.borderColor="var(--blue)30")},onMouseLeave:J=>{v||(J.currentTarget.style.background="transparent",J.currentTarget.style.color=r.is_archived?"var(--blue)":"var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:r.is_archived?w.jsx(Lte,{size:14}):w.jsx(Bte,{size:14})}),D&&w.jsxs("button",{onClick:I,disabled:a,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:a?"var(--surface)":"var(--green)15",color:a?"var(--text-muted)":"var(--green)",border:"1px solid",borderColor:a?"var(--border)":"var(--green)30",borderRadius:6,fontSize:11,fontWeight:600,cursor:a?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{a||(J.currentTarget.style.background="var(--green)25")},onMouseLeave:J=>{a||(J.currentTarget.style.background="var(--green)15")},children:[w.jsx(Pc,{size:12}),a?"Ending...":"Force End"]}),w.jsxs("button",{onClick:ce,disabled:g||!r.transcript_path,title:M?"Resync summary":"Sync summary",style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:g?"var(--surface)":"var(--blue)15",color:g?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:g?"var(--border)":"var(--blue)30",borderRadius:6,fontSize:11,fontWeight:600,cursor:g||!r.transcript_path?"not-allowed":"pointer",transition:"all 0.15s",opacity:r.transcript_path?1:.5},onMouseEnter:J=>{!g&&r.transcript_path&&(J.currentTarget.style.background="var(--blue)25")},onMouseLeave:J=>{g||(J.currentTarget.style.background="var(--blue)15")},children:[w.jsx(xc,{size:12}),g?"Syncing...":M?"Resync":"Sync"]}),w.jsx("button",{onClick:z,disabled:u,title:"Delete session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:u?"var(--surface)":"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:u?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{u||(J.currentTarget.style.background="var(--red)15",J.currentTarget.style.color="var(--red)",J.currentTarget.style.borderColor="var(--red)30")},onMouseLeave:J=>{u||(J.currentTarget.style.background="transparent",J.currentTarget.style.color="var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:w.jsx(rY,{size:14})}),w.jsx(uY,{status:r.summary_status||r.status})]})]})})}),w.jsx(x1,{isOpen:T,title:"Force End Session",message:"This will mark the session as completed and trigger AI summarization. The session will be processed and added to your project history.",confirmText:"Force End",cancelText:"Cancel",confirmColor:"var(--green)",onConfirm:q,onCancel:()=>C(!1)}),w.jsx(x1,{isOpen:E,title:"Delete Session",message:"This will permanently remove the session and all its data including observations, preferences, knowledge, and tasks. This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",confirmColor:"var(--red)",onConfirm:re,onCancel:()=>A(!1)})]})}function Xie({selectedCount:r,onBulkDelete:e,onBulkBookmark:t,onBulkTag:n,onBulkExport:i,onClearSelection:a}){return r===0?null:w.jsxs("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"12px 20px",display:"flex",alignItems:"center",gap:16,boxShadow:"0 8px 24px rgba(0, 0, 0, 0.3)",zIndex:1e3},children:[w.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"var(--text)"},children:[r," selected"]}),w.jsxs("div",{style:{display:"flex",gap:8},children:[w.jsxs("button",{onClick:t,title:"Bookmark selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--yellow)15",color:"var(--yellow)",border:"1px solid var(--yellow)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>o.currentTarget.style.background="var(--yellow)25",onMouseLeave:o=>o.currentTarget.style.background="var(--yellow)15",children:[w.jsx(eY,{size:14}),"Bookmark"]}),w.jsxs("button",{onClick:n,title:"Tag selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--accent)15",color:"var(--accent)",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>o.currentTarget.style.background="var(--accent)25",onMouseLeave:o=>o.currentTarget.style.background="var(--accent)15",children:[w.jsx(tY,{size:14}),"Tag"]}),w.jsxs("button",{onClick:i,title:"Export as ZIP",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--blue)15",color:"var(--blue)",border:"1px solid var(--blue)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>o.currentTarget.style.background="var(--blue)25",onMouseLeave:o=>o.currentTarget.style.background="var(--blue)15",children:[w.jsx(F1,{size:14}),"Export ZIP"]}),w.jsxs("button",{onClick:e,title:"Delete selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>o.currentTarget.style.background="var(--red)25",onMouseLeave:o=>o.currentTarget.style.background="var(--red)15",children:[w.jsx(rY,{size:14}),"Delete"]})]}),w.jsx("button",{onClick:a,title:"Clear selection",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background="var(--surface2)",o.currentTarget.style.color="var(--text)"},onMouseLeave:o=>{o.currentTarget.style.background="transparent",o.currentTarget.style.color="var(--text-muted)"},children:w.jsx(ds,{size:16})})]})}const Pk=["#7c6cfc","#3b82f6","#22c55e","#eab308","#f97316","#ef4444","#ec4899","#8b5cf6"];function cY({sessionId:r,projectId:e,sessionTags:t,onUpdate:n}){const[i,a]=he.useState(!1),[o,u]=he.useState(""),[c,h]=he.useState(!1),[f,v]=he.useState(Pk[0]),y=he.useRef(null),g=Qv(),{data:_=[]}=ya({queryKey:["tags",e],queryFn:()=>Or.getTags(e),enabled:!!e}),E=bv({mutationFn:({tagId:j})=>Or.addSessionTag(r,j),onSuccess:()=>{g.invalidateQueries({queryKey:["session",r]}),n&&n(),u("")},onError:j=>at.error("Failed to add tag: "+j)}),A=bv({mutationFn:({tagId:j})=>Or.removeSessionTag(r,j),onSuccess:()=>{g.invalidateQueries({queryKey:["session",r]}),n&&n()},onError:j=>at.error("Failed to remove tag: "+j)}),T=bv({mutationFn:({name:j,color:W})=>Or.createTag(e,j,W),onSuccess:j=>{g.invalidateQueries({queryKey:["tags",e]}),E.mutate({tagId:j.id}),u(""),h(!1)},onError:j=>at.error("Failed to create tag: "+j)}),C=_.filter(j=>j.name.toLowerCase().includes(o.toLowerCase())&&!t.some(W=>W.id===j.id)),N=()=>{o.trim()&&T.mutate({name:o.trim(),color:f})},k=_.find(j=>j.name.toLowerCase()===o.toLowerCase());return he.useEffect(()=>{i&&y.current&&y.current.focus()},[i]),w.jsxs("div",{style:{position:"relative"},children:[w.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,alignItems:"center"},children:[t.map(j=>w.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:j.color?`${j.color}15`:"var(--surface2)",border:"1px solid",borderColor:j.color?`${j.color}30`:"var(--border)",borderRadius:6,fontSize:12,color:j.color||"var(--text)"},children:[w.jsx(tY,{size:11}),j.name,w.jsx("button",{onClick:()=>A.mutate({tagId:j.id}),style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",color:"inherit",opacity:.6},children:w.jsx(ds,{size:12})})]},j.id)),w.jsxs("button",{onClick:()=>a(!i),style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:12,color:"var(--text-muted)",cursor:"pointer"},children:[w.jsx(Sk,{size:12}),"Add tag"]})]}),i&&w.jsxs("div",{style:{position:"absolute",top:"100%",left:0,marginTop:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:12,minWidth:280,maxWidth:400,zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},children:[w.jsx("input",{ref:y,type:"text",value:o,onChange:j=>u(j.target.value),placeholder:"Search or create tag...",style:{width:"100%",padding:"8px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)",marginBottom:8},onKeyDown:j=>{j.key==="Enter"&&o&&!k&&N(),j.key==="Escape"&&a(!1)}}),w.jsx("div",{style:{maxHeight:200,overflowY:"auto"},children:C.length>0?C.map(j=>w.jsxs("button",{onClick:()=>E.mutate({tagId:j.id}),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"transparent",border:"none",borderRadius:6,fontSize:13,color:"var(--text)",cursor:"pointer",textAlign:"left"},onMouseEnter:W=>W.currentTarget.style.background="var(--surface2)",onMouseLeave:W=>W.currentTarget.style.background="transparent",children:[w.jsx("div",{style:{width:12,height:12,borderRadius:3,background:j.color||"var(--border)"}}),j.name]},j.id)):o&&!k?w.jsxs("div",{children:[w.jsxs("button",{onClick:()=>h(!c),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:6,fontSize:13,color:"var(--accent)",cursor:"pointer",marginBottom:c?8:0},children:[w.jsx(Sk,{size:14}),'Create "',o,'"']}),c&&w.jsxs("div",{style:{padding:"8px 0"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:6},children:"Choose color:"}),w.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:Pk.map(j=>w.jsx("button",{onClick:()=>{v(j),N()},style:{width:24,height:24,borderRadius:4,background:j,border:f===j?"2px solid var(--text)":"none",cursor:"pointer"}},j))})]})]}):w.jsx("div",{style:{padding:"8px 10px",fontSize:12,color:"var(--text-muted)"},children:o?"No matching tags":"Start typing to search or create"})})]})]})}function Qie({isOpen:r,sessionIds:e,onClose:t,onComplete:n}){const[i,a]=he.useState([]),[o,u]=he.useState(!1);if(!r)return null;const c=async()=>{if(i.length===0){at.error("Please select at least one tag");return}u(!0);const h=at.loading(`Tagging ${e.length} sessions...`);try{await Promise.all(e.map(f=>Promise.all(i.map(v=>fetch(`/api/sessions/${f}/tags`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag_id:v.id})}))))),at.dismiss(h),at.success(`Tagged ${e.length} sessions`),n(),t()}catch(f){at.dismiss(h),at.error("Failed to tag sessions: "+f)}finally{u(!1)}};return w.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e3},children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,width:"90%",maxWidth:500},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[w.jsxs("h3",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:["Tag ",e.length," Sessions"]}),w.jsx("button",{onClick:t,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4},children:w.jsx(ds,{size:20})})]}),w.jsxs("div",{style:{marginBottom:20},children:[w.jsx("label",{style:{display:"block",fontSize:13,fontWeight:600,color:"var(--text)",marginBottom:8},children:"Select Tags"}),w.jsx(cY,{selectedTags:i,onChange:a})]}),w.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[w.jsx("button",{onClick:t,disabled:o,style:{padding:"8px 16px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:o?"not-allowed":"pointer"},children:"Cancel"}),w.jsx("button",{onClick:c,disabled:o||i.length===0,style:{padding:"8px 16px",background:o||i.length===0?"var(--surface2)":"var(--accent)",color:o||i.length===0?"var(--text-muted)":"white",border:"none",borderRadius:8,fontSize:13,fontWeight:600,cursor:o||i.length===0?"not-allowed":"pointer"},children:o?"Tagging...":"Apply Tags"})]})]})})}function Zie({projectId:r}){const{data:e}=ya({queryKey:["sessions",r],queryFn:async()=>{const h=await fetch(`/api/sessions?project_id=${r}&limit=100`);if(!h.ok)throw new Error("Failed to fetch sessions");return h.json()}}),t=WO(new Date).getTime()/1e3,n=(e||[]).filter(h=>h.started_at>=t),i=n.reduce((h,f)=>h+(f.total_tool_calls||0),0),a=new Set(n.flatMap(h=>{try{const f=h.summary_files_changed;return Array.isArray(f)?f:typeof f=="string"?JSON.parse(f):[]}catch{return[]}})).size,o=n.reduce((h,f)=>{const v=f.duration_seconds?Math.floor(f.duration_seconds/60):f.ended_at?Math.floor((f.ended_at-f.started_at)/60):0;return h+v},0),u=Math.floor(o/60),c=o%60;return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:24},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:16},children:[w.jsx(m1,{size:18,style:{color:"var(--accent)"}}),w.jsx("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:"Today's Productivity"})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:16},children:[w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[w.jsx(m1,{size:14,style:{color:"var(--accent)"}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Sessions"})]}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:n.length})]}),w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[w.jsx(dl,{size:14,style:{color:"var(--blue)"}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Tool Calls"})]}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--blue)"},children:i})]}),w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[w.jsx(Ms,{size:14,style:{color:"var(--green)"}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Files Touched"})]}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--green)"},children:a})]}),w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[w.jsx(fl,{size:14,style:{color:"var(--orange)"}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Time Spent"})]}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--orange)"},children:u>0?`${u}h ${c}m`:`${c}m`})]})]})]})}function dY({onSearch:r,placeholder:e="Search sessions...",autoFocus:t}){const[n,i]=he.useState(""),a=he.useRef(),o=c=>{const h=c.target.value;i(h),clearTimeout(a.current),h.length>=2?a.current=setTimeout(()=>r(h),300):h.length===0&&r("")},u=()=>{i(""),r("")};return w.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:400},children:[w.jsx(L6,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"}}),w.jsx("input",{type:"text",value:n,onChange:o,placeholder:e,autoFocus:t,style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,fontWeight:500,outline:"none",transition:"all 0.15s"},onFocus:c=>{c.target.style.borderColor="var(--accent)",c.target.style.background="var(--surface)"},onBlur:c=>{c.target.style.borderColor="var(--border)",c.target.style.background="var(--surface2)"}}),n&&w.jsx("button",{onClick:u,style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background="var(--surface)",c.currentTarget.style.color="var(--text)"},onMouseLeave:c=>{c.currentTarget.style.background="transparent",c.currentTarget.style.color="var(--text-muted)"},children:w.jsx(ds,{size:14})})]})}function Jie({onDateRangeChange:r}){const[e,t]=he.useState(""),[n,i]=he.useState(""),a=h=>{t(h),h&&n?r(new Date(h),new Date(n)):!h&&!n&&r(null,null)},o=h=>{i(h),e&&h?r(new Date(e),new Date(h)):!e&&!h&&r(null,null)},u=()=>{t(""),i(""),r(null,null)},c=e||n;return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:"6px 10px",maxWidth:400},children:[w.jsx(m1,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),w.jsx("input",{type:"date",value:e,onChange:h=>a(h.target.value),placeholder:"Start date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),w.jsx("span",{style:{color:"var(--text-muted)",fontSize:13},children:"to"}),w.jsx("input",{type:"date",value:n,onChange:h=>o(h.target.value),placeholder:"End date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),c&&w.jsx("button",{onClick:u,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s",flexShrink:0},onMouseEnter:h=>{h.currentTarget.style.background="var(--surface)",h.currentTarget.style.color="var(--text)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent",h.currentTarget.style.color="var(--text-muted)"},children:w.jsx(ds,{size:14})})]})}function eae({viewMode:r,onToggle:e}){return w.jsxs("div",{style:{display:"flex",gap:4,background:"var(--surface2)",padding:4,borderRadius:8,border:"1px solid var(--border)"},children:[w.jsxs("button",{onClick:()=>e("card"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:r==="card"?"var(--surface)":"transparent",color:r==="card"?"var(--text)":"var(--text-muted)",border:r==="card"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:t=>{r!=="card"&&(t.currentTarget.style.background="var(--surface)")},onMouseLeave:t=>{r!=="card"&&(t.currentTarget.style.background="transparent")},children:[w.jsx(Rre,{size:16}),"Cards"]}),w.jsxs("button",{onClick:()=>e("table"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:r==="table"?"var(--surface)":"transparent",color:r==="table"?"var(--text)":"var(--text-muted)",border:r==="table"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:t=>{r!=="table"&&(t.currentTarget.style.background="var(--surface)")},onMouseLeave:t=>{r!=="table"&&(t.currentTarget.style.background="transparent")},children:[w.jsx(Pre,{size:16}),"Table"]}),w.jsxs("button",{onClick:()=>e("timeline"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:r==="timeline"?"var(--surface)":"transparent",color:r==="timeline"?"var(--text)":"var(--text-muted)",border:r==="timeline"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:t=>{r!=="timeline"&&(t.currentTarget.style.background="var(--surface)")},onMouseLeave:t=>{r!=="timeline"&&(t.currentTarget.style.background="transparent")},children:[w.jsx(fl,{size:16}),"Timeline"]})]})}function tae({sessions:r,selectionMode:e,selectedSessions:t,onSelectionChange:n}){const i=$f(),[a,o]=he.useState("date"),[u,c]=he.useState("desc"),h=g=>{a===g?c(u==="asc"?"desc":"asc"):(o(g),c("desc"))},f=[...r].sort((g,_)=>{let E=0;if(a==="date")E=g.started_at-_.started_at;else if(a==="title"){const A=(g.summary_title||"").toLowerCase(),T=(_.summary_title||"").toLowerCase();E=A.localeCompare(T)}else if(a==="duration"){const A=g.ended_at?g.ended_at-g.started_at:0,T=_.ended_at?_.ended_at-_.started_at:0;E=A-T}return u==="asc"?E:-E}),v=g=>{const _=Math.floor(g/3600),E=Math.floor(g%3600/60);return _>0?`${_}h ${E}m`:`${E}m`},y=({field:g})=>a!==g?null:u==="asc"?w.jsx(Vte,{size:12}):w.jsx(zte,{size:12});return w.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,overflow:"hidden"},children:w.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[w.jsx("thead",{children:w.jsxs("tr",{style:{background:"var(--surface2)",borderBottom:"1px solid var(--border)"},children:[e&&w.jsx("th",{style:{padding:"12px 16px",textAlign:"left",width:40},children:w.jsx("input",{type:"checkbox",checked:t.size===r.length&&r.length>0,onChange:g=>{r.forEach(_=>n(_.id,g.target.checked))},style:{cursor:"pointer"}})}),w.jsx("th",{onClick:()=>h("date"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:140},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Date ",w.jsx(y,{field:"date"})]})}),w.jsx("th",{onClick:()=>h("title"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Title ",w.jsx(y,{field:"title"})]})}),w.jsx("th",{onClick:()=>h("duration"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:100},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Duration ",w.jsx(y,{field:"duration"})]})}),w.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Files"}),w.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Tools"}),w.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:100},children:"Status"})]})}),w.jsx("tbody",{children:f.map((g,_)=>{const E=g.ended_at?g.ended_at-g.started_at:0,A=Array.isArray(g.summary_files_changed)?g.summary_files_changed.length:0,T=g.tool_use_count||0,C=g.status==="completed";return w.jsxs("tr",{onClick:N=>{e?n(g.id,!t.has(g.id)):i(`/session/${g.id}`)},style:{borderBottom:_<f.length-1?"1px solid var(--border)":"none",cursor:"pointer",transition:"background 0.15s"},onMouseEnter:N=>{N.currentTarget.style.background="var(--surface2)"},onMouseLeave:N=>{N.currentTarget.style.background="transparent"},children:[e&&w.jsx("td",{style:{padding:"12px 16px"},children:w.jsx("input",{type:"checkbox",checked:t.has(g.id),onChange:N=>{N.stopPropagation(),n(g.id,N.target.checked)},onClick:N=>N.stopPropagation(),style:{cursor:"pointer"}})}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:new Date(g.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13,fontWeight:500,color:"var(--text)"},children:g.summary_title||"Untitled Session"}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[w.jsx(fl,{size:14}),E>0?v(E):"-"]})}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[w.jsx(Ms,{size:14}),A]})}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[w.jsx(dl,{size:14}),T]})}),w.jsx("td",{style:{padding:"12px 16px",fontSize:13},children:w.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 10px",background:C?"var(--green)15":"var(--orange)15",color:C?"var(--green)":"var(--orange)",borderRadius:6,fontSize:12,fontWeight:600},children:[C?w.jsx(Pc,{size:12}):w.jsx(WV,{size:12}),C?"Done":"Active"]})})]},g.id)})})]})})}function rae({sessions:r,onDateClick:e,selectedDate:t}){const[n,i]=he.useState(new Date),a=N=>{const k=N.getFullYear(),j=N.getMonth(),W=new Date(k,j,1),D=new Date(k,j+1,0).getDate(),M=W.getDay();return{daysInMonth:D,startingDayOfWeek:M,year:k,month:j}},o=N=>{const k=N.toDateString();return r.filter(j=>new Date(j.started_at*1e3).toDateString()===k)},{daysInMonth:u,startingDayOfWeek:c,year:h,month:f}=a(n),v=()=>{i(new Date(h,f-1,1))},y=()=>{i(new Date(h,f+1,1))},g=new Date,_=N=>g.getDate()===N&&g.getMonth()===f&&g.getFullYear()===h,E=(N,k)=>N?N.toDateString()===k.toDateString():!1,A=["January","February","March","April","May","June","July","August","September","October","November","December"],T=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],C=[];for(let N=0;N<c;N++)C.push(w.jsx("div",{style:{padding:8}},`empty-${N}`));for(let N=1;N<=u;N++){const k=new Date(h,f,N),j=o(k),W=j.length>0,G=E(t,k),D=_(N);C.push(w.jsxs("div",{onClick:()=>e(k),style:{padding:8,minHeight:60,background:G?"var(--accent)15":"transparent",border:"1px solid",borderColor:D?"var(--accent)":"var(--border)",borderRadius:8,cursor:W?"pointer":"default",transition:"all 0.15s",display:"flex",flexDirection:"column",gap:4},onMouseEnter:M=>{W&&(M.currentTarget.style.background=G?"var(--accent)20":"var(--surface2)")},onMouseLeave:M=>{M.currentTarget.style.background=G?"var(--accent)15":"transparent"},children:[w.jsx("div",{style:{fontSize:13,fontWeight:D?700:500,color:D?"var(--accent)":"var(--text)"},children:N}),W&&w.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,marginTop:"auto"},children:w.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--accent)",background:"var(--accent)15",padding:"2px 6px",borderRadius:4},children:j.length})})]},N))}return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[w.jsx("button",{onClick:v,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:N=>{N.currentTarget.style.background="var(--surface)"},onMouseLeave:N=>{N.currentTarget.style.background="var(--surface2)"},children:w.jsx(rre,{size:16})}),w.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:[A[f]," ",h]}),w.jsx("button",{onClick:y,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:N=>{N.currentTarget.style.background="var(--surface)"},onMouseLeave:N=>{N.currentTarget.style.background="var(--surface2)"},children:w.jsx(ire,{size:16})})]}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8,marginBottom:8},children:T.map(N=>w.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textAlign:"center",padding:"4px 0",textTransform:"uppercase",letterSpacing:"0.05em"},children:N},N))}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8},children:C}),t&&w.jsxs("div",{style:{marginTop:16,padding:"8px 12px",background:"var(--accent)10",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,color:"var(--text)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsxs("span",{children:["Showing sessions from ",w.jsx("strong",{children:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]}),w.jsx("button",{onClick:()=>e(t),style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:11,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:N=>{N.currentTarget.style.background="var(--surface)"},onMouseLeave:N=>{N.currentTarget.style.background="var(--surface2)"},children:"Clear"})]})]})}function nae({sessions:r}){const e=r.length,t=r.filter(k=>k.status==="completed").length,n=e>0?Math.round(t/e*100):0,i=r.reduce((k,j)=>j.ended_at?k+(j.ended_at-j.started_at):k,0),a=e>0?Math.round(i/e/60):0,o=new Set(r.flatMap(k=>Array.isArray(k.summary_files_changed)?k.summary_files_changed:[])).size,u=r.reduce((k,j)=>k+(j.tool_use_count||0),0),c={};r.forEach(k=>{k.tool_use_count>0&&(c.Read=(c.Read||0)+Math.floor(k.tool_use_count*.3),c.Edit=(c.Edit||0)+Math.floor(k.tool_use_count*.25),c.Bash=(c.Bash||0)+Math.floor(k.tool_use_count*.2),c.Write=(c.Write||0)+Math.floor(k.tool_use_count*.15),c.Grep=(c.Grep||0)+Math.floor(k.tool_use_count*.1))});const h=Object.entries(c).sort((k,j)=>j[1]-k[1]).slice(0,5),f=h.length>0?h[0][1]:1,v={};r.forEach(k=>{Array.isArray(k.summary_files_changed)&&k.summary_files_changed.forEach(j=>{v[j]=(v[j]||0)+1})});const y=Object.entries(v).sort((k,j)=>j[1]-k[1]).slice(0,10),g=y.length>0?y[0][1]:1,E=Date.now()/1e3-10080*60,A=r.filter(k=>k.started_at>=E),T={};A.forEach(k=>{const j=new Date(k.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});T[j]=(T[j]||0)+1});const C=[];for(let k=6;k>=0;k--){const W=new Date(Date.now()-k*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});C.push({date:W,count:T[W]||0})}const N=Math.max(...C.map(k=>k.count),1);return w.jsxs("div",{style:{marginBottom:24},children:[w.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[w.jsx(q6,{size:20}),"Analytics Dashboard"]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(Pc,{size:16,style:{color:"var(--green)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Completion Rate"})]}),w.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[n,"%"]}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[t," of ",e," sessions"]})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(fl,{size:16,style:{color:"var(--blue)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Avg Duration"})]}),w.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[a,"m"]}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"per session"})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(Ms,{size:16,style:{color:"var(--purple)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:o}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"unique files"})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(dl,{size:16,style:{color:"var(--orange)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:u}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[w.jsx(_c,{size:16}),"Last 7 Days Activity"]}),w.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:C.map((k,j)=>w.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[w.jsx("div",{style:{width:"100%",height:Math.max(k.count/N*100,4),background:k.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:k.count>0&&w.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:k.count})}),w.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:k.date.split(" ")[1]})]},j))})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[w.jsx(dl,{size:16}),"Top Tools Used"]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:h.map(([k,j])=>w.jsxs("div",{children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[w.jsx("span",{style:{fontSize:13,fontWeight:500},children:k}),w.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:j})]}),w.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:w.jsx("div",{style:{width:`${j/f*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},k))})]})]}),y.length>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginTop:16},children:[w.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[w.jsx(Ms,{size:16}),"Most Edited Files"]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:y.map(([k,j])=>w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",background:"var(--surface2)",borderRadius:8},children:[w.jsx("div",{style:{flex:1,fontSize:12,fontFamily:"monospace",color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[w.jsx("div",{style:{width:100,height:6,background:"var(--surface)",borderRadius:3,overflow:"hidden"},children:w.jsx("div",{style:{width:`${j/g*100}%`,height:"100%",background:"var(--purple)",transition:"width 0.3s"}})}),w.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",minWidth:30,textAlign:"right"},children:j})]})]},k))})]})]})}function iae({sessions:r}){const e=[...r].filter(_=>_.started_at).sort((_,E)=>E.started_at-_.started_at);if(e.length===0)return null;let t=0,n=0,i=0;const a=new Date;a.setHours(0,0,0,0);const o=new Set(e.map(_=>{const E=new Date(_.started_at*1e3);return E.setHours(0,0,0,0),E.getTime()})),u=Array.from(o).sort((_,E)=>E-_),c=a.getTime(),h=c-864e5;if(u.includes(c)||u.includes(h)){let _=u.includes(c)?c:h;for(;u.includes(_);)t++,_-=864e5}if(u.length>0){i=1,n=1;for(let _=1;_<u.length;_++)(u[_-1]-u[_])/864e5===1?(i++,n=Math.max(n,i)):i=1}let f={duration:0,title:"",date:0};r.forEach(_=>{if(_.ended_at){const E=_.ended_at-_.started_at;E>f.duration&&(f={duration:E,title:_.summary_title||"Untitled",date:_.started_at})}});let v={count:0,title:"",date:0};r.forEach(_=>{const E=Array.isArray(_.summary_files_changed)?_.summary_files_changed.length:0;E>v.count&&(v={count:E,title:_.summary_title||"Untitled",date:_.started_at})});const y=_=>{const E=Math.floor(_/3600),A=Math.floor(_%3600/60);return E>0?`${E}h ${A}m`:`${A}m`},g=_=>new Date(_*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:16,marginBottom:24},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(VV,{size:16,style:{color:t>0?"var(--orange)":"var(--text-muted)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:t>0?"var(--orange)":"var(--text)"},children:t}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[t===1?"day":"days"," in a row"]})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(_c,{size:16,style:{color:"var(--accent)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Streak"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:n}),w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[n===1?"day":"days"," record"]})]}),f.duration>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(fl,{size:16,style:{color:"var(--blue)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Session"})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:y(f.duration)}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.title}),w.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:g(f.date)})]}),v.count>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(Ms,{size:16,style:{color:"var(--purple)"}}),w.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Most Files Changed"})]}),w.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:[v.count," files"]}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.title}),w.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:g(v.date)})]})]})}function Lm({label:r,options:e,selected:t,onChange:n,placeholder:i}){const[a,o]=he.useState(!1),u=he.useRef(null);he.useEffect(()=>{const f=v=>{u.current&&!u.current.contains(v.target)&&o(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const c=f=>{t.includes(f)?n(t.filter(v=>v!==f)):n([...t,f])},h=()=>{n([])};return w.jsxs("div",{ref:u,style:{position:"relative",minWidth:200},children:[w.jsxs("button",{onClick:()=>o(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 12px",background:t.length>0?"var(--accent)15":"var(--surface2)",color:t.length>0?"var(--accent)":"var(--text)",border:"1px solid",borderColor:t.length>0?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s",width:"100%"},onMouseEnter:f=>{t.length===0&&(f.currentTarget.style.background="var(--surface)")},onMouseLeave:f=>{t.length===0&&(f.currentTarget.style.background="var(--surface2)")},children:[w.jsx("span",{children:t.length>0?`${r} (${t.length})`:i||r}),w.jsx(ere,{size:14,style:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),a&&w.jsxs("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,maxHeight:300,overflowY:"auto"},children:[t.length>0&&w.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[t.length," selected"]}),w.jsxs("button",{onClick:h,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,fontSize:11,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:f=>{f.currentTarget.style.background="var(--surface2)",f.currentTarget.style.color="var(--text)"},onMouseLeave:f=>{f.currentTarget.style.background="transparent",f.currentTarget.style.color="var(--text-muted)"},children:[w.jsx(ds,{size:12}),"Clear"]})]}),e.map(f=>w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",cursor:"pointer",transition:"background 0.15s",fontSize:13},onMouseEnter:v=>{v.currentTarget.style.background="var(--surface2)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent"},children:[w.jsx("input",{type:"checkbox",checked:t.includes(f),onChange:()=>c(f),style:{cursor:"pointer"}}),w.jsx("span",{style:{color:"var(--text)"},children:f})]},f))]})]})}function aae({sessions:r,selectionMode:e,selectedSessions:t,onSelectionChange:n}){const i=$f(),a=[...r].sort((h,f)=>f.started_at-h.started_at),o={};a.forEach(h=>{const f=new Date(h.started_at*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});o[f]||(o[f]=[]),o[f].push(h)});const u=h=>new Date(h*1e3).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),c=h=>{const f=Math.floor(h/3600),v=Math.floor(h%3600/60);return f>0?`${f}h ${v}m`:`${v}m`};return w.jsx("div",{style:{position:"relative"},children:Object.entries(o).map(([h,f],v)=>w.jsxs("div",{style:{marginBottom:40},children:[w.jsx("div",{style:{position:"sticky",top:0,background:"var(--background)",zIndex:10,paddingBottom:12,marginBottom:20},children:w.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)",display:"flex",alignItems:"center",gap:12},children:[w.jsx("div",{style:{width:12,height:12,borderRadius:"50%",background:"var(--accent)"}}),h,w.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"var(--text-muted)",marginLeft:8},children:[f.length," ",f.length===1?"session":"sessions"]})]})}),w.jsxs("div",{style:{position:"relative",paddingLeft:40},children:[w.jsx("div",{style:{position:"absolute",left:5,top:0,bottom:v===Object.keys(o).length-1?"50%":0,width:2,background:"var(--border)"}}),f.map((y,g)=>{const _=y.ended_at?y.ended_at-y.started_at:0,E=Array.isArray(y.summary_files_changed)?y.summary_files_changed.length:0,A=y.tool_use_count||0,T=y.status==="completed";return w.jsxs("div",{style:{position:"relative",marginBottom:g<f.length-1?24:0},children:[w.jsx("div",{style:{position:"absolute",left:-34,top:20,width:12,height:12,borderRadius:"50%",background:T?"var(--green)":"var(--orange)",border:"3px solid var(--background)",zIndex:1}}),w.jsx("div",{onClick:C=>{e?n(y.id,!t.has(y.id)):i(`/session/${y.id}`)},style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:C=>{C.currentTarget.style.background="var(--surface2)",C.currentTarget.style.borderColor="var(--accent)30"},onMouseLeave:C=>{C.currentTarget.style.background="var(--surface)",C.currentTarget.style.borderColor="var(--border)"},children:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[e&&w.jsx("input",{type:"checkbox",checked:t.has(y.id),onChange:C=>{C.stopPropagation(),n(y.id,C.target.checked)},onClick:C=>C.stopPropagation(),style:{marginTop:4,cursor:"pointer"}}),w.jsxs("div",{style:{flex:1},children:[w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8,fontWeight:600},children:u(y.started_at)}),w.jsx("h4",{style:{fontSize:15,fontWeight:600,color:"var(--text)",marginBottom:8},children:y.summary_title||"Untitled Session"}),w.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)",marginBottom:8},children:[_>0&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[w.jsx(fl,{size:12}),c(_)]}),E>0&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[w.jsx(Ms,{size:12}),E," files"]}),A>0&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[w.jsx(dl,{size:12}),A," tools"]})]}),w.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:T?"var(--green)15":"var(--orange)15",color:T?"var(--green)":"var(--orange)",borderRadius:6,fontSize:11,fontWeight:600},children:[T?w.jsx(Pc,{size:10}):w.jsx(WV,{size:10}),T?"Completed":"Active"]})]})]})})]},y.id)})]})]},h))})}function sae({onOpenProject:r}){const{id:e}=R6(),[t,n]=he.useState(!1),[i,a]=he.useState(!1),[o,u]=he.useState(!1),[c,h]=he.useState(new Set),[f,v]=he.useState(!1),[y,g]=he.useState(!1),[_,E]=he.useState(!1),[A,T]=he.useState(""),[C,N]=he.useState({start:null,end:null}),[k,j]=he.useState([]),[W,G]=he.useState([]),[D,M]=he.useState([]),[U,I]=he.useState([]),[q,z]=he.useState(()=>{const fe=localStorage.getItem("sessionViewMode");return fe==="card"||fe==="table"||fe==="timeline"?fe:"card"}),[Q,ce]=he.useState(()=>localStorage.getItem("showCalendar")==="true"),[re,J]=he.useState(()=>localStorage.getItem("showAnalytics")==="true"),[le,ye]=he.useState(null),[Z,oe]=he.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:L,isLoading:Y}=ya({queryKey:["project",e],queryFn:()=>Or.getProject(e),enabled:!!e}),{data:te,refetch:de}=ya({queryKey:["sessions",e],queryFn:()=>Or.getSessions({project_id:e,limit:50}),enabled:!!e,refetchInterval:15e3}),{data:ue}=ya({queryKey:["health"],queryFn:Or.getHealth});he.useEffect(()=>{L&&e&&r(e,L.name)},[L,e,r]),he.useEffect(()=>{if(!e)return;let fe;try{fe=M6(),fe.onmessage=ke=>{try{const Be=JSON.parse(ke.data);(Be.type==="session_start"||Be.type==="session_end"||Be.type==="summary_ready")&&de()}catch{}},fe.onerror=()=>{console.log("[ProjectDetail] WebSocket error, falling back to polling")}}catch(ke){console.log("[ProjectDetail] WebSocket connection failed:",ke)}return()=>{fe?.close()}},[e,de]);const we=async()=>{if(!e)return;n(!0);const fe=at.loading("Consolidating memory...");try{await Or.consolidateMemory(e),at.dismiss(fe),at.success("Memory consolidation complete!")}catch(ke){at.dismiss(fe),at.error("Consolidation failed: "+ke)}finally{n(!1)}},Se=async(fe=!1)=>{e&&oe({isOpen:!0,title:fe?"Force Resync All Sessions":"Resync New Sessions",message:fe?"This will regenerate ALL summaries with v2.0 fields (mood, complexity, blockers, resolved, key insights). This may take several minutes. Continue?":'This will only process sessions without summaries. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:fe?"Force Resync":"Resync",confirmColor:fe?"var(--orange)":"var(--blue)",onConfirm:async()=>{oe({...Z,isOpen:!1}),a(!0);const ke=at.loading("Queueing sessions for resync...",0);try{const Be=await Or.resyncProject(e,fe);at.update(ke,`Queued ${Be.result.queued} sessions. Processing...`,50),setTimeout(()=>{at.dismiss(ke),at.success(Be.result.message)},2e3),de()}catch(Be){at.dismiss(ke),at.error("Resync failed: "+Be)}finally{a(!1)}}})},Ie=()=>{u(!o),h(new Set)},Le=()=>{c.size===qt.length?h(new Set):h(new Set(qt.map(fe=>fe.id)))},Ve=(fe,ke)=>{const Be=new Set(c);ke?Be.add(fe):Be.delete(fe),h(Be)},tt=()=>{oe({isOpen:!0,title:"Delete Sessions",message:`This will permanently delete ${c.size} sessions and all their data. This action cannot be undone.`,confirmText:"Delete",confirmColor:"var(--red)",onConfirm:async()=>{oe({...Z,isOpen:!1});const fe=at.loading(`Deleting ${c.size} sessions...`);try{await Promise.all(Array.from(c).map(ke=>Or.deleteSession(ke))),at.dismiss(fe),at.success(`Deleted ${c.size} sessions`),h(new Set),u(!1),de()}catch(ke){at.dismiss(fe),at.error("Failed to delete sessions: "+ke)}}})},Xe=async()=>{const fe=at.loading(`Bookmarking ${c.size} sessions...`);try{await Promise.all(Array.from(c).map(ke=>Or.toggleBookmark(ke,!0))),at.dismiss(fe),at.success(`Bookmarked ${c.size} sessions`),h(new Set),u(!1),de()}catch(ke){at.dismiss(fe),at.error("Failed to bookmark sessions: "+ke)}},dt=()=>{v(!0)},ne=async()=>{const fe=at.loading(`Exporting ${c.size} sessions...`);try{const ke=(await n1(async()=>{const{default:zt}=await import("./jszip.min-B4jg4J0T.js").then(Ht=>Ht.j);return{default:zt}},[])).default,Be=new ke,ht=Array.from(c).map(zt=>Or.getSession(zt));(await Promise.all(ht)).forEach(zt=>{const Ht=zt.summary_title||"Untitled Session",yr=`${new Date(zt.started_at*1e3).toISOString().split("T")[0]}_${Ht.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.md`,vs=`# ${Ht}
|
|
428
|
+
|
|
429
|
+
**Date:** ${new Date(zt.started_at*1e3).toLocaleString()}
|
|
430
|
+
**Status:** ${zt.status}
|
|
431
|
+
**Duration:** ${zt.ended_at?Math.round((zt.ended_at-zt.started_at)/60):0} minutes
|
|
432
|
+
|
|
433
|
+
## What We Did
|
|
434
|
+
${Array.isArray(zt.summary_what_we_did)?zt.summary_what_we_did.map(Cr=>`- ${Cr}`).join(`
|
|
435
|
+
`):"N/A"}
|
|
436
|
+
|
|
437
|
+
## Decisions Made
|
|
438
|
+
${Array.isArray(zt.summary_decisions)?zt.summary_decisions.map(Cr=>`- ${Cr}`).join(`
|
|
439
|
+
`):"N/A"}
|
|
440
|
+
|
|
441
|
+
## Files Changed
|
|
442
|
+
${Array.isArray(zt.summary_files_changed)?zt.summary_files_changed.map(Cr=>`- ${Cr}`).join(`
|
|
443
|
+
`):"N/A"}
|
|
444
|
+
|
|
445
|
+
## Next Steps
|
|
446
|
+
${Array.isArray(zt.summary_next_steps)?zt.summary_next_steps.map(Cr=>`- ${Cr}`).join(`
|
|
447
|
+
`):"N/A"}
|
|
448
|
+
|
|
449
|
+
## Gotchas
|
|
450
|
+
${Array.isArray(zt.summary_gotchas)?zt.summary_gotchas.map(Cr=>`- ${Cr}`).join(`
|
|
451
|
+
`):"N/A"}
|
|
452
|
+
`;Be.file(yr,vs)});const or=await Be.generateAsync({type:"blob"}),Ct=URL.createObjectURL(or),Mt=document.createElement("a");Mt.href=Ct,Mt.download=`sessions_export_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(Mt),Mt.click(),document.body.removeChild(Mt),URL.revokeObjectURL(Ct),at.dismiss(fe),at.success(`Exported ${c.size} sessions as ZIP`),h(new Set),u(!1)}catch(ke){at.dismiss(fe),at.error("Failed to export sessions: "+ke)}},et=()=>{h(new Set),u(!1),de()};if(ue?.uptime,Y)return w.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading..."});if(!L)return w.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Project not found"});const st=te||L.sessions||[],ot=st.map(fe=>({...fe,summary_what_we_did:ov(fe.summary_what_we_did),summary_decisions:ov(fe.summary_decisions),summary_files_changed:ov(fe.summary_files_changed),summary_next_steps:ov(fe.summary_next_steps),summary_gotchas:ov(fe.summary_gotchas)})),We=y?ot:ot.filter(fe=>!fe.is_archived),vt=_?We.filter(fe=>fe.is_bookmarked):We,it=A?vt.filter(fe=>{const ke=A.toLowerCase(),Be=(fe.summary_title||"").toLowerCase(),ht=Array.isArray(fe.summary_what_we_did)?fe.summary_what_we_did.join(" ").toLowerCase():"",lt=Array.isArray(fe.summary_files_changed)?fe.summary_files_changed.join(" ").toLowerCase():"";return Be.includes(ke)||ht.includes(ke)||lt.includes(ke)}):vt,yt=it.filter(fe=>{const ke=k.length===0||fe.summary_mood&&k.includes(fe.summary_mood),Be=W.length===0||fe.summary_complexity&&W.includes(fe.summary_complexity),ht=D.length===0||D.includes(fe.status);let lt=!0;return U.length>0&&Array.isArray(fe.summary_files_changed)&&(lt=fe.summary_files_changed.some(or=>U.some(Ct=>or.endsWith(Ct)))),ke&&Be&&ht&<}),ut=C.start||C.end?yt.filter(fe=>{const ke=new Date(fe.started_at*1e3),Be=!C.start||ke>=C.start,ht=!C.end||ke<=new Date(C.end.getTime()+864e5);return Be&&ht}):it,qt=le?ut.filter(fe=>new Date(fe.started_at*1e3).toDateString()===le.toDateString()):ut,Wt=new Set(ot.flatMap(fe=>Array.isArray(fe.summary_files_changed)?fe.summary_files_changed:[])).size,At=ot.filter(fe=>fe.is_archived).length,Tt=ot.filter(fe=>fe.is_bookmarked).length,It=(fe,ke)=>{N({start:fe,end:ke})},nt=fe=>{z(fe),localStorage.setItem("sessionViewMode",fe)},jt=()=>{const fe=!Q;ce(fe),localStorage.setItem("showCalendar",String(fe))},ze=()=>{const fe=!re;J(fe),localStorage.setItem("showAnalytics",String(fe))},Ke=fe=>{le&&le.toDateString()===fe.toDateString()?ye(null):ye(fe)};return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs(cl,{to:"/",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[w.jsx(D6,{size:13})," Back to Projects"]}),w.jsxs("div",{style:{marginBottom:24},children:[w.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:6},children:L.name}),L.git_remote&&w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:12},children:[w.jsx(XV,{size:12}),L.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")]}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:16},children:[w.jsx(KV,{size:12}),L.root_path]}),w.jsx("div",{style:{display:"flex",gap:20,marginBottom:16},children:[{label:"Sessions",value:st.length},{label:"Files Changed",value:Wt},{label:"Completed",value:st.filter(fe=>fe.status==="completed").length}].map(fe=>w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 16px"},children:[w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:fe.value}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:fe.label})]},fe.label))}),w.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[w.jsxs("button",{onClick:Ie,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:o?"var(--accent)":"var(--surface2)",color:o?"white":"var(--text)",border:"1px solid",borderColor:o?"var(--accent)":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{o||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{o||(fe.currentTarget.style.background="var(--surface2)")},children:[o?w.jsx(y1,{size:16}):w.jsx(JV,{size:16}),o?"Exit Selection":"Select Sessions"]}),o&&ot.length>0&&w.jsx("button",{onClick:Le,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:fe=>fe.currentTarget.style.background="var(--surface)",onMouseLeave:fe=>fe.currentTarget.style.background="var(--surface2)",children:c.size===We.length?"Deselect All":"Select All"}),w.jsxs(cl,{to:`/project/${e}/memory`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,textDecoration:"none",transition:"all 0.15s"},onMouseEnter:fe=>fe.currentTarget.style.background="var(--surface)",onMouseLeave:fe=>fe.currentTarget.style.background="var(--surface2)",children:[w.jsx(Pv,{size:16}),"View Memory"]}),w.jsxs("button",{onClick:()=>Se(!1),disabled:i,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:i?"var(--surface)":"var(--surface2)",color:i?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:i?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{i||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{i||(fe.currentTarget.style.background="var(--surface2)")},children:[w.jsx(xc,{size:16,style:{animation:i?"spin 1s linear infinite":"none"}}),i?"Resyncing...":"Resync New"]}),w.jsxs("button",{onClick:()=>Se(!0),disabled:i,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:i?"var(--surface)":"var(--surface2)",color:i?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:i?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{i||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{i||(fe.currentTarget.style.background="var(--surface2)")},children:[w.jsx(xc,{size:16,style:{animation:i?"spin 1s linear infinite":"none"}}),i?"Resyncing...":"Force Resync All"]}),w.jsxs("button",{onClick:we,disabled:t,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:t?"var(--surface)":"var(--surface2)",color:t?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:t?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{t||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{t||(fe.currentTarget.style.background="var(--surface2)")},children:[w.jsx(xc,{size:16,style:{animation:t?"spin 1s linear infinite":"none"}}),t?"Consolidating...":"Consolidate Memory"]}),At>0&&w.jsx("button",{onClick:()=>g(!y),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:y?"var(--accent)15":"var(--surface2)",color:y?"var(--accent)":"var(--text)",border:"1px solid",borderColor:y?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:y?"Hide Archived":`Show Archived (${At})`}),Tt>0&&w.jsx("button",{onClick:()=>E(!_),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:_?"var(--accent)15":"var(--surface2)",color:_?"var(--accent)":"var(--text)",border:"1px solid",borderColor:_?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:_?"Show All":`Show Bookmarked (${Tt})`}),w.jsxs("button",{onClick:jt,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:Q?"var(--accent)15":"var(--surface2)",color:Q?"var(--accent)":"var(--text)",border:"1px solid",borderColor:Q?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{Q||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{Q||(fe.currentTarget.style.background="var(--surface2)")},children:[w.jsx(m1,{size:16}),Q?"Hide Calendar":"Show Calendar"]}),w.jsxs("button",{onClick:ze,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:re?"var(--accent)15":"var(--surface2)",color:re?"var(--accent)":"var(--text)",border:"1px solid",borderColor:re?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:fe=>{re||(fe.currentTarget.style.background="var(--surface)")},onMouseLeave:fe=>{re||(fe.currentTarget.style.background="var(--surface2)")},children:[w.jsx(q6,{size:16}),re?"Hide Analytics":"Show Analytics"]})]})]}),ot.length===0?w.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions recorded yet"}):w.jsxs(w.Fragment,{children:[w.jsx(Zie,{projectId:e}),w.jsx(iae,{sessions:ot}),re&&w.jsx(nae,{sessions:ot}),Q&&w.jsx(rae,{sessions:ut,onDateClick:Ke,selectedDate:le}),w.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[w.jsx(dY,{onSearch:T,placeholder:"Search by title, content, or files..."}),w.jsx(Jie,{onDateRangeChange:It}),w.jsx(Lm,{label:"Mood",options:["productive","struggling","learning","blocked","flow"],selected:k,onChange:j,placeholder:"Filter by mood"}),w.jsx(Lm,{label:"Complexity",options:["simple","moderate","complex","very-complex"],selected:W,onChange:G,placeholder:"Filter by complexity"}),w.jsx(Lm,{label:"Status",options:["active","completed"],selected:D,onChange:M,placeholder:"Filter by status"}),w.jsx(Lm,{label:"Technology",options:[".ts",".tsx",".js",".jsx",".py",".go",".java",".rs",".md",".json"],selected:U,onChange:I,placeholder:"Filter by file type"}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsx(eae,{viewMode:q,onToggle:nt})})]}),w.jsxs("h2",{style:{fontSize:14,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:["Sessions (",qt.length,!y&&At>0?` • ${At} archived`:"",")",A&&` • Filtered by "${A}"`,(C.start||C.end)&&" • Date filtered",le&&` • ${qt.length} on ${le.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`,_&&" • Bookmarked only"]}),qt.length===0?w.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions match your filters"}):q==="table"?w.jsx(tae,{sessions:qt,selectionMode:o,selectedSessions:c,onSelectionChange:Ve}):q==="timeline"?w.jsx(aae,{sessions:qt,selectionMode:o,selectedSessions:c,onSelectionChange:Ve}):qt.map(fe=>w.jsx(Kie,{session:fe,onSessionUpdated:de,selectionMode:o,selected:c.has(fe.id),onSelectionChange:ke=>Ve(fe.id,ke)},fe.id))]}),w.jsx(x1,{isOpen:Z.isOpen,title:Z.title,message:Z.message,confirmText:Z.confirmText,cancelText:"Cancel",confirmColor:Z.confirmColor,onConfirm:Z.onConfirm,onCancel:()=>oe({...Z,isOpen:!1})}),w.jsx(Xie,{selectedCount:c.size,onBulkDelete:tt,onBulkBookmark:Xe,onBulkTag:dt,onBulkExport:ne,onClearSelection:()=>{h(new Set),u(!1)}}),w.jsx(Qie,{isOpen:f,sessionIds:Array.from(c),onClose:()=>v(!1),onComplete:et})]})}function ov(r){if(!r||Array.isArray(r))return r;try{return JSON.parse(r)}catch{return null}}function Jh({icon:r,title:e,items:t,color:n}){return!t||t.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[w.jsx(r,{size:14,color:n}),w.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),w.jsx("ul",{style:{paddingLeft:0,listStyle:"none"},children:t.map((i,a)=>w.jsxs("li",{style:{padding:"4px 0",fontSize:13,color:"var(--text)",display:"flex",gap:8,alignItems:"flex-start",borderBottom:a<t.length-1?"1px solid var(--border)":"none"},children:[w.jsx("span",{style:{color:n,marginTop:2,flexShrink:0},children:"•"}),w.jsx("span",{children:i})]},a))})]})}function oae(r){return w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[w.jsx(Jh,{icon:UO,title:"What We Did",items:r.summary_what_we_did,color:"var(--green)"}),w.jsx(Jh,{icon:XV,title:"Decisions Made",items:r.summary_decisions,color:"var(--accent)"}),w.jsx(Jh,{icon:Ms,title:"Files Changed",items:r.summary_files_changed,color:"var(--blue)"}),w.jsx(Jh,{icon:Wte,title:"Next Steps",items:r.summary_next_steps,color:"var(--yellow)"}),w.jsx(Jh,{icon:fne,title:"Gotchas",items:r.summary_gotchas,color:"var(--red)"}),w.jsx(Jh,{icon:dre,title:"Tech Notes",items:r.summary_tech_notes,color:"var(--text-muted)"})]})}const lae={tool_call:dl,file_edit:vre,user_message:QV,assistant_message:Pv,decision:Pv},uae={tool_call:"var(--accent)",file_edit:"var(--blue)",user_message:"var(--green)",assistant_message:"var(--text-muted)",decision:"var(--yellow)"};function cae({observations:r}){if(!r||r.length===0)return w.jsx("div",{style:{padding:"40px 0",textAlign:"center",color:"var(--text-muted)",fontSize:13},children:"No observations recorded"});const e=[...r].sort((t,n)=>n.created_at-t.created_at);return w.jsxs("div",{style:{position:"relative"},children:[w.jsx("div",{style:{position:"absolute",left:16,top:0,bottom:0,width:1,background:"var(--border)"}}),e.map((t,n)=>{const i=lae[t.event_type]||une,a=uae[t.event_type]||"var(--text-muted)",o=iu(new Date(t.created_at*1e3),"HH:mm:ss");return w.jsxs("div",{style:{display:"flex",gap:14,paddingLeft:0,marginBottom:12},children:[w.jsx("div",{style:{width:32,height:32,borderRadius:"50%",background:"var(--surface2)",border:`1px solid ${a}22`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,zIndex:1},children:w.jsx(i,{size:13,color:a})}),w.jsxs("div",{style:{flex:1,paddingTop:6},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:2},children:[w.jsx("span",{style:{fontSize:12,fontWeight:600,color:a},children:t.tool_name||t.event_type}),w.jsx("span",{style:{fontSize:11,color:"var(--text-muted)"},children:o})]}),t.content&&w.jsx("div",{style:{fontSize:12,color:"var(--text)",fontFamily:t.event_type==="tool_call"?"monospace":"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:t.content}),t.file_path&&w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",marginTop:2},children:t.file_path})]})]},t.id)})]})}function dae({text:r,label:e="Copy"}){const[t,n]=he.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(r),n(!0),setTimeout(()=>n(!1),2e3)}catch{}};return w.jsxs("button",{onClick:i,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:t?"var(--green)15":"var(--surface2)",color:t?"var(--green)":"var(--text)",border:"1px solid",borderColor:t?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t||(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t||(a.currentTarget.style.background="var(--surface2)")},children:[t?w.jsx(HV,{size:16}):w.jsx(GV,{size:16}),t?"Copied!":e]})}function hae({text:r,filename:e,label:t="Download"}){const n=()=>{const i=new Blob([r],{type:"text/markdown"}),a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)};return w.jsxs("button",{onClick:n,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:i=>{i.currentTarget.style.background="var(--surface)"},onMouseLeave:i=>{i.currentTarget.style.background="var(--surface2)"},children:[w.jsx(F1,{size:16}),t]})}function qr(r){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qr(r)}var wo=Uint8Array,cs=Uint16Array,B6=Int32Array,F6=new wo([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]),z6=new wo([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]),jk=new wo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hY=function(r,e){for(var t=new cs(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new B6(t[30]),n=1;n<30;++n)for(var a=t[n];a<t[n+1];++a)i[a]=a-t[n]<<5|n;return{b:t,r:i}},fY=hY(F6,2),fae=fY.b,GO=fY.r;fae[28]=258,GO[258]=28;var pae=hY(z6,0),Mk=pae.r,VO=new cs(32768);for(var ln=0;ln<32768;++ln){var fc=(ln&43690)>>1|(ln&21845)<<1;fc=(fc&52428)>>2|(fc&13107)<<2,fc=(fc&61680)>>4|(fc&3855)<<4,VO[ln]=((fc&65280)>>8|(fc&255)<<8)>>1}var _v=(function(r,e,t){for(var n=r.length,i=0,a=new cs(e);i<n;++i)r[i]&&++a[r[i]-1];var o=new cs(e);for(i=1;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var u;if(t){u=new cs(1<<e);var c=15-e;for(i=0;i<n;++i)if(r[i])for(var h=i<<4|r[i],f=e-r[i],v=o[r[i]-1]++<<f,y=v|(1<<f)-1;v<=y;++v)u[VO[v]>>c]=h}else for(u=new cs(n),i=0;i<n;++i)r[i]&&(u[i]=VO[o[r[i]-1]++]>>15-r[i]);return u}),kd=new wo(288);for(var ln=0;ln<144;++ln)kd[ln]=8;for(var ln=144;ln<256;++ln)kd[ln]=9;for(var ln=256;ln<280;++ln)kd[ln]=7;for(var ln=280;ln<288;++ln)kd[ln]=8;var _1=new wo(32);for(var ln=0;ln<32;++ln)_1[ln]=5;var vae=_v(kd,9,0),gae=_v(_1,5,0),pY=function(r){return(r+7)/8|0},mae=function(r,e,t){return(t==null||t>r.length)&&(t=r.length),new wo(r.subarray(e,t))},Jl=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8},lv=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8,r[n+2]|=t>>16},U0=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,a=t.slice();if(!i)return{t:gY,l:0};if(i==1){var o=new wo(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(j,W){return j.f-W.f}),t.push({s:-1,f:25001});var u=t[0],c=t[1],h=0,f=1,v=2;for(t[0]={s:-1,f:u.f+c.f,l:u,r:c};f!=i-1;)u=t[t[h].f<t[v].f?h++:v++],c=t[h!=f&&t[h].f<t[v].f?h++:v++],t[f++]={s:-1,f:u.f+c.f,l:u,r:c};for(var y=a[0].s,n=1;n<i;++n)a[n].s>y&&(y=a[n].s);var g=new cs(y+1),_=YO(t[f-1],g,0);if(_>e){var n=0,E=0,A=_-e,T=1<<A;for(a.sort(function(W,G){return g[G.s]-g[W.s]||W.f-G.f});n<i;++n){var C=a[n].s;if(g[C]>e)E+=T-(1<<_-g[C]),g[C]=e;else break}for(E>>=A;E>0;){var N=a[n].s;g[N]<e?E-=1<<e-g[N]++-1:++n}for(;n>=0&&E;--n){var k=a[n].s;g[k]==e&&(--g[k],++E)}_=e}return{t:new wo(g),l:_}},YO=function(r,e,t){return r.s==-1?Math.max(YO(r.l,e,t+1),YO(r.r,e,t+1)):e[r.s]=t},Dk=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new cs(++e),n=0,i=r[0],a=1,o=function(c){t[n++]=c},u=1;u<=e;++u)if(r[u]==i&&u!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=r[u]}return{c:t.subarray(0,n),n:e}},uv=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},vY=function(r,e,t){var n=t.length,i=pY(e+2);r[i]=n&255,r[i+1]=n>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var a=0;a<n;++a)r[i+a+4]=t[a];return(i+4+n)*8},qk=function(r,e,t,n,i,a,o,u,c,h,f){Jl(e,f++,t),++i[256];for(var v=U0(i,15),y=v.t,g=v.l,_=U0(a,15),E=_.t,A=_.l,T=Dk(y),C=T.c,N=T.n,k=Dk(E),j=k.c,W=k.n,G=new cs(19),D=0;D<C.length;++D)++G[C[D]&31];for(var D=0;D<j.length;++D)++G[j[D]&31];for(var M=U0(G,7),U=M.t,I=M.l,q=19;q>4&&!U[jk[q-1]];--q);var z=h+5<<3,Q=uv(i,kd)+uv(a,_1)+o,ce=uv(i,y)+uv(a,E)+o+14+3*q+uv(G,U)+2*G[16]+3*G[17]+7*G[18];if(c>=0&&z<=Q&&z<=ce)return vY(e,f,r.subarray(c,c+h));var re,J,le,ye;if(Jl(e,f,1+(ce<Q)),f+=2,ce<Q){re=_v(y,g,0),J=y,le=_v(E,A,0),ye=E;var Z=_v(U,I,0);Jl(e,f,N-257),Jl(e,f+5,W-1),Jl(e,f+10,q-4),f+=14;for(var D=0;D<q;++D)Jl(e,f+3*D,U[jk[D]]);f+=3*q;for(var oe=[C,j],L=0;L<2;++L)for(var Y=oe[L],D=0;D<Y.length;++D){var te=Y[D]&31;Jl(e,f,Z[te]),f+=U[te],te>15&&(Jl(e,f,Y[D]>>5&127),f+=Y[D]>>12)}}else re=vae,J=kd,le=gae,ye=_1;for(var D=0;D<u;++D){var de=n[D];if(de>255){var te=de>>18&31;lv(e,f,re[te+257]),f+=J[te+257],te>7&&(Jl(e,f,de>>23&31),f+=F6[te]);var ue=de&31;lv(e,f,le[ue]),f+=ye[ue],ue>3&&(lv(e,f,de>>5&8191),f+=z6[ue])}else lv(e,f,re[de]),f+=J[de]}return lv(e,f,re[256]),f+J[256]},yae=new B6([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gY=new wo(0),bae=function(r,e,t,n,i,a){var o=a.z||r.length,u=new wo(n+o+5*(1+Math.ceil(o/7e3))+i),c=u.subarray(n,u.length-i),h=a.l,f=(a.r||0)&7;if(e){f&&(c[0]=a.r>>3);for(var v=yae[e-1],y=v>>13,g=v&8191,_=(1<<t)-1,E=a.p||new cs(32768),A=a.h||new cs(_+1),T=Math.ceil(t/3),C=2*T,N=function(dt){return(r[dt]^r[dt+1]<<T^r[dt+2]<<C)&_},k=new B6(25e3),j=new cs(288),W=new cs(32),G=0,D=0,M=a.i||0,U=0,I=a.w||0,q=0;M+2<o;++M){var z=N(M),Q=M&32767,ce=A[z];if(E[Q]=ce,A[z]=Q,I<=M){var re=o-M;if((G>7e3||U>24576)&&(re>423||!h)){f=qk(r,c,0,k,j,W,D,U,q,M-q,f),U=G=D=0,q=M;for(var J=0;J<286;++J)j[J]=0;for(var J=0;J<30;++J)W[J]=0}var le=2,ye=0,Z=g,oe=Q-ce&32767;if(re>2&&z==N(M-oe))for(var L=Math.min(y,re)-1,Y=Math.min(32767,M),te=Math.min(258,re);oe<=Y&&--Z&&Q!=ce;){if(r[M+le]==r[M+le-oe]){for(var de=0;de<te&&r[M+de]==r[M+de-oe];++de);if(de>le){if(le=de,ye=oe,de>L)break;for(var ue=Math.min(oe,de-2),we=0,J=0;J<ue;++J){var Se=M-oe+J&32767,Ie=E[Se],Le=Se-Ie&32767;Le>we&&(we=Le,ce=Se)}}}Q=ce,ce=E[Q],oe+=Q-ce&32767}if(ye){k[U++]=268435456|GO[le]<<18|Mk[ye];var Ve=GO[le]&31,tt=Mk[ye]&31;D+=F6[Ve]+z6[tt],++j[257+Ve],++W[tt],I=M+le,++G}else k[U++]=r[M],++j[r[M]]}}for(M=Math.max(M,I);M<o;++M)k[U++]=r[M],++j[r[M]];f=qk(r,c,h,k,j,W,D,U,q,M-q,f),h||(a.r=f&7|c[f/8|0]<<3,f-=7,a.h=A,a.p=E,a.i=M,a.w=I)}else{for(var M=a.w||0;M<o+h;M+=65535){var Xe=M+65535;Xe>=o&&(c[f/8|0]=h,Xe=o),f=vY(c,f+1,r.subarray(M,Xe))}a.i=o}return mae(u,0,n+pY(f)+i)},mY=function(){var r=1,e=0;return{p:function(t){for(var n=r,i=e,a=t.length|0,o=0;o!=a;){for(var u=Math.min(o+2655,a);o<u;++o)i+=n+=t[o];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}r=n,e=i},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},wae=function(r,e,t,n,i){if(!i&&(i={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),o=new wo(a.length+r.length);o.set(a),o.set(r,a.length),r=o,i.w=a.length}return bae(r,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,t,n,i)},yY=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},xae=function(r,e){var t=e.level,n=t==0?0:t<6?1:t==9?3:2;if(r[0]=120,r[1]=n<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var i=mY();i.p(e.dictionary),yY(r,2,i.d())}};function KO(r,e){e||(e={});var t=mY();t.p(r);var n=wae(r,e,e.dictionary?6:2,4);return xae(n,e),yY(n,n.length-4,t.d()),n}var _ae=typeof TextDecoder<"u"&&new TextDecoder,Sae=0;try{_ae.decode(gY,{stream:!0}),Sae=1}catch{}function Eae(r){if(Array.isArray(r))return r}function Tae(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,a,o,u=[],c=!0,h=!1;try{if(a=(t=t.call(r)).next,e!==0)for(;!(c=(n=a.call(t)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(f){h=!0,i=f}finally{try{if(!c&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw i}}return u}}function Lk(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function Oae(r,e){if(r){if(typeof r=="string")return Lk(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Lk(r,e):void 0}}function Aae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
453
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $k(r,e){return Eae(r)||Tae(r,e)||Oae(r,e)||Aae()}function Bk(r,e="utf8"){return new TextDecoder(e).decode(r)}const Rae=new TextEncoder;function Cae(r){return Rae.encode(r)}const kae=1024*8,Nae=(()=>{const r=new Uint8Array(4),e=new Uint32Array(r.buffer);return!((e[0]=1)&r[0])})(),H0={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class U6{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=kae,t={}){let n=!1;typeof e=="number"?e=new ArrayBuffer(e):(n=!0,this.lastWrittenByte=e.byteLength);const i=t.offset?t.offset>>>0:0,a=e.byteLength-i;let o=i;(ArrayBuffer.isView(e)||e instanceof U6)&&(e.byteLength!==e.buffer.byteLength&&(o=e.byteOffset+i),e=e.buffer),n?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const n=(this.offset+e)*2,i=new Uint8Array(n);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const n=H0[t].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+n);if(this.littleEndian===Nae&&t!=="uint8"&&t!=="int8"){const u=new Uint8Array(this.buffer.slice(i,i+n));u.reverse();const c=new H0[t](u.buffer);return this.offset+=n,c.reverse(),c}const o=new H0[t](a);return this.offset+=n,o}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return Bk(this.readBytes(e))}decodeText(e=1,t="utf8"){return Bk(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(Cae(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Ff(r){let e=r.length;for(;--e>=0;)r[e]=0}const Iae=3,Pae=258,bY=29,jae=256,Mae=jae+1+bY,wY=30,Dae=512,qae=new Array((Mae+2)*2);Ff(qae);const Lae=new Array(wY*2);Ff(Lae);const $ae=new Array(Dae);Ff($ae);const Bae=new Array(Pae-Iae+1);Ff(Bae);const Fae=new Array(bY);Ff(Fae);const zae=new Array(wY);Ff(zae);const Uae=(r,e,t,n)=>{let i=r&65535|0,a=r>>>16&65535|0,o=0;for(;t!==0;){o=t>2e3?2e3:t,t-=o;do i=i+e[n++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var XO=Uae;const Hae=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},Wae=new Uint32Array(Hae()),Gae=(r,e,t,n)=>{const i=Wae,a=n+t;r^=-1;for(let o=n;o<a;o++)r=r>>>8^i[(r^e[o])&255];return r^-1};var Zo=Gae,QO={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},xY={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const Vae=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var Yae=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const n in t)Vae(t,n)&&(r[n]=t[n])}}return r},Kae=r=>{let e=0;for(let n=0,i=r.length;n<i;n++)e+=r[n].length;const t=new Uint8Array(e);for(let n=0,i=0,a=r.length;n<a;n++){let o=r[n];t.set(o,i),i+=o.length}return t},_Y={assign:Yae,flattenChunks:Kae};let SY=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{SY=!1}const qv=new Uint8Array(256);for(let r=0;r<256;r++)qv[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;qv[254]=qv[254]=1;var Xae=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,n,i,a,o=r.length,u=0;for(i=0;i<o;i++)t=r.charCodeAt(i),(t&64512)===55296&&i+1<o&&(n=r.charCodeAt(i+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),u+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(u),a=0,i=0;a<u;i++)t=r.charCodeAt(i),(t&64512)===55296&&i+1<o&&(n=r.charCodeAt(i+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),t<128?e[a++]=t:t<2048?(e[a++]=192|t>>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const Qae=(r,e)=>{if(e<65534&&r.subarray&&SY)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let n=0;n<e;n++)t+=String.fromCharCode(r[n]);return t};var Zae=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let n,i;const a=new Array(t*2);for(i=0,n=0;n<t;){let o=r[n++];if(o<128){a[i++]=o;continue}let u=qv[o];if(u>4){a[i++]=65533,n+=u-1;continue}for(o&=u===2?31:u===3?15:7;u>1&&n<t;)o=o<<6|r[n++]&63,u--;if(u>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return Qae(a,i)},Jae=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+qv[r[t]]>e?t:e},ZO={string2buf:Xae,buf2string:Zae,utf8border:Jae};function ese(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var tse=ese;const $m=16209,rse=16191;var nse=function(e,t){let n,i,a,o,u,c,h,f,v,y,g,_,E,A,T,C,N,k,j,W,G,D,M,U;const I=e.state;n=e.next_in,M=e.input,i=n+(e.avail_in-5),a=e.next_out,U=e.output,o=a-(t-e.avail_out),u=a+(e.avail_out-257),c=I.dmax,h=I.wsize,f=I.whave,v=I.wnext,y=I.window,g=I.hold,_=I.bits,E=I.lencode,A=I.distcode,T=(1<<I.lenbits)-1,C=(1<<I.distbits)-1;e:do{_<15&&(g+=M[n++]<<_,_+=8,g+=M[n++]<<_,_+=8),N=E[g&T];t:for(;;){if(k=N>>>24,g>>>=k,_-=k,k=N>>>16&255,k===0)U[a++]=N&65535;else if(k&16){j=N&65535,k&=15,k&&(_<k&&(g+=M[n++]<<_,_+=8),j+=g&(1<<k)-1,g>>>=k,_-=k),_<15&&(g+=M[n++]<<_,_+=8,g+=M[n++]<<_,_+=8),N=A[g&C];r:for(;;){if(k=N>>>24,g>>>=k,_-=k,k=N>>>16&255,k&16){if(W=N&65535,k&=15,_<k&&(g+=M[n++]<<_,_+=8,_<k&&(g+=M[n++]<<_,_+=8)),W+=g&(1<<k)-1,W>c){e.msg="invalid distance too far back",I.mode=$m;break e}if(g>>>=k,_-=k,k=a-o,W>k){if(k=W-k,k>f&&I.sane){e.msg="invalid distance too far back",I.mode=$m;break e}if(G=0,D=y,v===0){if(G+=h-k,k<j){j-=k;do U[a++]=y[G++];while(--k);G=a-W,D=U}}else if(v<k){if(G+=h+v-k,k-=v,k<j){j-=k;do U[a++]=y[G++];while(--k);if(G=0,v<j){k=v,j-=k;do U[a++]=y[G++];while(--k);G=a-W,D=U}}}else if(G+=v-k,k<j){j-=k;do U[a++]=y[G++];while(--k);G=a-W,D=U}for(;j>2;)U[a++]=D[G++],U[a++]=D[G++],U[a++]=D[G++],j-=3;j&&(U[a++]=D[G++],j>1&&(U[a++]=D[G++]))}else{G=a-W;do U[a++]=U[G++],U[a++]=U[G++],U[a++]=U[G++],j-=3;while(j>2);j&&(U[a++]=U[G++],j>1&&(U[a++]=U[G++]))}}else if((k&64)===0){N=A[(N&65535)+(g&(1<<k)-1)];continue r}else{e.msg="invalid distance code",I.mode=$m;break e}break}}else if((k&64)===0){N=E[(N&65535)+(g&(1<<k)-1)];continue t}else if(k&32){I.mode=rse;break e}else{e.msg="invalid literal/length code",I.mode=$m;break e}break}}while(n<i&&a<u);j=_>>3,n-=j,_-=j<<3,g&=(1<<_)-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?5+(i-n):5-(n-i),e.avail_out=a<u?257+(u-a):257-(a-u),I.hold=g,I.bits=_};const ef=15,Fk=852,zk=592,Uk=0,W0=1,Hk=2,ise=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ase=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),sse=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ose=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),lse=(r,e,t,n,i,a,o,u)=>{const c=u.bits;let h=0,f=0,v=0,y=0,g=0,_=0,E=0,A=0,T=0,C=0,N,k,j,W,G,D=null,M;const U=new Uint16Array(ef+1),I=new Uint16Array(ef+1);let q=null,z,Q,ce;for(h=0;h<=ef;h++)U[h]=0;for(f=0;f<n;f++)U[e[t+f]]++;for(g=c,y=ef;y>=1&&U[y]===0;y--);if(g>y&&(g=y),y===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,u.bits=1,0;for(v=1;v<y&&U[v]===0;v++);for(g<v&&(g=v),A=1,h=1;h<=ef;h++)if(A<<=1,A-=U[h],A<0)return-1;if(A>0&&(r===Uk||y!==1))return-1;for(I[1]=0,h=1;h<ef;h++)I[h+1]=I[h]+U[h];for(f=0;f<n;f++)e[t+f]!==0&&(o[I[e[t+f]]++]=f);if(r===Uk?(D=q=o,M=20):r===W0?(D=ise,q=ase,M=257):(D=sse,q=ose,M=0),C=0,f=0,h=v,G=a,_=g,E=0,j=-1,T=1<<g,W=T-1,r===W0&&T>Fk||r===Hk&&T>zk)return 1;for(;;){z=h-E,o[f]+1<M?(Q=0,ce=o[f]):o[f]>=M?(Q=q[o[f]-M],ce=D[o[f]-M]):(Q=96,ce=0),N=1<<h-E,k=1<<_,v=k;do k-=N,i[G+(C>>E)+k]=z<<24|Q<<16|ce|0;while(k!==0);for(N=1<<h-1;C&N;)N>>=1;if(N!==0?(C&=N-1,C+=N):C=0,f++,--U[h]===0){if(h===y)break;h=e[t+o[f]]}if(h>g&&(C&W)!==j){for(E===0&&(E=g),G+=v,_=h-E,A=1<<_;_+E<y&&(A-=U[_+E],!(A<=0));)_++,A<<=1;if(T+=1<<_,r===W0&&T>Fk||r===Hk&&T>zk)return 1;j=C&W,i[j]=g<<24|_<<16|G-a|0}}return C!==0&&(i[G+C]=h-E<<24|64<<16|0),u.bits=g,0};var Sv=lse;const use=0,EY=1,TY=2,{Z_FINISH:Wk,Z_BLOCK:cse,Z_TREES:Bm,Z_OK:Nd,Z_STREAM_END:dse,Z_NEED_DICT:hse,Z_STREAM_ERROR:Ds,Z_DATA_ERROR:OY,Z_MEM_ERROR:AY,Z_BUF_ERROR:fse,Z_DEFLATED:Gk}=xY,z1=16180,Vk=16181,Yk=16182,Kk=16183,Xk=16184,Qk=16185,Zk=16186,Jk=16187,eN=16188,tN=16189,S1=16190,eu=16191,G0=16192,rN=16193,V0=16194,nN=16195,iN=16196,aN=16197,sN=16198,Fm=16199,zm=16200,oN=16201,lN=16202,uN=16203,cN=16204,dN=16205,Y0=16206,hN=16207,fN=16208,vn=16209,RY=16210,CY=16211,pse=852,vse=592,gse=15,mse=gse,pN=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function yse(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Fd=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<z1||e.mode>CY?1:0},kY=r=>{if(Fd(r))return Ds;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=z1,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(pse),e.distcode=e.distdyn=new Int32Array(vse),e.sane=1,e.back=-1,Nd},NY=r=>{if(Fd(r))return Ds;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,kY(r)},IY=(r,e)=>{let t;if(Fd(r))return Ds;const n=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Ds:(n.window!==null&&n.wbits!==e&&(n.window=null),n.wrap=t,n.wbits=e,NY(r))},PY=(r,e)=>{if(!r)return Ds;const t=new yse;r.state=t,t.strm=r,t.window=null,t.mode=z1;const n=IY(r,e);return n!==Nd&&(r.state=null),n},bse=r=>PY(r,mse);let vN=!0,K0,X0;const wse=r=>{if(vN){K0=new Int32Array(512),X0=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(Sv(EY,r.lens,0,288,K0,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;Sv(TY,r.lens,0,32,X0,0,r.work,{bits:5}),vN=!1}r.lencode=K0,r.lenbits=9,r.distcode=X0,r.distbits=5},jY=(r,e,t,n)=>{let i;const a=r.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),a.window.set(e.subarray(t-n,t-n+i),a.wnext),n-=i,n?(a.window.set(e.subarray(t-n,t),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},xse=(r,e)=>{let t,n,i,a,o,u,c,h,f,v,y,g,_,E,A=0,T,C,N,k,j,W,G,D;const M=new Uint8Array(4);let U,I;const q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fd(r)||!r.output||!r.input&&r.avail_in!==0)return Ds;t=r.state,t.mode===eu&&(t.mode=G0),o=r.next_out,i=r.output,c=r.avail_out,a=r.next_in,n=r.input,u=r.avail_in,h=t.hold,f=t.bits,v=u,y=c,D=Nd;e:for(;;)switch(t.mode){case z1:if(t.wrap===0){t.mode=G0;break}for(;f<16;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(t.wrap&2&&h===35615){t.wbits===0&&(t.wbits=15),t.check=0,M[0]=h&255,M[1]=h>>>8&255,t.check=Zo(t.check,M,2,0),h=0,f=0,t.mode=Vk;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){r.msg="incorrect header check",t.mode=vn;break}if((h&15)!==Gk){r.msg="unknown compression method",t.mode=vn;break}if(h>>>=4,f-=4,G=(h&15)+8,t.wbits===0&&(t.wbits=G),G>15||G>t.wbits){r.msg="invalid window size",t.mode=vn;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=h&512?tN:eu,h=0,f=0;break;case Vk:for(;f<16;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(t.flags=h,(t.flags&255)!==Gk){r.msg="unknown compression method",t.mode=vn;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=vn;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&t.wrap&4&&(M[0]=h&255,M[1]=h>>>8&255,t.check=Zo(t.check,M,2,0)),h=0,f=0,t.mode=Yk;case Yk:for(;f<32;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.head&&(t.head.time=h),t.flags&512&&t.wrap&4&&(M[0]=h&255,M[1]=h>>>8&255,M[2]=h>>>16&255,M[3]=h>>>24&255,t.check=Zo(t.check,M,4,0)),h=0,f=0,t.mode=Kk;case Kk:for(;f<16;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&t.wrap&4&&(M[0]=h&255,M[1]=h>>>8&255,t.check=Zo(t.check,M,2,0)),h=0,f=0,t.mode=Xk;case Xk:if(t.flags&1024){for(;f<16;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&t.wrap&4&&(M[0]=h&255,M[1]=h>>>8&255,t.check=Zo(t.check,M,2,0)),h=0,f=0}else t.head&&(t.head.extra=null);t.mode=Qk;case Qk:if(t.flags&1024&&(g=t.length,g>u&&(g=u),g&&(t.head&&(G=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(n.subarray(a,a+g),G)),t.flags&512&&t.wrap&4&&(t.check=Zo(t.check,n,g,a)),u-=g,a+=g,t.length-=g),t.length))break e;t.length=0,t.mode=Zk;case Zk:if(t.flags&2048){if(u===0)break e;g=0;do G=n[a+g++],t.head&&G&&t.length<65536&&(t.head.name+=String.fromCharCode(G));while(G&&g<u);if(t.flags&512&&t.wrap&4&&(t.check=Zo(t.check,n,g,a)),u-=g,a+=g,G)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Jk;case Jk:if(t.flags&4096){if(u===0)break e;g=0;do G=n[a+g++],t.head&&G&&t.length<65536&&(t.head.comment+=String.fromCharCode(G));while(G&&g<u);if(t.flags&512&&t.wrap&4&&(t.check=Zo(t.check,n,g,a)),u-=g,a+=g,G)break e}else t.head&&(t.head.comment=null);t.mode=eN;case eN:if(t.flags&512){for(;f<16;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(t.wrap&4&&h!==(t.check&65535)){r.msg="header crc mismatch",t.mode=vn;break}h=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=eu;break;case tN:for(;f<32;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}r.adler=t.check=pN(h),h=0,f=0,t.mode=S1;case S1:if(t.havedict===0)return r.next_out=o,r.avail_out=c,r.next_in=a,r.avail_in=u,t.hold=h,t.bits=f,hse;r.adler=t.check=1,t.mode=eu;case eu:if(e===cse||e===Bm)break e;case G0:if(t.last){h>>>=f&7,f-=f&7,t.mode=Y0;break}for(;f<3;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}switch(t.last=h&1,h>>>=1,f-=1,h&3){case 0:t.mode=rN;break;case 1:if(wse(t),t.mode=Fm,e===Bm){h>>>=2,f-=2;break e}break;case 2:t.mode=iN;break;case 3:r.msg="invalid block type",t.mode=vn}h>>>=2,f-=2;break;case rN:for(h>>>=f&7,f-=f&7;f<32;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if((h&65535)!==(h>>>16^65535)){r.msg="invalid stored block lengths",t.mode=vn;break}if(t.length=h&65535,h=0,f=0,t.mode=V0,e===Bm)break e;case V0:t.mode=nN;case nN:if(g=t.length,g){if(g>u&&(g=u),g>c&&(g=c),g===0)break e;i.set(n.subarray(a,a+g),o),u-=g,a+=g,c-=g,o+=g,t.length-=g;break}t.mode=eu;break;case iN:for(;f<14;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(t.nlen=(h&31)+257,h>>>=5,f-=5,t.ndist=(h&31)+1,h>>>=5,f-=5,t.ncode=(h&15)+4,h>>>=4,f-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=vn;break}t.have=0,t.mode=aN;case aN:for(;t.have<t.ncode;){for(;f<3;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.lens[q[t.have++]]=h&7,h>>>=3,f-=3}for(;t.have<19;)t.lens[q[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,U={bits:t.lenbits},D=Sv(use,t.lens,0,19,t.lencode,0,t.work,U),t.lenbits=U.bits,D){r.msg="invalid code lengths set",t.mode=vn;break}t.have=0,t.mode=sN;case sN:for(;t.have<t.nlen+t.ndist;){for(;A=t.lencode[h&(1<<t.lenbits)-1],T=A>>>24,C=A>>>16&255,N=A&65535,!(T<=f);){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(N<16)h>>>=T,f-=T,t.lens[t.have++]=N;else{if(N===16){for(I=T+2;f<I;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(h>>>=T,f-=T,t.have===0){r.msg="invalid bit length repeat",t.mode=vn;break}G=t.lens[t.have-1],g=3+(h&3),h>>>=2,f-=2}else if(N===17){for(I=T+3;f<I;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}h>>>=T,f-=T,G=0,g=3+(h&7),h>>>=3,f-=3}else{for(I=T+7;f<I;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}h>>>=T,f-=T,G=0,g=11+(h&127),h>>>=7,f-=7}if(t.have+g>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=vn;break}for(;g--;)t.lens[t.have++]=G}}if(t.mode===vn)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=vn;break}if(t.lenbits=9,U={bits:t.lenbits},D=Sv(EY,t.lens,0,t.nlen,t.lencode,0,t.work,U),t.lenbits=U.bits,D){r.msg="invalid literal/lengths set",t.mode=vn;break}if(t.distbits=6,t.distcode=t.distdyn,U={bits:t.distbits},D=Sv(TY,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,U),t.distbits=U.bits,D){r.msg="invalid distances set",t.mode=vn;break}if(t.mode=Fm,e===Bm)break e;case Fm:t.mode=zm;case zm:if(u>=6&&c>=258){r.next_out=o,r.avail_out=c,r.next_in=a,r.avail_in=u,t.hold=h,t.bits=f,nse(r,y),o=r.next_out,i=r.output,c=r.avail_out,a=r.next_in,n=r.input,u=r.avail_in,h=t.hold,f=t.bits,t.mode===eu&&(t.back=-1);break}for(t.back=0;A=t.lencode[h&(1<<t.lenbits)-1],T=A>>>24,C=A>>>16&255,N=A&65535,!(T<=f);){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(C&&(C&240)===0){for(k=T,j=C,W=N;A=t.lencode[W+((h&(1<<k+j)-1)>>k)],T=A>>>24,C=A>>>16&255,N=A&65535,!(k+T<=f);){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}h>>>=k,f-=k,t.back+=k}if(h>>>=T,f-=T,t.back+=T,t.length=N,C===0){t.mode=dN;break}if(C&32){t.back=-1,t.mode=eu;break}if(C&64){r.msg="invalid literal/length code",t.mode=vn;break}t.extra=C&15,t.mode=oN;case oN:if(t.extra){for(I=t.extra;f<I;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=lN;case lN:for(;A=t.distcode[h&(1<<t.distbits)-1],T=A>>>24,C=A>>>16&255,N=A&65535,!(T<=f);){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if((C&240)===0){for(k=T,j=C,W=N;A=t.distcode[W+((h&(1<<k+j)-1)>>k)],T=A>>>24,C=A>>>16&255,N=A&65535,!(k+T<=f);){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}h>>>=k,f-=k,t.back+=k}if(h>>>=T,f-=T,t.back+=T,C&64){r.msg="invalid distance code",t.mode=vn;break}t.offset=N,t.extra=C&15,t.mode=uN;case uN:if(t.extra){for(I=t.extra;f<I;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=vn;break}t.mode=cN;case cN:if(c===0)break e;if(g=y-c,t.offset>g){if(g=t.offset-g,g>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=vn;break}g>t.wnext?(g-=t.wnext,_=t.wsize-g):_=t.wnext-g,g>t.length&&(g=t.length),E=t.window}else E=i,_=o-t.offset,g=t.length;g>c&&(g=c),c-=g,t.length-=g;do i[o++]=E[_++];while(--g);t.length===0&&(t.mode=zm);break;case dN:if(c===0)break e;i[o++]=t.length,c--,t.mode=zm;break;case Y0:if(t.wrap){for(;f<32;){if(u===0)break e;u--,h|=n[a++]<<f,f+=8}if(y-=c,r.total_out+=y,t.total+=y,t.wrap&4&&y&&(r.adler=t.check=t.flags?Zo(t.check,i,y,o-y):XO(t.check,i,y,o-y)),y=c,t.wrap&4&&(t.flags?h:pN(h))!==t.check){r.msg="incorrect data check",t.mode=vn;break}h=0,f=0}t.mode=hN;case hN:if(t.wrap&&t.flags){for(;f<32;){if(u===0)break e;u--,h+=n[a++]<<f,f+=8}if(t.wrap&4&&h!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=vn;break}h=0,f=0}t.mode=fN;case fN:D=dse;break e;case vn:D=OY;break e;case RY:return AY;case CY:default:return Ds}return r.next_out=o,r.avail_out=c,r.next_in=a,r.avail_in=u,t.hold=h,t.bits=f,(t.wsize||y!==r.avail_out&&t.mode<vn&&(t.mode<Y0||e!==Wk))&&jY(r,r.output,r.next_out,y-r.avail_out),v-=r.avail_in,y-=r.avail_out,r.total_in+=v,r.total_out+=y,t.total+=y,t.wrap&4&&y&&(r.adler=t.check=t.flags?Zo(t.check,i,y,r.next_out-y):XO(t.check,i,y,r.next_out-y)),r.data_type=t.bits+(t.last?64:0)+(t.mode===eu?128:0)+(t.mode===Fm||t.mode===V0?256:0),(v===0&&y===0||e===Wk)&&D===Nd&&(D=fse),D},_se=r=>{if(Fd(r))return Ds;let e=r.state;return e.window&&(e.window=null),r.state=null,Nd},Sse=(r,e)=>{if(Fd(r))return Ds;const t=r.state;return(t.wrap&2)===0?Ds:(t.head=e,e.done=!1,Nd)},Ese=(r,e)=>{const t=e.length;let n,i,a;return Fd(r)||(n=r.state,n.wrap!==0&&n.mode!==S1)?Ds:n.mode===S1&&(i=1,i=XO(i,e,t,0),i!==n.check)?OY:(a=jY(r,e,t,t),a?(n.mode=RY,AY):(n.havedict=1,Nd))};var Tse=NY,Ose=IY,Ase=kY,Rse=bse,Cse=PY,kse=xse,Nse=_se,Ise=Sse,Pse=Ese,jse="pako inflate (from Nodeca project)",tu={inflateReset:Tse,inflateReset2:Ose,inflateResetKeep:Ase,inflateInit:Rse,inflateInit2:Cse,inflate:kse,inflateEnd:Nse,inflateGetHeader:Ise,inflateSetDictionary:Pse,inflateInfo:jse};function Mse(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Dse=Mse;const MY=Object.prototype.toString,{Z_NO_FLUSH:qse,Z_FINISH:Lse,Z_OK:Lv,Z_STREAM_END:Q0,Z_NEED_DICT:Z0,Z_STREAM_ERROR:$se,Z_DATA_ERROR:gN,Z_MEM_ERROR:Bse}=xY;function rg(r){this.options=_Y.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tse,this.strm.avail_out=0;let t=tu.inflateInit2(this.strm,e.windowBits);if(t!==Lv)throw new Error(QO[t]);if(this.header=new Dse,tu.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=ZO.string2buf(e.dictionary):MY.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=tu.inflateSetDictionary(this.strm,e.dictionary),t!==Lv)))throw new Error(QO[t])}rg.prototype.push=function(r,e){const t=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let a,o,u;if(this.ended)return!1;for(e===~~e?o=e:o=e===!0?Lse:qse,MY.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(n),t.next_out=0,t.avail_out=n),a=tu.inflate(t,o),a===Z0&&i&&(a=tu.inflateSetDictionary(t,i),a===Lv?a=tu.inflate(t,o):a===gN&&(a=Z0));t.avail_in>0&&a===Q0&&t.state.wrap>0&&r[t.next_in]!==0;)tu.inflateReset(t),a=tu.inflate(t,o);switch(a){case $se:case gN:case Z0:case Bse:return this.onEnd(a),this.ended=!0,!1}if(u=t.avail_out,t.next_out&&(t.avail_out===0||a===Q0))if(this.options.to==="string"){let c=ZO.utf8border(t.output,t.next_out),h=t.next_out-c,f=ZO.buf2string(t.output,c);t.next_out=h,t.avail_out=n-h,h&&t.output.set(t.output.subarray(c,c+h),0),this.onData(f)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Lv&&u===0)){if(a===Q0)return a=tu.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};rg.prototype.onData=function(r){this.chunks.push(r)};rg.prototype.onEnd=function(r){r===Lv&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=_Y.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function Fse(r,e){const t=new rg(e);if(t.push(r),t.err)throw t.msg||QO[t.err];return t.result}var zse=rg,Use=Fse,Hse={Inflate:zse,inflate:Use};const{Inflate:Wse,inflate:Gse}=Hse;var mN=Wse,Vse=Gse;const DY=[];for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;DY[r]=e}const yN=4294967295;function Yse(r,e,t){let n=r;for(let i=0;i<t;i++)n=DY[(n^e[i])&255]^n>>>8;return n}function Kse(r,e){return(Yse(yN,r,e)^yN)>>>0}function bN(r,e,t){const n=r.readUint32(),i=Kse(new Uint8Array(r.buffer,r.byteOffset+r.offset-e-4,e),e);if(i!==n)throw new Error(`CRC mismatch for chunk ${t}. Expected ${n}, found ${i}`)}function qY(r,e,t){for(let n=0;n<t;n++)e[n]=r[n]}function LY(r,e,t,n){let i=0;for(;i<n;i++)e[i]=r[i];for(;i<t;i++)e[i]=r[i]+e[i-n]&255}function $Y(r,e,t,n){let i=0;if(t.length===0)for(;i<n;i++)e[i]=r[i];else for(;i<n;i++)e[i]=r[i]+t[i]&255}function BY(r,e,t,n,i){let a=0;if(t.length===0){for(;a<i;a++)e[a]=r[a];for(;a<n;a++)e[a]=r[a]+(e[a-i]>>1)&255}else{for(;a<i;a++)e[a]=r[a]+(t[a]>>1)&255;for(;a<n;a++)e[a]=r[a]+(e[a-i]+t[a]>>1)&255}}function FY(r,e,t,n,i){let a=0;if(t.length===0){for(;a<i;a++)e[a]=r[a];for(;a<n;a++)e[a]=r[a]+e[a-i]&255}else{for(;a<i;a++)e[a]=r[a]+t[a]&255;for(;a<n;a++)e[a]=r[a]+Xse(e[a-i],t[a],t[a-i])&255}}function Xse(r,e,t){const n=r+e-t,i=Math.abs(n-r),a=Math.abs(n-e),o=Math.abs(n-t);return i<=a&&i<=o?r:a<=o?e:t}function Qse(r,e,t,n,i,a){switch(r){case 0:qY(e,t,i);break;case 1:LY(e,t,i,a);break;case 2:$Y(e,t,n,i);break;case 3:BY(e,t,n,i,a);break;case 4:FY(e,t,n,i,a);break;default:throw new Error(`Unsupported filter: ${r}`)}}const Zse=new Uint16Array([255]),Jse=new Uint8Array(Zse.buffer),eoe=Jse[0]===255;function toe(r){const{data:e,width:t,height:n,channels:i,depth:a}=r,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],u=Math.ceil(a/8)*i,c=new Uint8Array(n*t*u);let h=0;for(let f=0;f<7;f++){const v=o[f],y=Math.ceil((t-v.x)/v.xStep),g=Math.ceil((n-v.y)/v.yStep);if(y<=0||g<=0)continue;const _=y*u,E=new Uint8Array(_);for(let A=0;A<g;A++){const T=e[h++],C=e.subarray(h,h+_);h+=_;const N=new Uint8Array(_);Qse(T,C,N,E,_,u),E.set(N);for(let k=0;k<y;k++){const j=v.x+k*v.xStep,W=v.y+A*v.yStep;if(!(j>=t||W>=n))for(let G=0;G<u;G++)c[(W*t+j)*u+G]=N[k*u+G]}}}if(a===16){const f=new Uint16Array(c.buffer);if(eoe)for(let v=0;v<f.length;v++)f[v]=roe(f[v]);return f}else return c}function roe(r){return(r&255)<<8|r>>8&255}const noe=new Uint16Array([255]),ioe=new Uint8Array(noe.buffer),aoe=ioe[0]===255,soe=new Uint8Array(0);function wN(r){const{data:e,width:t,height:n,channels:i,depth:a}=r,o=Math.ceil(a/8)*i,u=Math.ceil(a/8*i*t),c=new Uint8Array(n*u);let h=soe,f=0,v,y;for(let g=0;g<n;g++){switch(v=e.subarray(f+1,f+1+u),y=c.subarray(g*u,(g+1)*u),e[f]){case 0:qY(v,y,u);break;case 1:LY(v,y,u,o);break;case 2:$Y(v,y,h,u);break;case 3:BY(v,y,h,u,o);break;case 4:FY(v,y,h,u,o);break;default:throw new Error(`Unsupported filter: ${e[f]}`)}h=y,f+=u+1}if(a===16){const g=new Uint16Array(c.buffer);if(aoe)for(let _=0;_<g.length;_++)g[_]=ooe(g[_]);return g}else return c}function ooe(r){return(r&255)<<8|r>>8&255}const i1=Uint8Array.of(137,80,78,71,13,10,26,10);function xN(r){if(!loe(r.readBytes(i1.length)))throw new Error("wrong PNG signature")}function loe(r){if(r.length<i1.length)return!1;for(let e=0;e<i1.length;e++)if(r[e]!==i1[e])return!1;return!0}const uoe="tEXt",coe=0,zY=new TextDecoder("latin1");function doe(r){if(foe(r),r.length===0||r.length>79)throw new Error("keyword length must be between 1 and 79")}const hoe=/^[\u0000-\u00FF]*$/;function foe(r){if(!hoe.test(r))throw new Error("invalid latin1 text")}function poe(r,e,t){const n=UY(e);r[n]=voe(e,t-n.length-1)}function UY(r){for(r.mark();r.readByte()!==coe;);const e=r.offset;r.reset();const t=zY.decode(r.readBytes(e-r.offset-1));return r.skip(1),doe(t),t}function voe(r,e){return zY.decode(r.readBytes(e))}const us={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},J0={UNKNOWN:-1,DEFLATE:0},_N={UNKNOWN:-1,ADAPTIVE:0},eb={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Um={NONE:0,BACKGROUND:1,PREVIOUS:2},tb={SOURCE:0,OVER:1};class goe extends U6{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,t={}){super(e);const{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new mN,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=J0.UNKNOWN,this._filterMethod=_N.UNKNOWN,this._interlaceMethod=eb.UNKNOWN,this._colorType=us.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(xN(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(xN(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const n=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case uoe:poe(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-n!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?bN(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const n=this.offset;switch(t!=="fdAT"&&t!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e;break}if(this.offset-n!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?bN(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=moe(this.readUint8());const t=this.readUint8();this._colorType=t;let n;switch(t){case us.GREYSCALE:n=1;break;case us.TRUECOLOUR:n=3;break;case us.INDEXED_COLOUR:n=1;break;case us.GREYSCALE_ALPHA:n=2;break;case us.TRUECOLOUR_ALPHA:n=4;break;case us.UNKNOWN:default:throw new Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==J0.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const t=e/3;this._hasPalette=!0;const n=[];this._palette=n;for(let i=0;i<t;i++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(n+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case us.GREYSCALE:case us.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break}case us.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){const n=this.readByte();this._palette[t].push(n)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case us.UNKNOWN:case us.GREYSCALE_ALPHA:case us.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const t=UY(this),n=this.readUint8();if(n!==J0.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const i=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:Vse(i)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=wN({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{const i=this._apng.frames.at(e-1);this.disposeFrame(n,i,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case Um.NONE:break;case Um.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let a=0;a<this._png.width;a++){const o=(i*e.width+a)*this._png.channels;for(let u=0;u<this._png.channels;u++)n.data[o+u]=0}break;case Um.PREVIOUS:n.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const n=1<<this._png.depth,i=(a,o)=>{const u=((a+t.yOffset)*this._png.width+t.xOffset+o)*this._png.channels,c=(a*t.width+o)*this._png.channels;return{index:u,frameIndex:c}};switch(t.blendOp){case tb.SOURCE:for(let a=0;a<t.height;a++)for(let o=0;o<t.width;o++){const{index:u,frameIndex:c}=i(a,o);for(let h=0;h<this._png.channels;h++)e.data[u+h]=t.data[c+h]}break;case tb.OVER:for(let a=0;a<t.height;a++)for(let o=0;o<t.width;o++){const{index:u,frameIndex:c}=i(a,o);for(let h=0;h<this._png.channels;h++){const f=t.data[c+this._png.channels-1]/n,v=h%(this._png.channels-1)===0?1:t.data[c+h],y=Math.floor(f*v+(1-f)*e.data[u+h]);e.data[u+h]+=y}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==_N.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===eb.NO_INTERLACE)this._png.data=wN({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===eb.ADAM7)this._png.data=toe({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Um.NONE,blendOp:tb.SOURCE,data:e}),this._inflator=new mN,this._writingDataChunks=!1}}function moe(r){if(r!==1&&r!==2&&r!==4&&r!==8&&r!==16)throw new Error(`invalid bit depth: ${r}`);return r}var SN;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.METRE=1]="METRE"})(SN||(SN={}));function yoe(r,e){return new goe(r,e).decode()}var Qt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function rb(){Qt.console&&typeof Qt.console.log=="function"&&Qt.console.log.apply(Qt.console,arguments)}var Yr={log:rb,warn:function(r){Qt.console&&(typeof Qt.console.warn=="function"?Qt.console.warn.apply(Qt.console,arguments):rb.call(null,arguments))},error:function(r){Qt.console&&(typeof Qt.console.error=="function"?Qt.console.error.apply(Qt.console,arguments):rb(r))}};function nb(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){pd(n.response,e,t)},n.onerror=function(){Yr.error("could not download file")},n.send()}function EN(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Hm(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var pd=Qt.saveAs||((typeof window>"u"?"undefined":qr(window))!=="object"||window!==Qt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Qt.URL||Qt.webkitURL,i=document.createElement("a");e=e||r.name||"download",i.download=e,i.rel="noopener",typeof r=="string"?(i.href=r,i.origin!==location.origin?EN(i.href)?nb(r,e,t):Hm(i,i.target="_blank"):Hm(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Hm(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(EN(r))nb(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Hm(n)})}else navigator.msSaveOrOpenBlob((function(i,a){return a===void 0?a={autoBom:!1}:qr(a)!=="object"&&(Yr.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i})(r,t),e)}:function(r,e,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return nb(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Qt.HTMLElement)||Qt.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":qr(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var f=u.result;f=o?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location=f,n=null},u.readAsDataURL(r)}else{var c=Qt.URL||Qt.webkitURL,h=c.createObjectURL(r);n?n.location=h:location.href=h,n=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}});/**
|
|
454
|
+
* A class to parse color values
|
|
455
|
+
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
456
|
+
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
457
|
+
* @license Use it if you like it
|
|
458
|
+
*/function HY(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={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"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;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(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],n=0;n<t.length;n++){var i=t[n].re,a=t[n].process,o=i.exec(r);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[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 u=this.r.toString(16),c=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),c.length==1&&(c="0"+c),h.length==1&&(h="0"+h),"#"+u+c+h}}var a1=Qt.atob.bind(Qt),TN=Qt.btoa.bind(Qt);/**
|
|
459
|
+
* @license
|
|
460
|
+
* Joseph Myers does not specify a particular license for his work.
|
|
461
|
+
*
|
|
462
|
+
* Author: Joseph Myers
|
|
463
|
+
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
464
|
+
*
|
|
465
|
+
* Modified by: Owen Leong
|
|
466
|
+
*/function ib(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=ea(t,n,i,a,e[0],7,-680876936),a=ea(a,t,n,i,e[1],12,-389564586),i=ea(i,a,t,n,e[2],17,606105819),n=ea(n,i,a,t,e[3],22,-1044525330),t=ea(t,n,i,a,e[4],7,-176418897),a=ea(a,t,n,i,e[5],12,1200080426),i=ea(i,a,t,n,e[6],17,-1473231341),n=ea(n,i,a,t,e[7],22,-45705983),t=ea(t,n,i,a,e[8],7,1770035416),a=ea(a,t,n,i,e[9],12,-1958414417),i=ea(i,a,t,n,e[10],17,-42063),n=ea(n,i,a,t,e[11],22,-1990404162),t=ea(t,n,i,a,e[12],7,1804603682),a=ea(a,t,n,i,e[13],12,-40341101),i=ea(i,a,t,n,e[14],17,-1502002290),t=ta(t,n=ea(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=ta(a,t,n,i,e[6],9,-1069501632),i=ta(i,a,t,n,e[11],14,643717713),n=ta(n,i,a,t,e[0],20,-373897302),t=ta(t,n,i,a,e[5],5,-701558691),a=ta(a,t,n,i,e[10],9,38016083),i=ta(i,a,t,n,e[15],14,-660478335),n=ta(n,i,a,t,e[4],20,-405537848),t=ta(t,n,i,a,e[9],5,568446438),a=ta(a,t,n,i,e[14],9,-1019803690),i=ta(i,a,t,n,e[3],14,-187363961),n=ta(n,i,a,t,e[8],20,1163531501),t=ta(t,n,i,a,e[13],5,-1444681467),a=ta(a,t,n,i,e[2],9,-51403784),i=ta(i,a,t,n,e[7],14,1735328473),t=ra(t,n=ta(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=ra(a,t,n,i,e[8],11,-2022574463),i=ra(i,a,t,n,e[11],16,1839030562),n=ra(n,i,a,t,e[14],23,-35309556),t=ra(t,n,i,a,e[1],4,-1530992060),a=ra(a,t,n,i,e[4],11,1272893353),i=ra(i,a,t,n,e[7],16,-155497632),n=ra(n,i,a,t,e[10],23,-1094730640),t=ra(t,n,i,a,e[13],4,681279174),a=ra(a,t,n,i,e[0],11,-358537222),i=ra(i,a,t,n,e[3],16,-722521979),n=ra(n,i,a,t,e[6],23,76029189),t=ra(t,n,i,a,e[9],4,-640364487),a=ra(a,t,n,i,e[12],11,-421815835),i=ra(i,a,t,n,e[15],16,530742520),t=na(t,n=ra(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=na(a,t,n,i,e[7],10,1126891415),i=na(i,a,t,n,e[14],15,-1416354905),n=na(n,i,a,t,e[5],21,-57434055),t=na(t,n,i,a,e[12],6,1700485571),a=na(a,t,n,i,e[3],10,-1894986606),i=na(i,a,t,n,e[10],15,-1051523),n=na(n,i,a,t,e[1],21,-2054922799),t=na(t,n,i,a,e[8],6,1873313359),a=na(a,t,n,i,e[15],10,-30611744),i=na(i,a,t,n,e[6],15,-1560198380),n=na(n,i,a,t,e[13],21,1309151649),t=na(t,n,i,a,e[4],6,-145523070),a=na(a,t,n,i,e[11],10,-1120210379),i=na(i,a,t,n,e[2],15,718787259),n=na(n,i,a,t,e[9],21,-343485551),r[0]=yc(t,r[0]),r[1]=yc(n,r[1]),r[2]=yc(i,r[2]),r[3]=yc(a,r[3])}function U1(r,e,t,n,i,a){return e=yc(yc(e,r),yc(n,a)),yc(e<<i|e>>>32-i,t)}function ea(r,e,t,n,i,a,o){return U1(e&t|~e&n,r,e,i,a,o)}function ta(r,e,t,n,i,a,o){return U1(e&n|t&~n,r,e,i,a,o)}function ra(r,e,t,n,i,a,o){return U1(e^t^n,r,e,i,a,o)}function na(r,e,t,n,i,a,o){return U1(t^(e|~n),r,e,i,a,o)}function WY(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)ib(n,boe(r.substring(e-64,e)));r=r.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)i[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(ib(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,ib(n,i),n}function boe(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}var ON="0123456789abcdef".split("");function woe(r){for(var e="",t=0;t<4;t++)e+=ON[r>>8*t+4&15]+ON[r>>8*t&15];return e}function xoe(r){return String.fromCharCode(255&r,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function JO(r){return WY(r).map(xoe).join("")}var _oe=(function(r){for(var e=0;e<r.length;e++)r[e]=woe(r[e]);return r.join("")})(WY("hello"))!="5d41402abc4b2a76b9719d911017c592";function yc(r,e){if(_oe){var t=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&4294967295}/**
|
|
467
|
+
* @license
|
|
468
|
+
* FPDF is released under a permissive license: there is no usage restriction.
|
|
469
|
+
* You may embed it freely in your application (commercial or not), with or
|
|
470
|
+
* without modifications.
|
|
471
|
+
*
|
|
472
|
+
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
473
|
+
*/function e6(r,e){var t,n,i,a;if(r!==t){for(var o=(i=r,a=1+(256/r.length|0),new Array(a+1).join(i)),u=[],c=0;c<256;c++)u[c]=c;var h=0;for(c=0;c<256;c++){var f=u[c];h=(h+f+o.charCodeAt(c))%256,u[c]=u[h],u[h]=f}t=r,n=u}else u=n;var v=e.length,y=0,g=0,_="";for(c=0;c<v;c++)g=(g+(f=u[y=(y+1)%256]))%256,u[y]=u[g],u[g]=f,o=u[(u[y]+u[g])%256],_+=String.fromCharCode(e.charCodeAt(c)^o);return _}/**
|
|
474
|
+
* @license
|
|
475
|
+
* Licensed under the MIT License.
|
|
476
|
+
* http://opensource.org/licenses/mit-license
|
|
477
|
+
* Author: Owen Leong (@owenl131)
|
|
478
|
+
* Date: 15 Oct 2020
|
|
479
|
+
* References:
|
|
480
|
+
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
481
|
+
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
482
|
+
* http://www.fpdf.org/en/script/script37.php
|
|
483
|
+
*/var AN={print:4,modify:8,copy:16,"annot-forms":32};function of(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(u){if(AN.perm!==void 0)throw new Error("Invalid permission: "+u);i+=AN[u]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=JO(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=e6(this.encryptionKey,this.padding)}function lf(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,n=0;n<t;n++){var i=r.charCodeAt(n);e+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):r[n]}return e}function RN(r){if(qr(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,i){if(i=i||!1,typeof t!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[n,!!i],a},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[t]){var o=e[t][a];try{o[0].apply(r,n)}catch(u){Qt.console&&Yr.error("jsPDF PubSub Error",u.message,u)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function E1(r){if(!(this instanceof E1))return new E1(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function GY(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function vd(r,e,t,n,i){if(!(this instanceof vd))return new vd(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,GY.call(this,n,i)}function cf(r,e,t,n,i){if(!(this instanceof cf))return new cf(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,GY.call(this,n,i)}function Rt(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],o=[],u=1,c=16,h="S",f=null;qr(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,i=r.format||i,a=r.compress||r.compressPdf||a,(f=r.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),u=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(c=r.floatPrecision),h=r.defaultPathOperation||"S"),o=r.filters||(a===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var v=r.putOnlyUsedFonts||!1,y={},g={internal:{},__private__:{}};g.__private__.PubSub=RN;var _="1.3",E=g.__private__.getPdfVersion=function(){return _};g.__private__.setPdfVersion=function(O){_=O};var A={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]};g.__private__.getPageFormats=function(){return A};var T=g.__private__.getPageFormat=function(O){return A[O]};i=i||"a4";var C="compat",N="advanced",k=C;function j(){this.saveGraphicsState(),ne(new Dt(jt,0,0,-jt,0,Al()*jt).toString()+" cm"),this.setFontSize(this.getFontSize()/jt),h="n",k=N}function W(){this.restoreGraphicsState(),h="S",k=C}var G=g.__private__.combineFontStyleAndFontWeight=function(O,B){if(O=="bold"&&B=="normal"||O=="bold"&&B==400||O=="normal"&&B=="italic"||O=="bold"&&B=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return B&&(O=B==400||B==="normal"?O==="italic"?"italic":"normal":B!=700&&B!=="bold"||O!=="normal"?(B==700?"bold":B)+""+O:"bold"),O};g.advancedAPI=function(O){var B=k===C;return B&&j.call(this),typeof O!="function"||(O(this),B&&W.call(this)),this},g.compatAPI=function(O){var B=k===N;return B&&W.call(this),typeof O!="function"||(O(this),B&&j.call(this)),this},g.isAdvancedAPI=function(){return k===N};var D,M=function(O){if(k!==N)throw new Error(O+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},U=g.roundToPrecision=g.__private__.roundToPrecision=function(O,B){var ie=e||B;if(isNaN(O)||isNaN(ie))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return O.toFixed(ie).replace(/0+$/,"")};D=g.hpf=g.__private__.hpf=typeof c=="number"?function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return U(O,c)}:c==="smart"?function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return U(O,O>-1&&O<1?16:5)}:function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.hpf");return U(O,16)};var I=g.f2=g.__private__.f2=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.f2");return U(O,2)},q=g.__private__.f3=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.f3");return U(O,3)},z=g.scale=g.__private__.scale=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.scale");return k===C?O*jt:k===N?O:void 0},Q=function(O){return z((function(B){return k===C?Al()-B:k===N?B:void 0})(O))};g.__private__.setPrecision=g.setPrecision=function(O){typeof parseInt(O,10)=="number"&&(e=parseInt(O,10))};var ce,re="00000000000000000000000000000000",J=g.__private__.getFileId=function(){return re},le=g.__private__.setFileId=function(O){return re=O!==void 0&&/^[a-fA-F0-9]{32}$/.test(O)?O.toUpperCase():re.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(Kn=new of(f.userPermissions,f.userPassword,f.ownerPassword,re)),re};g.setFileId=function(O){return le(O),this},g.getFileId=function(){return J()};var ye=g.__private__.convertDateToPDFDate=function(O){var B=O.getTimezoneOffset(),ie=B<0?"+":"-",ve=Math.floor(Math.abs(B/60)),xe=Math.abs(B%60),Me=[ie,te(ve),"'",te(xe),"'"].join("");return["D:",O.getFullYear(),te(O.getMonth()+1),te(O.getDate()),te(O.getHours()),te(O.getMinutes()),te(O.getSeconds()),Me].join("")},Z=g.__private__.convertPDFDateToDate=function(O){var B=parseInt(O.substr(2,4),10),ie=parseInt(O.substr(6,2),10)-1,ve=parseInt(O.substr(8,2),10),xe=parseInt(O.substr(10,2),10),Me=parseInt(O.substr(12,2),10),Ge=parseInt(O.substr(14,2),10);return new Date(B,ie,ve,xe,Me,Ge,0)},oe=g.__private__.setCreationDate=function(O){var B;if(O===void 0&&(O=new Date),O instanceof Date)B=ye(O);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(O))throw new Error("Invalid argument passed to jsPDF.setCreationDate");B=O}return ce=B},L=g.__private__.getCreationDate=function(O){var B=ce;return O==="jsDate"&&(B=Z(ce)),B};g.setCreationDate=function(O){return oe(O),this},g.getCreationDate=function(O){return L(O)};var Y,te=g.__private__.padd2=function(O){return("0"+parseInt(O)).slice(-2)},de=g.__private__.padd2Hex=function(O){return("00"+(O=O.toString())).substr(O.length)},ue=0,we=[],Se=[],Ie=0,Le=[],Ve=[],tt=!1,Xe=Se;g.__private__.setCustomOutputDestination=function(O){tt=!0,Xe=O};var dt=function(O){tt||(Xe=O)};g.__private__.resetCustomOutputDestination=function(){tt=!1,Xe=Se};var ne=g.__private__.out=function(O){return O=O.toString(),Ie+=O.length+1,Xe.push(O),Xe},et=g.__private__.write=function(O){return ne(arguments.length===1?O.toString():Array.prototype.join.call(arguments," "))},st=g.__private__.getArrayBuffer=function(O){for(var B=O.length,ie=new ArrayBuffer(B),ve=new Uint8Array(ie);B--;)ve[B]=O.charCodeAt(B);return ie},ot=[["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]];g.__private__.getStandardFonts=function(){return ot};var We=r.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(O){return We=k===N?O/jt:O,this};var vt,it=g.__private__.getFontSize=g.getFontSize=function(){return k===C?We:We*jt},yt=r.R2L||!1;g.__private__.setR2L=g.setR2L=function(O){return yt=O,this},g.__private__.getR2L=g.getR2L=function(){return yt};var ut,qt=g.__private__.setZoomMode=function(O){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(O))vt=O;else if(isNaN(O)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(O)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+O+'" is not recognized.');vt=O}else vt=parseInt(O,10)};g.__private__.getZoomMode=function(){return vt};var Wt,At=g.__private__.setPageMode=function(O){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(O)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+O+'" is not recognized.');ut=O};g.__private__.getPageMode=function(){return ut};var Tt=g.__private__.setLayoutMode=function(O){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(O)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+O+'" is not recognized.');Wt=O};g.__private__.getLayoutMode=function(){return Wt},g.__private__.setDisplayMode=g.setDisplayMode=function(O,B,ie){return qt(O),Tt(B),At(ie),this};var It={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(O){if(Object.keys(It).indexOf(O)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return It[O]},g.__private__.getDocumentProperties=function(){return It},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(O){for(var B in It)It.hasOwnProperty(B)&&O[B]&&(It[B]=O[B]);return this},g.__private__.setDocumentProperty=function(O,B){if(Object.keys(It).indexOf(O)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return It[O]=B};var nt,jt,ze,Ke,fe,ke={},Be={},ht=[],lt={},or={},Ct={},Mt={},zt=null,Ht=0,Pt=[],yr=new RN(g),vs=r.hotfixes||[],Cr={},Ua={},Ha=[],Dt=function O(B,ie,ve,xe,Me,Ge){if(!(this instanceof O))return new O(B,ie,ve,xe,Me,Ge);isNaN(B)&&(B=1),isNaN(ie)&&(ie=0),isNaN(ve)&&(ve=0),isNaN(xe)&&(xe=1),isNaN(Me)&&(Me=0),isNaN(Ge)&&(Ge=0),this._matrix=[B,ie,ve,xe,Me,Ge]};Object.defineProperty(Dt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(O){this._matrix[0]=O}}),Object.defineProperty(Dt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(O){this._matrix[1]=O}}),Object.defineProperty(Dt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(O){this._matrix[2]=O}}),Object.defineProperty(Dt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(O){this._matrix[3]=O}}),Object.defineProperty(Dt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(O){this._matrix[4]=O}}),Object.defineProperty(Dt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(O){this._matrix[5]=O}}),Object.defineProperty(Dt.prototype,"a",{get:function(){return this._matrix[0]},set:function(O){this._matrix[0]=O}}),Object.defineProperty(Dt.prototype,"b",{get:function(){return this._matrix[1]},set:function(O){this._matrix[1]=O}}),Object.defineProperty(Dt.prototype,"c",{get:function(){return this._matrix[2]},set:function(O){this._matrix[2]=O}}),Object.defineProperty(Dt.prototype,"d",{get:function(){return this._matrix[3]},set:function(O){this._matrix[3]=O}}),Object.defineProperty(Dt.prototype,"e",{get:function(){return this._matrix[4]},set:function(O){this._matrix[4]=O}}),Object.defineProperty(Dt.prototype,"f",{get:function(){return this._matrix[5]},set:function(O){this._matrix[5]=O}}),Object.defineProperty(Dt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Dt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Dt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Dt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Dt.prototype.join=function(O){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(D).join(O)},Dt.prototype.multiply=function(O){var B=O.sx*this.sx+O.shy*this.shx,ie=O.sx*this.shy+O.shy*this.sy,ve=O.shx*this.sx+O.sy*this.shx,xe=O.shx*this.shy+O.sy*this.sy,Me=O.tx*this.sx+O.ty*this.shx+this.tx,Ge=O.tx*this.shy+O.ty*this.sy+this.ty;return new Dt(B,ie,ve,xe,Me,Ge)},Dt.prototype.decompose=function(){var O=this.sx,B=this.shy,ie=this.shx,ve=this.sy,xe=this.tx,Me=this.ty,Ge=Math.sqrt(O*O+B*B),bt=(O/=Ge)*ie+(B/=Ge)*ve;ie-=O*bt,ve-=B*bt;var gt=Math.sqrt(ie*ie+ve*ve);return bt/=gt,O*(ve/=gt)<B*(ie/=gt)&&(O=-O,B=-B,bt=-bt,Ge=-Ge),{scale:new Dt(Ge,0,0,gt,0,0),translate:new Dt(1,0,0,1,xe,Me),rotate:new Dt(O,B,-B,O,0,0),skew:new Dt(1,0,bt,1,0,0)}},Dt.prototype.toString=function(O){return this.join(" ")},Dt.prototype.inversed=function(){var O=this.sx,B=this.shy,ie=this.shx,ve=this.sy,xe=this.tx,Me=this.ty,Ge=1/(O*ve-B*ie),bt=ve*Ge,gt=-B*Ge,Gt=-ie*Ge,er=O*Ge;return new Dt(bt,gt,Gt,er,-bt*xe-Gt*Me,-gt*xe-er*Me)},Dt.prototype.applyToPoint=function(O){var B=O.x*this.sx+O.y*this.shx+this.tx,ie=O.x*this.shy+O.y*this.sy+this.ty;return new Gs(B,ie)},Dt.prototype.applyToRectangle=function(O){var B=this.applyToPoint(O),ie=this.applyToPoint(new Gs(O.x+O.w,O.y+O.h));return new Vs(B.x,B.y,ie.x-B.x,ie.y-B.y)},Dt.prototype.clone=function(){var O=this.sx,B=this.shy,ie=this.shx,ve=this.sy,xe=this.tx,Me=this.ty;return new Dt(O,B,ie,ve,xe,Me)},g.Matrix=Dt;var pi=g.matrixMult=function(O,B){return B.multiply(O)},Qr=new Dt(1,0,0,1,0,0);g.unitMatrix=g.identityMatrix=Qr;var Hr=function(O,B){if(!or[O]){var ie=(B instanceof vd?"Sh":"P")+(Object.keys(lt).length+1).toString(10);B.id=ie,or[O]=ie,lt[ie]=B,yr.publish("addPattern",B)}};g.ShadingPattern=vd,g.TilingPattern=cf,g.addShadingPattern=function(O,B){return M("addShadingPattern()"),Hr(O,B),this},g.beginTilingPattern=function(O){M("beginTilingPattern()"),Iu(O.boundingBox[0],O.boundingBox[1],O.boundingBox[2]-O.boundingBox[0],O.boundingBox[3]-O.boundingBox[1],O.matrix)},g.endTilingPattern=function(O,B){M("endTilingPattern()"),B.stream=Ve[Y].join(`
|
|
484
|
+
`),Hr(O,B),yr.publish("endTilingPattern",B),Ha.pop().restore()};var ai,Zr=g.__private__.newObject=function(){var O=Yn();return si(O,!0),O},Yn=g.__private__.newObjectDeferred=function(){return ue++,we[ue]=function(){return Ie},ue},si=function(O,B){return B=typeof B=="boolean"&&B,we[O]=Ie,B&&ne(O+" 0 obj"),O},Ro=g.__private__.newAdditionalObject=function(){var O={objId:Yn(),content:""};return Le.push(O),O},_a=Yn(),ia=Yn(),Mi=g.__private__.decodeColorString=function(O){var B=O.split(" ");if(B.length!==2||B[1]!=="g"&&B[1]!=="G")B.length!==5||B[4]!=="k"&&B[4]!=="K"||(B=[(1-B[0])*(1-B[3]),(1-B[1])*(1-B[3]),(1-B[2])*(1-B[3]),"r"]);else{var ie=parseFloat(B[0]);B=[ie,ie,ie,"r"]}for(var ve="#",xe=0;xe<3;xe++)ve+=("0"+Math.floor(255*parseFloat(B[xe])).toString(16)).slice(-2);return ve},vi=g.__private__.encodeColorString=function(O){var B;typeof O=="string"&&(O={ch1:O});var ie=O.ch1,ve=O.ch2,xe=O.ch3,Me=O.ch4,Ge=O.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof ie=="string"&&ie.charAt(0)!=="#"){var bt=new HY(ie);if(bt.ok)ie=bt.toHex();else if(!/^\d*\.?\d*$/.test(ie))throw new Error('Invalid color "'+ie+'" passed to jsPDF.encodeColorString.')}if(typeof ie=="string"&&/^#[0-9A-Fa-f]{3}$/.test(ie)&&(ie="#"+ie[1]+ie[1]+ie[2]+ie[2]+ie[3]+ie[3]),typeof ie=="string"&&/^#[0-9A-Fa-f]{6}$/.test(ie)){var gt=parseInt(ie.substr(1),16);ie=gt>>16&255,ve=gt>>8&255,xe=255>}if(ve===void 0||Me===void 0&&ie===ve&&ve===xe)B=typeof ie=="string"?ie+" "+Ge[0]:O.precision===2?I(ie/255)+" "+Ge[0]:q(ie/255)+" "+Ge[0];else if(Me===void 0||qr(Me)==="object"){if(Me&&!isNaN(Me.a)&&Me.a===0)return["1.","1.","1.",Ge[1]].join(" ");B=typeof ie=="string"?[ie,ve,xe,Ge[1]].join(" "):O.precision===2?[I(ie/255),I(ve/255),I(xe/255),Ge[1]].join(" "):[q(ie/255),q(ve/255),q(xe/255),Ge[1]].join(" ")}else B=typeof ie=="string"?[ie,ve,xe,Me,Ge[2]].join(" "):O.precision===2?[I(ie),I(ve),I(xe),I(Me),Ge[2]].join(" "):[q(ie),q(ve),q(xe),q(Me),Ge[2]].join(" ");return B},Di=g.__private__.getFilters=function(){return o},oi=g.__private__.putStream=function(O){var B=(O=O||{}).data||"",ie=O.filters||Di(),ve=O.alreadyAppliedFilters||[],xe=O.addLength1||!1,Me=B.length,Ge=O.objectId,bt=function(Wr){return Wr};if(f!==null&&Ge===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(bt=Kn.encryptor(Ge,0));var gt={};ie===!0&&(ie=["FlateEncode"]);var Gt=O.additionalKeyValues||[],er=(gt=Rt.API.processDataByFilters!==void 0?Rt.API.processDataByFilters(B,ie):{data:B,reverseChain:[]}).reverseChain+(Array.isArray(ve)?ve.join(" "):ve.toString());if(gt.data.length!==0&&(Gt.push({key:"Length",value:gt.data.length}),xe===!0&&Gt.push({key:"Length1",value:Me})),er.length!=0)if(er.split("/").length-1==1)Gt.push({key:"Filter",value:er});else{Gt.push({key:"Filter",value:"["+er+"]"});for(var fr=0;fr<Gt.length;fr+=1)if(Gt[fr].key==="DecodeParms"){for(var Rn=[],Nr=0;Nr<gt.reverseChain.split("/").length-1;Nr+=1)Rn.push("null");Rn.push(Gt[fr].value),Gt[fr].value="["+Rn.join(" ")+"]"}}ne("<<");for(var kr=0;kr<Gt.length;kr++)ne("/"+Gt[kr].key+" "+Gt[kr].value);ne(">>"),gt.data.length!==0&&(ne("stream"),ne(bt(gt.data)),ne("endstream"))},Jr=g.__private__.putPage=function(O){var B=O.number,ie=O.data,ve=O.objId,xe=O.contentsObjId;si(ve,!0),ne("<</Type /Page"),ne("/Parent "+O.rootDictionaryObjId+" 0 R"),ne("/Resources "+O.resourceDictionaryObjId+" 0 R"),ne("/MediaBox ["+parseFloat(D(O.mediaBox.bottomLeftX))+" "+parseFloat(D(O.mediaBox.bottomLeftY))+" "+D(O.mediaBox.topRightX)+" "+D(O.mediaBox.topRightY)+"]"),O.cropBox!==null&&ne("/CropBox ["+D(O.cropBox.bottomLeftX)+" "+D(O.cropBox.bottomLeftY)+" "+D(O.cropBox.topRightX)+" "+D(O.cropBox.topRightY)+"]"),O.bleedBox!==null&&ne("/BleedBox ["+D(O.bleedBox.bottomLeftX)+" "+D(O.bleedBox.bottomLeftY)+" "+D(O.bleedBox.topRightX)+" "+D(O.bleedBox.topRightY)+"]"),O.trimBox!==null&&ne("/TrimBox ["+D(O.trimBox.bottomLeftX)+" "+D(O.trimBox.bottomLeftY)+" "+D(O.trimBox.topRightX)+" "+D(O.trimBox.topRightY)+"]"),O.artBox!==null&&ne("/ArtBox ["+D(O.artBox.bottomLeftX)+" "+D(O.artBox.bottomLeftY)+" "+D(O.artBox.topRightX)+" "+D(O.artBox.topRightY)+"]"),typeof O.userUnit=="number"&&O.userUnit!==1&&ne("/UserUnit "+O.userUnit),yr.publish("putPage",{objId:ve,pageContext:Pt[B],pageNumber:B,page:ie}),ne("/Contents "+xe+" 0 R"),ne(">>"),ne("endobj");var Me=ie.join(`
|
|
485
|
+
`);return k===N&&(Me+=`
|
|
486
|
+
Q`),si(xe,!0),oi({data:Me,filters:Di(),objectId:xe}),ne("endobj"),ve},Wa=g.__private__.putPages=function(){var O,B,ie=[];for(O=1;O<=Ht;O++)Pt[O].objId=Yn(),Pt[O].contentsObjId=Yn();for(O=1;O<=Ht;O++)ie.push(Jr({number:O,data:Ve[O],objId:Pt[O].objId,contentsObjId:Pt[O].contentsObjId,mediaBox:Pt[O].mediaBox,cropBox:Pt[O].cropBox,bleedBox:Pt[O].bleedBox,trimBox:Pt[O].trimBox,artBox:Pt[O].artBox,userUnit:Pt[O].userUnit,rootDictionaryObjId:_a,resourceDictionaryObjId:ia}));si(_a,!0),ne("<</Type /Pages");var ve="/Kids [";for(B=0;B<Ht;B++)ve+=ie[B]+" 0 R ";ne(ve+"]"),ne("/Count "+Ht),ne(">>"),ne("endobj"),yr.publish("postPutPages")},Co=function(O){yr.publish("putFont",{font:O,out:ne,newObject:Zr,putStream:oi}),O.isAlreadyPutted!==!0&&(O.objectNumber=Zr(),ne("<<"),ne("/Type /Font"),ne("/BaseFont /"+lf(O.postScriptName)),ne("/Subtype /Type1"),typeof O.encoding=="string"&&ne("/Encoding /"+O.encoding),ne("/FirstChar 32"),ne("/LastChar 255"),ne(">>"),ne("endobj"))},Sa=function(O){O.objectNumber=Zr();var B=[];B.push({key:"Type",value:"/XObject"}),B.push({key:"Subtype",value:"/Form"}),B.push({key:"BBox",value:"["+[D(O.x),D(O.y),D(O.x+O.width),D(O.y+O.height)].join(" ")+"]"}),B.push({key:"Matrix",value:"["+O.matrix.toString()+"]"});var ie=O.pages[1].join(`
|
|
487
|
+
`);oi({data:ie,additionalKeyValues:B,objectId:O.objectNumber}),ne("endobj")},Ga=function(O,B){B||(B=21);var ie=Zr(),ve=(function(Ge,bt){var gt,Gt=[],er=1/(bt-1);for(gt=0;gt<1;gt+=er)Gt.push(gt);if(Gt.push(1),Ge[0].offset!=0){var fr={offset:0,color:Ge[0].color};Ge.unshift(fr)}if(Ge[Ge.length-1].offset!=1){var Rn={offset:1,color:Ge[Ge.length-1].color};Ge.push(Rn)}for(var Nr="",kr=0,Wr=0;Wr<Gt.length;Wr++){for(gt=Gt[Wr];gt>Ge[kr+1].offset;)kr++;var an=Ge[kr].offset,sn=(gt-an)/(Ge[kr+1].offset-an),yi=Ge[kr].color,Za=Ge[kr+1].color;Nr+=de(Math.round((1-sn)*yi[0]+sn*Za[0]).toString(16))+de(Math.round((1-sn)*yi[1]+sn*Za[1]).toString(16))+de(Math.round((1-sn)*yi[2]+sn*Za[2]).toString(16))}return Nr.trim()})(O.colors,B),xe=[];xe.push({key:"FunctionType",value:"0"}),xe.push({key:"Domain",value:"[0.0 1.0]"}),xe.push({key:"Size",value:"["+B+"]"}),xe.push({key:"BitsPerSample",value:"8"}),xe.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xe.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),oi({data:ve,additionalKeyValues:xe,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:ie}),ne("endobj"),O.objectNumber=Zr(),ne("<< /ShadingType "+O.type),ne("/ColorSpace /DeviceRGB");var Me="/Coords ["+D(parseFloat(O.coords[0]))+" "+D(parseFloat(O.coords[1]))+" ";O.type===2?Me+=D(parseFloat(O.coords[2]))+" "+D(parseFloat(O.coords[3])):Me+=D(parseFloat(O.coords[2]))+" "+D(parseFloat(O.coords[3]))+" "+D(parseFloat(O.coords[4]))+" "+D(parseFloat(O.coords[5])),ne(Me+="]"),O.matrix&&ne("/Matrix ["+O.matrix.toString()+"]"),ne("/Function "+ie+" 0 R"),ne("/Extend [true true]"),ne(">>"),ne("endobj")},xu=function(O,B){var ie=Yn(),ve=Zr();B.push({resourcesOid:ie,objectOid:ve}),O.objectNumber=ve;var xe=[];xe.push({key:"Type",value:"/Pattern"}),xe.push({key:"PatternType",value:"1"}),xe.push({key:"PaintType",value:"1"}),xe.push({key:"TilingType",value:"1"}),xe.push({key:"BBox",value:"["+O.boundingBox.map(D).join(" ")+"]"}),xe.push({key:"XStep",value:D(O.xStep)}),xe.push({key:"YStep",value:D(O.yStep)}),xe.push({key:"Resources",value:ie+" 0 R"}),O.matrix&&xe.push({key:"Matrix",value:"["+O.matrix.toString()+"]"}),oi({data:O.stream,additionalKeyValues:xe,objectId:O.objectNumber}),ne("endobj")},lh=function(O){for(var B in O.objectNumber=Zr(),ne("<<"),O)switch(B){case"opacity":ne("/ca "+I(O[B]));break;case"stroke-opacity":ne("/CA "+I(O[B]))}ne(">>"),ne("endobj")},_u=function(O){si(O.resourcesOid,!0),ne("<<"),ne("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var B in ne("/Font <<"),ke)ke.hasOwnProperty(B)&&(v===!1||v===!0&&y.hasOwnProperty(B))&&ne("/"+B+" "+ke[B].objectNumber+" 0 R");ne(">>")})(),(function(){if(Object.keys(lt).length>0){for(var B in ne("/Shading <<"),lt)lt.hasOwnProperty(B)&<[B]instanceof vd&<[B].objectNumber>=0&&ne("/"+B+" "+lt[B].objectNumber+" 0 R");yr.publish("putShadingPatternDict"),ne(">>")}})(),(function(B){if(Object.keys(lt).length>0){for(var ie in ne("/Pattern <<"),lt)lt.hasOwnProperty(ie)&<[ie]instanceof g.TilingPattern&<[ie].objectNumber>=0&<[ie].objectNumber<B&&ne("/"+ie+" "+lt[ie].objectNumber+" 0 R");yr.publish("putTilingPatternDict"),ne(">>")}})(O.objectOid),(function(){if(Object.keys(Ct).length>0){var B;for(B in ne("/ExtGState <<"),Ct)Ct.hasOwnProperty(B)&&Ct[B].objectNumber>=0&&ne("/"+B+" "+Ct[B].objectNumber+" 0 R");yr.publish("putGStateDict"),ne(">>")}})(),(function(){for(var B in ne("/XObject <<"),Cr)Cr.hasOwnProperty(B)&&Cr[B].objectNumber>=0&&ne("/"+B+" "+Cr[B].objectNumber+" 0 R");yr.publish("putXobjectDict"),ne(">>")})(),ne(">>"),ne("endobj")},uh=function(O){Be[O.fontName]=Be[O.fontName]||{},Be[O.fontName][O.fontStyle]=O.id},yl=function(O,B,ie,ve,xe){var Me={id:"F"+(Object.keys(ke).length+1).toString(10),postScriptName:O,fontName:B,fontStyle:ie,encoding:ve,isStandardFont:xe||!1,metadata:{}};return yr.publish("addFont",{font:Me,instance:this}),ke[Me.id]=Me,uh(Me),Me.id},qi=g.__private__.pdfEscape=g.pdfEscape=function(O,B){return(function(ie,ve){var xe,Me,Ge,bt,gt,Gt,er,fr,Rn;if(Ge=(ve=ve||{}).sourceEncoding||"Unicode",gt=ve.outputEncoding,(ve.autoencode||gt)&&ke[nt].metadata&&ke[nt].metadata[Ge]&&ke[nt].metadata[Ge].encoding&&(bt=ke[nt].metadata[Ge].encoding,!gt&&ke[nt].encoding&&(gt=ke[nt].encoding),!gt&&bt.codePages&&(gt=bt.codePages[0]),typeof gt=="string"&&(gt=bt[gt]),gt)){for(er=!1,Gt=[],xe=0,Me=ie.length;xe<Me;xe++)(fr=gt[ie.charCodeAt(xe)])?Gt.push(String.fromCharCode(fr)):Gt.push(ie[xe]),Gt[xe].charCodeAt(0)>>8&&(er=!0);ie=Gt.join("")}for(xe=ie.length;er===void 0&&xe!==0;)ie.charCodeAt(xe-1)>>8&&(er=!0),xe--;if(!er)return ie;for(Gt=ve.noBOM?[]:[254,255],xe=0,Me=ie.length;xe<Me;xe++){if((Rn=(fr=ie.charCodeAt(xe))>>8)>>8)throw new Error("Character at position "+xe+" of string '"+ie+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Gt.push(Rn),Gt.push(fr-(Rn<<8))}return String.fromCharCode.apply(void 0,Gt)})(O,B).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},aa=g.__private__.beginPage=function(O){Ve[++Ht]=[],Pt[Ht]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(O[0]),topRightY:Number(O[1])}},Us(Ht),dt(Ve[Y])},Su=function(O,B){var ie,ve,xe;switch(t=B||t,typeof O=="string"&&(ie=T(O.toLowerCase()),Array.isArray(ie)&&(ve=ie[0],xe=ie[1])),Array.isArray(O)&&(ve=O[0]*jt,xe=O[1]*jt),isNaN(ve)&&(ve=i[0],xe=i[1]),(ve>14400||xe>14400)&&(Yr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ve=Math.min(14400,ve),xe=Math.min(14400,xe)),i=[ve,xe],t.substr(0,1)){case"l":xe>ve&&(i=[xe,ve]);break;case"p":ve>xe&&(i=[xe,ve])}aa(i),El(Lt),ne(Hs),Ws!==0&&ne(Ws+" J"),Mo!==0&&ne(Mo+" j"),yr.publish("addPage",{pageNumber:Ht})},Eu=function(O){O>0&&O<=Ht&&(Ve.splice(O,1),Pt.splice(O,1),Ht--,Y>Ht&&(Y=Ht),this.setPage(Y))},Us=function(O){O>0&&O<=Ht&&(Y=O)},Tu=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return Ve.length-1},Ou=function(O,B,ie){var ve,xe=void 0;return ie=ie||{},O=O!==void 0?O:ke[nt].fontName,B=B!==void 0?B:ke[nt].fontStyle,ve=O.toLowerCase(),Be[ve]!==void 0&&Be[ve][B]!==void 0?xe=Be[ve][B]:Be[O]!==void 0&&Be[O][B]!==void 0?xe=Be[O][B]:ie.disableWarning===!1&&Yr.warn("Unable to look up font label for font '"+O+"', '"+B+"'. Refer to getFontList() for available fonts."),xe||ie.noFallback||(xe=Be.times[B])==null&&(xe=Be.times.normal),xe},gs=g.__private__.putInfo=function(){var O=Zr(),B=function(ve){return ve};for(var ie in f!==null&&(B=Kn.encryptor(O,0)),ne("<<"),ne("/Producer ("+qi(B("jsPDF "+Rt.version))+")"),It)It.hasOwnProperty(ie)&&It[ie]&&ne("/"+ie.substr(0,1).toUpperCase()+ie.substr(1)+" ("+qi(B(It[ie]))+")");ne("/CreationDate ("+qi(B(ce))+")"),ne(">>"),ne("endobj")},bl=g.__private__.putCatalog=function(O){var B=(O=O||{}).rootDictionaryObjId||_a;switch(Zr(),ne("<<"),ne("/Type /Catalog"),ne("/Pages "+B+" 0 R"),vt||(vt="fullwidth"),vt){case"fullwidth":ne("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ne("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ne("/OpenAction [3 0 R /Fit]");break;case"original":ne("/OpenAction [3 0 R /XYZ null null 1]");break;default:var ie=""+vt;ie.substr(ie.length-1)==="%"&&(vt=parseInt(vt)/100),typeof vt=="number"&&ne("/OpenAction [3 0 R /XYZ null null "+I(vt)+"]")}switch(Wt||(Wt="continuous"),Wt){case"continuous":ne("/PageLayout /OneColumn");break;case"single":ne("/PageLayout /SinglePage");break;case"two":case"twoleft":ne("/PageLayout /TwoColumnLeft");break;case"tworight":ne("/PageLayout /TwoColumnRight")}ut&&ne("/PageMode /"+ut),yr.publish("putCatalog"),ne(">>"),ne("endobj")},Zi=g.__private__.putTrailer=function(){ne("trailer"),ne("<<"),ne("/Size "+(ue+1)),ne("/Root "+ue+" 0 R"),ne("/Info "+(ue-1)+" 0 R"),f!==null&&ne("/Encrypt "+Kn.oid+" 0 R"),ne("/ID [ <"+re+"> <"+re+"> ]"),ne(">>")},yn=g.__private__.putHeader=function(){ne("%PDF-"+_),ne("%ºß¬à")},ch=g.__private__.putXRef=function(){var O="0000000000";ne("xref"),ne("0 "+(ue+1)),ne("0000000000 65535 f ");for(var B=1;B<=ue;B++)typeof we[B]=="function"?ne((O+we[B]()).slice(-10)+" 00000 n "):we[B]!==void 0?ne((O+we[B]).slice(-10)+" 00000 n "):ne("0000000000 00000 n ")},sa=g.__private__.buildDocument=function(){var O;ue=0,Ie=0,Se=[],we=[],Le=[],_a=Yn(),ia=Yn(),dt(Se),yr.publish("buildDocument"),yn(),Wa(),(function(){yr.publish("putAdditionalObjects");for(var ie=0;ie<Le.length;ie++){var ve=Le[ie];si(ve.objId,!0),ne(ve.content),ne("endobj")}yr.publish("postPutAdditionalObjects")})(),O=[],(function(){for(var ie in ke)ke.hasOwnProperty(ie)&&(v===!1||v===!0&&y.hasOwnProperty(ie))&&Co(ke[ie])})(),(function(){var ie;for(ie in Ct)Ct.hasOwnProperty(ie)&&lh(Ct[ie])})(),(function(){for(var ie in Cr)Cr.hasOwnProperty(ie)&&Sa(Cr[ie])})(),(function(ie){var ve;for(ve in lt)lt.hasOwnProperty(ve)&&(lt[ve]instanceof vd?Ga(lt[ve]):lt[ve]instanceof cf&&xu(lt[ve],ie))})(O),yr.publish("putResources"),O.forEach(_u),_u({resourcesOid:ia,objectOid:Number.MAX_SAFE_INTEGER}),yr.publish("postPutResources"),f!==null&&(Kn.oid=Zr(),ne("<<"),ne("/Filter /Standard"),ne("/V "+Kn.v),ne("/R "+Kn.r),ne("/U <"+Kn.toHexString(Kn.U)+">"),ne("/O <"+Kn.toHexString(Kn.O)+">"),ne("/P "+Kn.P),ne(">>"),ne("endobj")),gs(),bl();var B=Ie;return ch(),Zi(),ne("startxref"),ne(""+B),ne("%%EOF"),dt(Ve[Y]),Se.join(`
|
|
488
|
+
`)},wl=g.__private__.getBlob=function(O){return new Blob([st(O)],{type:"application/pdf"})},ko=function(O){for(;O.firstChild;)O.removeChild(O.firstChild)},oa=function(O){var B,ie=O.document,ve=ie.documentElement,xe=ie.head,Me=ie.body;return xe||(xe=ie.createElement("head"),ve.appendChild(xe)),Me||(Me=ie.createElement("body"),ve.appendChild(Me)),ko(xe),ko(Me),(B=ie.createElement("style")).appendChild(ie.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),xe.appendChild(B),{document:ie,body:Me}},li=g.output=g.__private__.output=(ai=function(O,B){switch(typeof(B=B||{})=="string"?B={filename:B}:B.filename=B.filename||"generated.pdf",O){case void 0:return sa();case"save":g.save(B.filename);break;case"arraybuffer":return st(sa());case"blob":return wl(sa());case"bloburi":case"bloburl":if(Qt.URL!==void 0&&typeof Qt.URL.createObjectURL=="function")return Qt.URL&&Qt.URL.createObjectURL(wl(sa()))||void 0;Yr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var ie="",ve=sa();try{ie=TN(ve)}catch{ie=TN(unescape(encodeURIComponent(ve)))}return"data:application/pdf;filename="+encodeURIComponent(B.filename)+";base64,"+ie;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Qt)==="[object Window]"){var xe="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Me=!B.pdfObjectUrl;Me||(xe=B.pdfObjectUrl);var Ge=Qt.open();if(Ge!==null){var bt=oa(Ge),gt=bt.document.createElement("script"),Gt=this;gt.src=xe,Me&&(gt.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",gt.crossOrigin="anonymous"),gt.onload=function(){Ge.PDFObject.embed(Gt.output("dataurlstring"),B)},bt.body.appendChild(gt)}return Ge}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Qt)==="[object Window]"){var er=B.pdfJsUrl||"examples/PDF.js/web/viewer.html",fr=Qt.open();if(fr!==null){var Rn=oa(fr),Nr=Rn.document.createElement("iframe"),kr=er.indexOf("?")===-1?"?":"&";Gt=this,Nr.id="pdfViewer",Nr.width="500px",Nr.height="400px",Nr.src=er+kr+"file=&downloadName="+encodeURIComponent(B.filename),Nr.onload=function(){fr.document.title=B.filename,Nr.contentWindow.PDFViewerApplication.open(Gt.output("bloburl"))},Rn.body.appendChild(Nr)}return fr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Qt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Wr=Qt.open();if(Wr!==null){var an=oa(Wr),sn=an.document.createElement("iframe");sn.src=this.output("datauristring",B),an.body.appendChild(sn),Wr.document.title=B.filename}if(Wr||typeof safari>"u")return Wr;break;case"datauri":case"dataurl":return Qt.document.location.href=this.output("datauristring",B);default:return null}},ai.foo=function(){try{return ai.apply(this,arguments)}catch(ie){var O=ie.stack||"";~O.indexOf(" at ")&&(O=O.split(" at ")[1]);var B="Error in function "+O.split(`
|
|
489
|
+
`)[0].split("<")[0]+": "+ie.message;if(!Qt.console)throw new Error(B);Qt.console.error(B,ie),Qt.alert&&alert(B)}},ai.foo.bar=ai,ai.foo),Va=function(O){return Array.isArray(vs)===!0&&vs.indexOf(O)>-1};switch(n){case"pt":jt=1;break;case"mm":jt=72/25.4;break;case"cm":jt=72/2.54;break;case"in":jt=72;break;case"px":jt=Va("px_scaling")==1?.75:96/72;break;case"pc":case"em":jt=12;break;case"ex":jt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);jt=n}var Kn=null;oe(),le();var Au=g.__private__.getPageInfo=g.getPageInfo=function(O){if(isNaN(O)||O%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Pt[O].objId,pageNumber:O,pageContext:Pt[O]}},No=g.__private__.getPageInfoByObjId=function(O){if(isNaN(O)||O%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var B in Pt)if(Pt[B].objId===O)break;return Au(B)},dh=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:Pt[Y].objId,pageNumber:Y,pageContext:Pt[Y]}};g.addPage=function(){return Su.apply(this,arguments),this},g.setPage=function(){return Us.apply(this,arguments),dt.call(this,Ve[Y]),this},g.insertPage=function(O){return this.addPage(),this.movePage(Y,O),this},g.movePage=function(O,B){var ie,ve;if(O>B){ie=Ve[O],ve=Pt[O];for(var xe=O;xe>B;xe--)Ve[xe]=Ve[xe-1],Pt[xe]=Pt[xe-1];Ve[B]=ie,Pt[B]=ve,this.setPage(B)}else if(O<B){ie=Ve[O],ve=Pt[O];for(var Me=O;Me<B;Me++)Ve[Me]=Ve[Me+1],Pt[Me]=Pt[Me+1];Ve[B]=ie,Pt[B]=ve,this.setPage(B)}return this},g.deletePage=function(){return Eu.apply(this,arguments),this},g.__private__.text=g.text=function(O,B,ie,ve,xe){var Me,Ge,bt,gt,Gt,er,fr,Rn,Nr,kr=(ve=ve||{}).scope||this;if(typeof O=="number"&&typeof B=="number"&&(typeof ie=="string"||Array.isArray(ie))){var Wr=ie;ie=B,B=O,O=Wr}if(arguments[3]instanceof Dt==0?(bt=arguments[4],gt=arguments[5],qr(fr=arguments[3])==="object"&&fr!==null||(typeof bt=="string"&&(gt=bt,bt=null),typeof fr=="string"&&(gt=fr,fr=null),typeof fr=="number"&&(bt=fr,fr=null),ve={flags:fr,angle:bt,align:gt})):(M("The transform parameter of text() with a Matrix value"),Nr=xe),isNaN(B)||isNaN(ie)||O==null)throw new Error("Invalid arguments passed to jsPDF.text");if(O.length===0)return kr;var an,sn="",yi=typeof ve.lineHeightFactor=="number"?ve.lineHeightFactor:Po,Za=kr.internal.scaleFactor;function Xs(Ir){return Ir=Ir.split(" ").join(Array(ve.TabLen||9).join(" ")),qi(Ir,fr)}function Rl(Ir){for(var xr,un=Ir.concat(),Cn=[],bs=un.length;bs--;)typeof(xr=un.shift())=="string"?Cn.push(xr):Array.isArray(Ir)&&(xr.length===1||xr[1]===void 0&&xr[2]===void 0)?Cn.push(xr[0]):Cn.push([xr[0],xr[1],xr[2]]);return Cn}function Do(Ir,xr){var un;if(typeof Ir=="string")un=xr(Ir)[0];else if(Array.isArray(Ir)){for(var Cn,bs,Hc=Ir.concat(),Bu=[],_h=Hc.length;_h--;)typeof(Cn=Hc.shift())=="string"?Bu.push(xr(Cn)[0]):Array.isArray(Cn)&&typeof Cn[0]=="string"&&(bs=xr(Cn[0],Cn[1],Cn[2]),Bu.push([bs[0],bs[1],bs[2]]));un=Bu}return un}var Qs=!1,qo=!0;if(typeof O=="string")Qs=!0;else if(Array.isArray(O)){var Cl=O.concat();Ge=[];for(var kl,bn=Cl.length;bn--;)(typeof(kl=Cl.shift())!="string"||Array.isArray(kl)&&typeof kl[0]!="string")&&(qo=!1);Qs=qo}if(Qs===!1)throw new Error('Type of text must be string or Array. "'+O+'" is not recognized.');typeof O=="string"&&(O=O.match(/[\r?\n]/)?O.split(/\r\n|\r|\n/g):[O]);var Nl=We/kr.internal.scaleFactor,Il=Nl*(yi-1);switch(ve.baseline){case"bottom":ie-=Il;break;case"top":ie+=Nl-Il;break;case"hanging":ie+=Nl-2*Il;break;case"middle":ie+=Nl/2-Il}if((er=ve.maxWidth||0)>0&&(typeof O=="string"?O=kr.splitTextToSize(O,er):Object.prototype.toString.call(O)==="[object Array]"&&(O=O.reduce(function(Ir,xr){return Ir.concat(kr.splitTextToSize(xr,er))},[]))),Me={text:O,x:B,y:ie,options:ve,mutex:{pdfEscape:qi,activeFontKey:nt,fonts:ke,activeFontSize:We}},yr.publish("preProcessText",Me),O=Me.text,bt=(ve=Me.options).angle,Nr instanceof Dt==0&&bt&&typeof bt=="number"){bt*=Math.PI/180,ve.rotationDirection===0&&(bt=-bt),k===N&&(bt=-bt);var Uc=Math.cos(bt),Ja=Math.sin(bt);Nr=new Dt(Uc,Ja,-Ja,Uc,0,0)}else bt&&bt instanceof Dt&&(Nr=bt);k!==N||Nr||(Nr=Qr),(Gt=ve.charSpace||Ea)!==void 0&&(sn+=D(z(Gt))+` Tc
|
|
490
|
+
`,this.setCharSpace(this.getCharSpace()||0)),(Rn=ve.horizontalScale)!==void 0&&(sn+=D(100*Rn)+` Tz
|
|
491
|
+
`),ve.lang;var bi=-1,Lo=ve.renderingMode!==void 0?ve.renderingMode:ve.stroke,ys=kr.internal.getCurrentPageInfo().pageContext;switch(Lo){case 0:case!1:case"fill":bi=0;break;case 1:case!0:case"stroke":bi=1;break;case 2:case"fillThenStroke":bi=2;break;case 3:case"invisible":bi=3;break;case 4:case"fillAndAddForClipping":bi=4;break;case 5:case"strokeAndAddPathForClipping":bi=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":bi=6;break;case 7:case"addToPathForClipping":bi=7}var xh=ys.usedRenderingMode!==void 0?ys.usedRenderingMode:-1;bi!==-1?sn+=bi+` Tr
|
|
492
|
+
`:xh!==-1&&(sn+=`0 Tr
|
|
493
|
+
`),bi!==-1&&(ys.usedRenderingMode=bi),gt=ve.align||"left";var $i,$o=We*yi,ju=kr.internal.pageSize.getWidth(),Bo=ke[nt];Gt=ve.charSpace||Ea,er=ve.maxWidth||0,fr=Object.assign({autoencode:!0,noBOM:!0},ve.flags);var Zs=[],Mu=function(Ir){return kr.getStringUnitWidth(Ir,{font:Bo,charSpace:Gt,fontSize:We,doKerning:!1})*We/Za};if(Object.prototype.toString.call(O)==="[object Array]"){var wi;Ge=Rl(O),gt!=="left"&&($i=Ge.map(Mu));var Bi,Du=0;if(gt==="right"){B-=$i[0],O=[],bn=Ge.length;for(var Fo=0;Fo<bn;Fo++)Fo===0?(Bi=gi(B),wi=Ka(ie)):(Bi=z(Du-$i[Fo]),wi=-$o),O.push([Ge[Fo],Bi,wi]),Du=$i[Fo]}else if(gt==="center"){B-=$i[0]/2,O=[],bn=Ge.length;for(var zo=0;zo<bn;zo++)zo===0?(Bi=gi(B),wi=Ka(ie)):(Bi=z((Du-$i[zo])/2),wi=-$o),O.push([Ge[zo],Bi,wi]),Du=$i[zo]}else if(gt==="left"){O=[],bn=Ge.length;for(var qu=0;qu<bn;qu++)O.push(Ge[qu])}else if(gt==="justify"&&Bo.encoding==="Identity-H"){O=[],bn=Ge.length,er=er!==0?er:ju;for(var Pl=0,wr=0;wr<bn;wr++)if(wi=wr===0?Ka(ie):-$o,Bi=wr===0?gi(B):Pl,wr<bn-1){var jl=z((er-$i[wr])/(Ge[wr].split(" ").length-1)),es=Ge[wr].split(" ");O.push([es[0]+" ",Bi,wi]),Pl=0;for(var Ta=1;Ta<es.length;Ta++){var Uo=(Mu(es[Ta-1]+" "+es[Ta])-Mu(es[Ta]))*Za+jl;Ta==es.length-1?O.push([es[Ta],Uo,0]):O.push([es[Ta]+" ",Uo,0]),Pl-=Uo}}else O.push([Ge[wr],Bi,wi]);O.push(["",Pl,0])}else{if(gt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(O=[],bn=Ge.length,er=er!==0?er:ju,wr=0;wr<bn;wr++){wi=wr===0?Ka(ie):-$o,Bi=wr===0?gi(B):0;var Lu=Ge[wr].split(" ").length-1,Ml=Lu>0?(er-$i[wr])/Lu:0;wr<bn-1?Zs.push(D(z(Ml))):Zs.push(0),O.push([Ge[wr],Bi,wi])}}}(typeof ve.R2L=="boolean"?ve.R2L:yt)===!0&&(O=Do(O,function(Ir,xr,un){return[Ir.split("").reverse().join(""),xr,un]})),Me={text:O,x:B,y:ie,options:ve,mutex:{pdfEscape:qi,activeFontKey:nt,fonts:ke,activeFontSize:We}},yr.publish("postProcessText",Me),O=Me.text,an=Me.mutex.isHex||!1;var $u=ke[nt].encoding;$u!=="WinAnsiEncoding"&&$u!=="StandardEncoding"||(O=Do(O,function(Ir,xr,un){return[Xs(Ir),xr,un]})),Ge=Rl(O),O=[];for(var Oa,Js,Aa,ts=Array.isArray(Ge[0])?1:0,eo="",Ra=function(Ir,xr,un){var Cn="";return un instanceof Dt?(un=typeof ve.angle=="number"?pi(un,new Dt(1,0,0,1,Ir,xr)):pi(new Dt(1,0,0,1,Ir,xr),un),k===N&&(un=pi(new Dt(1,0,0,-1,0,0),un)),Cn=un.join(" ")+` Tm
|
|
494
|
+
`):Cn=D(Ir)+" "+D(xr)+` Td
|
|
495
|
+
`,Cn},wn=0;wn<Ge.length;wn++){switch(eo="",ts){case 1:Aa=(an?"<":"(")+Ge[wn][0]+(an?">":")"),Oa=parseFloat(Ge[wn][1]),Js=parseFloat(Ge[wn][2]);break;case 0:Aa=(an?"<":"(")+Ge[wn]+(an?">":")"),Oa=gi(B),Js=Ka(ie)}Zs!==void 0&&Zs[wn]!==void 0&&(eo=Zs[wn]+` Tw
|
|
496
|
+
`),wn===0?O.push(eo+Ra(Oa,Js,Nr)+Aa):ts===0?O.push(eo+Aa):ts===1&&O.push(eo+Ra(Oa,Js,Nr)+Aa)}O=ts===0?O.join(` Tj
|
|
497
|
+
T* `):O.join(` Tj
|
|
498
|
+
`),O+=` Tj
|
|
499
|
+
`;var Ca=`BT
|
|
500
|
+
/`;return Ca+=nt+" "+We+` Tf
|
|
501
|
+
`,Ca+=D(We*yi)+` TL
|
|
502
|
+
`,Ca+=Xa+`
|
|
503
|
+
`,Ca+=sn,Ca+=O,ne(Ca+="ET"),y[nt]=!0,kr};var hh=g.__private__.clip=g.clip=function(O){return ne(O==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return hh("evenodd")},g.__private__.discardPath=g.discardPath=function(){return ne("n"),this};var Li=g.__private__.isValidStyle=function(O){var B=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(O)!==-1&&(B=!0),B};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(O){return Li(O)&&(h=O),this};var fh=g.__private__.getStyle=g.getStyle=function(O){var B=h;switch(O){case"D":case"S":B="S";break;case"F":B="f";break;case"FD":case"DF":B="B";break;case"f":case"f*":case"B":case"B*":B=O}return B},xl=g.close=function(){return ne("h"),this};g.stroke=function(){return ne("S"),this},g.fill=function(O){return _l("f",O),this},g.fillEvenOdd=function(O){return _l("f*",O),this},g.fillStroke=function(O){return _l("B",O),this},g.fillStrokeEvenOdd=function(O){return _l("B*",O),this};var _l=function(O,B){qr(B)==="object"?gp(B,O):ne(O)},Sl=function(O){O===null||k===N&&O===void 0||(O=fh(O),ne(O))};function vp(O,B,ie,ve,xe){var Me=new cf(B||this.boundingBox,ie||this.xStep,ve||this.yStep,this.gState,xe||this.matrix);Me.stream=this.stream;var Ge=O+"$$"+this.cloneIndex+++"$$";return Hr(Ge,Me),Me}var gp=function(O,B){var ie=or[O.key],ve=lt[ie];if(ve instanceof vd)ne("q"),ne(Ru(B)),ve.gState&&g.setGState(ve.gState),ne(O.matrix.toString()+" cm"),ne("/"+ie+" sh"),ne("Q");else if(ve instanceof cf){var xe=new Dt(1,0,0,-1,0,Al());O.matrix&&(xe=xe.multiply(O.matrix||Qr),ie=vp.call(ve,O.key,O.boundingBox,O.xStep,O.yStep,xe).id),ne("q"),ne("/Pattern cs"),ne("/"+ie+" scn"),ve.gState&&g.setGState(ve.gState),ne(B),ne("Q")}},Ru=function(O){switch(O){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},ms=g.moveTo=function(O,B){return ne(D(z(O))+" "+D(Q(B))+" m"),this},Cu=g.lineTo=function(O,B){return ne(D(z(O))+" "+D(Q(B))+" l"),this},la=g.curveTo=function(O,B,ie,ve,xe,Me){return ne([D(z(O)),D(Q(B)),D(z(ie)),D(Q(ve)),D(z(xe)),D(Q(Me)),"c"].join(" ")),this};g.__private__.line=g.line=function(O,B,ie,ve,xe){if(isNaN(O)||isNaN(B)||isNaN(ie)||isNaN(ve)||!Li(xe))throw new Error("Invalid arguments passed to jsPDF.line");return k===C?this.lines([[ie-O,ve-B]],O,B,[1,1],xe||"S"):this.lines([[ie-O,ve-B]],O,B,[1,1]).stroke()},g.__private__.lines=g.lines=function(O,B,ie,ve,xe,Me){var Ge,bt,gt,Gt,er,fr,Rn,Nr,kr,Wr,an,sn;if(typeof O=="number"&&(sn=ie,ie=B,B=O,O=sn),ve=ve||[1,1],Me=Me||!1,isNaN(B)||isNaN(ie)||!Array.isArray(O)||!Array.isArray(ve)||!Li(xe)||typeof Me!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(ms(B,ie),Ge=ve[0],bt=ve[1],Gt=O.length,Wr=B,an=ie,gt=0;gt<Gt;gt++)(er=O[gt]).length===2?(Wr=er[0]*Ge+Wr,an=er[1]*bt+an,Cu(Wr,an)):(fr=er[0]*Ge+Wr,Rn=er[1]*bt+an,Nr=er[2]*Ge+Wr,kr=er[3]*bt+an,Wr=er[4]*Ge+Wr,an=er[5]*bt+an,la(fr,Rn,Nr,kr,Wr,an));return Me&&xl(),Sl(xe),this},g.path=function(O){for(var B=0;B<O.length;B++){var ie=O[B],ve=ie.c;switch(ie.op){case"m":ms(ve[0],ve[1]);break;case"l":Cu(ve[0],ve[1]);break;case"c":la.apply(this,ve);break;case"h":xl()}}return this},g.__private__.rect=g.rect=function(O,B,ie,ve,xe){if(isNaN(O)||isNaN(B)||isNaN(ie)||isNaN(ve)||!Li(xe))throw new Error("Invalid arguments passed to jsPDF.rect");return k===C&&(ve=-ve),ne([D(z(O)),D(Q(B)),D(z(ie)),D(z(ve)),"re"].join(" ")),Sl(xe),this},g.__private__.triangle=g.triangle=function(O,B,ie,ve,xe,Me,Ge){if(isNaN(O)||isNaN(B)||isNaN(ie)||isNaN(ve)||isNaN(xe)||isNaN(Me)||!Li(Ge))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[ie-O,ve-B],[xe-ie,Me-ve],[O-xe,B-Me]],O,B,[1,1],Ge,!0),this},g.__private__.roundedRect=g.roundedRect=function(O,B,ie,ve,xe,Me,Ge){if(isNaN(O)||isNaN(B)||isNaN(ie)||isNaN(ve)||isNaN(xe)||isNaN(Me)||!Li(Ge))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var bt=4/3*(Math.SQRT2-1);return xe=Math.min(xe,.5*ie),Me=Math.min(Me,.5*ve),this.lines([[ie-2*xe,0],[xe*bt,0,xe,Me-Me*bt,xe,Me],[0,ve-2*Me],[0,Me*bt,-xe*bt,Me,-xe,Me],[2*xe-ie,0],[-xe*bt,0,-xe,-Me*bt,-xe,-Me],[0,2*Me-ve],[0,-Me*bt,xe*bt,-Me,xe,-Me]],O+xe,B,[1,1],Ge,!0),this},g.__private__.ellipse=g.ellipse=function(O,B,ie,ve,xe){if(isNaN(O)||isNaN(B)||isNaN(ie)||isNaN(ve)||!Li(xe))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Me=4/3*(Math.SQRT2-1)*ie,Ge=4/3*(Math.SQRT2-1)*ve;return ms(O+ie,B),la(O+ie,B-Ge,O+Me,B-ve,O,B-ve),la(O-Me,B-ve,O-ie,B-Ge,O-ie,B),la(O-ie,B+Ge,O-Me,B+ve,O,B+ve),la(O+Me,B+ve,O+ie,B+Ge,O+ie,B),Sl(xe),this},g.__private__.circle=g.circle=function(O,B,ie,ve){if(isNaN(O)||isNaN(B)||isNaN(ie)||!Li(ve))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(O,B,ie,ie,ve)},g.setFont=function(O,B,ie){return ie&&(B=G(B,ie)),nt=Ou(O,B,{disableWarning:!1}),this};var Io=g.__private__.getFont=g.getFont=function(){return ke[Ou.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var O,B,ie={};for(O in Be)if(Be.hasOwnProperty(O))for(B in ie[O]=[],Be[O])Be[O].hasOwnProperty(B)&&ie[O].push(B);return ie},g.addFont=function(O,B,ie,ve,xe){var Me=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Me.indexOf(arguments[3])!==-1?xe=arguments[3]:arguments[3]&&Me.indexOf(arguments[3])==-1&&(ie=G(ie,ve)),yl.call(this,O,B,ie,xe=xe||"Identity-H")};var Po,Lt=r.lineWidth||.200025,ph=g.__private__.getLineWidth=g.getLineWidth=function(){return Lt},El=g.__private__.setLineWidth=g.setLineWidth=function(O){return Lt=O,ne(D(z(O))+" w"),this};g.__private__.setLineDash=Rt.API.setLineDash=Rt.API.setLineDashPattern=function(O,B){if(O=O||[],B=B||0,isNaN(B)||!Array.isArray(O))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return O=O.map(function(ie){return D(z(ie))}).join(" "),B=D(z(B)),ne("["+O+"] "+B+" d"),this};var Ya=g.__private__.getLineHeight=g.getLineHeight=function(){return We*Po};g.__private__.getLineHeight=g.getLineHeight=function(){return We*Po};var zc=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(O){return typeof(O=O||1.15)=="number"&&(Po=O),this},Tl=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return Po};zc(r.lineHeight);var gi=g.__private__.getHorizontalCoordinate=function(O){return z(O)},Ka=g.__private__.getVerticalCoordinate=function(O){return k===N?O:Pt[Y].mediaBox.topRightY-Pt[Y].mediaBox.bottomLeftY-z(O)},ku=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(O){return D(gi(O))},vh=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(O){return D(Ka(O))},Hs=r.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return Mi(Hs)},g.__private__.setStrokeColor=g.setDrawColor=function(O,B,ie,ve){return Hs=vi({ch1:O,ch2:B,ch3:ie,ch4:ve,pdfColorType:"draw",precision:2}),ne(Hs),this};var jo=r.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return Mi(jo)},g.__private__.setFillColor=g.setFillColor=function(O,B,ie,ve){return jo=vi({ch1:O,ch2:B,ch3:ie,ch4:ve,pdfColorType:"fill",precision:2}),ne(jo),this};var Xa=r.textColor||"0 g",mi=g.__private__.getTextColor=g.getTextColor=function(){return Mi(Xa)};g.__private__.setTextColor=g.setTextColor=function(O,B,ie,ve){return Xa=vi({ch1:O,ch2:B,ch3:ie,ch4:ve,pdfColorType:"text",precision:3}),this};var Ea=r.charSpace,Nu=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat(Ea||0)};g.__private__.setCharSpace=g.setCharSpace=function(O){if(isNaN(O))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ea=O,this};var Ws=0;g.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},g.__private__.setLineCap=g.setLineCap=function(O){var B=g.CapJoinStyles[O];if(B===void 0)throw new Error("Line cap style of '"+O+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ws=B,ne(B+" J"),this};var Mo=0;g.__private__.setLineJoin=g.setLineJoin=function(O){var B=g.CapJoinStyles[O];if(B===void 0)throw new Error("Line join style of '"+O+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Mo=B,ne(B+" j"),this},g.__private__.setLineMiterLimit=g.__private__.setMiterLimit=g.setLineMiterLimit=g.setMiterLimit=function(O){if(O=O||0,isNaN(O))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ne(D(z(O))+" M"),this},g.GState=E1,g.setGState=function(O){(O=typeof O=="string"?Ct[Mt[O]]:Ol(null,O)).equals(zt)||(ne("/"+O.id+" gs"),zt=O)};var Ol=function(O,B){if(!O||!Mt[O]){var ie=!1;for(var ve in Ct)if(Ct.hasOwnProperty(ve)&&Ct[ve].equals(B)){ie=!0;break}if(ie)B=Ct[ve];else{var xe="GS"+(Object.keys(Ct).length+1).toString(10);Ct[xe]=B,B.id=xe}return O&&(Mt[O]=B.id),yr.publish("addGState",B),B}};g.addGState=function(O,B){return Ol(O,B),this},g.saveGraphicsState=function(){return ne("q"),ht.push({key:nt,size:We,color:Xa}),this},g.restoreGraphicsState=function(){ne("Q");var O=ht.pop();return nt=O.key,We=O.size,Xa=O.color,zt=null,this},g.setCurrentTransformationMatrix=function(O){return ne(O.toString()+" cm"),this},g.comment=function(O){return ne("#"+O),this};var Gs=function(O,B){var ie=O||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return ie},set:function(Me){isNaN(Me)||(ie=parseFloat(Me))}});var ve=B||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return ve},set:function(Me){isNaN(Me)||(ve=parseFloat(Me))}});var xe="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return xe},set:function(Me){xe=Me.toString()}}),this},Vs=function(O,B,ie,ve){Gs.call(this,O,B),this.type="rect";var xe=ie||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return xe},set:function(Ge){isNaN(Ge)||(xe=parseFloat(Ge))}});var Me=ve||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Me},set:function(Ge){isNaN(Ge)||(Me=parseFloat(Ge))}}),this},Ys=function(){this.page=Ht,this.currentPage=Y,this.pages=Ve.slice(0),this.pagesContext=Pt.slice(0),this.x=ze,this.y=Ke,this.matrix=fe,this.width=gh(Y),this.height=Qa(Y),this.outputDestination=Xe,this.id="",this.objectNumber=-1};Ys.prototype.restore=function(){Ht=this.page,Y=this.currentPage,Pt=this.pagesContext,Ve=this.pages,ze=this.x,Ke=this.y,fe=this.matrix,Ks(Y,this.width),mh(Y,this.height),Xe=this.outputDestination};var Iu=function(O,B,ie,ve,xe){Ha.push(new Ys),Ht=Y=0,Ve=[],ze=O,Ke=B,fe=xe,aa([ie,ve])};for(var Pu in g.beginFormObject=function(O,B,ie,ve,xe){return Iu(O,B,ie,ve,xe),this},g.endFormObject=function(O){return(function(B){if(Ua[B])Ha.pop().restore();else{var ie=new Ys,ve="Xo"+(Object.keys(Cr).length+1).toString(10);ie.id=ve,Ua[B]=ve,Cr[ve]=ie,yr.publish("addFormObject",ie),Ha.pop().restore()}})(O),this},g.doFormObject=function(O,B){var ie=Cr[Ua[O]];return ne("q"),ne(B.toString()+" cm"),ne("/"+ie.id+" Do"),ne("Q"),this},g.getFormObject=function(O){var B=Cr[Ua[O]];return{x:B.x,y:B.y,width:B.width,height:B.height,matrix:B.matrix}},g.save=function(O,B){return O=O||"generated.pdf",(B=B||{}).returnPromise=B.returnPromise||!1,B.returnPromise===!1?(pd(wl(sa()),O),typeof pd.unload=="function"&&Qt.setTimeout&&setTimeout(pd.unload,911),this):new Promise(function(ie,ve){try{var xe=pd(wl(sa()),O);typeof pd.unload=="function"&&Qt.setTimeout&&setTimeout(pd.unload,911),ie(xe)}catch(Me){ve(Me.message)}})},Rt.API)Rt.API.hasOwnProperty(Pu)&&(Pu==="events"&&Rt.API.events.length?(function(O,B){var ie,ve,xe;for(xe=B.length-1;xe!==-1;xe--)ie=B[xe][0],ve=B[xe][1],O.subscribe.apply(O,[ie].concat(typeof ve=="function"?[ve]:ve))})(yr,Rt.API.events):g[Pu]=Rt.API[Pu]);function gh(O){return Pt[O].mediaBox.topRightX-Pt[O].mediaBox.bottomLeftX}function Ks(O,B){Pt[O].mediaBox.topRightX=B+Pt[O].mediaBox.bottomLeftX}function Qa(O){return Pt[O].mediaBox.topRightY-Pt[O].mediaBox.bottomLeftY}function mh(O,B){Pt[O].mediaBox.topRightY=B+Pt[O].mediaBox.bottomLeftY}var yh=g.getPageWidth=function(O){return gh(O=O||Y)/jt},bh=g.setPageWidth=function(O,B){Ks(O,B*jt)},Al=g.getPageHeight=function(O){return Qa(O=O||Y)/jt},wh=g.setPageHeight=function(O,B){mh(O,B*jt)};return g.internal={pdfEscape:qi,getStyle:fh,getFont:Io,getFontSize:it,getCharSpace:Nu,getTextColor:mi,getLineHeight:Ya,getLineHeightFactor:Tl,getLineWidth:ph,write:et,getHorizontalCoordinate:gi,getVerticalCoordinate:Ka,getCoordinateString:ku,getVerticalCoordinateString:vh,collections:{},newObject:Zr,newAdditionalObject:Ro,newObjectDeferred:Yn,newObjectDeferredBegin:si,getFilters:Di,putStream:oi,events:yr,scaleFactor:jt,pageSize:{getWidth:function(){return yh(Y)},setWidth:function(O){bh(Y,O)},getHeight:function(){return Al(Y)},setHeight:function(O){wh(Y,O)}},encryptionOptions:f,encryption:Kn,getEncryptor:function(O){return f!==null?Kn.encryptor(O,0):function(B){return B}},output:li,getNumberOfPages:Tu,get pages(){return Ve},out:ne,f2:I,f3:q,getPageInfo:Au,getPageInfoByObjId:No,getCurrentPageInfo:dh,getPDFVersion:E,Point:Gs,Rectangle:Vs,Matrix:Dt,hasHotfix:Va},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return yh(Y)},set:function(O){bh(Y,O)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return Al(Y)},set:function(O){wh(Y,O)},enumerable:!0,configurable:!0}),function(O){for(var B=0,ie=ot.length;B<ie;B++){var ve=yl.call(this,O[B][0],O[B][1],O[B][2],ot[B][3],!0);v===!1&&(y[ve]=!0);var xe=O[B][0].split("-");uh({id:ve,fontName:xe[0],fontStyle:xe[1]||""})}yr.publish("addFonts",{fonts:ke,dictionary:Be})}.call(g,ot),nt="F1",Su(i,t),yr.publish("initialized"),g}of.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},of.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},of.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},of.prototype.processOwnerPassword=function(r,e){return e6(JO(e).substr(0,5),r)},of.prototype.encryptor=function(r,e){var t=JO(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return e6(t,n)}},E1.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||qr(r)!==qr(this))return!1;var n=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;n++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&n--;return n===0},Rt.API={events:[]},Rt.version="4.2.1";var Pn=Rt.API,H6=1,zd=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},tf=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Id=function(r){return r.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},tr=function(r){return r.toFixed(2)},pc=function(r){return r.toFixed(5)};Pn.__acroform__={};var $a=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},CN=function(r){return r*H6},Jo=function(r){var e=new YY,t=xt.internal.getHeight(r)||0,n=xt.internal.getWidth(r)||0;return e.BBox=[0,0,Number(tr(n)),Number(tr(t))],e},Soe=Pn.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<e},Eoe=Pn.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<e)},Toe=Pn.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},Un=Pn.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Toe(r,e-1)},Hn=Pn.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Soe(r,e-1)},Wn=Pn.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Eoe(r,e-1)},Ooe=Pn.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,i=r[0],a=r[1],o=r[2],u=r[3],c={};return c.lowerLeft_X=t(i)||0,c.lowerLeft_Y=n(a+u)||0,c.upperRight_X=t(i+o)||0,c.upperRight_Y=n(a)||0,[Number(tr(c.lowerLeft_X)),Number(tr(c.lowerLeft_Y)),Number(tr(c.upperRight_X)),Number(tr(c.upperRight_Y))]},Aoe=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=t6(r,t),i=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+i+" "+tr(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=Jo(r);return a.scope=r.scope,a.stream=e.join(`
|
|
504
|
+
`),a}},t6=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=r.multiline?i.map(function(I){return I.split(`
|
|
505
|
+
`)}):i.map(function(I){return[I]});var a=t,o=xt.internal.getHeight(r)||0;o=o<0?-o:o;var u=xt.internal.getWidth(r)||0;u=u<0?-u:u;var c=function(I,q,z){if(I+1<i.length){var Q=q+" "+i[I+1][0];return Wm(Q,r,z).width<=u-4}return!1};a++;e:for(;a>0;){e="",a--;var h,f,v=Wm("3",r,a).height,y=r.multiline?o-a:(o-v)/2,g=y+=2,_=0,E=0,A=0;if(a<=0){e=`(...) Tj
|
|
506
|
+
`,e+="% Width of Text: "+Wm(e,r,a=12).width+", FieldWidth:"+u+`
|
|
507
|
+
`;break}for(var T="",C=0,N=0;N<i.length;N++)if(i.hasOwnProperty(N)){var k=!1;if(i[N].length!==1&&A!==i[N].length-1){if((v+2)*(C+2)+2>o)continue e;T+=i[N][A],k=!0,E=N,N--}else{T=(T+=i[N][A]+" ").substr(T.length-1)==" "?T.substr(0,T.length-1):T;var j=parseInt(N),W=c(j,T,a),G=N>=i.length-1;if(W&&!G){T+=" ",A=0;continue}if(W||G){if(G)E=j;else if(r.multiline&&(v+2)*(C+2)+2>o)continue e}else{if(!r.multiline||(v+2)*(C+2)+2>o)continue e;E=j}}for(var D="",M=_;M<=E;M++){var U=i[M];if(r.multiline){if(M===E){D+=U[A]+" ",A=(A+1)%U.length;continue}if(M===_){D+=U[U.length-1]+" ";continue}}D+=U[0]+" "}switch(D=D.substr(D.length-1)==" "?D.substr(0,D.length-1):D,f=Wm(D,r,a).width,r.textAlign){case"right":h=u-f-2;break;case"center":h=(u-f)/2;break;default:h=2}e+=tr(h)+" "+tr(g)+` Td
|
|
508
|
+
`,e+="("+zd(D)+`) Tj
|
|
509
|
+
`,e+=-tr(h)+` 0 Td
|
|
510
|
+
`,g=-(a+2),f=0,_=k?E:E+1,C++,T=""}break}return n.text=e,n.fontSize=a,n},Wm=function(r,e,t){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:i}},Roe={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Coe=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},koe=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Eo.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(Roe)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");H6=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new KY,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.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})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];a.objId=void 0,a.hasAnnotation&&Coe(a,t)}})(r)}),r.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")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(n,i){var a=!n;for(var o in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var u=n[o],c=[],h=u.Rect;if(u.Rect&&(u.Rect=Ooe(u.Rect,i)),i.internal.newObjectDeferredBegin(u.objId,!0),u.DA=xt.createDefaultAppearanceStream(u),qr(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(c=u.getKeyValueListForStream()),u.Rect=h,u.hasAppearanceStream&&!u.appearanceStreamContent){var f=Aoe(u);c.push({key:"AP",value:"<</N "+f+">>"}),i.internal.acroformPlugin.xForms.push(f)}if(u.appearanceStreamContent){var v="";for(var y in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(y)){var g=u.appearanceStreamContent[y];if(v+="/"+y+" ",v+="<<",Object.keys(g).length>=1||Array.isArray(g)){for(var o in g)if(g.hasOwnProperty(o)){var _=g[o];typeof _=="function"&&(_=_.call(i,u)),v+="/"+o+" "+_+" ",i.internal.acroformPlugin.xForms.indexOf(_)>=0||i.internal.acroformPlugin.xForms.push(_)}}else typeof(_=g)=="function"&&(_=_.call(i,u)),v+="/"+o+" "+_,i.internal.acroformPlugin.xForms.indexOf(_)>=0||i.internal.acroformPlugin.xForms.push(_);v+=">>"}c.push({key:"AP",value:`<<
|
|
511
|
+
`+v+">>"})}i.internal.putStream({additionalKeyValues:c,objectId:u.objId}),i.internal.out("endobj")}a&&(function(E,A){for(var T in E)if(E.hasOwnProperty(T)){var C=T,N=E[T];A.internal.newObjectDeferredBegin(N.objId,!0),qr(N)==="object"&&typeof N.putStream=="function"&&N.putStream(),delete E[C]}})(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},VY=Pn.__acroform__.arrayToPdfArray=function(r,e,t){var n=function(o){return o};if(Array.isArray(r)){for(var i="[",a=0;a<r.length;a++)switch(a!==0&&(i+=" "),qr(r[a])){case"boolean":case"number":case"object":i+=r[a].toString();break;case"string":r[a].substr(0,1)==="/"?i+="/"+Id(r[a].substr(1)):(e!==void 0&&t&&(n=t.internal.getEncryptor(e)),i+="("+zd(n(r[a].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ab=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),"("+zd(n(r))+")"},rl=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(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};rl.prototype.toString=function(){return this.objId+" 0 R"},rl.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},rl.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var n=e[t],i=this[n];i&&(Array.isArray(i)?r.push({key:n,value:VY(i,this.objId,this.scope)}):i instanceof rl?(i.scope=this.scope,r.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&r.push({key:n,value:i}))}return r};var YY=function(){rl.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 r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};$a(YY,rl);var KY=function(){rl.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+zd(t(r))+")"}},set:function(t){r=t}})};$a(KY,rl);var Eo=function r(){rl.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(T){if(isNaN(T))throw new Error('Invalid value "'+T+'" for attribute F supplied.');e=T}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Un(e,3)},set:function(T){T?this.F=Hn(e,3):this.F=Wn(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(T){if(isNaN(T))throw new Error('Invalid value "'+T+'" for attribute Ff supplied.');t=T}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(T){n=T!==void 0?T:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(T){n[0]=T}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(T){n[1]=T}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(T){n[2]=T}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(T){n[3]=T}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(T){switch(T){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=T;break;default:throw new Error('Invalid value "'+T+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof T1)return;a="FieldObject"+r.FieldNum++}var T=function(C){return C};return this.scope&&(T=this.scope.internal.getEncryptor(this.objId)),"("+zd(T(a))+")"},set:function(T){a=T.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(T){a=T}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(T){o=T}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(T){u=T}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(T){c=T}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/H6:h},set:function(T){h=T}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(T){f=T}});var v="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!v||this instanceof T1||this instanceof xd))return ab(v,this.objId,this.scope)},set:function(T){T=T.toString(),v=T}});var y=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(y)return this instanceof Ai==0?ab(y,this.objId,this.scope):y},set:function(T){T=T.toString(),y=this instanceof Ai==0?T.substr(0,1)==="("?tf(T.substr(1,T.length-2)):tf(T):T}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ai==1?tf(y.substr(1,y.length-1)):y},set:function(T){T=T.toString(),y=this instanceof Ai==1?"/"+Id(T):T}});var g=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(g)return g},set:function(T){this.V=T}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof Ai==0?ab(g,this.objId,this.scope):g},set:function(T){T=T.toString(),g=this instanceof Ai==0?T.substr(0,1)==="("?tf(T.substr(1,T.length-2)):tf(T):T}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ai==1?tf(g.substr(1,g.length-1)):g},set:function(T){T=T.toString(),g=this instanceof Ai==1?"/"+Id(T):T}}),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(T){T=!!T,E=T}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(_)return _},set:function(T){_=T}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,1)},set:function(T){T?this.Ff=Hn(this.Ff,1):this.Ff=Wn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,2)},set:function(T){T?this.Ff=Hn(this.Ff,2):this.Ff=Wn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,3)},set:function(T){T?this.Ff=Hn(this.Ff,3):this.Ff=Wn(this.Ff,3)}});var A=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(A!==null)return A},set:function(T){if([0,1,2].indexOf(T)===-1)throw new Error('Invalid value "'+T+'" for attribute Q supplied.');A=T}}),Object.defineProperty(this,"textAlign",{get:function(){var T;switch(A){case 0:default:T="left";break;case 1:T="center";break;case 2:T="right"}return T},configurable:!0,enumerable:!0,set:function(T){switch(T){case"right":case 2:A=2;break;case"center":case 1:A=1;break;default:A=0}}})};$a(Eo,rl);var mf=function(){Eo.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return VY(e,this.objId,this.scope)},set:function(t){var n,i;i=[],typeof(n=t)=="string"&&(i=(function(a,o,u){u||(u=1);for(var c,h=[];c=o.exec(a);)h.push(c[u]);return h})(n,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,18)},set:function(t){t?this.Ff=Hn(this.Ff,18):this.Ff=Wn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Hn(this.Ff,19):this.Ff=Wn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,20)},set:function(t){t?(this.Ff=Hn(this.Ff,20),e.sort()):this.Ff=Wn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,22)},set:function(t){t?this.Ff=Hn(this.Ff,22):this.Ff=Wn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,23)},set:function(t){t?this.Ff=Hn(this.Ff,23):this.Ff=Wn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,27)},set:function(t){t?this.Ff=Hn(this.Ff,27):this.Ff=Wn(this.Ff,27)}}),this.hasAppearanceStream=!1};$a(mf,Eo);var yf=function(){mf.call(this),this.fontName="helvetica",this.combo=!1};$a(yf,mf);var bf=function(){yf.call(this),this.combo=!0};$a(bf,yf);var s1=function(){bf.call(this),this.edit=!0};$a(s1,bf);var Ai=function(){Eo.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,15)},set:function(t){t?this.Ff=Hn(this.Ff,15):this.Ff=Wn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,16)},set:function(t){t?this.Ff=Hn(this.Ff,16):this.Ff=Wn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,17)},set:function(t){t?this.Ff=Hn(this.Ff,17):this.Ff=Wn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,26)},set:function(t){t?this.Ff=Hn(this.Ff,26):this.Ff=Wn(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(a){return a};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var n,i=[];for(n in i.push("<<"),e)i.push("/"+n+" ("+zd(t(e[n]))+")");return i.push(">>"),i.join(`
|
|
512
|
+
`)}},set:function(t){qr(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){var n=t==null?"":t.toString();n.substr(0,1)==="/"&&(n=n.substr(1)),r="/"+Id(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+Id(t)}})};$a(Ai,Eo);var o1=function(){Ai.call(this),this.pushButton=!0};$a(o1,Ai);var wf=function(){Ai.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};$a(wf,Ai);var T1=function(){var r,e;Eo.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(u){return u};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,o=[];for(a in o.push("<<"),n)o.push("/"+a+" ("+zd(i(n[a]))+")");return o.push(">>"),o.join(`
|
|
513
|
+
`)},set:function(i){qr(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+Id(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+Id(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=xt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};$a(T1,Eo),wf.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},wf.prototype.createOption=function(r){var e=new T1;return e.Parent=this,e.optionName=r,this.Kids.push(e),Noe.call(this.scope,e),e};var l1=function(){Ai.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=xt.CheckBox.createAppearanceStream()};$a(l1,Ai);var xd=function(){Eo.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,13)},set:function(e){e?this.Ff=Hn(this.Ff,13):this.Ff=Wn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,21)},set:function(e){e?this.Ff=Hn(this.Ff,21):this.Ff=Wn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,23)},set:function(e){e?this.Ff=Hn(this.Ff,23):this.Ff=Wn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,24)},set:function(e){e?this.Ff=Hn(this.Ff,24):this.Ff=Wn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,25)},set:function(e){e?this.Ff=Hn(this.Ff,25):this.Ff=Wn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,26)},set:function(e){e?this.Ff=Hn(this.Ff,26):this.Ff=Wn(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};$a(xd,Eo);var u1=function(){xd.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,14)},set:function(r){r?this.Ff=Hn(this.Ff,14):this.Ff=Wn(this.Ff,14)}}),this.password=!0};$a(u1,xd);var xt={CheckBox:{createAppearanceStream:function(){return{N:{On:xt.CheckBox.YesNormal},D:{On:xt.CheckBox.YesPushDown,Off:xt.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),a=t6(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+tr(xt.internal.getWidth(r))+" "+tr(xt.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+tr(a.fontSize)+" Tf "+i),t.push("BT"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
|
|
514
|
+
`),e},YesNormal:function(r){var e=Jo(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),i=[],a=xt.internal.getHeight(r),o=xt.internal.getWidth(r),u=t6(r,r.caption);return i.push("1 g"),i.push("0 0 "+tr(o)+" "+tr(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+tr(o-1)+" "+tr(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+tr(u.fontSize)+" Tf "+n),i.push(u.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
|
|
515
|
+
`),e},OffPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+tr(xt.internal.getWidth(r))+" "+tr(xt.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
|
516
|
+
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:xt.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=xt.RadioButton.Circle.YesNormal,e.D[r]=xt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=Jo(r);e.scope=r.scope;var t=[],n=xt.internal.getWidth(r)<=xt.internal.getHeight(r)?xt.internal.getWidth(r)/4:xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=xt.internal.Bezier_C,a=Number((n*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+pc(xt.internal.getWidth(r)/2)+" "+pc(xt.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),t.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),t.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),t.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
|
517
|
+
`),e},YesPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=[],n=xt.internal.getWidth(r)<=xt.internal.getHeight(r)?xt.internal.getWidth(r)/4:xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*xt.internal.Bezier_C).toFixed(5)),o=Number((n*xt.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+pc(xt.internal.getWidth(r)/2)+" "+pc(xt.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+pc(xt.internal.getWidth(r)/2)+" "+pc(xt.internal.getHeight(r)/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"),e.stream=t.join(`
|
|
518
|
+
`),e},OffPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=[],n=xt.internal.getWidth(r)<=xt.internal.getHeight(r)?xt.internal.getWidth(r)/4:xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*xt.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+pc(xt.internal.getWidth(r)/2)+" "+pc(xt.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
|
519
|
+
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:xt.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=xt.RadioButton.Cross.YesNormal,e.D[r]=xt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=Jo(r);e.scope=r.scope;var t=[],n=xt.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+tr(xt.internal.getWidth(r)-2)+" "+tr(xt.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(tr(n.x1.x)+" "+tr(n.x1.y)+" m"),t.push(tr(n.x2.x)+" "+tr(n.x2.y)+" l"),t.push(tr(n.x4.x)+" "+tr(n.x4.y)+" m"),t.push(tr(n.x3.x)+" "+tr(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
|
|
520
|
+
`),e},YesPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=xt.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+tr(xt.internal.getWidth(r))+" "+tr(xt.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+tr(xt.internal.getWidth(r)-2)+" "+tr(xt.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(tr(t.x1.x)+" "+tr(t.x1.y)+" m"),n.push(tr(t.x2.x)+" "+tr(t.x2.y)+" l"),n.push(tr(t.x4.x)+" "+tr(t.x4.y)+" m"),n.push(tr(t.x3.x)+" "+tr(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
|
|
521
|
+
`),e},OffPushDown:function(r){var e=Jo(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+tr(xt.internal.getWidth(r))+" "+tr(xt.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
|
522
|
+
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};xt.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=xt.internal.getWidth(r),t=xt.internal.getHeight(r),n=Math.min(e,t);return{x1:{x:(e-n)/2,y:(t-n)/2+n},x2:{x:(e-n)/2+n,y:(t-n)/2},x3:{x:(e-n)/2,y:(t-n)/2},x4:{x:(e-n)/2+n,y:(t-n)/2+n}}}},xt.internal.getWidth=function(r){var e=0;return qr(r)==="object"&&(e=CN(r.Rect[2])),e},xt.internal.getHeight=function(r){var e=0;return qr(r)==="object"&&(e=CN(r.Rect[3])),e};var Noe=Pn.addField=function(r){if(koe(this,r),!(r instanceof Eo))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Pn.AcroFormChoiceField=mf,Pn.AcroFormListBox=yf,Pn.AcroFormComboBox=bf,Pn.AcroFormEditBox=s1,Pn.AcroFormButton=Ai,Pn.AcroFormPushButton=o1,Pn.AcroFormRadioButton=wf,Pn.AcroFormCheckBox=l1,Pn.AcroFormTextField=xd,Pn.AcroFormPasswordField=u1,Pn.AcroFormAppearance=xt,Pn.AcroForm={ChoiceField:mf,ListBox:yf,ComboBox:bf,EditBox:s1,Button:Ai,PushButton:o1,RadioButton:wf,CheckBox:l1,TextField:xd,PasswordField:u1,Appearance:xt},Rt.AcroForm={ChoiceField:mf,ListBox:yf,ComboBox:bf,EditBox:s1,Button:Ai,PushButton:o1,RadioButton:wf,CheckBox:l1,TextField:xd,PasswordField:u1,Appearance:xt};Rt.AcroForm;function XY(r){return r.reduce(function(e,t,n){return e[t]=n,e},{})}(function(r){var e="addImage_";r.__addimage__={};var t="UNKNOWN",n={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]]},i=r.__addimage__.getImageFileTypeByImageData=function(I,q){var z,Q,ce,re,J,le=t;if((q=q||t)==="RGBA"||I.data!==void 0&&I.data instanceof Uint8ClampedArray&&"height"in I&&"width"in I)return"RGBA";if(W(I))for(J in n)for(ce=n[J],z=0;z<ce.length;z+=1){for(re=!0,Q=0;Q<ce[z].length;Q+=1)if(ce[z][Q]!==void 0&&ce[z][Q]!==I[Q]){re=!1;break}if(re===!0){le=J;break}}else for(J in n)for(ce=n[J],z=0;z<ce.length;z+=1){for(re=!0,Q=0;Q<ce[z].length;Q+=1)if(ce[z][Q]!==void 0&&ce[z][Q]!==I.charCodeAt(Q)){re=!1;break}if(re===!0){le=J;break}}return le===t&&q!==t&&(le=q),le},a=function I(q){for(var z=this.internal.write,Q=this.internal.putStream,ce=(0,this.internal.getFilters)();ce.indexOf("FlateEncode")!==-1;)ce.splice(ce.indexOf("FlateEncode"),1);q.objectId=this.internal.newObject();var re=[];if(re.push({key:"Type",value:"/XObject"}),re.push({key:"Subtype",value:"/Image"}),re.push({key:"Width",value:q.width}),re.push({key:"Height",value:q.height}),q.colorSpace===T.INDEXED?re.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(q.palette.length/3-1)+" "+("sMask"in q&&q.sMask!==void 0?q.objectId+2:q.objectId+1)+" 0 R]"}):(re.push({key:"ColorSpace",value:"/"+q.colorSpace}),q.colorSpace===T.DEVICE_CMYK&&re.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),re.push({key:"BitsPerComponent",value:q.bitsPerComponent}),"decodeParameters"in q&&q.decodeParameters!==void 0&&re.push({key:"DecodeParms",value:"<<"+q.decodeParameters+">>"}),"transparency"in q&&Array.isArray(q.transparency)&&q.transparency.length>0){for(var J="",le=0,ye=q.transparency.length;le<ye;le++)J+=q.transparency[le]+" "+q.transparency[le]+" ";re.push({key:"Mask",value:"["+J+"]"})}q.sMask!==void 0&&re.push({key:"SMask",value:q.objectId+1+" 0 R"});var Z=q.filter!==void 0?["/"+q.filter]:void 0;if(Q({data:q.data,additionalKeyValues:re,alreadyAppliedFilters:Z,objectId:q.objectId}),z("endobj"),"sMask"in q&&q.sMask!==void 0){var oe,L=(oe=q.sMaskBitsPerComponent)!==null&&oe!==void 0?oe:q.bitsPerComponent,Y={width:q.width,height:q.height,colorSpace:"DeviceGray",bitsPerComponent:L,data:q.sMask};"filter"in q&&(Y.decodeParameters="/Predictor ".concat(q.predictor," /Colors 1 /BitsPerComponent ").concat(L," /Columns ").concat(q.width),Y.filter=q.filter),I.call(this,Y)}if(q.colorSpace===T.INDEXED){var te=this.internal.newObject();Q({data:D(new Uint8Array(q.palette)),objectId:te}),z("endobj")}},o=function(){var I=this.internal.collections[e+"images"];for(var q in I)a.call(this,I[q])},u=function(){var I,q=this.internal.collections[e+"images"],z=this.internal.write;for(var Q in q)z("/I"+(I=q[Q]).index,I.objectId,"0","R")},c=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",u))},h=function(){var I=this.internal.collections[e+"images"];return c.call(this),I},f=function(){return Object.keys(this.internal.collections[e+"images"]).length},v=function(I){return typeof r["process"+I.toUpperCase()]=="function"},y=function(I){return qr(I)==="object"&&I.nodeType===1},g=function(I,q){if(I.nodeName==="IMG"&&I.hasAttribute("src")){var z=""+I.getAttribute("src");if(z.indexOf("data:image/")===0)return a1(unescape(z).split("base64,").pop());var Q=r.loadFile(z,!0);if(Q!==void 0)return Q}if(I.nodeName==="CANVAS"){if(I.width===0||I.height===0)throw new Error("Given canvas must have data. Canvas width: "+I.width+", height: "+I.height);var ce;switch(q){case"PNG":ce="image/png";break;case"WEBP":ce="image/webp";break;default:ce="image/jpeg"}return a1(I.toDataURL(ce,1).split("base64,").pop())}},_=function(I){var q=this.internal.collections[e+"images"];if(q){for(var z in q)if(I===q[z].alias)return q[z]}},E=function(I,q,z){return I||q||(I=-96,q=-96),I<0&&(I=-1*z.width*72/I/this.internal.scaleFactor),q<0&&(q=-1*z.height*72/q/this.internal.scaleFactor),I===0&&(I=q*z.width/z.height),q===0&&(q=I*z.height/z.width),[I,q]},A=function(I,q,z,Q,ce,re){var J=E.call(this,z,Q,ce),le=this.internal.getCoordinateString,ye=this.internal.getVerticalCoordinateString,Z=h.call(this);if(z=J[0],Q=J[1],Z[ce.index]=ce,re){re*=Math.PI/180;var oe=Math.cos(re),L=Math.sin(re),Y=function(de){return de.toFixed(4)},te=[Y(oe),Y(L),Y(-1*L),Y(oe),0,0,"cm"]}this.internal.write("q"),re?(this.internal.write([1,"0","0",1,le(I),ye(q+Q),"cm"].join(" ")),this.internal.write(te.join(" ")),this.internal.write([le(z),"0","0",le(Q),"0","0","cm"].join(" "))):this.internal.write([le(z),"0","0",le(Q),le(I),ye(q+Q),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+ce.index+" Do"),this.internal.write("Q")},T=r.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"};r.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 C=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},N=r.__addimage__.sHashCode=function(I){var q,z,Q=0;if(typeof I=="string")for(z=I.length,q=0;q<z;q++)Q=(Q<<5)-Q+I.charCodeAt(q),Q|=0;else if(W(I))for(z=I.byteLength/2,q=0;q<z;q++)Q=(Q<<5)-Q+I[q],Q|=0;return Q},k=r.__addimage__.validateStringAsBase64=function(I){(I=I||"").toString().trim();var q=!0;return I.length===0&&(q=!1),I.length%4!=0&&(q=!1),/^[A-Za-z0-9+/]+$/.test(I.substr(0,I.length-2))===!1&&(q=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(I.substr(-2))===!1&&(q=!1),q},j=r.__addimage__.extractImageFromDataUrl=function(I){if(I==null||!(I=I.trim()).startsWith("data:"))return null;var q=I.indexOf(",");return q<0?null:I.substring(0,q).trim().endsWith("base64")?I.substring(q+1):null};r.__addimage__.isArrayBuffer=function(I){return I instanceof ArrayBuffer};var W=r.__addimage__.isArrayBufferView=function(I){return I instanceof Int8Array||I instanceof Uint8Array||I instanceof Uint8ClampedArray||I instanceof Int16Array||I instanceof Uint16Array||I instanceof Int32Array||I instanceof Uint32Array||I instanceof Float32Array||I instanceof Float64Array},G=r.__addimage__.binaryStringToUint8Array=function(I){for(var q=I.length,z=new Uint8Array(q),Q=0;Q<q;Q++)z[Q]=I.charCodeAt(Q);return z},D=r.__addimage__.arrayBufferToBinaryString=function(I){for(var q="",z=W(I)?I:new Uint8Array(I),Q=0;Q<z.length;Q+=8192)q+=String.fromCharCode.apply(null,z.subarray(Q,Q+8192));return q};r.addImage=function(){var I,q,z,Q,ce,re,J,le,ye;if(typeof arguments[1]=="number"?(q=t,z=arguments[1],Q=arguments[2],ce=arguments[3],re=arguments[4],J=arguments[5],le=arguments[6],ye=arguments[7]):(q=arguments[1],z=arguments[2],Q=arguments[3],ce=arguments[4],re=arguments[5],J=arguments[6],le=arguments[7],ye=arguments[8]),qr(I=arguments[0])==="object"&&!y(I)&&"imageData"in I){var Z=I;I=Z.imageData,q=Z.format||q||t,z=Z.x||z||0,Q=Z.y||Q||0,ce=Z.w||Z.width||ce,re=Z.h||Z.height||re,J=Z.alias||J,le=Z.compression||le,ye=Z.rotation||Z.angle||ye}var oe=this.internal.getFilters();if(le===void 0&&oe.indexOf("FlateEncode")!==-1&&(le="SLOW"),isNaN(z)||isNaN(Q))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var L=M.call(this,I,q,J,le);return A.call(this,z,Q,ce,re,L,ye),this};var M=function(I,q,z,Q){var ce,re,J;if(typeof I=="string"&&i(I)===t){I=unescape(I);var le=U(I,!1);(le!==""||(le=r.loadFile(I,!0))!==void 0)&&(I=le)}if(y(I)&&(I=g(I,q)),q=i(I,q),!v(q))throw new Error("addImage does not support files of type '"+q+"', please ensure that a plugin for '"+q+"' support is added.");if(((J=z)==null||J.length===0)&&(z=(function(ye){return typeof ye=="string"||W(ye)?N(ye):W(ye.data)?N(ye.data):null})(I)),(ce=_.call(this,z))||(I instanceof Uint8Array||q==="RGBA"||(re=I,I=G(I)),ce=this["process"+q.toUpperCase()](I,f.call(this),z,(function(ye){return ye&&typeof ye=="string"&&(ye=ye.toUpperCase()),ye in r.image_compression?ye:C.NONE})(Q),re)),!ce)throw new Error("An unknown error occurred whilst processing the image.");return ce},U=r.__addimage__.convertBase64ToBinaryString=function(I,q){q=typeof q!="boolean"||q;var z,Q="";if(typeof I=="string"){var ce;z=(ce=j(I))!==null&&ce!==void 0?ce:I;try{Q=a1(z)}catch(re){if(q)throw k(z)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+re.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return Q};r.getImageProperties=function(I){var q,z,Q="";if(y(I)&&(I=g(I)),typeof I=="string"&&i(I)===t&&((Q=U(I,!1))===""&&(Q=r.loadFile(I)||""),I=Q),z=i(I),!v(z))throw new Error("addImage does not support files of type '"+z+"', please ensure that a plugin for '"+z+"' support is added.");if(I instanceof Uint8Array||(I=G(I)),!(q=this["process"+z.toUpperCase()](I)))throw new Error("An unknown error occurred whilst processing the image");return q.fileType=z,q}})(Rt.API),(function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Rt.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var n,i,a,o=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(t.objId),h=t.pageContext.annotations,f=!1,v=0;v<h.length&&!f;v++)switch((n=h[v]).type){case"link":(e(n.options.url)||e(n.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(f!=0){this.internal.write("/Annots [");for(var y=0;y<h.length;y++){n=h[y];var g=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(),A=this.internal.newAdditionalObject(),T=this.internal.getEncryptor(E.objId),C=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+o(n.bounds.x)+" "+u(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y)+"] ")+"/Contents ("+g(T(n.contents))+")",a+=" /Popup "+A.objId+" 0 R",a+=" /P "+c.objId+" 0 R",a+=" /T ("+g(T(C))+") >>",E.content=a;var N=E.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+o(n.bounds.x+30)+" "+u(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+u(n.bounds.y)+"] ")+" /Parent "+N,n.open&&(a+=" /Open true"),a+=" >>",A.content=a,this.internal.write(E.objId,"0 R",A.objId,"0 R");break;case"freetext":i="/Rect ["+o(n.bounds.x)+" "+u(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y+n.bounds.h)+"] ";var k="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(n.color||"#000000");a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+g(_(n.contents))+")",a+=" /DS("+g(_(k))+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var j=this.annotations._nameMap[n.options.name];n.options.pageNumber=j.page,n.options.top=j.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+g(_(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/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":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;default:var W=u(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+W+" "+n.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),r.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)}},r.link=function(t,n,i,a,o){var u=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;u.pageContext.annotations.push({finalBounds:{x:c(t),y:h(n),w:c(t+i),h:h(n+a)},options:o,type:"link"})},r.textWithLink=function(t,n,i,a){var o,u,c=this.getTextWidth(t),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){u=a.maxWidth;var f=this.splitTextToSize(t,u).length;o=Math.ceil(h*f)}else u=c,o=h;return this.text(t,n,i,a),i+=.2*h,a.align==="center"&&(n-=c/2),a.align==="right"&&(n-=c),this.link(n,i-h,u,o,a),c},r.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}})(Rt.API),(function(r){var e={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},i=[1570,1571,1573,1575];r.__arabicParser__={};var a=r.__arabicParser__.isInArabicSubstitutionA=function(E){return e[E.charCodeAt(0)]!==void 0},o=r.__arabicParser__.isArabicLetter=function(E){return typeof E=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(E)},u=r.__arabicParser__.isArabicEndLetter=function(E){return o(E)&&a(E)&&e[E.charCodeAt(0)].length<=2},c=r.__arabicParser__.isArabicAlfLetter=function(E){return o(E)&&i.indexOf(E.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(E){return o(E)&&a(E)&&e[E.charCodeAt(0)].length>=1};var h=r.__arabicParser__.arabicLetterHasFinalForm=function(E){return o(E)&&a(E)&&e[E.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(E){return o(E)&&a(E)&&e[E.charCodeAt(0)].length>=3};var f=r.__arabicParser__.arabicLetterHasMedialForm=function(E){return o(E)&&a(E)&&e[E.charCodeAt(0)].length==4},v=r.__arabicParser__.resolveLigatures=function(E){var A=0,T=t,C="",N=0;for(A=0;A<E.length;A+=1)T[E.charCodeAt(A)]!==void 0?(N++,typeof(T=T[E.charCodeAt(A)])=="number"&&(C+=String.fromCharCode(T),T=t,N=0),A===E.length-1&&(T=t,C+=E.charAt(A-(N-1)),A-=N-1,N=0)):(T=t,C+=E.charAt(A-N),A-=N,N=0);return C};r.__arabicParser__.isArabicDiacritic=function(E){return E!==void 0&&n[E.charCodeAt(0)]!==void 0};var y=r.__arabicParser__.getCorrectForm=function(E,A,T){return o(E)?a(E)===!1?-1:!h(E)||!o(A)&&!o(T)||!o(T)&&u(A)||u(E)&&!o(A)||u(E)&&c(A)||u(E)&&u(A)?0:f(E)&&o(A)&&!u(A)&&o(T)&&h(T)?3:u(E)||!o(T)?1:2:-1},g=function(E){var A=0,T=0,C=0,N="",k="",j="",W=(E=E||"").split("\\s+"),G=[];for(A=0;A<W.length;A+=1){for(G.push(""),T=0;T<W[A].length;T+=1)N=W[A][T],k=W[A][T-1],j=W[A][T+1],o(N)?(C=y(N,k,j),G[A]+=C!==-1?String.fromCharCode(e[N.charCodeAt(0)][C]):N):G[A]+=N;G[A]=v(G[A])}return G.join(" ")},_=r.__arabicParser__.processArabic=r.processArabic=function(){var E,A=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,T=[];if(Array.isArray(A)){var C=0;for(T=[],C=0;C<A.length;C+=1)Array.isArray(A[C])?T.push([g(A[C][0]),A[C][1],A[C][2]]):T.push([g(A[C])]);E=T}else E=g(A);return typeof arguments[0]=="string"?E:(arguments[0].text=E,arguments[0])};r.events.push(["preProcessText",_])})(Rt.API),Rt.API.autoPrint=function(r){var e;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=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 "+e+" 0 R")})),this},(function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(u){t=u}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(u){n=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(u){i=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(u){a=u}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(u){o=u}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,n){var i;if((t=t||"2d")!=="2d")return null;for(i in n)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=n[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])})(Rt.API),(function(r){var e={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({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(E){c=E}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(E){h=E}});var f=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return f},set:function(E){f=E}});var v=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return v},set:function(E){v=E}});var y=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return y},set:function(E){y=E}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(E){g=E}});var _=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return _},set:function(E){_=E}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(c){return n.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},r.getTextDimensions=function(c,h){n.call(this);var f=(h=h||{}).fontSize||this.getFontSize(),v=h.font||this.getFont(),y=h.scaleFactor||this.internal.scaleFactor,g=0,_=0,E=0,A=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var T=h.maxWidth;T>0?typeof c=="string"?c=this.splitTextToSize(c,T):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(N,k){return N.concat(A.splitTextToSize(k,T))},[])):c=Array.isArray(c)?c:[c];for(var C=0;C<c.length;C++)g<(E=this.getStringUnitWidth(c[C],{font:v})*f)&&(g=E);return g!==0&&(_=c.length),{w:g/=y,h:Math.max((_*f*this.getLineHeightFactor()-f*(this.getLineHeightFactor()-1))/y,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var c=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=r.cell=function(){var c;c=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var h=this.internal.__cell__.lastCell,f=this.internal.__cell__.padding,v=this.internal.__cell__.margins||e,y=this.internal.__cell__.tableHeaderRow,g=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===c.lineNumber?(c.x=(h.x||0)+(h.width||0),c.y=h.y||0):h.y+h.height+c.height+v.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=v.top,g&&y&&(this.printHeaderRow(c.lineNumber,!0),c.y+=y[0].height)):c.y=h.y+h.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-f,c.y+f,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+f,{align:"center",baseline:"top",maxWidth:c.width-f-f}):this.text(c.text,c.x+f,c.y+f,{align:"left",baseline:"top",maxWidth:c.width-f-f})),this.internal.__cell__.lastCell=c,this};r.table=function(c,h,f,v,y){if(n.call(this),!f)throw new Error("No data for PDF table.");var g,_,E,A,T=[],C=[],N=[],k={},j={},W=[],G=[],D=(y=y||{}).autoSize||!1,M=y.printHeaders!==!1,U=y.css&&y.css["font-size"]!==void 0?16*y.css["font-size"]:y.fontSize||12,I=y.margins||Object.assign({width:this.getPageWidth()},e),q=typeof y.padding=="number"?y.padding:3,z=y.headerBackgroundColor||"#c8c8c8",Q=y.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=M,this.internal.__cell__.margins=I,this.internal.__cell__.table_font_size=U,this.internal.__cell__.padding=q,this.internal.__cell__.headerBackgroundColor=z,this.internal.__cell__.headerTextColor=Q,this.setFontSize(U),v==null)C=T=Object.keys(f[0]),N=T.map(function(){return"left"});else if(Array.isArray(v)&&qr(v[0])==="object")for(T=v.map(function(Z){return Z.name}),C=v.map(function(Z){return Z.prompt||Z.name||""}),N=v.map(function(Z){return Z.align||"left"}),g=0;g<v.length;g+=1)j[v[g].name]=.7499990551181103*v[g].width;else Array.isArray(v)&&typeof v[0]=="string"&&(C=T=v,N=T.map(function(){return"left"}));if(D||Array.isArray(v)&&typeof v[0]=="string")for(g=0;g<T.length;g+=1){for(k[A=T[g]]=f.map(function(Z){return Z[A]}),this.setFont(void 0,"bold"),W.push(this.getTextDimensions(C[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),_=k[A],this.setFont(void 0,"normal"),E=0;E<_.length;E+=1)W.push(this.getTextDimensions(_[E],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);j[A]=Math.max.apply(null,W)+q+q,W=[]}if(M){var ce={};for(g=0;g<T.length;g+=1)ce[T[g]]={},ce[T[g]].text=C[g],ce[T[g]].align=N[g];var re=u.call(this,ce,j);G=T.map(function(Z){return new a(c,h,j[Z],re,ce[Z].text,void 0,ce[Z].align)}),this.setTableHeaderRow(G),this.printHeaderRow(1,!1)}var J=v.reduce(function(Z,oe){return Z[oe.name]=oe.align,Z},{});for(g=0;g<f.length;g+=1){"rowStart"in y&&y.rowStart instanceof Function&&y.rowStart({row:g,data:f[g]},this);var le=u.call(this,f[g],j);for(E=0;E<T.length;E+=1){var ye=f[g][T[E]];"cellStart"in y&&y.cellStart instanceof Function&&y.cellStart({row:g,col:E,data:ye},this),o.call(this,new a(c,h,j[T[E]],le,ye,g+2,J[T[E]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=h,this};var u=function(c,h){var f=this.internal.__cell__.padding,v=this.internal.__cell__.table_font_size,y=this.internal.scaleFactor;return Object.keys(c).map(function(g){var _=c[g];return this.splitTextToSize(_.hasOwnProperty("text")?_.text:_,h[g]-f-f)},this).map(function(g){return this.getLineHeightFactor()*g.length*v/y+f+f},this).reduce(function(g,_){return Math.max(g,_)},0)};r.setTableHeaderRow=function(c){n.call(this),this.internal.__cell__.tableHeaderRow=c},r.printHeaderRow=function(c,h){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var f;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var v=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(v[0],v[1],v[2],v[3],void 0,-1)}this.setFont(void 0,"bold");for(var y=[],g=0;g<this.internal.__cell__.tableHeaderRow.length;g+=1){f=this.internal.__cell__.tableHeaderRow[g].clone(),h&&(f.y=this.internal.__cell__.margins.top||0,y.push(f)),f.lineNumber=c;var _=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,f),this.setTextColor(_)}y.length>0&&this.setTableHeaderRow(y),this.setFont(void 0,"normal"),t=!1}})(Rt.API);var QY={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ZY=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],r6=XY(ZY),JY=[100,200,300,400,500,600,700,800,900],Ioe=XY(JY);function sb(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=(function(a){return QY[a=a||"normal"]?a:"normal"})(r.style),n=(function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400})(r.weight),i=(function(a){return typeof r6[a=a||"normal"]=="number"?a:"normal"})(r.stretch);return{family:e,style:t,weight:n,stretch:i,src:r.src||[],ref:r.ref||{name:e,style:[i,t,n].join(" ")}}}function kN(r,e,t,n){var i;for(i=t;i>=0&&i<e.length;i+=n)if(r[e[i]])return r[e[i]];for(i=t;i>=0&&i<e.length;i-=n)if(r[e[i]])return r[e[i]]}var Poe={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},NN={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function IN(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function PN(r){return r.trimLeft()}function joe(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function Moe(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var rf,Gm,jN,MN,DN,ob=["times"];function qN(r,e,t,n,i){var a=4,o=$N;switch(i){case Rt.API.image_compression.FAST:a=1,o=LN;break;case Rt.API.image_compression.MEDIUM:a=6,o=BN;break;case Rt.API.image_compression.SLOW:a=9,o=FN}r=(function(c,h,f,v){for(var y,g=c.length/h,_=new Uint8Array(c.length+g),E=[Doe,LN,$N,BN,FN],A=0;A<g;A+=1){var T=A*h,C=c.subarray(T,T+h);if(v)_.set(v(C,f,y),T+A);else{for(var N=E.length,k=[],j=0;j<N;j+=1)k[j]=E[j](C,f,y);var W=Loe(k.concat());_.set(k[W],T+A)}y=C}return _})(r,e,Math.ceil(t*n/8),o);var u=KO(r,{level:a});return Rt.API.__addimage__.arrayBufferToBinaryString(u)}function Doe(r){var e=Array.apply([],r);return e.unshift(0),e}function LN(r,e){var t=r.length,n=[];n[0]=1;for(var i=0;i<t;i+=1){var a=r[i-e]||0;n[i+1]=r[i]-a+256&255}return n}function $N(r,e,t){var n=r.length,i=[];i[0]=2;for(var a=0;a<n;a+=1){var o=t&&t[a]||0;i[a+1]=r[a]-o+256&255}return i}function BN(r,e,t){var n=r.length,i=[];i[0]=3;for(var a=0;a<n;a+=1){var o=r[a-e]||0,u=t&&t[a]||0;i[a+1]=r[a]+256-(o+u>>>1)&255}return i}function FN(r,e,t){var n=r.length,i=[];i[0]=4;for(var a=0;a<n;a+=1){var o=qoe(r[a-e]||0,t&&t[a]||0,t&&t[a-e]||0);i[a+1]=r[a]-o+256&255}return i}function qoe(r,e,t){if(r===e&&e===t)return r;var n=Math.abs(e-t),i=Math.abs(r-t),a=Math.abs(r+e-t-t);return n<=i&&n<=a?r:i<=a?e:t}function Loe(r){var e=r.map(function(t){return t.reduce(function(n,i){return n+Math.abs(i)},0)});return e.indexOf(Math.min.apply(null,e))}function lb(r,e,t){var n=e*t,i=Math.floor(n/8),a=16-(n-8*i+t),o=(1<<t)-1;return eK(r,i)>>a&o}function zN(r,e,t,n){var i=t*n,a=Math.floor(i/8),o=16-(i-8*a+n),u=(1<<n)-1,c=(e&u)<<o;(function(h,f,v){if(f+1<h.byteLength)h.setUint16(f,v,!1);else{var y=v>>8&255;h.setUint8(f,y)}})(r,a,eK(r,a)&~(u<<o)&65535|c)}function eK(r,e){return e+1<r.byteLength?r.getUint16(e,!1):r.getUint8(e)<<8}function $oe(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,n=r[e++]|r[e++]<<8,i=r[e++],a=i>>7,o=1<<1+(7&i);r[e++],r[e++];var u=null,c=null;a&&(u=e,c=o,e+=3*o);var h=!0,f=[],v=0,y=null,g=0,_=null;for(this.width=t,this.height=n;h&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,_=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((I=r[e++])>=0))throw Error("Invalid block size");if(I===0)break;e+=I}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var E=r[e++];v=r[e++]|r[e++]<<8,y=r[e++],1&E||(y=null),g=E>>2&7,e++;break;case 254:for(;;){if(!((I=r[e++])>=0))throw Error("Invalid block size");if(I===0)break;e+=I}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var A=r[e++]|r[e++]<<8,T=r[e++]|r[e++]<<8,C=r[e++]|r[e++]<<8,N=r[e++]|r[e++]<<8,k=r[e++],j=k>>6&1,W=1<<1+(7&k),G=u,D=c,M=!1;k>>7&&(M=!0,G=e,D=W,e+=3*W);var U=e;for(e++;;){var I;if(!((I=r[e++])>=0))throw Error("Invalid block size");if(I===0)break;e+=I}f.push({x:A,y:T,width:C,height:N,has_local_palette:M,palette_offset:G,palette_size:D,data_offset:U,data_length:e-U,transparent_index:y,interlaced:!!j,delay:v,disposal:g});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return _},this.frameInfo=function(q){if(q<0||q>=f.length)throw new Error("Frame index out of range.");return f[q]},this.decodeAndBlitFrameBGRA=function(q,z){var Q=this.frameInfo(q),ce=Q.width*Q.height;if(ce>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var re=new Uint8Array(ce);UN(r,Q.data_offset,re,ce);var J=Q.palette_offset,le=Q.transparent_index;le===null&&(le=256);var ye=Q.width,Z=t-ye,oe=ye,L=4*(Q.y*t+Q.x),Y=4*((Q.y+Q.height)*t+Q.x),te=L,de=4*Z;Q.interlaced===!0&&(de+=4*t*7);for(var ue=8,we=0,Se=re.length;we<Se;++we){var Ie=re[we];if(oe===0&&(oe=ye,(te+=de)>=Y&&(de=4*Z+4*t*(ue-1),te=L+(ye+Z)*(ue<<1),ue>>=1)),Ie===le)te+=4;else{var Le=r[J+3*Ie],Ve=r[J+3*Ie+1],tt=r[J+3*Ie+2];z[te++]=tt,z[te++]=Ve,z[te++]=Le,z[te++]=255}--oe}},this.decodeAndBlitFrameRGBA=function(q,z){var Q=this.frameInfo(q),ce=Q.width*Q.height;if(ce>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var re=new Uint8Array(ce);UN(r,Q.data_offset,re,ce);var J=Q.palette_offset,le=Q.transparent_index;le===null&&(le=256);var ye=Q.width,Z=t-ye,oe=ye,L=4*(Q.y*t+Q.x),Y=4*((Q.y+Q.height)*t+Q.x),te=L,de=4*Z;Q.interlaced===!0&&(de+=4*t*7);for(var ue=8,we=0,Se=re.length;we<Se;++we){var Ie=re[we];if(oe===0&&(oe=ye,(te+=de)>=Y&&(de=4*Z+4*t*(ue-1),te=L+(ye+Z)*(ue<<1),ue>>=1)),Ie===le)te+=4;else{var Le=r[J+3*Ie],Ve=r[J+3*Ie+1],tt=r[J+3*Ie+2];z[te++]=Le,z[te++]=Ve,z[te++]=tt,z[te++]=255}--oe}}}function UN(r,e,t,n){for(var i=r[e++],a=1<<i,o=a+1,u=o+1,c=i+1,h=(1<<c)-1,f=0,v=0,y=0,g=r[e++],_=new Int32Array(4096),E=null;;){for(;f<16&&g!==0;)v|=r[e++]<<f,f+=8,g===1?g=r[e++]:--g;if(f<c)break;var A=v&h;if(v>>=c,f-=c,A!==a){if(A===o)break;for(var T=A<u?A:E,C=0,N=T;N>a;)N=_[N]>>8,++C;var k=N;if(y+C+(T!==A?1:0)>n)return void Yr.log("Warning, gif stream longer than expected.");t[y++]=k;var j=y+=C;for(T!==A&&(t[y++]=k),N=T;C--;)N=_[N],t[--j]=255&N,N>>=8;E!==null&&u<4096&&(_[u++]=E<<8|k,u>=h+1&&c<12&&(++c,h=h<<1|1)),E=A}else u=o+1,h=(1<<(c=i+1))-1,E=null}return y!==n&&Yr.log("Warning, gif stream shorter than expected."),t}/**
|
|
523
|
+
* @license
|
|
524
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
525
|
+
All rights reserved.
|
|
526
|
+
|
|
527
|
+
Redistribution and use in source and binary forms, with or without
|
|
528
|
+
modification, are permitted provided that the following conditions are
|
|
529
|
+
met:
|
|
530
|
+
|
|
531
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
532
|
+
this list of conditions and the following disclaimer.
|
|
533
|
+
|
|
534
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
535
|
+
notice, this list of conditions and the following disclaimer in the
|
|
536
|
+
documentation and/or other materials provided with the distribution.
|
|
537
|
+
|
|
538
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
539
|
+
contributors may be used to endorse or promote products derived from
|
|
540
|
+
this software without specific prior written permission.
|
|
541
|
+
|
|
542
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
543
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
544
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
545
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
546
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
547
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
548
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
549
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
550
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
551
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
552
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
553
|
+
*/function ub(r){var e,t,n,i,a,o=Math.floor,u=new Array(64),c=new Array(64),h=new Array(64),f=new Array(64),v=new Array(65535),y=new Array(65535),g=new Array(64),_=new Array(64),E=[],A=0,T=7,C=new Array(64),N=new Array(64),k=new Array(64),j=new Array(256),W=new Array(2048),G=[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],D=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],I=[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],q=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],Q=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],ce=[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 re(L,Y){for(var te=0,de=0,ue=new Array,we=1;we<=16;we++){for(var Se=1;Se<=L[we];Se++)ue[Y[de]]=[],ue[Y[de]][0]=te,ue[Y[de]][1]=we,de++,te++;te*=2}return ue}function J(L){for(var Y=L[0],te=L[1]-1;te>=0;)Y&1<<te&&(A|=1<<T),te--,--T<0&&(A==255?(le(255),le(0)):le(A),T=7,A=0)}function le(L){E.push(L)}function ye(L){le(L>>8&255),le(255&L)}function Z(L,Y,te,de,ue){for(var we,Se=ue[0],Ie=ue[240],Le=(function(We,vt){var it,yt,ut,qt,Wt,At,Tt,It,nt,jt,ze=0;for(nt=0;nt<8;++nt){it=We[ze],yt=We[ze+1],ut=We[ze+2],qt=We[ze+3],Wt=We[ze+4],At=We[ze+5],Tt=We[ze+6];var Ke=it+(It=We[ze+7]),fe=it-It,ke=yt+Tt,Be=yt-Tt,ht=ut+At,lt=ut-At,or=qt+Wt,Ct=qt-Wt,Mt=Ke+or,zt=Ke-or,Ht=ke+ht,Pt=ke-ht;We[ze]=Mt+Ht,We[ze+4]=Mt-Ht;var yr=.707106781*(Pt+zt);We[ze+2]=zt+yr,We[ze+6]=zt-yr;var vs=.382683433*((Mt=Ct+lt)-(Pt=Be+fe)),Cr=.5411961*Mt+vs,Ua=1.306562965*Pt+vs,Ha=.707106781*(Ht=lt+Be),Dt=fe+Ha,pi=fe-Ha;We[ze+5]=pi+Cr,We[ze+3]=pi-Cr,We[ze+1]=Dt+Ua,We[ze+7]=Dt-Ua,ze+=8}for(ze=0,nt=0;nt<8;++nt){it=We[ze],yt=We[ze+8],ut=We[ze+16],qt=We[ze+24],Wt=We[ze+32],At=We[ze+40],Tt=We[ze+48];var Qr=it+(It=We[ze+56]),Hr=it-It,ai=yt+Tt,Zr=yt-Tt,Yn=ut+At,si=ut-At,Ro=qt+Wt,_a=qt-Wt,ia=Qr+Ro,Mi=Qr-Ro,vi=ai+Yn,Di=ai-Yn;We[ze]=ia+vi,We[ze+32]=ia-vi;var oi=.707106781*(Di+Mi);We[ze+16]=Mi+oi,We[ze+48]=Mi-oi;var Jr=.382683433*((ia=_a+si)-(Di=Zr+Hr)),Wa=.5411961*ia+Jr,Co=1.306562965*Di+Jr,Sa=.707106781*(vi=si+Zr),Ga=Hr+Sa,xu=Hr-Sa;We[ze+40]=xu+Wa,We[ze+24]=xu-Wa,We[ze+8]=Ga+Co,We[ze+56]=Ga-Co,ze++}for(nt=0;nt<64;++nt)jt=We[nt]*vt[nt],g[nt]=jt>0?jt+.5|0:jt-.5|0;return g})(L,Y),Ve=0;Ve<64;++Ve)_[G[Ve]]=Le[Ve];var tt=_[0]-te;te=_[0],tt==0?J(de[0]):(J(de[y[we=32767+tt]]),J(v[we]));for(var Xe=63;Xe>0&&_[Xe]==0;)Xe--;if(Xe==0)return J(Se),te;for(var dt,ne=1;ne<=Xe;){for(var et=ne;_[ne]==0&&ne<=Xe;)++ne;var st=ne-et;if(st>=16){dt=st>>4;for(var ot=1;ot<=dt;++ot)J(Ie);st&=15}we=32767+_[ne],J(ue[(st<<4)+y[we]]),J(v[we]),ne++}return Xe!=63&&J(Se),te}function oe(L){L=Math.min(Math.max(L,1),100),a!=L&&((function(Y){for(var te=[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],de=0;de<64;de++){var ue=o((te[de]*Y+50)/100);ue=Math.min(Math.max(ue,1),255),u[G[de]]=ue}for(var we=[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],Se=0;Se<64;Se++){var Ie=o((we[Se]*Y+50)/100);Ie=Math.min(Math.max(Ie,1),255),c[G[Se]]=Ie}for(var Le=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ve=0,tt=0;tt<8;tt++)for(var Xe=0;Xe<8;Xe++)h[Ve]=1/(u[G[Ve]]*Le[tt]*Le[Xe]*8),f[Ve]=1/(c[G[Ve]]*Le[tt]*Le[Xe]*8),Ve++})(L<50?Math.floor(5e3/L):Math.floor(200-2*L)),a=L)}this.encode=function(L,Y){Y&&oe(Y),E=new Array,A=0,T=7,ye(65496),ye(65504),ye(16),le(74),le(70),le(73),le(70),le(0),le(1),le(1),le(0),ye(1),ye(1),le(0),le(0),(function(){ye(65499),ye(132),le(0);for(var yt=0;yt<64;yt++)le(u[yt]);le(1);for(var ut=0;ut<64;ut++)le(c[ut])})(),(function(yt,ut){ye(65472),ye(17),le(8),ye(ut),ye(yt),le(3),le(1),le(17),le(0),le(2),le(17),le(1),le(3),le(17),le(1)})(L.width,L.height),(function(){ye(65476),ye(418),le(0);for(var yt=0;yt<16;yt++)le(D[yt+1]);for(var ut=0;ut<=11;ut++)le(M[ut]);le(16);for(var qt=0;qt<16;qt++)le(U[qt+1]);for(var Wt=0;Wt<=161;Wt++)le(I[Wt]);le(1);for(var At=0;At<16;At++)le(q[At+1]);for(var Tt=0;Tt<=11;Tt++)le(z[Tt]);le(17);for(var It=0;It<16;It++)le(Q[It+1]);for(var nt=0;nt<=161;nt++)le(ce[nt])})(),ye(65498),ye(12),le(3),le(1),le(0),le(2),le(17),le(3),le(17),le(0),le(63),le(0);var te=0,de=0,ue=0;A=0,T=7,this.encode.displayName="_encode_";for(var we,Se,Ie,Le,Ve,tt,Xe,dt,ne,et=L.data,st=L.width,ot=L.height,We=4*st,vt=0;vt<ot;){for(we=0;we<We;){for(Ve=We*vt+we,Xe=-1,dt=0,ne=0;ne<64;ne++)tt=Ve+(dt=ne>>3)*We+(Xe=4*(7&ne)),vt+dt>=ot&&(tt-=We*(vt+1+dt-ot)),we+Xe>=We&&(tt-=we+Xe-We+4),Se=et[tt++],Ie=et[tt++],Le=et[tt++],C[ne]=(W[Se]+W[Ie+256|0]+W[Le+512|0]>>16)-128,N[ne]=(W[Se+768|0]+W[Ie+1024|0]+W[Le+1280|0]>>16)-128,k[ne]=(W[Se+1280|0]+W[Ie+1536|0]+W[Le+1792|0]>>16)-128;te=Z(C,h,te,e,n),de=Z(N,f,de,t,i),ue=Z(k,f,ue,t,i),we+=32}vt+=8}if(T>=0){var it=[];it[1]=T+1,it[0]=(1<<T+1)-1,J(it)}return ye(65497),new Uint8Array(E)},r=r||50,(function(){for(var L=String.fromCharCode,Y=0;Y<256;Y++)j[Y]=L(Y)})(),e=re(D,M),t=re(q,z),n=re(U,I),i=re(Q,ce),(function(){for(var L=1,Y=2,te=1;te<=15;te++){for(var de=L;de<Y;de++)y[32767+de]=te,v[32767+de]=[],v[32767+de][1]=te,v[32767+de][0]=de;for(var ue=-(Y-1);ue<=-L;ue++)y[32767+ue]=te,v[32767+ue]=[],v[32767+ue][1]=te,v[32767+ue][0]=Y-1+ue;L<<=1,Y<<=1}})(),(function(){for(var L=0;L<256;L++)W[L]=19595*L,W[L+256|0]=38470*L,W[L+512|0]=7471*L+32768,W[L+768|0]=-11059*L,W[L+1024|0]=-21709*L,W[L+1280|0]=32768*L+8421375,W[L+1536|0]=-27439*L,W[L+1792|0]=-5329*L})(),oe(r)}/**
|
|
554
|
+
* @license
|
|
555
|
+
* Copyright (c) 2017 Aras Abbasi
|
|
556
|
+
*
|
|
557
|
+
* Licensed under the MIT License.
|
|
558
|
+
* http://opensource.org/licenses/mit-license
|
|
559
|
+
*/function vo(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,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 HN(r){function e(M){if(!M)throw Error("assert :P")}function t(M,U,I){for(var q=0;4>q;q++)if(M[U+q]!=I.charCodeAt(q))return!0;return!1}function n(M,U,I,q,z){for(var Q=0;Q<z;Q++)M[U+Q]=I[q+Q]}function i(M,U,I,q){for(var z=0;z<q;z++)M[U+z]=I}function a(M){return new Int32Array(M)}function o(M,U){for(var I=[],q=0;q<M;q++)I.push(new U);return I}function u(M,U){var I=[];return(function q(z,Q,ce){for(var re=ce[Q],J=0;J<re&&(z.push(ce.length>Q+1?[]:new U),!(ce.length<Q+1));J++)q(z[J],Q+1,ce)})(I,0,M),I}var c=function(){var M=this;function U(m,x){for(var R=1<<x-1>>>0;m&R;)R>>>=1;return R?(m&R-1)+R:m}function I(m,x,R,P,F){e(!(P%R));do m[x+(P-=R)]=F;while(0<P)}function q(m,x,R,P,F){if(e(2328>=F),512>=F)var H=a(512);else if((H=a(F))==null)return 0;return(function(V,X,ee,se,ge,Ae){var ae,be,Ee=X,Pe=1<<ee,Oe=a(16),qe=a(16);for(e(ge!=0),e(se!=null),e(V!=null),e(0<ee),be=0;be<ge;++be){if(15<se[be])return 0;++Oe[se[be]]}if(Oe[0]==ge)return 0;for(qe[1]=0,ae=1;15>ae;++ae){if(Oe[ae]>1<<ae)return 0;qe[ae+1]=qe[ae]+Oe[ae]}for(be=0;be<ge;++be)ae=se[be],0<se[be]&&(Ae[qe[ae]++]=be);if(qe[15]==1)return(se=new z).g=0,se.value=Ae[0],I(V,Ee,1,Pe,se),Pe;var De,Ye=-1,Ue=Pe-1,St=0,ct=1,Kt=1,ft=1<<ee;for(be=0,ae=1,ge=2;ae<=ee;++ae,ge<<=1){if(ct+=Kt<<=1,0>(Kt-=Oe[ae]))return 0;for(;0<Oe[ae];--Oe[ae])(se=new z).g=ae,se.value=Ae[be++],I(V,Ee+St,ge,ft,se),St=U(St,ae)}for(ae=ee+1,ge=2;15>=ae;++ae,ge<<=1){if(ct+=Kt<<=1,0>(Kt-=Oe[ae]))return 0;for(;0<Oe[ae];--Oe[ae]){if(se=new z,(St&Ue)!=Ye){for(Ee+=ft,De=1<<(Ye=ae)-ee;15>Ye&&!(0>=(De-=Oe[Ye]));)++Ye,De<<=1;Pe+=ft=1<<(De=Ye-ee),V[X+(Ye=St&Ue)].g=De+ee,V[X+Ye].value=Ee-X-Ye}se.g=ae-ee,se.value=Ae[be++],I(V,Ee+(St>>ee),ge,ft,se),St=U(St,ae)}}return ct!=2*qe[15]-1?0:Pe})(m,x,R,P,F,H)}function z(){this.value=this.g=0}function Q(){this.value=this.g=0}function ce(){this.G=o(5,z),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Bo,Q)}function re(m,x,R,P){e(m!=null),e(x!=null),e(2147483648>P),m.Ca=254,m.I=0,m.b=-8,m.Ka=0,m.oa=x,m.pa=R,m.Jd=x,m.Yc=R+P,m.Zc=4<=P?R+P-4+1:R,Se(m)}function J(m,x){for(var R=0;0<x--;)R|=Le(m,128)<<x;return R}function le(m,x){var R=J(m,x);return Ie(m)?-R:R}function ye(m,x,R,P){var F,H=0;for(e(m!=null),e(x!=null),e(4294967288>P),m.Sb=P,m.Ra=0,m.u=0,m.h=0,4<P&&(P=4),F=0;F<P;++F)H+=x[R+F]<<8*F;m.Ra=H,m.bb=P,m.oa=x,m.pa=R}function Z(m){for(;8<=m.u&&m.bb<m.Sb;)m.Ra>>>=8,m.Ra+=m.oa[m.pa+m.bb]<<wi-8>>>0,++m.bb,m.u-=8;de(m)&&(m.h=1,m.u=0)}function oe(m,x){if(e(0<=x),!m.h&&x<=Mu){var R=te(m)&Zs[x];return m.u+=x,Z(m),R}return m.h=1,m.u=0}function L(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function Y(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function te(m){return m.Ra>>>(m.u&wi-1)>>>0}function de(m){return e(m.bb<=m.Sb),m.h||m.bb==m.Sb&&m.u>wi}function ue(m,x){m.u=x,m.h=de(m)}function we(m){m.u>=Bi&&(e(m.u>=Bi),Z(m))}function Se(m){e(m!=null&&m.oa!=null),m.pa<m.Zc?(m.I=(m.oa[m.pa++]|m.I<<8)>>>0,m.b+=8):(e(m!=null&&m.oa!=null),m.pa<m.Yc?(m.b+=8,m.I=m.oa[m.pa++]|m.I<<8):m.Ka?m.b=0:(m.I<<=8,m.b+=8,m.Ka=1))}function Ie(m){return J(m,1)}function Le(m,x){var R=m.Ca;0>m.b&&Se(m);var P=m.b,F=R*x>>>8,H=(m.I>>>P>F)+0;for(H?(R-=F,m.I-=F+1<<P>>>0):R=F+1,P=R,F=0;256<=P;)F+=8,P>>=8;return P=7^F+Du[P],m.b-=P,m.Ca=(R<<P)-1,H}function Ve(m,x,R){m[x+0]=R>>24&255,m[x+1]=R>>16&255,m[x+2]=R>>8&255,m[x+3]=255&R}function tt(m,x){return m[x+0]|m[x+1]<<8}function Xe(m,x){return tt(m,x)|m[x+2]<<16}function dt(m,x){return tt(m,x)|tt(m,x+2)<<16}function ne(m,x){var R=1<<x;return e(m!=null),e(0<x),m.X=a(R),m.X==null?0:(m.Mb=32-x,m.Xa=x,1)}function et(m,x){e(m!=null),e(x!=null),e(m.Xa==x.Xa),n(x.X,0,m.X,0,1<<x.Xa)}function st(){this.X=[],this.Xa=this.Mb=0}function ot(m,x,R,P){e(R!=null),e(P!=null);var F=R[0],H=P[0];return F==0&&(F=(m*H+x/2)/x),H==0&&(H=(x*F+m/2)/m),0>=F||0>=H?0:(R[0]=F,P[0]=H,1)}function We(m,x){return m+(1<<x)-1>>>x}function vt(m,x){return((4278255360&m)+(4278255360&x)>>>0&4278255360)+((16711935&m)+(16711935&x)>>>0&16711935)>>>0}function it(m,x){M[x]=function(R,P,F,H,V,X,ee){var se;for(se=0;se<V;++se){var ge=M[m](X[ee+se-1],F,H+se);X[ee+se]=vt(R[P+se],ge)}}}function yt(){this.ud=this.hd=this.jd=0}function ut(m,x){return((4278124286&(m^x))>>>1)+(m&x)>>>0}function qt(m){return 0<=m&&256>m?m:0>m?0:255<m?255:void 0}function Wt(m,x){return qt(m+(m-x+.5>>1))}function At(m,x,R){return Math.abs(x-R)-Math.abs(m-R)}function Tt(m,x,R,P,F,H,V){for(P=H[V-1],R=0;R<F;++R)H[V+R]=P=vt(m[x+R],P)}function It(m,x,R,P,F){var H;for(H=0;H<R;++H){var V=m[x+H],X=V>>8&255,ee=16711935&(ee=(ee=16711935&V)+((X<<16)+X));P[F+H]=(4278255360&V)+ee>>>0}}function nt(m,x){x.jd=255&m,x.hd=m>>8&255,x.ud=m>>16&255}function jt(m,x,R,P,F,H){var V;for(V=0;V<P;++V){var X=x[R+V],ee=X>>>8,se=X,ge=255&(ge=(ge=X>>>16)+((m.jd<<24>>24)*(ee<<24>>24)>>>5));se=255&(se=(se+=(m.hd<<24>>24)*(ee<<24>>24)>>>5)+((m.ud<<24>>24)*(ge<<24>>24)>>>5)),F[H+V]=(4278255360&X)+(ge<<16)+se}}function ze(m,x,R,P,F){M[x]=function(H,V,X,ee,se,ge,Ae,ae,be){for(ee=Ae;ee<ae;++ee)for(Ae=0;Ae<be;++Ae)se[ge++]=F(X[P(H[V++])])},M[m]=function(H,V,X,ee,se,ge,Ae){var ae=8>>H.b,be=H.Ea,Ee=H.K[0],Pe=H.w;if(8>ae)for(H=(1<<H.b)-1,Pe=(1<<ae)-1;V<X;++V){var Oe,qe=0;for(Oe=0;Oe<be;++Oe)Oe&H||(qe=P(ee[se++])),ge[Ae++]=F(Ee[qe&Pe]),qe>>=ae}else M["VP8LMapColor"+R](ee,se,Ee,Pe,ge,Ae,V,X,be)}}function Ke(m,x,R,P,F){for(R=x+R;x<R;){var H=m[x++];P[F++]=H>>16&255,P[F++]=H>>8&255,P[F++]=255&H}}function fe(m,x,R,P,F){for(R=x+R;x<R;){var H=m[x++];P[F++]=H>>16&255,P[F++]=H>>8&255,P[F++]=255&H,P[F++]=H>>24&255}}function ke(m,x,R,P,F){for(R=x+R;x<R;){var H=(V=m[x++])>>16&240|V>>12&15,V=240&V|V>>28&15;P[F++]=H,P[F++]=V}}function Be(m,x,R,P,F){for(R=x+R;x<R;){var H=(V=m[x++])>>16&248|V>>13&7,V=V>>5&224|V>>3&31;P[F++]=H,P[F++]=V}}function ht(m,x,R,P,F){for(R=x+R;x<R;){var H=m[x++];P[F++]=255&H,P[F++]=H>>8&255,P[F++]=H>>16&255}}function lt(m,x,R,P,F,H){if(H==0)for(R=x+R;x<R;)Ve(P,((H=m[x++])[0]>>24|H[1]>>8&65280|H[2]<<8&16711680|H[3]<<24)>>>0),F+=32;else n(P,F,m,x,R)}function or(m,x){M[x][0]=M[m+"0"],M[x][1]=M[m+"1"],M[x][2]=M[m+"2"],M[x][3]=M[m+"3"],M[x][4]=M[m+"4"],M[x][5]=M[m+"5"],M[x][6]=M[m+"6"],M[x][7]=M[m+"7"],M[x][8]=M[m+"8"],M[x][9]=M[m+"9"],M[x][10]=M[m+"10"],M[x][11]=M[m+"11"],M[x][12]=M[m+"12"],M[x][13]=M[m+"13"],M[x][14]=M[m+"0"],M[x][15]=M[m+"0"]}function Ct(m){return m==Yc||m==Ho||m==ro||m==Uu}function Mt(){this.eb=[],this.size=this.A=this.fb=0}function zt(){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 Ht(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Mt,this.f.kb=new zt,this.sd=null}function Pt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function yr(){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 vs(m){return alert("todo:WebPSamplerProcessPlane"),m.T}function Cr(m,x){var R=m.T,P=x.ba.f.RGBA,F=P.eb,H=P.fb+m.ka*P.A,V=Qn[x.ba.S],X=m.y,ee=m.O,se=m.f,ge=m.N,Ae=m.ea,ae=m.W,be=x.cc,Ee=x.dc,Pe=x.Mc,Oe=x.Nc,qe=m.ka,De=m.ka+m.T,Ye=m.U,Ue=Ye+1>>1;for(qe==0?V(X,ee,null,null,se,ge,Ae,ae,se,ge,Ae,ae,F,H,null,null,Ye):(V(x.ec,x.fc,X,ee,be,Ee,Pe,Oe,se,ge,Ae,ae,F,H-P.A,F,H,Ye),++R);qe+2<De;qe+=2)be=se,Ee=ge,Pe=Ae,Oe=ae,ge+=m.Rc,ae+=m.Rc,H+=2*P.A,V(X,(ee+=2*m.fa)-m.fa,X,ee,be,Ee,Pe,Oe,se,ge,Ae,ae,F,H-P.A,F,H,Ye);return ee+=m.fa,m.j+De<m.o?(n(x.ec,x.fc,X,ee,Ye),n(x.cc,x.dc,se,ge,Ue),n(x.Mc,x.Nc,Ae,ae,Ue),R--):1&De||V(X,ee,null,null,se,ge,Ae,ae,se,ge,Ae,ae,F,H+P.A,null,null,Ye),R}function Ua(m,x,R){var P=m.F,F=[m.J];if(P!=null){var H=m.U,V=x.ba.S,X=V==$l||V==ro;x=x.ba.f.RGBA;var ee=[0],se=m.ka;ee[0]=m.T,m.Kb&&(se==0?--ee[0]:(--se,F[0]-=m.width),m.j+m.ka+m.T==m.o&&(ee[0]=m.o-m.j-se));var ge=x.eb;se=x.fb+se*x.A,m=ca(P,F[0],m.width,H,ee,ge,se+(X?0:3),x.A),e(R==ee),m&&Ct(V)&&Fu(ge,se,X,H,ee,x.A)}return 0}function Ha(m){var x=m.ma,R=x.ba.S,P=11>R,F=R==zu||R==Vc||R==$l||R==to||R==12||Ct(R);if(x.memory=null,x.Ib=null,x.Jb=null,x.Nd=null,!$i(x.Oa,m,F?11:12))return 0;if(F&&Ct(R)&&Za(),m.da)alert("todo:use_scaling");else{if(P){if(x.Ib=vs,m.Kb){if(R=m.U+1>>1,x.memory=a(m.U+2*R),x.memory==null)return 0;x.ec=x.memory,x.fc=0,x.cc=x.ec,x.dc=x.fc+m.U,x.Mc=x.cc,x.Nc=x.dc+R,x.Ib=Cr,Za()}}else alert("todo:EmitYUV");F&&(x.Jb=Ua,P&&sn())}if(P&&!zg){for(m=0;256>m;++m)Oy[m]=89858*(m-128)+qn>>Es,Qc[m]=-22014*(m-128)+qn,wp[m]=-45773*(m-128),Ln[m]=113618*(m-128)+qn>>Es;for(m=Vo;m<Ih;++m)x=76283*(m-16)+qn>>Es,Zc[m-Vo]=gs(x,255),xp[m-Vo]=gs(x+8>>4,15);zg=1}return 1}function Dt(m){var x=m.ma,R=m.U,P=m.T;return e(!(1&m.ka)),0>=R||0>=P?0:(R=x.Ib(m,x),x.Jb!=null&&x.Jb(m,x,R),x.Dc+=R,1)}function pi(m){m.ma.memory=null}function Qr(m,x,R,P){return oe(m,8)!=47?0:(x[0]=oe(m,14)+1,R[0]=oe(m,14)+1,P[0]=oe(m,1),oe(m,3)!=0?0:!m.h)}function Hr(m,x){if(4>m)return m+1;var R=m-2>>1;return(2+(1&m)<<R)+oe(x,R)+1}function ai(m,x){return 120<x?x-120:1<=(R=((R=io[x-1])>>4)*m+(8-(15&R)))?R:1;var R}function Zr(m,x,R){var P=te(R),F=m[x+=255&P].g-8;return 0<F&&(ue(R,R.u+8),P=te(R),x+=m[x].value,x+=P&(1<<F)-1),ue(R,R.u+m[x].g),m[x].value}function Yn(m,x,R){return R.g+=m.g,R.value+=m.value<<x>>>0,e(8>=R.g),m.g}function si(m,x,R){var P=m.xc;return e((x=P==0?0:m.vc[m.md*(R>>P)+(x>>P)])<m.Wb),m.Ya[x]}function Ro(m,x,R,P){var F=m.ab,H=m.c*x,V=m.C;x=V+x;var X=R,ee=P;for(P=m.Ta,R=m.Ua;0<F--;){var se=m.gc[F],ge=V,Ae=x,ae=X,be=ee,Ee=(ee=P,X=R,se.Ea);switch(e(ge<Ae),e(Ae<=se.nc),se.hc){case 2:qu(ae,be,(Ae-ge)*Ee,ee,X);break;case 0:var Pe=ge,Oe=Ae,qe=ee,De=X,Ye=(ft=se).Ea;Pe==0&&(Fo(ae,be,null,null,1,qe,De),Tt(ae,be+1,0,0,Ye-1,qe,De+1),be+=Ye,De+=Ye,++Pe);for(var Ue=1<<ft.b,St=Ue-1,ct=We(Ye,ft.b),Kt=ft.K,ft=ft.w+(Pe>>ft.b)*ct;Pe<Oe;){var lr=Kt,kn=ft,Vt=1;for(zo(ae,be,qe,De-Ye,1,qe,De);Vt<Ye;){var pt=(Vt&~St)+Ue;pt>Ye&&(pt=Ye),(0,Ta[lr[kn++]>>8&15])(ae,be+ +Vt,qe,De+Vt-Ye,pt-Vt,qe,De+Vt),Vt=pt}be+=Ye,De+=Ye,++Pe&St||(ft+=ct)}Ae!=se.nc&&n(ee,X-Ee,ee,X+(Ae-ge-1)*Ee,Ee);break;case 1:for(Ee=ae,Oe=be,Ye=(ae=se.Ea)-(De=ae&~(qe=(be=1<<se.b)-1)),Pe=We(ae,se.b),Ue=se.K,se=se.w+(ge>>se.b)*Pe;ge<Ae;){for(St=Ue,ct=se,Kt=new yt,ft=Oe+De,lr=Oe+ae;Oe<ft;)nt(St[ct++],Kt),Uo(Kt,Ee,Oe,be,ee,X),Oe+=be,X+=be;Oe<lr&&(nt(St[ct++],Kt),Uo(Kt,Ee,Oe,Ye,ee,X),Oe+=Ye,X+=Ye),++ge&qe||(se+=Pe)}break;case 3:if(ae==ee&&be==X&&0<se.b){for(Oe=ee,ae=Ee=X+(Ae-ge)*Ee-(De=(Ae-ge)*We(se.Ea,se.b)),be=ee,qe=X,Pe=[],De=(Ye=De)-1;0<=De;--De)Pe[De]=be[qe+De];for(De=Ye-1;0<=De;--De)Oe[ae+De]=Pe[De];Pl(se,ge,Ae,ee,Ee,ee,X)}else Pl(se,ge,Ae,ae,be,ee,X)}X=P,ee=R}ee!=R&&n(P,R,X,ee,H)}function _a(m,x){var R=m.V,P=m.Ba+m.c*m.C,F=x-m.C;if(e(x<=m.l.o),e(16>=F),0<F){var H=m.l,V=m.Ta,X=m.Ua,ee=H.width;if(Ro(m,F,R,P),F=X=[X],e((R=m.C)<(P=x)),e(H.v<H.va),P>H.o&&(P=H.o),R<H.j){var se=H.j-R;R=H.j,F[0]+=se*ee}if(R>=P?R=0:(F[0]+=4*H.v,H.ka=R-H.j,H.U=H.va-H.v,H.T=P-R,R=1),R){if(X=X[0],11>(R=m.ca).S){var ge=R.f.RGBA,Ae=(P=R.S,F=H.U,H=H.T,se=ge.eb,ge.A),ae=H;for(ge=ge.fb+m.Ma*ge.A;0<ae--;){var be=V,Ee=X,Pe=F,Oe=se,qe=ge;switch(P){case xi:Lu(be,Ee,Pe,Oe,qe);break;case zu:Ml(be,Ee,Pe,Oe,qe);break;case Yc:Ml(be,Ee,Pe,Oe,qe),Fu(Oe,qe,0,Pe,1,0);break;case ws:Js(be,Ee,Pe,Oe,qe);break;case Vc:lt(be,Ee,Pe,Oe,qe,1);break;case Ho:lt(be,Ee,Pe,Oe,qe,1),Fu(Oe,qe,0,Pe,1,0);break;case $l:lt(be,Ee,Pe,Oe,qe,0);break;case ro:lt(be,Ee,Pe,Oe,qe,0),Fu(Oe,qe,1,Pe,1,0);break;case to:$u(be,Ee,Pe,Oe,qe);break;case Uu:$u(be,Ee,Pe,Oe,qe),ua(Oe,qe,Pe,1,0);break;case Ah:Oa(be,Ee,Pe,Oe,qe);break;default:e(0)}X+=ee,ge+=Ae}m.Ma+=H}else alert("todo:EmitRescaledRowsYUVA");e(m.Ma<=R.height)}}m.C=x,e(m.C<=m.i)}function ia(m){var x;if(0<m.ua)return 0;for(x=0;x<m.Wb;++x){var R=m.Ya[x].G,P=m.Ya[x].H;if(0<R[1][P[1]+0].g||0<R[2][P[2]+0].g||0<R[3][P[3]+0].g)return 0}return 1}function Mi(m,x,R,P,F,H){if(m.Z!=0){var V=m.qd,X=m.rd;for(e(_s[m.Z]!=null);x<R;++x)_s[m.Z](V,X,P,F,P,F,H),V=P,X=F,F+=H;m.qd=V,m.rd=X}}function vi(m,x){var R=m.l.ma,P=R.Z==0||R.Z==1?m.l.j:m.C;if(P=m.C<P?P:m.C,e(x<=m.l.o),x>P){var F=m.l.width,H=R.ca,V=R.tb+F*P,X=m.V,ee=m.Ba+m.c*P,se=m.gc;e(m.ab==1),e(se[0].hc==3),jl(se[0],P,x,X,ee,H,V),Mi(R,P,x,H,V,F)}m.C=m.Ma=x}function Di(m,x,R,P,F,H,V){var X=m.$/P,ee=m.$%P,se=m.m,ge=m.s,Ae=R+m.$,ae=Ae;F=R+P*F;var be=R+P*H,Ee=280+ge.ua,Pe=m.Pb?X:16777216,Oe=0<ge.ua?ge.Wa:null,qe=ge.wc,De=Ae<be?si(ge,ee,X):null;e(m.C<H),e(be<=F);var Ye=!1;e:for(;;){for(;Ye||Ae<be;){var Ue=0;if(X>=Pe){var St=Ae-R;e((Pe=m).Pb),Pe.wd=Pe.m,Pe.xd=St,0<Pe.s.ua&&et(Pe.s.Wa,Pe.s.vb),Pe=X+$g}if(ee&qe||(De=si(ge,ee,X)),e(De!=null),De.Qb&&(x[Ae]=De.qb,Ye=!0),!Ye)if(we(se),De.jc){Ue=se,St=x;var ct=Ae,Kt=De.pd[te(Ue)&Bo-1];e(De.jc),256>Kt.g?(ue(Ue,Ue.u+Kt.g),St[ct]=Kt.value,Ue=0):(ue(Ue,Ue.u+Kt.g-256),e(256<=Kt.value),Ue=Kt.value),Ue==0&&(Ye=!0)}else Ue=Zr(De.G[0],De.H[0],se);if(se.h)break;if(Ye||256>Ue){if(!Ye)if(De.nd)x[Ae]=(De.qb|Ue<<8)>>>0;else{if(we(se),Ye=Zr(De.G[1],De.H[1],se),we(se),St=Zr(De.G[2],De.H[2],se),ct=Zr(De.G[3],De.H[3],se),se.h)break;x[Ae]=(ct<<24|Ye<<16|Ue<<8|St)>>>0}if(Ye=!1,++Ae,++ee>=P&&(ee=0,++X,V!=null&&X<=H&&!(X%16)&&V(m,X),Oe!=null))for(;ae<Ae;)Ue=x[ae++],Oe.X[(506832829*Ue&4294967295)>>>Oe.Mb]=Ue}else if(280>Ue){if(Ue=Hr(Ue-256,se),St=Zr(De.G[4],De.H[4],se),we(se),St=ai(P,St=Hr(St,se)),se.h)break;if(Ae-R<St||F-Ae<Ue)break e;for(ct=0;ct<Ue;++ct)x[Ae+ct]=x[Ae+ct-St];for(Ae+=Ue,ee+=Ue;ee>=P;)ee-=P,++X,V!=null&&X<=H&&!(X%16)&&V(m,X);if(e(Ae<=F),ee&qe&&(De=si(ge,ee,X)),Oe!=null)for(;ae<Ae;)Ue=x[ae++],Oe.X[(506832829*Ue&4294967295)>>>Oe.Mb]=Ue}else{if(!(Ue<Ee))break e;for(Ye=Ue-280,e(Oe!=null);ae<Ae;)Ue=x[ae++],Oe.X[(506832829*Ue&4294967295)>>>Oe.Mb]=Ue;Ue=Ae,e(!(Ye>>>(St=Oe).Xa)),x[Ue]=St.X[Ye],Ye=!0}Ye||e(se.h==de(se))}if(m.Pb&&se.h&&Ae<F)e(m.m.h),m.a=5,m.m=m.wd,m.$=m.xd,0<m.s.ua&&et(m.s.vb,m.s.Wa);else{if(se.h)break e;V?.(m,X>H?H:X),m.a=0,m.$=Ae-R}return 1}return m.a=3,0}function oi(m){e(m!=null),m.vc=null,m.yc=null,m.Ya=null;var x=m.Wa;x!=null&&(x.X=null),m.vb=null,e(m!=null)}function Jr(){var m=new bt;return m==null?null:(m.a=0,m.xb=Hu,or("Predictor","VP8LPredictors"),or("Predictor","VP8LPredictors_C"),or("PredictorAdd","VP8LPredictorsAdd"),or("PredictorAdd","VP8LPredictorsAdd_C"),qu=It,Uo=jt,Lu=Ke,Ml=fe,$u=ke,Oa=Be,Js=ht,M.VP8LMapColor32b=wr,M.VP8LMapColor8b=es,m)}function Wa(m,x,R,P,F){var H=1,V=[m],X=[x],ee=P.m,se=P.s,ge=null,Ae=0;e:for(;;){if(R)for(;H&&oe(ee,1);){var ae=V,be=X,Ee=P,Pe=1,Oe=Ee.m,qe=Ee.gc[Ee.ab],De=oe(Oe,2);if(Ee.Oc&1<<De)H=0;else{switch(Ee.Oc|=1<<De,qe.hc=De,qe.Ea=ae[0],qe.nc=be[0],qe.K=[null],++Ee.ab,e(4>=Ee.ab),De){case 0:case 1:qe.b=oe(Oe,3)+2,Pe=Wa(We(qe.Ea,qe.b),We(qe.nc,qe.b),0,Ee,qe.K),qe.K=qe.K[0];break;case 3:var Ye,Ue=oe(Oe,8)+1,St=16<Ue?0:4<Ue?1:2<Ue?2:3;if(ae[0]=We(qe.Ea,St),qe.b=St,Ye=Pe=Wa(Ue,1,0,Ee,qe.K)){var ct,Kt=Ue,ft=qe,lr=1<<(8>>ft.b),kn=a(lr);if(kn==null)Ye=0;else{var Vt=ft.K[0],pt=ft.w;for(kn[0]=ft.K[0][0],ct=1;ct<1*Kt;++ct)kn[ct]=vt(Vt[pt+ct],kn[ct-1]);for(;ct<4*lr;++ct)kn[ct]=0;ft.K[0]=null,ft.K[0]=kn,Ye=1}}Pe=Ye;break;case 2:break;default:e(0)}H=Pe}}if(V=V[0],X=X[0],H&&oe(ee,1)&&!(H=1<=(Ae=oe(ee,4))&&11>=Ae)){P.a=3;break e}var rt;if(rt=H)t:{var on,Xt,rr,mt=P,Zt=V,pr=X,Gr=Ae,xn=R,_n=mt.m,dn=mt.s,ar=[null],vr=1,hn=0,$t=Fl[Gr];r:for(;;){if(xn&&oe(_n,1)){var $n=oe(_n,3)+2,fa=We(Zt,$n),fn=We(pr,$n),zi=fa*fn;if(!Wa(fa,fn,0,mt,ar))break r;for(ar=ar[0],dn.xc=$n,on=0;on<zi;++on){var Pr=ar[on]>>8&65535;ar[on]=Pr,Pr>=vr&&(vr=Pr+1)}}if(_n.h)break r;for(Xt=0;5>Xt;++Xt){var Sn=da[Xt];!Xt&&0<Gr&&(Sn+=1<<Gr),hn<Sn&&(hn=Sn)}var Ui=o(vr*$t,z),ui=vr,Fr=o(ui,ce);if(Fr==null)var _r=null;else e(65536>=ui),_r=Fr;var _i=a(hn);if(_r==null||_i==null||Ui==null){mt.a=1;break r}var ci=Ui;for(on=rr=0;on<vr;++on){var Rr=_r[on],Hi=Rr.G,Bn=Rr.H,Ts=0,rs=1,Fn=0;for(Xt=0;5>Xt;++Xt){Sn=da[Xt],Hi[Xt]=ci,Bn[Xt]=rr,!Xt&&0<Gr&&(Sn+=1<<Gr);i:{var Jc,Ph=Sn,ed=mt,Gu=_i,Wg=ci,Gg=rr,td=0,lo=ed.m,Ry=oe(lo,1);if(i(Gu,0,0,Ph),Ry){var Vg=oe(lo,1)+1,Yg=oe(lo,1),_p=oe(lo,Yg==0?1:8);Gu[_p]=1,Vg==2&&(Gu[_p=oe(lo,8)]=1);var Vu=1}else{var Sp=a(19),Ep=oe(lo,4)+4;if(19<Ep){ed.a=3;var rd=0;break i}for(Jc=0;Jc<Ep;++Jc)Sp[no[Jc]]=oe(lo,3);var jh=void 0,Yu=void 0,Kg=ed,Xg=Sp,uo=Ph,nd=Gu,Mh=0,ns=Kg.m,Ku=8,Tp=o(128,z);n:for(;q(Tp,0,7,Xg,19);){if(oe(ns,1)){var Qg=2+2*oe(ns,3);if((jh=2+oe(ns,Qg))>uo)break n}else jh=uo;for(Yu=0;Yu<uo&&jh--;){we(ns);var Op=Tp[0+(127&te(ns))];ue(ns,ns.u+Op.g);var Hl=Op.value;if(16>Hl)nd[Yu++]=Hl,Hl!=0&&(Ku=Hl);else{var Zg=Hl==16,Ap=Hl-16,Rp=Ia[Ap],Cp=oe(ns,Rh[Ap])+Rp;if(Yu+Cp>uo)break n;for(var Jg=Zg?Ku:0;0<Cp--;)nd[Yu++]=Jg}}Mh=1;break n}Mh||(Kg.a=3),Vu=Mh}(Vu=Vu&&!lo.h)&&(td=q(Wg,Gg,8,Gu,Ph)),Vu&&td!=0?rd=td:(ed.a=3,rd=0)}if(rd==0)break r;if(rs&&Bl[Xt]==1&&(rs=ci[rr].g==0),Ts+=ci[rr].g,rr+=rd,3>=Xt){var Wl,Dh=_i[0];for(Wl=1;Wl<Sn;++Wl)_i[Wl]>Dh&&(Dh=_i[Wl]);Fn+=Dh}}if(Rr.nd=rs,Rr.Qb=0,rs&&(Rr.qb=(Hi[3][Bn[3]+0].value<<24|Hi[1][Bn[1]+0].value<<16|Hi[2][Bn[2]+0].value)>>>0,Ts==0&&256>Hi[0][Bn[0]+0].value&&(Rr.Qb=1,Rr.qb+=Hi[0][Bn[0]+0].value<<8)),Rr.jc=!Rr.Qb&&6>Fn,Rr.jc){var id,co=Rr;for(id=0;id<Bo;++id){var Os=id,ho=co.pd[Os],ad=co.G[0][co.H[0]+Os];256<=ad.value?(ho.g=ad.g+256,ho.value=ad.value):(ho.g=0,ho.value=0,Os>>=Yn(ad,8,ho),Os>>=Yn(co.G[1][co.H[1]+Os],16,ho),Os>>=Yn(co.G[2][co.H[2]+Os],0,ho),Yn(co.G[3][co.H[3]+Os],24,ho))}}}dn.vc=ar,dn.Wb=vr,dn.Ya=_r,dn.yc=Ui,rt=1;break t}rt=0}if(!(H=rt)){P.a=3;break e}if(0<Ae){if(se.ua=1<<Ae,!ne(se.Wa,Ae)){P.a=1,H=0;break e}}else se.ua=0;var sd=P,kp=V,em=X,Np=sd.s,Ip=Np.xc;if(sd.c=kp,sd.i=em,Np.md=We(kp,Ip),Np.wc=Ip==0?-1:(1<<Ip)-1,R){P.xb=Fg;break e}if((ge=a(V*X))==null){P.a=1,H=0;break e}H=(H=Di(P,ge,0,V,X,X,null))&&!ee.h;break e}return H?(F!=null?F[0]=ge:(e(ge==null),e(R)),P.$=0,R||oi(se)):oi(se),H}function Co(m,x){var R=m.c*m.i,P=R+x+16*x;return e(m.c<=x),m.V=a(P),m.V==null?(m.Ta=null,m.Ua=0,m.a=1,0):(m.Ta=m.V,m.Ua=m.Ba+R+x,1)}function Sa(m,x){var R=m.C,P=x-R,F=m.V,H=m.Ba+m.c*R;for(e(x<=m.l.o);0<P;){var V=16<P?16:P,X=m.l.ma,ee=m.l.width,se=ee*V,ge=X.ca,Ae=X.tb+ee*R,ae=m.Ta,be=m.Ua;Ro(m,V,F,H),Dl(ae,be,ge,Ae,se),Mi(X,R,R+V,ge,Ae,ee),P-=V,F+=V*m.c,R+=V}e(R==x),m.C=m.Ma=x}function Ga(){this.ub=this.yd=this.td=this.Rb=0}function xu(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function lh(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function _u(){this.Yb=(function(){var m=[];return(function x(R,P,F){for(var H=F[P],V=0;V<H&&(R.push(F.length>P+1?[]:0),!(F.length<P+1));V++)x(R[V],P+1,F)})(m,0,[3,11]),m})()}function uh(){this.jb=a(3),this.Wc=u([4,8],_u),this.Xc=u([4,17],_u)}function yl(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function qi(){this.ld=this.La=this.dd=this.tc=0}function aa(){this.Na=this.la=0}function Su(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Eu(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Us(){this.uc=this.M=this.Nb=0,this.wa=Array(new qi),this.Y=0,this.ya=Array(new Eu),this.aa=0,this.l=new bl}function Tu(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Ou(){this.cb=this.a=0,this.sc="",this.m=new L,this.Od=new Ga,this.Kc=new xu,this.ed=new yl,this.Qa=new lh,this.Ic=this.$c=this.Aa=0,this.D=new Us,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,L),this.ia=0,this.pb=o(4,Su),this.Pa=new uh,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Tu),this.Hd=0,this.rb=Array(new aa),this.sb=0,this.wa=Array(new qi),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 Eu),this.L=this.aa=0,this.gd=u([4,2],qi),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 gs(m,x){return 0>m?0:m>x?x:m}function bl(){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 Zi(){var m=new Ou;return m!=null&&(m.a=0,m.sc="OK",m.cb=0,m.Xb=0,Dn||(Dn=wl)),m}function yn(m,x,R){return m.a==0&&(m.a=x,m.sc=R,m.cb=0),0}function ch(m,x,R){return 3<=R&&m[x+0]==157&&m[x+1]==1&&m[x+2]==42}function sa(m,x){if(m==null)return 0;if(m.a=0,m.sc="OK",x==null)return yn(m,2,"null VP8Io passed to VP8GetHeaders()");var R=x.data,P=x.w,F=x.ha;if(4>F)return yn(m,7,"Truncated header.");var H=R[P+0]|R[P+1]<<8|R[P+2]<<16,V=m.Od;if(V.Rb=!(1&H),V.td=H>>1&7,V.yd=H>>4&1,V.ub=H>>5,3<V.td)return yn(m,3,"Incorrect keyframe parameters.");if(!V.yd)return yn(m,4,"Frame not displayable.");P+=3,F-=3;var X=m.Kc;if(V.Rb){if(7>F)return yn(m,7,"cannot parse picture header");if(!ch(R,P,F))return yn(m,3,"Bad code word");X.c=16383&(R[P+4]<<8|R[P+3]),X.Td=R[P+4]>>6,X.i=16383&(R[P+6]<<8|R[P+5]),X.Ud=R[P+6]>>6,P+=7,F-=7,m.za=X.c+15>>4,m.Ub=X.i+15>>4,x.width=X.c,x.height=X.i,x.Da=0,x.j=0,x.v=0,x.va=x.width,x.o=x.height,x.da=0,x.ib=x.width,x.hb=x.height,x.U=x.width,x.T=x.height,i((H=m.Pa).jb,0,255,H.jb.length),e((H=m.Qa)!=null),H.Cb=0,H.Bb=0,H.Fb=1,i(H.Zb,0,0,H.Zb.length),i(H.Lb,0,0,H.Lb)}if(V.ub>F)return yn(m,7,"bad partition length");re(H=m.m,R,P,V.ub),P+=V.ub,F-=V.ub,V.Rb&&(X.Ld=Ie(H),X.Kd=Ie(H)),X=m.Qa;var ee,se=m.Pa;if(e(H!=null),e(X!=null),X.Cb=Ie(H),X.Cb){if(X.Bb=Ie(H),Ie(H)){for(X.Fb=Ie(H),ee=0;4>ee;++ee)X.Zb[ee]=Ie(H)?le(H,7):0;for(ee=0;4>ee;++ee)X.Lb[ee]=Ie(H)?le(H,6):0}if(X.Bb)for(ee=0;3>ee;++ee)se.jb[ee]=Ie(H)?J(H,8):255}else X.Bb=0;if(H.Ka)return yn(m,3,"cannot parse segment header");if((X=m.ed).zd=Ie(H),X.Tb=J(H,6),X.wb=J(H,3),X.Pc=Ie(H),X.Pc&&Ie(H)){for(se=0;4>se;++se)Ie(H)&&(X.vd[se]=le(H,6));for(se=0;4>se;++se)Ie(H)&&(X.od[se]=le(H,6))}if(m.L=X.Tb==0?0:X.zd?1:2,H.Ka)return yn(m,3,"cannot parse filter header");var ge=F;if(F=ee=P,P=ee+ge,X=ge,m.Xb=(1<<J(m.m,2))-1,ge<3*(se=m.Xb))R=7;else{for(ee+=3*se,X-=3*se,ge=0;ge<se;++ge){var Ae=R[F+0]|R[F+1]<<8|R[F+2]<<16;Ae>X&&(Ae=X),re(m.Jc[+ge],R,ee,Ae),ee+=Ae,X-=Ae,F+=3}re(m.Jc[+se],R,ee,X),R=ee<P?0:5}if(R!=0)return yn(m,R,"cannot parse partitions");for(R=J(ee=m.m,7),F=Ie(ee)?le(ee,4):0,P=Ie(ee)?le(ee,4):0,X=Ie(ee)?le(ee,4):0,se=Ie(ee)?le(ee,4):0,ee=Ie(ee)?le(ee,4):0,ge=m.Qa,Ae=0;4>Ae;++Ae){if(ge.Cb){var ae=ge.Zb[Ae];ge.Fb||(ae+=R)}else{if(0<Ae){m.pb[Ae]=m.pb[0];continue}ae=R}var be=m.pb[Ae];be.Sc[0]=Kc[gs(ae+F,127)],be.Sc[1]=Xc[gs(ae+0,127)],be.Eb[0]=2*Kc[gs(ae+P,127)],be.Eb[1]=101581*Xc[gs(ae+X,127)]>>16,8>be.Eb[1]&&(be.Eb[1]=8),be.Qc[0]=Kc[gs(ae+se,117)],be.Qc[1]=Xc[gs(ae+ee,127)],be.lc=ae+ee}if(!V.Rb)return yn(m,4,"Not a key frame.");for(Ie(H),V=m.Pa,R=0;4>R;++R){for(F=0;8>F;++F)for(P=0;3>P;++P)for(X=0;11>X;++X)se=Le(H,zl[R][F][P][X])?J(H,8):xs[R][F][P][X],V.Wc[R][F].Yb[P][X]=se;for(F=0;17>F;++F)V.Xc[R][F]=V.Wc[R][Bg[F]]}return m.kc=Ie(H),m.kc&&(m.Bd=J(H,8)),m.cb=1}function wl(m,x,R,P,F,H,V){var X=x[F].Yb[R];for(R=0;16>F;++F){if(!Le(m,X[R+0]))return F;for(;!Le(m,X[R+1]);)if(X=x[++F].Yb[0],R=0,F==16)return 16;var ee=x[F+1].Yb;if(Le(m,X[R+2])){var se=m,ge=0;if(Le(se,(ae=X)[(Ae=R)+3]))if(Le(se,ae[Ae+6])){for(X=0,Ae=2*(ge=Le(se,ae[Ae+8]))+(ae=Le(se,ae[Ae+9+ge])),ge=0,ae=cn[Ae];ae[X];++X)ge+=ge+Le(se,ae[X]);ge+=3+(8<<Ae)}else Le(se,ae[Ae+7])?(ge=7+2*Le(se,165),ge+=Le(se,145)):ge=5+Le(se,159);else ge=Le(se,ae[Ae+4])?3+Le(se,ae[Ae+5]):2;X=ee[2]}else ge=1,X=ee[1];ee=V+Tr[F],0>(se=m).b&&Se(se);var Ae,ae=se.b,be=(Ae=se.Ca>>1)-(se.I>>ae)>>31;--se.b,se.Ca+=be,se.Ca|=1,se.I-=(Ae+1&be)<<ae,H[ee]=((ge^be)-be)*P[(0<F)+0]}return 16}function ko(m){var x=m.rb[m.sb-1];x.la=0,x.Na=0,i(m.zc,0,0,m.zc.length),m.ja=0}function oa(m,x,R,P,F){F=m[x+R+32*P]+(F>>3),m[x+R+32*P]=-256&F?0>F?0:255:F}function li(m,x,R,P,F,H){oa(m,x,0,R,P+F),oa(m,x,1,R,P+H),oa(m,x,2,R,P-H),oa(m,x,3,R,P-F)}function Va(m){return(20091*m>>16)+m}function Kn(m,x,R,P){var F,H=0,V=a(16);for(F=0;4>F;++F){var X=m[x+0]+m[x+8],ee=m[x+0]-m[x+8],se=(35468*m[x+4]>>16)-Va(m[x+12]),ge=Va(m[x+4])+(35468*m[x+12]>>16);V[H+0]=X+ge,V[H+1]=ee+se,V[H+2]=ee-se,V[H+3]=X-ge,H+=4,x++}for(F=H=0;4>F;++F)X=(m=V[H+0]+4)+V[H+8],ee=m-V[H+8],se=(35468*V[H+4]>>16)-Va(V[H+12]),oa(R,P,0,0,X+(ge=Va(V[H+4])+(35468*V[H+12]>>16))),oa(R,P,1,0,ee+se),oa(R,P,2,0,ee-se),oa(R,P,3,0,X-ge),H++,P+=32}function Au(m,x,R,P){var F=m[x+0]+4,H=35468*m[x+4]>>16,V=Va(m[x+4]),X=35468*m[x+1]>>16;li(R,P,0,F+V,m=Va(m[x+1]),X),li(R,P,1,F+H,m,X),li(R,P,2,F-H,m,X),li(R,P,3,F-V,m,X)}function No(m,x,R,P,F){Kn(m,x,R,P),F&&Kn(m,x+16,R,P+4)}function dh(m,x,R,P){ts(m,x+0,R,P,1),ts(m,x+32,R,P+128,1)}function hh(m,x,R,P){var F;for(m=m[x+0]+4,F=0;4>F;++F)for(x=0;4>x;++x)oa(R,P,x,F,m)}function Li(m,x,R,P){m[x+0]&&wn(m,x+0,R,P),m[x+16]&&wn(m,x+16,R,P+4),m[x+32]&&wn(m,x+32,R,P+128),m[x+48]&&wn(m,x+48,R,P+128+4)}function fh(m,x,R,P){var F,H=a(16);for(F=0;4>F;++F){var V=m[x+0+F]+m[x+12+F],X=m[x+4+F]+m[x+8+F],ee=m[x+4+F]-m[x+8+F],se=m[x+0+F]-m[x+12+F];H[0+F]=V+X,H[8+F]=V-X,H[4+F]=se+ee,H[12+F]=se-ee}for(F=0;4>F;++F)V=(m=H[0+4*F]+3)+H[3+4*F],X=H[1+4*F]+H[2+4*F],ee=H[1+4*F]-H[2+4*F],se=m-H[3+4*F],R[P+0]=V+X>>3,R[P+16]=se+ee>>3,R[P+32]=V-X>>3,R[P+48]=se-ee>>3,P+=64}function xl(m,x,R){var P,F=x-32,H=Xn,V=255-m[F-1];for(P=0;P<R;++P){var X,ee=H,se=V+m[x-1];for(X=0;X<R;++X)m[x+X]=ee[se+m[F+X]];x+=32}}function _l(m,x){xl(m,x,4)}function Sl(m,x){xl(m,x,8)}function vp(m,x){xl(m,x,16)}function gp(m,x){var R;for(R=0;16>R;++R)n(m,x+32*R,m,x-32,16)}function Ru(m,x){var R;for(R=16;0<R;--R)i(m,x,m[x-1],16),x+=32}function ms(m,x,R){var P;for(P=0;16>P;++P)i(x,R+32*P,m,16)}function Cu(m,x){var R,P=16;for(R=0;16>R;++R)P+=m[x-1+32*R]+m[x+R-32];ms(P>>5,m,x)}function la(m,x){var R,P=8;for(R=0;16>R;++R)P+=m[x-1+32*R];ms(P>>4,m,x)}function Io(m,x){var R,P=8;for(R=0;16>R;++R)P+=m[x+R-32];ms(P>>4,m,x)}function Po(m,x){ms(128,m,x)}function Lt(m,x,R){return m+2*x+R+2>>2}function ph(m,x){var R,P=x-32;for(P=new Uint8Array([Lt(m[P-1],m[P+0],m[P+1]),Lt(m[P+0],m[P+1],m[P+2]),Lt(m[P+1],m[P+2],m[P+3]),Lt(m[P+2],m[P+3],m[P+4])]),R=0;4>R;++R)n(m,x+32*R,P,0,P.length)}function El(m,x){var R=m[x-1],P=m[x-1+32],F=m[x-1+64],H=m[x-1+96];Ve(m,x+0,16843009*Lt(m[x-1-32],R,P)),Ve(m,x+32,16843009*Lt(R,P,F)),Ve(m,x+64,16843009*Lt(P,F,H)),Ve(m,x+96,16843009*Lt(F,H,H))}function Ya(m,x){var R,P=4;for(R=0;4>R;++R)P+=m[x+R-32]+m[x-1+32*R];for(P>>=3,R=0;4>R;++R)i(m,x+32*R,P,4)}function zc(m,x){var R=m[x-1+0],P=m[x-1+32],F=m[x-1+64],H=m[x-1-32],V=m[x+0-32],X=m[x+1-32],ee=m[x+2-32],se=m[x+3-32];m[x+0+96]=Lt(P,F,m[x-1+96]),m[x+1+96]=m[x+0+64]=Lt(R,P,F),m[x+2+96]=m[x+1+64]=m[x+0+32]=Lt(H,R,P),m[x+3+96]=m[x+2+64]=m[x+1+32]=m[x+0+0]=Lt(V,H,R),m[x+3+64]=m[x+2+32]=m[x+1+0]=Lt(X,V,H),m[x+3+32]=m[x+2+0]=Lt(ee,X,V),m[x+3+0]=Lt(se,ee,X)}function Tl(m,x){var R=m[x+1-32],P=m[x+2-32],F=m[x+3-32],H=m[x+4-32],V=m[x+5-32],X=m[x+6-32],ee=m[x+7-32];m[x+0+0]=Lt(m[x+0-32],R,P),m[x+1+0]=m[x+0+32]=Lt(R,P,F),m[x+2+0]=m[x+1+32]=m[x+0+64]=Lt(P,F,H),m[x+3+0]=m[x+2+32]=m[x+1+64]=m[x+0+96]=Lt(F,H,V),m[x+3+32]=m[x+2+64]=m[x+1+96]=Lt(H,V,X),m[x+3+64]=m[x+2+96]=Lt(V,X,ee),m[x+3+96]=Lt(X,ee,ee)}function gi(m,x){var R=m[x-1+0],P=m[x-1+32],F=m[x-1+64],H=m[x-1-32],V=m[x+0-32],X=m[x+1-32],ee=m[x+2-32],se=m[x+3-32];m[x+0+0]=m[x+1+64]=H+V+1>>1,m[x+1+0]=m[x+2+64]=V+X+1>>1,m[x+2+0]=m[x+3+64]=X+ee+1>>1,m[x+3+0]=ee+se+1>>1,m[x+0+96]=Lt(F,P,R),m[x+0+64]=Lt(P,R,H),m[x+0+32]=m[x+1+96]=Lt(R,H,V),m[x+1+32]=m[x+2+96]=Lt(H,V,X),m[x+2+32]=m[x+3+96]=Lt(V,X,ee),m[x+3+32]=Lt(X,ee,se)}function Ka(m,x){var R=m[x+0-32],P=m[x+1-32],F=m[x+2-32],H=m[x+3-32],V=m[x+4-32],X=m[x+5-32],ee=m[x+6-32],se=m[x+7-32];m[x+0+0]=R+P+1>>1,m[x+1+0]=m[x+0+64]=P+F+1>>1,m[x+2+0]=m[x+1+64]=F+H+1>>1,m[x+3+0]=m[x+2+64]=H+V+1>>1,m[x+0+32]=Lt(R,P,F),m[x+1+32]=m[x+0+96]=Lt(P,F,H),m[x+2+32]=m[x+1+96]=Lt(F,H,V),m[x+3+32]=m[x+2+96]=Lt(H,V,X),m[x+3+64]=Lt(V,X,ee),m[x+3+96]=Lt(X,ee,se)}function ku(m,x){var R=m[x-1+0],P=m[x-1+32],F=m[x-1+64],H=m[x-1+96];m[x+0+0]=R+P+1>>1,m[x+2+0]=m[x+0+32]=P+F+1>>1,m[x+2+32]=m[x+0+64]=F+H+1>>1,m[x+1+0]=Lt(R,P,F),m[x+3+0]=m[x+1+32]=Lt(P,F,H),m[x+3+32]=m[x+1+64]=Lt(F,H,H),m[x+3+64]=m[x+2+64]=m[x+0+96]=m[x+1+96]=m[x+2+96]=m[x+3+96]=H}function vh(m,x){var R=m[x-1+0],P=m[x-1+32],F=m[x-1+64],H=m[x-1+96],V=m[x-1-32],X=m[x+0-32],ee=m[x+1-32],se=m[x+2-32];m[x+0+0]=m[x+2+32]=R+V+1>>1,m[x+0+32]=m[x+2+64]=P+R+1>>1,m[x+0+64]=m[x+2+96]=F+P+1>>1,m[x+0+96]=H+F+1>>1,m[x+3+0]=Lt(X,ee,se),m[x+2+0]=Lt(V,X,ee),m[x+1+0]=m[x+3+32]=Lt(R,V,X),m[x+1+32]=m[x+3+64]=Lt(P,R,V),m[x+1+64]=m[x+3+96]=Lt(F,P,R),m[x+1+96]=Lt(H,F,P)}function Hs(m,x){var R;for(R=0;8>R;++R)n(m,x+32*R,m,x-32,8)}function jo(m,x){var R;for(R=0;8>R;++R)i(m,x,m[x-1],8),x+=32}function Xa(m,x,R){var P;for(P=0;8>P;++P)i(x,R+32*P,m,8)}function mi(m,x){var R,P=8;for(R=0;8>R;++R)P+=m[x+R-32]+m[x-1+32*R];Xa(P>>4,m,x)}function Ea(m,x){var R,P=4;for(R=0;8>R;++R)P+=m[x+R-32];Xa(P>>3,m,x)}function Nu(m,x){var R,P=4;for(R=0;8>R;++R)P+=m[x-1+32*R];Xa(P>>3,m,x)}function Ws(m,x){Xa(128,m,x)}function Mo(m,x,R){var P=m[x-R],F=m[x+0],H=3*(F-P)+Oh[1020+m[x-2*R]-m[x+R]],V=Ll[112+(H+4>>3)];m[x-R]=Xn[255+P+Ll[112+(H+3>>3)]],m[x+0]=Xn[255+F-V]}function Ol(m,x,R,P){var F=m[x+0],H=m[x+R];return Na[255+m[x-2*R]-m[x-R]]>P||Na[255+H-F]>P}function Gs(m,x,R,P){return 4*Na[255+m[x-R]-m[x+0]]+Na[255+m[x-2*R]-m[x+R]]<=P}function Vs(m,x,R,P,F){var H=m[x-3*R],V=m[x-2*R],X=m[x-R],ee=m[x+0],se=m[x+R],ge=m[x+2*R],Ae=m[x+3*R];return 4*Na[255+X-ee]+Na[255+V-se]>P?0:Na[255+m[x-4*R]-H]<=F&&Na[255+H-V]<=F&&Na[255+V-X]<=F&&Na[255+Ae-ge]<=F&&Na[255+ge-se]<=F&&Na[255+se-ee]<=F}function Ys(m,x,R,P){var F=2*P+1;for(P=0;16>P;++P)Gs(m,x+P,R,F)&&Mo(m,x+P,R)}function Iu(m,x,R,P){var F=2*P+1;for(P=0;16>P;++P)Gs(m,x+P*R,1,F)&&Mo(m,x+P*R,1)}function Pu(m,x,R,P){var F;for(F=3;0<F;--F)Ys(m,x+=4*R,R,P)}function gh(m,x,R,P){var F;for(F=3;0<F;--F)Iu(m,x+=4,R,P)}function Ks(m,x,R,P,F,H,V,X){for(H=2*H+1;0<F--;){if(Vs(m,x,R,H,V))if(Ol(m,x,R,X))Mo(m,x,R);else{var ee=m,se=x,ge=R,Ae=ee[se-2*ge],ae=ee[se-ge],be=ee[se+0],Ee=ee[se+ge],Pe=ee[se+2*ge],Oe=27*(De=Oh[1020+3*(be-ae)+Oh[1020+Ae-Ee]])+63>>7,qe=18*De+63>>7,De=9*De+63>>7;ee[se-3*ge]=Xn[255+ee[se-3*ge]+De],ee[se-2*ge]=Xn[255+Ae+qe],ee[se-ge]=Xn[255+ae+Oe],ee[se+0]=Xn[255+be-Oe],ee[se+ge]=Xn[255+Ee-qe],ee[se+2*ge]=Xn[255+Pe-De]}x+=P}}function Qa(m,x,R,P,F,H,V,X){for(H=2*H+1;0<F--;){if(Vs(m,x,R,H,V))if(Ol(m,x,R,X))Mo(m,x,R);else{var ee=m,se=x,ge=R,Ae=ee[se-ge],ae=ee[se+0],be=ee[se+ge],Ee=Ll[112+(4+(Pe=3*(ae-Ae))>>3)],Pe=Ll[112+(Pe+3>>3)],Oe=Ee+1>>1;ee[se-2*ge]=Xn[255+ee[se-2*ge]+Oe],ee[se-ge]=Xn[255+Ae+Pe],ee[se+0]=Xn[255+ae-Ee],ee[se+ge]=Xn[255+be-Oe]}x+=P}}function mh(m,x,R,P,F,H){Ks(m,x,R,1,16,P,F,H)}function yh(m,x,R,P,F,H){Ks(m,x,1,R,16,P,F,H)}function bh(m,x,R,P,F,H){var V;for(V=3;0<V;--V)Qa(m,x+=4*R,R,1,16,P,F,H)}function Al(m,x,R,P,F,H){var V;for(V=3;0<V;--V)Qa(m,x+=4,1,R,16,P,F,H)}function wh(m,x,R,P,F,H,V,X){Ks(m,x,F,1,8,H,V,X),Ks(R,P,F,1,8,H,V,X)}function O(m,x,R,P,F,H,V,X){Ks(m,x,1,F,8,H,V,X),Ks(R,P,1,F,8,H,V,X)}function B(m,x,R,P,F,H,V,X){Qa(m,x+4*F,F,1,8,H,V,X),Qa(R,P+4*F,F,1,8,H,V,X)}function ie(m,x,R,P,F,H,V,X){Qa(m,x+4,1,F,8,H,V,X),Qa(R,P+4,1,F,8,H,V,X)}function ve(){this.ba=new Ht,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new yr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function xe(){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 Me(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ge(){this.ua=0,this.Wa=new st,this.vb=new st,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new ce,this.yc=new z}function bt(){this.xb=this.a=0,this.l=new bl,this.ca=new Ht,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new Y,this.Pb=0,this.wd=new Y,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ge,this.ab=0,this.gc=o(4,Me),this.Oc=0}function gt(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new bl,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Gt(m,x,R,P,F,H,V){for(m=m==null?0:m[x+0],x=0;x<V;++x)F[H+x]=m+R[P+x]&255,m=F[H+x]}function er(m,x,R,P,F,H,V){var X;if(m==null)Gt(null,null,R,P,F,H,V);else for(X=0;X<V;++X)F[H+X]=m[x+X]+R[P+X]&255}function fr(m,x,R,P,F,H,V){if(m==null)Gt(null,null,R,P,F,H,V);else{var X,ee=m[x+0],se=ee,ge=ee;for(X=0;X<V;++X)se=ge+(ee=m[x+X])-se,ge=R[P+X]+(-256&se?0>se?0:255:se)&255,se=ee,F[H+X]=ge}}function Rn(m,x,R,P){var F=x.width,H=x.o;if(e(m!=null&&x!=null),0>R||0>=P||R+P>H)return null;if(!m.Cc){if(m.ga==null){var V;if(m.ga=new gt,(V=m.ga==null)||(V=x.width*x.o,e(m.Gb.length==0),m.Gb=a(V),m.Uc=0,m.Gb==null?V=0:(m.mb=m.Gb,m.nb=m.Uc,m.rc=null,V=1),V=!V),!V){V=m.ga;var X=m.Fa,ee=m.P,se=m.qc,ge=m.mb,Ae=m.nb,ae=ee+1,be=se-1,Ee=V.l;if(e(X!=null&&ge!=null&&x!=null),_s[0]=null,_s[1]=Gt,_s[2]=er,_s[3]=fr,V.ca=ge,V.tb=Ae,V.c=x.width,V.i=x.height,e(0<V.c&&0<V.i),1>=se)x=0;else if(V.$a=3&X[ee+0],V.Z=X[ee+0]>>2&3,V.Lc=X[ee+0]>>4&3,ee=X[ee+0]>>6&3,0>V.$a||1<V.$a||4<=V.Z||1<V.Lc||ee)x=0;else if(Ee.put=Dt,Ee.ac=Ha,Ee.bc=pi,Ee.ma=V,Ee.width=x.width,Ee.height=x.height,Ee.Da=x.Da,Ee.v=x.v,Ee.va=x.va,Ee.j=x.j,Ee.o=x.o,V.$a)e:{e(V.$a==1),x=Jr();t:for(;;){if(x==null){x=0;break e}if(e(V!=null),V.mc=x,x.c=V.c,x.i=V.i,x.l=V.l,x.l.ma=V,x.l.width=V.c,x.l.height=V.i,x.a=0,ye(x.m,X,ae,be),!Wa(V.c,V.i,1,x,null)||(x.ab==1&&x.gc[0].hc==3&&ia(x.s)?(V.ic=1,X=x.c*x.i,x.Ta=null,x.Ua=0,x.V=a(X),x.Ba=0,x.V==null?(x.a=1,x=0):x=1):(V.ic=0,x=Co(x,V.c)),!x))break t;x=1;break e}V.mc=null,x=0}else x=be>=V.c*V.i;V=!x}if(V)return null;m.ga.Lc!=1?m.Ga=0:P=H-R}e(m.ga!=null),e(R+P<=H);e:{if(x=(X=m.ga).c,H=X.l.o,X.$a==0){if(ae=m.rc,be=m.Vc,Ee=m.Fa,ee=m.P+1+R*x,se=m.mb,ge=m.nb+R*x,e(ee<=m.P+m.qc),X.Z!=0)for(e(_s[X.Z]!=null),V=0;V<P;++V)_s[X.Z](ae,be,Ee,ee,se,ge,x),ae=se,be=ge,ge+=x,ee+=x;else for(V=0;V<P;++V)n(se,ge,Ee,ee,x),ae=se,be=ge,ge+=x,ee+=x;m.rc=ae,m.Vc=be}else{if(e(X.mc!=null),x=R+P,e((V=X.mc)!=null),e(x<=V.i),V.C>=x)x=1;else if(X.ic||sn(),X.ic){X=V.V,ae=V.Ba,be=V.c;var Pe=V.i,Oe=(Ee=1,ee=V.$/be,se=V.$%be,ge=V.m,Ae=V.s,V.$),qe=be*Pe,De=be*x,Ye=Ae.wc,Ue=Oe<De?si(Ae,se,ee):null;e(Oe<=qe),e(x<=Pe),e(ia(Ae));t:for(;;){for(;!ge.h&&Oe<De;){if(se&Ye||(Ue=si(Ae,se,ee)),e(Ue!=null),we(ge),256>(Pe=Zr(Ue.G[0],Ue.H[0],ge)))X[ae+Oe]=Pe,++Oe,++se>=be&&(se=0,++ee<=x&&!(ee%16)&&vi(V,ee));else{if(!(280>Pe)){Ee=0;break t}Pe=Hr(Pe-256,ge);var St,ct=Zr(Ue.G[4],Ue.H[4],ge);if(we(ge),!(Oe>=(ct=ai(be,ct=Hr(ct,ge)))&&qe-Oe>=Pe)){Ee=0;break t}for(St=0;St<Pe;++St)X[ae+Oe+St]=X[ae+Oe+St-ct];for(Oe+=Pe,se+=Pe;se>=be;)se-=be,++ee<=x&&!(ee%16)&&vi(V,ee);Oe<De&&se&Ye&&(Ue=si(Ae,se,ee))}e(ge.h==de(ge))}vi(V,ee>x?x:ee);break t}!Ee||ge.h&&Oe<qe?(Ee=0,V.a=ge.h?5:3):V.$=Oe,x=Ee}else x=Di(V,V.V,V.Ba,V.c,V.i,x,Sa);if(!x){P=0;break e}}R+P>=H&&(m.Cc=1),P=1}if(!P)return null;if(m.Cc&&((P=m.ga)!=null&&(P.mc=null),m.ga=null,0<m.Ga))return alert("todo:WebPDequantizeLevels"),null}return m.nb+R*F}function Nr(m,x,R,P,F,H){for(;0<F--;){var V,X=m,ee=x+(R?1:0),se=m,ge=x+(R?0:3);for(V=0;V<P;++V){var Ae=se[ge+4*V];Ae!=255&&(Ae*=32897,X[ee+4*V+0]=X[ee+4*V+0]*Ae>>23,X[ee+4*V+1]=X[ee+4*V+1]*Ae>>23,X[ee+4*V+2]=X[ee+4*V+2]*Ae>>23)}x+=H}}function kr(m,x,R,P,F){for(;0<P--;){var H;for(H=0;H<R;++H){var V=m[x+2*H+0],X=15&(se=m[x+2*H+1]),ee=4369*X,se=(240&se|se>>4)*ee>>16;m[x+2*H+0]=(240&V|V>>4)*ee>>16&240|(15&V|V<<4)*ee>>16>>4&15,m[x+2*H+1]=240&se|X}x+=F}}function Wr(m,x,R,P,F,H,V,X){var ee,se,ge=255;for(se=0;se<F;++se){for(ee=0;ee<P;++ee){var Ae=m[x+ee];H[V+4*ee]=Ae,ge&=Ae}x+=R,V+=X}return ge!=255}function an(m,x,R,P,F){var H;for(H=0;H<F;++H)R[P+H]=m[x+H]>>8}function sn(){Fu=Nr,ua=kr,ca=Wr,Dl=an}function yi(m,x,R){M[m]=function(P,F,H,V,X,ee,se,ge,Ae,ae,be,Ee,Pe,Oe,qe,De,Ye){var Ue,St=Ye-1>>1,ct=X[ee+0]|se[ge+0]<<16,Kt=Ae[ae+0]|be[Ee+0]<<16;e(P!=null);var ft=3*ct+Kt+131074>>2;for(x(P[F+0],255&ft,ft>>16,Pe,Oe),H!=null&&(ft=3*Kt+ct+131074>>2,x(H[V+0],255&ft,ft>>16,qe,De)),Ue=1;Ue<=St;++Ue){var lr=X[ee+Ue]|se[ge+Ue]<<16,kn=Ae[ae+Ue]|be[Ee+Ue]<<16,Vt=ct+lr+Kt+kn+524296,pt=Vt+2*(lr+Kt)>>3;ft=pt+ct>>1,ct=(Vt=Vt+2*(ct+kn)>>3)+lr>>1,x(P[F+2*Ue-1],255&ft,ft>>16,Pe,Oe+(2*Ue-1)*R),x(P[F+2*Ue-0],255&ct,ct>>16,Pe,Oe+(2*Ue-0)*R),H!=null&&(ft=Vt+Kt>>1,ct=pt+kn>>1,x(H[V+2*Ue-1],255&ft,ft>>16,qe,De+(2*Ue-1)*R),x(H[V+2*Ue+0],255&ct,ct>>16,qe,De+(2*Ue+0)*R)),ct=lr,Kt=kn}1&Ye||(ft=3*ct+Kt+131074>>2,x(P[F+Ye-1],255&ft,ft>>16,Pe,Oe+(Ye-1)*R),H!=null&&(ft=3*Kt+ct+131074>>2,x(H[V+Ye-1],255&ft,ft>>16,qe,De+(Ye-1)*R)))}}function Za(){Qn[xi]=so,Qn[zu]=Ss,Qn[ws]=Go,Qn[Vc]=Ch,Qn[$l]=kh,Qn[to]=Wu,Qn[Ah]=Nh,Qn[Yc]=Ss,Qn[Ho]=Ch,Qn[ro]=kh,Qn[Uu]=Wu}function Xs(m){return m&-16384?0>m?0:255:m>>Ty}function Rl(m,x){return Xs((19077*m>>8)+(26149*x>>8)-14234)}function Do(m,x,R){return Xs((19077*m>>8)-(6419*x>>8)-(13320*R>>8)+8708)}function Qs(m,x){return Xs((19077*m>>8)+(33050*x>>8)-17685)}function qo(m,x,R,P,F){P[F+0]=Rl(m,R),P[F+1]=Do(m,x,R),P[F+2]=Qs(m,x)}function Cl(m,x,R,P,F){P[F+0]=Qs(m,x),P[F+1]=Do(m,x,R),P[F+2]=Rl(m,R)}function kl(m,x,R,P,F){var H=Do(m,x,R);x=H<<3&224|Qs(m,x)>>3,P[F+0]=248&Rl(m,R)|H>>5,P[F+1]=x}function bn(m,x,R,P,F){var H=240&Qs(m,x)|15;P[F+0]=240&Rl(m,R)|Do(m,x,R)>>4,P[F+1]=H}function Nl(m,x,R,P,F){P[F+0]=255,qo(m,x,R,P,F+1)}function Il(m,x,R,P,F){Cl(m,x,R,P,F),P[F+3]=255}function Uc(m,x,R,P,F){qo(m,x,R,P,F),P[F+3]=255}function Ja(m,x,R){M[m]=function(P,F,H,V,X,ee,se,ge,Ae){for(var ae=ge+(-2&Ae)*R;ge!=ae;)x(P[F+0],H[V+0],X[ee+0],se,ge),x(P[F+1],H[V+0],X[ee+0],se,ge+R),F+=2,++V,++ee,ge+=2*R;1&Ae&&x(P[F+0],H[V+0],X[ee+0],se,ge)}}function bi(m,x,R){return R==0?m==0?x==0?6:5:x==0?4:0:R}function Lo(m,x,R,P,F){switch(m>>>30){case 3:ts(x,R,P,F,0);break;case 2:eo(x,R,P,F);break;case 1:wn(x,R,P,F)}}function ys(m,x){var R,P,F=x.M,H=x.Nb,V=m.oc,X=m.pc+40,ee=m.oc,se=m.pc+584,ge=m.oc,Ae=m.pc+600;for(R=0;16>R;++R)V[X+32*R-1]=129;for(R=0;8>R;++R)ee[se+32*R-1]=129,ge[Ae+32*R-1]=129;for(0<F?V[X-1-32]=ee[se-1-32]=ge[Ae-1-32]=129:(i(V,X-32-1,127,21),i(ee,se-32-1,127,9),i(ge,Ae-32-1,127,9)),P=0;P<m.za;++P){var ae=x.ya[x.aa+P];if(0<P){for(R=-1;16>R;++R)n(V,X+32*R-4,V,X+32*R+12,4);for(R=-1;8>R;++R)n(ee,se+32*R-4,ee,se+32*R+4,4),n(ge,Ae+32*R-4,ge,Ae+32*R+4,4)}var be=m.Gd,Ee=m.Hd+P,Pe=ae.ad,Oe=ae.Hc;if(0<F&&(n(V,X-32,be[Ee].y,0,16),n(ee,se-32,be[Ee].f,0,8),n(ge,Ae-32,be[Ee].ea,0,8)),ae.Za){var qe=V,De=X-32+16;for(0<F&&(P>=m.za-1?i(qe,De,be[Ee].y[15],4):n(qe,De,be[Ee+1].y,0,4)),R=0;4>R;R++)qe[De+128+R]=qe[De+256+R]=qe[De+384+R]=qe[De+0+R];for(R=0;16>R;++R,Oe<<=2)qe=V,De=X+Ul[R],Fi[ae.Ob[R]](qe,De),Lo(Oe,Pe,16*+R,qe,De)}else if(qe=bi(P,F,ae.Ob[0]),ao[qe](V,X),Oe!=0)for(R=0;16>R;++R,Oe<<=2)Lo(Oe,Pe,16*+R,V,X+Ul[R]);for(R=ae.Gc,qe=bi(P,F,ae.Dd),ha[qe](ee,se),ha[qe](ge,Ae),Oe=Pe,qe=ee,De=se,255&(ae=0|R)&&(170&ae?Ra(Oe,256,qe,De):Ca(Oe,256,qe,De)),ae=ge,Oe=Ae,255&(R>>=8)&&(170&R?Ra(Pe,320,ae,Oe):Ca(Pe,320,ae,Oe)),F<m.Ub-1&&(n(be[Ee].y,0,V,X+480,16),n(be[Ee].f,0,ee,se+224,8),n(be[Ee].ea,0,ge,Ae+224,8)),R=8*H*m.B,be=m.sa,Ee=m.ta+16*P+16*H*m.R,Pe=m.qa,ae=m.ra+8*P+R,Oe=m.Ha,qe=m.Ia+8*P+R,R=0;16>R;++R)n(be,Ee+R*m.R,V,X+32*R,16);for(R=0;8>R;++R)n(Pe,ae+R*m.B,ee,se+32*R,8),n(Oe,qe+R*m.B,ge,Ae+32*R,8)}}function xh(m,x,R,P,F,H,V,X,ee){var se=[0],ge=[0],Ae=0,ae=ee!=null?ee.kd:0,be=ee??new xe;if(m==null||12>R)return 7;be.data=m,be.w=x,be.ha=R,x=[x],R=[R],be.gb=[be.gb];e:{var Ee=x,Pe=R,Oe=be.gb;if(e(m!=null),e(Pe!=null),e(Oe!=null),Oe[0]=0,12<=Pe[0]&&!t(m,Ee[0],"RIFF")){if(t(m,Ee[0]+8,"WEBP")){Oe=3;break e}var qe=dt(m,Ee[0]+4);if(12>qe||4294967286<qe){Oe=3;break e}if(ae&&qe>Pe[0]-8){Oe=7;break e}Oe[0]=qe,Ee[0]+=12,Pe[0]-=12}Oe=0}if(Oe!=0)return Oe;for(qe=0<be.gb[0],R=R[0];;){e:{var De=m;Pe=x,Oe=R;var Ye=se,Ue=ge,St=Ee=[0];if((ft=Ae=[Ae])[0]=0,8>Oe[0])Oe=7;else{if(!t(De,Pe[0],"VP8X")){if(dt(De,Pe[0]+4)!=10){Oe=3;break e}if(18>Oe[0]){Oe=7;break e}var ct=dt(De,Pe[0]+8),Kt=1+Xe(De,Pe[0]+12);if(2147483648<=Kt*(De=1+Xe(De,Pe[0]+15))){Oe=3;break e}St!=null&&(St[0]=ct),Ye!=null&&(Ye[0]=Kt),Ue!=null&&(Ue[0]=De),Pe[0]+=18,Oe[0]-=18,ft[0]=1}Oe=0}}if(Ae=Ae[0],Ee=Ee[0],Oe!=0)return Oe;if(Pe=!!(2&Ee),!qe&&Ae)return 3;if(H!=null&&(H[0]=!!(16&Ee)),V!=null&&(V[0]=Pe),X!=null&&(X[0]=0),V=se[0],Ee=ge[0],Ae&&Pe&&ee==null){Oe=0;break}if(4>R){Oe=7;break}if(qe&&Ae||!qe&&!Ae&&!t(m,x[0],"ALPH")){R=[R],be.na=[be.na],be.P=[be.P],be.Sa=[be.Sa];e:{ct=m,Oe=x,qe=R;var ft=be.gb;Ye=be.na,Ue=be.P,St=be.Sa,Kt=22,e(ct!=null),e(qe!=null),De=Oe[0];var lr=qe[0];for(e(Ye!=null),e(St!=null),Ye[0]=null,Ue[0]=null,St[0]=0;;){if(Oe[0]=De,qe[0]=lr,8>lr){Oe=7;break e}var kn=dt(ct,De+4);if(4294967286<kn){Oe=3;break e}var Vt=8+kn+1&-2;if(Kt+=Vt,0<ft&&Kt>ft){Oe=3;break e}if(!t(ct,De,"VP8 ")||!t(ct,De,"VP8L")){Oe=0;break e}if(lr[0]<Vt){Oe=7;break e}t(ct,De,"ALPH")||(Ye[0]=ct,Ue[0]=De+8,St[0]=kn),De+=Vt,lr-=Vt}}if(R=R[0],be.na=be.na[0],be.P=be.P[0],be.Sa=be.Sa[0],Oe!=0)break}R=[R],be.Ja=[be.Ja],be.xa=[be.xa];e:if(ft=m,Oe=x,qe=R,Ye=be.gb[0],Ue=be.Ja,St=be.xa,ct=Oe[0],De=!t(ft,ct,"VP8 "),Kt=!t(ft,ct,"VP8L"),e(ft!=null),e(qe!=null),e(Ue!=null),e(St!=null),8>qe[0])Oe=7;else{if(De||Kt){if(ft=dt(ft,ct+4),12<=Ye&&ft>Ye-12){Oe=3;break e}if(ae&&ft>qe[0]-8){Oe=7;break e}Ue[0]=ft,Oe[0]+=8,qe[0]-=8,St[0]=Kt}else St[0]=5<=qe[0]&&ft[ct+0]==47&&!(ft[ct+4]>>5),Ue[0]=qe[0];Oe=0}if(R=R[0],be.Ja=be.Ja[0],be.xa=be.xa[0],x=x[0],Oe!=0)break;if(4294967286<be.Ja)return 3;if(X==null||Pe||(X[0]=be.xa?2:1),V=[V],Ee=[Ee],be.xa){if(5>R){Oe=7;break}X=V,ae=Ee,Pe=H,m==null||5>R?m=0:5<=R&&m[x+0]==47&&!(m[x+4]>>5)?(qe=[0],ft=[0],Ye=[0],ye(Ue=new Y,m,x,R),Qr(Ue,qe,ft,Ye)?(X!=null&&(X[0]=qe[0]),ae!=null&&(ae[0]=ft[0]),Pe!=null&&(Pe[0]=Ye[0]),m=1):m=0):m=0}else{if(10>R){Oe=7;break}X=Ee,m==null||10>R||!ch(m,x+3,R-3)?m=0:(ae=m[x+0]|m[x+1]<<8|m[x+2]<<16,Pe=16383&(m[x+7]<<8|m[x+6]),m=16383&(m[x+9]<<8|m[x+8]),1&ae||3<(ae>>1&7)||!(ae>>4&1)||ae>>5>=be.Ja||!Pe||!m?m=0:(V&&(V[0]=Pe),X&&(X[0]=m),m=1))}if(!m||(V=V[0],Ee=Ee[0],Ae&&(se[0]!=V||ge[0]!=Ee)))return 3;ee!=null&&(ee[0]=be,ee.offset=x-ee.w,e(4294967286>x-ee.w),e(ee.offset==ee.ha-R));break}return Oe==0||Oe==7&&Ae&&ee==null?(H!=null&&(H[0]|=be.na!=null&&0<be.na.length),P!=null&&(P[0]=V),F!=null&&(F[0]=Ee),0):Oe}function $i(m,x,R){var P=x.width,F=x.height,H=0,V=0,X=P,ee=F;if(x.Da=m!=null&&0<m.Da,x.Da&&(X=m.cd,ee=m.bd,H=m.v,V=m.j,11>R||(H&=-2,V&=-2),0>H||0>V||0>=X||0>=ee||H+X>P||V+ee>F))return 0;if(x.v=H,x.j=V,x.va=H+X,x.o=V+ee,x.U=X,x.T=ee,x.da=m!=null&&0<m.da,x.da){if(!ot(X,ee,R=[m.ib],H=[m.hb]))return 0;x.ib=R[0],x.hb=H[0]}return x.ob=m!=null&&m.ob,x.Kb=m==null||!m.Sd,x.da&&(x.ob=x.ib<3*P/4&&x.hb<3*F/4,x.Kb=0),1}function $o(m){if(m==null)return 2;if(11>m.S){var x=m.f.RGBA;x.fb+=(m.height-1)*x.A,x.A=-x.A}else x=m.f.kb,m=m.height,x.O+=(m-1)*x.fa,x.fa=-x.fa,x.N+=(m-1>>1)*x.Ab,x.Ab=-x.Ab,x.W+=(m-1>>1)*x.Db,x.Db=-x.Db,x.F!=null&&(x.J+=(m-1)*x.lb,x.lb=-x.lb);return 0}function ju(m,x,R,P){if(P==null||0>=m||0>=x)return 2;if(R!=null){if(R.Da){var F=R.cd,H=R.bd,V=-2&R.v,X=-2&R.j;if(0>V||0>X||0>=F||0>=H||V+F>m||X+H>x)return 2;m=F,x=H}if(R.da){if(!ot(m,x,F=[R.ib],H=[R.hb]))return 2;m=F[0],x=H[0]}}P.width=m,P.height=x;e:{var ee=P.width,se=P.height;if(m=P.S,0>=ee||0>=se||!(m>=xi&&13>m))m=2;else{if(0>=P.Rd&&P.sd==null){V=H=F=x=0;var ge=(X=ee*Hg[m])*se;if(11>m||(H=(se+1)/2*(x=(ee+1)/2),m==12&&(V=(F=ee)*se)),(se=a(ge+2*H+V))==null){m=1;break e}P.sd=se,11>m?((ee=P.f.RGBA).eb=se,ee.fb=0,ee.A=X,ee.size=ge):((ee=P.f.kb).y=se,ee.O=0,ee.fa=X,ee.Fd=ge,ee.f=se,ee.N=0+ge,ee.Ab=x,ee.Cd=H,ee.ea=se,ee.W=0+ge+H,ee.Db=x,ee.Ed=H,m==12&&(ee.F=se,ee.J=0+ge+2*H),ee.Tc=V,ee.lb=F)}if(x=1,F=P.S,H=P.width,V=P.height,F>=xi&&13>F)if(11>F)m=P.f.RGBA,x&=(X=Math.abs(m.A))*(V-1)+H<=m.size,x&=X>=H*Hg[F],x&=m.eb!=null;else{m=P.f.kb,X=(H+1)/2,ge=(V+1)/2,ee=Math.abs(m.fa),se=Math.abs(m.Ab);var Ae=Math.abs(m.Db),ae=Math.abs(m.lb),be=ae*(V-1)+H;x&=ee*(V-1)+H<=m.Fd,x&=se*(ge-1)+X<=m.Cd,x=(x&=Ae*(ge-1)+X<=m.Ed)&ee>=H&se>=X&Ae>=X,x&=m.y!=null,x&=m.f!=null,x&=m.ea!=null,F==12&&(x&=ae>=H,x&=be<=m.Tc,x&=m.F!=null)}else x=0;m=x?0:2}}return m!=0||R!=null&&R.fd&&(m=$o(P)),m}var Bo=64,Zs=[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],Mu=24,wi=32,Bi=8,Du=[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];it("Predictor0","PredictorAdd0"),M.Predictor0=function(){return 4278190080},M.Predictor1=function(m){return m},M.Predictor2=function(m,x,R){return x[R+0]},M.Predictor3=function(m,x,R){return x[R+1]},M.Predictor4=function(m,x,R){return x[R-1]},M.Predictor5=function(m,x,R){return ut(ut(m,x[R+1]),x[R+0])},M.Predictor6=function(m,x,R){return ut(m,x[R-1])},M.Predictor7=function(m,x,R){return ut(m,x[R+0])},M.Predictor8=function(m,x,R){return ut(x[R-1],x[R+0])},M.Predictor9=function(m,x,R){return ut(x[R+0],x[R+1])},M.Predictor10=function(m,x,R){return ut(ut(m,x[R-1]),ut(x[R+0],x[R+1]))},M.Predictor11=function(m,x,R){var P=x[R+0];return 0>=At(P>>24&255,m>>24&255,(x=x[R-1])>>24&255)+At(P>>16&255,m>>16&255,x>>16&255)+At(P>>8&255,m>>8&255,x>>8&255)+At(255&P,255&m,255&x)?P:m},M.Predictor12=function(m,x,R){var P=x[R+0];return(qt((m>>24&255)+(P>>24&255)-((x=x[R-1])>>24&255))<<24|qt((m>>16&255)+(P>>16&255)-(x>>16&255))<<16|qt((m>>8&255)+(P>>8&255)-(x>>8&255))<<8|qt((255&m)+(255&P)-(255&x)))>>>0},M.Predictor13=function(m,x,R){var P=x[R-1];return(Wt((m=ut(m,x[R+0]))>>24&255,P>>24&255)<<24|Wt(m>>16&255,P>>16&255)<<16|Wt(m>>8&255,P>>8&255)<<8|Wt(255&m,255&P))>>>0};var Fo=M.PredictorAdd0;M.PredictorAdd1=Tt,it("Predictor2","PredictorAdd2"),it("Predictor3","PredictorAdd3"),it("Predictor4","PredictorAdd4"),it("Predictor5","PredictorAdd5"),it("Predictor6","PredictorAdd6"),it("Predictor7","PredictorAdd7"),it("Predictor8","PredictorAdd8"),it("Predictor9","PredictorAdd9"),it("Predictor10","PredictorAdd10"),it("Predictor11","PredictorAdd11"),it("Predictor12","PredictorAdd12"),it("Predictor13","PredictorAdd13");var zo=M.PredictorAdd2;ze("ColorIndexInverseTransform","MapARGB","32b",function(m){return m>>8&255},function(m){return m}),ze("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(m){return m},function(m){return m>>8&255});var qu,Pl=M.ColorIndexInverseTransform,wr=M.MapARGB,jl=M.VP8LColorIndexInverseTransformAlpha,es=M.MapAlpha,Ta=M.VP8LPredictorsAdd=[];Ta.length=16,(M.VP8LPredictors=[]).length=16,(M.VP8LPredictorsAdd_C=[]).length=16,(M.VP8LPredictors_C=[]).length=16;var Uo,Lu,Ml,$u,Oa,Js,Aa,ts,eo,Ra,wn,Ca,Ir,xr,un,Cn,bs,Hc,Bu,_h,mp,yp,Sh,ka,Fu,ua,ca,Dl,Eh=a(511),Wc=a(2041),Gc=a(225),Th=a(767),ql=0,Oh=Wc,Ll=Gc,Xn=Th,Na=Eh,xi=0,zu=1,ws=2,Vc=3,$l=4,to=5,Ah=6,Yc=7,Ho=8,ro=9,Uu=10,Rh=[2,3,7],Ia=[3,3,11],da=[280,256,256,256,40],Bl=[0,1,1,1,0],no=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],io=[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],Fl=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],$g=8,Kc=[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],Xc=[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],Dn=null,cn=[[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]],Tr=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Wo=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],xs=[[[[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]]]],bp=[[[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]]],zl=[[[[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]]]],Bg=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ao=[],Fi=[],ha=[],Fg=1,Hu=2,_s=[],Qn=[];yi("UpsampleRgbLinePair",qo,3),yi("UpsampleBgrLinePair",Cl,3),yi("UpsampleRgbaLinePair",Uc,4),yi("UpsampleBgraLinePair",Il,4),yi("UpsampleArgbLinePair",Nl,4),yi("UpsampleRgba4444LinePair",bn,2),yi("UpsampleRgb565LinePair",kl,2);var so=M.UpsampleRgbLinePair,Go=M.UpsampleBgrLinePair,Ss=M.UpsampleRgbaLinePair,Ch=M.UpsampleBgraLinePair,kh=M.UpsampleArgbLinePair,Wu=M.UpsampleRgba4444LinePair,Nh=M.UpsampleRgb565LinePair,Es=16,qn=1<<Es-1,Vo=-227,Ih=482,Ty=6,zg=0,Oy=a(256),Ln=a(256),wp=a(256),Qc=a(256),Zc=a(Ih-Vo),xp=a(Ih-Vo);Ja("YuvToRgbRow",qo,3),Ja("YuvToBgrRow",Cl,3),Ja("YuvToRgbaRow",Uc,4),Ja("YuvToBgraRow",Il,4),Ja("YuvToArgbRow",Nl,4),Ja("YuvToRgba4444Row",bn,2),Ja("YuvToRgb565Row",kl,2);var Ul=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],oo=[0,2,8],Ay=[8,7,6,4,4,2,2,2,1,1,1,1],Ug=1;this.WebPDecodeRGBA=function(m,x,R,P,F){var H=zu,V=new ve,X=new Ht;V.ba=X,X.S=H,X.width=[X.width],X.height=[X.height];var ee=X.width,se=X.height,ge=new Pt;if(ge==null||m==null)var Ae=2;else e(ge!=null),Ae=xh(m,x,R,ge.width,ge.height,ge.Pd,ge.Qd,ge.format,null);if(Ae!=0?ee=0:(ee!=null&&(ee[0]=ge.width[0]),se!=null&&(se[0]=ge.height[0]),ee=1),ee){X.width=X.width[0],X.height=X.height[0],P!=null&&(P[0]=X.width),F!=null&&(F[0]=X.height);e:{if(P=new bl,(F=new xe).data=m,F.w=x,F.ha=R,F.kd=1,x=[0],e(F!=null),((m=xh(F.data,F.w,F.ha,null,null,null,x,null,F))==0||m==7)&&x[0]&&(m=4),(x=m)==0){if(e(V!=null),P.data=F.data,P.w=F.w+F.offset,P.ha=F.ha-F.offset,P.put=Dt,P.ac=Ha,P.bc=pi,P.ma=V,F.xa){if((m=Jr())==null){V=1;break e}if((function(ae,be){var Ee=[0],Pe=[0],Oe=[0];t:for(;;){if(ae==null)return 0;if(be==null)return ae.a=2,0;if(ae.l=be,ae.a=0,ye(ae.m,be.data,be.w,be.ha),!Qr(ae.m,Ee,Pe,Oe)){ae.a=3;break t}if(ae.xb=Hu,be.width=Ee[0],be.height=Pe[0],!Wa(Ee[0],Pe[0],1,ae,null))break t;return 1}return e(ae.a!=0),0})(m,P)){if(P=(x=ju(P.width,P.height,V.Oa,V.ba))==0){t:{P=m;r:for(;;){if(P==null){P=0;break t}if(e(P.s.yc!=null),e(P.s.Ya!=null),e(0<P.s.Wb),e((R=P.l)!=null),e((F=R.ma)!=null),P.xb!=0){if(P.ca=F.ba,P.tb=F.tb,e(P.ca!=null),!$i(F.Oa,R,Vc)){P.a=2;break r}if(!Co(P,R.width)||R.da)break r;if((R.da||Ct(P.ca.S))&&sn(),11>P.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),P.ca.f.kb.F!=null&&sn()),P.Pb&&0<P.s.ua&&P.s.vb.X==null&&!ne(P.s.vb,P.s.Wa.Xa)){P.a=1;break r}P.xb=0}if(!Di(P,P.V,P.Ba,P.c,P.i,R.o,_a))break r;F.Dc=P.Ma,P=1;break t}e(P.a!=0),P=0}P=!P}P&&(x=m.a)}else x=m.a}else{if((m=new Zi)==null){V=1;break e}if(m.Fa=F.na,m.P=F.P,m.qc=F.Sa,sa(m,P)){if((x=ju(P.width,P.height,V.Oa,V.ba))==0){if(m.Aa=0,R=V.Oa,e((F=m)!=null),R!=null){if(0<(ee=0>(ee=R.Md)?0:100<ee?255:255*ee/100)){for(se=ge=0;4>se;++se)12>(Ae=F.pb[se]).lc&&(Ae.ia=ee*Ay[0>Ae.lc?0:Ae.lc]>>3),ge|=Ae.ia;ge&&(alert("todo:VP8InitRandom"),F.ia=1)}F.Ga=R.Id,100<F.Ga?F.Ga=100:0>F.Ga&&(F.Ga=0)}(function(ae,be){if(ae==null)return 0;if(be==null)return yn(ae,2,"NULL VP8Io parameter in VP8Decode().");if(!ae.cb&&!sa(ae,be))return 0;if(e(ae.cb),be.ac==null||be.ac(be)){be.ob&&(ae.L=0);var Ee=oo[ae.L];if(ae.L==2?(ae.yb=0,ae.zb=0):(ae.yb=be.v-Ee>>4,ae.zb=be.j-Ee>>4,0>ae.yb&&(ae.yb=0),0>ae.zb&&(ae.zb=0)),ae.Va=be.o+15+Ee>>4,ae.Hb=be.va+15+Ee>>4,ae.Hb>ae.za&&(ae.Hb=ae.za),ae.Va>ae.Ub&&(ae.Va=ae.Ub),0<ae.L){var Pe=ae.ed;for(Ee=0;4>Ee;++Ee){var Oe;if(ae.Qa.Cb){var qe=ae.Qa.Lb[Ee];ae.Qa.Fb||(qe+=Pe.Tb)}else qe=Pe.Tb;for(Oe=0;1>=Oe;++Oe){var De=ae.gd[Ee][Oe],Ye=qe;if(Pe.Pc&&(Ye+=Pe.vd[0],Oe&&(Ye+=Pe.od[0])),0<(Ye=0>Ye?0:63<Ye?63:Ye)){var Ue=Ye;0<Pe.wb&&(Ue=4<Pe.wb?Ue>>2:Ue>>1)>9-Pe.wb&&(Ue=9-Pe.wb),1>Ue&&(Ue=1),De.dd=Ue,De.tc=2*Ye+Ue,De.ld=40<=Ye?2:15<=Ye?1:0}else De.tc=0;De.La=Oe}}}Ee=0}else yn(ae,6,"Frame setup failed"),Ee=ae.a;if(Ee=Ee==0){if(Ee){ae.$c=0,0<ae.Aa||(ae.Ic=Ug);t:{Ee=ae.Ic,Pe=4*(Ue=ae.za);var St=32*Ue,ct=Ue+1,Kt=0<ae.L?Ue*(0<ae.Aa?2:1):0,ft=(ae.Aa==2?2:1)*Ue;if((De=Pe+832+(Oe=3*(16*Ee+oo[ae.L])/2*St)+(qe=ae.Fa!=null&&0<ae.Fa.length?ae.Kc.c*ae.Kc.i:0))!=De)Ee=0;else{if(De>ae.Vb){if(ae.Vb=0,ae.Ec=a(De),ae.Fc=0,ae.Ec==null){Ee=yn(ae,1,"no memory during frame initialization.");break t}ae.Vb=De}De=ae.Ec,Ye=ae.Fc,ae.Ac=De,ae.Bc=Ye,Ye+=Pe,ae.Gd=o(St,Tu),ae.Hd=0,ae.rb=o(ct+1,aa),ae.sb=1,ae.wa=Kt?o(Kt,qi):null,ae.Y=0,ae.D.Nb=0,ae.D.wa=ae.wa,ae.D.Y=ae.Y,0<ae.Aa&&(ae.D.Y+=Ue),e(!0),ae.oc=De,ae.pc=Ye,Ye+=832,ae.ya=o(ft,Eu),ae.aa=0,ae.D.ya=ae.ya,ae.D.aa=ae.aa,ae.Aa==2&&(ae.D.aa+=Ue),ae.R=16*Ue,ae.B=8*Ue,Ue=(St=oo[ae.L])*ae.R,St=St/2*ae.B,ae.sa=De,ae.ta=Ye+Ue,ae.qa=ae.sa,ae.ra=ae.ta+16*Ee*ae.R+St,ae.Ha=ae.qa,ae.Ia=ae.ra+8*Ee*ae.B+St,ae.$c=0,Ye+=Oe,ae.mb=qe?De:null,ae.nb=qe?Ye:null,e(Ye+qe<=ae.Fc+ae.Vb),ko(ae),i(ae.Ac,ae.Bc,0,Pe),Ee=1}}if(Ee){if(be.ka=0,be.y=ae.sa,be.O=ae.ta,be.f=ae.qa,be.N=ae.ra,be.ea=ae.Ha,be.Vd=ae.Ia,be.fa=ae.R,be.Rc=ae.B,be.F=null,be.J=0,!ql){for(Ee=-255;255>=Ee;++Ee)Eh[255+Ee]=0>Ee?-Ee:Ee;for(Ee=-1020;1020>=Ee;++Ee)Wc[1020+Ee]=-128>Ee?-128:127<Ee?127:Ee;for(Ee=-112;112>=Ee;++Ee)Gc[112+Ee]=-16>Ee?-16:15<Ee?15:Ee;for(Ee=-255;510>=Ee;++Ee)Th[255+Ee]=0>Ee?0:255<Ee?255:Ee;ql=1}Aa=fh,ts=No,Ra=dh,wn=hh,Ca=Li,eo=Au,Ir=mh,xr=yh,un=wh,Cn=O,bs=bh,Hc=Al,Bu=B,_h=ie,mp=Ys,yp=Iu,Sh=Pu,ka=gh,Fi[0]=Ya,Fi[1]=_l,Fi[2]=ph,Fi[3]=El,Fi[4]=zc,Fi[5]=gi,Fi[6]=Tl,Fi[7]=Ka,Fi[8]=vh,Fi[9]=ku,ao[0]=Cu,ao[1]=vp,ao[2]=gp,ao[3]=Ru,ao[4]=la,ao[5]=Io,ao[6]=Po,ha[0]=mi,ha[1]=Sl,ha[2]=Hs,ha[3]=jo,ha[4]=Nu,ha[5]=Ea,ha[6]=Ws,Ee=1}else Ee=0}Ee&&(Ee=(function(lr,kn){for(lr.M=0;lr.M<lr.Va;++lr.M){var Vt,pt=lr.Jc[lr.M&lr.Xb],rt=lr.m,on=lr;for(Vt=0;Vt<on.za;++Vt){var Xt=rt,rr=on,mt=rr.Ac,Zt=rr.Bc+4*Vt,pr=rr.zc,Gr=rr.ya[rr.aa+Vt];if(rr.Qa.Bb?Gr.$b=Le(Xt,rr.Pa.jb[0])?2+Le(Xt,rr.Pa.jb[2]):Le(Xt,rr.Pa.jb[1]):Gr.$b=0,rr.kc&&(Gr.Ad=Le(Xt,rr.Bd)),Gr.Za=!Le(Xt,145)+0,Gr.Za){var xn=Gr.Ob,_n=0;for(rr=0;4>rr;++rr){var dn,ar=pr[0+rr];for(dn=0;4>dn;++dn){ar=bp[mt[Zt+dn]][ar];for(var vr=Wo[Le(Xt,ar[0])];0<vr;)vr=Wo[2*vr+Le(Xt,ar[vr])];ar=-vr,mt[Zt+dn]=ar}n(xn,_n,mt,Zt,4),_n+=4,pr[0+rr]=ar}}else ar=Le(Xt,156)?Le(Xt,128)?1:3:Le(Xt,163)?2:0,Gr.Ob[0]=ar,i(mt,Zt,ar,4),i(pr,0,ar,4);Gr.Dd=Le(Xt,142)?Le(Xt,114)?Le(Xt,183)?1:3:2:0}if(on.m.Ka)return yn(lr,7,"Premature end-of-partition0 encountered.");for(;lr.ja<lr.za;++lr.ja){if(on=pt,Xt=(rt=lr).rb[rt.sb-1],mt=rt.rb[rt.sb+rt.ja],Vt=rt.ya[rt.aa+rt.ja],Zt=rt.kc?Vt.Ad:0)Xt.la=mt.la=0,Vt.Za||(Xt.Na=mt.Na=0),Vt.Hc=0,Vt.Gc=0,Vt.ia=0;else{var hn,$t;if(Xt=mt,mt=on,Zt=rt.Pa.Xc,pr=rt.ya[rt.aa+rt.ja],Gr=rt.pb[pr.$b],rr=pr.ad,xn=0,_n=rt.rb[rt.sb-1],ar=dn=0,i(rr,xn,0,384),pr.Za)var $n=0,fa=Zt[3];else{vr=a(16);var fn=Xt.Na+_n.Na;if(fn=Dn(mt,Zt[1],fn,Gr.Eb,0,vr,0),Xt.Na=_n.Na=(0<fn)+0,1<fn)Aa(vr,0,rr,xn);else{var zi=vr[0]+3>>3;for(vr=0;256>vr;vr+=16)rr[xn+vr]=zi}$n=1,fa=Zt[0]}var Pr=15&Xt.la,Sn=15&_n.la;for(vr=0;4>vr;++vr){var Ui=1&Sn;for(zi=$t=0;4>zi;++zi)Pr=Pr>>1|(Ui=(fn=Dn(mt,fa,fn=Ui+(1&Pr),Gr.Sc,$n,rr,xn))>$n)<<7,$t=$t<<2|(3<fn?3:1<fn?2:rr[xn+0]!=0),xn+=16;Pr>>=4,Sn=Sn>>1|Ui<<7,dn=(dn<<8|$t)>>>0}for(fa=Pr,$n=Sn>>4,hn=0;4>hn;hn+=2){for($t=0,Pr=Xt.la>>4+hn,Sn=_n.la>>4+hn,vr=0;2>vr;++vr){for(Ui=1&Sn,zi=0;2>zi;++zi)fn=Ui+(1&Pr),Pr=Pr>>1|(Ui=0<(fn=Dn(mt,Zt[2],fn,Gr.Qc,0,rr,xn)))<<3,$t=$t<<2|(3<fn?3:1<fn?2:rr[xn+0]!=0),xn+=16;Pr>>=2,Sn=Sn>>1|Ui<<5}ar|=$t<<4*hn,fa|=Pr<<4<<hn,$n|=(240&Sn)<<hn}Xt.la=fa,_n.la=$n,pr.Hc=dn,pr.Gc=ar,pr.ia=43690&ar?0:Gr.ia,Zt=!(dn|ar)}if(0<rt.L&&(rt.wa[rt.Y+rt.ja]=rt.gd[Vt.$b][Vt.Za],rt.wa[rt.Y+rt.ja].La|=!Zt),on.Ka)return yn(lr,7,"Premature end-of-file encountered.")}if(ko(lr),rt=kn,on=1,Vt=(pt=lr).D,Xt=0<pt.L&&pt.M>=pt.zb&&pt.M<=pt.Va,pt.Aa==0)t:{if(Vt.M=pt.M,Vt.uc=Xt,ys(pt,Vt),on=1,Vt=($t=pt.D).Nb,Xt=(ar=oo[pt.L])*pt.R,mt=ar/2*pt.B,vr=16*Vt*pt.R,zi=8*Vt*pt.B,Zt=pt.sa,pr=pt.ta-Xt+vr,Gr=pt.qa,rr=pt.ra-mt+zi,xn=pt.Ha,_n=pt.Ia-mt+zi,Sn=(Pr=$t.M)==0,dn=Pr>=pt.Va-1,pt.Aa==2&&ys(pt,$t),$t.uc)for(Ui=(fn=pt).D.M,e(fn.D.uc),$t=fn.yb;$t<fn.Hb;++$t){$n=$t,fa=Ui;var ui=(Fr=(Fn=fn).D).Nb;hn=Fn.R;var Fr=Fr.wa[Fr.Y+$n],_r=Fn.sa,_i=Fn.ta+16*ui*hn+16*$n,ci=Fr.dd,Rr=Fr.tc;if(Rr!=0)if(e(3<=Rr),Fn.L==1)0<$n&&yp(_r,_i,hn,Rr+4),Fr.La&&ka(_r,_i,hn,Rr),0<fa&&mp(_r,_i,hn,Rr+4),Fr.La&&Sh(_r,_i,hn,Rr);else{var Hi=Fn.B,Bn=Fn.qa,Ts=Fn.ra+8*ui*Hi+8*$n,rs=Fn.Ha,Fn=Fn.Ia+8*ui*Hi+8*$n;ui=Fr.ld,0<$n&&(xr(_r,_i,hn,Rr+4,ci,ui),Cn(Bn,Ts,rs,Fn,Hi,Rr+4,ci,ui)),Fr.La&&(Hc(_r,_i,hn,Rr,ci,ui),_h(Bn,Ts,rs,Fn,Hi,Rr,ci,ui)),0<fa&&(Ir(_r,_i,hn,Rr+4,ci,ui),un(Bn,Ts,rs,Fn,Hi,Rr+4,ci,ui)),Fr.La&&(bs(_r,_i,hn,Rr,ci,ui),Bu(Bn,Ts,rs,Fn,Hi,Rr,ci,ui))}}if(pt.ia&&alert("todo:DitherRow"),rt.put!=null){if($t=16*Pr,Pr=16*(Pr+1),Sn?(rt.y=pt.sa,rt.O=pt.ta+vr,rt.f=pt.qa,rt.N=pt.ra+zi,rt.ea=pt.Ha,rt.W=pt.Ia+zi):($t-=ar,rt.y=Zt,rt.O=pr,rt.f=Gr,rt.N=rr,rt.ea=xn,rt.W=_n),dn||(Pr-=ar),Pr>rt.o&&(Pr=rt.o),rt.F=null,rt.J=null,pt.Fa!=null&&0<pt.Fa.length&&$t<Pr&&(rt.J=Rn(pt,rt,$t,Pr-$t),rt.F=pt.mb,rt.F==null&&rt.F.length==0)){on=yn(pt,3,"Could not decode alpha data.");break t}$t<rt.j&&(ar=rt.j-$t,$t=rt.j,e(!(1&ar)),rt.O+=pt.R*ar,rt.N+=pt.B*(ar>>1),rt.W+=pt.B*(ar>>1),rt.F!=null&&(rt.J+=rt.width*ar)),$t<Pr&&(rt.O+=rt.v,rt.N+=rt.v>>1,rt.W+=rt.v>>1,rt.F!=null&&(rt.J+=rt.v),rt.ka=$t-rt.j,rt.U=rt.va-rt.v,rt.T=Pr-$t,on=rt.put(rt))}Vt+1!=pt.Ic||dn||(n(pt.sa,pt.ta-Xt,Zt,pr+16*pt.R,Xt),n(pt.qa,pt.ra-mt,Gr,rr+8*pt.B,mt),n(pt.Ha,pt.Ia-mt,xn,_n+8*pt.B,mt))}if(!on)return yn(lr,6,"Output aborted.")}return 1})(ae,be)),be.bc!=null&&be.bc(be),Ee&=1}return Ee?(ae.cb=0,Ee):0})(m,P)||(x=m.a)}}else x=m.a}x==0&&V.Oa!=null&&V.Oa.fd&&(x=$o(V.ba))}V=x}H=V!=0?null:11>H?X.f.RGBA.eb:X.f.kb.y}else H=null;return H};var Hg=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(M,U){for(var I="",q=0;q<4;q++)I+=String.fromCharCode(M[U++]);return I}function f(M,U){return M[U+0]|M[U+1]<<8}function v(M,U){return(M[U+0]|M[U+1]<<8|M[U+2]<<16)>>>0}function y(M,U){return(M[U+0]|M[U+1]<<8|M[U+2]<<16|M[U+3]<<24)>>>0}new c;var g=[0],_=[0],E=[],A=new c,T=r,C=(function(M,U){var I={},q=0,z=!1,Q=0,ce=0;if(I.frames=[],!(function(L,Y){for(var te=0;te<4;te++)if(L[Y+te]!="RIFF".charCodeAt(te))return!0;return!1})(M,U)){for(y(M,U+=4),U+=8;U<M.length;){var re=h(M,U),J=y(M,U+=4);U+=4;var le=J+(1&J);switch(re){case"VP8 ":case"VP8L":I.frames[q]===void 0&&(I.frames[q]={}),(oe=I.frames[q]).src_off=z?ce:U-8,oe.src_size=Q+J+8,q++,z&&(z=!1,Q=0,ce=0);break;case"VP8X":(oe=I.header={}).feature_flags=M[U];var ye=U+4;oe.canvas_width=1+v(M,ye),ye+=3,oe.canvas_height=1+v(M,ye),ye+=3;break;case"ALPH":z=!0,Q=le+8,ce=U-8;break;case"ANIM":(oe=I.header).bgcolor=y(M,U),ye=U+4,oe.loop_count=f(M,ye),ye+=2;break;case"ANMF":var Z,oe;(oe=I.frames[q]={}).offset_x=2*v(M,U),U+=3,oe.offset_y=2*v(M,U),U+=3,oe.width=1+v(M,U),U+=3,oe.height=1+v(M,U),U+=3,oe.duration=v(M,U),U+=3,Z=M[U++],oe.dispose=1&Z,oe.blend=Z>>1&1}re!="ANMF"&&(U+=le)}return I}})(T,0);C.response=T,C.rgbaoutput=!0,C.dataurl=!1;var N=C.header?C.header:null,k=C.frames?C.frames:null;if(N){N.loop_counter=N.loop_count,g=[N.canvas_height],_=[N.canvas_width];for(var j=0;j<k.length&&k[j].blend!=0;j++);}var W=k[0],G=A.WebPDecodeRGBA(T,W.src_off,W.src_size,_,g);W.rgba=G,W.imgwidth=_[0],W.imgheight=g[0];for(var D=0;D<_[0]*g[0]*4;D++)E[D]=G[D];return this.width=_,this.height=g,this.data=E,this}/** ====================================================================
|
|
560
|
+
* @license
|
|
561
|
+
* jsPDF XMP metadata plugin
|
|
562
|
+
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
563
|
+
*
|
|
564
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
565
|
+
* a copy of this software and associated documentation files (the
|
|
566
|
+
* "Software"), to deal in the Software without restriction, including
|
|
567
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
568
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
569
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
570
|
+
* the following conditions:
|
|
571
|
+
*
|
|
572
|
+
* The above copyright notice and this permission notice shall be
|
|
573
|
+
* included in all copies or substantial portions of the Software.
|
|
574
|
+
*
|
|
575
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
576
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
577
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
578
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
579
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
580
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
581
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
582
|
+
* ====================================================================
|
|
583
|
+
*/function Boe(){var r,e=this.internal.__metadata__.metadata,t=unescape(encodeURIComponent(e));r=this.internal.__metadata__.rawXml?t:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+r.length+" >>"),this.internal.write("stream"),this.internal.write(r),this.internal.write("endstream"),this.internal.write("endobj")}function Foe(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(r){var e,t,n,i,a,o,u,c,h,f=function(L){return L=L||{},this.isStrokeTransparent=L.isStrokeTransparent||!1,this.strokeOpacity=L.strokeOpacity||1,this.strokeStyle=L.strokeStyle||"#000000",this.fillStyle=L.fillStyle||"#000000",this.isFillTransparent=L.isFillTransparent||!1,this.fillOpacity=L.fillOpacity||1,this.font=L.font||"10px sans-serif",this.textBaseline=L.textBaseline||"alphabetic",this.textAlign=L.textAlign||"left",this.lineWidth=L.lineWidth||1,this.lineJoin=L.lineJoin||"miter",this.lineCap=L.lineCap||"butt",this.path=L.path||[],this.transform=L.transform!==void 0?L.transform.clone():new c,this.globalCompositeOperation=L.globalCompositeOperation||"normal",this.globalAlpha=L.globalAlpha||1,this.clip_path=L.clip_path||[],this.currentPoint=L.currentPoint||new o,this.miterLimit=L.miterLimit||10,this.lastPoint=L.lastPoint||new o,this.lineDashOffset=L.lineDashOffset||0,this.lineDash=L.lineDash||[],this.margin=L.margin||[0,0,0,0],this.prevPageLastElemOffset=L.prevPageLastElemOffset||0,this.ignoreClearRect=typeof L.ignoreClearRect!="boolean"||L.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new v(this),e=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,u=this.internal.Rectangle,c=this.internal.Matrix,h=new f}]);var v=function(L){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var Y=L;Object.defineProperty(this,"pdf",{get:function(){return Y}});var te=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return te},set:function(ne){te=!!ne}});var de=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return de},set:function(ne){de=!!ne}});var ue=0;Object.defineProperty(this,"posX",{get:function(){return ue},set:function(ne){isNaN(ne)||(ue=ne)}});var we=0;Object.defineProperty(this,"posY",{get:function(){return we},set:function(ne){isNaN(ne)||(we=ne)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(ne){var et;typeof ne=="number"?et=[ne,ne,ne,ne]:((et=new Array(4))[0]=ne[0],et[1]=ne.length>=2?ne[1]:et[0],et[2]=ne.length>=3?ne[2]:et[0],et[3]=ne.length>=4?ne[3]:et[1]),h.margin=et}});var Se=!1;Object.defineProperty(this,"autoPaging",{get:function(){return Se},set:function(ne){Se=ne}});var Ie=0;Object.defineProperty(this,"lastBreak",{get:function(){return Ie},set:function(ne){Ie=ne}});var Le=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Le},set:function(ne){Le=ne}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(ne){ne instanceof f&&(h=ne)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(ne){h.path=ne}});var Ve=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ve},set:function(ne){Ve=ne}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(ne){var et;et=y(ne),this.ctx.fillStyle=et.style,this.ctx.isFillTransparent=et.a===0,this.ctx.fillOpacity=et.a,this.pdf.setFillColor(et.r,et.g,et.b,{a:et.a}),this.pdf.setTextColor(et.r,et.g,et.b,{a:et.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(ne){var et=y(ne);this.ctx.strokeStyle=et.style,this.ctx.isStrokeTransparent=et.a===0,this.ctx.strokeOpacity=et.a,et.a===0?this.pdf.setDrawColor(255,255,255):(et.a,this.pdf.setDrawColor(et.r,et.g,et.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(ne){["butt","round","square"].indexOf(ne)!==-1&&(this.ctx.lineCap=ne,this.pdf.setLineCap(ne))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(ne){isNaN(ne)||(this.ctx.lineWidth=ne,this.pdf.setLineWidth(ne))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(ne){["bevel","round","miter"].indexOf(ne)!==-1&&(this.ctx.lineJoin=ne,this.pdf.setLineJoin(ne))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(ne){isNaN(ne)||(this.ctx.miterLimit=ne,this.pdf.setMiterLimit(ne))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(ne){this.ctx.textBaseline=ne}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(ne){["right","end","center","left","start"].indexOf(ne)!==-1&&(this.ctx.textAlign=ne)}});var tt=null,Xe=null,dt=null;Object.defineProperty(this,"fontFaces",{get:function(){return dt},set:function(ne){tt=null,Xe=null,dt=ne}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(ne){var et;if(this.ctx.font=ne,(et=/^\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-z0-9]+?)\s*$/i.exec(ne))!==null){var st=et[1];et[2];var ot=et[3],We=et[4];et[5];var vt=et[6],it=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(We)[2];We=Math.floor(it==="px"?parseFloat(We)*this.pdf.internal.scaleFactor:it==="em"?parseFloat(We)*this.pdf.getFontSize():parseFloat(We)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(We);var yt=(function(ze){var Ke,fe,ke=[],Be=ze.trim();if(Be==="")return ob;if(Be in NN)return[NN[Be]];for(;Be!=="";){switch(fe=null,Ke=(Be=PN(Be)).charAt(0)){case'"':case"'":fe=joe(Be.substring(1),Ke);break;default:fe=Moe(Be)}if(fe===null||(ke.push(fe[0]),(Be=PN(fe[1]))!==""&&Be.charAt(0)!==","))return ob;Be=Be.replace(/^,/,"")}return ke})(vt);if(this.fontFaces){var ut=(function(ze,Ke){var fe=ze.getFontList(),ke=JSON.stringify(fe);if(tt===null||Xe!==ke){var Be=(function(ht){var lt=[];return Object.keys(ht).forEach(function(or){ht[or].forEach(function(Ct){var Mt=null;switch(Ct){case"bold":Mt={family:or,weight:"bold"};break;case"italic":Mt={family:or,style:"italic"};break;case"bolditalic":Mt={family:or,weight:"bold",style:"italic"};break;case"":case"normal":Mt={family:or}}Mt!==null&&(Mt.ref={name:or,style:Ct},lt.push(Mt))})}),lt})(fe);tt=(function(ht){for(var lt={},or=0;or<ht.length;++or){var Ct=sb(ht[or]),Mt=Ct.family,zt=Ct.stretch,Ht=Ct.style,Pt=Ct.weight;lt[Mt]=lt[Mt]||{},lt[Mt][zt]=lt[Mt][zt]||{},lt[Mt][zt][Ht]=lt[Mt][zt][Ht]||{},lt[Mt][zt][Ht][Pt]=Ct}return lt})(Be.concat(Ke)),Xe=ke}return tt})(this.pdf,this.fontFaces),qt=yt.map(function(ze){return{family:ze,stretch:"normal",weight:ot,style:st}}),Wt=(function(ze,Ke,fe){for(var ke=(fe=fe||{}).defaultFontFamily||"times",Be=Object.assign({},Poe,fe.genericFontFamilies||{}),ht=null,lt=null,or=0;or<Ke.length;++or)if(Be[(ht=sb(Ke[or])).family]&&(ht.family=Be[ht.family]),ze.hasOwnProperty(ht.family)){lt=ze[ht.family];break}if(!(lt=lt||ze[ke]))throw new Error("Could not find a font-family for the rule '"+IN(ht)+"' and default family '"+ke+"'.");if(lt=(function(Ct,Mt){if(Mt[Ct])return Mt[Ct];var zt=r6[Ct],Ht=zt<=r6.normal?-1:1,Pt=kN(Mt,ZY,zt,Ht);if(!Pt)throw new Error("Could not find a matching font-stretch value for "+Ct);return Pt})(ht.stretch,lt),lt=(function(Ct,Mt){if(Mt[Ct])return Mt[Ct];for(var zt=QY[Ct],Ht=0;Ht<zt.length;++Ht)if(Mt[zt[Ht]])return Mt[zt[Ht]];throw new Error("Could not find a matching font-style for "+Ct)})(ht.style,lt),!(lt=(function(Ct,Mt){if(Mt[Ct])return Mt[Ct];if(Ct===400&&Mt[500])return Mt[500];if(Ct===500&&Mt[400])return Mt[400];var zt=Ioe[Ct],Ht=kN(Mt,JY,zt,Ct<400?-1:1);if(!Ht)throw new Error("Could not find a matching font-weight for value "+Ct);return Ht})(ht.weight,lt)))throw new Error("Failed to resolve a font for the rule '"+IN(ht)+"'.");return lt})(ut,qt);this.pdf.setFont(Wt.ref.name,Wt.ref.style)}else{var At="";(ot==="bold"||parseInt(ot,10)>=700||st==="bold")&&(At="bold"),st==="italic"&&(At+="italic"),At.length===0&&(At="normal");for(var Tt="",It={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"},nt=0;nt<yt.length;nt++){if(this.pdf.internal.getFont(yt[nt],At,{noFallback:!0,disableWarning:!0})!==void 0){Tt=yt[nt];break}if(At==="bolditalic"&&this.pdf.internal.getFont(yt[nt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Tt=yt[nt],At="bold";else if(this.pdf.internal.getFont(yt[nt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Tt=yt[nt],At="normal";break}}if(Tt===""){for(var jt=0;jt<yt.length;jt++)if(It[yt[jt]]){Tt=It[yt[jt]];break}}Tt=Tt===""?"Times":Tt,this.pdf.setFont(Tt,At)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(ne){this.ctx.globalCompositeOperation=ne}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(ne){this.ctx.globalAlpha=ne}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(ne){this.ctx.lineDashOffset=ne,oe.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(ne){this.ctx.lineDash=ne,oe.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(ne){this.ctx.ignoreClearRect=!!ne}})};v.prototype.setLineDash=function(L){this.lineDash=L},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){k.call(this,"fill",!1)},v.prototype.stroke=function(){k.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(L,Y){if(isNaN(L)||isNaN(Y))throw Yr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var te=this.ctx.transform.applyToPoint(new o(L,Y));this.path.push({type:"mt",x:te.x,y:te.y}),this.ctx.lastPoint=new o(L,Y)},v.prototype.closePath=function(){var L=new o(0,0),Y=0;for(Y=this.path.length-1;Y!==-1;Y--)if(this.path[Y].type==="begin"&&qr(this.path[Y+1])==="object"&&typeof this.path[Y+1].x=="number"){L=new o(this.path[Y+1].x,this.path[Y+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(L.x,L.y)},v.prototype.lineTo=function(L,Y){if(isNaN(L)||isNaN(Y))throw Yr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var te=this.ctx.transform.applyToPoint(new o(L,Y));this.path.push({type:"lt",x:te.x,y:te.y}),this.ctx.lastPoint=new o(te.x,te.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),k.call(this,null,!0)},v.prototype.quadraticCurveTo=function(L,Y,te,de){if(isNaN(te)||isNaN(de)||isNaN(L)||isNaN(Y))throw Yr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ue=this.ctx.transform.applyToPoint(new o(te,de)),we=this.ctx.transform.applyToPoint(new o(L,Y));this.path.push({type:"qct",x1:we.x,y1:we.y,x:ue.x,y:ue.y}),this.ctx.lastPoint=new o(ue.x,ue.y)},v.prototype.bezierCurveTo=function(L,Y,te,de,ue,we){if(isNaN(ue)||isNaN(we)||isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de))throw Yr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var Se=this.ctx.transform.applyToPoint(new o(ue,we)),Ie=this.ctx.transform.applyToPoint(new o(L,Y)),Le=this.ctx.transform.applyToPoint(new o(te,de));this.path.push({type:"bct",x1:Ie.x,y1:Ie.y,x2:Le.x,y2:Le.y,x:Se.x,y:Se.y}),this.ctx.lastPoint=new o(Se.x,Se.y)},v.prototype.arc=function(L,Y,te,de,ue,we){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de)||isNaN(ue))throw Yr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(we=!!we,!this.ctx.transform.isIdentity){var Se=this.ctx.transform.applyToPoint(new o(L,Y));L=Se.x,Y=Se.y;var Ie=this.ctx.transform.applyToPoint(new o(0,te)),Le=this.ctx.transform.applyToPoint(new o(0,0));te=Math.sqrt(Math.pow(Ie.x-Le.x,2)+Math.pow(Ie.y-Le.y,2))}Math.abs(ue-de)>=2*Math.PI&&(de=0,ue=2*Math.PI),this.path.push({type:"arc",x:L,y:Y,radius:te,startAngle:de,endAngle:ue,counterclockwise:we})},v.prototype.arcTo=function(L,Y,te,de,ue){throw new Error("arcTo not implemented.")},v.prototype.rect=function(L,Y,te,de){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de))throw Yr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(L,Y),this.lineTo(L+te,Y),this.lineTo(L+te,Y+de),this.lineTo(L,Y+de),this.lineTo(L,Y),this.lineTo(L+te,Y),this.lineTo(L,Y)},v.prototype.fillRect=function(L,Y,te,de){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de))throw Yr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var ue={};this.lineCap!=="butt"&&(ue.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ue.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(L,Y,te,de),this.fill(),ue.hasOwnProperty("lineCap")&&(this.lineCap=ue.lineCap),ue.hasOwnProperty("lineJoin")&&(this.lineJoin=ue.lineJoin)}},v.prototype.strokeRect=function(L,Y,te,de){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de))throw Yr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");_.call(this)||(this.beginPath(),this.rect(L,Y,te,de),this.stroke())},v.prototype.clearRect=function(L,Y,te,de){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de))throw Yr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(L,Y,te,de))},v.prototype.save=function(L){L=typeof L!="boolean"||L;for(var Y=this.pdf.internal.getCurrentPageInfo().pageNumber,te=0;te<this.pdf.internal.getNumberOfPages();te++)this.pdf.setPage(te+1),this.pdf.internal.out("q");if(this.pdf.setPage(Y),L){this.ctx.fontSize=this.pdf.internal.getFontSize();var de=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=de}},v.prototype.restore=function(L){L=typeof L!="boolean"||L;for(var Y=this.pdf.internal.getCurrentPageInfo().pageNumber,te=0;te<this.pdf.internal.getNumberOfPages();te++)this.pdf.setPage(te+1),this.pdf.internal.out("Q");this.pdf.setPage(Y),L&&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)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var y=function(L){var Y,te,de,ue;if(L.isCanvasGradient===!0&&(L=L.getColor()),!L)return{r:0,g:0,b:0,a:0,style:L};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(L))Y=0,te=0,de=0,ue=0;else{var we=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(L);if(we!==null)Y=parseInt(we[1]),te=parseInt(we[2]),de=parseInt(we[3]),ue=1;else if((we=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(L))!==null)Y=parseInt(we[1]),te=parseInt(we[2]),de=parseInt(we[3]),ue=parseFloat(we[4]);else{if(ue=1,typeof L=="string"&&L.charAt(0)!=="#"){var Se=new HY(L);L=Se.ok?Se.toHex():"#000000"}L.length===4?(Y=L.substring(1,2),Y+=Y,te=L.substring(2,3),te+=te,de=L.substring(3,4),de+=de):(Y=L.substring(1,3),te=L.substring(3,5),de=L.substring(5,7)),Y=parseInt(Y,16),te=parseInt(te,16),de=parseInt(de,16)}}return{r:Y,g:te,b:de,a:ue,style:L}},g=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},_=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(L,Y,te,de){if(isNaN(Y)||isNaN(te)||typeof L!="string")throw Yr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(de=isNaN(de)?void 0:de,!g.call(this)){var ue=le(this.ctx.transform.rotation),we=this.ctx.transform.scaleX;q.call(this,{text:L,x:Y,y:te,scale:we,angle:ue,align:this.textAlign,maxWidth:de})}},v.prototype.strokeText=function(L,Y,te,de){if(isNaN(Y)||isNaN(te)||typeof L!="string")throw Yr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!_.call(this)){de=isNaN(de)?void 0:de;var ue=le(this.ctx.transform.rotation),we=this.ctx.transform.scaleX;q.call(this,{text:L,x:Y,y:te,scale:we,renderingMode:"stroke",angle:ue,align:this.textAlign,maxWidth:de})}},v.prototype.measureText=function(L){if(typeof L!="string")throw Yr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var Y=this.pdf,te=this.pdf.internal.scaleFactor,de=Y.internal.getFontSize(),ue=Y.getStringUnitWidth(L)*de/Y.internal.scaleFactor;return new function(we){var Se=(we=we||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return Se}}),this}({width:ue*=Math.round(96*te/72*1e4)/1e4})},v.prototype.scale=function(L,Y){if(isNaN(L)||isNaN(Y))throw Yr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var te=new c(L,0,0,Y,0,0);this.ctx.transform=this.ctx.transform.multiply(te)},v.prototype.rotate=function(L){if(isNaN(L))throw Yr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var Y=new c(Math.cos(L),Math.sin(L),-Math.sin(L),Math.cos(L),0,0);this.ctx.transform=this.ctx.transform.multiply(Y)},v.prototype.translate=function(L,Y){if(isNaN(L)||isNaN(Y))throw Yr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var te=new c(1,0,0,1,L,Y);this.ctx.transform=this.ctx.transform.multiply(te)},v.prototype.transform=function(L,Y,te,de,ue,we){if(isNaN(L)||isNaN(Y)||isNaN(te)||isNaN(de)||isNaN(ue)||isNaN(we))throw Yr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var Se=new c(L,Y,te,de,ue,we);this.ctx.transform=this.ctx.transform.multiply(Se)},v.prototype.setTransform=function(L,Y,te,de,ue,we){L=isNaN(L)?1:L,Y=isNaN(Y)?0:Y,te=isNaN(te)?0:te,de=isNaN(de)?1:de,ue=isNaN(ue)?0:ue,we=isNaN(we)?0:we,this.ctx.transform=new c(L,Y,te,de,ue,we)};var E=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(L,Y,te,de,ue,we,Se,Ie,Le){var Ve=this.pdf.getImageProperties(L),tt=1,Xe=1,dt=1,ne=1;de!==void 0&&Ie!==void 0&&(dt=Ie/de,ne=Le/ue,tt=Ve.width/de*Ie/de,Xe=Ve.height/ue*Le/ue),we===void 0&&(we=Y,Se=te,Y=0,te=0),de!==void 0&&Ie===void 0&&(Ie=de,Le=ue),de===void 0&&Ie===void 0&&(Ie=Ve.width,Le=Ve.height);var et=this.ctx.transform.decompose(),st=le(et.rotate.shx),ot=new c,We=(ot=(ot=(ot=ot.multiply(et.translate)).multiply(et.skew)).multiply(et.scale)).applyToRectangle(new u(we-Y*dt,Se-te*ne,de*tt,ue*Xe));if(this.autoPaging){for(var vt,it=A.call(this,We),yt=[],ut=0;ut<it.length;ut+=1)yt.indexOf(it[ut])===-1&&yt.push(it[ut]);N(yt);for(var qt=yt[0],Wt=yt[yt.length-1],At=qt;At<Wt+1;At++){this.pdf.setPage(At);var Tt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],It=At===1?this.posY+this.margin[0]:this.margin[0],nt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],jt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ze=At===1?0:nt+(At-2)*jt;if(this.ctx.clip_path.length!==0){var Ke=this.path;vt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=C(vt,this.posX+this.margin[3],-ze+It+this.ctx.prevPageLastElemOffset),j.call(this,"fill",!0),this.path=Ke}var fe=JSON.parse(JSON.stringify(We));fe=C([fe],this.posX+this.margin[3],-ze+It+this.ctx.prevPageLastElemOffset)[0];var ke=(At>qt||At<Wt)&&E.call(this);ke&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Tt,jt,null).clip().discardPath()),this.pdf.addImage(L,"JPEG",fe.x,fe.y,fe.w,fe.h,null,null,st),ke&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(L,"JPEG",We.x,We.y,We.w,We.h,null,null,st)};var A=function(L,Y,te){var de=[];Y=Y||this.pdf.internal.pageSize.width,te=te||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ue=this.posY+this.ctx.prevPageLastElemOffset;switch(L.type){default:case"mt":case"lt":de.push(Math.floor((L.y+ue)/te)+1);break;case"arc":de.push(Math.floor((L.y+ue-L.radius)/te)+1),de.push(Math.floor((L.y+ue+L.radius)/te)+1);break;case"qct":var we=ye(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x,L.y);de.push(Math.floor((we.y+ue)/te)+1),de.push(Math.floor((we.y+we.h+ue)/te)+1);break;case"bct":var Se=Z(this.ctx.lastPoint.x,this.ctx.lastPoint.y,L.x1,L.y1,L.x2,L.y2,L.x,L.y);de.push(Math.floor((Se.y+ue)/te)+1),de.push(Math.floor((Se.y+Se.h+ue)/te)+1);break;case"rect":de.push(Math.floor((L.y+ue)/te)+1),de.push(Math.floor((L.y+L.h+ue)/te)+1)}for(var Ie=0;Ie<de.length;Ie+=1)for(;this.pdf.internal.getNumberOfPages()<de[Ie];)T.call(this);return de},T=function(){var L=this.fillStyle,Y=this.strokeStyle,te=this.font,de=this.lineCap,ue=this.lineWidth,we=this.lineJoin;this.pdf.addPage(),this.fillStyle=L,this.strokeStyle=Y,this.font=te,this.lineCap=de,this.lineWidth=ue,this.lineJoin=we},C=function(L,Y,te){for(var de=0;de<L.length;de++)switch(L[de].type){case"bct":L[de].x2+=Y,L[de].y2+=te;case"qct":L[de].x1+=Y,L[de].y1+=te;default:L[de].x+=Y,L[de].y+=te}return L},N=function(L){return L.sort(function(Y,te){return Y-te})},k=function(L,Y){var te=this.fillStyle,de=this.strokeStyle,ue=this.lineCap,we=this.lineWidth,Se=Math.abs(we*this.ctx.transform.scaleX),Ie=this.lineJoin;if(this.autoPaging){for(var Le,Ve,tt=JSON.parse(JSON.stringify(this.path)),Xe=JSON.parse(JSON.stringify(this.path)),dt=[],ne=0;ne<Xe.length;ne++)if(Xe[ne].x!==void 0)for(var et=A.call(this,Xe[ne]),st=0;st<et.length;st+=1)dt.indexOf(et[st])===-1&&dt.push(et[st]);for(var ot=0;ot<dt.length;ot++)for(;this.pdf.internal.getNumberOfPages()<dt[ot];)T.call(this);N(dt);for(var We=dt[0],vt=dt[dt.length-1],it=We;it<vt+1;it++){this.pdf.setPage(it),this.fillStyle=te,this.strokeStyle=de,this.lineCap=ue,this.lineWidth=Se,this.lineJoin=Ie;var yt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ut=it===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Wt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],At=it===1?0:qt+(it-2)*Wt;if(this.ctx.clip_path.length!==0){var Tt=this.path;Le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=C(Le,this.posX+this.margin[3],-At+ut+this.ctx.prevPageLastElemOffset),j.call(this,L,!0),this.path=Tt}if(Ve=JSON.parse(JSON.stringify(tt)),this.path=C(Ve,this.posX+this.margin[3],-At+ut+this.ctx.prevPageLastElemOffset),Y===!1||it===0){var It=(it>We||it<vt)&&E.call(this);It&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],yt,Wt,null).clip().discardPath()),j.call(this,L,Y),It&&this.pdf.restoreGraphicsState()}this.lineWidth=we}this.path=tt}else this.lineWidth=Se,j.call(this,L,Y),this.lineWidth=we},j=function(L,Y){if((L!=="stroke"||Y||!_.call(this))&&(L==="stroke"||Y||!g.call(this))){for(var te,de,ue=[],we=this.path,Se=0;Se<we.length;Se++){var Ie=we[Se];switch(Ie.type){case"begin":ue.push({begin:!0});break;case"close":ue.push({close:!0});break;case"mt":ue.push({start:Ie,deltas:[],abs:[]});break;case"lt":var Le=ue.length;if(we[Se-1]&&!isNaN(we[Se-1].x)&&(te=[Ie.x-we[Se-1].x,Ie.y-we[Se-1].y],Le>0)){for(;Le>=0;Le--)if(ue[Le-1].close!==!0&&ue[Le-1].begin!==!0){ue[Le-1].deltas.push(te),ue[Le-1].abs.push(Ie);break}}break;case"bct":te=[Ie.x1-we[Se-1].x,Ie.y1-we[Se-1].y,Ie.x2-we[Se-1].x,Ie.y2-we[Se-1].y,Ie.x-we[Se-1].x,Ie.y-we[Se-1].y],ue[ue.length-1].deltas.push(te);break;case"qct":var Ve=we[Se-1].x+2/3*(Ie.x1-we[Se-1].x),tt=we[Se-1].y+2/3*(Ie.y1-we[Se-1].y),Xe=Ie.x+2/3*(Ie.x1-Ie.x),dt=Ie.y+2/3*(Ie.y1-Ie.y),ne=Ie.x,et=Ie.y;te=[Ve-we[Se-1].x,tt-we[Se-1].y,Xe-we[Se-1].x,dt-we[Se-1].y,ne-we[Se-1].x,et-we[Se-1].y],ue[ue.length-1].deltas.push(te);break;case"arc":ue.push({deltas:[],abs:[],arc:!0}),Array.isArray(ue[ue.length-1].abs)&&ue[ue.length-1].abs.push(Ie)}}de=Y?null:L==="stroke"?"stroke":"fill";for(var st=!1,ot=0;ot<ue.length;ot++)if(ue[ot].arc)for(var We=ue[ot].abs,vt=0;vt<We.length;vt++){var it=We[vt];it.type==="arc"?D.call(this,it.x,it.y,it.radius,it.startAngle,it.endAngle,it.counterclockwise,void 0,Y,!st):z.call(this,it.x,it.y),st=!0}else if(ue[ot].close===!0)this.pdf.internal.out("h"),st=!1;else if(ue[ot].begin!==!0){var yt=ue[ot].start.x,ut=ue[ot].start.y;Q.call(this,ue[ot].deltas,yt,ut),st=!0}de&&M.call(this,de),Y&&U.call(this)}},W=function(L){var Y=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,te=Y*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return L-te;case"top":return L+Y-te;case"hanging":return L+Y-2*te;case"middle":return L+Y/2-te;default:return L}},G=function(L){return L+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var L=function(){};return L.colorStops=[],L.addColorStop=function(Y,te){this.colorStops.push([Y,te])},L.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},L.isCanvasGradient=!0,L},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var D=function(L,Y,te,de,ue,we,Se,Ie,Le){for(var Ve=re.call(this,te,de,ue,we),tt=0;tt<Ve.length;tt++){var Xe=Ve[tt];tt===0&&(Le?I.call(this,Xe.x1+L,Xe.y1+Y):z.call(this,Xe.x1+L,Xe.y1+Y)),ce.call(this,L,Y,Xe.x2,Xe.y2,Xe.x3,Xe.y3,Xe.x4,Xe.y4)}Ie?U.call(this):M.call(this,Se)},M=function(L){switch(L){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},U=function(){this.pdf.clip(),this.pdf.discardPath()},I=function(L,Y){this.pdf.internal.out(t(L)+" "+n(Y)+" m")},q=function(L){var Y;switch(L.align){case"right":case"end":Y="right";break;case"center":Y="center";break;default:Y="left"}var te,de,ue,we=this.pdf.getTextDimensions(L.text),Se=W.call(this,L.y),Ie=G.call(this,Se)-we.h,Le=this.ctx.transform.applyToPoint(new o(L.x,Se));if(this.autoPaging){var Ve=this.ctx.transform.decompose(),tt=new c;tt=(tt=(tt=tt.multiply(Ve.translate)).multiply(Ve.skew)).multiply(Ve.scale);for(var Xe=this.ctx.transform.applyToRectangle(new u(L.x,Se,we.w,we.h)),dt=tt.applyToRectangle(new u(L.x,Ie,we.w,we.h)),ne=A.call(this,dt),et=[],st=0;st<ne.length;st+=1)et.indexOf(ne[st])===-1&&et.push(ne[st]);N(et);for(var ot=et[0],We=et[et.length-1],vt=ot;vt<We+1;vt++){this.pdf.setPage(vt);var it=vt===1?this.posY+this.margin[0]:this.margin[0],yt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ut=this.pdf.internal.pageSize.height-this.margin[2],qt=ut-this.margin[0],Wt=this.pdf.internal.pageSize.width-this.margin[1],At=Wt-this.margin[3],Tt=vt===1?0:yt+(vt-2)*qt;if(this.ctx.clip_path.length!==0){var It=this.path;te=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=C(te,this.posX+this.margin[3],-1*Tt+it),j.call(this,"fill",!0),this.path=It}var nt=C([JSON.parse(JSON.stringify(dt))],this.posX+this.margin[3],-Tt+it+this.ctx.prevPageLastElemOffset)[0];L.scale>=.01&&(de=this.pdf.internal.getFontSize(),this.pdf.setFontSize(de*L.scale),ue=this.lineWidth,this.lineWidth=ue*L.scale);var jt=this.autoPaging!=="text";if(jt||nt.y+nt.h<=ut){if(jt||nt.y>=it&&nt.x<=Wt){var ze=jt?L.text:this.pdf.splitTextToSize(L.text,L.maxWidth||Wt-nt.x)[0],Ke=C([JSON.parse(JSON.stringify(Xe))],this.posX+this.margin[3],-Tt+it+this.ctx.prevPageLastElemOffset)[0],fe=jt&&(vt>ot||vt<We)&&E.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],At,qt,null).clip().discardPath()),this.pdf.text(ze,Ke.x,Ke.y,{angle:L.angle,align:Y,renderingMode:L.renderingMode}),fe&&this.pdf.restoreGraphicsState()}}else nt.y<ut&&(this.ctx.prevPageLastElemOffset+=ut-nt.y);L.scale>=.01&&(this.pdf.setFontSize(de),this.lineWidth=ue)}}else L.scale>=.01&&(de=this.pdf.internal.getFontSize(),this.pdf.setFontSize(de*L.scale),ue=this.lineWidth,this.lineWidth=ue*L.scale),this.pdf.text(L.text,Le.x+this.posX,Le.y+this.posY,{angle:L.angle,align:Y,renderingMode:L.renderingMode,maxWidth:L.maxWidth}),L.scale>=.01&&(this.pdf.setFontSize(de),this.lineWidth=ue)},z=function(L,Y,te,de){te=te||0,de=de||0,this.pdf.internal.out(t(L+te)+" "+n(Y+de)+" l")},Q=function(L,Y,te){return this.pdf.lines(L,Y,te,null,null)},ce=function(L,Y,te,de,ue,we,Se,Ie){this.pdf.internal.out([e(i(te+L)),e(a(de+Y)),e(i(ue+L)),e(a(we+Y)),e(i(Se+L)),e(a(Ie+Y)),"c"].join(" "))},re=function(L,Y,te,de){for(var ue=2*Math.PI,we=Math.PI/2;Y>te;)Y-=ue;var Se=Math.abs(te-Y);Se<ue&&de&&(Se=ue-Se);for(var Ie=[],Le=de?-1:1,Ve=Y;Se>1e-5;){var tt=Ve+Le*Math.min(Se,we);Ie.push(J.call(this,L,Ve,tt)),Se-=Math.abs(tt-Ve),Ve=tt}return Ie},J=function(L,Y,te){var de=(te-Y)/2,ue=L*Math.cos(de),we=L*Math.sin(de),Se=ue,Ie=-we,Le=Se*Se+Ie*Ie,Ve=Le+Se*ue+Ie*we,tt=4/3*(Math.sqrt(2*Le*Ve)-Ve)/(Se*we-Ie*ue),Xe=Se-tt*Ie,dt=Ie+tt*Se,ne=Xe,et=-dt,st=de+Y,ot=Math.cos(st),We=Math.sin(st);return{x1:L*Math.cos(Y),y1:L*Math.sin(Y),x2:Xe*ot-dt*We,y2:Xe*We+dt*ot,x3:ne*ot-et*We,y3:ne*We+et*ot,x4:L*Math.cos(te),y4:L*Math.sin(te)}},le=function(L){return 180*L/Math.PI},ye=function(L,Y,te,de,ue,we){var Se=L+.5*(te-L),Ie=Y+.5*(de-Y),Le=ue+.5*(te-ue),Ve=we+.5*(de-we),tt=Math.min(L,ue,Se,Le),Xe=Math.max(L,ue,Se,Le),dt=Math.min(Y,we,Ie,Ve),ne=Math.max(Y,we,Ie,Ve);return new u(tt,dt,Xe-tt,ne-dt)},Z=function(L,Y,te,de,ue,we,Se,Ie){var Le,Ve,tt,Xe,dt,ne,et,st,ot,We,vt,it,yt,ut,qt=te-L,Wt=de-Y,At=ue-te,Tt=we-de,It=Se-ue,nt=Ie-we;for(Ve=0;Ve<41;Ve++)ot=(et=(tt=L+(Le=Ve/40)*qt)+Le*((dt=te+Le*At)-tt))+Le*(dt+Le*(ue+Le*It-dt)-et),We=(st=(Xe=Y+Le*Wt)+Le*((ne=de+Le*Tt)-Xe))+Le*(ne+Le*(we+Le*nt-ne)-st),Ve==0?(vt=ot,it=We,yt=ot,ut=We):(vt=Math.min(vt,ot),it=Math.min(it,We),yt=Math.max(yt,ot),ut=Math.max(ut,We));return new u(Math.round(vt),Math.round(it),Math.round(yt-vt),Math.round(ut-it))},oe=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var L,Y,te=(L=this.ctx.lineDash,Y=this.ctx.lineDashOffset,JSON.stringify({lineDash:L,lineDashOffset:Y}));this.prevLineDash!==te&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=te)}}})(Rt.API),(function(r){var e=function(o){var u,c,h,f,v,y,g,_,E,A;for(c=[],h=0,f=(o+=u="\0\0\0\0".slice(o.length%4||4)).length;f>h;h+=4)(v=(o.charCodeAt(h)<<24)+(o.charCodeAt(h+1)<<16)+(o.charCodeAt(h+2)<<8)+o.charCodeAt(h+3))!==0?(y=(v=((v=((v=((v=(v-(A=v%85))/85)-(E=v%85))/85)-(_=v%85))/85)-(g=v%85))/85)%85,c.push(y+33,g+33,_+33,E+33,A+33)):c.push(122);return(function(T,C){for(var N=C;N>0;N--)T.pop()})(c,u.length),String.fromCharCode.apply(String,c)+"~>"},t=function(o){var u,c,h,f,v,y=String,g="length",_=255,E="charCodeAt",A="slice",T="replace";for(o[A](-2),o=o[A](0,-2)[T](/\s/g,"")[T]("z","!!!!!"),h=[],f=0,v=(o+=u="uuuuu"[A](o[g]%5||5))[g];v>f;f+=5)c=52200625*(o[E](f)-33)+614125*(o[E](f+1)-33)+7225*(o[E](f+2)-33)+85*(o[E](f+3)-33)+(o[E](f+4)-33),h.push(_&c>>24,_&c>>16,_&c>>8,_&c);return(function(C,N){for(var k=N;k>0;k--)C.pop()})(h,u[g]),y.fromCharCode.apply(y,h)},n=function(o){return o.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(o){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((o=o.replace(/\s/g,"")).indexOf(">")!==-1&&(o=o.substr(0,o.indexOf(">"))),o.length%2&&(o+="0"),u.test(o)===!1)return"";for(var c="",h=0;h<o.length;h+=2)c+=String.fromCharCode("0x"+(o[h]+o[h+1]));return c},a=function(o){for(var u=new Uint8Array(o.length),c=o.length;c--;)u[c]=o.charCodeAt(c);return(u=KO(u)).reduce(function(h,f){return h+String.fromCharCode(f)},"")};r.processDataByFilters=function(o,u){var c=0,h=o||"",f=[];for(typeof(u=u||[])=="string"&&(u=[u]),c=0;c<u.length;c+=1)switch(u[c]){case"ASCII85Decode":case"/ASCII85Decode":h=t(h),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=e(h),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=i(h),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=n(h),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=a(h),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+u[c]+'" is not implemented')}return{data:h,reverseChain:f.reverse().join(" ")}}})(Rt.API),(function(r){r.loadFile=function(e,t,n){return(function(i,a,o){a=a!==!1,o=typeof o=="function"?o:function(){};var u=void 0;try{u=(function(c,h,f){var v=new XMLHttpRequest,y=0,g=function(_){var E=_.length,A=[],T=String.fromCharCode;for(y=0;y<E;y+=1)A.push(T(255&_.charCodeAt(y)));return A.join("")};if(v.open("GET",c,!h),v.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(v.onload=function(){v.status===200?f(g(this.responseText)):f(void 0)}),v.send(null),h&&v.status===200)return g(v.responseText)})(i,a,o)}catch{}return u})(e,t,n)},r.allowFsRead=void 0,r.loadImageFile=r.loadFile})(Rt.API),(function(r){function e(){return(Qt.html2canvas?Promise.resolve(Qt.html2canvas):n1(()=>import("./html2canvas.esm-ezMWrafe.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function t(){return(Qt.DOMPurify?Promise.resolve(Qt.DOMPurify):n1(()=>import("./purify.es-BgtpMKW3.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var n=function(u){var c=qr(u);return c==="undefined"?"undefined":c==="string"||u instanceof String?"string":c==="number"||u instanceof Number?"number":c==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":c==="object"?"object":"unknown"},i=function(u,c){var h=document.createElement(u);for(var f in c.className&&(h.className=c.className),c.innerHTML&&c.dompurify&&(h.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)h.style[f]=c.style[f];return h},a=function u(c,h){for(var f=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),v=c.firstChild;v;v=v.nextSibling)h!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||f.appendChild(u(v,h));return c.nodeType===1&&(c.nodeName==="CANVAS"?(f.width=c.width,f.height=c.height,f.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(f.value=c.value),f.addEventListener("load",function(){f.scrollTop=c.scrollTop,f.scrollLeft=c.scrollLeft},!0)),f},o=function u(c){var h=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),f=u.convert(Promise.resolve(),h);return(f=f.setProgress(1,u,1,[u])).set(c)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(u,c){return u.__proto__=c||o.prototype,u},o.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"}},o.prototype.from=function(u,c){return this.then(function(){switch(c=c||(function(h){switch(n(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(u),c){case"string":return this.then(t).then(function(h){return this.set({src:i("div",{innerHTML:u,dompurify:h})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},o.prototype.to=function(u){switch(u){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.")}},o.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 u={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},c=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(c),this.prop.container.firstChild.appendChild(i("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"})},o.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,c(this.prop.container,h)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var h=this.opt.jsPDF,f=this.opt.fontFaces,v=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,y=Object.assign({async:!0,allowTaint:!0,scale:v,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 y.onrendered,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=f,f)for(var g=0;g<f.length;++g){var _=f[g],E=_.src.find(function(A){return A.format==="truetype"});E&&h.addFont(E.url,_.ref.name,_.ref.style)}return y.windowHeight=y.windowHeight||0,y.windowHeight=y.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):y.windowHeight,h.context2d.save(!0),c(this.prop.container,y)}).then(function(c){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var u=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=u})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(u,c,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(u,c):this.outputPdf(u,c)},o.prototype.outputPdf=function(u,c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(u,c)})},o.prototype.outputImg=function(u){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(u){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 "'+u+'" is not supported.'}})},o.prototype.save=function(u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(u?{filename:u}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(u){if(n(u)!=="object")return this;var c=Object.keys(u||{}).map(function(h){if(h in o.template.prop)return function(){this.prop[h]=u[h]};switch(h){case"margin":return this.setMargin.bind(this,u.margin);case"jsPDF":return function(){return this.opt.jsPDF=u.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,u.pageSize);default:return function(){this.opt[h]=u[h]}}},this);return this.then(function(){return this.thenList(c)})},o.prototype.get=function(u,c){return this.then(function(){var h=u in o.template.prop?this.prop[u]:this.opt[u];return c?c(h):h})},o.prototype.setMargin=function(u){return this.then(function(){switch(n(u)){case"number":u=[u,u,u,u];case"array":if(u.length===2&&(u=[u[0],u[1],u[0],u[1]]),u.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=u}).then(this.setPageSize)},o.prototype.setPageSize=function(u){function c(h,f){return Math.floor(h*f/72*96)}return this.then(function(){(u=u||Rt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(u.inner={width:u.width-this.opt.margin[1]-this.opt.margin[3],height:u.height-this.opt.margin[0]-this.opt.margin[2]},u.inner.px={width:c(u.inner.width,u.k),height:c(u.inner.height,u.k)},u.inner.ratio=u.inner.height/u.inner.width),this.prop.pageSize=u})},o.prototype.setProgress=function(u,c,h,f){return u!=null&&(this.progress.val=u),c!=null&&(this.progress.state=c),h!=null&&(this.progress.n=h),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(u,c,h,f){return this.setProgress(u?this.progress.val+u:null,c||null,h?this.progress.n+h:null,f?this.progress.stack.concat(f):null)},o.prototype.then=function(u,c){var h=this;return this.thenCore(u,c,function(f,v){return h.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(y){return h.updateProgress(null,f),y}).then(f,v).then(function(y){return h.updateProgress(1),y})})},o.prototype.thenCore=function(u,c,h){h=h||Promise.prototype.then;var f=this;u&&(u=u.bind(f)),c&&(c=c.bind(f));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:o.convert(Object.assign({},f),Promise.prototype),y=h.call(v,u,c);return o.convert(y,f.__proto__)},o.prototype.thenExternal=function(u,c){return Promise.prototype.then.call(this,u,c)},o.prototype.thenList=function(u){var c=this;return u.forEach(function(h){c=c.thenCore(h)}),c},o.prototype.catch=function(u){u&&(u=u.bind(this));var c=Promise.prototype.catch.call(this,u);return o.convert(c,this)},o.prototype.catchExternal=function(u){return Promise.prototype.catch.call(this,u)},o.prototype.error=function(u){return this.then(function(){throw new Error(u)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,Rt.getPageSize=function(u,c,h){if(qr(u)==="object"){var f=u;u=f.orientation,c=f.unit||c,h=f.format||h}c=c||"mm",h=h||"a4",u=(""+(u||"P")).toLowerCase();var v,y=(""+h).toLowerCase(),g={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(c){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+c}var _,E=0,A=0;if(g.hasOwnProperty(y))E=g[y][1]/v,A=g[y][0]/v;else try{E=h[1],A=h[0]}catch{throw new Error("Invalid format: "+h)}if(u==="p"||u==="portrait")u="p",A>E&&(_=A,A=E,E=_);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",E>A&&(_=A,A=E,E=_)}return{width:A,height:E,unit:c,k:v,orientation:u}},r.html=function(u,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(sb):null;var h=new o(c);return c.worker?h:h.from(u).doCallback()}})(Rt.API),Rt.API.addJS=function(r){var e,t,n=(function(i){for(var a="",o=0;o<i.length;o++){var u=i[o];if(u==="("||u===")"){for(var c=0,h=o-1;h>=0&&i[h]==="\\";h--)c++;a+=c%2==0?"\\"+u:u}else a+=u}return a})(r);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&t!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},(function(r){var e;r.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=t.outline.render().split(/\r\n/),a=0;a<i.length;a++){var o=i[a],u=n.exec(o);if(u!=null){var c=u[1];t.internal.newObjectDeferredBegin(c,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,f=[];for(a=0;a<h;a++){var v=t.internal.newObject();f.push(v);var y=t.internal.getPageInfo(a+1);t.internal.write("<< /D["+y.objId+" 0 R /XYZ null null null]>> endobj")}var g=t.internal.newObject();for(t.internal.write("<< /Names [ "),a=0;a<f.length;a++)t.internal.write("(page_"+(a+1)+")"+f[a]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+g+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,i,a){var o={title:i,options:a,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 i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},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 i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var o=n.children[a];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+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 u=this.count=this.count_r({count:0},o);if(u>0&&this.line("/Count "+u),o.options&&o.options.pageNumber){var c=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var h=0;h<n.children.length;h++)this.renderItems(n.children[h])},t.outline.line=function(n){this.ctx.val+=n+`\r
|
|
584
|
+
`},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
|
|
585
|
+
`+n.id+` 0 obj\r
|
|
586
|
+
<<\r
|
|
587
|
+
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
588
|
+
endobj\r
|
|
589
|
+
`},t.outline.count_r=function(n,i){for(var a=0;a<i.children.length;a++)n.count++,this.count_r(n,i.children[a]);return n.count}}])})(Rt.API),(function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,n,i,a,o,u){var c,h=this.decode.DCT_DECODE,f=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,c=(function(v){for(var y,g=256*v.charCodeAt(4)+v.charCodeAt(5),_=v.length,E={width:0,height:0,numcomponents:1},A=4;A<_;A+=2){if(A+=g,e.indexOf(v.charCodeAt(A+1))!==-1){y=256*v.charCodeAt(A+5)+v.charCodeAt(A+6),E={width:256*v.charCodeAt(A+7)+v.charCodeAt(A+8),height:y,numcomponents:v.charCodeAt(A+9)};break}g=256*v.charCodeAt(A+2)+v.charCodeAt(A+3)}return E})(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),c.numcomponents){case 1:u=this.color_spaces.DEVICE_GRAY;break;case 4:u=this.color_spaces.DEVICE_CMYK;break;case 3:u=this.color_spaces.DEVICE_RGB}f={data:t,width:c.width,height:c.height,colorSpace:u,bitsPerComponent:8,filter:h,index:n,alias:i}}return f}})(Rt.API),Rt.API.processPNG=function(r,e,t,n){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var i,a=yoe(r,{checkCrc:!0}),o=a.width,u=a.height,c=a.channels,h=a.palette,f=a.depth;i=h&&c===1?(function(D){for(var M=D.width,U=D.height,I=D.data,q=D.palette,z=D.depth,Q=!1,ce=[],re=[],J=void 0,le=!1,ye=0,Z=0;Z<q.length;Z++){var oe=$k(q[Z],4),L=oe[0],Y=oe[1],te=oe[2],de=oe[3];ce.push(L,Y,te),de!=null&&(de===0?(ye++,re.length<1&&re.push(Z)):de<255&&(le=!0))}if(le||ye>1){Q=!0,re=void 0;var ue=M*U;J=new Uint8Array(ue);for(var we=new DataView(I.buffer),Se=0;Se<ue;Se++){var Ie=lb(we,Se,z),Le=$k(q[Ie],4)[3];J[Se]=Le}}else ye===0&&(re=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:Q?8:void 0,colorBytes:I,alphaBytes:J,needSMask:Q,palette:ce,mask:re}})(a):c===2||c===4?(function(D){for(var M=D.data,U=D.width,I=D.height,q=D.channels,z=D.depth,Q=q===2?"DeviceGray":"DeviceRGB",ce=q-1,re=U*I,J=ce,le=re*J,ye=1*re,Z=Math.ceil(le*z/8),oe=Math.ceil(ye*z/8),L=new Uint8Array(Z),Y=new Uint8Array(oe),te=new DataView(M.buffer),de=new DataView(L.buffer),ue=new DataView(Y.buffer),we=!1,Se=0;Se<re;Se++){for(var Ie=Se*q,Le=0;Le<J;Le++)zN(de,lb(te,Ie+Le,z),Se*J+Le,z);var Ve=lb(te,Ie+J,z);Ve<(1<<z)-1&&(we=!0),zN(ue,Ve,1*Se,z)}return{colorSpace:Q,colorsPerPixel:ce,sMaskBitsPerComponent:we?z:void 0,colorBytes:L,alphaBytes:Y,needSMask:we}})(a):(function(D){var M=D.data,U=D.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:U,colorsPerPixel:U==="DeviceGray"?1:3,colorBytes:M instanceof Uint16Array?(function(I){for(var q=I.length,z=new Uint8Array(2*q),Q=new DataView(z.buffer,z.byteOffset,z.byteLength),ce=0;ce<q;ce++)Q.setUint16(2*ce,I[ce],!1);return z})(M):M,needSMask:!1}})(a);var v,y,g,_=i,E=_.colorSpace,A=_.colorsPerPixel,T=_.sMaskBitsPerComponent,C=_.colorBytes,N=_.alphaBytes,k=_.needSMask,j=_.palette,W=_.mask,G=null;return n!==Rt.API.image_compression.NONE&&typeof KO=="function"?(G=(function(D){var M;switch(D){case Rt.API.image_compression.FAST:M=11;break;case Rt.API.image_compression.MEDIUM:M=13;break;case Rt.API.image_compression.SLOW:M=14;break;default:M=12}return M})(n),v=this.decode.FLATE_DECODE,y="/Predictor ".concat(G," /Colors ").concat(A," /BitsPerComponent ").concat(f," /Columns ").concat(o),r=qN(C,Math.ceil(o*A*f/8),A,f,n),k&&(g=qN(N,Math.ceil(o*T/8),1,T,n))):(v=void 0,y=void 0,r=C,k&&(g=N)),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(g&&this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),{alias:t,data:r,index:e,filter:v,decodeParameters:y,transparency:W,palette:j,sMask:g,predictor:G,width:o,height:u,bitsPerComponent:f,sMaskBitsPerComponent:T,colorSpace:E}}},(function(r){r.processGIF89A=function(e,t,n,i){var a=new $oe(e),o=a.width,u=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var h={data:c,width:o,height:u},f=new ub(100).encode(h,100);return r.processJPEG.call(this,f,t,n,i)},r.processGIF87A=r.processGIF89A})(Rt.API),vo.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 r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:t,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},vo.prototype.parseBGR=function(){this.pos=this.offset;var r="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[r]()}catch(t){Yr.log("bit decode error:"+t)}},vo.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*i*4,u=0;u<8&&8*i+u<this.width;u++){var c=this.palette[a>>7-u&1];this.data[o+4*u]=c.blue,this.data[o+4*u+1]=c.green,this.data[o+4*u+2]=c.red,this.data[o+4*u+3]=255}t!==0&&(this.pos+=4-t)}},vo.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<r;i++){var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*i*4,u=a>>4,c=15&a,h=this.palette[u];if(this.data[o]=h.blue,this.data[o+1]=h.green,this.data[o+2]=h.red,this.data[o+3]=255,2*i+1>=this.width)break;h=this.palette[c],this.data[o+4]=h.blue,this.data[o+4+1]=h.green,this.data[o+4+2]=h.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},vo.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}r!==0&&(this.pos+=4-r)}},vo.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,u=(a>>5&e)/e*255|0,c=(a>>10&e)/e*255|0,h=a>>15?255:0,f=n*this.width*4+4*i;this.data[f]=c,this.data[f+1]=u,this.data[f+2]=o,this.data[f+3]=h}this.pos+=r}},vo.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(o&e)/e*255|0,c=(o>>5&t)/t*255|0,h=(o>>11)/e*255|0,f=i*this.width*4+4*a;this.data[f]=h,this.data[f+1]=c,this.data[f+2]=u,this.data[f+3]=255}this.pos+=r}},vo.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*t;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},vo.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=e*this.width*4+4*t;this.data[u]=a,this.data[u+1]=i,this.data[u+2]=n,this.data[u+3]=o}},vo.prototype.getData=function(){return this.data},(function(r){r.processBMP=function(e,t,n,i){var a=new vo(e,!1),o=a.width,u=a.height,c={data:a.getData(),width:o,height:u},h=new ub(100).encode(c,100);return r.processJPEG.call(this,h,t,n,i)}})(Rt.API),HN.prototype.getData=function(){return this.data},(function(r){r.processWEBP=function(e,t,n,i){var a=new HN(e),o=a.width,u=a.height,c={data:a.getData(),width:o,height:u},h=new ub(100).encode(c,100);return r.processJPEG.call(this,h,t,n,i)}})(Rt.API),Rt.API.processRGBA=function(r,e,t){for(var n=r.data,i=n.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),u=0,c=0,h=0;h<i;h+=4){var f=n[h],v=n[h+1],y=n[h+2],g=n[h+3];a[u++]=f,a[u++]=v,a[u++]=y,o[c++]=g}var _=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:_,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Rt.API.setLanguage=function(r){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"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,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},rf=Rt.API,Gm=rf.getCharWidthsArray=function(r,e){var t,n,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),u=e.widths?e.widths:i.metadata.Unicode.widths,c=u.fof?u.fof:1,h=e.kerning?e.kerning:i.metadata.Unicode.kerning,f=h.fof?h.fof:1,v=e.doKerning!==!1,y=0,g=r.length,_=0,E=u[0]||c,A=[];for(t=0;t<g;t++)n=r.charCodeAt(t),typeof i.metadata.widthOfString=="function"?A.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+o*(1e3/a)||0)/1e3):(y=v&&qr(h[n])==="object"&&!isNaN(parseInt(h[n][_],10))?h[n][_]/f:0,A.push((u[n]||E)/c+y)),_=n;return A},jN=rf.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return rf.processArabic&&(r=rf.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:Gm.apply(this,arguments).reduce(function(a,o){return a+o},0)},MN=function(r,e,t,n){for(var i=[],a=0,o=r.length,u=0;a!==o&&u+e[a]<t;)u+=e[a],a++;i.push(r.slice(0,a));var c=a;for(u=0;a!==o;)u+e[a]>n&&(i.push(r.slice(c,a)),u=0,c=a),u+=e[a],a++;return c!==a&&i.push(r.slice(c,a)),i},DN=function(r,e,t){t||(t={});var n,i,a,o,u,c,h,f=[],v=[f],y=t.textIndent||0,g=0,_=0,E=r.split(" "),A=Gm.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?E[0].length+2:t.lineIndent||0){var T=Array(c).join(" "),C=[];E.map(function(k){(k=k.split(/\s*\n/)).length>1?C=C.concat(k.map(function(j,W){return(W&&j.length?`
|
|
590
|
+
`:"")+j})):C.push(k[0])}),E=C,c=jN.apply(this,[T,t])}for(a=0,o=E.length;a<o;a++){var N=0;if(n=E[a],c&&n[0]==`
|
|
591
|
+
`&&(n=n.substr(1),N=1),y+g+(_=(i=Gm.apply(this,[n,t])).reduce(function(k,j){return k+j},0))>e||N){if(_>e){for(u=MN.apply(this,[n,i,e-(y+g),e]),f.push(u.shift()),f=[u.pop()];u.length;)v.push([u.shift()]);_=i.slice(n.length-(f[0]?f[0].length:0)).reduce(function(k,j){return k+j},0)}else f=[n];v.push(f),y=_+c,g=A}else f.push(n),y+=g+_,g=A}return h=c?function(k,j){return(j?T:"")+k.join(" ")}:function(k){return k.join(" ")},v.map(h)},rf.splitTextToSize=function(r,e,t){var n,i=(t=t||{}).fontSize||this.internal.getFontSize(),a=function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var v=this.internal.getFont(f.fontName,f.fontStyle),y="Unicode";return v.metadata[y]?{widths:v.metadata[y].widths||{0:1},kerning:v.metadata[y].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,t);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=t.lineIndent;var u,c,h=[];for(u=0,c=n.length;u<c;u++)h=h.concat(DN.apply(this,[n[u],o,a]));return h},(function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",n={},i={},a=0;a<16;a++)n[t[a]]=e[a],i[e[a]]=t[a];var o=function(y){return"0x"+parseInt(y,10).toString(16)},u=r.__fontmetrics__.compress=function(y){var g,_,E,A,T=["{"];for(var C in y){if(g=y[C],isNaN(parseInt(C,10))?_="'"+C+"'":(C=parseInt(C,10),_=(_=o(C).slice(2)).slice(0,-1)+i[_.slice(-1)]),typeof g=="number")g<0?(E=o(g).slice(3),A="-"):(E=o(g).slice(2),A=""),E=A+E.slice(0,-1)+i[E.slice(-1)];else{if(qr(g)!=="object")throw new Error("Don't know what to do with value type "+qr(g)+".");E=u(g)}T.push(_+E)}return T.push("}"),T.join("")},c=r.__fontmetrics__.uncompress=function(y){if(typeof y!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,_,E,A,T={},C=1,N=T,k=[],j="",W="",G=y.length-1,D=1;D<G;D+=1)(A=y[D])=="'"?g?(E=g.join(""),g=void 0):g=[]:g?g.push(A):A=="{"?(k.push([N,E]),N={},E=void 0):A=="}"?((_=k.pop())[0][_[1]]=N,E=void 0,N=_[0]):A=="-"?C=-1:E===void 0?n.hasOwnProperty(A)?(j+=n[A],E=parseInt(j,16)*C,C=1,j=""):j+=A:n.hasOwnProperty(A)?(W+=n[A],N[E]=parseInt(W,16)*C,C=1,E=void 0,W=""):W+=A;return T},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},v={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'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":c("{'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:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'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:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'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":c("{'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:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'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":c("{'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":c("{'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}}}")}};r.events.push(["addFont",function(y){var g=y.font,_=v.Unicode[g.postScriptName];_&&(g.metadata.Unicode={},g.metadata.Unicode.widths=_.widths,g.metadata.Unicode.kerning=_.kerning);var E=f.Unicode[g.postScriptName];E&&(g.metadata.Unicode.encoding=E,g.encoding=E.codePages[0])}])})(Rt.API),(function(r){var e=function(t){for(var n=t.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=t.charCodeAt(a);return i};r.API.events.push(["addFont",function(t){var n=void 0,i=t.font,a=t.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,u){u=/^\x00\x01\x00\x00/.test(u)?e(u):e(a1(u)),o.metadata=r.API.TTFFont.open(u),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])})(Rt),Rt.API.addSvgAsImage=function(r,e,t,n,i,a,o,u){if(isNaN(e)||isNaN(t))throw Yr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Yr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=n,c.height=i;var h=c.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,c.width,c.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return(Qt.canvg?Promise.resolve(Qt.canvg):n1(()=>import("./index.es-DQCQVjyb.js"),[])).catch(function(y){return Promise.reject(new Error("Could not load canvg: "+y))}).then(function(y){return y.default?y.default:y}).then(function(y){return y.fromString(h,r,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(y){return y.render(f)}).then(function(){v.addImage(c.toDataURL("image/jpeg",1),e,t,n,i,o,u)})},Rt.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,t);return this},Rt.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var n,i,a,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}},u=Object.keys(o),c=[],h=0,f=0,v=0;function y(_,E){var A,T=!1;for(A=0;A<_.length;A+=1)_[A]===E&&(T=!0);return T}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,r==="reset"||e===!0){var g=u.length;for(v=0;v<g;v+=1)t[u[v]].value=t[u[v]].defaultValue,t[u[v]].explicitSet=!1}if(qr(r)==="object"){for(i in r)if(a=r[i],y(u,i)&&a!==void 0){if(t[i].type==="boolean"&&typeof a=="boolean")t[i].value=a;else if(t[i].type==="name"&&y(t[i].valueSet,a))t[i].value=a;else if(t[i].type==="integer"&&Number.isInteger(a))t[i].value=a;else if(t[i].type==="array"){for(h=0;h<a.length;h+=1)if(n=!0,a[h].length===1&&typeof a[h][0]=="number")c.push(String(a[h]-1));else if(a[h].length>1){for(f=0;f<a[h].length;f+=1)typeof a[h][f]!="number"&&(n=!1);n===!0&&c.push([a[h][0]-1,a[h][1]-1].join(" "))}t[i].value="["+c.join(" ")+"]"}else t[i].value=t[i].defaultValue;t[i].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
|
|
592
|
+
<<
|
|
593
|
+
`+E.join(`
|
|
594
|
+
`)+`
|
|
595
|
+
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},Rt.API.addMetadata=function(r,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:r,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",Foe),this.internal.events.subscribe("postPutResources",Boe)),this},(function(r){var e=r.API,t=e.pdfEscape16=function(a,o){for(var u,c=o.metadata.Unicode.widths,h=["","0","00","000","0000"],f=[""],v=0,y=a.length;v<y;++v){if(u=o.metadata.characterToGlyph(a.charCodeAt(v)),o.metadata.glyIdsUsed.push(u),o.metadata.toUnicode[u]=a.charCodeAt(v),c.indexOf(u)==-1&&(c.push(u),c.push([parseInt(o.metadata.widthOfGlyph(u),10)])),u=="0")return f.join("");u=u.toString(16),f.push(h[4-u.length],u)}return f.join("")},n=function(a){var o,u,c,h,f,v,y;for(f=`/CIDInit /ProcSet findresource begin
|
|
596
|
+
12 dict begin
|
|
597
|
+
begincmap
|
|
598
|
+
/CIDSystemInfo <<
|
|
599
|
+
/Registry (Adobe)
|
|
600
|
+
/Ordering (UCS)
|
|
601
|
+
/Supplement 0
|
|
602
|
+
>> def
|
|
603
|
+
/CMapName /Adobe-Identity-UCS def
|
|
604
|
+
/CMapType 2 def
|
|
605
|
+
1 begincodespacerange
|
|
606
|
+
<0000><ffff>
|
|
607
|
+
endcodespacerange`,c=[],v=0,y=(u=Object.keys(a).sort(function(g,_){return g-_})).length;v<y;v++)o=u[v],c.length>=100&&(f+=`
|
|
608
|
+
`+c.length+` beginbfchar
|
|
609
|
+
`+c.join(`
|
|
610
|
+
`)+`
|
|
611
|
+
endbfchar`,c=[]),a[o]!==void 0&&a[o]!==null&&typeof a[o].toString=="function"&&(h=("0000"+a[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),c.push("<"+o+"><"+h+">"));return c.length&&(f+=`
|
|
612
|
+
`+c.length+` beginbfchar
|
|
613
|
+
`+c.join(`
|
|
614
|
+
`)+`
|
|
615
|
+
endbfchar
|
|
616
|
+
`),f+`endcmap
|
|
617
|
+
CMapName currentdict /CMap defineresource pop
|
|
618
|
+
end
|
|
619
|
+
end`};e.events.push(["putFont",function(a){(function(o){var u=o.font,c=o.out,h=o.newObject,f=o.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="Identity-H"){for(var v=u.metadata.Unicode.widths,y=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),g="",_=0;_<y.length;_++)g+=String.fromCharCode(y[_]);var E=h();f({data:g,addLength1:!0,objectId:E}),c("endobj");var A=h();f({data:n(u.metadata.toUnicode),addLength1:!0,objectId:A}),c("endobj");var T=h();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+lf(u.fontName)),c("/FontFile2 "+E+" 0 R"),c("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),c("/Flags "+u.metadata.flags),c("/StemV "+u.metadata.stemV),c("/ItalicAngle "+u.metadata.italicAngle),c("/Ascent "+u.metadata.ascender),c("/Descent "+u.metadata.decender),c("/CapHeight "+u.metadata.capHeight),c(">>"),c("endobj");var C=h();c("<<"),c("/Type /Font"),c("/BaseFont /"+lf(u.fontName)),c("/FontDescriptor "+T+" 0 R"),c("/W "+r.API.PDFObject.convert(v)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+u.encoding+")"),c(">>"),c(">>"),c("endobj"),u.objectNumber=h(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+A+" 0 R"),c("/BaseFont /"+lf(u.fontName)),c("/Encoding /"+u.encoding),c("/DescendantFonts ["+C+" 0 R]"),c(">>"),c("endobj"),u.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(o){var u=o.font,c=o.out,h=o.newObject,f=o.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var v=u.metadata.rawData,y="",g=0;g<v.length;g++)y+=String.fromCharCode(v[g]);var _=h();f({data:y,addLength1:!0,objectId:_}),c("endobj");var E=h();f({data:n(u.metadata.toUnicode),addLength1:!0,objectId:E}),c("endobj");var A=h();c("<<"),c("/Descent "+u.metadata.decender),c("/CapHeight "+u.metadata.capHeight),c("/StemV "+u.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+_+" 0 R"),c("/Flags 96"),c("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),c("/FontName /"+lf(u.fontName)),c("/ItalicAngle "+u.metadata.italicAngle),c("/Ascent "+u.metadata.ascender),c(">>"),c("endobj"),u.objectNumber=h();for(var T=0;T<u.metadata.hmtx.widths.length;T++)u.metadata.hmtx.widths[T]=parseInt(u.metadata.hmtx.widths[T]*(1e3/u.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+E+" 0 R/BaseFont/"+lf(u.fontName)+"/FontDescriptor "+A+" 0 R/Encoding/"+u.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(u.metadata.hmtx.widths)+">>"),c("endobj"),u.isAlreadyPutted=!0}})(a)}]);var i=function(a){var o,u=a.text||"",c=a.x,h=a.y,f=a.options||{},v=a.mutex||{},y=v.pdfEscape,g=v.activeFontKey,_=v.fonts,E=g,A="",T=0,C="",N=_[E].encoding;if(_[E].encoding!=="Identity-H")return{text:u,x:c,y:h,options:f,mutex:v};for(C=u,E=g,Array.isArray(u)&&(C=u[0]),T=0;T<C.length;T+=1)_[E].metadata.hasOwnProperty("cmap")&&(o=_[E].metadata.cmap.unicode.codeMap[C[T].charCodeAt(0)]),o||C[T].charCodeAt(0)<256&&_[E].metadata.hasOwnProperty("Unicode")?A+=C[T]:A+="";var k="";return parseInt(E.slice(1))<14||N==="WinAnsiEncoding"?k=y(A,E).split("").map(function(j){return j.charCodeAt(0).toString(16)}).join(""):N==="Identity-H"&&(k=t(A,_[E])),v.isHex=!0,{text:k,x:c,y:h,options:f,mutex:v}};e.events.push(["postProcessText",function(a){var o=a.text||"",u=[],c={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var h=0;for(h=0;h<o.length;h+=1)Array.isArray(o[h])&&o[h].length===3?u.push([i(Object.assign({},c,{text:o[h][0]})).text,o[h][1],o[h][2]]):u.push(i(Object.assign({},c,{text:o[h]})).text);a.text=u}else a.text=i(Object.assign({},c,{text:o})).text}])})(Rt),(function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,n){return e.call(this),this.internal.vFS[t]=n,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}})(Rt.API),(function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var i,a,o,u,c,h,f,v=e,y=[[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]],g=[[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},A=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],T=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)$/),C=!1,N=0;this.__bidiEngine__={};var k=function(I){var q=I.charCodeAt(),z=q>>8,Q=E[z];return Q!==void 0?v[256*Q+(255&q)]:z===252||z===253?"AL":T.test(z)?"L":z===8?"R":"N"},j=function(I){for(var q,z=0;z<I.length;z++){if((q=k(I.charAt(z)))==="L")return!1;if(q==="R")return!0}return!1},W=function(I,q,z,Q){var ce,re,J,le,ye=q[Q];switch(ye){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":C=!1;break;case"N":case"AN":break;case"EN":C&&(ye="AN");break;case"AL":C=!0,ye="R";break;case"WS":case"BN":ye="N";break;case"CS":Q<1||Q+1>=q.length||(ce=z[Q-1])!=="EN"&&ce!=="AN"||(re=q[Q+1])!=="EN"&&re!=="AN"?ye="N":C&&(re="AN"),ye=re===ce?re:"N";break;case"ES":ye=(ce=Q>0?z[Q-1]:"B")==="EN"&&Q+1<q.length&&q[Q+1]==="EN"?"EN":"N";break;case"ET":if(Q>0&&z[Q-1]==="EN"){ye="EN";break}if(C){ye="N";break}for(J=Q+1,le=q.length;J<le&&q[J]==="ET";)J++;ye=J<le&&q[J]==="EN"?"EN":"N";break;case"NSM":if(o&&!u){for(le=q.length,J=Q+1;J<le&&q[J]==="NSM";)J++;if(J<le){var Z=I[Q],oe=Z>=1425&&Z<=2303||Z===64286;if(ce=q[J],oe&&(ce==="R"||ce==="AL")){ye="R";break}}}ye=Q<1||(ce=q[Q-1])==="B"?"N":z[Q-1];break;case"B":C=!1,i=!0,ye=N;break;case"S":a=!0,ye="N"}return ye},G=function(I,q,z){var Q=I.split("");return z&&D(Q,z,{hiLevel:N}),Q.reverse(),q&&q.reverse(),Q.join("")},D=function(I,q,z){var Q,ce,re,J,le,ye=-1,Z=I.length,oe=0,L=[],Y=N?g:y,te=[];for(C=!1,i=!1,a=!1,ce=0;ce<Z;ce++)te[ce]=k(I[ce]);for(re=0;re<Z;re++){if(le=oe,L[re]=W(I,te,L,re),Q=240&(oe=Y[le][_[L[re]]]),oe&=15,q[re]=J=Y[oe][5],Q>0)if(Q===16){for(ce=ye;ce<re;ce++)q[ce]=1;ye=-1}else ye=-1;if(Y[oe][6])ye===-1&&(ye=re);else if(ye>-1){for(ce=ye;ce<re;ce++)q[ce]=J;ye=-1}te[re]==="B"&&(q[re]=0),z.hiLevel|=J}a&&(function(de,ue,we){for(var Se=0;Se<we;Se++)if(de[Se]==="S"){ue[Se]=N;for(var Ie=Se-1;Ie>=0&&de[Ie]==="WS";Ie--)ue[Ie]=N}})(te,q,Z)},M=function(I,q,z,Q,ce){if(!(ce.hiLevel<I)){if(I===1&&N===1&&!i)return q.reverse(),void(z&&z.reverse());for(var re,J,le,ye,Z=q.length,oe=0;oe<Z;){if(Q[oe]>=I){for(le=oe+1;le<Z&&Q[le]>=I;)le++;for(ye=oe,J=le-1;ye<J;ye++,J--)re=q[ye],q[ye]=q[J],q[J]=re,z&&(re=z[ye],z[ye]=z[J],z[J]=re);oe=le}oe++}}},U=function(I,q,z){var Q=I.split(""),ce={hiLevel:N};return z||(z=[]),D(Q,z,ce),(function(re,J,le){if(le.hiLevel!==0&&f)for(var ye,Z=0;Z<re.length;Z++)J[Z]===1&&(ye=A.indexOf(re[Z]))>=0&&(re[Z]=A[ye+1])})(Q,z,ce),M(2,Q,q,z,ce),M(1,Q,q,z,ce),Q.join("")};return this.__bidiEngine__.doBidiReorder=function(I,q,z){if((function(ce,re){if(re)for(var J=0;J<ce.length;J++)re[J]=J;u===void 0&&(u=j(ce)),h===void 0&&(h=j(ce))})(I,q),o||!c||h)if(o&&c&&u^h)N=u?1:0,I=G(I,q,z);else if(!o&&c&&h)N=u?1:0,I=U(I,q,z),I=G(I,q);else if(!o||u||c||h){if(o&&!c&&u^h)I=G(I,q),u?(N=0,I=U(I,q,z)):(N=1,I=U(I,q,z),I=G(I,q));else if(o&&u&&!c&&h)N=1,I=U(I,q,z),I=G(I,q);else if(!o&&!c&&u^h){var Q=f;u?(N=1,I=U(I,q,z),N=0,f=!1,I=U(I,q,z),f=Q):(N=0,I=U(I,q,z),I=G(I,q),N=1,f=!1,I=U(I,q,z),f=Q,I=G(I,q))}}else N=0,I=U(I,q,z);else N=u?1:0,I=U(I,q,z);return I},this.__bidiEngine__.setOptions=function(I){I&&(o=I.isInputVisual,c=I.isOutputVisual,u=I.isInputRtl,h=I.isOutputRtl,f=I.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var e=["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 r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var i=n.text;n.x,n.y;var a=n.options||{};n.mutex,a.lang;var o=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,t.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var u=0;for(o=[],u=0;u<i.length;u+=1)Object.prototype.toString.call(i[u])==="[object Array]"?o.push([t.doBidiReorder(i[u][0]),i[u][1],i[u][2]]):o.push([t.doBidiReorder(i[u])]);n.text=o}else n.text=t.doBidiReorder(i);t.setOptions({isInputVisual:!0})}])})(Rt),Rt.API.TTFFont=(function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Cc(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new rle(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new zoe(this.contents),this.head=new Hoe(this),this.name=new Koe(this),this.cmap=new tK(this),this.toUnicode={},this.hhea=new Woe(this),this.maxp=new Xoe(this),this.hmtx=new Qoe(this),this.post=new Voe(this),this.os2=new Goe(this),this.loca=new tle(this),this.glyf=new Zoe(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]},r.prototype.registerTTF=function(){var e,t,n,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var o,u,c,h;for(h=[],o=0,u=(c=this.bbox).length;o<u;o++)e=c[o],h.push(Math.round(e*this.scaleFactor));return h}.call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),32768&(t=i>>16)&&(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=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===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")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,n){var i,a,o,u;for(o=0,a=0,u=(e=""+e).length;0<=u?a<u:a>u;a=0<=u?++a:--a)i=e.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/t)||0;return o*(t/1e3)},r.prototype.lineHeight=function(e,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},r})();var To,Cc=(function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(e){var t,n,i;for(i=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)i.push(this.writeByte(e.charCodeAt(t)));return i},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,n,i,a,o,u,c;return e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),u=this.readByte(),c=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^a)+65536*(255^o)+256*(255^u)+(255^c)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*i+16777216*a+65536*o+256*u+c},r.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,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)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},r.prototype.write=function(e){var t,n,i,a;for(a=[],n=0,i=e.length;n<i;n++)t=e[n],a.push(this.writeByte(t));return a},r})(),zoe=(function(){var r;function e(t){var n,i,a;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return e.prototype.encode=function(t){var n,i,a,o,u,c,h,f,v,y,g,_,E;for(E in g=Object.keys(t).length,c=Math.log(2),v=16*Math.floor(Math.log(g)/c),o=Math.floor(v/c),f=16*g-v,(i=new Cc).writeInt(this.scalarType),i.writeShort(g),i.writeShort(v),i.writeShort(o),i.writeShort(f),a=16*g,h=i.pos+a,u=null,_=[],t)for(y=t[E],i.writeString(E),i.writeInt(r(y)),i.writeInt(h),i.writeInt(y.length),_=_.concat(y),E==="head"&&(u=h),h+=y.length;h%4;)_.push(0),h++;return i.write(_),n=2981146554-r(i.data),i.pos=u+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=rK.call(t);t.length%4;)t.push(0);for(a=new Cc(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e})(),Uoe={}.hasOwnProperty,pl=function(r,e){for(var t in e)Uoe.call(e,t)&&(r[t]=e[t]);function n(){this.constructor=r}return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r};To=(function(){function r(e){var t;this.file=e,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 r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r})();var Hoe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="head",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},r.prototype.encode=function(e){var t;return(t=new Cc).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},r})(),WN=(function(){function r(e,t){var n,i,a,o,u,c,h,f,v,y,g,_,E,A,T,C,N;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),v=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.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(c=0;c<256;++c)this.codeMap[c]=e.readByte();break;case 4:for(g=e.readUInt16(),y=g/2,e.pos+=6,a=(function(){var k,j;for(j=[],c=k=0;0<=y?k<y:k>y;c=0<=y?++k:--k)j.push(e.readUInt16());return j})(),e.pos+=2,E=(function(){var k,j;for(j=[],c=k=0;0<=y?k<y:k>y;c=0<=y?++k:--k)j.push(e.readUInt16());return j})(),h=(function(){var k,j;for(j=[],c=k=0;0<=y?k<y:k>y;c=0<=y?++k:--k)j.push(e.readUInt16());return j})(),f=(function(){var k,j;for(j=[],c=k=0;0<=y?k<y:k>y;c=0<=y?++k:--k)j.push(e.readUInt16());return j})(),i=(this.length-e.pos+this.offset)/2,u=(function(){var k,j;for(j=[],c=k=0;0<=i?k<i:k>i;c=0<=i?++k:--k)j.push(e.readUInt16());return j})(),c=T=0,N=a.length;T<N;c=++T)for(A=a[c],n=C=_=E[c];_<=A?C<=A:C>=A;n=_<=A?++C:--C)f[c]===0?o=n+h[c]:(o=u[f[c]/2+(n-_)-(y-c)]||0)!==0&&(o+=h[c]),this.codeMap[n]=65535&o}e.pos=v}return r.encode=function(e,t){var n,i,a,o,u,c,h,f,v,y,g,_,E,A,T,C,N,k,j,W,G,D,M,U,I,q,z,Q,ce,re,J,le,ye,Z,oe,L,Y,te,de,ue,we,Se,Ie,Le,Ve,tt;switch(Q=new Cc,o=Object.keys(e).sort(function(Xe,dt){return Xe-dt}),t){case"macroman":for(E=0,A=(function(){var Xe=[];for(_=0;_<256;++_)Xe.push(0);return Xe})(),C={0:0},a={},ce=0,ye=o.length;ce<ye;ce++)C[Ie=e[i=o[ce]]]==null&&(C[Ie]=++E),a[i]={old:e[i],new:C[e[i]]},A[i]=C[e[i]];return Q.writeUInt16(1),Q.writeUInt16(0),Q.writeUInt32(12),Q.writeUInt16(0),Q.writeUInt16(262),Q.writeUInt16(0),Q.write(A),{charMap:a,subtable:Q.data,maxGlyphID:E+1};case"unicode":for(q=[],v=[],N=0,C={},n={},T=h=null,re=0,Z=o.length;re<Z;re++)C[j=e[i=o[re]]]==null&&(C[j]=++N),n[i]={old:j,new:C[j]},u=C[j]-i,T!=null&&u===h||(T&&v.push(T),q.push(i),h=u),T=i;for(T&&v.push(T),v.push(65535),q.push(65535),U=2*(M=q.length),D=2*Math.pow(Math.log(M)/Math.LN2,2),y=Math.log(D/2)/Math.LN2,G=2*M-D,c=[],W=[],g=[],_=J=0,oe=q.length;J<oe;_=++J){if(I=q[_],f=v[_],I===65535){c.push(0),W.push(0);break}if(I-(z=n[I].new)>=32768)for(c.push(0),W.push(2*(g.length+M-_)),i=le=I;I<=f?le<=f:le>=f;i=I<=f?++le:--le)g.push(n[i].new);else c.push(z-I),W.push(0)}for(Q.writeUInt16(3),Q.writeUInt16(1),Q.writeUInt32(12),Q.writeUInt16(4),Q.writeUInt16(16+8*M+2*g.length),Q.writeUInt16(0),Q.writeUInt16(U),Q.writeUInt16(D),Q.writeUInt16(y),Q.writeUInt16(G),we=0,L=v.length;we<L;we++)i=v[we],Q.writeUInt16(i);for(Q.writeUInt16(0),Se=0,Y=q.length;Se<Y;Se++)i=q[Se],Q.writeUInt16(i);for(Le=0,te=c.length;Le<te;Le++)u=c[Le],Q.writeUInt16(u);for(Ve=0,de=W.length;Ve<de;Ve++)k=W[Ve],Q.writeUInt16(k);for(tt=0,ue=g.length;tt<ue;tt++)E=g[tt],Q.writeUInt16(E);return{charMap:n,subtable:Q.data,maxGlyphID:N+1}}},r})(),tK=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="cmap",r.prototype.parse=function(e){var t,n,i;for(e.pos=this.offset,this.version=e.readUInt16(),i=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=i?n<i:n>i;n=0<=i?++n:--n)t=new WN(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},r.encode=function(e,t){var n,i;return t==null&&(t="macroman"),n=WN.encode(e,t),(i=new Cc).writeUInt16(0),i.writeUInt16(1),n.table=i.data.concat(n.subtable),n},r})(),Woe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="hhea",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},r})(),Goe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="OS/2",r.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n})(),this.charRange=(function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},r})(),Voe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="post",r.prototype.parse=function(e){var t,n,i;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(n=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],i=[];e.pos<this.offset+this.length;)t=e.readByte(),i.push(this.names.push(e.readString(t)));return i;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=function(){var o,u,c;for(c=[],a=o=0,u=this.file.maxp.numGlyphs;0<=u?o<u:o>u;a=0<=u?++o:--o)c.push(e.readUInt32());return c}.call(this)}},r})(),Yoe=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},Koe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="name",r.prototype.parse=function(e){var t,n,i,a,o,u,c,h,f,v,y;for(e.pos=this.offset,e.readShort(),t=e.readShort(),u=e.readShort(),n=[],a=0;0<=t?a<t:a>t;a=0<=t?++a:--a)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+u+e.readShort()});for(c={},a=f=0,v=n.length;f<v;a=++f)i=n[a],e.pos=i.offset,h=e.readString(i.length),o=new Yoe(h,i),c[y=i.nameID]==null&&(c[y]=[]),c[i.nameID].push(o);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})(),Xoe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="maxp",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},r})(),Qoe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="hmtx",r.prototype.parse=function(e){var t,n,i,a,o,u,c;for(e.pos=this.offset,this.metrics=[],t=0,u=this.file.hhea.numberOfMetrics;0<=u?t<u:t>u;t=0<=u?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var h,f;for(f=[],t=h=0;0<=i?h<i:h>i;t=0<=i?++h:--h)f.push(e.readInt16());return f})(),this.widths=function(){var h,f,v,y;for(y=[],h=0,f=(v=this.metrics).length;h<f;h++)a=v[h],y.push(a.advance);return y}.call(this),n=this.widths[this.widths.length-1],c=[],t=o=0;0<=i?o<i:o>i;t=0<=i?++o:--o)c.push(this.widths.push(n));return c},r.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},r})(),rK=[].slice,Zoe=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(e){var t,n,i,a,o,u,c,h,f,v;return e in this.cache?this.cache[e]:(a=this.file.loca,t=this.file.contents,n=a.indexOf(e),(i=a.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+n,o=(u=new Cc(t.read(i))).readShort(),h=u.readShort(),v=u.readShort(),c=u.readShort(),f=u.readShort(),this.cache[e]=o===-1?new ele(u,h,v,c,f):new Joe(u,o,h,v,c,f),this.cache[e]))},r.prototype.encode=function(e,t,n){var i,a,o,u,c;for(o=[],a=[],u=0,c=t.length;u<c;u++)i=e[t[u]],a.push(o.length),i&&(o=o.concat(i.encode(n)));return a.push(o.length),{table:o,offsets:a}},r})(),Joe=(function(){function r(e,t,n,i,a,o){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r})(),ele=(function(){function r(e,t,n,i,a){var o,u;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;u=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&u;)o.pos+=1&u?4:2,128&u?o.pos+=8:64&u?o.pos+=4:8&u&&(o.pos+=2)}return r.prototype.encode=function(){var e,t,n;for(t=new Cc(rK.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r})(),tle=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pl(r,To),r.prototype.tag="loca",r.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?function(){var i,a;for(a=[],n=0,i=this.length;n<i;n+=2)a.push(2*e.readUInt16());return a}.call(this):function(){var i,a;for(a=[],n=0,i=this.length;n<i;n+=4)a.push(e.readUInt32());return a}.call(this)},r.prototype.indexOf=function(e){return this.offsets[e]},r.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},r.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),i=0,a=0,o=0;o<n.length;++o)if(n[o]=i,a<t.length&&t[a]==o){++a,n[o]=i;var u=this.offsets[o],c=this.offsets[o+1]-u;c>0&&(i+=c)}for(var h=new Array(4*n.length),f=0;f<n.length;++f)h[4*f+3]=255&n[f],h[4*f+2]=(65280&n[f])>>8,h[4*f+1]=(16711680&n[f])>>16,h[4*f]=(4278190080&n[f])>>24;return h},r})(),rle=(function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,n,i,a;for(t in i=this.font.cmap.tables[0].codeMap,e={},a=this.subset)n=a[t],e[t]=i[n];return e},r.prototype.glyphsFor=function(e){var t,n,i,a,o,u,c;for(i={},o=0,u=e.length;o<u;o++)i[a=e[o]]=this.font.glyf.glyphFor(a);for(a in t=[],i)(n=i[a])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(a in c=this.glyphsFor(t))n=c[a],i[a]=n;return i},r.prototype.encode=function(e,t){var n,i,a,o,u,c,h,f,v,y,g,_,E,A,T;for(i in n=tK.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),g={0:0},T=n.charMap)g[(c=T[i]).old]=c.new;for(_ in y=n.maxGlyphID,o)_ in g||(g[_]=y++);return f=(function(C){var N,k;for(N in k={},C)k[C[N]]=N;return k})(g),v=Object.keys(f).sort(function(C,N){return C-N}),E=(function(){var C,N,k;for(k=[],C=0,N=v.length;C<N;C++)u=v[C],k.push(f[u]);return k})(),a=this.font.glyf.encode(o,E,g),h=this.font.loca.encode(a.offsets,E),A={cmap:this.font.cmap.raw(),glyf:a.table,loca:h,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&&(A["OS/2"]=this.font.os2.raw()),this.font.directory.encode(A)},r})();Rt.API.PDFObject=(function(){var r;function e(){}return r=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},e.convert=function(t){var n,i,a,o;if(Array.isArray(t))return"["+(function(){var u,c,h;for(h=[],u=0,c=t.length;u<c;u++)n=t[u],h.push(e.convert(n));return h})().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t?.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(i in a=["<<"],t)o=t[i],a.push("/"+i+" "+e.convert(o));return a.push(">>"),a.join(`
|
|
620
|
+
`)}return""+t},e})();function nle({session:r}){const e=()=>{const t=new Rt,n=t.internal.pageSize.getWidth(),i=20,a=n-2*i;let o=20;const u=(v,y=10,g=!1)=>{t.setFontSize(y),g?t.setFont("helvetica","bold"):t.setFont("helvetica","normal"),t.splitTextToSize(v,a).forEach(E=>{o>270&&(t.addPage(),o=20),t.text(E,i,o),o+=y*.5}),o+=2},c=(v,y)=>{y.length!==0&&(o+=3,u(v,12,!0),o+=2,y.forEach(g=>{u(`• ${g}`,10,!1)}))},h=v=>{if(!v)return[];if(Array.isArray(v))return v;try{return JSON.parse(v)}catch{return[]}};u(r.summary_title||"Session Summary",16,!0),o+=2,u(`Date: ${iu(new Date(r.started_at*1e3),"PPpp")}`,9,!1),u(`Status: ${r.summary_status||r.status}`,9,!1),r.summary_mood&&u(`Mood: ${r.summary_mood}`,9,!1),r.summary_complexity&&u(`Complexity: ${r.summary_complexity}`,9,!1),r.summary_key_insight&&(o+=2,u(`💡 ${r.summary_key_insight}`,10,!0)),c("What We Did",h(r.summary_what_we_did)),c("Decisions Made",h(r.summary_decisions)),c("Blockers",h(r.summary_blockers)),c("Resolved",h(r.summary_resolved)),c("Files Changed",h(r.summary_files_changed)),c("Next Steps",h(r.summary_next_steps)),c("Gotchas / Remember",h(r.summary_gotchas)),c("Tech Notes",h(r.summary_tech_notes)),o+=5,t.setFontSize(8),t.setTextColor(128,128,128),t.text(`Generated by ClaudeContext on ${iu(new Date,"PPpp")}`,i,o);const f=`session-${r.id.slice(0,8)}-${iu(new Date(r.started_at*1e3),"yyyy-MM-dd")}.pdf`;t.save(f)};return w.jsxs("button",{onClick:e,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:t=>t.currentTarget.style.background="var(--surface)",onMouseLeave:t=>t.currentTarget.style.background="var(--surface2)",children:[w.jsx(F1,{size:16}),"PDF"]})}function ile({sessionId:r}){const[e,t]=he.useState(!1),n=async()=>{const i=`${window.location.origin}/session/${r}`;try{await navigator.clipboard.writeText(i),t(!0),at.success("Link copied to clipboard"),setTimeout(()=>t(!1),2e3)}catch{at.error("Failed to copy link")}};return w.jsxs("button",{onClick:n,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:e?"var(--green)15":"var(--surface2)",color:e?"var(--green)":"var(--text)",border:"1px solid",borderColor:e?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:i=>{e||(i.currentTarget.style.background="var(--surface)")},onMouseLeave:i=>{e||(i.currentTarget.style.background="var(--surface2)")},children:[e?w.jsx(HV,{size:16}):w.jsx(Nre,{size:16}),e?"Copied!":"Copy Link"]})}function ale({sessionId:r,initialNotes:e="",isOpen:t,onClose:n}){const[i,a]=he.useState(e),[o,u]=he.useState(!1),c=Qv(),h=bv({mutationFn:()=>Or.updateSessionNotes(r,i),onSuccess:()=>{c.invalidateQueries({queryKey:["session",r]}),at.success("Notes saved"),n()},onError:v=>at.error("Failed to save notes: "+v)}),f=async()=>{u(!0),await h.mutateAsync(),u(!1)};return t?w.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:n,children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:600,width:"90%",maxHeight:"80vh",display:"flex",flexDirection:"column",animation:"scaleIn 0.2s"},onClick:v=>v.stopPropagation(),children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[w.jsx(Ms,{size:20,color:"var(--accent)"}),w.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Session Notes"})]}),w.jsx("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:v=>v.currentTarget.style.background="var(--surface2)",onMouseLeave:v=>v.currentTarget.style.background="none",children:w.jsx(ds,{size:20})})]}),w.jsx("textarea",{value:i,onChange:v=>a(v.target.value),placeholder:"Add notes about this session...",style:{flex:1,padding:12,background:"var(--bg)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,color:"var(--text)",fontFamily:"inherit",resize:"none",marginBottom:16,minHeight:200},autoFocus:!0}),w.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[w.jsx("button",{onClick:n,style:{padding:"8px 16px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:v=>v.currentTarget.style.background="var(--surface)",onMouseLeave:v=>v.currentTarget.style.background="var(--surface2)",children:"Cancel"}),w.jsx("button",{onClick:f,disabled:o,style:{padding:"8px 16px",background:o?"var(--surface)":"var(--accent)",border:"none",borderRadius:8,fontSize:14,fontWeight:600,cursor:o?"not-allowed":"pointer",color:"white",transition:"all 0.15s"},onMouseEnter:v=>{o||(v.currentTarget.style.background="var(--accent-hover)")},onMouseLeave:v=>{o||(v.currentTarget.style.background="var(--accent)")},children:o?"Saving...":"Save Notes"})]})]})}):null}/**
|
|
621
|
+
* vis-data
|
|
622
|
+
* http://visjs.org/
|
|
623
|
+
*
|
|
624
|
+
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
|
625
|
+
*
|
|
626
|
+
* @version 8.0.3
|
|
627
|
+
* @date 2025-09-10T16:22:00.613Z
|
|
628
|
+
*
|
|
629
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
630
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
631
|
+
*
|
|
632
|
+
* @license
|
|
633
|
+
* vis.js is dual licensed under both
|
|
634
|
+
*
|
|
635
|
+
* 1. The Apache 2.0 License
|
|
636
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
637
|
+
*
|
|
638
|
+
* and
|
|
639
|
+
*
|
|
640
|
+
* 2. The MIT License
|
|
641
|
+
* http://opensource.org/licenses/MIT
|
|
642
|
+
*
|
|
643
|
+
* vis.js may be distributed under either license.
|
|
644
|
+
*/var GN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var cb={exports:{}},VN={},cv,YN;function ti(){if(YN)return cv;YN=1;var r=function(e){return e&&e.Math===Math&&e};return cv=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof GN=="object"&&GN)||r(typeof cv=="object"&&cv)||(function(){return this})()||Function("return this")(),cv}var db,KN;function $r(){return KN||(KN=1,db=function(r){try{return!!r()}catch{return!0}}),db}var hb,XN;function ng(){if(XN)return hb;XN=1;var r=$r();return hb=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),hb}var fb,QN;function H1(){if(QN)return fb;QN=1;var r=ng(),e=Function.prototype,t=e.apply,n=e.call;return fb=typeof Reflect=="object"&&Reflect.apply||(r?n.bind(t):function(){return n.apply(t,arguments)}),fb}var pb,ZN;function Xr(){if(ZN)return pb;ZN=1;var r=ng(),e=Function.prototype,t=e.call,n=r&&e.bind.bind(t,t);return pb=r?n:function(i){return function(){return t.apply(i,arguments)}},pb}var vb,JN;function vu(){if(JN)return vb;JN=1;var r=Xr(),e=r({}.toString),t=r("".slice);return vb=function(n){return t(e(n),8,-1)},vb}var gb,e8;function nK(){if(e8)return gb;e8=1;var r=vu(),e=Xr();return gb=function(t){if(r(t)==="Function")return e(t)},gb}var mb,t8;function Ci(){if(t8)return mb;t8=1;var r=typeof document=="object"&&document.all;return mb=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},mb}var yb={},bb,r8;function ri(){if(r8)return bb;r8=1;var r=$r();return bb=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),bb}var wb,n8;function Ba(){if(n8)return wb;n8=1;var r=ng(),e=Function.prototype.call;return wb=r?e.bind(e):function(){return e.apply(e,arguments)},wb}var xb={},i8;function W6(){if(i8)return xb;i8=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return xb.f=t?function(i){var a=e(this,i);return!!a&&a.enumerable}:r,xb}var _b,a8;function ig(){return a8||(a8=1,_b=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),_b}var Sb,s8;function W1(){if(s8)return Sb;s8=1;var r=Xr(),e=$r(),t=vu(),n=Object,i=r("".split);return Sb=e(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,Sb}var Eb,o8;function ag(){return o8||(o8=1,Eb=function(r){return r==null}),Eb}var Tb,l8;function Ud(){if(l8)return Tb;l8=1;var r=ag(),e=TypeError;return Tb=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Tb}var Ob,u8;function vl(){if(u8)return Ob;u8=1;var r=W1(),e=Ud();return Ob=function(t){return r(e(t))},Ob}var Ab,c8;function xa(){if(c8)return Ab;c8=1;var r=Ci();return Ab=function(e){return typeof e=="object"?e!==null:r(e)},Ab}var Rb,d8;function fi(){return d8||(d8=1,Rb={}),Rb}var Cb,h8;function hs(){if(h8)return Cb;h8=1;var r=fi(),e=ti(),t=Ci(),n=function(i){return t(i)?i:void 0};return Cb=function(i,a){return arguments.length<2?n(r[i])||n(e[i]):r[i]&&r[i][a]||e[i]&&e[i][a]},Cb}var kb,f8;function ki(){if(f8)return kb;f8=1;var r=Xr();return kb=r({}.isPrototypeOf),kb}var Nb,p8;function zf(){if(p8)return Nb;p8=1;var r=ti(),e=r.navigator,t=e&&e.userAgent;return Nb=t?String(t):"",Nb}var Ib,v8;function sg(){if(v8)return Ib;v8=1;var r=ti(),e=zf(),t=r.process,n=r.Deno,i=t&&t.versions||n&&n.version,a=i&&i.v8,o,u;return a&&(o=a.split("."),u=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!u&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(u=+o[1]))),Ib=u,Ib}var Pb,g8;function Uf(){if(g8)return Pb;g8=1;var r=sg(),e=$r(),t=ti(),n=t.String;return Pb=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&r&&r<41}),Pb}var jb,m8;function iK(){if(m8)return jb;m8=1;var r=Uf();return jb=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",jb}var Mb,y8;function og(){if(y8)return Mb;y8=1;var r=hs(),e=Ci(),t=ki(),n=iK(),i=Object;return Mb=n?function(a){return typeof a=="symbol"}:function(a){var o=r("Symbol");return e(o)&&t(o.prototype,i(a))},Mb}var Db,b8;function Hf(){if(b8)return Db;b8=1;var r=String;return Db=function(e){try{return r(e)}catch{return"Object"}},Db}var qb,w8;function gu(){if(w8)return qb;w8=1;var r=Ci(),e=Hf(),t=TypeError;return qb=function(n){if(r(n))return n;throw new t(e(n)+" is not a function")},qb}var Lb,x8;function G6(){if(x8)return Lb;x8=1;var r=gu(),e=ag();return Lb=function(t,n){var i=t[n];return e(i)?void 0:r(i)},Lb}var $b,_8;function sle(){if(_8)return $b;_8=1;var r=Ba(),e=Ci(),t=xa(),n=TypeError;return $b=function(i,a){var o,u;if(a==="string"&&e(o=i.toString)&&!t(u=r(o,i))||e(o=i.valueOf)&&!t(u=r(o,i))||a!=="string"&&e(o=i.toString)&&!t(u=r(o,i)))return u;throw new n("Can't convert object to primitive value")},$b}var Bb={exports:{}},Fb,S8;function Wf(){return S8||(S8=1,Fb=!0),Fb}var zb,E8;function ole(){if(E8)return zb;E8=1;var r=ti(),e=Object.defineProperty;return zb=function(t,n){try{e(r,t,{value:n,configurable:!0,writable:!0})}catch{r[t]=n}return n},zb}var T8;function V6(){if(T8)return Bb.exports;T8=1;var r=Wf(),e=ti(),t=ole(),n="__core-js_shared__",i=Bb.exports=e[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Bb.exports}var Ub,O8;function Gf(){if(O8)return Ub;O8=1;var r=V6();return Ub=function(e,t){return r[e]||(r[e]=t||{})},Ub}var Hb,A8;function Oo(){if(A8)return Hb;A8=1;var r=Ud(),e=Object;return Hb=function(t){return e(r(t))},Hb}var Wb,R8;function Ni(){if(R8)return Wb;R8=1;var r=Xr(),e=Oo(),t=r({}.hasOwnProperty);return Wb=Object.hasOwn||function(i,a){return t(e(i),a)},Wb}var Gb,C8;function G1(){if(C8)return Gb;C8=1;var r=Xr(),e=0,t=Math.random(),n=r(1.1.toString);return Gb=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++e+t,36)},Gb}var Vb,k8;function Ii(){if(k8)return Vb;k8=1;var r=ti(),e=Gf(),t=Ni(),n=G1(),i=Uf(),a=iK(),o=r.Symbol,u=e("wks"),c=a?o.for||o:o&&o.withoutSetter||n;return Vb=function(h){return t(u,h)||(u[h]=i&&t(o,h)?o[h]:c("Symbol."+h)),u[h]},Vb}var Yb,N8;function aK(){if(N8)return Yb;N8=1;var r=Ba(),e=xa(),t=og(),n=G6(),i=sle(),a=Ii(),o=TypeError,u=a("toPrimitive");return Yb=function(c,h){if(!e(c)||t(c))return c;var f=n(c,u),v;if(f){if(h===void 0&&(h="default"),v=r(f,c,h),!e(v)||t(v))return v;throw new o("Can't convert object to primitive value")}return h===void 0&&(h="number"),i(c,h)},Yb}var Kb,I8;function Y6(){if(I8)return Kb;I8=1;var r=aK(),e=og();return Kb=function(t){var n=r(t,"string");return e(n)?n:n+""},Kb}var Xb,P8;function sK(){if(P8)return Xb;P8=1;var r=ti(),e=xa(),t=r.document,n=e(t)&&e(t.createElement);return Xb=function(i){return n?t.createElement(i):{}},Xb}var Qb,j8;function oK(){if(j8)return Qb;j8=1;var r=ri(),e=$r(),t=sK();return Qb=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Qb}var M8;function V1(){if(M8)return yb;M8=1;var r=ri(),e=Ba(),t=W6(),n=ig(),i=vl(),a=Y6(),o=Ni(),u=oK(),c=Object.getOwnPropertyDescriptor;return yb.f=r?c:function(f,v){if(f=i(f),v=a(v),u)try{return c(f,v)}catch{}if(o(f,v))return n(!e(t.f,f,v),f[v])},yb}var Zb,D8;function lle(){if(D8)return Zb;D8=1;var r=$r(),e=Ci(),t=/#|\.prototype\./,n=function(c,h){var f=a[i(c)];return f===u?!0:f===o?!1:e(h)?r(h):!!h},i=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},a=n.data={},o=n.NATIVE="N",u=n.POLYFILL="P";return Zb=n,Zb}var Jb,q8;function Y1(){if(q8)return Jb;q8=1;var r=nK(),e=gu(),t=ng(),n=r(r.bind);return Jb=function(i,a){return e(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},Jb}var e2={},t2,L8;function lK(){if(L8)return t2;L8=1;var r=ri(),e=$r();return t2=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),t2}var r2,$8;function mu(){if($8)return r2;$8=1;var r=xa(),e=String,t=TypeError;return r2=function(n){if(r(n))return n;throw new t(e(n)+" is not an object")},r2}var B8;function Ls(){if(B8)return e2;B8=1;var r=ri(),e=oK(),t=lK(),n=mu(),i=Y6(),a=TypeError,o=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",f="writable";return e2.f=r?t?function(y,g,_){if(n(y),g=i(g),n(_),typeof y=="function"&&g==="prototype"&&"value"in _&&f in _&&!_[f]){var E=u(y,g);E&&E[f]&&(y[g]=_.value,_={configurable:h in _?_[h]:E[h],enumerable:c in _?_[c]:E[c],writable:!1})}return o(y,g,_)}:o:function(y,g,_){if(n(y),g=i(g),n(_),e)try{return o(y,g,_)}catch{}if("get"in _||"set"in _)throw new a("Accessors not supported");return"value"in _&&(y[g]=_.value),y},e2}var n2,F8;function Vf(){if(F8)return n2;F8=1;var r=ri(),e=Ls(),t=ig();return n2=r?function(n,i,a){return e.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},n2}var i2,z8;function nr(){if(z8)return i2;z8=1;var r=ti(),e=H1(),t=nK(),n=Ci(),i=V1().f,a=lle(),o=fi(),u=Y1(),c=Vf(),h=Ni(),f=function(v){var y=function(g,_,E){if(this instanceof y){switch(arguments.length){case 0:return new v;case 1:return new v(g);case 2:return new v(g,_)}return new v(g,_,E)}return e(v,this,arguments)};return y.prototype=v.prototype,y};return i2=function(v,y){var g=v.target,_=v.global,E=v.stat,A=v.proto,T=_?r:E?r[g]:r[g]&&r[g].prototype,C=_?o:o[g]||c(o,g,{})[g],N=C.prototype,k,j,W,G,D,M,U,I,q;for(G in y)k=a(_?G:g+(E?".":"#")+G,v.forced),j=!k&&T&&h(T,G),M=C[G],j&&(v.dontCallGetSet?(q=i(T,G),U=q&&q.value):U=T[G]),D=j&&U?U:y[G],!(!k&&!A&&typeof M==typeof D)&&(v.bind&&j?I=u(D,r):v.wrap&&j?I=f(D):A&&n(D)?I=t(D):I=D,(v.sham||D&&D.sham||M&&M.sham)&&c(I,"sham",!0),c(C,G,I),A&&(W=g+"Prototype",h(o,W)||c(o,W,{}),c(o[W],G,D),v.real&&N&&(k||!N[G])&&c(N,G,D)))},i2}var U8;function ule(){if(U8)return VN;U8=1;var r=nr(),e=ri(),t=Ls().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),VN}var H8;function cle(){if(H8)return cb.exports;H8=1,ule();var r=fi(),e=r.Object,t=cb.exports=function(i,a,o){return e.defineProperty(i,a,o)};return e.defineProperty.sham&&(t.sham=!0),cb.exports}var a2,W8;function uK(){if(W8)return a2;W8=1;var r=cle();return a2=r,a2}var s2,G8;function dle(){if(G8)return s2;G8=1;var r=uK();return s2=r,s2}var o2,V8;function hle(){if(V8)return o2;V8=1;var r=dle();return o2=r,o2}var l2,Y8;function fle(){return Y8||(Y8=1,l2=hle()),l2}var ple=fle(),vle=gr(ple),K8={},u2,X8;function Hd(){if(X8)return u2;X8=1;var r=vu();return u2=Array.isArray||function(t){return r(t)==="Array"},u2}var c2,Q8;function gle(){if(Q8)return c2;Q8=1;var r=Math.ceil,e=Math.floor;return c2=Math.trunc||function(n){var i=+n;return(i>0?e:r)(i)},c2}var d2,Z8;function Yf(){if(Z8)return d2;Z8=1;var r=gle();return d2=function(e){var t=+e;return t!==t||t===0?0:r(t)},d2}var h2,J8;function cK(){if(J8)return h2;J8=1;var r=Yf(),e=Math.min;return h2=function(t){var n=r(t);return n>0?e(n,9007199254740991):0},h2}var f2,eI;function jc(){if(eI)return f2;eI=1;var r=cK();return f2=function(e){return r(e.length)},f2}var p2,tI;function dK(){if(tI)return p2;tI=1;var r=TypeError,e=9007199254740991;return p2=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},p2}var v2,rI;function K1(){if(rI)return v2;rI=1;var r=ri(),e=Ls(),t=ig();return v2=function(n,i,a){r?e.f(n,i,t(0,a)):n[i]=a},v2}var g2,nI;function K6(){if(nI)return g2;nI=1;var r=Ii(),e=r("toStringTag"),t={};return t[e]="z",g2=String(t)==="[object z]",g2}var m2,iI;function Mc(){if(iI)return m2;iI=1;var r=K6(),e=Ci(),t=vu(),n=Ii(),i=n("toStringTag"),a=Object,o=t((function(){return arguments})())==="Arguments",u=function(c,h){try{return c[h]}catch{}};return m2=r?t:function(c){var h,f,v;return c===void 0?"Undefined":c===null?"Null":typeof(f=u(h=a(c),i))=="string"?f:o?t(h):(v=t(h))==="Object"&&e(h.callee)?"Arguments":v},m2}var y2,aI;function mle(){if(aI)return y2;aI=1;var r=Xr(),e=Ci(),t=V6(),n=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return n(i)}),y2=t.inspectSource,y2}var b2,sI;function hK(){if(sI)return b2;sI=1;var r=Xr(),e=$r(),t=Ci(),n=Mc(),i=hs(),a=mle(),o=function(){},u=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,h=r(c.exec),f=!c.test(o),v=function(_){if(!t(_))return!1;try{return u(o,[],_),!0}catch{return!1}},y=function(_){if(!t(_))return!1;switch(n(_)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!h(c,a(_))}catch{return!0}};return y.sham=!0,b2=!u||e(function(){var g;return v(v.call)||!v(Object)||!v(function(){g=!0})||g})?y:v,b2}var w2,oI;function yle(){if(oI)return w2;oI=1;var r=Hd(),e=hK(),t=xa(),n=Ii(),i=n("species"),a=Array;return w2=function(o){var u;return r(o)&&(u=o.constructor,e(u)&&(u===a||r(u.prototype))?u=void 0:t(u)&&(u=u[i],u===null&&(u=void 0))),u===void 0?a:u},w2}var x2,lI;function X6(){if(lI)return x2;lI=1;var r=yle();return x2=function(e,t){return new(r(e))(t===0?0:t)},x2}var _2,uI;function lg(){if(uI)return _2;uI=1;var r=$r(),e=Ii(),t=sg(),n=e("species");return _2=function(i){return t>=51||!r(function(){var a=[],o=a.constructor={};return o[n]=function(){return{foo:1}},a[i](Boolean).foo!==1})},_2}var cI;function fK(){if(cI)return K8;cI=1;var r=nr(),e=$r(),t=Hd(),n=xa(),i=Oo(),a=jc(),o=dK(),u=K1(),c=X6(),h=lg(),f=Ii(),v=sg(),y=f("isConcatSpreadable"),g=v>=51||!e(function(){var A=[];return A[y]=!1,A.concat()[0]!==A}),_=function(A){if(!n(A))return!1;var T=A[y];return T!==void 0?!!T:t(A)},E=!g||!h("concat");return r({target:"Array",proto:!0,arity:1,forced:E},{concat:function(T){var C=i(this),N=c(C,0),k=0,j,W,G,D,M;for(j=-1,G=arguments.length;j<G;j++)if(M=j===-1?C:arguments[j],_(M))for(D=a(M),o(k+D),W=0;W<D;W++,k++)W in M&&u(N,k,M[W]);else o(k+1),u(N,k++,M);return N.length=k,N}}),K8}var dI={},hI={},S2,fI;function Dc(){if(fI)return S2;fI=1;var r=Mc(),e=String;return S2=function(t){if(r(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},S2}var E2={},T2,pI;function Q6(){if(pI)return T2;pI=1;var r=Yf(),e=Math.max,t=Math.min;return T2=function(n,i){var a=r(n);return a<0?e(a+i,0):t(a,i)},T2}var O2,vI;function ble(){if(vI)return O2;vI=1;var r=vl(),e=Q6(),t=jc(),n=function(i){return function(a,o,u){var c=r(a),h=t(c);if(h===0)return!i&&-1;var f=e(u,h),v;if(i&&o!==o){for(;h>f;)if(v=c[f++],v!==v)return!0}else for(;h>f;f++)if((i||f in c)&&c[f]===o)return i||f||0;return!i&&-1}};return O2={includes:n(!0),indexOf:n(!1)},O2}var A2,gI;function ug(){return gI||(gI=1,A2={}),A2}var R2,mI;function pK(){if(mI)return R2;mI=1;var r=Xr(),e=Ni(),t=vl(),n=ble().indexOf,i=ug(),a=r([].push);return R2=function(o,u){var c=t(o),h=0,f=[],v;for(v in c)!e(i,v)&&e(c,v)&&a(f,v);for(;u.length>h;)e(c,v=u[h++])&&(~n(f,v)||a(f,v));return f},R2}var C2,yI;function Z6(){return yI||(yI=1,C2=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),C2}var k2,bI;function X1(){if(bI)return k2;bI=1;var r=pK(),e=Z6();return k2=Object.keys||function(n){return r(n,e)},k2}var wI;function J6(){if(wI)return E2;wI=1;var r=ri(),e=lK(),t=Ls(),n=mu(),i=vl(),a=X1();return E2.f=r&&!e?Object.defineProperties:function(u,c){n(u);for(var h=i(c),f=a(c),v=f.length,y=0,g;v>y;)t.f(u,g=f[y++],h[g]);return u},E2}var N2,xI;function wle(){if(xI)return N2;xI=1;var r=hs();return N2=r("document","documentElement"),N2}var I2,_I;function Q1(){if(_I)return I2;_I=1;var r=Gf(),e=G1(),t=r("keys");return I2=function(n){return t[n]||(t[n]=e(n))},I2}var P2,SI;function cg(){if(SI)return P2;SI=1;var r=mu(),e=J6(),t=Z6(),n=ug(),i=wle(),a=sK(),o=Q1(),u=">",c="<",h="prototype",f="script",v=o("IE_PROTO"),y=function(){},g=function(C){return c+f+u+C+c+"/"+f+u},_=function(C){C.write(g("")),C.close();var N=C.parentWindow.Object;return C=null,N},E=function(){var C=a("iframe"),N="java"+f+":",k;return C.style.display="none",i.appendChild(C),C.src=String(N),k=C.contentWindow.document,k.open(),k.write(g("document.F=Object")),k.close(),k.F},A,T=function(){try{A=new ActiveXObject("htmlfile")}catch{}T=typeof document<"u"?document.domain&&A?_(A):E():_(A);for(var C=t.length;C--;)delete T[h][t[C]];return T()};return n[v]=!0,P2=Object.create||function(N,k){var j;return N!==null?(y[h]=r(N),j=new y,y[h]=null,j[v]=N):j=T(),k===void 0?j:e.f(j,k)},P2}var j2={},EI;function Z1(){if(EI)return j2;EI=1;var r=pK(),e=Z6(),t=e.concat("length","prototype");return j2.f=Object.getOwnPropertyNames||function(i){return r(i,t)},j2}var M2={},D2,TI;function Kf(){if(TI)return D2;TI=1;var r=Xr();return D2=r([].slice),D2}var OI;function vK(){if(OI)return M2;OI=1;var r=vu(),e=vl(),t=Z1().f,n=Kf(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(o){try{return t(o)}catch{return n(i)}};return M2.f=function(u){return i&&r(u)==="Window"?a(u):t(e(u))},M2}var q2={},AI;function J1(){return AI||(AI=1,q2.f=Object.getOwnPropertySymbols),q2}var L2,RI;function dg(){if(RI)return L2;RI=1;var r=Vf();return L2=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e},L2}var $2,CI;function eA(){if(CI)return $2;CI=1;var r=Ls();return $2=function(e,t,n){return r.f(e,t,n)},$2}var B2={},kI;function ey(){if(kI)return B2;kI=1;var r=Ii();return B2.f=r,B2}var F2,NI;function On(){if(NI)return F2;NI=1;var r=fi(),e=Ni(),t=ey(),n=Ls().f;return F2=function(i){var a=r.Symbol||(r.Symbol={});e(a,i)||n(a,i,{value:t.f(i)})},F2}var z2,II;function gK(){if(II)return z2;II=1;var r=Ba(),e=hs(),t=Ii(),n=dg();return z2=function(){var i=e("Symbol"),a=i&&i.prototype,o=a&&a.valueOf,u=t("toPrimitive");a&&!a[u]&&n(a,u,function(c){return r(o,this)},{arity:1})},z2}var U2,PI;function xle(){if(PI)return U2;PI=1;var r=K6(),e=Mc();return U2=r?{}.toString:function(){return"[object "+e(this)+"]"},U2}var H2,jI;function Wd(){if(jI)return H2;jI=1;var r=K6(),e=Ls().f,t=Vf(),n=Ni(),i=xle(),a=Ii(),o=a("toStringTag");return H2=function(u,c,h,f){var v=h?u:u&&u.prototype;v&&(n(v,o)||e(v,o,{configurable:!0,value:c}),f&&!r&&t(v,"toString",i))},H2}var W2,MI;function _le(){if(MI)return W2;MI=1;var r=ti(),e=Ci(),t=r.WeakMap;return W2=e(t)&&/native code/.test(String(t)),W2}var G2,DI;function hg(){if(DI)return G2;DI=1;var r=_le(),e=ti(),t=xa(),n=Vf(),i=Ni(),a=V6(),o=Q1(),u=ug(),c="Object already initialized",h=e.TypeError,f=e.WeakMap,v,y,g,_=function(C){return g(C)?y(C):v(C,{})},E=function(C){return function(N){var k;if(!t(N)||(k=y(N)).type!==C)throw new h("Incompatible receiver, "+C+" required");return k}};if(r||a.state){var A=a.state||(a.state=new f);A.get=A.get,A.has=A.has,A.set=A.set,v=function(C,N){if(A.has(C))throw new h(c);return N.facade=C,A.set(C,N),N},y=function(C){return A.get(C)||{}},g=function(C){return A.has(C)}}else{var T=o("state");u[T]=!0,v=function(C,N){if(i(C,T))throw new h(c);return N.facade=C,n(C,T,N),N},y=function(C){return i(C,T)?C[T]:{}},g=function(C){return i(C,T)}}return G2={set:v,get:y,has:g,enforce:_,getterFor:E},G2}var V2,qI;function Xf(){if(qI)return V2;qI=1;var r=Y1(),e=Xr(),t=W1(),n=Oo(),i=jc(),a=X6(),o=e([].push),u=function(c){var h=c===1,f=c===2,v=c===3,y=c===4,g=c===6,_=c===7,E=c===5||g;return function(A,T,C,N){for(var k=n(A),j=t(k),W=i(j),G=r(T,C),D=0,M=N||a,U=h?M(A,W):f||_?M(A,0):void 0,I,q;W>D;D++)if((E||D in j)&&(I=j[D],q=G(I,D,k),c))if(h)U[D]=q;else if(q)switch(c){case 3:return!0;case 5:return I;case 6:return D;case 2:o(U,I)}else switch(c){case 4:return!1;case 7:o(U,I)}return g?-1:v||y?y:U}};return V2={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)},V2}var LI;function Sle(){if(LI)return hI;LI=1;var r=nr(),e=ti(),t=Ba(),n=Xr(),i=Wf(),a=ri(),o=Uf(),u=$r(),c=Ni(),h=ki(),f=mu(),v=vl(),y=Y6(),g=Dc(),_=ig(),E=cg(),A=X1(),T=Z1(),C=vK(),N=J1(),k=V1(),j=Ls(),W=J6(),G=W6(),D=dg(),M=eA(),U=Gf(),I=Q1(),q=ug(),z=G1(),Q=Ii(),ce=ey(),re=On(),J=gK(),le=Wd(),ye=hg(),Z=Xf().forEach,oe=I("hidden"),L="Symbol",Y="prototype",te=ye.set,de=ye.getterFor(L),ue=Object[Y],we=e.Symbol,Se=we&&we[Y],Ie=e.RangeError,Le=e.TypeError,Ve=e.QObject,tt=k.f,Xe=j.f,dt=C.f,ne=G.f,et=n([].push),st=U("symbols"),ot=U("op-symbols"),We=U("wks"),vt=!Ve||!Ve[Y]||!Ve[Y].findChild,it=function(ze,Ke,fe){var ke=tt(ue,Ke);ke&&delete ue[Ke],Xe(ze,Ke,fe),ke&&ze!==ue&&Xe(ue,Ke,ke)},yt=a&&u(function(){return E(Xe({},"a",{get:function(){return Xe(this,"a",{value:7}).a}})).a!==7})?it:Xe,ut=function(ze,Ke){var fe=st[ze]=E(Se);return te(fe,{type:L,tag:ze,description:Ke}),a||(fe.description=Ke),fe},qt=function(Ke,fe,ke){Ke===ue&&qt(ot,fe,ke),f(Ke);var Be=y(fe);return f(ke),c(st,Be)?(ke.enumerable?(c(Ke,oe)&&Ke[oe][Be]&&(Ke[oe][Be]=!1),ke=E(ke,{enumerable:_(0,!1)})):(c(Ke,oe)||Xe(Ke,oe,_(1,E(null))),Ke[oe][Be]=!0),yt(Ke,Be,ke)):Xe(Ke,Be,ke)},Wt=function(Ke,fe){f(Ke);var ke=v(fe),Be=A(ke).concat(jt(ke));return Z(Be,function(ht){(!a||t(Tt,ke,ht))&&qt(Ke,ht,ke[ht])}),Ke},At=function(Ke,fe){return fe===void 0?E(Ke):Wt(E(Ke),fe)},Tt=function(Ke){var fe=y(Ke),ke=t(ne,this,fe);return this===ue&&c(st,fe)&&!c(ot,fe)?!1:ke||!c(this,fe)||!c(st,fe)||c(this,oe)&&this[oe][fe]?ke:!0},It=function(Ke,fe){var ke=v(Ke),Be=y(fe);if(!(ke===ue&&c(st,Be)&&!c(ot,Be))){var ht=tt(ke,Be);return ht&&c(st,Be)&&!(c(ke,oe)&&ke[oe][Be])&&(ht.enumerable=!0),ht}},nt=function(Ke){var fe=dt(v(Ke)),ke=[];return Z(fe,function(Be){!c(st,Be)&&!c(q,Be)&&et(ke,Be)}),ke},jt=function(ze){var Ke=ze===ue,fe=dt(Ke?ot:v(ze)),ke=[];return Z(fe,function(Be){c(st,Be)&&(!Ke||c(ue,Be))&&et(ke,st[Be])}),ke};return o||(we=function(){if(h(Se,this))throw new Le("Symbol is not a constructor");var Ke=!arguments.length||arguments[0]===void 0?void 0:g(arguments[0]),fe=z(Ke),ke=function(Be){var ht=this===void 0?e:this;ht===ue&&t(ke,ot,Be),c(ht,oe)&&c(ht[oe],fe)&&(ht[oe][fe]=!1);var lt=_(1,Be);try{yt(ht,fe,lt)}catch(or){if(!(or instanceof Ie))throw or;it(ht,fe,lt)}};return a&&vt&&yt(ue,fe,{configurable:!0,set:ke}),ut(fe,Ke)},Se=we[Y],D(Se,"toString",function(){return de(this).tag}),D(we,"withoutSetter",function(ze){return ut(z(ze),ze)}),G.f=Tt,j.f=qt,W.f=Wt,k.f=It,T.f=C.f=nt,N.f=jt,ce.f=function(ze){return ut(Q(ze),ze)},a&&(M(Se,"description",{configurable:!0,get:function(){return de(this).description}}),i||D(ue,"propertyIsEnumerable",Tt,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:we}),Z(A(We),function(ze){re(ze)}),r({target:L,stat:!0,forced:!o},{useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!a},{create:At,defineProperty:qt,defineProperties:Wt,getOwnPropertyDescriptor:It}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:nt}),J(),le(we,L),q[oe]=!0,hI}var $I={},Y2,BI;function mK(){if(BI)return Y2;BI=1;var r=Uf();return Y2=r&&!!Symbol.for&&!!Symbol.keyFor,Y2}var FI;function Ele(){if(FI)return $I;FI=1;var r=nr(),e=hs(),t=Ni(),n=Dc(),i=Gf(),a=mK(),o=i("string-to-symbol-registry"),u=i("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!a},{for:function(c){var h=n(c);if(t(o,h))return o[h];var f=e("Symbol")(h);return o[h]=f,u[f]=h,f}}),$I}var zI={},UI;function Tle(){if(UI)return zI;UI=1;var r=nr(),e=Ni(),t=og(),n=Hf(),i=Gf(),a=mK(),o=i("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!a},{keyFor:function(c){if(!t(c))throw new TypeError(n(c)+" is not a symbol");if(e(o,c))return o[c]}}),zI}var HI={},K2,WI;function Ole(){if(WI)return K2;WI=1;var r=Xr(),e=Hd(),t=Ci(),n=vu(),i=Dc(),a=r([].push);return K2=function(o){if(t(o))return o;if(e(o)){for(var u=o.length,c=[],h=0;h<u;h++){var f=o[h];typeof f=="string"?a(c,f):(typeof f=="number"||n(f)==="Number"||n(f)==="String")&&a(c,i(f))}var v=c.length,y=!0;return function(g,_){if(y)return y=!1,_;if(e(this))return _;for(var E=0;E<v;E++)if(c[E]===g)return _}}},K2}var GI;function yK(){if(GI)return HI;GI=1;var r=nr(),e=hs(),t=H1(),n=Ba(),i=Xr(),a=$r(),o=Ci(),u=og(),c=Kf(),h=Ole(),f=Uf(),v=String,y=e("JSON","stringify"),g=i(/./.exec),_=i("".charAt),E=i("".charCodeAt),A=i("".replace),T=i(1.1.toString),C=/[\uD800-\uDFFF]/g,N=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,j=!f||a(function(){var M=e("Symbol")("stringify detection");return y([M])!=="[null]"||y({a:M})!=="{}"||y(Object(M))!=="{}"}),W=a(function(){return y("\uDF06\uD834")!=='"\\udf06\\ud834"'||y("\uDEAD")!=='"\\udead"'}),G=function(M,U){var I=c(arguments),q=h(U);if(!(!o(q)&&(M===void 0||u(M))))return I[1]=function(z,Q){if(o(q)&&(Q=n(q,this,v(z),Q)),!u(Q))return Q},t(y,null,I)},D=function(M,U,I){var q=_(I,U-1),z=_(I,U+1);return g(N,M)&&!g(k,z)||g(k,M)&&!g(N,q)?"\\u"+T(E(M,0),16):M};return y&&r({target:"JSON",stat:!0,arity:3,forced:j||W},{stringify:function(U,I,q){var z=c(arguments),Q=t(j?G:y,null,z);return W&&typeof Q=="string"?A(Q,C,D):Q}}),HI}var VI={},YI;function Ale(){if(YI)return VI;YI=1;var r=nr(),e=Uf(),t=$r(),n=J1(),i=Oo(),a=!e||t(function(){n.f(1)});return r({target:"Object",stat:!0,forced:a},{getOwnPropertySymbols:function(u){var c=n.f;return c?c(i(u)):[]}}),VI}var KI;function bK(){return KI||(KI=1,Sle(),Ele(),Tle(),yK(),Ale()),dI}var XI={},QI;function wK(){if(QI)return XI;QI=1;var r=On();return r("asyncDispose"),XI}var ZI={},JI;function Rle(){if(JI)return ZI;JI=1;var r=On();return r("asyncIterator"),ZI}var eP={},tP;function xK(){if(tP)return eP;tP=1;var r=On();return r("dispose"),eP}var rP={},nP;function Cle(){if(nP)return rP;nP=1;var r=On();return r("hasInstance"),rP}var iP={},aP;function kle(){if(aP)return iP;aP=1;var r=On();return r("isConcatSpreadable"),iP}var sP={},oP;function _K(){if(oP)return sP;oP=1;var r=On();return r("iterator"),sP}var lP={},uP;function Nle(){if(uP)return lP;uP=1;var r=On();return r("match"),lP}var cP={},dP;function Ile(){if(dP)return cP;dP=1;var r=On();return r("matchAll"),cP}var hP={},fP;function Ple(){if(fP)return hP;fP=1;var r=On();return r("replace"),hP}var pP={},vP;function jle(){if(vP)return pP;vP=1;var r=On();return r("search"),pP}var gP={},mP;function Mle(){if(mP)return gP;mP=1;var r=On();return r("species"),gP}var yP={},bP;function Dle(){if(bP)return yP;bP=1;var r=On();return r("split"),yP}var wP={},xP;function SK(){if(xP)return wP;xP=1;var r=On(),e=gK();return r("toPrimitive"),e(),wP}var _P={},SP;function qle(){if(SP)return _P;SP=1;var r=hs(),e=On(),t=Wd();return e("toStringTag"),t(r("Symbol"),"Symbol"),_P}var EP={},TP;function Lle(){if(TP)return EP;TP=1;var r=On();return r("unscopables"),EP}var OP={},AP;function $le(){if(AP)return OP;AP=1;var r=ti(),e=Wd();return e(r.JSON,"JSON",!0),OP}var X2,RP;function Ble(){if(RP)return X2;RP=1,fK(),bK(),wK(),Rle(),xK(),Cle(),kle(),_K(),Nle(),Ile(),Ple(),jle(),Mle(),Dle(),SK(),qle(),Lle(),$le();var r=fi();return X2=r.Symbol,X2}var CP={},Q2,kP;function Fle(){return kP||(kP=1,Q2=function(){}),Q2}var Z2,NP;function Qf(){return NP||(NP=1,Z2={}),Z2}var J2,IP;function zle(){if(IP)return J2;IP=1;var r=ri(),e=Ni(),t=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,i=e(t,"name"),a=i&&(function(){}).name==="something",o=i&&(!r||r&&n(t,"name").configurable);return J2={EXISTS:i,PROPER:a,CONFIGURABLE:o},J2}var e5,PP;function Ule(){if(PP)return e5;PP=1;var r=$r();return e5=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),e5}var t5,jP;function EK(){if(jP)return t5;jP=1;var r=Ni(),e=Ci(),t=Oo(),n=Q1(),i=Ule(),a=n("IE_PROTO"),o=Object,u=o.prototype;return t5=i?o.getPrototypeOf:function(c){var h=t(c);if(r(h,a))return h[a];var f=h.constructor;return e(f)&&h instanceof f?f.prototype:h instanceof o?u:null},t5}var r5,MP;function TK(){if(MP)return r5;MP=1;var r=$r(),e=Ci(),t=xa(),n=cg(),i=EK(),a=dg(),o=Ii(),u=Wf(),c=o("iterator"),h=!1,f,v,y;[].keys&&(y=[].keys(),"next"in y?(v=i(i(y)),v!==Object.prototype&&(f=v)):h=!0);var g=!t(f)||r(function(){var _={};return f[c].call(_)!==_});return g?f={}:u&&(f=n(f)),e(f[c])||a(f,c,function(){return this}),r5={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:h},r5}var n5,DP;function Hle(){if(DP)return n5;DP=1;var r=TK().IteratorPrototype,e=cg(),t=ig(),n=Wd(),i=Qf(),a=function(){return this};return n5=function(o,u,c,h){var f=u+" Iterator";return o.prototype=e(r,{next:t(+!h,c)}),n(o,f,!1,!0),i[f]=a,o},n5}var i5,qP;function Wle(){if(qP)return i5;qP=1;var r=Xr(),e=gu();return i5=function(t,n,i){try{return r(e(Object.getOwnPropertyDescriptor(t,n)[i]))}catch{}},i5}var a5,LP;function Gle(){if(LP)return a5;LP=1;var r=xa();return a5=function(e){return r(e)||e===null},a5}var s5,$P;function Vle(){if($P)return s5;$P=1;var r=Gle(),e=String,t=TypeError;return s5=function(n){if(r(n))return n;throw new t("Can't set "+e(n)+" as a prototype")},s5}var o5,BP;function Yle(){if(BP)return o5;BP=1;var r=Wle(),e=xa(),t=Ud(),n=Vle();return o5=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,a={},o;try{o=r(Object.prototype,"__proto__","set"),o(a,[]),i=a instanceof Array}catch{}return function(c,h){return t(c),n(h),e(c)&&(i?o(c,h):c.__proto__=h),c}})():void 0),o5}var l5,FP;function tA(){if(FP)return l5;FP=1;var r=nr(),e=Ba(),t=Wf(),n=zle(),i=Ci(),a=Hle(),o=EK(),u=Yle(),c=Wd(),h=Vf(),f=dg(),v=Ii(),y=Qf(),g=TK(),_=n.PROPER,E=n.CONFIGURABLE,A=g.IteratorPrototype,T=g.BUGGY_SAFARI_ITERATORS,C=v("iterator"),N="keys",k="values",j="entries",W=function(){return this};return l5=function(G,D,M,U,I,q,z){a(M,D,U);var Q=function(te){if(te===I&&ye)return ye;if(!T&&te&&te in J)return J[te];switch(te){case N:return function(){return new M(this,te)};case k:return function(){return new M(this,te)};case j:return function(){return new M(this,te)}}return function(){return new M(this)}},ce=D+" Iterator",re=!1,J=G.prototype,le=J[C]||J["@@iterator"]||I&&J[I],ye=!T&&le||Q(I),Z=D==="Array"&&J.entries||le,oe,L,Y;if(Z&&(oe=o(Z.call(new G)),oe!==Object.prototype&&oe.next&&(!t&&o(oe)!==A&&(u?u(oe,A):i(oe[C])||f(oe,C,W)),c(oe,ce,!0,!0),t&&(y[ce]=W))),_&&I===k&&le&&le.name!==k&&(!t&&E?h(J,"name",k):(re=!0,ye=function(){return e(le,this)})),I)if(L={values:Q(k),keys:q?ye:Q(N),entries:Q(j)},z)for(Y in L)(T||re||!(Y in J))&&f(J,Y,L[Y]);else r({target:D,proto:!0,forced:T||re},L);return(!t||z)&&J[C]!==ye&&f(J,C,ye,{name:I}),y[D]=ye,L},l5}var u5,zP;function rA(){return zP||(zP=1,u5=function(r,e){return{value:r,done:e}}),u5}var c5,UP;function qc(){if(UP)return c5;UP=1;var r=vl(),e=Fle(),t=Qf(),n=hg(),i=Ls().f,a=tA(),o=rA(),u=Wf(),c=ri(),h="Array Iterator",f=n.set,v=n.getterFor(h);c5=a(Array,"Array",function(g,_){f(this,{type:h,target:r(g),index:0,kind:_})},function(){var g=v(this),_=g.target,E=g.index++;if(!_||E>=_.length)return g.target=null,o(void 0,!0);switch(g.kind){case"keys":return o(E,!1);case"values":return o(_[E],!1)}return o([E,_[E]],!1)},"values");var y=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!u&&c&&y.name!=="values")try{i(y,"name",{value:"values"})}catch{}return c5}var d5,HP;function Kle(){return HP||(HP=1,d5={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),d5}var WP;function Lc(){if(WP)return CP;WP=1,qc();var r=Kle(),e=ti(),t=Wd(),n=Qf();for(var i in r)t(e[i],i),n[i]=n.Array;return CP}var h5,GP;function OK(){if(GP)return h5;GP=1;var r=Ble();return Lc(),h5=r,h5}var VP={},YP;function Xle(){if(YP)return VP;YP=1;var r=Ii(),e=Ls().f,t=r("metadata"),n=Function.prototype;return n[t]===void 0&&e(n,t,{value:null}),VP}var KP={},XP;function Qle(){return XP||(XP=1,wK()),KP}var QP={},ZP;function Zle(){return ZP||(ZP=1,xK()),QP}var JP={},ej;function Jle(){if(ej)return JP;ej=1;var r=On();return r("metadata"),JP}var f5,tj;function eue(){if(tj)return f5;tj=1;var r=OK();return Xle(),Qle(),Zle(),Jle(),f5=r,f5}var rj={},p5,nj;function AK(){if(nj)return p5;nj=1;var r=hs(),e=Xr(),t=r("Symbol"),n=t.keyFor,i=e(t.prototype.valueOf);return p5=t.isRegisteredSymbol||function(o){try{return n(i(o))!==void 0}catch{return!1}},p5}var ij;function tue(){if(ij)return rj;ij=1;var r=nr(),e=AK();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),rj}var aj={},v5,sj;function RK(){if(sj)return v5;sj=1;for(var r=Gf(),e=hs(),t=Xr(),n=og(),i=Ii(),a=e("Symbol"),o=a.isWellKnownSymbol,u=e("Object","getOwnPropertyNames"),c=t(a.prototype.valueOf),h=r("wks"),f=0,v=u(a),y=v.length;f<y;f++)try{var g=v[f];n(a[g])&&i(g)}catch{}return v5=function(E){if(o&&o(E))return!0;try{for(var A=c(E),T=0,C=u(h),N=C.length;T<N;T++)if(h[C[T]]==A)return!0}catch{}return!1},v5}var oj;function rue(){if(oj)return aj;oj=1;var r=nr(),e=RK();return r({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),aj}var lj={},uj;function nue(){if(uj)return lj;uj=1;var r=On();return r("customMatcher"),lj}var cj={},dj;function iue(){if(dj)return cj;dj=1;var r=On();return r("observable"),cj}var hj={},fj;function aue(){if(fj)return hj;fj=1;var r=nr(),e=AK();return r({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),hj}var pj={},vj;function sue(){if(vj)return pj;vj=1;var r=nr(),e=RK();return r({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),pj}var gj={},mj;function oue(){if(mj)return gj;mj=1;var r=On();return r("matcher"),gj}var yj={},bj;function lue(){if(bj)return yj;bj=1;var r=On();return r("metadataKey"),yj}var wj={},xj;function uue(){if(xj)return wj;xj=1;var r=On();return r("patternMatch"),wj}var _j={},Sj;function cue(){if(Sj)return _j;Sj=1;var r=On();return r("replaceAll"),_j}var g5,Ej;function due(){if(Ej)return g5;Ej=1;var r=eue();return tue(),rue(),nue(),iue(),aue(),sue(),oue(),lue(),uue(),cue(),g5=r,g5}var m5,Tj;function hue(){return Tj||(Tj=1,m5=due()),m5}var fue=hue(),Vm=gr(fue),Oj={},y5,Aj;function pue(){if(Aj)return y5;Aj=1;var r=Xr(),e=Yf(),t=Dc(),n=Ud(),i=r("".charAt),a=r("".charCodeAt),o=r("".slice),u=function(c){return function(h,f){var v=t(n(h)),y=e(f),g=v.length,_,E;return y<0||y>=g?c?"":void 0:(_=a(v,y),_<55296||_>56319||y+1===g||(E=a(v,y+1))<56320||E>57343?c?i(v,y):_:c?o(v,y,y+2):(_-55296<<10)+(E-56320)+65536)}};return y5={codeAt:u(!1),charAt:u(!0)},y5}var Rj;function ty(){if(Rj)return Oj;Rj=1;var r=pue().charAt,e=Dc(),t=hg(),n=tA(),i=rA(),a="String Iterator",o=t.set,u=t.getterFor(a);return n(String,"String",function(c){o(this,{type:a,string:e(c),index:0})},function(){var h=u(this),f=h.string,v=h.index,y;return v>=f.length?i(void 0,!0):(y=r(f,v),h.index+=y.length,i(y,!1))}),Oj}var b5,Cj;function vue(){if(Cj)return b5;Cj=1,qc(),ty(),_K();var r=ey();return b5=r.f("iterator"),b5}var w5,kj;function CK(){if(kj)return w5;kj=1;var r=vue();return Lc(),w5=r,w5}var x5,Nj;function gue(){if(Nj)return x5;Nj=1;var r=CK();return x5=r,x5}var _5,Ij;function mue(){if(Ij)return _5;Ij=1;var r=gue();return _5=r,_5}var S5,Pj;function yue(){return Pj||(Pj=1,S5=mue()),S5}var bue=yue(),wue=gr(bue);function $v(r){"@babel/helpers - typeof";return $v=typeof Vm=="function"&&typeof wue=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Vm=="function"&&e.constructor===Vm&&e!==Vm.prototype?"symbol":typeof e},$v(r)}var E5,jj;function xue(){if(jj)return E5;jj=1,SK();var r=ey();return E5=r.f("toPrimitive"),E5}var T5,Mj;function _ue(){if(Mj)return T5;Mj=1;var r=xue();return T5=r,T5}var O5,Dj;function Sue(){if(Dj)return O5;Dj=1;var r=_ue();return O5=r,O5}var A5,qj;function Eue(){if(qj)return A5;qj=1;var r=Sue();return A5=r,A5}var R5,Lj;function Tue(){return Lj||(Lj=1,R5=Eue()),R5}var Oue=Tue(),Aue=gr(Oue);function Rue(r,e){if($v(r)!="object"||!r)return r;var t=r[Aue];if(t!==void 0){var n=t.call(r,e);if($v(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Cue(r){var e=Rue(r,"string");return $v(e)=="symbol"?e:e+""}function Sc(r,e,t){return(e=Cue(e))in r?vle(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var $j={},C5,Bj;function kue(){if(Bj)return C5;Bj=1;var r=Xr(),e=gu(),t=xa(),n=Ni(),i=Kf(),a=ng(),o=Function,u=r([].concat),c=r([].join),h={},f=function(v,y,g){if(!n(h,y)){for(var _=[],E=0;E<y;E++)_[E]="a["+E+"]";h[y]=o("C,a","return new C("+c(_,",")+")")}return h[y](v,g)};return C5=a?o.bind:function(y){var g=e(this),_=g.prototype,E=i(arguments,1),A=function(){var C=u(E,i(arguments));return this instanceof A?f(g,C.length,C):g.apply(y,C)};return t(_)&&(A.prototype=_),A},C5}var Fj;function Nue(){if(Fj)return $j;Fj=1;var r=nr(),e=kue();return r({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),$j}var k5,zj;function Fa(){if(zj)return k5;zj=1;var r=ti(),e=fi();return k5=function(t,n){var i=e[t+"Prototype"],a=i&&i[n];if(a)return a;var o=r[t],u=o&&o.prototype;return u&&u[n]},k5}var N5,Uj;function Iue(){if(Uj)return N5;Uj=1,Nue();var r=Fa();return N5=r("Function","bind"),N5}var I5,Hj;function Pue(){if(Hj)return I5;Hj=1;var r=ki(),e=Iue(),t=Function.prototype;return I5=function(n){var i=n.bind;return n===t||r(t,n)&&i===t.bind?e:i},I5}var P5,Wj;function jue(){if(Wj)return P5;Wj=1;var r=Pue();return P5=r,P5}var j5,Gj;function Mue(){return Gj||(Gj=1,j5=jue()),j5}var Due=Mue(),kK=gr(Due),Vj={},M5,Yj;function que(){if(Yj)return M5;Yj=1;var r=gu(),e=Oo(),t=W1(),n=jc(),i=TypeError,a="Reduce of empty array with no initial value",o=function(u){return function(c,h,f,v){var y=e(c),g=t(y),_=n(y);if(r(h),_===0&&f<2)throw new i(a);var E=u?_-1:0,A=u?-1:1;if(f<2)for(;;){if(E in g){v=g[E],E+=A;break}if(E+=A,u?E<0:_<=E)throw new i(a)}for(;u?E>=0:_>E;E+=A)E in g&&(v=h(v,g[E],E,y));return v}};return M5={left:o(!1),right:o(!0)},M5}var D5,Kj;function ry(){if(Kj)return D5;Kj=1;var r=$r();return D5=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})},D5}var q5,Xj;function NK(){if(Xj)return q5;Xj=1;var r=ti(),e=zf(),t=vu(),n=function(i){return e.slice(0,i.length)===i};return q5=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"})(),q5}var L5,Qj;function Lue(){if(Qj)return L5;Qj=1;var r=NK();return L5=r==="NODE",L5}var Zj;function $ue(){if(Zj)return Vj;Zj=1;var r=nr(),e=que().left,t=ry(),n=sg(),i=Lue(),a=!i&&n>79&&n<83,o=a||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(c){var h=arguments.length;return e(this,c,h,h>1?arguments[1]:void 0)}}),Vj}var $5,Jj;function Bue(){if(Jj)return $5;Jj=1,$ue();var r=Fa();return $5=r("Array","reduce"),$5}var B5,eM;function Fue(){if(eM)return B5;eM=1;var r=ki(),e=Bue(),t=Array.prototype;return B5=function(n){var i=n.reduce;return n===t||r(t,n)&&i===t.reduce?e:i},B5}var F5,tM;function zue(){if(tM)return F5;tM=1;var r=Fue();return F5=r,F5}var z5,rM;function Uue(){return rM||(rM=1,z5=zue()),z5}var Hue=Uue(),Wue=gr(Hue),nM={},iM;function Gue(){if(iM)return nM;iM=1;var r=nr(),e=Xf().filter,t=lg(),n=t("filter");return r({target:"Array",proto:!0,forced:!n},{filter:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),nM}var U5,aM;function Vue(){if(aM)return U5;aM=1,Gue();var r=Fa();return U5=r("Array","filter"),U5}var H5,sM;function Yue(){if(sM)return H5;sM=1;var r=ki(),e=Vue(),t=Array.prototype;return H5=function(n){var i=n.filter;return n===t||r(t,n)&&i===t.filter?e:i},H5}var W5,oM;function Kue(){if(oM)return W5;oM=1;var r=Yue();return W5=r,W5}var G5,lM;function Xue(){return lM||(lM=1,G5=Kue()),G5}var Que=Xue(),df=gr(Que),uM={},cM;function Zue(){if(cM)return uM;cM=1;var r=nr(),e=Xf().map,t=lg(),n=t("map");return r({target:"Array",proto:!0,forced:!n},{map:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),uM}var V5,dM;function Jue(){if(dM)return V5;dM=1,Zue();var r=Fa();return V5=r("Array","map"),V5}var Y5,hM;function ece(){if(hM)return Y5;hM=1;var r=ki(),e=Jue(),t=Array.prototype;return Y5=function(n){var i=n.map;return n===t||r(t,n)&&i===t.map?e:i},Y5}var K5,fM;function tce(){if(fM)return K5;fM=1;var r=ece();return K5=r,K5}var X5,pM;function rce(){return pM||(pM=1,X5=tce()),X5}var nce=rce(),yo=gr(nce),Q5,vM;function ice(){return vM||(vM=1,Q5=OK()),Q5}var ace=ice(),sce=gr(ace),gM={},mM;function oce(){if(mM)return gM;mM=1;var r=nr(),e=Hd(),t=hK(),n=xa(),i=Q6(),a=jc(),o=vl(),u=K1(),c=Ii(),h=lg(),f=Kf(),v=h("slice"),y=c("species"),g=Array,_=Math.max;return r({target:"Array",proto:!0,forced:!v},{slice:function(A,T){var C=o(this),N=a(C),k=i(A,N),j=i(T===void 0?N:T,N),W,G,D;if(e(C)&&(W=C.constructor,t(W)&&(W===g||e(W.prototype))?W=void 0:n(W)&&(W=W[y],W===null&&(W=void 0)),W===g||W===void 0))return f(C,k,j);for(G=new(W===void 0?g:W)(_(j-k,0)),D=0;k<j;k++,D++)k in C&&u(G,D,C[k]);return G.length=D,G}}),gM}var Z5,yM;function lce(){if(yM)return Z5;yM=1,oce();var r=Fa();return Z5=r("Array","slice"),Z5}var J5,bM;function uce(){if(bM)return J5;bM=1;var r=ki(),e=lce(),t=Array.prototype;return J5=function(n){var i=n.slice;return n===t||r(t,n)&&i===t.slice?e:i},J5}var ew,wM;function cce(){if(wM)return ew;wM=1;var r=uce();return ew=r,ew}var tw,xM;function dce(){return xM||(xM=1,tw=cce()),tw}var hce=dce(),fce=gr(hce),_M={},rw,SM;function IK(){if(SM)return rw;SM=1;var r=hs(),e=Xr(),t=Z1(),n=J1(),i=mu(),a=e([].concat);return rw=r("Reflect","ownKeys")||function(u){var c=t.f(i(u)),h=n.f;return h?a(c,h(u)):c},rw}var EM;function pce(){if(EM)return _M;EM=1;var r=nr(),e=IK();return r({target:"Reflect",stat:!0},{ownKeys:e}),_M}var nw,TM;function vce(){if(TM)return nw;TM=1,pce();var r=fi();return nw=r.Reflect.ownKeys,nw}var iw,OM;function gce(){if(OM)return iw;OM=1;var r=vce();return iw=r,iw}var aw,AM;function mce(){return AM||(AM=1,aw=gce()),aw}var yce=mce(),bce=gr(yce),RM={},CM;function wce(){if(CM)return RM;CM=1;var r=nr(),e=Hd();return r({target:"Array",stat:!0},{isArray:e}),RM}var sw,kM;function xce(){if(kM)return sw;kM=1,wce();var r=fi();return sw=r.Array.isArray,sw}var ow,NM;function _ce(){if(NM)return ow;NM=1;var r=xce();return ow=r,ow}var lw,IM;function Sce(){return IM||(IM=1,lw=_ce()),lw}var Ece=Sce(),el=gr(Ece),PM={},jM;function Tce(){if(jM)return PM;jM=1;var r=nr(),e=Oo(),t=X1(),n=$r(),i=n(function(){t(1)});return r({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),PM}var uw,MM;function Oce(){if(MM)return uw;MM=1,Tce();var r=fi();return uw=r.Object.keys,uw}var cw,DM;function Ace(){if(DM)return cw;DM=1;var r=Oce();return cw=r,cw}var dw,qM;function Rce(){return qM||(qM=1,dw=Ace()),dw}var Cce=Rce(),nA=gr(Cce),LM={},hw,$M;function kce(){if($M)return hw;$M=1;var r=Xf().forEach,e=ry(),t=e("forEach");return hw=t?[].forEach:function(i){return r(this,i,arguments.length>1?arguments[1]:void 0)},hw}var BM;function Nce(){if(BM)return LM;BM=1;var r=nr(),e=kce();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),LM}var fw,FM;function Ice(){if(FM)return fw;FM=1,Nce();var r=Fa();return fw=r("Array","forEach"),fw}var pw,zM;function Pce(){if(zM)return pw;zM=1;var r=Ice();return pw=r,pw}var vw,UM;function jce(){if(UM)return vw;UM=1;var r=Mc(),e=Ni(),t=ki(),n=Pce(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return vw=function(o){var u=o.forEach;return o===i||t(i,o)&&u===i.forEach||e(a,r(o))?n:u},vw}var gw,HM;function Mce(){return HM||(HM=1,gw=jce()),gw}var Dce=Mce(),Pd=gr(Dce),WM={},GM;function qce(){if(GM)return WM;GM=1;var r=nr(),e=Xr(),t=Hd(),n=e([].reverse),i=[1,2];return r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),n(this)}}),WM}var mw,VM;function Lce(){if(VM)return mw;VM=1,qce();var r=Fa();return mw=r("Array","reverse"),mw}var yw,YM;function $ce(){if(YM)return yw;YM=1;var r=ki(),e=Lce(),t=Array.prototype;return yw=function(n){var i=n.reverse;return n===t||r(t,n)&&i===t.reverse?e:i},yw}var bw,KM;function Bce(){if(KM)return bw;KM=1;var r=$ce();return bw=r,bw}var ww,XM;function Fce(){return XM||(XM=1,ww=Bce()),ww}var zce=Fce(),Uce=gr(zce),QM={},xw,ZM;function Hce(){if(ZM)return xw;ZM=1;var r=ri(),e=Hd(),t=TypeError,n=Object.getOwnPropertyDescriptor,i=r&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}})();return xw=i?function(a,o){if(e(a)&&!n(a,"length").writable)throw new t("Cannot set read only .length");return a.length=o}:function(a,o){return a.length=o},xw}var _w,JM;function PK(){if(JM)return _w;JM=1;var r=Hf(),e=TypeError;return _w=function(t,n){if(!delete t[n])throw new e("Cannot delete property "+r(n)+" of "+r(t))},_w}var eD;function Wce(){if(eD)return QM;eD=1;var r=nr(),e=Oo(),t=Q6(),n=Yf(),i=jc(),a=Hce(),o=dK(),u=X6(),c=K1(),h=PK(),f=lg(),v=f("splice"),y=Math.max,g=Math.min;return r({target:"Array",proto:!0,forced:!v},{splice:function(E,A){var T=e(this),C=i(T),N=t(E,C),k=arguments.length,j,W,G,D,M,U;for(k===0?j=W=0:k===1?(j=0,W=C-N):(j=k-2,W=g(y(n(A),0),C-N)),o(C+j-W),G=u(T,W),D=0;D<W;D++)M=N+D,M in T&&c(G,D,T[M]);if(G.length=W,j<W){for(D=N;D<C-W;D++)M=D+W,U=D+j,M in T?T[U]=T[M]:h(T,U);for(D=C;D>C-W+j;D--)h(T,D-1)}else if(j>W)for(D=C-W;D>N;D--)M=D+W-1,U=D+j-1,M in T?T[U]=T[M]:h(T,U);for(D=0;D<j;D++)T[D+N]=arguments[D+2];return a(T,C-W+j),G}}),QM}var Sw,tD;function Gce(){if(tD)return Sw;tD=1,Wce();var r=Fa();return Sw=r("Array","splice"),Sw}var Ew,rD;function Vce(){if(rD)return Ew;rD=1;var r=ki(),e=Gce(),t=Array.prototype;return Ew=function(n){var i=n.splice;return n===t||r(t,n)&&i===t.splice?e:i},Ew}var Tw,nD;function Yce(){if(nD)return Tw;nD=1;var r=Vce();return Tw=r,Tw}var Ow,iD;function Kce(){return iD||(iD=1,Ow=Yce()),Ow}var Xce=Kce(),jK=gr(Xce),aD={},Aw,sD;function Qce(){if(sD)return Aw;sD=1;var r=ri(),e=Xr(),t=Ba(),n=$r(),i=X1(),a=J1(),o=W6(),u=Oo(),c=W1(),h=Object.assign,f=Object.defineProperty,v=e([].concat);return Aw=!h||n(function(){if(r&&h({b:1},h(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},g={},_=Symbol("assign detection"),E="abcdefghijklmnopqrst";return y[_]=7,E.split("").forEach(function(A){g[A]=A}),h({},y)[_]!==7||i(h({},g)).join("")!==E})?function(g,_){for(var E=u(g),A=arguments.length,T=1,C=a.f,N=o.f;A>T;)for(var k=c(arguments[T++]),j=C?v(i(k),C(k)):i(k),W=j.length,G=0,D;W>G;)D=j[G++],(!r||t(N,k,D))&&(E[D]=k[D]);return E}:h,Aw}var oD;function Zce(){if(oD)return aD;oD=1;var r=nr(),e=Qce();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),aD}var Rw,lD;function Jce(){if(lD)return Rw;lD=1,Zce();var r=fi();return Rw=r.Object.assign,Rw}var Cw,uD;function ede(){if(uD)return Cw;uD=1;var r=Jce();return Cw=r,Cw}var kw,cD;function tde(){return cD||(cD=1,kw=ede()),kw}var rde=tde(),nde=gr(rde),Nw,dD;function ide(){if(dD)return Nw;dD=1,fK();var r=Fa();return Nw=r("Array","concat"),Nw}var Iw,hD;function ade(){if(hD)return Iw;hD=1;var r=ki(),e=ide(),t=Array.prototype;return Iw=function(n){var i=n.concat;return n===t||r(t,n)&&i===t.concat?e:i},Iw}var Pw,fD;function sde(){if(fD)return Pw;fD=1;var r=ade();return Pw=r,Pw}var jw,pD;function ode(){return pD||(pD=1,jw=sde()),jw}var lde=ode(),ude=gr(lde),vD={},gD;function cde(){if(gD)return vD;gD=1;var r=nr(),e=ri(),t=cg();return r({target:"Object",stat:!0,sham:!e},{create:t}),vD}var Mw,mD;function dde(){if(mD)return Mw;mD=1,cde();var r=fi(),e=r.Object;return Mw=function(n,i){return e.create(n,i)},Mw}var Dw,yD;function hde(){if(yD)return Dw;yD=1;var r=dde();return Dw=r,Dw}var qw,bD;function fde(){return bD||(bD=1,qw=hde()),qw}var pde=fde(),vde=gr(pde),wD={},Lw,xD;function gde(){if(xD)return Lw;xD=1;var r=Yf(),e=Dc(),t=Ud(),n=RangeError;return Lw=function(a){var o=e(t(this)),u="",c=r(a);if(c<0||c===1/0)throw new n("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(o+=o))c&1&&(u+=o);return u},Lw}var $w,_D;function mde(){if(_D)return $w;_D=1;var r=Xr(),e=cK(),t=Dc(),n=gde(),i=Ud(),a=r(n),o=r("".slice),u=Math.ceil,c=function(h){return function(f,v,y){var g=t(i(f)),_=e(v),E=g.length,A=y===void 0?" ":t(y),T,C;return _<=E||A===""?g:(T=_-E,C=a(A,u(T/A.length)),C.length>T&&(C=o(C,0,T)),h?g+C:C+g)}};return $w={start:c(!1),end:c(!0)},$w}var Bw,SD;function yde(){if(SD)return Bw;SD=1;var r=Xr(),e=$r(),t=mde().start,n=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,u=o.toISOString,c=r(o.getTime),h=r(o.getUTCDate),f=r(o.getUTCFullYear),v=r(o.getUTCHours),y=r(o.getUTCMilliseconds),g=r(o.getUTCMinutes),_=r(o.getUTCMonth),E=r(o.getUTCSeconds);return Bw=e(function(){return u.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){u.call(new Date(NaN))})?function(){if(!i(c(this)))throw new n("Invalid time value");var T=this,C=f(T),N=y(T),k=C<0?"-":C>9999?"+":"";return k+t(a(C),k?6:4,0)+"-"+t(_(T)+1,2,0)+"-"+t(h(T),2,0)+"T"+t(v(T),2,0)+":"+t(g(T),2,0)+":"+t(E(T),2,0)+"."+t(N,3,0)+"Z"}:u,Bw}var ED;function bde(){if(ED)return wD;ED=1;var r=nr(),e=Ba(),t=Oo(),n=aK(),i=yde(),a=vu(),o=$r(),u=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:u},{toJSON:function(h){var f=t(this),v=n(f,"number");return typeof v=="number"&&!isFinite(v)?null:!("toISOString"in f)&&a(f)==="Date"?e(i,f):f.toISOString()}}),wD}var Fw,TD;function wde(){if(TD)return Fw;TD=1,bde(),yK();var r=fi(),e=H1();return r.JSON||(r.JSON={stringify:JSON.stringify}),Fw=function(n,i,a){return e(r.JSON.stringify,null,arguments)},Fw}var zw,OD;function xde(){if(OD)return zw;OD=1;var r=wde();return zw=r,zw}var Uw,AD;function _de(){return AD||(AD=1,Uw=xde()),Uw}var Sde=_de(),Ede=gr(Sde),RD={},CD={},Hw,kD;function Tde(){if(kD)return Hw;kD=1;var r=TypeError;return Hw=function(e,t){if(e<t)throw new r("Not enough arguments");return e},Hw}var Ww,ND;function MK(){if(ND)return Ww;ND=1;var r=ti(),e=H1(),t=Ci(),n=NK(),i=zf(),a=Kf(),o=Tde(),u=r.Function,c=/MSIE .\./.test(i)||n==="BUN"&&(function(){var h=r.Bun.version.split(".");return h.length<3||h[0]==="0"&&(h[1]<3||h[1]==="3"&&h[2]==="0")})();return Ww=function(h,f){var v=f?2:1;return c?function(y,g){var _=o(arguments.length,1)>v,E=t(y)?y:u(y),A=_?a(arguments,v):[],T=_?function(){e(E,this,A)}:E;return f?h(T,g):h(T)}:h},Ww}var ID;function Ode(){if(ID)return CD;ID=1;var r=nr(),e=ti(),t=MK(),n=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==n},{setInterval:n}),CD}var PD={},jD;function Ade(){if(jD)return PD;jD=1;var r=nr(),e=ti(),t=MK(),n=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==n},{setTimeout:n}),PD}var MD;function Rde(){return MD||(MD=1,Ode(),Ade()),RD}var Gw,DD;function Cde(){if(DD)return Gw;DD=1,Rde();var r=fi();return Gw=r.setTimeout,Gw}var Vw,qD;function kde(){return qD||(qD=1,Vw=Cde()),Vw}var Nde=kde(),Ide=gr(Nde),Yw={exports:{}},LD;function Pde(){return LD||(LD=1,(function(r){function e(n){if(n)return t(n);this._callbacks=new Map}function t(n){return Object.assign(n,e.prototype),n._callbacks=new Map,n}e.prototype.on=function(n,i){const a=this._callbacks.get(n)??[];return a.push(i),this._callbacks.set(n,a),this},e.prototype.once=function(n,i){const a=(...o)=>{this.off(n,a),i.apply(this,o)};return a.fn=i,this.on(n,a),this},e.prototype.off=function(n,i){if(n===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(n),this;const a=this._callbacks.get(n);if(a){for(const[o,u]of a.entries())if(u===i||u.fn===i){a.splice(o,1);break}a.length===0?this._callbacks.delete(n):this._callbacks.set(n,a)}return this},e.prototype.emit=function(n,...i){const a=this._callbacks.get(n);if(a){const o=[...a];for(const u of o)u.apply(this,i)}return this},e.prototype.listeners=function(n){return this._callbacks.get(n)??[]},e.prototype.listenerCount=function(n){if(n)return this.listeners(n).length;let i=0;for(const a of this._callbacks.values())i+=a.length;return i},e.prototype.hasListeners=function(n){return this.listenerCount(n)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,r.exports=e})(Yw)),Yw.exports}var jde=Pde(),Mde=gr(jde);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
645
|
+
* http://naver.github.io/egjs
|
|
646
|
+
*
|
|
647
|
+
* Forked By Naver egjs
|
|
648
|
+
* Copyright (c) hammerjs
|
|
649
|
+
* Licensed under the MIT license */function xo(){return xo=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},xo.apply(this,arguments)}function $s(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function Ym(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var n6;typeof Object.assign!="function"?n6=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])}return t}:n6=Object.assign;var jd=n6,$D=["","webkit","Moz","MS","ms","o"],Dde=typeof document>"u"?{style:{}}:document.createElement("div"),qde="function",hf=Math.round,Md=Math.abs,iA=Date.now;function ny(r,e){for(var t,n,i=e[0].toUpperCase()+e.slice(1),a=0;a<$D.length;){if(t=$D[a],n=t?t+i:e,n in r)return n;a++}}var au;typeof window>"u"?au={}:au=window;var DK=ny(Dde.style,"touchAction"),qK=DK!==void 0;function Lde(){if(!qK)return!1;var r={},e=au.CSS&&au.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?au.CSS.supports("touch-action",t):!0}),r}var LK="compute",$K="auto",i6="manipulation",_d="none",Bv="pan-x",Fv="pan-y",Km=Lde(),$de=/mobile|tablet|ip(ad|hone|od)|android/i,BK="ontouchstart"in au,Bde=ny(au,"PointerEvent")!==void 0,Fde=BK&&$de.test(navigator.userAgent),fg="touch",zde="pen",aA="mouse",Ude="kinect",Hde=25,ba=1,Gd=2,Zn=4,qa=8,O1=1,pg=2,vg=4,gg=8,Af=16,ol=pg|vg,Sd=gg|Af,FK=ol|Sd,zK=["x","y"],A1=["clientX","clientY"];function su(r,e,t){var n;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(n=0;n<r.length;)e.call(t,r[n],n,r),n++;else for(n in r)r.hasOwnProperty(n)&&e.call(t,r[n],n,r)}function iy(r,e){return typeof r===qde?r.apply(e&&e[0]||void 0,e):r}function md(r,e){return r.indexOf(e)>-1}function Wde(r){if(md(r,_d))return _d;var e=md(r,Bv),t=md(r,Fv);return e&&t?_d:e||t?e?Bv:Fv:md(r,i6)?i6:$K}var UK=(function(){function r(t,n){this.manager=t,this.set(n)}var e=r.prototype;return e.set=function(n){n===LK&&(n=this.compute()),qK&&this.manager.element.style&&Km[n]&&(this.manager.element.style[DK]=n),this.actions=n.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var n=[];return su(this.manager.recognizers,function(i){iy(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),Wde(n.join(" "))},e.preventDefaults=function(n){var i=n.srcEvent,a=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,u=md(o,_d)&&!Km[_d],c=md(o,Fv)&&!Km[Fv],h=md(o,Bv)&&!Km[Bv];if(u){var f=n.pointers.length===1,v=n.distance<2,y=n.deltaTime<250;if(f&&v&&y)return}if(!(h&&c)&&(u||c&&a&ol||h&&a&Sd))return this.preventSrc(i)},e.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},r})();function sA(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function HK(r){var e=r.length;if(e===1)return{x:hf(r[0].clientX),y:hf(r[0].clientY)};for(var t=0,n=0,i=0;i<e;)t+=r[i].clientX,n+=r[i].clientY,i++;return{x:hf(t/e),y:hf(n/e)}}function BD(r){for(var e=[],t=0;t<r.pointers.length;)e[t]={clientX:hf(r.pointers[t].clientX),clientY:hf(r.pointers[t].clientY)},t++;return{timeStamp:iA(),pointers:e,center:HK(e),deltaX:r.deltaX,deltaY:r.deltaY}}function R1(r,e,t){t||(t=zK);var n=e[t[0]]-r[t[0]],i=e[t[1]]-r[t[1]];return Math.sqrt(n*n+i*i)}function a6(r,e,t){t||(t=zK);var n=e[t[0]]-r[t[0]],i=e[t[1]]-r[t[1]];return Math.atan2(i,n)*180/Math.PI}function WK(r,e){return r===e?O1:Md(r)>=Md(e)?r<0?pg:vg:e<0?gg:Af}function Gde(r,e){var t=e.center,n=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(e.eventType===ba||a.eventType===Zn)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-n.x),e.deltaY=i.y+(t.y-n.y)}function GK(r,e,t){return{x:e/r||0,y:t/r||0}}function Vde(r,e){return R1(e[0],e[1],A1)/R1(r[0],r[1],A1)}function Yde(r,e){return a6(e[1],e[0],A1)+a6(r[1],r[0],A1)}function Kde(r,e){var t=r.lastInterval||e,n=e.timeStamp-t.timeStamp,i,a,o,u;if(e.eventType!==qa&&(n>Hde||t.velocity===void 0)){var c=e.deltaX-t.deltaX,h=e.deltaY-t.deltaY,f=GK(n,c,h);a=f.x,o=f.y,i=Md(f.x)>Md(f.y)?f.x:f.y,u=WK(c,h),r.lastInterval=e}else i=t.velocity,a=t.velocityX,o=t.velocityY,u=t.direction;e.velocity=i,e.velocityX=a,e.velocityY=o,e.direction=u}function Xde(r,e){var t=r.session,n=e.pointers,i=n.length;t.firstInput||(t.firstInput=BD(e)),i>1&&!t.firstMultiple?t.firstMultiple=BD(e):i===1&&(t.firstMultiple=!1);var a=t.firstInput,o=t.firstMultiple,u=o?o.center:a.center,c=e.center=HK(n);e.timeStamp=iA(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=a6(u,c),e.distance=R1(u,c),Gde(t,e),e.offsetDirection=WK(e.deltaX,e.deltaY);var h=GK(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=Md(h.x)>Md(h.y)?h.x:h.y,e.scale=o?Vde(o.pointers,n):1,e.rotation=o?Yde(o.pointers,n):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,Kde(t,e);var f=r.element,v=e.srcEvent,y;v.composedPath?y=v.composedPath()[0]:v.path?y=v.path[0]:y=v.target,sA(y,f)&&(f=y),e.target=f}function Qde(r,e,t){var n=t.pointers.length,i=t.changedPointers.length,a=e&ba&&n-i===0,o=e&(Zn|qa)&&n-i===0;t.isFirst=!!a,t.isFinal=!!o,a&&(r.session={}),t.eventType=e,Xde(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function zv(r){return r.trim().split(/\s+/g)}function Ev(r,e,t){su(zv(e),function(n){r.addEventListener(n,t,!1)})}function Tv(r,e,t){su(zv(e),function(n){r.removeEventListener(n,t,!1)})}function FD(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Zf=(function(){function r(t,n){var i=this;this.manager=t,this.callback=n,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(a){iy(t.options.enable,[t])&&i.handler(a)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ev(this.element,this.evEl,this.domHandler),this.evTarget&&Ev(this.target,this.evTarget,this.domHandler),this.evWin&&Ev(FD(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Tv(this.element,this.evEl,this.domHandler),this.evTarget&&Tv(this.target,this.evTarget,this.domHandler),this.evWin&&Tv(FD(this.element),this.evWin,this.domHandler)},r})();function Dd(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var n=0;n<r.length;){if(t&&r[n][t]==e||!t&&r[n]===e)return n;n++}return-1}var Zde={pointerdown:ba,pointermove:Gd,pointerup:Zn,pointercancel:qa,pointerout:qa},Jde={2:fg,3:zde,4:aA,5:Ude},VK="pointerdown",YK="pointermove pointerup pointercancel";au.MSPointerEvent&&!au.PointerEvent&&(VK="MSPointerDown",YK="MSPointerMove MSPointerUp MSPointerCancel");var KK=(function(r){$s(e,r);function e(){var n,i=e.prototype;return i.evEl=VK,i.evWin=YK,n=r.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var t=e.prototype;return t.handler=function(i){var a=this.store,o=!1,u=i.type.toLowerCase().replace("ms",""),c=Zde[u],h=Jde[i.pointerType]||i.pointerType,f=h===fg,v=Dd(a,i.pointerId,"pointerId");c&ba&&(i.button===0||f)?v<0&&(a.push(i),v=a.length-1):c&(Zn|qa)&&(o=!0),!(v<0)&&(a[v]=i,this.callback(this.manager,c,{pointers:a,changedPointers:[i],pointerType:h,srcEvent:i}),o&&a.splice(v,1))},e})(Zf);function Uv(r){return Array.prototype.slice.call(r,0)}function oA(r,e,t){for(var n=[],i=[],a=0;a<r.length;){var o=e?r[a][e]:r[a];Dd(i,o)<0&&n.push(r[a]),i[a]=o,a++}return t&&(e?n=n.sort(function(u,c){return u[e]>c[e]}):n=n.sort()),n}var ehe={touchstart:ba,touchmove:Gd,touchend:Zn,touchcancel:qa},the="touchstart touchmove touchend touchcancel",lA=(function(r){$s(e,r);function e(){var n;return e.prototype.evTarget=the,n=r.apply(this,arguments)||this,n.targetIds={},n}var t=e.prototype;return t.handler=function(i){var a=ehe[i.type],o=rhe.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:fg,srcEvent:i})},e})(Zf);function rhe(r,e){var t=Uv(r.touches),n=this.targetIds;if(e&(ba|Gd)&&t.length===1)return n[t[0].identifier]=!0,[t,t];var i,a,o=Uv(r.changedTouches),u=[],c=this.target;if(a=t.filter(function(h){return sA(h.target,c)}),e===ba)for(i=0;i<a.length;)n[a[i].identifier]=!0,i++;for(i=0;i<o.length;)n[o[i].identifier]&&u.push(o[i]),e&(Zn|qa)&&delete n[o[i].identifier],i++;if(u.length)return[oA(a.concat(u),"identifier",!0),u]}var nhe={mousedown:ba,mousemove:Gd,mouseup:Zn},ihe="mousedown",ahe="mousemove mouseup",uA=(function(r){$s(e,r);function e(){var n,i=e.prototype;return i.evEl=ihe,i.evWin=ahe,n=r.apply(this,arguments)||this,n.pressed=!1,n}var t=e.prototype;return t.handler=function(i){var a=nhe[i.type];a&ba&&i.button===0&&(this.pressed=!0),a&Gd&&i.which!==1&&(a=Zn),this.pressed&&(a&Zn&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:aA,srcEvent:i}))},e})(Zf),she=2500,zD=25;function UD(r){var e=r.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(n);var a=function(){var u=i.indexOf(n);u>-1&&i.splice(u,1)};setTimeout(a,she)}}function ohe(r,e){r&ba?(this.primaryTouch=e.changedPointers[0].identifier,UD.call(this,e)):r&(Zn|qa)&&UD.call(this,e)}function lhe(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],a=Math.abs(e-i.x),o=Math.abs(t-i.y);if(a<=zD&&o<=zD)return!0}return!1}var XK=(function(){var r=(function(e){$s(t,e);function t(i,a){var o;return o=e.call(this,i,a)||this,o.handler=function(u,c,h){var f=h.pointerType===fg,v=h.pointerType===aA;if(!(v&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(f)ohe.call(Ym(Ym(o)),c,h);else if(v&&lhe.call(Ym(Ym(o)),h))return;o.callback(u,c,h)}},o.touch=new lA(o.manager,o.handler),o.mouse=new uA(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(Zf);return r})();function uhe(r){var e,t=r.options.inputClass;return t?e=t:Bde?e=KK:Fde?e=lA:BK?e=XK:e=uA,new e(r,Qde)}function ff(r,e,t){return Array.isArray(r)?(su(r,t[e],t),!0):!1}var c1=1,Ps=2,Rf=4,Ec=8,ou=Ec,Hv=16,nl=32,che=1;function dhe(){return che++}function Xm(r,e){var t=e.manager;return t?t.get(r):r}function HD(r){return r&Hv?"cancel":r&Ec?"end":r&Rf?"move":r&Ps?"start":""}var mg=(function(){function r(t){t===void 0&&(t={}),this.options=xo({enable:!0},t),this.id=dhe(),this.manager=null,this.state=c1,this.simultaneous={},this.requireFail=[]}var e=r.prototype;return e.set=function(n){return jd(this.options,n),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(n){if(ff(n,"recognizeWith",this))return this;var i=this.simultaneous;return n=Xm(n,this),i[n.id]||(i[n.id]=n,n.recognizeWith(this)),this},e.dropRecognizeWith=function(n){return ff(n,"dropRecognizeWith",this)?this:(n=Xm(n,this),delete this.simultaneous[n.id],this)},e.requireFailure=function(n){if(ff(n,"requireFailure",this))return this;var i=this.requireFail;return n=Xm(n,this),Dd(i,n)===-1&&(i.push(n),n.requireFailure(this)),this},e.dropRequireFailure=function(n){if(ff(n,"dropRequireFailure",this))return this;n=Xm(n,this);var i=Dd(this.requireFail,n);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},e.emit=function(n){var i=this,a=this.state;function o(u){i.manager.emit(u,n)}a<Ec&&o(i.options.event+HD(a)),o(i.options.event),n.additionalEvent&&o(n.additionalEvent),a>=Ec&&o(i.options.event+HD(a))},e.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=nl},e.canEmit=function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(nl|c1)))return!1;n++}return!0},e.recognize=function(n){var i=jd({},n);if(!iy(this.options.enable,[this,i])){this.reset(),this.state=nl;return}this.state&(ou|Hv|nl)&&(this.state=c1),this.state=this.process(i),this.state&(Ps|Rf|Ec|Hv)&&this.tryEmit(i)},e.process=function(n){},e.getTouchAction=function(){},e.reset=function(){},r})(),s6=(function(r){$s(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,xo({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},n))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[i6]},t.process=function(i){var a=this,o=this.options,u=i.pointers.length===o.pointers,c=i.distance<o.threshold,h=i.deltaTime<o.time;if(this.reset(),i.eventType&ba&&this.count===0)return this.failTimeout();if(c&&h&&u){if(i.eventType!==Zn)return this.failTimeout();var f=this.pTime?i.timeStamp-this.pTime<o.interval:!0,v=!this.pCenter||R1(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!v||!f?this.count=1:this.count+=1,this._input=i;var y=this.count%o.taps;if(y===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=ou,a.tryEmit()},o.interval),Ps):ou}return nl},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=nl},this.options.interval),nl},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===ou&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(mg),Cf=(function(r){$s(e,r);function e(n){return n===void 0&&(n={}),r.call(this,xo({pointers:1},n))||this}var t=e.prototype;return t.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},t.process=function(i){var a=this.state,o=i.eventType,u=a&(Ps|Rf),c=this.attrTest(i);return u&&(o&qa||!c)?a|Hv:u||c?o&Zn?a|Ec:a&Ps?a|Rf:Ps:nl},e})(mg);function QK(r){return r===Af?"down":r===gg?"up":r===pg?"left":r===vg?"right":""}var cA=(function(r){$s(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,xo({event:"pan",threshold:10,pointers:1,direction:FK},n))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,a=[];return i&ol&&a.push(Fv),i&Sd&&a.push(Bv),a},t.directionTest=function(i){var a=this.options,o=!0,u=i.distance,c=i.direction,h=i.deltaX,f=i.deltaY;return c&a.direction||(a.direction&ol?(c=h===0?O1:h<0?pg:vg,o=h!==this.pX,u=Math.abs(i.deltaX)):(c=f===0?O1:f<0?gg:Af,o=f!==this.pY,u=Math.abs(i.deltaY))),i.direction=c,o&&u>a.threshold&&c&a.direction},t.attrTest=function(i){return Cf.prototype.attrTest.call(this,i)&&(this.state&Ps||!(this.state&Ps)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=QK(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},e})(Cf),ZK=(function(r){$s(e,r);function e(n){return n===void 0&&(n={}),r.call(this,xo({event:"swipe",threshold:10,velocity:.3,direction:ol|Sd,pointers:1},n))||this}var t=e.prototype;return t.getTouchAction=function(){return cA.prototype.getTouchAction.call(this)},t.attrTest=function(i){var a=this.options.direction,o;return a&(ol|Sd)?o=i.overallVelocity:a&ol?o=i.overallVelocityX:a&Sd&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Md(o)>this.options.velocity&&i.eventType&Zn},t.emit=function(i){var a=QK(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},e})(Cf),JK=(function(r){$s(e,r);function e(n){return n===void 0&&(n={}),r.call(this,xo({event:"pinch",threshold:0,pointers:2},n))||this}var t=e.prototype;return t.getTouchAction=function(){return[_d]},t.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ps)},t.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},e})(Cf),eX=(function(r){$s(e,r);function e(n){return n===void 0&&(n={}),r.call(this,xo({event:"rotate",threshold:0,pointers:2},n))||this}var t=e.prototype;return t.getTouchAction=function(){return[_d]},t.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ps)},e})(Cf),tX=(function(r){$s(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,xo({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[$K]},t.process=function(i){var a=this,o=this.options,u=i.pointers.length===o.pointers,c=i.distance<o.threshold,h=i.deltaTime>o.time;if(this._input=i,!c||!u||i.eventType&(Zn|qa)&&!h)this.reset();else if(i.eventType&ba)this.reset(),this._timer=setTimeout(function(){a.state=ou,a.tryEmit()},o.time);else if(i.eventType&Zn)return ou;return nl},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===ou&&(i&&i.eventType&Zn?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=iA(),this.manager.emit(this.options.event,this._input)))},e})(mg),rX={domEvents:!1,touchAction:LK,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},WD=[[eX,{enable:!1}],[JK,{enable:!1},["rotate"]],[ZK,{direction:ol}],[cA,{direction:ol},["swipe"]],[s6],[s6,{event:"doubletap",taps:2},["tap"]],[tX]],hhe=1,GD=2;function VD(r,e){var t=r.element;if(t.style){var n;su(r.options.cssProps,function(i,a){n=ny(t.style,a),e?(r.oldCssProps[n]=t.style[n],t.style[n]=i):t.style[n]=r.oldCssProps[n]||""}),e||(r.oldCssProps={})}}function fhe(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var YD=(function(){function r(t,n){var i=this;this.options=jd({},rX,n||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=uhe(this),this.touchAction=new UK(this,this.options.touchAction),VD(this,!0),su(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var e=r.prototype;return e.set=function(n){return jd(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},e.stop=function(n){this.session.stopped=n?GD:hhe},e.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var a,o=this.recognizers,u=i.curRecognizer;(!u||u&&u.state&ou)&&(i.curRecognizer=null,u=null);for(var c=0;c<o.length;)a=o[c],i.stopped!==GD&&(!u||a===u||a.canRecognizeWith(u))?a.recognize(n):a.reset(),!u&&a.state&(Ps|Rf|Ec)&&(i.curRecognizer=a,u=a),c++}},e.get=function(n){if(n instanceof mg)return n;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===n)return i[a];return null},e.add=function(n){if(ff(n,"add",this))return this;var i=this.get(n.options.event);return i&&this.remove(i),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},e.remove=function(n){if(ff(n,"remove",this))return this;var i=this.get(n);if(n){var a=this.recognizers,o=Dd(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},e.on=function(n,i){if(n===void 0||i===void 0)return this;var a=this.handlers;return su(zv(n),function(o){a[o]=a[o]||[],a[o].push(i)}),this},e.off=function(n,i){if(n===void 0)return this;var a=this.handlers;return su(zv(n),function(o){i?a[o]&&a[o].splice(Dd(a[o],i),1):delete a[o]}),this},e.emit=function(n,i){this.options.domEvents&&fhe(n,i);var a=this.handlers[n]&&this.handlers[n].slice();if(!(!a||!a.length)){i.type=n,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},e.destroy=function(){this.element&&VD(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r})(),phe={touchstart:ba,touchmove:Gd,touchend:Zn,touchcancel:qa},vhe="touchstart",ghe="touchstart touchmove touchend touchcancel",mhe=(function(r){$s(e,r);function e(){var n,i=e.prototype;return i.evTarget=vhe,i.evWin=ghe,n=r.apply(this,arguments)||this,n.started=!1,n}var t=e.prototype;return t.handler=function(i){var a=phe[i.type];if(a===ba&&(this.started=!0),!!this.started){var o=yhe.call(this,i,a);a&(Zn|qa)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:fg,srcEvent:i})}},e})(Zf);function yhe(r,e){var t=Uv(r.touches),n=Uv(r.changedTouches);return e&(Zn|qa)&&(t=oA(t.concat(n),"identifier",!0)),[t,n]}function nX(r,e,t){var n="DEPRECATED METHOD: "+e+`
|
|
650
|
+
`+t+` AT
|
|
651
|
+
`;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,a),r.apply(this,arguments)}}var iX=nX(function(r,e,t){for(var n=Object.keys(e),i=0;i<n.length;)(!t||t&&r[n[i]]===void 0)&&(r[n[i]]=e[n[i]]),i++;return r},"extend","Use `assign`."),bhe=nX(function(r,e){return iX(r,e,!0)},"merge","Use `assign`.");function whe(r,e,t){var n=e.prototype,i;i=r.prototype=Object.create(n),i.constructor=r,i._super=n,t&&jd(i,t)}function KD(r,e){return function(){return r.apply(e,arguments)}}var xhe=(function(){var r=function(t,n){return n===void 0&&(n={}),new YD(t,xo({recognizers:WD.concat()},n))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=FK,r.DIRECTION_DOWN=Af,r.DIRECTION_LEFT=pg,r.DIRECTION_RIGHT=vg,r.DIRECTION_UP=gg,r.DIRECTION_HORIZONTAL=ol,r.DIRECTION_VERTICAL=Sd,r.DIRECTION_NONE=O1,r.DIRECTION_DOWN=Af,r.INPUT_START=ba,r.INPUT_MOVE=Gd,r.INPUT_END=Zn,r.INPUT_CANCEL=qa,r.STATE_POSSIBLE=c1,r.STATE_BEGAN=Ps,r.STATE_CHANGED=Rf,r.STATE_ENDED=Ec,r.STATE_RECOGNIZED=ou,r.STATE_CANCELLED=Hv,r.STATE_FAILED=nl,r.Manager=YD,r.Input=Zf,r.TouchAction=UK,r.TouchInput=lA,r.MouseInput=uA,r.PointerEventInput=KK,r.TouchMouseInput=XK,r.SingleTouchInput=mhe,r.Recognizer=mg,r.AttrRecognizer=Cf,r.Tap=s6,r.Pan=cA,r.Swipe=ZK,r.Pinch=JK,r.Rotate=eX,r.Press=tX,r.on=Ev,r.off=Tv,r.each=su,r.merge=bhe,r.extend=iX,r.bindFn=KD,r.assign=jd,r.inherit=whe,r.bindFn=KD,r.prefixed=ny,r.toArray=Uv,r.inArray=Dd,r.uniqueArray=oA,r.splitStr=zv,r.boolOrFn=iy,r.hasParent=sA,r.addEventListeners=Ev,r.removeEventListeners=Tv,r.defaults=jd({},rX,{preset:WD}),r})();const aX=sce("DELETE");function _he(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return sX({},r,...t)}function sX(){const r=C1(...arguments);return lX(r),r}function C1(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<2)return e[0];if(e.length>2)return C1(sX(e[0],e[1]),...fce(e).call(e,2));const n=e[0],i=e[1];if(n instanceof Date&&i instanceof Date)return n.setTime(i.getTime()),n;for(const a of bce(i))Object.prototype.propertyIsEnumerable.call(i,a)&&(i[a]===aX?delete n[a]:n[a]!==null&&i[a]!==null&&typeof n[a]=="object"&&typeof i[a]=="object"&&!el(n[a])&&!el(i[a])?n[a]=C1(n[a],i[a]):n[a]=oX(i[a]));return n}function oX(r){return el(r)?yo(r).call(r,e=>oX(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):C1({},r):r}function lX(r){for(const e of nA(r))r[e]===aX?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&lX(r[e])}function She(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const Ehe=typeof window<"u"?window.Hammer||xhe:function(){return She()};function ru(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=Ehe(this._dom.overlay);t.on("tap",kK(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Pd(n).call(n,i=>{t.on(i,a=>{a.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=i=>{The(i.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=i=>{("key"in i?i.key==="Escape":i.keyCode===27)&&this.deactivate()}}Mde(ru.prototype);ru.current=null;ru.prototype.destroy=function(){this.deactivate();for(const t of Uce(r=jK(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};ru.prototype.activate=function(){ru.current&&ru.current.deactivate(),ru.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};ru.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};ru.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function The(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var Kw,XD;function Ohe(){if(XD)return Kw;XD=1,bK();var r=fi();return Kw=r.Object.getOwnPropertySymbols,Kw}var Xw,QD;function Ahe(){if(QD)return Xw;QD=1;var r=Ohe();return Xw=r,Xw}var Qw,ZD;function Rhe(){return ZD||(ZD=1,Qw=Ahe()),Qw}var Che=Rhe(),JD=gr(Che),Zw={exports:{}},eq={},tq;function khe(){if(tq)return eq;tq=1;var r=nr(),e=$r(),t=vl(),n=V1().f,i=ri(),a=!i||e(function(){n(1)});return r({target:"Object",stat:!0,forced:a,sham:!i},{getOwnPropertyDescriptor:function(u,c){return n(t(u),c)}}),eq}var rq;function Nhe(){if(rq)return Zw.exports;rq=1,khe();var r=fi(),e=r.Object,t=Zw.exports=function(i,a){return e.getOwnPropertyDescriptor(i,a)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Zw.exports}var Jw,nq;function Ihe(){if(nq)return Jw;nq=1;var r=Nhe();return Jw=r,Jw}var ex,iq;function Phe(){return iq||(iq=1,ex=Ihe()),ex}var jhe=Phe(),uX=gr(jhe),aq={},sq;function Mhe(){if(sq)return aq;sq=1;var r=nr(),e=ri(),t=IK(),n=vl(),i=V1(),a=K1();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(u){for(var c=n(u),h=i.f,f=t(c),v={},y=0,g,_;f.length>y;)_=h(c,g=f[y++]),_!==void 0&&a(v,g,_);return v}}),aq}var tx,oq;function Dhe(){if(oq)return tx;oq=1,Mhe();var r=fi();return tx=r.Object.getOwnPropertyDescriptors,tx}var rx,lq;function qhe(){if(lq)return rx;lq=1;var r=Dhe();return rx=r,rx}var nx,uq;function Lhe(){return uq||(uq=1,nx=qhe()),nx}var $he=Lhe(),cq=gr($he),ix={exports:{}},dq={},hq;function Bhe(){if(hq)return dq;hq=1;var r=nr(),e=ri(),t=J6().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),dq}var fq;function Fhe(){if(fq)return ix.exports;fq=1,Bhe();var r=fi(),e=r.Object,t=ix.exports=function(i,a){return e.defineProperties(i,a)};return e.defineProperties.sham&&(t.sham=!0),ix.exports}var ax,pq;function zhe(){if(pq)return ax;pq=1;var r=Fhe();return ax=r,ax}var sx,vq;function Uhe(){return vq||(vq=1,sx=zhe()),sx}var Hhe=Uhe(),Whe=gr(Hhe),ox,gq;function Ghe(){return gq||(gq=1,ox=uK()),ox}var Vhe=Ghe(),Yhe=gr(Vhe),mq={},yq={},lx={exports:{}},ux,bq;function Khe(){if(bq)return ux;bq=1;var r=$r();return ux=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),ux}var cx,wq;function Xhe(){if(wq)return cx;wq=1;var r=$r(),e=xa(),t=vu(),n=Khe(),i=Object.isExtensible,a=r(function(){});return cx=a||n?function(u){return!e(u)||n&&t(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,cx}var dx,xq;function Qhe(){if(xq)return dx;xq=1;var r=$r();return dx=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),dx}var _q;function cX(){if(_q)return lx.exports;_q=1;var r=nr(),e=Xr(),t=ug(),n=xa(),i=Ni(),a=Ls().f,o=Z1(),u=vK(),c=Xhe(),h=G1(),f=Qhe(),v=!1,y=h("meta"),g=0,_=function(k){a(k,y,{value:{objectID:"O"+g++,weakData:{}}})},E=function(k,j){if(!n(k))return typeof k=="symbol"?k:(typeof k=="string"?"S":"P")+k;if(!i(k,y)){if(!c(k))return"F";if(!j)return"E";_(k)}return k[y].objectID},A=function(k,j){if(!i(k,y)){if(!c(k))return!0;if(!j)return!1;_(k)}return k[y].weakData},T=function(k){return f&&v&&c(k)&&!i(k,y)&&_(k),k},C=function(){N.enable=function(){},v=!0;var k=o.f,j=e([].splice),W={};W[y]=1,k(W).length&&(o.f=function(G){for(var D=k(G),M=0,U=D.length;M<U;M++)if(D[M]===y){j(D,M,1);break}return D},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},N=lx.exports={enable:C,fastKey:E,getWeakData:A,onFreeze:T};return t[y]=!0,lx.exports}var hx,Sq;function Zhe(){if(Sq)return hx;Sq=1;var r=Ii(),e=Qf(),t=r("iterator"),n=Array.prototype;return hx=function(i){return i!==void 0&&(e.Array===i||n[t]===i)},hx}var fx,Eq;function dX(){if(Eq)return fx;Eq=1;var r=Mc(),e=G6(),t=ag(),n=Qf(),i=Ii(),a=i("iterator");return fx=function(o){if(!t(o))return e(o,a)||e(o,"@@iterator")||n[r(o)]},fx}var px,Tq;function hX(){if(Tq)return px;Tq=1;var r=Ba(),e=gu(),t=mu(),n=Hf(),i=dX(),a=TypeError;return px=function(o,u){var c=arguments.length<2?i(o):u;if(e(c))return t(r(c,o));throw new a(n(o)+" is not iterable")},px}var vx,Oq;function dA(){if(Oq)return vx;Oq=1;var r=Ba(),e=mu(),t=G6();return vx=function(n,i,a){var o,u;e(n);try{if(o=t(n,"return"),!o){if(i==="throw")throw a;return a}o=r(o,n)}catch(c){u=!0,o=c}if(i==="throw")throw a;if(u)throw o;return e(o),a},vx}var gx,Aq;function hA(){if(Aq)return gx;Aq=1;var r=Y1(),e=Ba(),t=mu(),n=Hf(),i=Zhe(),a=jc(),o=ki(),u=hX(),c=dX(),h=dA(),f=TypeError,v=function(g,_){this.stopped=g,this.result=_},y=v.prototype;return gx=function(g,_,E){var A=E&&E.that,T=!!(E&&E.AS_ENTRIES),C=!!(E&&E.IS_RECORD),N=!!(E&&E.IS_ITERATOR),k=!!(E&&E.INTERRUPTED),j=r(_,A),W,G,D,M,U,I,q,z=function(ce){return W&&h(W,"normal"),new v(!0,ce)},Q=function(ce){return T?(t(ce),k?j(ce[0],ce[1],z):j(ce[0],ce[1])):k?j(ce,z):j(ce)};if(C)W=g.iterator;else if(N)W=g;else{if(G=c(g),!G)throw new f(n(g)+" is not iterable");if(i(G)){for(D=0,M=a(g);M>D;D++)if(U=Q(g[D]),U&&o(y,U))return U;return new v(!1)}W=u(g,G)}for(I=C?g.next:W.next;!(q=e(I,W)).done;){try{U=Q(q.value)}catch(ce){h(W,"throw",ce)}if(typeof U=="object"&&U&&o(y,U))return U}return new v(!1)},gx}var mx,Rq;function fX(){if(Rq)return mx;Rq=1;var r=ki(),e=TypeError;return mx=function(t,n){if(r(n,t))return t;throw new e("Incorrect invocation")},mx}var yx,Cq;function pX(){if(Cq)return yx;Cq=1;var r=nr(),e=ti(),t=cX(),n=$r(),i=Vf(),a=hA(),o=fX(),u=Ci(),c=xa(),h=ag(),f=Wd(),v=Ls().f,y=Xf().forEach,g=ri(),_=hg(),E=_.set,A=_.getterFor;return yx=function(T,C,N){var k=T.indexOf("Map")!==-1,j=T.indexOf("Weak")!==-1,W=k?"set":"add",G=e[T],D=G&&G.prototype,M={},U;if(!g||!u(G)||!(j||D.forEach&&!n(function(){new G().entries().next()})))U=N.getConstructor(C,T,k,W),t.enable();else{U=C(function(z,Q){E(o(z,I),{type:T,collection:new G}),h(Q)||a(Q,z[W],{that:z,AS_ENTRIES:k})});var I=U.prototype,q=A(T);y(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(z){var Q=z==="add"||z==="set";z in D&&!(j&&z==="clear")&&i(I,z,function(ce,re){var J=q(this).collection;if(!Q&&j&&!c(ce))return z==="get"?void 0:!1;var le=J[z](ce===0?0:ce,re);return Q?this:le})}),j||v(I,"size",{configurable:!0,get:function(){return q(this).collection.size}})}return f(U,T,!1,!0),M[T]=U,r({global:!0,forced:!0},M),j||N.setStrong(U,T,k),U},yx}var bx,kq;function Jhe(){if(kq)return bx;kq=1;var r=dg();return bx=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:r(e,i,t[i],n);return e},bx}var wx,Nq;function efe(){if(Nq)return wx;Nq=1;var r=hs(),e=eA(),t=Ii(),n=ri(),i=t("species");return wx=function(a){var o=r(a);n&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},wx}var xx,Iq;function vX(){if(Iq)return xx;Iq=1;var r=cg(),e=eA(),t=Jhe(),n=Y1(),i=fX(),a=ag(),o=hA(),u=tA(),c=rA(),h=efe(),f=ri(),v=cX().fastKey,y=hg(),g=y.set,_=y.getterFor;return xx={getConstructor:function(E,A,T,C){var N=E(function(D,M){i(D,k),g(D,{type:A,index:r(null),first:null,last:null,size:0}),f||(D.size=0),a(M)||o(M,D[C],{that:D,AS_ENTRIES:T})}),k=N.prototype,j=_(A),W=function(D,M,U){var I=j(D),q=G(D,M),z,Q;return q?q.value=U:(I.last=q={index:Q=v(M,!0),key:M,value:U,previous:z=I.last,next:null,removed:!1},I.first||(I.first=q),z&&(z.next=q),f?I.size++:D.size++,Q!=="F"&&(I.index[Q]=q)),D},G=function(D,M){var U=j(D),I=v(M),q;if(I!=="F")return U.index[I];for(q=U.first;q;q=q.next)if(q.key===M)return q};return t(k,{clear:function(){for(var M=this,U=j(M),I=U.first;I;)I.removed=!0,I.previous&&(I.previous=I.previous.next=null),I=I.next;U.first=U.last=null,U.index=r(null),f?U.size=0:M.size=0},delete:function(D){var M=this,U=j(M),I=G(M,D);if(I){var q=I.next,z=I.previous;delete U.index[I.index],I.removed=!0,z&&(z.next=q),q&&(q.previous=z),U.first===I&&(U.first=q),U.last===I&&(U.last=z),f?U.size--:M.size--}return!!I},forEach:function(M){for(var U=j(this),I=n(M,arguments.length>1?arguments[1]:void 0),q;q=q?q.next:U.first;)for(I(q.value,q.key,this);q&&q.removed;)q=q.previous},has:function(M){return!!G(this,M)}}),t(k,T?{get:function(M){var U=G(this,M);return U&&U.value},set:function(M,U){return W(this,M===0?0:M,U)}}:{add:function(M){return W(this,M=M===0?0:M,M)}}),f&&e(k,"size",{configurable:!0,get:function(){return j(this).size}}),N},setStrong:function(E,A,T){var C=A+" Iterator",N=_(A),k=_(C);u(E,A,function(j,W){g(this,{type:C,target:j,state:N(j),kind:W,last:null})},function(){for(var j=k(this),W=j.kind,G=j.last;G&&G.removed;)G=G.previous;return!j.target||!(j.last=G=G?G.next:j.state.first)?(j.target=null,c(void 0,!0)):c(W==="keys"?G.key:W==="values"?G.value:[G.key,G.value],!1)},T?"entries":"values",!T,!0),h(A)}},xx}var Pq;function tfe(){if(Pq)return yq;Pq=1;var r=pX(),e=vX();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),yq}var jq;function rfe(){return jq||(jq=1,tfe()),mq}var Mq={},_x,Dq;function gX(){return Dq||(Dq=1,_x=function(r,e){return e===1?function(t,n){return t[r](n)}:function(t,n,i){return t[r](n,i)}}),_x}var Sx,qq;function nfe(){if(qq)return Sx;qq=1;var r=hs(),e=gX(),t=r("Map");return Sx={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Sx}var Lq;function ife(){if(Lq)return Mq;Lq=1;var r=nr(),e=Xr(),t=gu(),n=Ud(),i=hA(),a=nfe(),o=Wf(),u=$r(),c=a.Map,h=a.has,f=a.get,v=a.set,y=e([].push),g=o||u(function(){return c.groupBy("ab",function(_){return _}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||g},{groupBy:function(E,A){n(E),t(A);var T=new c,C=0;return i(E,function(N){var k=A(N,C++);h(T,k)?y(f(T,k),N):v(T,k,[N])}),T}}),Mq}var Ex,$q;function afe(){if($q)return Ex;$q=1,qc(),rfe(),ife(),ty();var r=fi();return Ex=r.Map,Ex}var Tx,Bq;function sfe(){if(Bq)return Tx;Bq=1;var r=afe();return Lc(),Tx=r,Tx}var Ox,Fq;function ofe(){return Fq||(Fq=1,Ox=sfe()),Ox}var lfe=ofe(),mX=gr(lfe),zq={},Uq;function ufe(){if(Uq)return zq;Uq=1;var r=nr(),e=Xf().some,t=ry(),n=t("some");return r({target:"Array",proto:!0,forced:!n},{some:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),zq}var Ax,Hq;function cfe(){if(Hq)return Ax;Hq=1,ufe();var r=Fa();return Ax=r("Array","some"),Ax}var Rx,Wq;function dfe(){if(Wq)return Rx;Wq=1;var r=ki(),e=cfe(),t=Array.prototype;return Rx=function(n){var i=n.some;return n===t||r(t,n)&&i===t.some?e:i},Rx}var Cx,Gq;function hfe(){if(Gq)return Cx;Gq=1;var r=dfe();return Cx=r,Cx}var kx,Vq;function ffe(){return Vq||(Vq=1,kx=hfe()),kx}var pfe=ffe(),vfe=gr(pfe),Nx,Yq;function gfe(){if(Yq)return Nx;Yq=1,qc();var r=Fa();return Nx=r("Array","keys"),Nx}var Ix,Kq;function mfe(){if(Kq)return Ix;Kq=1;var r=gfe();return Ix=r,Ix}var Px,Xq;function yfe(){if(Xq)return Px;Xq=1,Lc();var r=Mc(),e=Ni(),t=ki(),n=mfe(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Px=function(o){var u=o.keys;return o===i||t(i,o)&&u===i.keys||e(a,r(o))?n:u},Px}var jx,Qq;function bfe(){return Qq||(Qq=1,jx=yfe()),jx}var wfe=bfe(),nf=gr(wfe),Zq={},Mx,Jq;function xfe(){if(Jq)return Mx;Jq=1;var r=Kf(),e=Math.floor,t=function(n,i){var a=n.length;if(a<8)for(var o=1,u,c;o<a;){for(c=o,u=n[o];c&&i(n[c-1],u)>0;)n[c]=n[--c];c!==o++&&(n[c]=u)}else for(var h=e(a/2),f=t(r(n,0,h),i),v=t(r(n,h),i),y=f.length,g=v.length,_=0,E=0;_<y||E<g;)n[_+E]=_<y&&E<g?i(f[_],v[E])<=0?f[_++]:v[E++]:_<y?f[_++]:v[E++];return n};return Mx=t,Mx}var Dx,eL;function _fe(){if(eL)return Dx;eL=1;var r=zf(),e=r.match(/firefox\/(\d+)/i);return Dx=!!e&&+e[1],Dx}var qx,tL;function Sfe(){if(tL)return qx;tL=1;var r=zf();return qx=/MSIE|Trident/.test(r),qx}var Lx,rL;function Efe(){if(rL)return Lx;rL=1;var r=zf(),e=r.match(/AppleWebKit\/(\d+)\./);return Lx=!!e&&+e[1],Lx}var nL;function Tfe(){if(nL)return Zq;nL=1;var r=nr(),e=Xr(),t=gu(),n=Oo(),i=jc(),a=PK(),o=Dc(),u=$r(),c=xfe(),h=ry(),f=_fe(),v=Sfe(),y=sg(),g=Efe(),_=[],E=e(_.sort),A=e(_.push),T=u(function(){_.sort(void 0)}),C=u(function(){_.sort(null)}),N=h("sort"),k=!u(function(){if(y)return y<70;if(!(f&&f>3)){if(v)return!0;if(g)return g<603;var G="",D,M,U,I;for(D=65;D<76;D++){switch(M=String.fromCharCode(D),D){case 66:case 69:case 70:case 72:U=3;break;case 68:case 71:U=4;break;default:U=2}for(I=0;I<47;I++)_.push({k:M+I,v:U})}for(_.sort(function(q,z){return z.v-q.v}),I=0;I<_.length;I++)M=_[I].k.charAt(0),G.charAt(G.length-1)!==M&&(G+=M);return G!=="DGBEFHACIJK"}}),j=T||!C||!N||!k,W=function(G){return function(D,M){return M===void 0?-1:D===void 0?1:G!==void 0?+G(D,M)||0:o(D)>o(M)?1:-1}};return r({target:"Array",proto:!0,forced:j},{sort:function(D){D!==void 0&&t(D);var M=n(this);if(k)return D===void 0?E(M):E(M,D);var U=[],I=i(M),q,z;for(z=0;z<I;z++)z in M&&A(U,M[z]);for(c(U,W(D)),q=i(U),z=0;z<q;)M[z]=U[z++];for(;z<I;)a(M,z++);return M}}),Zq}var $x,iL;function Ofe(){if(iL)return $x;iL=1,Tfe();var r=Fa();return $x=r("Array","sort"),$x}var Bx,aL;function Afe(){if(aL)return Bx;aL=1;var r=ki(),e=Ofe(),t=Array.prototype;return Bx=function(n){var i=n.sort;return n===t||r(t,n)&&i===t.sort?e:i},Bx}var Fx,sL;function Rfe(){if(sL)return Fx;sL=1;var r=Afe();return Fx=r,Fx}var zx,oL;function Cfe(){return oL||(oL=1,zx=Rfe()),zx}var kfe=Cfe(),o6=gr(kfe),Ux,lL;function Nfe(){if(lL)return Ux;lL=1,qc();var r=Fa();return Ux=r("Array","values"),Ux}var Hx,uL;function Ife(){if(uL)return Hx;uL=1;var r=Nfe();return Hx=r,Hx}var Wx,cL;function Pfe(){if(cL)return Wx;cL=1,Lc();var r=Mc(),e=Ni(),t=ki(),n=Ife(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Wx=function(o){var u=o.values;return o===i||t(i,o)&&u===i.values||e(a,r(o))?n:u},Wx}var Gx,dL;function jfe(){return dL||(dL=1,Gx=Pfe()),Gx}var Mfe=jfe(),hL=gr(Mfe),Vx,fL;function Dfe(){return fL||(fL=1,Vx=CK()),Vx}var qfe=Dfe(),pf=gr(qfe),Yx,pL;function Lfe(){if(pL)return Yx;pL=1,qc();var r=Fa();return Yx=r("Array","entries"),Yx}var Kx,vL;function $fe(){if(vL)return Kx;vL=1;var r=Lfe();return Kx=r,Kx}var Xx,gL;function Bfe(){if(gL)return Xx;gL=1,Lc();var r=Mc(),e=Ni(),t=ki(),n=$fe(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Xx=function(o){var u=o.entries;return o===i||t(i,o)&&u===i.entries||e(a,r(o))?n:u},Xx}var Qx,mL;function Ffe(){return mL||(mL=1,Qx=Bfe()),Qx}var zfe=Ffe(),Ufe=gr(zfe);const Yi=[];for(let r=0;r<256;++r)Yi.push((r+256).toString(16).slice(1));function Hfe(r,e=0){return(Yi[r[e+0]]+Yi[r[e+1]]+Yi[r[e+2]]+Yi[r[e+3]]+"-"+Yi[r[e+4]]+Yi[r[e+5]]+"-"+Yi[r[e+6]]+Yi[r[e+7]]+"-"+Yi[r[e+8]]+Yi[r[e+9]]+"-"+Yi[r[e+10]]+Yi[r[e+11]]+Yi[r[e+12]]+Yi[r[e+13]]+Yi[r[e+14]]+Yi[r[e+15]]).toLowerCase()}let Zx;const Wfe=new Uint8Array(16);function Gfe(){if(!Zx){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Zx=crypto.getRandomValues.bind(crypto)}return Zx(Wfe)}const Vfe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var yL={randomUUID:Vfe};function Yfe(r,e,t){r=r||{};const n=r.random??r.rng?.()??Gfe();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Hfe(n)}function Kfe(r,e,t){return yL.randomUUID&&!r?yL.randomUUID():Yfe(r)}function bL(r){return typeof r=="string"||typeof r=="number"}class fA{constructor(e){Sc(this,"_queue",[]),Sc(this,"_timeout",null),Sc(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const n=new fA(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{n.flush()};const i=[{name:"flush",original:void 0}];if(t&&t.replace)for(let a=0;a<t.replace.length;a++){const o=t.replace[a];i.push({name:o,original:e[o]}),n.replace(e,o)}return n._extended={object:e,methods:i},n}destroy(){if(this.flush(),this._extended){const e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){const i=t[n];i.original?e[i.name]=i.original:delete e[i.name]}this._extended=null}}replace(e,t){const n=this,i=e[t];if(!i)throw new Error("Method "+t+" undefined");e[t]=function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];n.queue({args:o,fn:i,context:this})}}queue(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=Ide(()=>{this.flush()},this.delay))}flush(){var e,t;Pd(e=jK(t=this._queue).call(t,0)).call(e,n=>{n.fn.apply(n.context||n.fn,n.args||[])})}}class k1{constructor(){Sc(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Sc(this,"subscribe",k1.prototype.on),Sc(this,"unsubscribe",k1.prototype.off)}_trigger(e,t,n){var i;if(e==="*")throw new Error("Cannot trigger event *");Pd(i=[...this._subscribers[e],...this._subscribers["*"]]).call(i,a=>{a(e,t,n??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=df(n=this._subscribers[e]).call(n,i=>i!==t)}}var wL={},xL={},_L;function Xfe(){if(_L)return xL;_L=1;var r=pX(),e=vX();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),xL}var SL;function Qfe(){return SL||(SL=1,Xfe()),wL}var EL={},Jx,TL;function Vd(){if(TL)return Jx;TL=1;var r=Hf(),e=TypeError;return Jx=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Jx}var e_,OL;function Yd(){if(OL)return e_;OL=1;var r=hs(),e=gX(),t=r("Set"),n=t.prototype;return e_={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n},e_}var t_,AL;function Kd(){if(AL)return t_;AL=1;var r=Ba();return t_=function(e,t,n){for(var i=n?e:e.iterator,a=e.next,o,u;!(o=r(a,i)).done;)if(u=t(o.value),u!==void 0)return u},t_}var r_,RL;function yg(){if(RL)return r_;RL=1;var r=Kd();return r_=function(e,t,n){return n?r(e.keys(),t,!0):e.forEach(t)},r_}var n_,CL;function pA(){if(CL)return n_;CL=1;var r=Yd(),e=yg(),t=r.Set,n=r.add;return n_=function(i){var a=new t;return e(i,function(o){n(a,o)}),a},n_}var i_,kL;function bg(){return kL||(kL=1,i_=function(r){return r.size}),i_}var a_,NL;function Zfe(){return NL||(NL=1,a_=function(r){return{iterator:r,next:r.next,done:!1}}),a_}var s_,IL;function Xd(){if(IL)return s_;IL=1;var r=gu(),e=mu(),t=Ba(),n=Yf(),i=Zfe(),a="Invalid size",o=RangeError,u=TypeError,c=Math.max,h=function(f,v){this.set=f,this.size=c(v,0),this.has=r(f.has),this.keys=r(f.keys)};return h.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(f){return t(this.has,this.set,f)}},s_=function(f){e(f);var v=+f.size;if(v!==v)throw new u(a);var y=n(v);if(y<0)throw new o(a);return new h(f,y)},s_}var o_,PL;function Jfe(){if(PL)return o_;PL=1;var r=Vd(),e=Yd(),t=pA(),n=bg(),i=Xd(),a=yg(),o=Kd(),u=e.has,c=e.remove;return o_=function(f){var v=r(this),y=i(f),g=t(v);return n(v)<=y.size?a(v,function(_){y.includes(_)&&c(g,_)}):o(y.getIterator(),function(_){u(g,_)&&c(g,_)}),g},o_}var l_,jL;function Qd(){return jL||(jL=1,l_=function(){return!1}),l_}var ML;function epe(){if(ML)return EL;ML=1;var r=nr(),e=Jfe(),t=$r(),n=Qd(),i=!n("difference",function(o){return o.size===0}),a=i||t(function(){var o={size:1,has:function(){return!0},keys:function(){var c=0;return{next:function(){var h=c++>1;return u.has(1)&&u.clear(),{done:h,value:2}}}}},u=new Set([1,2,3,4]);return u.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:a},{difference:e}),EL}var DL={},u_,qL;function tpe(){if(qL)return u_;qL=1;var r=Vd(),e=Yd(),t=bg(),n=Xd(),i=yg(),a=Kd(),o=e.Set,u=e.add,c=e.has;return u_=function(f){var v=r(this),y=n(f),g=new o;return t(v)>y.size?a(y.getIterator(),function(_){c(v,_)&&u(g,_)}):i(v,function(_){y.includes(_)&&u(g,_)}),g},u_}var LL;function rpe(){if(LL)return DL;LL=1;var r=nr(),e=$r(),t=tpe(),n=Qd(),i=!n("intersection",function(a){return a.size===2&&a.has(1)&&a.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),DL}var $L={},c_,BL;function npe(){if(BL)return c_;BL=1;var r=Vd(),e=Yd().has,t=bg(),n=Xd(),i=yg(),a=Kd(),o=dA();return c_=function(c){var h=r(this),f=n(c);if(t(h)<=f.size)return i(h,function(y){if(f.includes(y))return!1},!0)!==!1;var v=f.getIterator();return a(v,function(y){if(e(h,y))return o(v,"normal",!1)})!==!1},c_}var FL;function ipe(){if(FL)return $L;FL=1;var r=nr(),e=npe(),t=Qd(),n=!t("isDisjointFrom",function(i){return!i});return r({target:"Set",proto:!0,real:!0,forced:n},{isDisjointFrom:e}),$L}var zL={},d_,UL;function ape(){if(UL)return d_;UL=1;var r=Vd(),e=bg(),t=yg(),n=Xd();return d_=function(a){var o=r(this),u=n(a);return e(o)>u.size?!1:t(o,function(c){if(!u.includes(c))return!1},!0)!==!1},d_}var HL;function spe(){if(HL)return zL;HL=1;var r=nr(),e=ape(),t=Qd(),n=!t("isSubsetOf",function(i){return i});return r({target:"Set",proto:!0,real:!0,forced:n},{isSubsetOf:e}),zL}var WL={},h_,GL;function ope(){if(GL)return h_;GL=1;var r=Vd(),e=Yd().has,t=bg(),n=Xd(),i=Kd(),a=dA();return h_=function(u){var c=r(this),h=n(u);if(t(c)<h.size)return!1;var f=h.getIterator();return i(f,function(v){if(!e(c,v))return a(f,"normal",!1)})!==!1},h_}var VL;function lpe(){if(VL)return WL;VL=1;var r=nr(),e=ope(),t=Qd(),n=!t("isSupersetOf",function(i){return!i});return r({target:"Set",proto:!0,real:!0,forced:n},{isSupersetOf:e}),WL}var YL={},f_,KL;function upe(){if(KL)return f_;KL=1;var r=Vd(),e=Yd(),t=pA(),n=Xd(),i=Kd(),a=e.add,o=e.has,u=e.remove;return f_=function(h){var f=r(this),v=n(h).getIterator(),y=t(f);return i(v,function(g){o(f,g)?u(y,g):a(y,g)}),y},f_}var p_,XL;function yX(){return XL||(XL=1,p_=function(r){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},n=e[r](t);return n.size===1&&n.values().next().value===4}catch{return!1}}),p_}var QL;function cpe(){if(QL)return YL;QL=1;var r=nr(),e=upe(),t=yX(),n=Qd(),i=!n("symmetricDifference")||!t("symmetricDifference");return r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),YL}var ZL={},v_,JL;function dpe(){if(JL)return v_;JL=1;var r=Vd(),e=Yd().add,t=pA(),n=Xd(),i=Kd();return v_=function(o){var u=r(this),c=n(o).getIterator(),h=t(u);return i(c,function(f){e(h,f)}),h},v_}var e7;function hpe(){if(e7)return ZL;e7=1;var r=nr(),e=dpe(),t=yX(),n=Qd(),i=!n("union")||!t("union");return r({target:"Set",proto:!0,real:!0,forced:i},{union:e}),ZL}var g_,t7;function fpe(){if(t7)return g_;t7=1,qc(),Qfe(),epe(),rpe(),ipe(),spe(),lpe(),cpe(),hpe(),ty();var r=fi();return g_=r.Set,g_}var m_,r7;function ppe(){if(r7)return m_;r7=1;var r=fpe();return Lc(),m_=r,m_}var y_,n7;function vpe(){return n7||(n7=1,y_=ppe()),y_}var gpe=vpe(),b_=gr(gpe),w_,i7;function mpe(){if(i7)return w_;i7=1,qc(),ty();var r=hX();return w_=r,w_}var x_,a7;function ype(){if(a7)return x_;a7=1;var r=mpe();return Lc(),x_=r,x_}var __,s7;function bpe(){if(s7)return __;s7=1;var r=ype();return __=r,__}var S_,o7;function wpe(){if(o7)return S_;o7=1;var r=bpe();return S_=r,S_}var E_,l7;function xpe(){return l7||(l7=1,E_=wpe()),E_}var T_,u7;function _pe(){return u7||(u7=1,T_=xpe()),T_}var Spe=_pe(),O_=gr(Spe);class yd{constructor(e){this._pairs=e}*[pf](){for(const[e,t]of this._pairs)yield[e,t]}*entries(){for(const[e,t]of this._pairs)yield[e,t]}*keys(){for(const[e]of this._pairs)yield e}*values(){for(const[,e]of this._pairs)yield e}toIdArray(){var e;return yo(e=[...this._pairs]).call(e,t=>t[0])}toItemArray(){var e;return yo(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=vde(null);for(const[t,n]of this._pairs)e[t]=n;return e}toMap(){return new mX(this._pairs)}toIdSet(){return new b_(this.toIdArray())}toItemSet(){return new b_(this.toItemArray())}cache(){return new yd([...this._pairs])}distinct(e){const t=new b_;for(const[n,i]of this._pairs)t.add(e(i,n));return t}filter(e){const t=this._pairs;return new yd({*[pf](){for(const[n,i]of t)e(i,n)&&(yield[n,i])}})}forEach(e){for(const[t,n]of this._pairs)e(n,t)}map(e){const t=this._pairs;return new yd({*[pf](){for(const[n,i]of t)yield[n,e(i,n)]}})}max(e){const t=O_(this._pairs);let n=t.next();if(n.done)return null;let i=n.value[1],a=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){const[o,u]=n.value,c=e(u,o);c>a&&(a=c,i=u)}return i}min(e){const t=O_(this._pairs);let n=t.next();if(n.done)return null;let i=n.value[1],a=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){const[o,u]=n.value,c=e(u,o);c<a&&(a=c,i=u)}return i}reduce(e,t){for(const[n,i]of this._pairs)t=e(t,i,n);return t}sort(e){return new yd({[pf]:()=>{var t;return O_(o6(t=[...this._pairs]).call(t,(n,i)=>{let[a,o]=n,[u,c]=i;return e(o,c,a,u)}))}})}}function c7(r,e){var t=nA(r);if(JD){var n=JD(r);e&&(n=df(n).call(n,function(i){return uX(r,i).enumerable})),t.push.apply(t,n)}return t}function d7(r){for(var e=1;e<arguments.length;e++){var t,n,i=arguments[e]!=null?arguments[e]:{};e%2?Pd(t=c7(Object(i),!0)).call(t,function(a){Sc(r,a,i[a])}):cq?Whe(r,cq(i)):Pd(n=c7(Object(i))).call(n,function(a){Yhe(r,a,uX(i,a))})}return r}function Epe(r,e){return r[e]==null&&(r[e]=Kfe()),r}class kf extends k1{get idProp(){return this._idProp}constructor(e,t){super(),Sc(this,"_queue",null),e&&!el(e)&&(t=e,e=[]),this._options=t||{},this._data=new mX,this.length=0,this._idProp=this._options.fieldId||"id",e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=fA.extend(this,{replace:["add","update","remove"]})),e.queue&&typeof e.queue=="object"&&this._queue.setOptions(e.queue)))}add(e,t){const n=[];let i;if(el(e)){const a=yo(e).call(e,o=>o[this._idProp]);if(vfe(a).call(a,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,u=e.length;o<u;o++)i=this._addItem(e[o]),n.push(i)}else if(e&&typeof e=="object")i=this._addItem(e),n.push(i);else throw new Error("Unknown dataType");return n.length&&this._trigger("add",{items:n},t),n}update(e,t){const n=[],i=[],a=[],o=[],u=this._idProp,c=h=>{const f=h[u];if(f!=null&&this._data.has(f)){const v=h,y=nde({},this._data.get(f)),g=this._updateItem(v);i.push(g),o.push(v),a.push(y)}else{const v=this._addItem(h);n.push(v)}};if(el(e))for(let h=0,f=e.length;h<f;h++)e[h]&&typeof e[h]=="object"?c(e[h]):console.warn("Ignoring input item, which is not an object at index "+h);else if(e&&typeof e=="object")c(e);else throw new Error("Unknown dataType");if(n.length&&this._trigger("add",{items:n},t),i.length){const h={items:i,oldData:a,data:o};this._trigger("update",h,t)}return ude(n).call(n,i)}updateOnly(e,t){var n;el(e)||(e=[e]);const i=yo(n=yo(e).call(e,a=>{const o=this._data.get(a[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:a}})).call(n,a=>{let{oldData:o,update:u}=a;const c=o[this._idProp],h=_he(o,u);return this._data.set(c,h),{id:c,oldData:o,updatedData:h}});if(i.length){const a={items:yo(i).call(i,o=>o.id),oldData:yo(i).call(i,o=>o.oldData),data:yo(i).call(i,o=>o.updatedData)};return this._trigger("update",a,t),a.items}else return[]}get(e,t){let n,i,a;bL(e)?(n=e,a=t):el(e)?(i=e,a=t):a=e;const o=a&&a.returnType==="Object"?"Object":"Array",u=a&&df(a),c=[];let h,f,v;if(n!=null)h=this._data.get(n),h&&u&&!u(h)&&(h=void 0);else if(i!=null)for(let g=0,_=i.length;g<_;g++)h=this._data.get(i[g]),h!=null&&(!u||u(h))&&c.push(h);else{var y;f=[...nf(y=this._data).call(y)];for(let g=0,_=f.length;g<_;g++)v=f[g],h=this._data.get(v),h!=null&&(!u||u(h))&&c.push(h)}if(a&&a.order&&n==null&&this._sort(c,a.order),a&&a.fields){const g=a.fields;if(n!=null&&h!=null)h=this._filterFields(h,g);else for(let _=0,E=c.length;_<E;_++)c[_]=this._filterFields(c[_],g)}if(o=="Object"){const g={};for(let _=0,E=c.length;_<E;_++){const A=c[_],T=A[this._idProp];g[T]=A}return g}else return n!=null?h??null:c}getIds(e){const t=this._data,n=e&&df(e),i=e&&e.order,a=[...nf(t).call(t)],o=[];if(n)if(i){const u=[];for(let c=0,h=a.length;c<h;c++){const f=a[c],v=this._data.get(f);v!=null&&n(v)&&u.push(v)}this._sort(u,i);for(let c=0,h=u.length;c<h;c++)o.push(u[c][this._idProp])}else for(let u=0,c=a.length;u<c;u++){const h=a[u],f=this._data.get(h);f!=null&&n(f)&&o.push(f[this._idProp])}else if(i){const u=[];for(let c=0,h=a.length;c<h;c++){const f=a[c];u.push(t.get(f))}this._sort(u,i);for(let c=0,h=u.length;c<h;c++)o.push(u[c][this._idProp])}else for(let u=0,c=a.length;u<c;u++){const h=a[u],f=t.get(h);f!=null&&o.push(f[this._idProp])}return o}getDataSet(){return this}forEach(e,t){const n=t&&df(t),i=this._data,a=[...nf(i).call(i)];if(t&&t.order){const o=this.get(t);for(let u=0,c=o.length;u<c;u++){const h=o[u],f=h[this._idProp];e(h,f)}}else for(let o=0,u=a.length;o<u;o++){const c=a[o],h=this._data.get(c);h!=null&&(!n||n(h))&&e(h,c)}}map(e,t){const n=t&&df(t),i=[],a=this._data,o=[...nf(a).call(a)];for(let u=0,c=o.length;u<c;u++){const h=o[u],f=this._data.get(h);f!=null&&(!n||n(f))&&i.push(e(f,h))}return t&&t.order&&this._sort(i,t.order),i}_filterFields(e,t){var n;return e&&Wue(n=el(t)?t:nA(t)).call(n,(i,a)=>(i[a]=e[a],i),{})}_sort(e,t){if(typeof t=="string"){const n=t;o6(e).call(e,(i,a)=>{const o=i[n],u=a[n];return o>u?1:o<u?-1:0})}else if(typeof t=="function")o6(e).call(e,t);else throw new TypeError("Order must be a function or a string")}remove(e,t){const n=[],i=[],a=el(e)?e:[e];for(let o=0,u=a.length;o<u;o++){const c=this._remove(a[o]);if(c){const h=c[this._idProp];h!=null&&(n.push(h),i.push(c))}}return n.length&&this._trigger("remove",{items:n,oldData:i},t),n}_remove(e){let t;if(bL(e)?t=e:e&&typeof e=="object"&&(t=e[this._idProp]),t!=null&&this._data.has(t)){const n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}clear(e){var t;const n=[...nf(t=this._data).call(t)],i=[];for(let a=0,o=n.length;a<o;a++)i.push(this._data.get(n[a]));return this._data.clear(),this.length=0,this._trigger("remove",{items:n,oldData:i},e),n}max(e){let t=null,n=null;for(const a of hL(i=this._data).call(i)){var i;const o=a[e];typeof o=="number"&&(n==null||o>n)&&(t=a,n=o)}return t||null}min(e){let t=null,n=null;for(const a of hL(i=this._data).call(i)){var i;const o=a[e];typeof o=="number"&&(n==null||o<n)&&(t=a,n=o)}return t||null}distinct(e){const t=this._data,n=[...nf(t).call(t)],i=[];let a=0;for(let o=0,u=n.length;o<u;o++){const c=n[o],f=t.get(c)[e];let v=!1;for(let y=0;y<a;y++)if(i[y]==f){v=!0;break}!v&&f!==void 0&&(i[a]=f,a++)}return i}_addItem(e){const t=Epe(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw new Error("Cannot add item: item with id "+n+" already exists");return this._data.set(n,t),++this.length,n}_updateItem(e){const t=e[this._idProp];if(t==null)throw new Error("Cannot update item: item has no id (item: "+Ede(e)+")");const n=this._data.get(t);if(!n)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,d7(d7({},n),e)),t}stream(e){if(e){const n=this._data;return new yd({*[pf](){for(const i of e){const a=n.get(i);a!=null&&(yield[i,a])}}})}else{var t;return new yd({[pf]:kK(t=Ufe(this._data)).call(t,this._data)})}}}function Tpe(r,e){return typeof e=="object"&&e!==null&&r===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof Pd(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof yo(e)=="function"&&typeof e.max=="function"&&typeof e.min=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.remove=="function"&&typeof e.setOptions=="function"&&typeof e.stream=="function"&&typeof e.update=="function"&&typeof e.updateOnly=="function"}function bX(r,e){return typeof e=="object"&&e!==null&&r===e.idProp&&typeof Pd(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof yo(e)=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&Tpe(r,e.getDataSet())}/**
|
|
652
|
+
* vis-network
|
|
653
|
+
* https://visjs.github.io/vis-network/
|
|
654
|
+
*
|
|
655
|
+
* A dynamic, browser-based visualization library.
|
|
656
|
+
*
|
|
657
|
+
* @version 10.0.2
|
|
658
|
+
* @date 2025-09-15T17:48:13.838Z
|
|
659
|
+
*
|
|
660
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
661
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
662
|
+
*
|
|
663
|
+
* @license
|
|
664
|
+
* vis.js is dual licensed under both
|
|
665
|
+
*
|
|
666
|
+
* 1. The Apache 2.0 License
|
|
667
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
668
|
+
*
|
|
669
|
+
* and
|
|
670
|
+
*
|
|
671
|
+
* 2. The MIT License
|
|
672
|
+
* http://opensource.org/licenses/MIT
|
|
673
|
+
*
|
|
674
|
+
* vis.js may be distributed under either license.
|
|
675
|
+
*/var h7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var f7={},dv,p7;function mn(){if(p7)return dv;p7=1;var r=function(e){return e&&e.Math===Math&&e};return dv=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof h7=="object"&&h7)||r(typeof dv=="object"&&dv)||(function(){return this})()||Function("return this")(),dv}var A_,v7;function mr(){return v7||(v7=1,A_=function(r){try{return!!r()}catch{return!0}}),A_}var R_,g7;function wg(){if(g7)return R_;g7=1;var r=mr();return R_=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),R_}var C_,m7;function ay(){if(m7)return C_;m7=1;var r=wg(),e=Function.prototype,t=e.apply,n=e.call;return C_=typeof Reflect=="object"&&Reflect.apply||(r?n.bind(t):function(){return n.apply(t,arguments)}),C_}var k_,y7;function br(){if(y7)return k_;y7=1;var r=wg(),e=Function.prototype,t=e.call,n=r&&e.bind.bind(t,t);return k_=r?n:function(i){return function(){return t.apply(i,arguments)}},k_}var N_,b7;function gl(){if(b7)return N_;b7=1;var r=br(),e=r({}.toString),t=r("".slice);return N_=function(n){return t(e(n),8,-1)},N_}var I_,w7;function vA(){if(w7)return I_;w7=1;var r=gl(),e=br();return I_=function(t){if(r(t)==="Function")return e(t)},I_}var P_,x7;function Pi(){if(x7)return P_;x7=1;var r=typeof document=="object"&&document.all;return P_=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},P_}var j_={},M_,_7;function Vn(){if(_7)return M_;_7=1;var r=mr();return M_=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),M_}var D_,S7;function za(){if(S7)return D_;S7=1;var r=wg(),e=Function.prototype.call;return D_=r?e.bind(e):function(){return e.apply(e,arguments)},D_}var q_={},E7;function sy(){if(E7)return q_;E7=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return q_.f=t?function(i){var a=e(this,i);return!!a&&a.enumerable}:r,q_}var L_,T7;function xg(){return T7||(T7=1,L_=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),L_}var $_,O7;function oy(){if(O7)return $_;O7=1;var r=br(),e=mr(),t=gl(),n=Object,i=r("".split);return $_=e(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,$_}var B_,A7;function Jf(){return A7||(A7=1,B_=function(r){return r==null}),B_}var F_,R7;function yu(){if(R7)return F_;R7=1;var r=Jf(),e=TypeError;return F_=function(t){if(r(t))throw new e("Can't call method on "+t);return t},F_}var z_,C7;function Ao(){if(C7)return z_;C7=1;var r=oy(),e=yu();return z_=function(t){return r(e(t))},z_}var U_,k7;function ji(){if(k7)return U_;k7=1;var r=Pi();return U_=function(e){return typeof e=="object"?e!==null:r(e)},U_}var H_,N7;function Br(){return N7||(N7=1,H_={}),H_}var W_,I7;function fs(){if(I7)return W_;I7=1;var r=Br(),e=mn(),t=Pi(),n=function(i){return t(i)?i:void 0};return W_=function(i,a){return arguments.length<2?n(r[i])||n(e[i]):r[i]&&r[i][a]||e[i]&&e[i][a]},W_}var G_,P7;function ni(){if(P7)return G_;P7=1;var r=br();return G_=r({}.isPrototypeOf),G_}var V_,j7;function ep(){if(j7)return V_;j7=1;var r=mn(),e=r.navigator,t=e&&e.userAgent;return V_=t?String(t):"",V_}var Y_,M7;function _g(){if(M7)return Y_;M7=1;var r=mn(),e=ep(),t=r.process,n=r.Deno,i=t&&t.versions||n&&n.version,a=i&&i.v8,o,u;return a&&(o=a.split("."),u=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!u&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(u=+o[1]))),Y_=u,Y_}var K_,D7;function tp(){if(D7)return K_;D7=1;var r=_g(),e=mr(),t=mn(),n=t.String;return K_=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&r&&r<41}),K_}var X_,q7;function wX(){if(q7)return X_;q7=1;var r=tp();return X_=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",X_}var Q_,L7;function Sg(){if(L7)return Q_;L7=1;var r=fs(),e=Pi(),t=ni(),n=wX(),i=Object;return Q_=n?function(a){return typeof a=="symbol"}:function(a){var o=r("Symbol");return e(o)&&t(o.prototype,i(a))},Q_}var Z_,$7;function rp(){if($7)return Z_;$7=1;var r=String;return Z_=function(e){try{return r(e)}catch{return"Object"}},Z_}var J_,B7;function bu(){if(B7)return J_;B7=1;var r=Pi(),e=rp(),t=TypeError;return J_=function(n){if(r(n))return n;throw new t(e(n)+" is not a function")},J_}var eS,F7;function gA(){if(F7)return eS;F7=1;var r=bu(),e=Jf();return eS=function(t,n){var i=t[n];return e(i)?void 0:r(i)},eS}var tS,z7;function Ope(){if(z7)return tS;z7=1;var r=za(),e=Pi(),t=ji(),n=TypeError;return tS=function(i,a){var o,u;if(a==="string"&&e(o=i.toString)&&!t(u=r(o,i))||e(o=i.valueOf)&&!t(u=r(o,i))||a!=="string"&&e(o=i.toString)&&!t(u=r(o,i)))return u;throw new n("Can't convert object to primitive value")},tS}var rS={exports:{}},nS,U7;function np(){return U7||(U7=1,nS=!0),nS}var iS,H7;function Ape(){if(H7)return iS;H7=1;var r=mn(),e=Object.defineProperty;return iS=function(t,n){try{e(r,t,{value:n,configurable:!0,writable:!0})}catch{r[t]=n}return n},iS}var W7;function mA(){if(W7)return rS.exports;W7=1;var r=np(),e=mn(),t=Ape(),n="__core-js_shared__",i=rS.exports=e[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),rS.exports}var aS,G7;function ip(){if(G7)return aS;G7=1;var r=mA();return aS=function(e,t){return r[e]||(r[e]=t||{})},aS}var sS,V7;function ps(){if(V7)return sS;V7=1;var r=yu(),e=Object;return sS=function(t){return e(r(t))},sS}var oS,Y7;function Xi(){if(Y7)return oS;Y7=1;var r=br(),e=ps(),t=r({}.hasOwnProperty);return oS=Object.hasOwn||function(i,a){return t(e(i),a)},oS}var lS,K7;function ly(){if(K7)return lS;K7=1;var r=br(),e=0,t=Math.random(),n=r(1.1.toString);return lS=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++e+t,36)},lS}var uS,X7;function ii(){if(X7)return uS;X7=1;var r=mn(),e=ip(),t=Xi(),n=ly(),i=tp(),a=wX(),o=r.Symbol,u=e("wks"),c=a?o.for||o:o&&o.withoutSetter||n;return uS=function(h){return t(u,h)||(u[h]=i&&t(o,h)?o[h]:c("Symbol."+h)),u[h]},uS}var cS,Q7;function xX(){if(Q7)return cS;Q7=1;var r=za(),e=ji(),t=Sg(),n=gA(),i=Ope(),a=ii(),o=TypeError,u=a("toPrimitive");return cS=function(c,h){if(!e(c)||t(c))return c;var f=n(c,u),v;if(f){if(h===void 0&&(h="default"),v=r(f,c,h),!e(v)||t(v))return v;throw new o("Can't convert object to primitive value")}return h===void 0&&(h="number"),i(c,h)},cS}var dS,Z7;function yA(){if(Z7)return dS;Z7=1;var r=xX(),e=Sg();return dS=function(t){var n=r(t,"string");return e(n)?n:n+""},dS}var hS,J7;function _X(){if(J7)return hS;J7=1;var r=mn(),e=ji(),t=r.document,n=e(t)&&e(t.createElement);return hS=function(i){return n?t.createElement(i):{}},hS}var fS,e$;function SX(){if(e$)return fS;e$=1;var r=Vn(),e=mr(),t=_X();return fS=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),fS}var t$;function uy(){if(t$)return j_;t$=1;var r=Vn(),e=za(),t=sy(),n=xg(),i=Ao(),a=yA(),o=Xi(),u=SX(),c=Object.getOwnPropertyDescriptor;return j_.f=r?c:function(f,v){if(f=i(f),v=a(v),u)try{return c(f,v)}catch{}if(o(f,v))return n(!e(t.f,f,v),f[v])},j_}var pS,r$;function Rpe(){if(r$)return pS;r$=1;var r=mr(),e=Pi(),t=/#|\.prototype\./,n=function(c,h){var f=a[i(c)];return f===u?!0:f===o?!1:e(h)?r(h):!!h},i=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},a=n.data={},o=n.NATIVE="N",u=n.POLYFILL="P";return pS=n,pS}var vS,n$;function cy(){if(n$)return vS;n$=1;var r=vA(),e=bu(),t=wg(),n=r(r.bind);return vS=function(i,a){return e(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},vS}var gS={},mS,i$;function EX(){if(i$)return mS;i$=1;var r=Vn(),e=mr();return mS=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),mS}var yS,a$;function ml(){if(a$)return yS;a$=1;var r=ji(),e=String,t=TypeError;return yS=function(n){if(r(n))return n;throw new t(e(n)+" is not an object")},yS}var s$;function Bs(){if(s$)return gS;s$=1;var r=Vn(),e=SX(),t=EX(),n=ml(),i=yA(),a=TypeError,o=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",f="writable";return gS.f=r?t?function(y,g,_){if(n(y),g=i(g),n(_),typeof y=="function"&&g==="prototype"&&"value"in _&&f in _&&!_[f]){var E=u(y,g);E&&E[f]&&(y[g]=_.value,_={configurable:h in _?_[h]:E[h],enumerable:c in _?_[c]:E[c],writable:!1})}return o(y,g,_)}:o:function(y,g,_){if(n(y),g=i(g),n(_),e)try{return o(y,g,_)}catch{}if("get"in _||"set"in _)throw new a("Accessors not supported");return"value"in _&&(y[g]=_.value),y},gS}var bS,o$;function ap(){if(o$)return bS;o$=1;var r=Vn(),e=Bs(),t=xg();return bS=r?function(n,i,a){return e.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},bS}var wS,l$;function Nt(){if(l$)return wS;l$=1;var r=mn(),e=ay(),t=vA(),n=Pi(),i=uy().f,a=Rpe(),o=Br(),u=cy(),c=ap(),h=Xi(),f=function(v){var y=function(g,_,E){if(this instanceof y){switch(arguments.length){case 0:return new v;case 1:return new v(g);case 2:return new v(g,_)}return new v(g,_,E)}return e(v,this,arguments)};return y.prototype=v.prototype,y};return wS=function(v,y){var g=v.target,_=v.global,E=v.stat,A=v.proto,T=_?r:E?r[g]:r[g]&&r[g].prototype,C=_?o:o[g]||c(o,g,{})[g],N=C.prototype,k,j,W,G,D,M,U,I,q;for(G in y)k=a(_?G:g+(E?".":"#")+G,v.forced),j=!k&&T&&h(T,G),M=C[G],j&&(v.dontCallGetSet?(q=i(T,G),U=q&&q.value):U=T[G]),D=j&&U?U:y[G],!(!k&&!A&&typeof M==typeof D)&&(v.bind&&j?I=u(D,r):v.wrap&&j?I=f(D):A&&n(D)?I=t(D):I=D,(v.sham||D&&D.sham||M&&M.sham)&&c(I,"sham",!0),c(C,G,I),A&&(W=g+"Prototype",h(o,W)||c(o,W,{}),c(o[W],G,D),v.real&&N&&(k||!N[G])&&c(N,G,D)))},wS}var xS,u$;function Cpe(){if(u$)return xS;u$=1;var r=Math.ceil,e=Math.floor;return xS=Math.trunc||function(n){var i=+n;return(i>0?e:r)(i)},xS}var _S,c$;function sp(){if(c$)return _S;c$=1;var r=Cpe();return _S=function(e){var t=+e;return t!==t||t===0?0:r(t)},_S}var SS,d$;function dy(){if(d$)return SS;d$=1;var r=sp(),e=Math.max,t=Math.min;return SS=function(n,i){var a=r(n);return a<0?e(a+i,0):t(a,i)},SS}var ES,h$;function TX(){if(h$)return ES;h$=1;var r=sp(),e=Math.min;return ES=function(t){var n=r(t);return n>0?e(n,9007199254740991):0},ES}var TS,f$;function wu(){if(f$)return TS;f$=1;var r=TX();return TS=function(e){return r(e.length)},TS}var OS,p$;function bA(){if(p$)return OS;p$=1;var r=Ao(),e=dy(),t=wu(),n=function(i){return function(a,o,u){var c=r(a),h=t(c);if(h===0)return!i&&-1;var f=e(u,h),v;if(i&&o!==o){for(;h>f;)if(v=c[f++],v!==v)return!0}else for(;h>f;f++)if((i||f in c)&&c[f]===o)return i||f||0;return!i&&-1}};return OS={includes:n(!0),indexOf:n(!1)},OS}var AS,v$;function Eg(){return v$||(v$=1,AS={}),AS}var RS,g$;function OX(){if(g$)return RS;g$=1;var r=br(),e=Xi(),t=Ao(),n=bA().indexOf,i=Eg(),a=r([].push);return RS=function(o,u){var c=t(o),h=0,f=[],v;for(v in c)!e(i,v)&&e(c,v)&&a(f,v);for(;u.length>h;)e(c,v=u[h++])&&(~n(f,v)||a(f,v));return f},RS}var CS,m$;function wA(){return m$||(m$=1,CS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),CS}var kS,y$;function Tg(){if(y$)return kS;y$=1;var r=OX(),e=wA();return kS=Object.keys||function(n){return r(n,e)},kS}var NS={},b$;function hy(){return b$||(b$=1,NS.f=Object.getOwnPropertySymbols),NS}var IS,w$;function kpe(){if(w$)return IS;w$=1;var r=Vn(),e=br(),t=za(),n=mr(),i=Tg(),a=hy(),o=sy(),u=ps(),c=oy(),h=Object.assign,f=Object.defineProperty,v=e([].concat);return IS=!h||n(function(){if(r&&h({b:1},h(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},g={},_=Symbol("assign detection"),E="abcdefghijklmnopqrst";return y[_]=7,E.split("").forEach(function(A){g[A]=A}),h({},y)[_]!==7||i(h({},g)).join("")!==E})?function(g,_){for(var E=u(g),A=arguments.length,T=1,C=a.f,N=o.f;A>T;)for(var k=c(arguments[T++]),j=C?v(i(k),C(k)):i(k),W=j.length,G=0,D;W>G;)D=j[G++],(!r||t(N,k,D))&&(E[D]=k[D]);return E}:h,IS}var x$;function Npe(){if(x$)return f7;x$=1;var r=Nt(),e=kpe();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),f7}var PS,_$;function Ipe(){if(_$)return PS;_$=1,Npe();var r=Br();return PS=r.Object.assign,PS}var jS,S$;function Ppe(){if(S$)return jS;S$=1;var r=Ipe();return jS=r,jS}var MS,E$;function jpe(){return E$||(E$=1,MS=Ppe()),MS}var Mpe=jpe(),Jn=Jt(Mpe),T$={},DS,O$;function op(){if(O$)return DS;O$=1;var r=br();return DS=r([].slice),DS}var qS,A$;function Dpe(){if(A$)return qS;A$=1;var r=br(),e=bu(),t=ji(),n=Xi(),i=op(),a=wg(),o=Function,u=r([].concat),c=r([].join),h={},f=function(v,y,g){if(!n(h,y)){for(var _=[],E=0;E<y;E++)_[E]="a["+E+"]";h[y]=o("C,a","return new C("+c(_,",")+")")}return h[y](v,g)};return qS=a?o.bind:function(y){var g=e(this),_=g.prototype,E=i(arguments,1),A=function(){var C=u(E,i(arguments));return this instanceof A?f(g,C.length,C):g.apply(y,C)};return t(_)&&(A.prototype=_),A},qS}var R$;function qpe(){if(R$)return T$;R$=1;var r=Nt(),e=Dpe();return r({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),T$}var LS,C$;function Qi(){if(C$)return LS;C$=1;var r=mn(),e=Br();return LS=function(t,n){var i=e[t+"Prototype"],a=i&&i[n];if(a)return a;var o=r[t],u=o&&o.prototype;return u&&u[n]},LS}var $S,k$;function Lpe(){if(k$)return $S;k$=1,qpe();var r=Qi();return $S=r("Function","bind"),$S}var BS,N$;function $pe(){if(N$)return BS;N$=1;var r=ni(),e=Lpe(),t=Function.prototype;return BS=function(n){var i=n.bind;return n===t||r(t,n)&&i===t.bind?e:i},BS}var FS,I$;function Bpe(){if(I$)return FS;I$=1;var r=$pe();return FS=r,FS}var zS,P$;function Fpe(){return P$||(P$=1,zS=Bpe()),zS}var zpe=Fpe(),Ze=Jt(zpe);function xA(r,e,t,n){r.beginPath(),r.arc(e,t,n,0,2*Math.PI,!1),r.closePath()}function Upe(r,e,t,n){r.beginPath(),r.rect(e-n,t-n,n*2,n*2),r.closePath()}function Hpe(r,e,t,n){r.beginPath(),n*=1.15,t+=.275*n;const i=n*2,a=i/2,o=Math.sqrt(3)/6*i,u=Math.sqrt(i*i-a*a);r.moveTo(e,t-(u-o)),r.lineTo(e+a,t+o),r.lineTo(e-a,t+o),r.lineTo(e,t-(u-o)),r.closePath()}function Wpe(r,e,t,n){r.beginPath(),n*=1.15,t-=.275*n;const i=n*2,a=i/2,o=Math.sqrt(3)/6*i,u=Math.sqrt(i*i-a*a);r.moveTo(e,t+(u-o)),r.lineTo(e+a,t-o),r.lineTo(e-a,t-o),r.lineTo(e,t+(u-o)),r.closePath()}function Gpe(r,e,t,n){r.beginPath(),n*=.82,t+=.1*n;for(let i=0;i<10;i++){const a=i%2===0?n*1.3:n*.5;r.lineTo(e+a*Math.sin(i*2*Math.PI/10),t-a*Math.cos(i*2*Math.PI/10))}r.closePath()}function Vpe(r,e,t,n){r.beginPath(),r.lineTo(e,t+n),r.lineTo(e+n,t),r.lineTo(e,t-n),r.lineTo(e-n,t),r.closePath()}function AX(r,e,t,n,i,a){const o=Math.PI/180;n-2*a<0&&(a=n/2),i-2*a<0&&(a=i/2),r.beginPath(),r.moveTo(e+a,t),r.lineTo(e+n-a,t),r.arc(e+n-a,t+a,a,o*270,o*360,!1),r.lineTo(e+n,t+i-a),r.arc(e+n-a,t+i-a,a,0,o*90,!1),r.lineTo(e+a,t+i),r.arc(e+a,t+i-a,a,o*90,o*180,!1),r.lineTo(e,t+a),r.arc(e+a,t+a,a,o*180,o*270,!1),r.closePath()}function l6(r,e,t,n,i){const a=.5522848,o=n/2*a,u=i/2*a,c=e+n,h=t+i,f=e+n/2,v=t+i/2;r.beginPath(),r.moveTo(e,v),r.bezierCurveTo(e,v-u,f-o,t,f,t),r.bezierCurveTo(f+o,t,c,v-u,c,v),r.bezierCurveTo(c,v+u,f+o,h,f,h),r.bezierCurveTo(f-o,h,e,v+u,e,v),r.closePath()}function RX(r,e,t,n,i){const a=.3333333333333333,o=n,u=i*a,c=.5522848,h=o/2*c,f=u/2*c,v=e+o,y=t+u,g=e+o/2,_=t+u/2,E=t+(i-u/2),A=t+i;r.beginPath(),r.moveTo(v,_),r.bezierCurveTo(v,_+f,g+h,y,g,y),r.bezierCurveTo(g-h,y,e,_+f,e,_),r.bezierCurveTo(e,_-f,g-h,t,g,t),r.bezierCurveTo(g+h,t,v,_-f,v,_),r.lineTo(v,E),r.bezierCurveTo(v,E+f,g+h,A,g,A),r.bezierCurveTo(g-h,A,e,E+f,e,E),r.lineTo(e,_)}function CX(r,e,t,n,i,a){r.beginPath(),r.moveTo(e,t);const o=a.length,u=n-e,c=i-t,h=c/u;let f=Math.sqrt(u*u+c*c),v=0,y=!0,g=0,_=+a[0];for(;f>=.1;)_=+a[v++%o],_>f&&(_=f),g=Math.sqrt(_*_/(1+h*h)),g=u<0?-g:g,e+=g,t+=h*g,y===!0?r.lineTo(e,t):r.moveTo(e,t),f-=_,y=!y}function Ype(r,e,t,n){r.beginPath();const i=6,a=Math.PI*2/i;r.moveTo(e+n,t);for(let o=1;o<i;o++)r.lineTo(e+n*Math.cos(a*o),t+n*Math.sin(a*o));r.closePath()}const j$={circle:xA,dashedLine:CX,database:RX,diamond:Vpe,ellipse:l6,ellipse_vis:l6,hexagon:Ype,roundRect:AX,square:Upe,star:Gpe,triangle:Hpe,triangleDown:Wpe};function Kpe(r){return Object.prototype.hasOwnProperty.call(j$,r)?j$[r]:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];CanvasRenderingContext2D.prototype[r].call(e,n)}}var US={exports:{}},M$;function Xpe(){return M$||(M$=1,(function(r){r.exports=e;function e(n){if(n)return t(n)}function t(n){for(var i in e.prototype)n[i]=e.prototype[i];return n}e.prototype.on=e.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},e.prototype.once=function(n,i){function a(){this.off(n,a),i.apply(this,arguments)}return a.fn=i,this.on(n,a),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+n];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,u=0;u<a.length;u++)if(o=a[u],o===i||o.fn===i){a.splice(u,1);break}return a.length===0&&delete this._callbacks["$"+n],this},e.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+n],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,u=a.length;o<u;++o)a[o].apply(this,i)}return this},e.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},e.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(US)),US.exports}var Qpe=Xpe(),kX=Jt(Qpe),D$={},HS,q$;function Zd(){if(q$)return HS;q$=1;var r=gl();return HS=Array.isArray||function(t){return r(t)==="Array"},HS}var WS,L$;function NX(){if(L$)return WS;L$=1;var r=TypeError,e=9007199254740991;return WS=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},WS}var GS,$$;function fy(){if($$)return GS;$$=1;var r=Vn(),e=Bs(),t=xg();return GS=function(n,i,a){r?e.f(n,i,t(0,a)):n[i]=a},GS}var VS,B$;function _A(){if(B$)return VS;B$=1;var r=ii(),e=r("toStringTag"),t={};return t[e]="z",VS=String(t)==="[object z]",VS}var YS,F$;function lp(){if(F$)return YS;F$=1;var r=_A(),e=Pi(),t=gl(),n=ii(),i=n("toStringTag"),a=Object,o=t((function(){return arguments})())==="Arguments",u=function(c,h){try{return c[h]}catch{}};return YS=r?t:function(c){var h,f,v;return c===void 0?"Undefined":c===null?"Null":typeof(f=u(h=a(c),i))=="string"?f:o?t(h):(v=t(h))==="Object"&&e(h.callee)?"Arguments":v},YS}var KS,z$;function Zpe(){if(z$)return KS;z$=1;var r=br(),e=Pi(),t=mA(),n=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return n(i)}),KS=t.inspectSource,KS}var XS,U$;function IX(){if(U$)return XS;U$=1;var r=br(),e=mr(),t=Pi(),n=lp(),i=fs(),a=Zpe(),o=function(){},u=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,h=r(c.exec),f=!c.test(o),v=function(_){if(!t(_))return!1;try{return u(o,[],_),!0}catch{return!1}},y=function(_){if(!t(_))return!1;switch(n(_)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!h(c,a(_))}catch{return!0}};return y.sham=!0,XS=!u||e(function(){var g;return v(v.call)||!v(Object)||!v(function(){g=!0})||g})?y:v,XS}var QS,H$;function Jpe(){if(H$)return QS;H$=1;var r=Zd(),e=IX(),t=ji(),n=ii(),i=n("species"),a=Array;return QS=function(o){var u;return r(o)&&(u=o.constructor,e(u)&&(u===a||r(u.prototype))?u=void 0:t(u)&&(u=u[i],u===null&&(u=void 0))),u===void 0?a:u},QS}var ZS,W$;function SA(){if(W$)return ZS;W$=1;var r=Jpe();return ZS=function(e,t){return new(r(e))(t===0?0:t)},ZS}var JS,G$;function Og(){if(G$)return JS;G$=1;var r=mr(),e=ii(),t=_g(),n=e("species");return JS=function(i){return t>=51||!r(function(){var a=[],o=a.constructor={};return o[n]=function(){return{foo:1}},a[i](Boolean).foo!==1})},JS}var V$;function PX(){if(V$)return D$;V$=1;var r=Nt(),e=mr(),t=Zd(),n=ji(),i=ps(),a=wu(),o=NX(),u=fy(),c=SA(),h=Og(),f=ii(),v=_g(),y=f("isConcatSpreadable"),g=v>=51||!e(function(){var A=[];return A[y]=!1,A.concat()[0]!==A}),_=function(A){if(!n(A))return!1;var T=A[y];return T!==void 0?!!T:t(A)},E=!g||!h("concat");return r({target:"Array",proto:!0,arity:1,forced:E},{concat:function(T){var C=i(this),N=c(C,0),k=0,j,W,G,D,M;for(j=-1,G=arguments.length;j<G;j++)if(M=j===-1?C:arguments[j],_(M))for(D=a(M),o(k+D),W=0;W<D;W++,k++)W in M&&u(N,k,M[W]);else o(k+1),u(N,k++,M);return N.length=k,N}}),D$}var Y$={},K$={},eE,X$;function Fs(){if(X$)return eE;X$=1;var r=lp(),e=String;return eE=function(t){if(r(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},eE}var tE={},Q$;function EA(){if(Q$)return tE;Q$=1;var r=Vn(),e=EX(),t=Bs(),n=ml(),i=Ao(),a=Tg();return tE.f=r&&!e?Object.defineProperties:function(u,c){n(u);for(var h=i(c),f=a(c),v=f.length,y=0,g;v>y;)t.f(u,g=f[y++],h[g]);return u},tE}var rE,Z$;function eve(){if(Z$)return rE;Z$=1;var r=fs();return rE=r("document","documentElement"),rE}var nE,J$;function py(){if(J$)return nE;J$=1;var r=ip(),e=ly(),t=r("keys");return nE=function(n){return t[n]||(t[n]=e(n))},nE}var iE,eB;function Ag(){if(eB)return iE;eB=1;var r=ml(),e=EA(),t=wA(),n=Eg(),i=eve(),a=_X(),o=py(),u=">",c="<",h="prototype",f="script",v=o("IE_PROTO"),y=function(){},g=function(C){return c+f+u+C+c+"/"+f+u},_=function(C){C.write(g("")),C.close();var N=C.parentWindow.Object;return C=null,N},E=function(){var C=a("iframe"),N="java"+f+":",k;return C.style.display="none",i.appendChild(C),C.src=String(N),k=C.contentWindow.document,k.open(),k.write(g("document.F=Object")),k.close(),k.F},A,T=function(){try{A=new ActiveXObject("htmlfile")}catch{}T=typeof document<"u"?document.domain&&A?_(A):E():_(A);for(var C=t.length;C--;)delete T[h][t[C]];return T()};return n[v]=!0,iE=Object.create||function(N,k){var j;return N!==null?(y[h]=r(N),j=new y,y[h]=null,j[v]=N):j=T(),k===void 0?j:e.f(j,k)},iE}var aE={},tB;function vy(){if(tB)return aE;tB=1;var r=OX(),e=wA(),t=e.concat("length","prototype");return aE.f=Object.getOwnPropertyNames||function(i){return r(i,t)},aE}var sE={},rB;function TA(){if(rB)return sE;rB=1;var r=gl(),e=Ao(),t=vy().f,n=op(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(o){try{return t(o)}catch{return n(i)}};return sE.f=function(u){return i&&r(u)==="Window"?a(u):t(e(u))},sE}var oE,nB;function Rg(){if(nB)return oE;nB=1;var r=ap();return oE=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e},oE}var lE,iB;function OA(){if(iB)return lE;iB=1;var r=Bs();return lE=function(e,t,n){return r.f(e,t,n)},lE}var uE={},aB;function gy(){if(aB)return uE;aB=1;var r=ii();return uE.f=r,uE}var cE,sB;function An(){if(sB)return cE;sB=1;var r=Br(),e=Xi(),t=gy(),n=Bs().f;return cE=function(i){var a=r.Symbol||(r.Symbol={});e(a,i)||n(a,i,{value:t.f(i)})},cE}var dE,oB;function jX(){if(oB)return dE;oB=1;var r=za(),e=fs(),t=ii(),n=Rg();return dE=function(){var i=e("Symbol"),a=i&&i.prototype,o=a&&a.valueOf,u=t("toPrimitive");a&&!a[u]&&n(a,u,function(c){return r(o,this)},{arity:1})},dE}var hE,lB;function tve(){if(lB)return hE;lB=1;var r=_A(),e=lp();return hE=r?{}.toString:function(){return"[object "+e(this)+"]"},hE}var fE,uB;function Jd(){if(uB)return fE;uB=1;var r=_A(),e=Bs().f,t=ap(),n=Xi(),i=tve(),a=ii(),o=a("toStringTag");return fE=function(u,c,h,f){var v=h?u:u&&u.prototype;v&&(n(v,o)||e(v,o,{configurable:!0,value:c}),f&&!r&&t(v,"toString",i))},fE}var pE,cB;function MX(){if(cB)return pE;cB=1;var r=mn(),e=Pi(),t=r.WeakMap;return pE=e(t)&&/native code/.test(String(t)),pE}var vE,dB;function eh(){if(dB)return vE;dB=1;var r=MX(),e=mn(),t=ji(),n=ap(),i=Xi(),a=mA(),o=py(),u=Eg(),c="Object already initialized",h=e.TypeError,f=e.WeakMap,v,y,g,_=function(C){return g(C)?y(C):v(C,{})},E=function(C){return function(N){var k;if(!t(N)||(k=y(N)).type!==C)throw new h("Incompatible receiver, "+C+" required");return k}};if(r||a.state){var A=a.state||(a.state=new f);A.get=A.get,A.has=A.has,A.set=A.set,v=function(C,N){if(A.has(C))throw new h(c);return N.facade=C,A.set(C,N),N},y=function(C){return A.get(C)||{}},g=function(C){return A.has(C)}}else{var T=o("state");u[T]=!0,v=function(C,N){if(i(C,T))throw new h(c);return N.facade=C,n(C,T,N),N},y=function(C){return i(C,T)?C[T]:{}},g=function(C){return i(C,T)}}return vE={set:v,get:y,has:g,enforce:_,getterFor:E},vE}var gE,hB;function $c(){if(hB)return gE;hB=1;var r=cy(),e=br(),t=oy(),n=ps(),i=wu(),a=SA(),o=e([].push),u=function(c){var h=c===1,f=c===2,v=c===3,y=c===4,g=c===6,_=c===7,E=c===5||g;return function(A,T,C,N){for(var k=n(A),j=t(k),W=i(j),G=r(T,C),D=0,M=N||a,U=h?M(A,W):f||_?M(A,0):void 0,I,q;W>D;D++)if((E||D in j)&&(I=j[D],q=G(I,D,k),c))if(h)U[D]=q;else if(q)switch(c){case 3:return!0;case 5:return I;case 6:return D;case 2:o(U,I)}else switch(c){case 4:return!1;case 7:o(U,I)}return g?-1:v||y?y:U}};return gE={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)},gE}var fB;function rve(){if(fB)return K$;fB=1;var r=Nt(),e=mn(),t=za(),n=br(),i=np(),a=Vn(),o=tp(),u=mr(),c=Xi(),h=ni(),f=ml(),v=Ao(),y=yA(),g=Fs(),_=xg(),E=Ag(),A=Tg(),T=vy(),C=TA(),N=hy(),k=uy(),j=Bs(),W=EA(),G=sy(),D=Rg(),M=OA(),U=ip(),I=py(),q=Eg(),z=ly(),Q=ii(),ce=gy(),re=An(),J=jX(),le=Jd(),ye=eh(),Z=$c().forEach,oe=I("hidden"),L="Symbol",Y="prototype",te=ye.set,de=ye.getterFor(L),ue=Object[Y],we=e.Symbol,Se=we&&we[Y],Ie=e.RangeError,Le=e.TypeError,Ve=e.QObject,tt=k.f,Xe=j.f,dt=C.f,ne=G.f,et=n([].push),st=U("symbols"),ot=U("op-symbols"),We=U("wks"),vt=!Ve||!Ve[Y]||!Ve[Y].findChild,it=function(ze,Ke,fe){var ke=tt(ue,Ke);ke&&delete ue[Ke],Xe(ze,Ke,fe),ke&&ze!==ue&&Xe(ue,Ke,ke)},yt=a&&u(function(){return E(Xe({},"a",{get:function(){return Xe(this,"a",{value:7}).a}})).a!==7})?it:Xe,ut=function(ze,Ke){var fe=st[ze]=E(Se);return te(fe,{type:L,tag:ze,description:Ke}),a||(fe.description=Ke),fe},qt=function(Ke,fe,ke){Ke===ue&&qt(ot,fe,ke),f(Ke);var Be=y(fe);return f(ke),c(st,Be)?(ke.enumerable?(c(Ke,oe)&&Ke[oe][Be]&&(Ke[oe][Be]=!1),ke=E(ke,{enumerable:_(0,!1)})):(c(Ke,oe)||Xe(Ke,oe,_(1,E(null))),Ke[oe][Be]=!0),yt(Ke,Be,ke)):Xe(Ke,Be,ke)},Wt=function(Ke,fe){f(Ke);var ke=v(fe),Be=A(ke).concat(jt(ke));return Z(Be,function(ht){(!a||t(Tt,ke,ht))&&qt(Ke,ht,ke[ht])}),Ke},At=function(Ke,fe){return fe===void 0?E(Ke):Wt(E(Ke),fe)},Tt=function(Ke){var fe=y(Ke),ke=t(ne,this,fe);return this===ue&&c(st,fe)&&!c(ot,fe)?!1:ke||!c(this,fe)||!c(st,fe)||c(this,oe)&&this[oe][fe]?ke:!0},It=function(Ke,fe){var ke=v(Ke),Be=y(fe);if(!(ke===ue&&c(st,Be)&&!c(ot,Be))){var ht=tt(ke,Be);return ht&&c(st,Be)&&!(c(ke,oe)&&ke[oe][Be])&&(ht.enumerable=!0),ht}},nt=function(Ke){var fe=dt(v(Ke)),ke=[];return Z(fe,function(Be){!c(st,Be)&&!c(q,Be)&&et(ke,Be)}),ke},jt=function(ze){var Ke=ze===ue,fe=dt(Ke?ot:v(ze)),ke=[];return Z(fe,function(Be){c(st,Be)&&(!Ke||c(ue,Be))&&et(ke,st[Be])}),ke};return o||(we=function(){if(h(Se,this))throw new Le("Symbol is not a constructor");var Ke=!arguments.length||arguments[0]===void 0?void 0:g(arguments[0]),fe=z(Ke),ke=function(Be){var ht=this===void 0?e:this;ht===ue&&t(ke,ot,Be),c(ht,oe)&&c(ht[oe],fe)&&(ht[oe][fe]=!1);var lt=_(1,Be);try{yt(ht,fe,lt)}catch(or){if(!(or instanceof Ie))throw or;it(ht,fe,lt)}};return a&&vt&&yt(ue,fe,{configurable:!0,set:ke}),ut(fe,Ke)},Se=we[Y],D(Se,"toString",function(){return de(this).tag}),D(we,"withoutSetter",function(ze){return ut(z(ze),ze)}),G.f=Tt,j.f=qt,W.f=Wt,k.f=It,T.f=C.f=nt,N.f=jt,ce.f=function(ze){return ut(Q(ze),ze)},a&&(M(Se,"description",{configurable:!0,get:function(){return de(this).description}}),i||D(ue,"propertyIsEnumerable",Tt,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:we}),Z(A(We),function(ze){re(ze)}),r({target:L,stat:!0,forced:!o},{useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!a},{create:At,defineProperty:qt,defineProperties:Wt,getOwnPropertyDescriptor:It}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:nt}),J(),le(we,L),q[oe]=!0,K$}var pB={},mE,vB;function DX(){if(vB)return mE;vB=1;var r=tp();return mE=r&&!!Symbol.for&&!!Symbol.keyFor,mE}var gB;function nve(){if(gB)return pB;gB=1;var r=Nt(),e=fs(),t=Xi(),n=Fs(),i=ip(),a=DX(),o=i("string-to-symbol-registry"),u=i("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!a},{for:function(c){var h=n(c);if(t(o,h))return o[h];var f=e("Symbol")(h);return o[h]=f,u[f]=h,f}}),pB}var mB={},yB;function ive(){if(yB)return mB;yB=1;var r=Nt(),e=Xi(),t=Sg(),n=rp(),i=ip(),a=DX(),o=i("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!a},{keyFor:function(c){if(!t(c))throw new TypeError(n(c)+" is not a symbol");if(e(o,c))return o[c]}}),mB}var bB={},yE,wB;function ave(){if(wB)return yE;wB=1;var r=br(),e=Zd(),t=Pi(),n=gl(),i=Fs(),a=r([].push);return yE=function(o){if(t(o))return o;if(e(o)){for(var u=o.length,c=[],h=0;h<u;h++){var f=o[h];typeof f=="string"?a(c,f):(typeof f=="number"||n(f)==="Number"||n(f)==="String")&&a(c,i(f))}var v=c.length,y=!0;return function(g,_){if(y)return y=!1,_;if(e(this))return _;for(var E=0;E<v;E++)if(c[E]===g)return _}}},yE}var xB;function qX(){if(xB)return bB;xB=1;var r=Nt(),e=fs(),t=ay(),n=za(),i=br(),a=mr(),o=Pi(),u=Sg(),c=op(),h=ave(),f=tp(),v=String,y=e("JSON","stringify"),g=i(/./.exec),_=i("".charAt),E=i("".charCodeAt),A=i("".replace),T=i(1.1.toString),C=/[\uD800-\uDFFF]/g,N=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,j=!f||a(function(){var M=e("Symbol")("stringify detection");return y([M])!=="[null]"||y({a:M})!=="{}"||y(Object(M))!=="{}"}),W=a(function(){return y("\uDF06\uD834")!=='"\\udf06\\ud834"'||y("\uDEAD")!=='"\\udead"'}),G=function(M,U){var I=c(arguments),q=h(U);if(!(!o(q)&&(M===void 0||u(M))))return I[1]=function(z,Q){if(o(q)&&(Q=n(q,this,v(z),Q)),!u(Q))return Q},t(y,null,I)},D=function(M,U,I){var q=_(I,U-1),z=_(I,U+1);return g(N,M)&&!g(k,z)||g(k,M)&&!g(N,q)?"\\u"+T(E(M,0),16):M};return y&&r({target:"JSON",stat:!0,arity:3,forced:j||W},{stringify:function(U,I,q){var z=c(arguments),Q=t(j?G:y,null,z);return W&&typeof Q=="string"?A(Q,C,D):Q}}),bB}var _B={},SB;function sve(){if(SB)return _B;SB=1;var r=Nt(),e=tp(),t=mr(),n=hy(),i=ps(),a=!e||t(function(){n.f(1)});return r({target:"Object",stat:!0,forced:a},{getOwnPropertySymbols:function(u){var c=n.f;return c?c(i(u)):[]}}),_B}var EB;function LX(){return EB||(EB=1,rve(),nve(),ive(),qX(),sve()),Y$}var TB={},OB;function $X(){if(OB)return TB;OB=1;var r=An();return r("asyncDispose"),TB}var AB={},RB;function ove(){if(RB)return AB;RB=1;var r=An();return r("asyncIterator"),AB}var CB={},kB;function BX(){if(kB)return CB;kB=1;var r=An();return r("dispose"),CB}var NB={},IB;function lve(){if(IB)return NB;IB=1;var r=An();return r("hasInstance"),NB}var PB={},jB;function uve(){if(jB)return PB;jB=1;var r=An();return r("isConcatSpreadable"),PB}var MB={},DB;function FX(){if(DB)return MB;DB=1;var r=An();return r("iterator"),MB}var qB={},LB;function cve(){if(LB)return qB;LB=1;var r=An();return r("match"),qB}var $B={},BB;function dve(){if(BB)return $B;BB=1;var r=An();return r("matchAll"),$B}var FB={},zB;function hve(){if(zB)return FB;zB=1;var r=An();return r("replace"),FB}var UB={},HB;function fve(){if(HB)return UB;HB=1;var r=An();return r("search"),UB}var WB={},GB;function pve(){if(GB)return WB;GB=1;var r=An();return r("species"),WB}var VB={},YB;function vve(){if(YB)return VB;YB=1;var r=An();return r("split"),VB}var KB={},XB;function zX(){if(XB)return KB;XB=1;var r=An(),e=jX();return r("toPrimitive"),e(),KB}var QB={},ZB;function gve(){if(ZB)return QB;ZB=1;var r=fs(),e=An(),t=Jd();return e("toStringTag"),t(r("Symbol"),"Symbol"),QB}var JB={},eF;function mve(){if(eF)return JB;eF=1;var r=An();return r("unscopables"),JB}var tF={},rF;function yve(){if(rF)return tF;rF=1;var r=mn(),e=Jd();return e(r.JSON,"JSON",!0),tF}var bE,nF;function bve(){if(nF)return bE;nF=1,PX(),LX(),$X(),ove(),BX(),lve(),uve(),FX(),cve(),dve(),hve(),fve(),pve(),vve(),zX(),gve(),mve(),yve();var r=Br();return bE=r.Symbol,bE}var iF={},wE,aF;function AA(){return aF||(aF=1,wE=function(){}),wE}var xE,sF;function up(){return sF||(sF=1,xE={}),xE}var _E,oF;function wve(){if(oF)return _E;oF=1;var r=Vn(),e=Xi(),t=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,i=e(t,"name"),a=i&&(function(){}).name==="something",o=i&&(!r||r&&n(t,"name").configurable);return _E={EXISTS:i,PROPER:a,CONFIGURABLE:o},_E}var SE,lF;function UX(){if(lF)return SE;lF=1;var r=mr();return SE=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),SE}var EE,uF;function my(){if(uF)return EE;uF=1;var r=Xi(),e=Pi(),t=ps(),n=py(),i=UX(),a=n("IE_PROTO"),o=Object,u=o.prototype;return EE=i?o.getPrototypeOf:function(c){var h=t(c);if(r(h,a))return h[a];var f=h.constructor;return e(f)&&h instanceof f?f.prototype:h instanceof o?u:null},EE}var TE,cF;function HX(){if(cF)return TE;cF=1;var r=mr(),e=Pi(),t=ji(),n=Ag(),i=my(),a=Rg(),o=ii(),u=np(),c=o("iterator"),h=!1,f,v,y;[].keys&&(y=[].keys(),"next"in y?(v=i(i(y)),v!==Object.prototype&&(f=v)):h=!0);var g=!t(f)||r(function(){var _={};return f[c].call(_)!==_});return g?f={}:u&&(f=n(f)),e(f[c])||a(f,c,function(){return this}),TE={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:h},TE}var OE,dF;function xve(){if(dF)return OE;dF=1;var r=HX().IteratorPrototype,e=Ag(),t=xg(),n=Jd(),i=up(),a=function(){return this};return OE=function(o,u,c,h){var f=u+" Iterator";return o.prototype=e(r,{next:t(+!h,c)}),n(o,f,!1,!0),i[f]=a,o},OE}var AE,hF;function _ve(){if(hF)return AE;hF=1;var r=br(),e=bu();return AE=function(t,n,i){try{return r(e(Object.getOwnPropertyDescriptor(t,n)[i]))}catch{}},AE}var RE,fF;function Sve(){if(fF)return RE;fF=1;var r=ji();return RE=function(e){return r(e)||e===null},RE}var CE,pF;function Eve(){if(pF)return CE;pF=1;var r=Sve(),e=String,t=TypeError;return CE=function(n){if(r(n))return n;throw new t("Can't set "+e(n)+" as a prototype")},CE}var kE,vF;function Tve(){if(vF)return kE;vF=1;var r=_ve(),e=ji(),t=yu(),n=Eve();return kE=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,a={},o;try{o=r(Object.prototype,"__proto__","set"),o(a,[]),i=a instanceof Array}catch{}return function(c,h){return t(c),n(h),e(c)&&(i?o(c,h):c.__proto__=h),c}})():void 0),kE}var NE,gF;function RA(){if(gF)return NE;gF=1;var r=Nt(),e=za(),t=np(),n=wve(),i=Pi(),a=xve(),o=my(),u=Tve(),c=Jd(),h=ap(),f=Rg(),v=ii(),y=up(),g=HX(),_=n.PROPER,E=n.CONFIGURABLE,A=g.IteratorPrototype,T=g.BUGGY_SAFARI_ITERATORS,C=v("iterator"),N="keys",k="values",j="entries",W=function(){return this};return NE=function(G,D,M,U,I,q,z){a(M,D,U);var Q=function(te){if(te===I&&ye)return ye;if(!T&&te&&te in J)return J[te];switch(te){case N:return function(){return new M(this,te)};case k:return function(){return new M(this,te)};case j:return function(){return new M(this,te)}}return function(){return new M(this)}},ce=D+" Iterator",re=!1,J=G.prototype,le=J[C]||J["@@iterator"]||I&&J[I],ye=!T&&le||Q(I),Z=D==="Array"&&J.entries||le,oe,L,Y;if(Z&&(oe=o(Z.call(new G)),oe!==Object.prototype&&oe.next&&(!t&&o(oe)!==A&&(u?u(oe,A):i(oe[C])||f(oe,C,W)),c(oe,ce,!0,!0),t&&(y[ce]=W))),_&&I===k&&le&&le.name!==k&&(!t&&E?h(J,"name",k):(re=!0,ye=function(){return e(le,this)})),I)if(L={values:Q(k),keys:q?ye:Q(N),entries:Q(j)},z)for(Y in L)(T||re||!(Y in J))&&f(J,Y,L[Y]);else r({target:D,proto:!0,forced:T||re},L);return(!t||z)&&J[C]!==ye&&f(J,C,ye,{name:I}),y[D]=ye,L},NE}var IE,mF;function CA(){return mF||(mF=1,IE=function(r,e){return{value:r,done:e}}),IE}var PE,yF;function cp(){if(yF)return PE;yF=1;var r=Ao(),e=AA(),t=up(),n=eh(),i=Bs().f,a=RA(),o=CA(),u=np(),c=Vn(),h="Array Iterator",f=n.set,v=n.getterFor(h);PE=a(Array,"Array",function(g,_){f(this,{type:h,target:r(g),index:0,kind:_})},function(){var g=v(this),_=g.target,E=g.index++;if(!_||E>=_.length)return g.target=null,o(void 0,!0);switch(g.kind){case"keys":return o(E,!1);case"values":return o(_[E],!1)}return o([E,_[E]],!1)},"values");var y=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!u&&c&&y.name!=="values")try{i(y,"name",{value:"values"})}catch{}return PE}var jE,bF;function Ove(){return bF||(bF=1,jE={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),jE}var wF;function dp(){if(wF)return iF;wF=1,cp();var r=Ove(),e=mn(),t=Jd(),n=up();for(var i in r)t(e[i],i),n[i]=n.Array;return iF}var ME,xF;function WX(){if(xF)return ME;xF=1;var r=bve();return dp(),ME=r,ME}var DE,_F;function Ave(){return _F||(_F=1,DE=WX()),DE}var Rve=Ave(),Cve=Jt(Rve),SF={},EF;function kve(){if(EF)return SF;EF=1;var r=Nt(),e=Zd(),t=IX(),n=ji(),i=dy(),a=wu(),o=Ao(),u=fy(),c=ii(),h=Og(),f=op(),v=h("slice"),y=c("species"),g=Array,_=Math.max;return r({target:"Array",proto:!0,forced:!v},{slice:function(A,T){var C=o(this),N=a(C),k=i(A,N),j=i(T===void 0?N:T,N),W,G,D;if(e(C)&&(W=C.constructor,t(W)&&(W===g||e(W.prototype))?W=void 0:n(W)&&(W=W[y],W===null&&(W=void 0)),W===g||W===void 0))return f(C,k,j);for(G=new(W===void 0?g:W)(_(j-k,0)),D=0;k<j;k++,D++)k in C&&u(G,D,C[k]);return G.length=D,G}}),SF}var qE,TF;function Nve(){if(TF)return qE;TF=1,kve();var r=Qi();return qE=r("Array","slice"),qE}var LE,OF;function Ive(){if(OF)return LE;OF=1;var r=ni(),e=Nve(),t=Array.prototype;return LE=function(n){var i=n.slice;return n===t||r(t,n)&&i===t.slice?e:i},LE}var $E,AF;function Pve(){if(AF)return $E;AF=1;var r=Ive();return $E=r,$E}var BE,RF;function jve(){return RF||(RF=1,BE=Pve()),BE}var Mve=jve(),tl=Jt(Mve),FE,CF;function Dve(){if(CF)return FE;CF=1;var r=fs(),e=br(),t=vy(),n=hy(),i=ml(),a=e([].concat);return FE=r("Reflect","ownKeys")||function(u){var c=t.f(i(u)),h=n.f;return h?a(c,h(u)):c},FE}var kF={},NF;function qve(){if(NF)return kF;NF=1;var r=Nt(),e=Zd();return r({target:"Array",stat:!0},{isArray:e}),kF}var zE,IF;function Lve(){if(IF)return zE;IF=1,qve();var r=Br();return zE=r.Array.isArray,zE}var UE,PF;function $ve(){if(PF)return UE;PF=1;var r=Lve();return UE=r,UE}var HE,jF;function Bve(){return jF||(jF=1,HE=$ve()),HE}var Fve=Bve(),Mn=Jt(Fve),MF={},DF;function zve(){if(DF)return MF;DF=1;var r=Nt(),e=$c().map,t=Og(),n=t("map");return r({target:"Array",proto:!0,forced:!n},{map:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),MF}var WE,qF;function Uve(){if(qF)return WE;qF=1,zve();var r=Qi();return WE=r("Array","map"),WE}var GE,LF;function Hve(){if(LF)return GE;LF=1;var r=ni(),e=Uve(),t=Array.prototype;return GE=function(n){var i=n.map;return n===t||r(t,n)&&i===t.map?e:i},GE}var VE,$F;function Wve(){if($F)return VE;$F=1;var r=Hve();return VE=r,VE}var YE,BF;function Gve(){return BF||(BF=1,YE=Wve()),YE}var Vve=Gve(),Nf=Jt(Vve),FF={},zF;function Yve(){if(zF)return FF;zF=1;var r=Nt(),e=ps(),t=Tg(),n=mr(),i=n(function(){t(1)});return r({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),FF}var KE,UF;function Kve(){if(UF)return KE;UF=1,Yve();var r=Br();return KE=r.Object.keys,KE}var XE,HF;function Xve(){if(HF)return XE;HF=1;var r=Kve();return XE=r,XE}var QE,WF;function Qve(){return WF||(WF=1,QE=Xve()),QE}var Zve=Qve(),jn=Jt(Zve),GF={},VF;function Jve(){if(VF)return GF;VF=1;var r=Nt(),e=br(),t=Date,n=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return n(new t)}}),GF}var ZE,YF;function ege(){if(YF)return ZE;YF=1,Jve();var r=Br();return ZE=r.Date.now,ZE}var JE,KF;function tge(){if(KF)return JE;KF=1;var r=ege();return JE=r,JE}var e3,XF;function rge(){return XF||(XF=1,e3=tge()),e3}var nge=rge(),N1=Jt(nge),QF={},t3,ZF;function hp(){if(ZF)return t3;ZF=1;var r=mr();return t3=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})},t3}var r3,JF;function ige(){if(JF)return r3;JF=1;var r=$c().forEach,e=hp(),t=e("forEach");return r3=t?[].forEach:function(i){return r(this,i,arguments.length>1?arguments[1]:void 0)},r3}var ez;function age(){if(ez)return QF;ez=1;var r=Nt(),e=ige();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),QF}var n3,tz;function sge(){if(tz)return n3;tz=1,age();var r=Qi();return n3=r("Array","forEach"),n3}var i3,rz;function oge(){if(rz)return i3;rz=1;var r=sge();return i3=r,i3}var a3,nz;function lge(){if(nz)return a3;nz=1;var r=lp(),e=Xi(),t=ni(),n=oge(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return a3=function(o){var u=o.forEach;return o===i||t(i,o)&&u===i.forEach||e(a,r(o))?n:u},a3}var s3,iz;function uge(){return iz||(iz=1,s3=lge()),s3}var cge=uge(),Kr=Jt(cge),az={},sz;function dge(){if(sz)return az;sz=1;var r=Nt(),e=br(),t=Zd(),n=e([].reverse),i=[1,2];return r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),n(this)}}),az}var o3,oz;function hge(){if(oz)return o3;oz=1,dge();var r=Qi();return o3=r("Array","reverse"),o3}var l3,lz;function fge(){if(lz)return l3;lz=1;var r=ni(),e=hge(),t=Array.prototype;return l3=function(n){var i=n.reverse;return n===t||r(t,n)&&i===t.reverse?e:i},l3}var u3,uz;function pge(){if(uz)return u3;uz=1;var r=fge();return u3=r,u3}var c3,cz;function vge(){return cz||(cz=1,c3=pge()),c3}var gge=vge(),Ed=Jt(gge),dz={},d3,hz;function mge(){if(hz)return d3;hz=1;var r=Vn(),e=Zd(),t=TypeError,n=Object.getOwnPropertyDescriptor,i=r&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}})();return d3=i?function(a,o){if(e(a)&&!n(a,"length").writable)throw new t("Cannot set read only .length");return a.length=o}:function(a,o){return a.length=o},d3}var h3,fz;function GX(){if(fz)return h3;fz=1;var r=rp(),e=TypeError;return h3=function(t,n){if(!delete t[n])throw new e("Cannot delete property "+r(n)+" of "+r(t))},h3}var pz;function yge(){if(pz)return dz;pz=1;var r=Nt(),e=ps(),t=dy(),n=sp(),i=wu(),a=mge(),o=NX(),u=SA(),c=fy(),h=GX(),f=Og(),v=f("splice"),y=Math.max,g=Math.min;return r({target:"Array",proto:!0,forced:!v},{splice:function(E,A){var T=e(this),C=i(T),N=t(E,C),k=arguments.length,j,W,G,D,M,U;for(k===0?j=W=0:k===1?(j=0,W=C-N):(j=k-2,W=g(y(n(A),0),C-N)),o(C+j-W),G=u(T,W),D=0;D<W;D++)M=N+D,M in T&&c(G,D,T[M]);if(G.length=W,j<W){for(D=N;D<C-W;D++)M=D+W,U=D+j,M in T?T[U]=T[M]:h(T,U);for(D=C;D>C-W+j;D--)h(T,D-1)}else if(j>W)for(D=C-W;D>N;D--)M=D+W-1,U=D+j-1,M in T?T[U]=T[M]:h(T,U);for(D=0;D<j;D++)T[D+N]=arguments[D+2];return a(T,C-W+j),G}}),dz}var f3,vz;function bge(){if(vz)return f3;vz=1,yge();var r=Qi();return f3=r("Array","splice"),f3}var p3,gz;function wge(){if(gz)return p3;gz=1;var r=ni(),e=bge(),t=Array.prototype;return p3=function(n){var i=n.splice;return n===t||r(t,n)&&i===t.splice?e:i},p3}var v3,mz;function xge(){if(mz)return v3;mz=1;var r=wge();return v3=r,v3}var g3,yz;function _ge(){return yz||(yz=1,g3=xge()),g3}var Sge=_ge(),lu=Jt(Sge),bz={},wz;function Ege(){if(wz)return bz;wz=1;var r=Nt(),e=bA().includes,t=mr(),n=AA(),i=t(function(){return!Array(1).includes()});return r({target:"Array",proto:!0,forced:i},{includes:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),n("includes"),bz}var m3,xz;function Tge(){if(xz)return m3;xz=1,Ege();var r=Qi();return m3=r("Array","includes"),m3}var _z={},y3,Sz;function Oge(){if(Sz)return y3;Sz=1;var r=ji(),e=gl(),t=ii(),n=t("match");return y3=function(i){var a;return r(i)&&((a=i[n])!==void 0?!!a:e(i)==="RegExp")},y3}var b3,Ez;function Age(){if(Ez)return b3;Ez=1;var r=Oge(),e=TypeError;return b3=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},b3}var w3,Tz;function Rge(){if(Tz)return w3;Tz=1;var r=ii(),e=r("match");return w3=function(t){var n=/./;try{"/./"[t](n)}catch{try{return n[e]=!1,"/./"[t](n)}catch{}}return!1},w3}var Oz;function Cge(){if(Oz)return _z;Oz=1;var r=Nt(),e=br(),t=Age(),n=yu(),i=Fs(),a=Rge(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!a("includes")},{includes:function(c){return!!~o(i(n(this)),i(t(c)),arguments.length>1?arguments[1]:void 0)}}),_z}var x3,Az;function kge(){if(Az)return x3;Az=1,Cge();var r=Qi();return x3=r("String","includes"),x3}var _3,Rz;function Nge(){if(Rz)return _3;Rz=1;var r=ni(),e=Tge(),t=kge(),n=Array.prototype,i=String.prototype;return _3=function(a){var o=a.includes;return a===n||r(n,a)&&o===n.includes?e:typeof a=="string"||a===i||r(i,a)&&o===i.includes?t:o},_3}var S3,Cz;function Ige(){if(Cz)return S3;Cz=1;var r=Nge();return S3=r,S3}var E3,kz;function Pge(){return kz||(kz=1,E3=Ige()),E3}var jge=Pge(),Tc=Jt(jge),Nz={},Iz;function Mge(){if(Iz)return Nz;Iz=1;var r=Nt(),e=mr(),t=ps(),n=my(),i=UX(),a=e(function(){n(1)});return r({target:"Object",stat:!0,forced:a,sham:!i},{getPrototypeOf:function(u){return n(t(u))}}),Nz}var T3,Pz;function Dge(){if(Pz)return T3;Pz=1,Mge();var r=Br();return T3=r.Object.getPrototypeOf,T3}var O3,jz;function qge(){if(jz)return O3;jz=1;var r=Dge();return O3=r,O3}var A3,Mz;function Lge(){return Mz||(Mz=1,A3=qge()),A3}var $ge=Lge(),Dz=Jt($ge),R3,qz;function Bge(){if(qz)return R3;qz=1,PX();var r=Qi();return R3=r("Array","concat"),R3}var C3,Lz;function Fge(){if(Lz)return C3;Lz=1;var r=ni(),e=Bge(),t=Array.prototype;return C3=function(n){var i=n.concat;return n===t||r(t,n)&&i===t.concat?e:i},C3}var k3,$z;function zge(){if($z)return k3;$z=1;var r=Fge();return k3=r,k3}var N3,Bz;function Uge(){return Bz||(Bz=1,N3=zge()),N3}var Hge=Uge(),Wge=Jt(Hge),Fz={},zz;function Gge(){if(zz)return Fz;zz=1;var r=Nt(),e=$c().filter,t=Og(),n=t("filter");return r({target:"Array",proto:!0,forced:!n},{filter:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),Fz}var I3,Uz;function Vge(){if(Uz)return I3;Uz=1,Gge();var r=Qi();return I3=r("Array","filter"),I3}var P3,Hz;function Yge(){if(Hz)return P3;Hz=1;var r=ni(),e=Vge(),t=Array.prototype;return P3=function(n){var i=n.filter;return n===t||r(t,n)&&i===t.filter?e:i},P3}var j3,Wz;function Kge(){if(Wz)return j3;Wz=1;var r=Yge();return j3=r,j3}var M3,Gz;function Xge(){return Gz||(Gz=1,M3=Kge()),M3}var Qge=Xge(),Da=Jt(Qge),Vz={},D3,Yz;function Zge(){if(Yz)return D3;Yz=1;var r=Vn(),e=mr(),t=br(),n=my(),i=Tg(),a=Ao(),o=sy().f,u=t(o),c=t([].push),h=r&&e(function(){var v=Object.create(null);return v[2]=2,!u(v,2)}),f=function(v){return function(y){for(var g=a(y),_=i(g),E=h&&n(g)===null,A=_.length,T=0,C=[],N;A>T;)N=_[T++],(!r||(E?N in g:u(g,N)))&&c(C,v?[N,g[N]]:g[N]);return C}};return D3={entries:f(!0),values:f(!1)},D3}var Kz;function Jge(){if(Kz)return Vz;Kz=1;var r=Nt(),e=Zge().values;return r({target:"Object",stat:!0},{values:function(n){return e(n)}}),Vz}var q3,Xz;function eme(){if(Xz)return q3;Xz=1,Jge();var r=Br();return q3=r.Object.values,q3}var L3,Qz;function tme(){if(Qz)return L3;Qz=1;var r=eme();return L3=r,L3}var $3,Zz;function rme(){return Zz||(Zz=1,$3=tme()),$3}var nme=rme(),ime=Jt(nme),Jz={},B3,e9;function kA(){return e9||(e9=1,B3=`
|
|
676
|
+
\v\f\r \u2028\u2029\uFEFF`),B3}var F3,t9;function VX(){if(t9)return F3;t9=1;var r=br(),e=yu(),t=Fs(),n=kA(),i=r("".replace),a=RegExp("^["+n+"]+"),o=RegExp("(^|[^"+n+"])["+n+"]+$"),u=function(c){return function(h){var f=t(e(h));return c&1&&(f=i(f,a,"")),c&2&&(f=i(f,o,"$1")),f}};return F3={start:u(1),end:u(2),trim:u(3)},F3}var z3,r9;function ame(){if(r9)return z3;r9=1;var r=mn(),e=mr(),t=br(),n=Fs(),i=VX().trim,a=kA(),o=r.parseInt,u=r.Symbol,c=u&&u.iterator,h=/^[+-]?0x/i,f=t(h.exec),v=o(a+"08")!==8||o(a+"0x16")!==22||c&&!e(function(){o(Object(c))});return z3=v?function(g,_){var E=i(n(g));return o(E,_>>>0||(f(h,E)?16:10))}:o,z3}var n9;function sme(){if(n9)return Jz;n9=1;var r=Nt(),e=ame();return r({global:!0,forced:parseInt!==e},{parseInt:e}),Jz}var U3,i9;function ome(){if(i9)return U3;i9=1,sme();var r=Br();return U3=r.parseInt,U3}var H3,a9;function lme(){if(a9)return H3;a9=1;var r=ome();return H3=r,H3}var W3,s9;function ume(){return s9||(s9=1,W3=lme()),W3}var cme=ume(),bo=Jt(cme),o9={},l9;function dme(){if(l9)return o9;l9=1;var r=Nt(),e=vA(),t=bA().indexOf,n=hp(),i=e([].indexOf),a=!!i&&1/i([1],1,-0)<0,o=a||!n("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(c){var h=arguments.length>1?arguments[1]:void 0;return a?i(this,c,h)||0:t(this,c,h)}}),o9}var G3,u9;function hme(){if(u9)return G3;u9=1,dme();var r=Qi();return G3=r("Array","indexOf"),G3}var V3,c9;function fme(){if(c9)return V3;c9=1;var r=ni(),e=hme(),t=Array.prototype;return V3=function(n){var i=n.indexOf;return n===t||r(t,n)&&i===t.indexOf?e:i},V3}var Y3,d9;function pme(){if(d9)return Y3;d9=1;var r=fme();return Y3=r,Y3}var K3,h9;function vme(){return h9||(h9=1,K3=pme()),K3}var gme=vme(),Lr=Jt(gme),f9={},p9;function mme(){if(p9)return f9;p9=1;var r=Nt(),e=Vn(),t=Ag();return r({target:"Object",stat:!0,sham:!e},{create:t}),f9}var X3,v9;function yme(){if(v9)return X3;v9=1,mme();var r=Br(),e=r.Object;return X3=function(n,i){return e.create(n,i)},X3}var Q3,g9;function bme(){if(g9)return Q3;g9=1;var r=yme();return Q3=r,Q3}var Z3,m9;function wme(){return m9||(m9=1,Z3=bme()),Z3}var xme=wme(),Td=Jt(xme),y9={},J3,b9;function _me(){if(b9)return J3;b9=1;var r=sp(),e=Fs(),t=yu(),n=RangeError;return J3=function(a){var o=e(t(this)),u="",c=r(a);if(c<0||c===1/0)throw new n("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(o+=o))c&1&&(u+=o);return u},J3}var e4,w9;function Sme(){if(w9)return e4;w9=1;var r=br(),e=TX(),t=Fs(),n=_me(),i=yu(),a=r(n),o=r("".slice),u=Math.ceil,c=function(h){return function(f,v,y){var g=t(i(f)),_=e(v),E=g.length,A=y===void 0?" ":t(y),T,C;return _<=E||A===""?g:(T=_-E,C=a(A,u(T/A.length)),C.length>T&&(C=o(C,0,T)),h?g+C:C+g)}};return e4={start:c(!1),end:c(!0)},e4}var t4,x9;function Eme(){if(x9)return t4;x9=1;var r=br(),e=mr(),t=Sme().start,n=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,u=o.toISOString,c=r(o.getTime),h=r(o.getUTCDate),f=r(o.getUTCFullYear),v=r(o.getUTCHours),y=r(o.getUTCMilliseconds),g=r(o.getUTCMinutes),_=r(o.getUTCMonth),E=r(o.getUTCSeconds);return t4=e(function(){return u.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){u.call(new Date(NaN))})?function(){if(!i(c(this)))throw new n("Invalid time value");var T=this,C=f(T),N=y(T),k=C<0?"-":C>9999?"+":"";return k+t(a(C),k?6:4,0)+"-"+t(_(T)+1,2,0)+"-"+t(h(T),2,0)+"T"+t(v(T),2,0)+":"+t(g(T),2,0)+":"+t(E(T),2,0)+"."+t(N,3,0)+"Z"}:u,t4}var _9;function Tme(){if(_9)return y9;_9=1;var r=Nt(),e=za(),t=ps(),n=xX(),i=Eme(),a=gl(),o=mr(),u=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:u},{toJSON:function(h){var f=t(this),v=n(f,"number");return typeof v=="number"&&!isFinite(v)?null:!("toISOString"in f)&&a(f)==="Date"?e(i,f):f.toISOString()}}),y9}var r4,S9;function Ome(){if(S9)return r4;S9=1,Tme(),qX();var r=Br(),e=ay();return r.JSON||(r.JSON={stringify:JSON.stringify}),r4=function(n,i,a){return e(r.JSON.stringify,null,arguments)},r4}var n4,E9;function Ame(){if(E9)return n4;E9=1;var r=Ome();return n4=r,n4}var i4,T9;function Rme(){return T9||(T9=1,i4=Ame()),i4}var Cme=Rme(),Cg=Jt(Cme),O9={},A9={},a4,R9;function YX(){if(R9)return a4;R9=1;var r=mn(),e=ep(),t=gl(),n=function(i){return e.slice(0,i.length)===i};return a4=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"})(),a4}var s4,C9;function kme(){if(C9)return s4;C9=1;var r=TypeError;return s4=function(e,t){if(e<t)throw new r("Not enough arguments");return e},s4}var o4,k9;function KX(){if(k9)return o4;k9=1;var r=mn(),e=ay(),t=Pi(),n=YX(),i=ep(),a=op(),o=kme(),u=r.Function,c=/MSIE .\./.test(i)||n==="BUN"&&(function(){var h=r.Bun.version.split(".");return h.length<3||h[0]==="0"&&(h[1]<3||h[1]==="3"&&h[2]==="0")})();return o4=function(h,f){var v=f?2:1;return c?function(y,g){var _=o(arguments.length,1)>v,E=t(y)?y:u(y),A=_?a(arguments,v):[],T=_?function(){e(E,this,A)}:E;return f?h(T,g):h(T)}:h},o4}var N9;function Nme(){if(N9)return A9;N9=1;var r=Nt(),e=mn(),t=KX(),n=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==n},{setInterval:n}),A9}var I9={},P9;function Ime(){if(P9)return I9;P9=1;var r=Nt(),e=mn(),t=KX(),n=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==n},{setTimeout:n}),I9}var j9;function XX(){return j9||(j9=1,Nme(),Ime()),O9}var l4,M9;function Pme(){if(M9)return l4;M9=1,XX();var r=Br();return l4=r.setTimeout,l4}var u4,D9;function jme(){return D9||(D9=1,u4=Pme()),u4}var Mme=jme(),uu=Jt(Mme),q9={},c4,L9;function Dme(){if(L9)return c4;L9=1;var r=ps(),e=dy(),t=wu();return c4=function(i){for(var a=r(this),o=t(a),u=arguments.length,c=e(u>1?arguments[1]:void 0,o),h=u>2?arguments[2]:void 0,f=h===void 0?o:e(h,o);f>c;)a[c++]=i;return a},c4}var $9;function qme(){if($9)return q9;$9=1;var r=Nt(),e=Dme(),t=AA();return r({target:"Array",proto:!0},{fill:e}),t("fill"),q9}var d4,B9;function Lme(){if(B9)return d4;B9=1,qme();var r=Qi();return d4=r("Array","fill"),d4}var h4,F9;function $me(){if(F9)return h4;F9=1;var r=ni(),e=Lme(),t=Array.prototype;return h4=function(n){var i=n.fill;return n===t||r(t,n)&&i===t.fill?e:i},h4}var f4,z9;function Bme(){if(z9)return f4;z9=1;var r=$me();return f4=r,f4}var p4,U9;function Fme(){return U9||(U9=1,p4=Bme()),p4}var zme=Fme(),kg=Jt(zme);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
677
|
+
* http://naver.github.io/egjs
|
|
678
|
+
*
|
|
679
|
+
* Forked By Naver egjs
|
|
680
|
+
* Copyright (c) hammerjs
|
|
681
|
+
* Licensed under the MIT license */function _o(){return _o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},_o.apply(this,arguments)}function zs(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function Qm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var u6;typeof Object.assign!="function"?u6=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])}return t}:u6=Object.assign;var qd=u6,H9=["","webkit","Moz","MS","ms","o"],Ume=typeof document>"u"?{style:{}}:document.createElement("div"),Hme="function",vf=Math.round,Ld=Math.abs,NA=Date.now;function yy(r,e){for(var t,n,i=e[0].toUpperCase()+e.slice(1),a=0;a<H9.length;){if(t=H9[a],n=t?t+i:e,n in r)return n;a++}}var cu;typeof window>"u"?cu={}:cu=window;var QX=yy(Ume.style,"touchAction"),ZX=QX!==void 0;function Wme(){if(!ZX)return!1;var r={},e=cu.CSS&&cu.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?cu.CSS.supports("touch-action",t):!0}),r}var JX="compute",eQ="auto",c6="manipulation",Od="none",Wv="pan-x",Gv="pan-y",Zm=Wme(),Gme=/mobile|tablet|ip(ad|hone|od)|android/i,tQ="ontouchstart"in cu,Vme=yy(cu,"PointerEvent")!==void 0,Yme=tQ&&Gme.test(navigator.userAgent),Ng="touch",Kme="pen",IA="mouse",Xme="kinect",Qme=25,wa=1,th=2,ei=4,La=8,I1=1,Ig=2,Pg=4,jg=8,If=16,ll=Ig|Pg,Ad=jg|If,rQ=ll|Ad,nQ=["x","y"],P1=["clientX","clientY"];function du(r,e,t){var n;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(n=0;n<r.length;)e.call(t,r[n],n,r),n++;else for(n in r)r.hasOwnProperty(n)&&e.call(t,r[n],n,r)}function by(r,e){return typeof r===Hme?r.apply(e&&e[0]||void 0,e):r}function bd(r,e){return r.indexOf(e)>-1}function Zme(r){if(bd(r,Od))return Od;var e=bd(r,Wv),t=bd(r,Gv);return e&&t?Od:e||t?e?Wv:Gv:bd(r,c6)?c6:eQ}var iQ=(function(){function r(t,n){this.manager=t,this.set(n)}var e=r.prototype;return e.set=function(n){n===JX&&(n=this.compute()),ZX&&this.manager.element.style&&Zm[n]&&(this.manager.element.style[QX]=n),this.actions=n.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var n=[];return du(this.manager.recognizers,function(i){by(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),Zme(n.join(" "))},e.preventDefaults=function(n){var i=n.srcEvent,a=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,u=bd(o,Od)&&!Zm[Od],c=bd(o,Gv)&&!Zm[Gv],h=bd(o,Wv)&&!Zm[Wv];if(u){var f=n.pointers.length===1,v=n.distance<2,y=n.deltaTime<250;if(f&&v&&y)return}if(!(h&&c)&&(u||c&&a&ll||h&&a&Ad))return this.preventSrc(i)},e.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},r})();function PA(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function aQ(r){var e=r.length;if(e===1)return{x:vf(r[0].clientX),y:vf(r[0].clientY)};for(var t=0,n=0,i=0;i<e;)t+=r[i].clientX,n+=r[i].clientY,i++;return{x:vf(t/e),y:vf(n/e)}}function W9(r){for(var e=[],t=0;t<r.pointers.length;)e[t]={clientX:vf(r.pointers[t].clientX),clientY:vf(r.pointers[t].clientY)},t++;return{timeStamp:NA(),pointers:e,center:aQ(e),deltaX:r.deltaX,deltaY:r.deltaY}}function j1(r,e,t){t||(t=nQ);var n=e[t[0]]-r[t[0]],i=e[t[1]]-r[t[1]];return Math.sqrt(n*n+i*i)}function d6(r,e,t){t||(t=nQ);var n=e[t[0]]-r[t[0]],i=e[t[1]]-r[t[1]];return Math.atan2(i,n)*180/Math.PI}function sQ(r,e){return r===e?I1:Ld(r)>=Ld(e)?r<0?Ig:Pg:e<0?jg:If}function Jme(r,e){var t=e.center,n=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(e.eventType===wa||a.eventType===ei)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-n.x),e.deltaY=i.y+(t.y-n.y)}function oQ(r,e,t){return{x:e/r||0,y:t/r||0}}function e1e(r,e){return j1(e[0],e[1],P1)/j1(r[0],r[1],P1)}function t1e(r,e){return d6(e[1],e[0],P1)+d6(r[1],r[0],P1)}function r1e(r,e){var t=r.lastInterval||e,n=e.timeStamp-t.timeStamp,i,a,o,u;if(e.eventType!==La&&(n>Qme||t.velocity===void 0)){var c=e.deltaX-t.deltaX,h=e.deltaY-t.deltaY,f=oQ(n,c,h);a=f.x,o=f.y,i=Ld(f.x)>Ld(f.y)?f.x:f.y,u=sQ(c,h),r.lastInterval=e}else i=t.velocity,a=t.velocityX,o=t.velocityY,u=t.direction;e.velocity=i,e.velocityX=a,e.velocityY=o,e.direction=u}function n1e(r,e){var t=r.session,n=e.pointers,i=n.length;t.firstInput||(t.firstInput=W9(e)),i>1&&!t.firstMultiple?t.firstMultiple=W9(e):i===1&&(t.firstMultiple=!1);var a=t.firstInput,o=t.firstMultiple,u=o?o.center:a.center,c=e.center=aQ(n);e.timeStamp=NA(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=d6(u,c),e.distance=j1(u,c),Jme(t,e),e.offsetDirection=sQ(e.deltaX,e.deltaY);var h=oQ(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=Ld(h.x)>Ld(h.y)?h.x:h.y,e.scale=o?e1e(o.pointers,n):1,e.rotation=o?t1e(o.pointers,n):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,r1e(t,e);var f=r.element,v=e.srcEvent,y;v.composedPath?y=v.composedPath()[0]:v.path?y=v.path[0]:y=v.target,PA(y,f)&&(f=y),e.target=f}function i1e(r,e,t){var n=t.pointers.length,i=t.changedPointers.length,a=e&wa&&n-i===0,o=e&(ei|La)&&n-i===0;t.isFirst=!!a,t.isFinal=!!o,a&&(r.session={}),t.eventType=e,n1e(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Vv(r){return r.trim().split(/\s+/g)}function Ov(r,e,t){du(Vv(e),function(n){r.addEventListener(n,t,!1)})}function Av(r,e,t){du(Vv(e),function(n){r.removeEventListener(n,t,!1)})}function G9(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var fp=(function(){function r(t,n){var i=this;this.manager=t,this.callback=n,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(a){by(t.options.enable,[t])&&i.handler(a)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ov(this.element,this.evEl,this.domHandler),this.evTarget&&Ov(this.target,this.evTarget,this.domHandler),this.evWin&&Ov(G9(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Av(this.element,this.evEl,this.domHandler),this.evTarget&&Av(this.target,this.evTarget,this.domHandler),this.evWin&&Av(G9(this.element),this.evWin,this.domHandler)},r})();function $d(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var n=0;n<r.length;){if(t&&r[n][t]==e||!t&&r[n]===e)return n;n++}return-1}var a1e={pointerdown:wa,pointermove:th,pointerup:ei,pointercancel:La,pointerout:La},s1e={2:Ng,3:Kme,4:IA,5:Xme},lQ="pointerdown",uQ="pointermove pointerup pointercancel";cu.MSPointerEvent&&!cu.PointerEvent&&(lQ="MSPointerDown",uQ="MSPointerMove MSPointerUp MSPointerCancel");var cQ=(function(r){zs(e,r);function e(){var n,i=e.prototype;return i.evEl=lQ,i.evWin=uQ,n=r.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var t=e.prototype;return t.handler=function(i){var a=this.store,o=!1,u=i.type.toLowerCase().replace("ms",""),c=a1e[u],h=s1e[i.pointerType]||i.pointerType,f=h===Ng,v=$d(a,i.pointerId,"pointerId");c&wa&&(i.button===0||f)?v<0&&(a.push(i),v=a.length-1):c&(ei|La)&&(o=!0),!(v<0)&&(a[v]=i,this.callback(this.manager,c,{pointers:a,changedPointers:[i],pointerType:h,srcEvent:i}),o&&a.splice(v,1))},e})(fp);function Yv(r){return Array.prototype.slice.call(r,0)}function jA(r,e,t){for(var n=[],i=[],a=0;a<r.length;){var o=e?r[a][e]:r[a];$d(i,o)<0&&n.push(r[a]),i[a]=o,a++}return t&&(e?n=n.sort(function(u,c){return u[e]>c[e]}):n=n.sort()),n}var o1e={touchstart:wa,touchmove:th,touchend:ei,touchcancel:La},l1e="touchstart touchmove touchend touchcancel",MA=(function(r){zs(e,r);function e(){var n;return e.prototype.evTarget=l1e,n=r.apply(this,arguments)||this,n.targetIds={},n}var t=e.prototype;return t.handler=function(i){var a=o1e[i.type],o=u1e.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Ng,srcEvent:i})},e})(fp);function u1e(r,e){var t=Yv(r.touches),n=this.targetIds;if(e&(wa|th)&&t.length===1)return n[t[0].identifier]=!0,[t,t];var i,a,o=Yv(r.changedTouches),u=[],c=this.target;if(a=t.filter(function(h){return PA(h.target,c)}),e===wa)for(i=0;i<a.length;)n[a[i].identifier]=!0,i++;for(i=0;i<o.length;)n[o[i].identifier]&&u.push(o[i]),e&(ei|La)&&delete n[o[i].identifier],i++;if(u.length)return[jA(a.concat(u),"identifier",!0),u]}var c1e={mousedown:wa,mousemove:th,mouseup:ei},d1e="mousedown",h1e="mousemove mouseup",DA=(function(r){zs(e,r);function e(){var n,i=e.prototype;return i.evEl=d1e,i.evWin=h1e,n=r.apply(this,arguments)||this,n.pressed=!1,n}var t=e.prototype;return t.handler=function(i){var a=c1e[i.type];a&wa&&i.button===0&&(this.pressed=!0),a&th&&i.which!==1&&(a=ei),this.pressed&&(a&ei&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:IA,srcEvent:i}))},e})(fp),f1e=2500,V9=25;function Y9(r){var e=r.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(n);var a=function(){var u=i.indexOf(n);u>-1&&i.splice(u,1)};setTimeout(a,f1e)}}function p1e(r,e){r&wa?(this.primaryTouch=e.changedPointers[0].identifier,Y9.call(this,e)):r&(ei|La)&&Y9.call(this,e)}function v1e(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],a=Math.abs(e-i.x),o=Math.abs(t-i.y);if(a<=V9&&o<=V9)return!0}return!1}var dQ=(function(){var r=(function(e){zs(t,e);function t(i,a){var o;return o=e.call(this,i,a)||this,o.handler=function(u,c,h){var f=h.pointerType===Ng,v=h.pointerType===IA;if(!(v&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(f)p1e.call(Qm(Qm(o)),c,h);else if(v&&v1e.call(Qm(Qm(o)),h))return;o.callback(u,c,h)}},o.touch=new MA(o.manager,o.handler),o.mouse=new DA(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(fp);return r})();function g1e(r){var e,t=r.options.inputClass;return t?e=t:Vme?e=cQ:Yme?e=MA:tQ?e=dQ:e=DA,new e(r,i1e)}function gf(r,e,t){return Array.isArray(r)?(du(r,t[e],t),!0):!1}var d1=1,js=2,Pf=4,Oc=8,hu=Oc,Kv=16,il=32,m1e=1;function y1e(){return m1e++}function Jm(r,e){var t=e.manager;return t?t.get(r):r}function K9(r){return r&Kv?"cancel":r&Oc?"end":r&Pf?"move":r&js?"start":""}var Mg=(function(){function r(t){t===void 0&&(t={}),this.options=_o({enable:!0},t),this.id=y1e(),this.manager=null,this.state=d1,this.simultaneous={},this.requireFail=[]}var e=r.prototype;return e.set=function(n){return qd(this.options,n),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(n){if(gf(n,"recognizeWith",this))return this;var i=this.simultaneous;return n=Jm(n,this),i[n.id]||(i[n.id]=n,n.recognizeWith(this)),this},e.dropRecognizeWith=function(n){return gf(n,"dropRecognizeWith",this)?this:(n=Jm(n,this),delete this.simultaneous[n.id],this)},e.requireFailure=function(n){if(gf(n,"requireFailure",this))return this;var i=this.requireFail;return n=Jm(n,this),$d(i,n)===-1&&(i.push(n),n.requireFailure(this)),this},e.dropRequireFailure=function(n){if(gf(n,"dropRequireFailure",this))return this;n=Jm(n,this);var i=$d(this.requireFail,n);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},e.emit=function(n){var i=this,a=this.state;function o(u){i.manager.emit(u,n)}a<Oc&&o(i.options.event+K9(a)),o(i.options.event),n.additionalEvent&&o(n.additionalEvent),a>=Oc&&o(i.options.event+K9(a))},e.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=il},e.canEmit=function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(il|d1)))return!1;n++}return!0},e.recognize=function(n){var i=qd({},n);if(!by(this.options.enable,[this,i])){this.reset(),this.state=il;return}this.state&(hu|Kv|il)&&(this.state=d1),this.state=this.process(i),this.state&(js|Pf|Oc|Kv)&&this.tryEmit(i)},e.process=function(n){},e.getTouchAction=function(){},e.reset=function(){},r})(),h6=(function(r){zs(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,_o({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},n))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[c6]},t.process=function(i){var a=this,o=this.options,u=i.pointers.length===o.pointers,c=i.distance<o.threshold,h=i.deltaTime<o.time;if(this.reset(),i.eventType&wa&&this.count===0)return this.failTimeout();if(c&&h&&u){if(i.eventType!==ei)return this.failTimeout();var f=this.pTime?i.timeStamp-this.pTime<o.interval:!0,v=!this.pCenter||j1(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!v||!f?this.count=1:this.count+=1,this._input=i;var y=this.count%o.taps;if(y===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=hu,a.tryEmit()},o.interval),js):hu}return il},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=il},this.options.interval),il},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===hu&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(Mg),jf=(function(r){zs(e,r);function e(n){return n===void 0&&(n={}),r.call(this,_o({pointers:1},n))||this}var t=e.prototype;return t.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},t.process=function(i){var a=this.state,o=i.eventType,u=a&(js|Pf),c=this.attrTest(i);return u&&(o&La||!c)?a|Kv:u||c?o&ei?a|Oc:a&js?a|Pf:js:il},e})(Mg);function hQ(r){return r===If?"down":r===jg?"up":r===Ig?"left":r===Pg?"right":""}var qA=(function(r){zs(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,_o({event:"pan",threshold:10,pointers:1,direction:rQ},n))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,a=[];return i&ll&&a.push(Gv),i&Ad&&a.push(Wv),a},t.directionTest=function(i){var a=this.options,o=!0,u=i.distance,c=i.direction,h=i.deltaX,f=i.deltaY;return c&a.direction||(a.direction&ll?(c=h===0?I1:h<0?Ig:Pg,o=h!==this.pX,u=Math.abs(i.deltaX)):(c=f===0?I1:f<0?jg:If,o=f!==this.pY,u=Math.abs(i.deltaY))),i.direction=c,o&&u>a.threshold&&c&a.direction},t.attrTest=function(i){return jf.prototype.attrTest.call(this,i)&&(this.state&js||!(this.state&js)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=hQ(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},e})(jf),fQ=(function(r){zs(e,r);function e(n){return n===void 0&&(n={}),r.call(this,_o({event:"swipe",threshold:10,velocity:.3,direction:ll|Ad,pointers:1},n))||this}var t=e.prototype;return t.getTouchAction=function(){return qA.prototype.getTouchAction.call(this)},t.attrTest=function(i){var a=this.options.direction,o;return a&(ll|Ad)?o=i.overallVelocity:a&ll?o=i.overallVelocityX:a&Ad&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Ld(o)>this.options.velocity&&i.eventType&ei},t.emit=function(i){var a=hQ(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},e})(jf),pQ=(function(r){zs(e,r);function e(n){return n===void 0&&(n={}),r.call(this,_o({event:"pinch",threshold:0,pointers:2},n))||this}var t=e.prototype;return t.getTouchAction=function(){return[Od]},t.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&js)},t.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},e})(jf),vQ=(function(r){zs(e,r);function e(n){return n===void 0&&(n={}),r.call(this,_o({event:"rotate",threshold:0,pointers:2},n))||this}var t=e.prototype;return t.getTouchAction=function(){return[Od]},t.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&js)},e})(jf),gQ=(function(r){zs(e,r);function e(n){var i;return n===void 0&&(n={}),i=r.call(this,_o({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[eQ]},t.process=function(i){var a=this,o=this.options,u=i.pointers.length===o.pointers,c=i.distance<o.threshold,h=i.deltaTime>o.time;if(this._input=i,!c||!u||i.eventType&(ei|La)&&!h)this.reset();else if(i.eventType&wa)this.reset(),this._timer=setTimeout(function(){a.state=hu,a.tryEmit()},o.time);else if(i.eventType&ei)return hu;return il},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===hu&&(i&&i.eventType&ei?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=NA(),this.manager.emit(this.options.event,this._input)))},e})(Mg),mQ={domEvents:!1,touchAction:JX,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},X9=[[vQ,{enable:!1}],[pQ,{enable:!1},["rotate"]],[fQ,{direction:ll}],[qA,{direction:ll},["swipe"]],[h6],[h6,{event:"doubletap",taps:2},["tap"]],[gQ]],b1e=1,Q9=2;function Z9(r,e){var t=r.element;if(t.style){var n;du(r.options.cssProps,function(i,a){n=yy(t.style,a),e?(r.oldCssProps[n]=t.style[n],t.style[n]=i):t.style[n]=r.oldCssProps[n]||""}),e||(r.oldCssProps={})}}function w1e(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var J9=(function(){function r(t,n){var i=this;this.options=qd({},mQ,n||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=g1e(this),this.touchAction=new iQ(this,this.options.touchAction),Z9(this,!0),du(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var e=r.prototype;return e.set=function(n){return qd(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},e.stop=function(n){this.session.stopped=n?Q9:b1e},e.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var a,o=this.recognizers,u=i.curRecognizer;(!u||u&&u.state&hu)&&(i.curRecognizer=null,u=null);for(var c=0;c<o.length;)a=o[c],i.stopped!==Q9&&(!u||a===u||a.canRecognizeWith(u))?a.recognize(n):a.reset(),!u&&a.state&(js|Pf|Oc)&&(i.curRecognizer=a,u=a),c++}},e.get=function(n){if(n instanceof Mg)return n;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===n)return i[a];return null},e.add=function(n){if(gf(n,"add",this))return this;var i=this.get(n.options.event);return i&&this.remove(i),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},e.remove=function(n){if(gf(n,"remove",this))return this;var i=this.get(n);if(n){var a=this.recognizers,o=$d(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},e.on=function(n,i){if(n===void 0||i===void 0)return this;var a=this.handlers;return du(Vv(n),function(o){a[o]=a[o]||[],a[o].push(i)}),this},e.off=function(n,i){if(n===void 0)return this;var a=this.handlers;return du(Vv(n),function(o){i?a[o]&&a[o].splice($d(a[o],i),1):delete a[o]}),this},e.emit=function(n,i){this.options.domEvents&&w1e(n,i);var a=this.handlers[n]&&this.handlers[n].slice();if(!(!a||!a.length)){i.type=n,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},e.destroy=function(){this.element&&Z9(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r})(),x1e={touchstart:wa,touchmove:th,touchend:ei,touchcancel:La},_1e="touchstart",S1e="touchstart touchmove touchend touchcancel",E1e=(function(r){zs(e,r);function e(){var n,i=e.prototype;return i.evTarget=_1e,i.evWin=S1e,n=r.apply(this,arguments)||this,n.started=!1,n}var t=e.prototype;return t.handler=function(i){var a=x1e[i.type];if(a===wa&&(this.started=!0),!!this.started){var o=T1e.call(this,i,a);a&(ei|La)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Ng,srcEvent:i})}},e})(fp);function T1e(r,e){var t=Yv(r.touches),n=Yv(r.changedTouches);return e&(ei|La)&&(t=jA(t.concat(n),"identifier",!0)),[t,n]}function yQ(r,e,t){var n="DEPRECATED METHOD: "+e+`
|
|
682
|
+
`+t+` AT
|
|
683
|
+
`;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,a),r.apply(this,arguments)}}var bQ=yQ(function(r,e,t){for(var n=Object.keys(e),i=0;i<n.length;)(!t||t&&r[n[i]]===void 0)&&(r[n[i]]=e[n[i]]),i++;return r},"extend","Use `assign`."),O1e=yQ(function(r,e){return bQ(r,e,!0)},"merge","Use `assign`.");function A1e(r,e,t){var n=e.prototype,i;i=r.prototype=Object.create(n),i.constructor=r,i._super=n,t&&qd(i,t)}function eU(r,e){return function(){return r.apply(e,arguments)}}var wQ=(function(){var r=function(t,n){return n===void 0&&(n={}),new J9(t,_o({recognizers:X9.concat()},n))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=rQ,r.DIRECTION_DOWN=If,r.DIRECTION_LEFT=Ig,r.DIRECTION_RIGHT=Pg,r.DIRECTION_UP=jg,r.DIRECTION_HORIZONTAL=ll,r.DIRECTION_VERTICAL=Ad,r.DIRECTION_NONE=I1,r.DIRECTION_DOWN=If,r.INPUT_START=wa,r.INPUT_MOVE=th,r.INPUT_END=ei,r.INPUT_CANCEL=La,r.STATE_POSSIBLE=d1,r.STATE_BEGAN=js,r.STATE_CHANGED=Pf,r.STATE_ENDED=Oc,r.STATE_RECOGNIZED=hu,r.STATE_CANCELLED=Kv,r.STATE_FAILED=il,r.Manager=J9,r.Input=fp,r.TouchAction=iQ,r.TouchInput=MA,r.MouseInput=DA,r.PointerEventInput=cQ,r.TouchMouseInput=dQ,r.SingleTouchInput=E1e,r.Recognizer=Mg,r.AttrRecognizer=jf,r.Tap=h6,r.Pan=qA,r.Swipe=fQ,r.Pinch=pQ,r.Rotate=vQ,r.Press=gQ,r.on=Ov,r.off=Av,r.each=du,r.merge=O1e,r.extend=bQ,r.bindFn=eU,r.assign=qd,r.inherit=A1e,r.bindFn=eU,r.prefixed=yy,r.toArray=Yv,r.inArray=$d,r.uniqueArray=jA,r.splitStr=Vv,r.boolOrFn=by,r.hasParent=PA,r.addEventListeners=Ov,r.removeEventListeners=Av,r.defaults=qd({},mQ,{preset:X9}),r})();wQ.defaults;Cve("DELETE");function wy(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return R1e(e.length?e:[N1()])}function R1e(r){let[e,t,n]=C1e(r),i=1;const a=()=>{const o=2091639*e+i*23283064365386963e-26;return e=t,t=n,n=o-(i=o|0)};return a.uint32=()=>a()*4294967296,a.fract53=()=>a()+(a()*2097152|0)*11102230246251565e-32,a.algorithm="Alea",a.seed=r,a.version="0.9",a}function C1e(){const r=k1e();let e=r(" "),t=r(" "),n=r(" ");for(let i=0;i<arguments.length;i++)e-=r(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),t-=r(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=r(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1);return[e,t,n]}function k1e(){let r=4022871197;return function(e){const t=e.toString();for(let n=0;n<t.length;n++){r+=t.charCodeAt(n);let i=.02519603282416938*r;r=i>>>0,i-=r,i*=r,r=i>>>0,i-=r,r+=i*4294967296}return(r>>>0)*23283064365386963e-26}}function N1e(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const LA=typeof window<"u"?window.Hammer||wQ:function(){return N1e()};function al(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=LA(this._dom.overlay);t.on("tap",Ze(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Kr(n).call(n,i=>{t.on(i,a=>{a.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=i=>{I1e(i.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=i=>{("key"in i?i.key==="Escape":i.keyCode===27)&&this.deactivate()}}kX(al.prototype);al.current=null;al.prototype.destroy=function(){this.deactivate();for(const t of Ed(r=lu(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};al.prototype.activate=function(){al.current&&al.current.deactivate(),al.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};al.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};al.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function I1e(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const P1e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,j1e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,M1e=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,D1e=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function vc(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(vc(e),r.removeChild(e))}}function xf(r){return r instanceof String||typeof r=="string"}function tU(r){return typeof r=="object"&&r!==null}function Bd(r,e,t,n){let i=!1;n===!0&&(i=e[t]===null&&r[t]!==void 0),i?delete r[t]:r[t]=e[t]}function xQ(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const n in r)if(e[n]!==void 0)if(e[n]===null||typeof e[n]!="object")Bd(r,e,n,t);else{const i=r[n],a=e[n];tU(i)&&tU(a)&&xQ(i,a,t)}}function pp(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Mn(t))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<r.length;i++){const a=r[i];if(Object.prototype.hasOwnProperty.call(t,a))if(t[a]&&t[a].constructor===Object)e[a]===void 0&&(e[a]={}),e[a].constructor===Object?rn(e[a],t[a],!1,n):Bd(e,t,a,n);else{if(Mn(t[a]))throw new TypeError("Arrays are not supported by deepExtend");Bd(e,t,a,n)}}return e}function M1(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Mn(t))throw new TypeError("Arrays are not supported by deepExtend");for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!Tc(r).call(r,i))if(t[i]&&t[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?rn(e[i],t[i]):Bd(e,t,i,n);else if(Mn(t[i])){e[i]=[];for(let a=0;a<t[i].length;a++)e[i].push(t[i][a])}else Bd(e,t,i,n);return e}function rn(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)||t===!0)if(typeof e[a]=="object"&&e[a]!==null&&Dz(e[a])===Object.prototype)r[a]===void 0?r[a]=rn({},e[a],t):typeof r[a]=="object"&&r[a]!==null&&Dz(r[a])===Object.prototype?rn(r[a],e[a],t):Bd(r,e,a,n);else if(Mn(e[a])){var i;r[a]=tl(i=e[a]).call(i)}else Bd(r,e,a,n);return r}function D1(r,e){return[...r,e]}function q1e(r){return tl(r).call(r)}function L1e(r){return r.getBoundingClientRect().left}function $1e(r){return r.getBoundingClientRect().top}function cr(r,e){if(Mn(r)){const t=r.length;for(let n=0;n<t;n++)e(r[n],n,r)}else for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&e(r[t],t,r)}function $A(r){let e;switch(r.length){case 3:case 4:return e=j1e.exec(r),e?{r:bo(e[1]+e[1],16),g:bo(e[2]+e[2],16),b:bo(e[3]+e[3],16)}:null;case 6:case 7:return e=P1e.exec(r),e?{r:bo(e[1],16),g:bo(e[2],16),b:bo(e[3],16)}:null;default:return null}}function Is(r,e){if(Tc(r).call(r,"rgba"))return r;if(Tc(r).call(r,"rgb")){const t=r.substr(Lr(r).call(r,"(")+1).replace(")","").split(",");return"rgba("+t[0]+","+t[1]+","+t[2]+","+e+")"}else{const t=$A(r);return t==null?r:"rgba("+t.r+","+t.g+","+t.b+","+e+")"}}function _Q(r,e,t){var n;return"#"+tl(n=((1<<24)+(r<<16)+(e<<8)+t).toString(16)).call(n,1)}function f6(r,e){if(xf(r)){let n=r;if(EQ(n)){var t;const i=Nf(t=n.substr(4).substr(0,n.length-5).split(",")).call(t,function(a){return bo(a)});n=_Q(i[0],i[1],i[2])}if(SQ(n)===!0){const i=B1e(n),a={h:i.h,s:i.s*.8,v:Math.min(1,i.v*1.02)},o={h:i.h,s:Math.min(1,i.s*1.25),v:i.v*.8},u=p6(o.h,o.s,o.v),c=p6(a.h,a.s,a.v);return{background:n,border:u,highlight:{background:c,border:u},hover:{background:c,border:u}}}else return{background:n,border:n,highlight:{background:n,border:n},hover:{background:n,border:n}}}else return{background:r.background||void 0,border:r.border||void 0,highlight:xf(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||void 0,border:r.highlight&&r.highlight.border||void 0},hover:xf(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||void 0,background:r.hover&&r.hover.background||void 0}}}function mv(r,e,t){r=r/255,e=e/255,t=t/255;const n=Math.min(r,Math.min(e,t)),i=Math.max(r,Math.max(e,t));if(n===i)return{h:0,s:0,v:n};const a=r===n?e-t:t===n?r-e:t-r,u=60*((r===n?3:t===n?1:5)-a/(i-n))/360,c=(i-n)/i;return{h:u,s:c,v:i}}function h1(r,e,t){let n,i,a;const o=Math.floor(r*6),u=r*6-o,c=t*(1-e),h=t*(1-u*e),f=t*(1-(1-u)*e);switch(o%6){case 0:n=t,i=f,a=c;break;case 1:n=h,i=t,a=c;break;case 2:n=c,i=t,a=f;break;case 3:n=c,i=h,a=t;break;case 4:n=f,i=c,a=t;break;case 5:n=t,i=c,a=h;break}return{r:Math.floor(n*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function p6(r,e,t){const n=h1(r,e,t);return _Q(n.r,n.g,n.b)}function B1e(r){const e=$A(r);if(!e)throw new TypeError("'".concat(r,"' is not a valid color."));return mv(e.r,e.g,e.b)}function SQ(r){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)}function EQ(r){return M1e.test(r)}function F1e(r){return D1e.test(r)}function Ac(r){if(r===null||typeof r!="object")return null;if(r instanceof Element)return r;const e=Td(r);for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&typeof r[t]=="object"&&(e[t]=Ac(r[t]));return e}function Ns(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=function(g){return g!=null},a=function(g){return g!==null&&typeof g=="object"},o=function(g){for(const _ in g)if(Object.prototype.hasOwnProperty.call(g,_))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(e))throw new Error("Parameter options must be an object");if(!i(t))throw new Error("Parameter option must have a value");if(!a(n))throw new Error("Parameter globalOptions must be an object");const u=function(g,_,E){a(g[E])||(g[E]={});const A=_[E],T=g[E];for(const C in A)Object.prototype.hasOwnProperty.call(A,C)&&(T[C]=A[C])},c=e[t],f=a(n)&&!o(n)?n[t]:void 0,v=f?f.enabled:void 0;if(c===void 0)return;if(typeof c=="boolean"){a(r[t])||(r[t]={}),r[t].enabled=c;return}if(c===null&&!a(r[t]))if(i(f))r[t]=Td(f);else return;if(!a(c))return;let y=!0;c.enabled!==void 0?y=c.enabled:v!==void 0&&(y=f.enabled),u(r,e,t),r[t].enabled=y}const z1e={linear(r){return r},easeInQuad(r){return r*r},easeOutQuad(r){return r*(2-r)},easeInOutQuad(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic(r){return r*r*r},easeOutCubic(r){return--r*r*r+1},easeInOutCubic(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart(r){return r*r*r*r},easeOutQuart(r){return 1- --r*r*r*r},easeInOutQuart(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint(r){return r*r*r*r*r},easeOutQuint(r){return 1+--r*r*r*r*r},easeInOutQuint(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function gc(r,e){let t;Mn(e)||(e=[e]);for(const n of r)if(n){t=n[e[0]];for(let i=1;i<e.length;i++)t&&(t=t[e[i]]);if(typeof t<"u")break}return t}const U1e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};let H1e=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return U1e[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let n;const i=this._isColorString(e);if(i!==void 0&&(e=i),xf(e)===!0){if(EQ(e)===!0){const a=e.substr(4).substr(0,e.length-5).split(",");n={r:a[0],g:a[1],b:a[2],a:1}}else if(F1e(e)===!0){const a=e.substr(5).substr(0,e.length-6).split(",");n={r:a[0],g:a[1],b:a[2],a:a[3]}}else if(SQ(e)===!0){const a=$A(e);n={r:a.r,g:a.g,b:a.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const a=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Cg(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=Jn({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",uu(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=Jn({},e)),this.color=e;const n=mv(e.r,e.g,e.b),i=2*Math.PI,a=this.r*n.s,o=this.centerCoordinates.x+a*Math.sin(i*n.h),u=this.centerCoordinates.y+a*Math.cos(i*n.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=mv(this.color.r,this.color.g,this.color.b);t.v=e/100;const n=h1(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=mv(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const i=this.colorPickerCanvas.clientWidth,a=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,i,a),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),kg(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,i;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const a=this;this.opacityRange.onchange=function(){a._setOpacity(this.value)},this.opacityRange.oninput=function(){a._setOpacity(this.value)},this.brightnessRange.onchange=function(){a._setBrightness(this.value)},this.brightnessRange.oninput=function(){a._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=Ze(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=Ze(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=Ze(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=Ze(i=this._loadLast).call(i,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new LA(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let i,a,o,u;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;const c=2*Math.PI/360,h=1/360,f=1/this.r;let v;for(o=0;o<360;o++)for(u=0;u<this.r;u++)i=this.centerCoordinates.x+u*Math.sin(c*o),a=this.centerCoordinates.y+u*Math.cos(c*o),v=h1(o*h,u*f,1),e.fillStyle="rgb("+v.r+","+v.g+","+v.b+")",e.fillRect(i-.5,a-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){const t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,i=e.center.y-t.top,a=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,u=n-o,c=i-a,h=Math.atan2(u,c),f=.98*Math.min(Math.sqrt(u*u+c*c),o),v=Math.cos(h)*f+a,y=Math.sin(h)*f+o;this.colorPickerSelector.style.top=v-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=y-.5*this.colorPickerSelector.clientWidth+"px";let g=h/(2*Math.PI);g=g<0?g+1:g;const _=f/this.r,E=mv(this.color.r,this.color.g,this.color.b);E.h=g,E.s=_;const A=h1(E.h,E.s,E.v);A.a=this.color.a,this.color=A,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}};function v6(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];if(e.length<1)throw new TypeError("Invalid arguments.");if(e.length===1)return document.createTextNode(e[0]);{const n=document.createElement(e[0]);return n.appendChild(v6(...tl(e).call(e,1))),n}}let W1e=class{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Jn(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new H1e(i),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(Mn(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Da(e)!==void 0&&(this.options.filter=Da(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Da(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=Da(this.options);let t=0,n=!1;for(const i in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,i)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(i,[]),n=n||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||Lr(e).call(e,i)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){const a=document.createElement("div");a.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Kr(n).call(n,o=>{a.appendChild(o)}),this.domElements.push(a),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+t.length,n===!0){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(v6("i","b",e))}else i.innerText=e+":";return i}_makeDropdown(e,t,n){const i=document.createElement("select");i.className="vis-configuration vis-config-select";let a=0;t!==void 0&&Lr(e).call(e,t)!==-1&&(a=Lr(e).call(e,t));for(let c=0;c<e.length;c++){const h=document.createElement("option");h.value=e[c],c===a&&(h.selected="selected"),h.innerText=e[c],i.appendChild(h)}const o=this;i.onchange=function(){o._update(this.value,n)};const u=this._makeLabel(n[n.length-1],n);this._makeItem(n,u,i)}_makeRange(e,t,n){const i=e[0],a=e[1],o=e[2],u=e[3],c=document.createElement("input");c.className="vis-configuration vis-config-range";try{c.type="range",c.min=a,c.max=o}catch{}c.step=u;let h="",f=0;t!==void 0?(t<0&&t*1.2<a?(c.min=Math.ceil(t*1.2),f=c.min,h="range increased"):t/1.2<a&&(c.min=Math.ceil(t/1.2),f=c.min,h="range increased"),t*1.2>o&&o!==1&&(c.max=Math.ceil(t*1.2),f=c.max,h="range increased"),c.value=t):c.value=i;const v=document.createElement("input");v.className="vis-configuration vis-config-rangeinput",v.value=c.value;const y=this;c.onchange=function(){v.value=this.value,y._update(Number(this.value),n)},c.oninput=function(){v.value=this.value};const g=this._makeLabel(n[n.length-1],n),_=this._makeItem(n,g,c,v);h!==""&&this.popupHistory[_]!==f&&(this.popupHistory[_]=f,this._setupPopup(h,_))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){const n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=uu(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=uu(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){const i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,t!==void 0&&(i.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));const a=this;i.onchange=function(){a._update(this.checked,n)};const o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,i)}_makeTextInput(e,t,n){const i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=t,t!==e&&this.changedOptions.push({path:n,value:t});const a=this;i.onchange=function(){a._update(this.value,n)};const o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,i)}_makeColorField(e,t,n){const i=e[1],a=document.createElement("div");t=t===void 0?i:t,t!=="none"?(a.className="vis-configuration vis-config-colorBlock",a.style.backgroundColor=t):a.className="vis-configuration vis-config-colorBlock none",t=t===void 0?i:t,a.onclick=()=>{this._showColorPicker(t,a,n)};const o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,a)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(i=>{const a="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.style.backgroundColor=a,this._update(a,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=!1;const a=Da(this.options);let o=!1;for(const u in e)if(Object.prototype.hasOwnProperty.call(e,u)){i=!0;const c=e[u],h=D1(t,u);if(typeof a=="function"&&(i=a(u,t),i===!1&&!Mn(c)&&typeof c!="string"&&typeof c!="boolean"&&c instanceof Object&&(this.allowCreation=!1,i=this._handleObject(c,h,!0),this.allowCreation=n===!1)),i!==!1){o=!0;const f=this._getValue(h);if(Mn(c))this._handleArray(c,f,h);else if(typeof c=="string")this._makeTextInput(c,f,h);else if(typeof c=="boolean")this._makeCheckbox(c,f,h);else if(c instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(c.enabled!==void 0){const v=D1(h,"enabled"),y=this._getValue(v);if(y===!0){const g=this._makeLabel(u,h,!0);this._makeItem(h,g),o=this._handleObject(c,h)||o}else this._makeCheckbox(c,y,h)}else{const v=this._makeLabel(u,h,!0);this._makeItem(h,v),o=this._handleObject(c,h)||o}}else console.error("dont know how to handle",c,u,h)}}return o}_handleArray(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){const n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let a=0;a<t.length;a++)t[a]!=="global"&&(i[t[a]]===void 0&&(i[t[a]]={}),a!==t.length-1?i=i[t[a]]:i[t[a]]=e);return n}_printOptions(){const e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(v6("pre","const options = "+Cg(e,null,2)))}getOptions(){const e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},G1e=class{constructor(e,t){this.container=e,this.overflowMethod=t||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(e,t){this.x=bo(e),this.y=bo(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){const t=this.frame.clientHeight,n=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,a=this.frame.parentNode.clientWidth;let o=0,u=0;if(this.overflowMethod=="flip"){let c=!1,h=!0;this.y-t<this.padding&&(h=!1),this.x+n>a-this.padding&&(c=!0),c?o=this.x-n:o=this.x,h?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>i&&(u=i-t-this.padding),u<this.padding&&(u=this.padding),o=this.x,o+n+this.padding>a&&(o=a-n-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"px",this.frame.style.top=u+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},hv=!1,rU;const g6="background: #FFeeee; color: #dd0000";let V1e=class In{static validate(e,t,n){hv=!1,rU=t;let i=t;return n!==void 0&&(i=t[n]),In.parse(e,i,[]),hv}static parse(e,t,n){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&In.check(i,e,t,n)}static check(e,t,n,i){if(n[e]===void 0&&n.__any__===void 0){In.getSuggestion(e,n,i);return}let a=e,o=!0;n[e]===void 0&&n.__any__!==void 0&&(a="__any__",o=In.getType(t[e])==="object");let u=n[a];o&&u.__type__!==void 0&&(u=u.__type__),In.checkFields(e,t,n,a,u,i)}static checkFields(e,t,n,i,a,o){const u=function(f){console.error("%c"+f+In.printLocation(o,e),g6)},c=In.getType(t[e]),h=a[c];h!==void 0?In.getType(h)==="array"&&Lr(h).call(h,t[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+In.print(h)+' not "'+t[e]+'". '),hv=!0):c==="object"&&i!=="__any__"&&(o=D1(o,e),In.parse(t[e],n[i],o)):a.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+In.print(jn(a))+". Received ["+c+'] "'+t[e]+'"'),hv=!0)}static getType(e){const t=typeof e;return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":Mn(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}static getSuggestion(e,t,n){const i=In.findInOptions(e,t,n,!1),a=In.findInOptions(e,rU,[],!0),o=8,u=4;let c;i.indexMatch!==void 0?c=" in "+In.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+`"?
|
|
684
|
+
|
|
685
|
+
`:a.distance<=u&&i.distance>a.distance?c=" in "+In.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+In.printLocation(a.path,a.closestMatch,""):i.distance<=o?c='. Did you mean "'+i.closestMatch+'"?'+In.printLocation(i.path,e):c=". Did you mean one of these: "+In.print(jn(t))+In.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+c,g6),hv=!0}static findInOptions(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o="",u=[];const c=e.toLowerCase();let h;for(const v in t){let y;if(t[v].__type__!==void 0&&i===!0){const g=In.findInOptions(e,t[v],D1(n,v));a>g.distance&&(o=g.closestMatch,u=g.path,a=g.distance,h=g.indexMatch)}else{var f;Lr(f=v.toLowerCase()).call(f,c)!==-1&&(h=v),y=In.levenshteinDistance(e,v),a>y&&(o=v,u=q1e(n),a=y)}}return{closestMatch:o,path:u,distance:a,indexMatch:h}}static printLocation(e,t){let i=`
|
|
686
|
+
|
|
687
|
+
`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
688
|
+
`)+`options = {
|
|
689
|
+
`;for(let a=0;a<e.length;a++){for(let o=0;o<a+1;o++)i+=" ";i+=e[a]+`: {
|
|
690
|
+
`}for(let a=0;a<e.length+1;a++)i+=" ";i+=t+`
|
|
691
|
+
`;for(let a=0;a<e.length+1;a++){for(let o=0;o<e.length-a;o++)i+=" ";i+=`}
|
|
692
|
+
`}return i+`
|
|
693
|
+
|
|
694
|
+
`}static print(e){return Cg(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const n=[];let i;for(i=0;i<=t.length;i++)n[i]=[i];let a;for(a=0;a<=e.length;a++)n[0][a]=a;for(i=1;i<=t.length;i++)for(a=1;a<=e.length;a++)t.charAt(i-1)==e.charAt(a-1)?n[i][a]=n[i-1][a-1]:n[i][a]=Math.min(n[i-1][a-1]+1,Math.min(n[i][a-1]+1,n[i-1][a]+1));return n[t.length][e.length]}};const Y1e=al,K1e=W1e,_f=LA,X1e=G1e,TQ=g6,Q1e=V1e;function Z1e(r){return bc=r,rye()}var OQ={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},BA=Td(OQ);BA.color="color.color";BA.style="dashes";var va={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},nU={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},bc="",Mf=0,sr="",Ft="",Ma=va.NULL;function J1e(){Mf=0,sr=bc.charAt(0)}function Oi(){Mf++,sr=bc.charAt(Mf)}function af(){return bc.charAt(Mf+1)}function iU(r){var e=r.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function kc(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function eye(r,e,t){for(var n=e.split("."),i=r;n.length;){var a=n.shift();n.length?(i[a]||(i[a]={}),i=i[a]):i[a]=t}}function AQ(r,e){for(var t,n,i=null,a=[r],o=r;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(t=0,n=o.nodes.length;t<n;t++)if(e.id===o.nodes[t].id){i=o.nodes[t];break}}for(i||(i={id:e.id},r.node&&(i.attr=kc(i.attr,r.node))),t=a.length-1;t>=0;t--){var u,c=a[t];c.nodes||(c.nodes=[]),Lr(u=c.nodes).call(u,i)===-1&&c.nodes.push(i)}e.attr&&(i.attr=kc(i.attr,e.attr))}function tye(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=kc({},r.edge);e.attr=kc(t,e.attr)}}function RQ(r,e,t,n,i){var a={from:e,to:t,type:n};return r.edge&&(a.attr=kc({},r.edge)),a.attr=kc(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function nn(){for(Ma=va.NULL,Ft="";sr===" "||sr===" "||sr===`
|
|
695
|
+
`||sr==="\r";)Oi();do{var r=!1;if(sr==="#"){for(var e=Mf-1;bc.charAt(e)===" "||bc.charAt(e)===" ";)e--;if(bc.charAt(e)===`
|
|
696
|
+
`||bc.charAt(e)===""){for(;sr!=""&&sr!=`
|
|
697
|
+
`;)Oi();r=!0}}if(sr==="/"&&af()==="/"){for(;sr!=""&&sr!=`
|
|
698
|
+
`;)Oi();r=!0}if(sr==="/"&&af()==="*"){for(;sr!="";)if(sr==="*"&&af()==="/"){Oi(),Oi();break}else Oi();r=!0}for(;sr===" "||sr===" "||sr===`
|
|
699
|
+
`||sr==="\r";)Oi()}while(r);if(sr===""){Ma=va.DELIMITER;return}var t=sr+af();if(nU[t]){Ma=va.DELIMITER,Ft=t,Oi(),Oi();return}if(nU[sr]){Ma=va.DELIMITER,Ft=sr,Oi();return}if(iU(sr)||sr==="-"){for(Ft+=sr,Oi();iU(sr);)Ft+=sr,Oi();Ft==="false"?Ft=!1:Ft==="true"?Ft=!0:isNaN(Number(Ft))||(Ft=Number(Ft)),Ma=va.IDENTIFIER;return}if(sr==='"'){for(Oi();sr!=""&&(sr!='"'||sr==='"'&&af()==='"');)sr==='"'?(Ft+=sr,Oi()):sr==="\\"&&af()==="n"?(Ft+=`
|
|
700
|
+
`,Oi()):Ft+=sr,Oi();if(sr!='"')throw ga('End of string " expected');Oi(),Ma=va.IDENTIFIER;return}for(Ma=va.UNKNOWN;sr!="";)Ft+=sr,Oi();throw new SyntaxError('Syntax error in part "'+IQ(Ft,30)+'"')}function rye(){var r={};if(J1e(),nn(),Ft==="strict"&&(r.strict=!0,nn()),(Ft==="graph"||Ft==="digraph")&&(r.type=Ft,nn()),Ma===va.IDENTIFIER&&(r.id=Ft,nn()),Ft!="{")throw ga("Angle bracket { expected");if(nn(),CQ(r),Ft!="}")throw ga("Angle bracket } expected");if(nn(),Ft!=="")throw ga("End of file expected");return nn(),delete r.node,delete r.edge,delete r.graph,r}function CQ(r){for(;Ft!==""&&Ft!="}";)nye(r),Ft===";"&&nn()}function nye(r){var e=kQ(r);if(e){NQ(r,e);return}var t=iye(r);if(!t){if(Ma!=va.IDENTIFIER)throw ga("Identifier expected");var n=Ft;if(nn(),Ft==="="){if(nn(),Ma!=va.IDENTIFIER)throw ga("Identifier expected");r[n]=Ft,nn()}else aye(r,n)}}function kQ(r){var e=null;if(Ft==="subgraph"&&(e={},e.type="subgraph",nn(),Ma===va.IDENTIFIER&&(e.id=Ft,nn())),Ft==="{"){if(nn(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,CQ(e),Ft!="}")throw ga("Angle bracket } expected");nn(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function iye(r){return Ft==="node"?(nn(),r.node=Rv(),"node"):Ft==="edge"?(nn(),r.edge=Rv(),"edge"):Ft==="graph"?(nn(),r.graph=Rv(),"graph"):null}function aye(r,e){var t={id:e},n=Rv();n&&(t.attr=n),AQ(r,t),NQ(r,e)}function NQ(r,e){for(;Ft==="->"||Ft==="--";){var t,n=Ft;nn();var i=kQ(r);if(i)t=i;else{if(Ma!=va.IDENTIFIER)throw ga("Identifier or subgraph expected");t=Ft,AQ(r,{id:t}),nn()}var a=Rv(),o=RQ(r,e,t,n,a);tye(r,o),e=t}}function Rv(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,a=new Array;Ft==="[";){for(nn(),e={};Ft!==""&&Ft!="]";){if(Ma!=va.IDENTIFIER)throw ga("Attribute name expected");var o=Ft;if(nn(),Ft!="=")throw ga("Equal sign = expected");if(nn(),Ma!=va.IDENTIFIER)throw ga("Attribute value expected");var u=Ft;o==="style"&&(u=t[u]);var c;o==="arrowhead"&&(c=n[u],o="arrows",u={to:{enabled:!0,type:c}}),o==="arrowtail"&&(c=n[u],o="arrows",u={from:{enabled:!0,type:c}}),i.push({attr:e,name:o,value:u}),a.push(o),nn(),Ft==","&&nn()}if(Ft!="]")throw ga("Bracket ] expected");nn()}if(Tc(a).call(a,"dir")){var h={};for(h.arrows={},r=0;r<i.length;r++)if(i[r].name==="arrows")if(i[r].value.to!=null)h.arrows.to=r;else if(i[r].value.from!=null)h.arrows.from=r;else throw ga("Invalid value of arrows");else i[r].name==="dir"&&(h.dir=r);var f=i[h.dir].value;if(!Tc(a).call(a,"arrows"))if(f==="both")i.push({attr:i[h.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),h.arrows.to=i.length-1,i.push({attr:i[h.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),h.arrows.from=i.length-1;else if(f==="forward")i.push({attr:i[h.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),h.arrows.to=i.length-1;else if(f==="back")i.push({attr:i[h.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),h.arrows.from=i.length-1;else if(f==="none")i.push({attr:i[h.dir].attr,name:"arrows",value:""}),h.arrows.to=i.length-1;else throw ga('Invalid dir type "'+f+'"');var v,y;if(f==="both")h.arrows.to&&h.arrows.from?(y=i[h.arrows.to].value.to.type,v=i[h.arrows.from].value.from.type,i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}},lu(i).call(i,h.arrows.from,1)):h.arrows.to?(y=i[h.arrows.to].value.to.type,v="arrow",i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}):h.arrows.from&&(y="arrow",v=i[h.arrows.from].value.from.type,i[h.arrows.from]={attr:i[h.arrows.from].attr,name:i[h.arrows.from].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}});else if(f==="back")h.arrows.to&&h.arrows.from?(y="",v=i[h.arrows.from].value.from.type,i[h.arrows.from]={attr:i[h.arrows.from].attr,name:i[h.arrows.from].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}):h.arrows.to?(y="",v="arrow",h.arrows.from=h.arrows.to,i[h.arrows.from]={attr:i[h.arrows.from].attr,name:i[h.arrows.from].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}):h.arrows.from&&(y="",v=i[h.arrows.from].value.from.type,i[h.arrows.to]={attr:i[h.arrows.from].attr,name:i[h.arrows.from].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}),i[h.arrows.from]={attr:i[h.arrows.from].attr,name:i[h.arrows.from].name,value:{from:{enabled:!0,type:i[h.arrows.from].value.from.type}}};else if(f==="none"){var g;h.arrows.to?g=h.arrows.to:g=h.arrows.from,i[g]={attr:i[g].attr,name:i[g].name,value:""}}else if(f==="forward")h.arrows.to&&h.arrows.from?(y=i[h.arrows.to].value.to.type,v="",i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}):h.arrows.to?(y=i[h.arrows.to].value.to.type,v="",i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}):h.arrows.from&&(y="arrow",v="",h.arrows.to=h.arrows.from,i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:y},from:{enabled:!0,type:v}}}),i[h.arrows.to]={attr:i[h.arrows.to].attr,name:i[h.arrows.to].name,value:{to:{enabled:!0,type:i[h.arrows.to].value.to.type}}};else throw ga('Invalid dir type "'+f+'"');lu(i).call(i,h.dir,1)}var _;if(Tc(a).call(a,"penwidth")){var E=[];for(_=i.length,r=0;r<_;r++)i[r].name!=="width"&&(i[r].name==="penwidth"&&(i[r].name="width"),E.push(i[r]));i=E}for(_=i.length,r=0;r<_;r++)eye(i[r].attr,i[r].name,i[r].value);return e}function ga(r){return new SyntaxError(r+', got "'+IQ(Ft,30)+'" (char '+Mf+")")}function IQ(r,e){return r.length<=e?r:r.substr(0,27)+"..."}function sye(r,e,t){Mn(r)?Kr(r).call(r,function(n){Mn(e)?Kr(e).call(e,function(i){t(n,i)}):t(n,e)}):Mn(e)?Kr(e).call(e,function(n){t(r,n)}):t(r,e)}function v4(r,e,t){for(var n=e.split("."),i=n.pop(),a=r,o=0;o<n.length;o++){var u=n[o];u in a||(a[u]={}),a=a[u]}return a[i]=t,r}function aU(r,e){var t={};for(var n in r)if(r.hasOwnProperty(n)){var i=e[n];Mn(i)?Kr(i).call(i,function(a){v4(t,a,r[n])}):typeof i=="string"?v4(t,i,r[n]):v4(t,n,r[n])}return t}function oye(r){var e=Z1e(r),t={nodes:[],edges:[],options:{}};if(e.nodes){var n;Kr(n=e.nodes).call(n,function(o){var u={id:o.id,label:String(o.label||o.id)};kc(u,aU(o.attr,OQ)),u.image&&(u.shape="image"),t.nodes.push(u)})}if(e.edges){var i,a=function(o){var u={from:o.from,to:o.to};return kc(u,aU(o.attr,BA)),u.arrows==null&&o.type==="->"&&(u.arrows="to"),u};Kr(i=e.edges).call(i,function(o){var u,c;if(o.from instanceof Object?u=o.from.nodes:u={id:o.from},o.to instanceof Object?c=o.to.nodes:c={id:o.to},o.from instanceof Object&&o.from.edges){var h;Kr(h=o.from.edges).call(h,function(v){var y=a(v);t.edges.push(y)})}if(sye(u,c,function(v,y){var g=RQ(t,v.id,y.id,o.type,o.attr),_=a(g);t.edges.push(_)}),o.to instanceof Object&&o.to.edges){var f;Kr(f=o.to.edges).call(f,function(v){var y=a(v);t.edges.push(y)})}})}return e.attr&&(t.options=e.attr),t}function lye(r,e){var t;const n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(n.nodes.fixed=e.fixed),e.parseColor!=null&&(n.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(n.edges.inheritColor=e.inheritColor));const i=r.edges,a=Nf(i).call(i,u=>{const c={from:u.source,id:u.id,to:u.target};return u.attributes!=null&&(c.attributes=u.attributes),u.label!=null&&(c.label=u.label),u.attributes!=null&&u.attributes.title!=null&&(c.title=u.attributes.title),u.type==="Directed"&&(c.arrows="to"),u.color&&n.edges.inheritColor===!1&&(c.color=u.color),c});return{nodes:Nf(t=r.nodes).call(t,u=>{const c={id:u.id,fixed:n.nodes.fixed&&u.x!=null&&u.y!=null};return u.attributes!=null&&(c.attributes=u.attributes),u.label!=null&&(c.label=u.label),u.size!=null&&(c.size=u.size),u.attributes!=null&&u.attributes.title!=null&&(c.title=u.attributes.title),u.title!=null&&(c.title=u.title),u.x!=null&&(c.x=u.x),u.y!=null&&(c.y=u.y),u.color!=null&&(n.nodes.parseColor===!0?c.color=u.color:c.color={background:u.color,border:u.color,highlight:{background:u.color,border:u.color},hover:{background:u.color,border:u.color}}),c}),edges:a}}const uye={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},cye={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},dye={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},hye={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},fye={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},pye={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},vye={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},gye={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},mye={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},yye={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},bye={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var wye=Object.freeze({__proto__:null,cn:gye,cs:bye,de:cye,en:uye,es:dye,fr:yye,it:hye,nl:fye,pt:pye,ru:vye,uk:mye});function xye(r,e){try{const[n,i]=e.split(/[-_ /]/,2),a=n!=null?n.toLowerCase():null,o=i!=null?i.toUpperCase():null;if(a&&o){const u=a+"-"+o;if(Object.prototype.hasOwnProperty.call(r,u))return u;var t;console.warn(Wge(t="Unknown variant ".concat(o," of language ")).call(t,a,"."))}if(a){const u=a;if(Object.prototype.hasOwnProperty.call(r,u))return u;console.warn("Unknown language ".concat(a))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(n){return console.error(n),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class _ye{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const n=Math.floor(t/2),i=Math.floor(t/4),a=Math.floor(t/8),o=Math.floor(t/16),u=Math.floor(e/2),c=Math.floor(e/4),h=Math.floor(e/8),f=Math.floor(e/16);this.canvas.width=3*c,this.canvas.height=n,this.coordinates=[[0,0,u,n],[u,0,c,i],[u,i,h,a],[5*h,i,f,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let n=1;n<this.NUM_ITERATIONS;n++){const i=this.coordinates[n-1],a=this.coordinates[n];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],a[0],a[1],a[2],a[3])}}drawImageAtPosition(e,t,n,i,a,o){if(this.initialized())if(t>2){t*=.5;let u=0;for(;t>2&&u<this.NUM_ITERATIONS;)t*=.5,u+=1;u>=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);const c=this.coordinates[u];e.drawImage(this.canvas,c[0],c[1],c[2],c[3],n,i,a,o)}else e.drawImage(this.image,n,i,a,o)}}class Sye{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,n){if(!(e===void 0||n===void 0)){if(t===void 0){console.warn("No broken url image defined");return}n.image.onerror=()=>{console.error("Could not load brokenImage:",t)},n.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const n=this.images[e];if(n)return n;const i=new _ye;return this.images[e]=i,i.image.onload=()=>{this._fixImageCoordinates(i.image),i.init(),this._redrawWithImage(i)},i.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var sU={},oU={},g4={exports:{}},m4,lU;function Eye(){if(lU)return m4;lU=1;var r=mr();return m4=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),m4}var y4,uU;function Tye(){if(uU)return y4;uU=1;var r=mr(),e=ji(),t=gl(),n=Eye(),i=Object.isExtensible,a=r(function(){});return y4=a||n?function(u){return!e(u)||n&&t(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,y4}var b4,cU;function PQ(){if(cU)return b4;cU=1;var r=mr();return b4=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),b4}var dU;function xy(){if(dU)return g4.exports;dU=1;var r=Nt(),e=br(),t=Eg(),n=ji(),i=Xi(),a=Bs().f,o=vy(),u=TA(),c=Tye(),h=ly(),f=PQ(),v=!1,y=h("meta"),g=0,_=function(k){a(k,y,{value:{objectID:"O"+g++,weakData:{}}})},E=function(k,j){if(!n(k))return typeof k=="symbol"?k:(typeof k=="string"?"S":"P")+k;if(!i(k,y)){if(!c(k))return"F";if(!j)return"E";_(k)}return k[y].objectID},A=function(k,j){if(!i(k,y)){if(!c(k))return!0;if(!j)return!1;_(k)}return k[y].weakData},T=function(k){return f&&v&&c(k)&&!i(k,y)&&_(k),k},C=function(){N.enable=function(){},v=!0;var k=o.f,j=e([].splice),W={};W[y]=1,k(W).length&&(o.f=function(G){for(var D=k(G),M=0,U=D.length;M<U;M++)if(D[M]===y){j(D,M,1);break}return D},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},N=g4.exports={enable:C,fastKey:E,getWeakData:A,onFreeze:T};return t[y]=!0,g4.exports}var w4,hU;function Oye(){if(hU)return w4;hU=1;var r=ii(),e=up(),t=r("iterator"),n=Array.prototype;return w4=function(i){return i!==void 0&&(e.Array===i||n[t]===i)},w4}var x4,fU;function jQ(){if(fU)return x4;fU=1;var r=lp(),e=gA(),t=Jf(),n=up(),i=ii(),a=i("iterator");return x4=function(o){if(!t(o))return e(o,a)||e(o,"@@iterator")||n[r(o)]},x4}var _4,pU;function Aye(){if(pU)return _4;pU=1;var r=za(),e=bu(),t=ml(),n=rp(),i=jQ(),a=TypeError;return _4=function(o,u){var c=arguments.length<2?i(o):u;if(e(c))return t(r(c,o));throw new a(n(o)+" is not iterable")},_4}var S4,vU;function FA(){if(vU)return S4;vU=1;var r=za(),e=ml(),t=gA();return S4=function(n,i,a){var o,u;e(n);try{if(o=t(n,"return"),!o){if(i==="throw")throw a;return a}o=r(o,n)}catch(c){u=!0,o=c}if(i==="throw")throw a;if(u)throw o;return e(o),a},S4}var E4,gU;function _y(){if(gU)return E4;gU=1;var r=cy(),e=za(),t=ml(),n=rp(),i=Oye(),a=wu(),o=ni(),u=Aye(),c=jQ(),h=FA(),f=TypeError,v=function(g,_){this.stopped=g,this.result=_},y=v.prototype;return E4=function(g,_,E){var A=E&&E.that,T=!!(E&&E.AS_ENTRIES),C=!!(E&&E.IS_RECORD),N=!!(E&&E.IS_ITERATOR),k=!!(E&&E.INTERRUPTED),j=r(_,A),W,G,D,M,U,I,q,z=function(ce){return W&&h(W,"normal"),new v(!0,ce)},Q=function(ce){return T?(t(ce),k?j(ce[0],ce[1],z):j(ce[0],ce[1])):k?j(ce,z):j(ce)};if(C)W=g.iterator;else if(N)W=g;else{if(G=c(g),!G)throw new f(n(g)+" is not iterable");if(i(G)){for(D=0,M=a(g);M>D;D++)if(U=Q(g[D]),U&&o(y,U))return U;return new v(!1)}W=u(g,G)}for(I=C?g.next:W.next;!(q=e(I,W)).done;){try{U=Q(q.value)}catch(ce){h(W,"throw",ce)}if(typeof U=="object"&&U&&o(y,U))return U}return new v(!1)},E4}var T4,mU;function zA(){if(mU)return T4;mU=1;var r=ni(),e=TypeError;return T4=function(t,n){if(r(n,t))return t;throw new e("Incorrect invocation")},T4}var O4,yU;function UA(){if(yU)return O4;yU=1;var r=Nt(),e=mn(),t=xy(),n=mr(),i=ap(),a=_y(),o=zA(),u=Pi(),c=ji(),h=Jf(),f=Jd(),v=Bs().f,y=$c().forEach,g=Vn(),_=eh(),E=_.set,A=_.getterFor;return O4=function(T,C,N){var k=T.indexOf("Map")!==-1,j=T.indexOf("Weak")!==-1,W=k?"set":"add",G=e[T],D=G&&G.prototype,M={},U;if(!g||!u(G)||!(j||D.forEach&&!n(function(){new G().entries().next()})))U=N.getConstructor(C,T,k,W),t.enable();else{U=C(function(z,Q){E(o(z,I),{type:T,collection:new G}),h(Q)||a(Q,z[W],{that:z,AS_ENTRIES:k})});var I=U.prototype,q=A(T);y(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(z){var Q=z==="add"||z==="set";z in D&&!(j&&z==="clear")&&i(I,z,function(ce,re){var J=q(this).collection;if(!Q&&j&&!c(ce))return z==="get"?void 0:!1;var le=J[z](ce===0?0:ce,re);return Q?this:le})}),j||v(I,"size",{configurable:!0,get:function(){return q(this).collection.size}})}return f(U,T,!1,!0),M[T]=U,r({global:!0,forced:!0},M),j||N.setStrong(U,T,k),U},O4}var A4,bU;function HA(){if(bU)return A4;bU=1;var r=Rg();return A4=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:r(e,i,t[i],n);return e},A4}var R4,wU;function Rye(){if(wU)return R4;wU=1;var r=fs(),e=OA(),t=ii(),n=Vn(),i=t("species");return R4=function(a){var o=r(a);n&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},R4}var C4,xU;function MQ(){if(xU)return C4;xU=1;var r=Ag(),e=OA(),t=HA(),n=cy(),i=zA(),a=Jf(),o=_y(),u=RA(),c=CA(),h=Rye(),f=Vn(),v=xy().fastKey,y=eh(),g=y.set,_=y.getterFor;return C4={getConstructor:function(E,A,T,C){var N=E(function(D,M){i(D,k),g(D,{type:A,index:r(null),first:null,last:null,size:0}),f||(D.size=0),a(M)||o(M,D[C],{that:D,AS_ENTRIES:T})}),k=N.prototype,j=_(A),W=function(D,M,U){var I=j(D),q=G(D,M),z,Q;return q?q.value=U:(I.last=q={index:Q=v(M,!0),key:M,value:U,previous:z=I.last,next:null,removed:!1},I.first||(I.first=q),z&&(z.next=q),f?I.size++:D.size++,Q!=="F"&&(I.index[Q]=q)),D},G=function(D,M){var U=j(D),I=v(M),q;if(I!=="F")return U.index[I];for(q=U.first;q;q=q.next)if(q.key===M)return q};return t(k,{clear:function(){for(var M=this,U=j(M),I=U.first;I;)I.removed=!0,I.previous&&(I.previous=I.previous.next=null),I=I.next;U.first=U.last=null,U.index=r(null),f?U.size=0:M.size=0},delete:function(D){var M=this,U=j(M),I=G(M,D);if(I){var q=I.next,z=I.previous;delete U.index[I.index],I.removed=!0,z&&(z.next=q),q&&(q.previous=z),U.first===I&&(U.first=q),U.last===I&&(U.last=z),f?U.size--:M.size--}return!!I},forEach:function(M){for(var U=j(this),I=n(M,arguments.length>1?arguments[1]:void 0),q;q=q?q.next:U.first;)for(I(q.value,q.key,this);q&&q.removed;)q=q.previous},has:function(M){return!!G(this,M)}}),t(k,T?{get:function(M){var U=G(this,M);return U&&U.value},set:function(M,U){return W(this,M===0?0:M,U)}}:{add:function(M){return W(this,M=M===0?0:M,M)}}),f&&e(k,"size",{configurable:!0,get:function(){return j(this).size}}),N},setStrong:function(E,A,T){var C=A+" Iterator",N=_(A),k=_(C);u(E,A,function(j,W){g(this,{type:C,target:j,state:N(j),kind:W,last:null})},function(){for(var j=k(this),W=j.kind,G=j.last;G&&G.removed;)G=G.previous;return!j.target||!(j.last=G=G?G.next:j.state.first)?(j.target=null,c(void 0,!0)):c(W==="keys"?G.key:W==="values"?G.value:[G.key,G.value],!1)},T?"entries":"values",!T,!0),h(A)}},C4}var _U;function Cye(){if(_U)return oU;_U=1;var r=UA(),e=MQ();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),oU}var SU;function kye(){return SU||(SU=1,Cye()),sU}var EU={},k4,TU;function DQ(){return TU||(TU=1,k4=function(r,e){return e===1?function(t,n){return t[r](n)}:function(t,n,i){return t[r](n,i)}}),k4}var N4,OU;function Nye(){if(OU)return N4;OU=1;var r=fs(),e=DQ(),t=r("Map");return N4={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},N4}var AU;function Iye(){if(AU)return EU;AU=1;var r=Nt(),e=br(),t=bu(),n=yu(),i=_y(),a=Nye(),o=np(),u=mr(),c=a.Map,h=a.has,f=a.get,v=a.set,y=e([].push),g=o||u(function(){return c.groupBy("ab",function(_){return _}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||g},{groupBy:function(E,A){n(E),t(A);var T=new c,C=0;return i(E,function(N){var k=A(N,C++);h(T,k)?y(f(T,k),N):v(T,k,[N])}),T}}),EU}var RU={},I4,CU;function Pye(){if(CU)return I4;CU=1;var r=br(),e=sp(),t=Fs(),n=yu(),i=r("".charAt),a=r("".charCodeAt),o=r("".slice),u=function(c){return function(h,f){var v=t(n(h)),y=e(f),g=v.length,_,E;return y<0||y>=g?c?"":void 0:(_=a(v,y),_<55296||_>56319||y+1===g||(E=a(v,y+1))<56320||E>57343?c?i(v,y):_:c?o(v,y,y+2):(_-55296<<10)+(E-56320)+65536)}};return I4={codeAt:u(!1),charAt:u(!0)},I4}var kU;function WA(){if(kU)return RU;kU=1;var r=Pye().charAt,e=Fs(),t=eh(),n=RA(),i=CA(),a="String Iterator",o=t.set,u=t.getterFor(a);return n(String,"String",function(c){o(this,{type:a,string:e(c),index:0})},function(){var h=u(this),f=h.string,v=h.index,y;return v>=f.length?i(void 0,!0):(y=r(f,v),h.index+=y.length,i(y,!1))}),RU}var P4,NU;function jye(){if(NU)return P4;NU=1,cp(),kye(),Iye(),WA();var r=Br();return P4=r.Map,P4}var j4,IU;function Mye(){if(IU)return j4;IU=1;var r=jye();return dp(),j4=r,j4}var M4,PU;function Dye(){return PU||(PU=1,M4=Mye()),M4}var qye=Dye(),GA=Jt(qye);class Lye{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Jn(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Lr(t).call(t,n)===-1){const i=e[n];this.add(n,i)}}}clear(){this._groups=new GA,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const i=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[i]),this._groups.set(e,n)}else{const i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[i],this._groups.set(e,n)}return n}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var jU={},MU;function $ye(){if(MU)return jU;MU=1;var r=Nt();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),jU}var D4,DU;function Bye(){if(DU)return D4;DU=1,$ye();var r=Br();return D4=r.Number.isNaN,D4}var q4,qU;function Fye(){if(qU)return q4;qU=1;var r=Bye();return q4=r,q4}var L4,LU;function zye(){return LU||(LU=1,L4=Fye()),L4}var Uye=zye(),m6=Jt(Uye),$U={},$4,BU;function Hye(){if(BU)return $4;BU=1;var r=mn(),e=r.isFinite;return $4=Number.isFinite||function(n){return typeof n=="number"&&e(n)},$4}var FU;function Wye(){if(FU)return $U;FU=1;var r=Nt(),e=Hye();return r({target:"Number",stat:!0},{isFinite:e}),$U}var B4,zU;function Gye(){if(zU)return B4;zU=1,Wye();var r=Br();return B4=r.Number.isFinite,B4}var F4,UU;function Vye(){if(UU)return F4;UU=1;var r=Gye();return F4=r,F4}var z4,HU;function Yye(){return HU||(HU=1,z4=Vye()),z4}var Kye=Yye(),wd=Jt(Kye),WU={},GU;function Xye(){if(GU)return WU;GU=1;var r=Nt(),e=$c().some,t=hp(),n=t("some");return r({target:"Array",proto:!0,forced:!n},{some:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),WU}var U4,VU;function Qye(){if(VU)return U4;VU=1,Xye();var r=Qi();return U4=r("Array","some"),U4}var H4,YU;function Zye(){if(YU)return H4;YU=1;var r=ni(),e=Qye(),t=Array.prototype;return H4=function(n){var i=n.some;return n===t||r(t,n)&&i===t.some?e:i},H4}var W4,KU;function Jye(){if(KU)return W4;KU=1;var r=Zye();return W4=r,W4}var G4,XU;function e0e(){return XU||(XU=1,G4=Jye()),G4}var t0e=e0e(),r0e=Jt(t0e),V4={exports:{}},QU={},ZU;function n0e(){if(ZU)return QU;ZU=1;var r=Nt(),e=Vn(),t=Bs().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),QU}var JU;function i0e(){if(JU)return V4.exports;JU=1,n0e();var r=Br(),e=r.Object,t=V4.exports=function(i,a,o){return e.defineProperty(i,a,o)};return e.defineProperty.sham&&(t.sham=!0),V4.exports}var Y4,eH;function qQ(){if(eH)return Y4;eH=1;var r=i0e();return Y4=r,Y4}var K4,tH;function a0e(){if(tH)return K4;tH=1;var r=qQ();return K4=r,K4}var X4,rH;function s0e(){if(rH)return X4;rH=1;var r=a0e();return X4=r,X4}var Q4,nH;function o0e(){return nH||(nH=1,Q4=s0e()),Q4}var l0e=o0e(),u0e=Jt(l0e),iH={},aH;function c0e(){if(aH)return iH;aH=1;var r=ii(),e=Bs().f,t=r("metadata"),n=Function.prototype;return n[t]===void 0&&e(n,t,{value:null}),iH}var sH={},oH;function d0e(){return oH||(oH=1,$X()),sH}var lH={},uH;function h0e(){return uH||(uH=1,BX()),lH}var cH={},dH;function f0e(){if(dH)return cH;dH=1;var r=An();return r("metadata"),cH}var Z4,hH;function p0e(){if(hH)return Z4;hH=1;var r=WX();return c0e(),d0e(),h0e(),f0e(),Z4=r,Z4}var fH={},J4,pH;function LQ(){if(pH)return J4;pH=1;var r=fs(),e=br(),t=r("Symbol"),n=t.keyFor,i=e(t.prototype.valueOf);return J4=t.isRegisteredSymbol||function(o){try{return n(i(o))!==void 0}catch{return!1}},J4}var vH;function v0e(){if(vH)return fH;vH=1;var r=Nt(),e=LQ();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),fH}var gH={},eT,mH;function $Q(){if(mH)return eT;mH=1;for(var r=ip(),e=fs(),t=br(),n=Sg(),i=ii(),a=e("Symbol"),o=a.isWellKnownSymbol,u=e("Object","getOwnPropertyNames"),c=t(a.prototype.valueOf),h=r("wks"),f=0,v=u(a),y=v.length;f<y;f++)try{var g=v[f];n(a[g])&&i(g)}catch{}return eT=function(E){if(o&&o(E))return!0;try{for(var A=c(E),T=0,C=u(h),N=C.length;T<N;T++)if(h[C[T]]==A)return!0}catch{}return!1},eT}var yH;function g0e(){if(yH)return gH;yH=1;var r=Nt(),e=$Q();return r({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),gH}var bH={},wH;function m0e(){if(wH)return bH;wH=1;var r=An();return r("customMatcher"),bH}var xH={},_H;function y0e(){if(_H)return xH;_H=1;var r=An();return r("observable"),xH}var SH={},EH;function b0e(){if(EH)return SH;EH=1;var r=Nt(),e=LQ();return r({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),SH}var TH={},OH;function w0e(){if(OH)return TH;OH=1;var r=Nt(),e=$Q();return r({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),TH}var AH={},RH;function x0e(){if(RH)return AH;RH=1;var r=An();return r("matcher"),AH}var CH={},kH;function _0e(){if(kH)return CH;kH=1;var r=An();return r("metadataKey"),CH}var NH={},IH;function S0e(){if(IH)return NH;IH=1;var r=An();return r("patternMatch"),NH}var PH={},jH;function E0e(){if(jH)return PH;jH=1;var r=An();return r("replaceAll"),PH}var tT,MH;function T0e(){if(MH)return tT;MH=1;var r=p0e();return v0e(),g0e(),m0e(),y0e(),b0e(),w0e(),x0e(),_0e(),S0e(),E0e(),tT=r,tT}var rT,DH;function O0e(){return DH||(DH=1,rT=T0e()),rT}var A0e=O0e(),e1=Jt(A0e),nT,qH;function R0e(){if(qH)return nT;qH=1,cp(),WA(),FX();var r=gy();return nT=r.f("iterator"),nT}var iT,LH;function C0e(){if(LH)return iT;LH=1;var r=R0e();return dp(),iT=r,iT}var aT,$H;function k0e(){if($H)return aT;$H=1;var r=C0e();return aT=r,aT}var sT,BH;function N0e(){if(BH)return sT;BH=1;var r=k0e();return sT=r,sT}var oT,FH;function I0e(){return FH||(FH=1,oT=N0e()),oT}var P0e=I0e(),j0e=Jt(P0e);function Xv(r){"@babel/helpers - typeof";return Xv=typeof e1=="function"&&typeof j0e=="symbol"?function(e){return typeof e}:function(e){return e&&typeof e1=="function"&&e.constructor===e1&&e!==e1.prototype?"symbol":typeof e},Xv(r)}var lT,zH;function M0e(){if(zH)return lT;zH=1,zX();var r=gy();return lT=r.f("toPrimitive"),lT}var uT,UH;function D0e(){if(UH)return uT;UH=1;var r=M0e();return uT=r,uT}var cT,HH;function q0e(){if(HH)return cT;HH=1;var r=D0e();return cT=r,cT}var dT,WH;function L0e(){if(WH)return dT;WH=1;var r=q0e();return dT=r,dT}var hT,GH;function $0e(){return GH||(GH=1,hT=L0e()),hT}var B0e=$0e(),F0e=Jt(B0e);function z0e(r,e){if(Xv(r)!="object"||!r)return r;var t=r[F0e];if(t!==void 0){var n=t.call(r,e);if(Xv(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function U0e(r){var e=z0e(r,"string");return Xv(e)=="symbol"?e:e+""}function nu(r,e,t){return(e=U0e(e))in r?u0e(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var VH={},fT,YH;function H0e(){if(YH)return fT;YH=1;var r=mn(),e=mr(),t=br(),n=Fs(),i=VX().trim,a=kA(),o=t("".charAt),u=r.parseFloat,c=r.Symbol,h=c&&c.iterator,f=1/u(a+"-0")!==-1/0||h&&!e(function(){u(Object(h))});return fT=f?function(y){var g=i(n(y)),_=u(g);return _===0&&o(g,0)==="-"?-0:_}:u,fT}var KH;function W0e(){if(KH)return VH;KH=1;var r=Nt(),e=H0e();return r({global:!0,forced:parseFloat!==e},{parseFloat:e}),VH}var pT,XH;function G0e(){if(XH)return pT;XH=1,W0e();var r=Br();return pT=r.parseFloat,pT}var vT,QH;function V0e(){if(QH)return vT;QH=1;var r=G0e();return vT=r,vT}var gT,ZH;function Y0e(){return ZH||(ZH=1,gT=V0e()),gT}var K0e=Y0e(),BQ=Jt(K0e),JH={},eW;function X0e(){if(eW)return JH;eW=1;var r=Nt(),e=mr(),t=TA().f,n=e(function(){return!Object.getOwnPropertyNames(1)});return r({target:"Object",stat:!0,forced:n},{getOwnPropertyNames:t}),JH}var mT,tW;function Q0e(){if(tW)return mT;tW=1,X0e();var r=Br(),e=r.Object;return mT=function(n){return e.getOwnPropertyNames(n)},mT}var yT,rW;function Z0e(){if(rW)return yT;rW=1;var r=Q0e();return yT=r,yT}var bT,nW;function J0e(){return nW||(nW=1,bT=Z0e()),bT}var ebe=J0e(),tbe=Jt(ebe),wT,iW;function rbe(){if(iW)return wT;iW=1,LX();var r=Br();return wT=r.Object.getOwnPropertySymbols,wT}var xT,aW;function nbe(){if(aW)return xT;aW=1;var r=rbe();return xT=r,xT}var _T,sW;function ibe(){return sW||(sW=1,_T=nbe()),_T}var abe=ibe(),Nc=Jt(abe),ST={exports:{}},oW={},lW;function sbe(){if(lW)return oW;lW=1;var r=Nt(),e=mr(),t=Ao(),n=uy().f,i=Vn(),a=!i||e(function(){n(1)});return r({target:"Object",stat:!0,forced:a,sham:!i},{getOwnPropertyDescriptor:function(u,c){return n(t(u),c)}}),oW}var uW;function obe(){if(uW)return ST.exports;uW=1,sbe();var r=Br(),e=r.Object,t=ST.exports=function(i,a){return e.getOwnPropertyDescriptor(i,a)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),ST.exports}var ET,cW;function lbe(){if(cW)return ET;cW=1;var r=obe();return ET=r,ET}var TT,dW;function ube(){return dW||(dW=1,TT=lbe()),TT}var cbe=ube(),Bc=Jt(cbe),hW={},fW;function dbe(){if(fW)return hW;fW=1;var r=Nt(),e=Vn(),t=Dve(),n=Ao(),i=uy(),a=fy();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(u){for(var c=n(u),h=i.f,f=t(c),v={},y=0,g,_;f.length>y;)_=h(c,g=f[y++]),_!==void 0&&a(v,g,_);return v}}),hW}var OT,pW;function hbe(){if(pW)return OT;pW=1,dbe();var r=Br();return OT=r.Object.getOwnPropertyDescriptors,OT}var AT,vW;function fbe(){if(vW)return AT;vW=1;var r=hbe();return AT=r,AT}var RT,gW;function pbe(){return gW||(gW=1,RT=fbe()),RT}var vbe=pbe(),Ic=Jt(vbe),CT={exports:{}},mW={},yW;function gbe(){if(yW)return mW;yW=1;var r=Nt(),e=Vn(),t=EA().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),mW}var bW;function mbe(){if(bW)return CT.exports;bW=1,gbe();var r=Br(),e=r.Object,t=CT.exports=function(i,a){return e.defineProperties(i,a)};return e.defineProperties.sham&&(t.sham=!0),CT.exports}var kT,wW;function ybe(){if(wW)return kT;wW=1;var r=mbe();return kT=r,kT}var NT,xW;function bbe(){return xW||(xW=1,NT=ybe()),NT}var wbe=bbe(),Sy=Jt(wbe),IT,_W;function xbe(){return _W||(_W=1,IT=qQ()),IT}var _be=xbe(),Ey=Jt(_be);function VA(r,e){const t=["node","edge","label"];let n=!0;const i=gc(e,"chosen");if(typeof i=="boolean")n=i;else if(typeof i=="object"){if(Lr(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const a=gc(e,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(n=a)}return n}function y6(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const a={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*a.x-Math.sin(o)*a.y,y:Math.sin(o)*a.x+Math.cos(o)*a.y}}else e=a}const n=r.x+r.width,i=r.y+r.width;return r.left<e.x&&n>e.x&&r.top<e.y&&i>e.y}function q1(r){return typeof r=="string"&&r!==""}function FQ(r,e,t,n){let i=n.x,a=n.y;if(typeof n.distanceToBorder=="function"){const o=n.distanceToBorder(r,e),u=Math.sin(e)*o,c=Math.cos(e)*o;c===o?(i+=o,a=n.y):u===o?(i=n.x,a-=o):(i+=c,a-=u)}else n.shape.width>n.shape.height?(i=n.x+n.shape.width*.5,a=n.y-t):(i=n.x+t,a=n.y-n.shape.height*.5);return{x:i,y:a}}var PT,SW;function Sbe(){if(SW)return PT;SW=1,cp();var r=Qi();return PT=r("Array","values"),PT}var jT,EW;function Ebe(){if(EW)return jT;EW=1;var r=Sbe();return jT=r,jT}var MT,TW;function Tbe(){if(TW)return MT;TW=1,dp();var r=lp(),e=Xi(),t=ni(),n=Ebe(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return MT=function(o){var u=o.values;return o===i||t(i,o)&&u===i.values||e(a,r(o))?n:u},MT}var DT,OW;function Obe(){return OW||(OW=1,DT=Tbe()),DT}var Abe=Obe(),zQ=Jt(Abe);class Rbe{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let i=t;(t===void 0||t==="")&&(i=" ");const a=this.measureText(i,n),o=Jn({},zQ(a));o.text=t,o.width=a.width,o.mod=n,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){const t=this.lines[e];let n=0;if(t.blocks!==void 0)for(let i=0;i<t.blocks.length;i++){const a=t.blocks[i];n<a.height&&(n=a.height)}t.height=n}}determineLabelSize(){let e=0,t=0;for(let n=0;n<this.lines.length;n++){const i=this.lines[n];i.width>e&&(e=i.width),t+=i.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t<this.lines.length;t++){const n=this.lines[t];if(n.blocks.length===0||t===this.lines.length-1&&n.width===0)continue;const i={};Jn(i,n),i.blocks=[];let a;const o=[];for(let u=0;u<n.blocks.length;u++){const c=n.blocks[u];c.width!==0?o.push(c):a===void 0&&(a=c)}o.length===0&&a!==void 0&&o.push(a),i.blocks=o,e.push(i)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();const e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}const Cbe={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class AW{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[n,i]=this.prepareRegExp(e),a=n.test(this.text.substr(this.position,i));return a&&t&&(this.position+=i-1),a}parseEndTag(e,t,n){let i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,n;if(e instanceof RegExp)n=e,t=1;else{const i=Cbe[e];i!==void 0?n=i:n=new RegExp(e),t=e.length}return[n,t]}}class kbe{constructor(e,t,n,i){this.ctx=e,this.parent=t,this.selected=n,this.hover=i;const a=(o,u)=>{if(o===void 0)return 0;const c=this.parent.getFormattingValues(e,n,i,u);let h=0;return o!==""&&(h=this.ctx.measureText(o).width),{width:h,values:c}};this.lines=new Rbe(a)}process(e){if(!q1(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
701
|
+
`),e=e.replace(/\r/g,`
|
|
702
|
+
`);const n=String(e).split(`
|
|
703
|
+
`),i=n.length;if(t.multi)for(let a=0;a<i;a++){const o=this.splitBlocks(n[a],t.multi);if(o!==void 0){if(o.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let u=0;u<o.length;u++){const c=o[u].mod,h=o[u].text;this.splitStringIntoLines(h,c,!0)}else for(let u=0;u<o.length;u++){const c=o[u].mod,h=o[u].text;this.lines.append(h,c)}this.lines.newLine()}}else if(t.maxWdt>0)for(let a=0;a<i;a++)this.splitStringIntoLines(n[a]);else for(let a=0;a<i;a++)this.lines.newLine(n[a]);return this.lines.finalize()}decodeMarkupSystem(e){let t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}splitHtmlBlocks(e){const t=new AW(e),n=i=>/&/.test(i)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){const i=t.text.charAt(t.position);t.parseWS(i)||/</.test(i)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||n(i)||t.add(i),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new AW(e);let n=!0;const i=a=>/\\/.test(a)?(t.position<this.text.length+1&&(t.position++,a=this.text.charAt(t.position),/ \t/.test(a)?t.spacing=!0:(t.add(a),n=!1)),!0):!1;for(;t.position<t.text.length;){const a=t.text.charAt(t.position);t.parseWS(a)||i(a)||(n||t.spacing)&&(t.parseStartTag("bold","*")||t.parseStartTag("ital","_")||t.parseStartTag("mono","`"))||t.parseEndTag("bold","*","afterBold")||t.parseEndTag("ital","_","afterItal")||t.parseEndTag("mono","`","afterMono")||(t.add(a),n=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){const n=this.decodeMarkupSystem(t);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",n=0;for(;n<e.length;){const a=t+(t===""?"":" ")+e[n];if(this.overMaxWidth(a))break;t=a,n++}return n}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(tl(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let i=e.split("\r");for(;i.length>0;){let a=this.getLongestFit(i);if(a===0){const o=i[0],u=this.getLongestFitWord(o);this.lines.newLine(tl(o).call(o,0,u),t),i[0]=tl(o).call(o,u)}else{let o=a;i[a-1]===" "?a--:i[o]===" "&&o++;const u=tl(i).call(i,0,a).join("");a==i.length&&n?this.lines.append(u,t):this.lines.newLine(u,t),i=tl(i).call(i,o)}}}}const fv=["bold","ital","boldital","mono"];class Sf{constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),q1(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(cr(fv,t=>{this.fontOptions[t]={}}),Sf.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}cr(e,(t,n)=>{t!=null&&typeof t!="object"&&(this.fontOptions[n]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const n=t.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=gc(e,"widthConstraint");if(typeof n=="number")t.maxWdt=Number(n),t.minWdt=Number(n);else if(typeof n=="object"){const a=gc(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));const o=gc(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const i=gc(e,"heightConstraint");if(typeof i=="number")t.minHgt=Number(i);else if(typeof i=="object"){const a=gc(e,["heightConstraint","minimum"]);typeof a=="number"&&(t.minHgt=Number(a));const o=gc(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),rn(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=VA("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}addFontOptionsToPile(e,t){for(let n=0;n<t.length;++n)this.addFontToPile(e,t[n])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;const n=t.font;e.push(n)}getBasicOptions(e){const t={};for(let n=0;n<e.length;++n){let i=e[n];const a={};Sf.parseFontString(a,i)&&(i=a),cr(i,(o,u)=>{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,u)||(Lr(fv).call(fv,u)!==-1?t[u]={}:t[u]=o))})}return t}getFontOption(e,t,n){let i;for(let a=0;a<e.length;++a){const o=e[a];if(Object.prototype.hasOwnProperty.call(o,t)){if(i=o[t],i==null)continue;const u={};if(Sf.parseFontString(u,i)&&(i=u),Object.prototype.hasOwnProperty.call(i,n))return i[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}getFontOptions(e,t){const n={},i=["color","size","face","mod","vadjust"];for(let a=0;a<i.length;++a){const o=i[a];n[o]=this.getFontOption(e,t,o)}return n}propagateFonts(e){const t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let n=0;n<fv.length;++n){const i=fv[n],a=this.fontOptions[i],o=this.getFontOptions(t,i);cr(o,(u,c)=>{a[c]=u}),a.size=Number(a.size),a.vadjust=Number(a.vadjust)}}draw(e,t,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u<this.elementOptions.scaling.label.drawThreshold-1||(u>=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,a,t,n,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,u))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",a=arguments.length>4?arguments[4]:void 0;[t,n]=this._setAlignment(e,t,n,i),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o<this.lineCount;o++){const u=this.lines[o];if(u&&u.blocks){let c=0;this.isEdgeLabel||this.fontOptions.align==="center"?c+=(this.size.width-u.width)/2:this.fontOptions.align==="right"&&(c+=this.size.width-u.width);for(let h=0;h<u.blocks.length;h++){const f=u.blocks[h];e.font=f.font;const[v,y]=this._getColor(f.color,a,f.strokeColor);f.strokeWidth>0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=v,f.strokeWidth>0&&e.strokeText(f.text,t+c,n+f.vadjust),e.fillText(f.text,t+c,n+f.vadjust),c+=f.width}n+=u.height}}}_setAlignment(e,t,n,i){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,n=0;const a=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*a):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*a):e.textBaseline="middle"}else e.textBaseline=i;return[t,n]}_getColor(e,t,n){let i=e||"#000000",a=n||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));i=Is(i,o),a=Is(a,o)}return[i,a]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,n=this.size.top-.5*2;if(this.isEdgeLabel){const a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,n=-this.size.height*.5;break;case"top":t=a,n=-(this.size.height+2);break;case"bottom":t=a,n=2;break}}return{left:t,top:n,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,n),this.size.left=i-this.size.width*.5,this.size.top=a-this.size.height*.5,this.size.yLine=a+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,n,i){const a=function(c,h,f){return h==="normal"?f==="mod"?"":c[f]:c[h][f]!==void 0?c[h][f]:c[f]},o={color:a(this.fontOptions,i,"color"),size:a(this.fontOptions,i,"size"),face:a(this.fontOptions,i,"face"),mod:a(this.fontOptions,i,"mod"),vadjust:a(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(i==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,n));let u="";return o.mod!==void 0&&o.mod!==""&&(u+=o.mod+" "),u+=o.size+"px "+o.face,e.font=u.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,n,i){return new kbe(e,this,t,n).process(i)}_processLabel(e,t,n){if(this.labelDirty===!1&&!this.differentState(t,n))return;const i=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&i.width<this.fontOptions.minWdt&&(i.width=this.fontOptions.minWdt),this.size.labelHeight=i.height,this.fontOptions.minHgt>0&&i.height<this.fontOptions.minHgt&&(i.height=this.fontOptions.minHgt),this.lines=i.lines,this.lineCount=i.lines.length,this.size.width=i.width,this.size.height=i.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}class rh{constructor(e,t,n){this.body=t,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,t){const n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}enableShadow(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){let n=t.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}disableBorderDashes(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){const n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){const n=t.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),kg(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,n,i,a){n!==void 0&&this.resize(n,i,a),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,n,i,a){this._updateBoundingBox(e,t,n,i,a)}getDimensionsFromLabel(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);let i=this.textSize.width,a=this.textSize.height;const o=14;return i===0&&(i=o,a=o),{width:i,height:a}}}let Nbe=class extends rh{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){const i=this.getDimensionsFromLabel(e,t,n);this.width=i.width+this.margin.right+this.margin.left,this.height=i.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,n,i,a,o){this.resize(e,i,a),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,o),AX(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,a)}updateBoundingBox(e,t,n,i,a){this._updateBoundingBox(e,t,n,i,a);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}};class YA extends rh{constructor(e,t,n){super(e,t,n),this.labelOffset=0,this.selected=!1}setOptions(e,t,n){this.options=e,t===void 0&&n===void 0||this.setImages(t,n)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let n=1,i=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:i=this.imageObj.height/this.imageObj.width),e=this.options.size*2*n,t=this.options.size*2*i}else{const n=this._getImagePadding();e=this.imageObj.width+n.left+n.right,t=this.imageObj.height+n.top+n.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,n,i){this.initContextForDraw(e,i),xA(e,t,n,i.size),this.performFill(e,i)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let n=1;this.options.shapeProperties.interpolation===!0&&(n=this.imageObj.width/this.width/this.body.view.scale);const i=this._getImagePadding(),a=this.left+i.left,o=this.top+i.top,u=this.width-i.left-i.right,c=this.height-i.top-i.bottom;this.imageObj.drawImageAtPosition(e,n,a,o,u,c),this.disableShadow(e,t)}}_drawImageLabel(e,t,n,i,a){let o=0;if(this.height!==void 0){o=this.height*.5;const c=this.labelModule.getTextSize(e,i,a);c.lineCount>=1&&(o+=c.height/2)}const u=n+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,u,i,a,"hanging")}}let Ibe=class extends YA{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){const i=this.getDimensionsFromLabel(e,t,n),a=Math.max(i.width+this.margin.right+this.margin.left,i.height+this.margin.top+this.margin.bottom);this.options.size=a/2,this.width=a,this.height=a,this.radius=this.width/2}}draw(e,t,n,i,a,o){this.resize(e,i,a),this.left=t-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,t,n,o),this.updateBoundingBox(t,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,i,a)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class Pbe extends YA{constructor(e,t,n,i,a){super(e,t,n),this.setImages(i,a)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const a=this.options.size*2;this.width=a,this.height=a,this.radius=.5*this.width;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,i,a,o){this.switchImages(i),this.resize();let u=t,c=n;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=n,u+=this.width/2,c+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,u,c,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,u,c,i,a),this.updateBoundingBox(t,n)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Fc extends rh{constructor(e,t,n){super(e,t,n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,n)){var a,o;this.labelModule.getTextSize(e,t,n);const u=2*i.size;this.width=(a=this.customSizeWidth)!==null&&a!==void 0?a:u,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:u,this.radius=.5*this.width}}_drawShape(e,t,n,i,a,o,u,c){return this.resize(e,o,u,c),this.left=i-this.width/2,this.top=a-this.height/2,this.initContextForDraw(e,c),Kpe(t)(e,i,a,c.size),this.performFill(e,c),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,i,a)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,u,i,a,"hanging");const h=a+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,i,h,o,u,"hanging")}this.updateBoundingBox(i,a)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function RW(r,e){var t=jn(r);if(Nc){var n=Nc(r);e&&(n=Da(n).call(n,function(i){return Bc(r,i).enumerable})),t.push.apply(t,n)}return t}function jbe(r){for(var e=1;e<arguments.length;e++){var t,n,i=arguments[e]!=null?arguments[e]:{};e%2?Kr(t=RW(Object(i),!0)).call(t,function(a){nu(r,a,i[a])}):Ic?Sy(r,Ic(i)):Kr(n=RW(Object(i))).call(n,function(a){Ey(r,a,Bc(i,a))})}return r}class Mbe extends Fc{constructor(e,t,n,i){super(e,t,n,i),this.ctxRenderer=i}draw(e,t,n,i,a,o){this.resize(e,i,a,o),this.left=t-this.width/2,this.top=n-this.height/2,e.save();const u=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:n,state:{selected:i,hover:a},style:jbe({},o),label:this.options.label});if(u.drawNode!=null&&u.drawNode(),e.restore(),u.drawExternalLabel){const c=u.drawExternalLabel;u.drawExternalLabel=()=>{e.save(),c(),e.restore()}}return u.nodeDimensions&&(this.customSizeWidth=u.nodeDimensions.width,this.customSizeHeight=u.nodeDimensions.height),u}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Dbe extends rh{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){if(this.needsRefresh(t,n)){const a=this.getDimensionsFromLabel(e,t,n).width+this.margin.right+this.margin.left;this.width=a,this.height=a,this.radius=this.width/2}}draw(e,t,n,i,a,o){this.resize(e,i,a),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,o),RX(e,t-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let qbe=class extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"diamond",4,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Lbe extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"circle",2,t,n,i,a,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class CW extends rh{constructor(e,t,n){super(e,t,n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){const i=this.getDimensionsFromLabel(e,t,n);this.height=i.height*2,this.width=i.width+i.height,this.radius=.5*this.width}}draw(e,t,n,i,a,o){this.resize(e,i,a),this.left=t-this.width*.5,this.top=n-this.height*.5,this.initContextForDraw(e,o),l6(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,a),this.labelModule.draw(e,t,n,i,a)}distanceToBorder(e,t){e&&this.resize(e);const n=this.width*.5,i=this.height*.5,a=Math.sin(t)*n,o=Math.cos(t)*i;return n*i/Math.sqrt(a*a+o*o)}}class $be extends rh{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,n,i,a,o){return this.resize(e,i,a),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=n-this.height/2,this._icon(e,t,n,i,a,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,n+this.height/2+5,i),this.updateBoundingBox(t,n)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,n,i,a,o){const u=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:i?"bold":"",(this.options.icon.weight!=null&&i?5:0)+u+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,n),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Bbe=class extends YA{constructor(e,t,n,i,a){super(e,t,n),this.setImages(i,a)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const a=this.options.size*2;this.width=a,this.height=a;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,i,a,o){e.save(),this.switchImages(i),this.resize();let u=t,c=n;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=n,u+=this.width/2,c+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const h=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(i?f:h)/this.body.view.scale;e.lineWidth=Math.min(this.width,v),e.beginPath();let y=i?this.options.color.highlight.border:a?this.options.color.hover.border:this.options.color.border,g=i?this.options.color.highlight.background:a?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(y=Is(y,o.opacity),g=Is(g,o.opacity)),e.strokeStyle=y,e.fillStyle=g,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),kg(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,u,c,i,a),this.updateBoundingBox(t,n),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Fbe extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"square",2,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class zbe extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"hexagon",4,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Ube extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"star",4,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Hbe extends rh{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(this.textSize=this.labelModule.getTextSize(e,t,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,n,i,a,o){this.resize(e,i,a),this.left=t-this.width/2,this.top=n-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,a),this.disableShadow(e,o),this.updateBoundingBox(t,n,e,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Wbe=class extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"triangle",3,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Gbe extends Fc{constructor(e,t,n){super(e,t,n)}draw(e,t,n,i,a,o){return this._drawShape(e,"triangleDown",3,t,n,i,a,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function kW(r,e){var t=jn(r);if(Nc){var n=Nc(r);e&&(n=Da(n).call(n,function(i){return Bc(r,i).enumerable})),t.push.apply(t,n)}return t}function NW(r){for(var e=1;e<arguments.length;e++){var t,n,i=arguments[e]!=null?arguments[e]:{};e%2?Kr(t=kW(Object(i),!0)).call(t,function(a){nu(r,a,i[a])}):Ic?Sy(r,Ic(i)):Kr(n=kW(Object(i))).call(n,function(a){Ey(r,a,Bc(i,a))})}return r}class gn{constructor(e,t,n,i,a,o){this.options=Ac(a),this.globalOptions=a,this.defaultOptions=o,this.body=t,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Sf(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;Lr(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;const n=Lr(t=this.edges).call(t,e);if(n!=-1){var i;lu(i=this.edges).call(i,n,1)}}setOptions(e){const t=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");gn.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=bo(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=bo(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=BQ(e.value)),gn.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const n=[e,this.options,this.defaultOptions];return this.chooser=VA("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&gn.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,t,n){var i;if(n===void 0)return;const a=e.group;if(t!==void 0&&t.group!==void 0&&a!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof a=="number"||typeof a=="string"&&a!=""))return;const u=n.get(a);u.opacity!==void 0&&t.opacity===void 0&&(gn.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));const c=Da(i=tbe(t)).call(i,h=>t[h]!=null);c.push("font"),M1(c,e,u),e.color=f6(e.color)}static parseOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0;if(M1(["color","fixed","shadow"],e,t,n),gn.checkMass(t),e.opacity!==void 0&&(gn.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(gn.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!gn.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Ns(e,t,"shadow",i),t.color!==void 0&&t.color!==null){const u=f6(t.color);xQ(e.color,u)}else n===!0&&t.color===null&&(e.color=Ac(i.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),n===!0&&t.font===null&&(e.font=Ac(i.font)),gn.updateGroupOptions(e,t,a),t.scaling!==void 0&&Ns(e.scaling,t.scaling,"label",i.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=Is(e.borderColor,t),e.color=Is(e.color,t),e.shadowColor=Is(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),gn.updateGroupOptions(this.options,NW(NW({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),n=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Nbe(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Ibe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Pbe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Mbe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Dbe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new qbe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Lbe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new CW(this.options,this.body,this.labelModule);break;case"icon":this.shape=new $be(this.options,this.body,this.labelModule);break;case"image":this.shape=new Bbe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Fbe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new zbe(this.options,this.body,this.labelModule);break;case"star":this.shape=new Ube(this.options,this.body,this.labelModule);break;case"text":this.shape=new Hbe(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Wbe(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Gbe(this.options,this.body,this.labelModule);break;default:this.shape=new CW(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,n){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,n,this.options.value),a=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*o}this.options.size=this.options.scaling.min+i*a}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&y6(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),y6(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let n="";t!==void 0&&(n=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",TQ),e.mass=1}}}class Vbe{constructor(e,t,n,i){var a;if(this.body=e,this.images=t,this.groups=n,this.layoutEngine=i,this.body.functions.createNode=Ze(a=this.create).call(a,this),this.nodesListeners={add:(o,u)=>{this.add(u.items)},update:(o,u)=>{this.update(u.items,u.data,u.oldData)},remove:(o,u)=>{this.remove(u.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,u,c,h){if(u===o)return .5;{const f=1/(u-o);return Math.max(0,(h-o)*f)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Ac(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",Ze(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",Ze(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{cr(this.nodesListeners,(n,i)=>{this.body.data.nodes&&this.body.data.nodes.off(i,n)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(gn.parseOptions(this.options,e),e.opacity!==void 0&&(m6(e.opacity)||!wd(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of jn(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.nodes;if(bX("id",e))this.body.data.nodes=e;else if(Mn(e))this.body.data.nodes=new kf,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new kf;else throw new TypeError("Array or DataSet expected");if(n&&cr(this.nodesListeners,function(i,a){n.off(a,i)}),this.body.nodes={},this.body.data.nodes){const i=this;cr(this.nodesListeners,function(o,u){i.body.data.nodes.on(u,o)});const a=this.body.data.nodes.getIds();this.add(a,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const i=[];for(let a=0;a<e.length;a++){n=e[a];const o=this.body.data.nodes.get(n),u=this.create(o);i.push(u),this.body.nodes[n]=u}this.layoutEngine.positionInitially(i),t===!1&&this.body.emitter.emit("_dataChanged")}update(e,t,n){const i=this.body.nodes;let a=!1;for(let o=0;o<e.length;o++){const u=e[o];let c=i[u];const h=t[o];c!==void 0?c.setOptions(h)&&(a=!0):(a=!0,c=this.create(h),i[u]=c)}!a&&n!==void 0&&(a=r0e(t).call(t,function(o,u){const c=n[u];return c&&c.level!==o.level})),a===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const t=this.body.nodes;for(let n=0;n<e.length;n++){const i=e[n];delete t[i]}this.body.emitter.emit("_dataChanged")}create(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gn;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;cr(this.body.nodes,(t,n)=>{const i=this.body.data.nodes.get(n);i!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(i))})}getPositions(e){const t={};if(e!==void 0){if(Mn(e)===!0){for(let n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){const i=this.body.nodes[e[n]];t[e[n]]={x:Math.round(i.x),y:Math.round(i.y)}}}else if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];t[e]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(let n=0;n<this.body.nodeIndices.length;n++){const i=this.body.nodes[this.body.nodeIndices[n]];t[this.body.nodeIndices[n]]={x:Math.round(i.x),y:Math.round(i.y)}}return t}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],t=this.body.data.nodes.getDataSet();for(const n of t.get()){const i=n.id,a=this.body.nodes[i],o=Math.round(a.x),u=Math.round(a.y);(n.x!==o||n.y!==u)&&e.push({id:i,x:o,y:u})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){const n=[];if(this.body.nodes[e]!==void 0){const i=this.body.nodes[e],a={};for(let o=0;o<i.edges.length;o++){const u=i.edges[o];t!=="to"&&u.toId==i.id?a[u.fromId]===void 0&&(n.push(u.fromId),a[u.fromId]=!0):t!=="from"&&u.fromId==i.id&&a[u.toId]===void 0&&(n.push(u.toId),a[u.toId]=!0)}}return n}getConnectedEdges(e){const t=[];if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];for(let i=0;i<n.edges.length;i++)t.push(n.edges[i].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}moveNode(e,t,n){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),uu(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var IW={},PW;function Ybe(){if(PW)return IW;PW=1;var r=Nt(),e=Math.hypot,t=Math.abs,n=Math.sqrt,i=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:i},{hypot:function(o,u){for(var c=0,h=0,f=arguments.length,v=0,y,g;h<f;)y=t(arguments[h++]),v<y?(g=v/y,c=c*g*g+1,v=y):y>0?(g=y/v,c+=g*g):c+=y;return v===1/0?1/0:v*n(c)}}),IW}var qT,jW;function Kbe(){if(jW)return qT;jW=1,Ybe();var r=Br();return qT=r.Math.hypot,qT}var LT,MW;function Xbe(){if(MW)return LT;MW=1;var r=Kbe();return LT=r,LT}var $T,DW;function Qbe(){return DW||(DW=1,$T=Xbe()),$T}var Zbe=Qbe(),Jbe=Jt(Zbe);class Gn{static transform(e,t){Mn(e)||(e=[e]);const n=t.point.x,i=t.point.y,a=t.angle,o=t.length;for(let u=0;u<e.length;++u){const c=e[u],h=c.x*Math.cos(a)-c.y*Math.sin(a),f=c.x*Math.sin(a)+c.y*Math.cos(a);c.x=n+o*h,c.y=i+o*f}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}}let e2e=class extends Gn{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);const n=t.imageWidth!=null?t.imageWidth:t.image.width,i=t.imageHeight!=null?t.imageHeight:t.image.height;t.image.drawImageAtPosition(e,1,-n/2,0,n,i),e.restore()}return!1}};class t2e extends Gn{static draw(e,t){const n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class r2e{static draw(e,t){const n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class n2e{static draw(e,t){const n={x:-.4,y:0};Gn.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,a=t.angle-i/2,o=t.angle+i/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,a,o,!1),e.stroke(),!0}}class i2e{static draw(e,t){const n={x:-.3,y:0};Gn.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,a=t.angle+i/2,o=t.angle+3*i/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,a,o,!1),e.stroke(),!0}}class a2e{static draw(e,t){const n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class s2e{static draw(e,t){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class o2e{static draw(e,t){const n={x:-.4,y:0};return Gn.transform(n,t),xA(e,n.x,n.y,t.length*.4),!0}}class l2e{static draw(e,t){const n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class u2e{static draw(e,t){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class c2e{static draw(e,t){const n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class d2e{static draw(e,t){const n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Gn.transform(n,t),Gn.drawPath(e,n),!0}}class UQ{static draw(e,t){let n;switch(t.type&&(n=t.type.toLowerCase()),n){case"image":return e2e.draw(e,t);case"circle":return o2e.draw(e,t);case"box":return u2e.draw(e,t);case"crow":return r2e.draw(e,t);case"curve":return n2e.draw(e,t);case"diamond":return c2e.draw(e,t);case"inv_curve":return i2e.draw(e,t);case"triangle":return a2e.draw(e,t);case"inv_triangle":return s2e.draw(e,t);case"bar":return l2e.draw(e,t);case"vee":return d2e.draw(e,t);default:return t2e.draw(e,t)}}}function qW(r,e){var t=jn(r);if(Nc){var n=Nc(r);e&&(n=Da(n).call(n,function(i){return Bc(r,i).enumerable})),t.push.apply(t,n)}return t}function LW(r){for(var e=1;e<arguments.length;e++){var t,n,i=arguments[e]!=null?arguments[e]:{};e%2?Kr(t=qW(Object(i),!0)).call(t,function(a){nu(r,a,i[a])}):Ic?Sy(r,Ic(i)):Kr(n=qW(Object(i))).call(n,function(a){Ey(r,a,Bc(i,a))})}return r}class HQ{constructor(e,t,n){nu(this,"color",{}),nu(this,"colorDirty",!0),nu(this,"hoverWidth",1.5),nu(this,"selectionWidth",2),this._body=t,this._labelModule=n,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,t,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,a):this._drawLine(e,t,a)}_drawLine(e,t,n,i,a){if(this.from!=this.to)this._line(e,t,n,i,a);else{const[o,u,c]=this._getCircleData(e);this._circle(e,t,o,u,c)}}_drawDashedLine(e,t,n,i,a){e.lineCap="round";const o=Mn(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{const[u,c,h]=this._getCircleData(e);this._circle(e,t,u,c,h)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)CX(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[u,c,h]=this._getCircleData(e);this._circle(e,t,u,c,h)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[n,i]=tl(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const n=FQ(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}_pointOnCircle(e,t,n,i){const a=i*2*Math.PI;return{x:e+n*Math.cos(a),y:t-n*Math.sin(a)}}_findBorderPositionCircle(e,t,n){const i=n.x,a=n.y;let o=n.low,u=n.high;const c=n.direction,h=10,f=this.options.selfReference.size,v=.05;let y,g=(o+u)*.5,_=0;this.options.arrowStrikethrough===!0&&(c===-1?_=this.options.endPointOffset.from:c===1&&(_=this.options.endPointOffset.to));let E=0;do{g=(o+u)*.5,y=this._pointOnCircle(i,a,f,g);const A=Math.atan2(e.y-y.y,e.x-y.x),T=e.distanceToBorder(t,A)+_,C=Math.sqrt(Math.pow(y.x-e.x,2)+Math.pow(y.y-e.y,2)),N=T-C;if(Math.abs(N)<v)break;N>0?c>0?o=g:u=g:c>0?u=g:o=g,++E}while(o<=u&&E<h);return LW(LW({},y),{},{t:g})}getLineWidth(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}getColor(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){const n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let i=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(i=Is(this.from.options.color.border,t.opacity),a=Is(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),n.addColorStop(0,i),n.addColorStop(1,a),n}return t.inheritsColor==="to"?Is(this.to.options.color.border,t.opacity):Is(this.from.options.color.border,t.opacity)}else return Is(t.color,t.opacity)}_circle(e,t,n,i,a){this.enableShadow(e,t);let o=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const c=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,f=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:c,high:h,direction:-1}),v=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:c,high:h,direction:1});o=Math.atan2(f.y-i,f.x-n),u=Math.atan2(v.y-i,v.x-n)}e.beginPath(),e.arc(n,i,a,o,u,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,n,i,a,o){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,i,a,o);{const[u,c,h]=this._getCircleData(void 0),f=u-a,v=c-o;return Math.abs(Math.sqrt(f*f+v*v)-h)}}_getDistanceToLine(e,t,n,i,a,o){const u=n-e,c=i-t,h=u*u+c*c;let f=((a-e)*u+(o-t)*c)/h;f>1?f=1:f<0&&(f=0);const v=e+f*u,y=t+f*c,g=v-a,_=y-o;return Math.sqrt(g*g+_*_)}getArrowData(e,t,n,i,a,o){let u,c,h,f,v,y,g;const _=o.width;t==="from"?(h=this.from,f=this.to,v=o.fromArrowScale<0,y=Math.abs(o.fromArrowScale),g=o.fromArrowType):t==="to"?(h=this.to,f=this.from,v=o.toArrowScale<0,y=Math.abs(o.toArrowScale),g=o.toArrowType):(h=this.to,f=this.from,v=o.middleArrowScale<0,y=Math.abs(o.middleArrowScale),g=o.middleArrowType);const E=15*y+3*_;if(h!=f){const N=Jbe(h.x-f.x,h.y-f.y),k=E/N;if(t!=="middle")if(this.options.smooth.enabled===!0){const j=this._findBorderPosition(h,e,{via:n}),W=this.getPoint(j.t+k*(t==="from"?1:-1),n);u=Math.atan2(j.y-W.y,j.x-W.x),c=j}else u=Math.atan2(h.y-f.y,h.x-f.x),c=this._findBorderPosition(h,e);else{const j=(v?-k:k)/2,W=this.getPoint(.5+j,n),G=this.getPoint(.5-j,n);u=Math.atan2(W.y-G.y,W.x-G.x),c=this.getPoint(.5,n)}}else{const[N,k,j]=this._getCircleData(e);if(t==="from"){const W=this.options.selfReference.angle,G=this.options.selfReference.angle+Math.PI,D=this._findBorderPositionCircle(this.from,e,{x:N,y:k,low:W,high:G,direction:-1});u=D.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,c=D}else if(t==="to"){const W=this.options.selfReference.angle,G=this.options.selfReference.angle+Math.PI,D=this._findBorderPositionCircle(this.from,e,{x:N,y:k,low:W,high:G,direction:1});u=D.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,c=D}else{const W=this.options.selfReference.angle/(2*Math.PI);c=this._pointOnCircle(N,k,j,W),u=W*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const A=c.x-E*.9*Math.cos(u),T=c.y-E*.9*Math.sin(u);return{point:c,core:{x:A,y:T},angle:u,length:E,type:g}}drawArrowHead(e,t,n,i,a){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,UQ.draw(e,a)&&(this.enableShadow(e,t),kg(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const n=Mn(t)?t:[5,5];e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function $W(r,e){var t=jn(r);if(Nc){var n=Nc(r);e&&(n=Da(n).call(n,function(i){return Bc(r,i).enumerable})),t.push.apply(t,n)}return t}function BW(r){for(var e=1;e<arguments.length;e++){var t,n,i=arguments[e]!=null?arguments[e]:{};e%2?Kr(t=$W(Object(i),!0)).call(t,function(a){nu(r,a,i[a])}):Ic?Sy(r,Ic(i)):Kr(n=$W(Object(i))).call(n,function(a){Ey(r,a,Bc(i,a))})}return r}class KA extends HQ{constructor(e,t,n){super(e,t,n)}_findBorderPositionBezier(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const i=10,a=.2;let o=!1,u=1,c=0,h=this.to,f,v,y=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(h=this.from,o=!0,y=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(y=0);let g=0;do{v=(c+u)*.5,f=this.getPoint(v,n);const _=Math.atan2(h.y-f.y,h.x-f.x),E=h.distanceToBorder(t,_)+y,A=Math.sqrt(Math.pow(f.x-h.x,2)+Math.pow(f.y-h.y,2)),T=E-A;if(Math.abs(T)<a)break;T<0?o===!1?c=v:u=v:o===!1?u=v:c=v,++g}while(c<=u&&g<i);return BW(BW({},f),{},{t:v})}_getDistanceToBezierEdge(e,t,n,i,a,o,u){let c=1e9,h,f,v,y,g,_=e,E=t;for(f=1;f<10;f++)v=.1*f,y=Math.pow(1-v,2)*e+2*v*(1-v)*u.x+Math.pow(v,2)*n,g=Math.pow(1-v,2)*t+2*v*(1-v)*u.y+Math.pow(v,2)*i,f>0&&(h=this._getDistanceToLine(_,E,y,g,a,o),c=h<c?h:c),_=y,E=g;return c}_bezierCurve(e,t,n,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?i!=null&&i.x!=null?e.bezierCurveTo(n.x,n.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){return this._getViaCoordinates()}}class FW extends KA{constructor(e,t,n){super(e,t,n),nu(this,"via",this.via),this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,n){this._bezierCurve(e,t,n)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[n,i,a]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:n+a*Math.sin(o),y:i+a-a*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,n,i,a,o){return this._getDistanceToBezierEdge(e,t,n,i,a,o,this.via)}}class zW extends KA{constructor(e,t,n){super(e,t,n)}_line(e,t,n){this._bezierCurve(e,t,n)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let n=Math.abs(this.from.x-this.to.x),i=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let a,o;n<=i?a=o=e*i:a=o=e*n,this.from.x>this.to.x&&(a=-a),this.from.y>=this.to.y&&(o=-o);let u=this.from.x+a,c=this.from.y+o;return t==="discrete"&&(n<=i?u=n<e*i?this.from.x:u:c=i<e*n?this.from.y:c),{x:u,y:c}}else if(t==="straightCross"){let a=(1-e)*n,o=(1-e)*i;return n<=i?(a=0,this.from.y<this.to.y&&(o=-o)):(this.from.x<this.to.x&&(a=-a),o=0),{x:this.to.x+a,y:this.to.y+o}}else if(t==="horizontal"){let a=(1-e)*n;return this.from.x<this.to.x&&(a=-a),{x:this.to.x+a,y:this.from.y}}else if(t==="vertical"){let a=(1-e)*i;return this.from.y<this.to.y&&(a=-a),{x:this.from.x,y:this.to.y+a}}else if(t==="curvedCW"){n=this.to.x-this.from.x,i=this.from.y-this.to.y;const a=Math.sqrt(n*n+i*i),o=Math.PI,c=(Math.atan2(i,n)+(e*.5+.5)*o)%(2*o);return{x:this.from.x+(e*.5+.5)*a*Math.sin(c),y:this.from.y+(e*.5+.5)*a*Math.cos(c)}}else if(t==="curvedCCW"){n=this.to.x-this.from.x,i=this.from.y-this.to.y;const a=Math.sqrt(n*n+i*i),o=Math.PI,c=(Math.atan2(i,n)+(-e*.5+.5)*o)%(2*o);return{x:this.from.x+(e*.5+.5)*a*Math.sin(c),y:this.from.y+(e*.5+.5)*a*Math.cos(c)}}else{let a,o;n<=i?a=o=e*i:a=o=e*n,this.from.x>this.to.x&&(a=-a),this.from.y>=this.to.y&&(o=-o);let u=this.from.x+a,c=this.from.y+o;return n<=i?this.from.x<=this.to.x?u=this.to.x<u?this.to.x:u:u=this.to.x>u?this.to.x:u:this.from.y>=this.to.y?c=this.to.y>c?this.to.y:c:c=this.to.y<c?this.to.y:c,{x:u,y:c}}}_findBorderPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,n.via)}_getDistanceToEdge(e,t,n,i,a,o){let u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,n,i,a,o,u)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,i=Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*t.x+Math.pow(n,2)*this.toPoint.x,a=Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*t.y+Math.pow(n,2)*this.toPoint.y;return{x:i,y:a}}}class h2e extends KA{constructor(e,t,n){super(e,t,n)}_getDistanceToBezierEdge2(e,t,n,i,a,o,u,c){let h=1e9,f=e,v=t;const y=[0,0,0,0];for(let g=1;g<10;g++){const _=.1*g;y[0]=Math.pow(1-_,3),y[1]=3*_*Math.pow(1-_,2),y[2]=3*Math.pow(_,2)*(1-_),y[3]=Math.pow(_,3);const E=y[0]*e+y[1]*u.x+y[2]*c.x+y[3]*n,A=y[0]*t+y[1]*u.y+y[2]*c.y+y[3]*i;if(g>0){const T=this._getDistanceToLine(f,v,E,A,a,o);h=T<h?T:h}f=E,v=A}return h}}class UW extends h2e{constructor(e,t,n){super(e,t,n)}_line(e,t,n){const i=n[0],a=n[1];this._bezierCurve(e,t,i,a)}_getViaCoordinates(){const e=this.from.x-this.to.x,t=this.from.y-this.to.y;let n,i,a,o;const u=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(i=this.from.y,o=this.to.y,n=this.from.x-u*e,a=this.to.x+u*e):(i=this.from.y-u*t,o=this.to.y+u*t,n=this.from.x,a=this.to.x),[{x:n,y:i},{x:a,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,n,i,a,o){let[u,c]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,n,i,a,o,u,c)}getPoint(e){let[t,n]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,a=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)],o=a[0]*this.fromPoint.x+a[1]*t.x+a[2]*n.x+a[3]*this.toPoint.x,u=a[0]*this.fromPoint.y+a[1]*t.y+a[2]*n.y+a[3]*this.toPoint.y;return{x:o,y:u}}}class HW extends HQ{constructor(e,t,n){super(e,t,n)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let n=this.to,i=this.from;e.id===this.from.id&&(n=this.from,i=this.to);const a=Math.atan2(n.y-i.y,n.x-i.x),o=n.x-i.x,u=n.y-i.y,c=Math.sqrt(o*o+u*u),h=e.distanceToBorder(t,a),f=(c-h)/c;return{x:(1-f)*i.x+f*n.x,y:(1-f)*i.y+f*n.y,t:0}}_getDistanceToEdge(e,t,n,i,a,o){return this._getDistanceToLine(e,t,n,i,a,o)}}class Rc{constructor(e,t,n,i,a){if(t===void 0)throw new Error("No body provided");this.options=Ac(i),this.globalOptions=i,this.defaultOptions=a,this.body=t,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Sf(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Rc.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=BQ(e.value));const n=[e,this.options,this.defaultOptions];return this.chooser=VA("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(pp(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(wd(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=i.endPointOffset.from!==void 0?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(wd(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=i.endPointOffset.to!==void 0?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),q1(t.label)?e.label=t.label:q1(e.label)||(e.label=void 0),Ns(e,t,"smooth",i),Ns(e,t,"shadow",i),Ns(e,t,"background",i),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=Td(i.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Ns(e.scaling,t.scaling,"label",i.scaling)):n===!0&&t.scaling===null&&(e.scaling=Td(i.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const u=t.arrows.toLowerCase();e.arrows.to.enabled=Lr(u).call(u,"to")!=-1,e.arrows.middle.enabled=Lr(u).call(u,"middle")!=-1,e.arrows.from.enabled=Lr(u).call(u,"from")!=-1}else if(typeof t.arrows=="object")Ns(e.arrows,t.arrows,"to",i.arrows),Ns(e.arrows,t.arrows,"middle",i.arrows),Ns(e.arrows,t.arrows,"from",i.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Cg(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=Td(i.arrows));if(t.color!==void 0&&t.color!==null){const u=xf(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,c=e.color;if(a)rn(c,i.color,!1,n);else for(const h in c)Object.prototype.hasOwnProperty.call(c,h)&&delete c[h];if(xf(c))c.color=c,c.highlight=c,c.hover=c,c.inherit=!1,u.opacity===void 0&&(c.opacity=1);else{let h=!1;u.color!==void 0&&(c.color=u.color,h=!0),u.highlight!==void 0&&(c.highlight=u.highlight,h=!0),u.hover!==void 0&&(c.hover=u.hover,h=!0),u.inherit!==void 0&&(c.inherit=u.inherit),u.opacity!==void 0&&(c.opacity=Math.min(1,Math.max(0,u.opacity))),h===!0?c.inherit=!1:c.inherit===void 0&&(c.inherit="from")}}else n===!0&&t.color===null&&(e.color=Ac(i.color));n===!0&&t.font===null&&(e.font=Ac(i.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,i=this.options.color.inherit,a={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:i?void 0:this.options.color.color,inheritsColor:i,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?a.width=o(a.width):typeof o=="number"&&(a.width+=o),a.width=Math.max(a.width,.3/this.body.view.scale),a.color=this.options.color.highlight,a.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?a.width=o(a.width):typeof o=="number"&&(a.width+=o),a.width=Math.max(a.width,.3/this.body.view.scale),a.color=this.options.color.hover,a.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(a,this.options.id,this.selected,this.hover),a.color!==void 0&&(a.inheritsColor=!1),a.shadow===!1&&(a.shadowColor!==this.options.shadow.color||a.shadowSize!==this.options.shadow.size||a.shadowX!==this.options.shadow.x||a.shadowY!==this.options.shadow.y)&&(a.shadow=!0));else a.shadow=this.options.shadow.enabled,a.width=Math.max(a.width,.3/this.body.view.scale);return a}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof FW&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof UW&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof zW&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof HW&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new FW(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new UW(this.options,this.body,this.labelModule):this.edgeType=new zW(this.options,this.body,this.labelModule):this.edgeType=new HW(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,n){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,n,this.options.value),a=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*o}this.options.width=this.options.scaling.min+i*a}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const n=this.edgeType.getViaNode(),i={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(i.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=i.from.core),t.fromArrowSrc&&(i.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(i.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(i.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(i.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=i.to.core),t.toArrowSrc&&(i.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(i.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(i.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(i.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,t),t.middleArrowSrc&&(i.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(i.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(i.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.to)}drawLabel(e,t){if(this.options.label!==void 0){const n=this.from,i=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let a;if(n.id!=i.id){this.labelModule.pointToSelf=!1,a=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,a.x,a.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=FQ(e,this.options.selfReference.angle,this.options.selfReference.size,n);a=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,a.x,a.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const i=this._getRotation();y6(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}const n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const n=this.from.x,i=this.from.y,a=this.to.x,o=this.to.y,u=e.left,c=e.top;return this.edgeType.getDistanceToEdge(n,i,a,o,u,c)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);const i={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return i;const a=this.from.y-this.to.y,o=this.from.x-this.to.x;let u=Math.atan2(a,o);return(u<-1&&o<0||u>0&&o<0)&&(u+=Math.PI),i.angle=u,i}_pointOnCircle(e,t,n,i){return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class f2e{constructor(e,t,n){var i;this.body=e,this.images=t,this.groups=n,this.body.functions.createEdge=Ze(i=this.create).call(i,this),this.edgesListeners={add:(a,o)=>{this.add(o.items)},update:(a,o)=>{this.update(o.items)},remove:(a,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(a,o,u,c){if(o===a)return .5;{const h=1/(o-a);return Math.max(0,(c-a)*h)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},rn(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,n;this.body.emitter.on("_forceDisableDynamicCurves",function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i==="dynamic"&&(i="continuous");let o=!1;for(const u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){const c=e.body.edges[u],h=e.body.data.edges.get(u);if(h!=null){const f=h.smooth;f!==void 0&&f.enabled===!0&&f.type==="dynamic"&&(i===void 0?c.setOptions({smooth:!1}):c.setOptions({smooth:{type:i}}),o=!0)}}a===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",Ze(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",Ze(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",()=>{cr(this.edgesListeners,(i,a)=>{this.body.data.edges&&this.body.data.edges.off(a,i)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Rc.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);if(e.font!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&this.body.edges[n].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.edges;if(bX("id",e))this.body.data.edges=e;else if(Mn(e))this.body.data.edges=new kf,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new kf;else throw new TypeError("Array or DataSet expected");if(n&&cr(this.edgesListeners,(i,a)=>{n.off(a,i)}),this.body.edges={},this.body.data.edges){cr(this.edgesListeners,(a,o)=>{this.body.data.edges.on(o,a)});const i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.edges,i=this.body.data.edges;for(let a=0;a<e.length;a++){const o=e[a],u=n[o];u&&u.disconnect();const c=i.get(o,{showInternalIds:!0});n[o]=this.create(c)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}update(e){const t=this.body.edges,n=this.body.data.edges;let i=!1;for(let a=0;a<e.length;a++){const o=e[a],u=n.get(o),c=t[o];c!==void 0?(c.disconnect(),i=c.setOptions(u)||i,c.connect()):(this.body.edges[o]=this.create(u),i=!0)}i===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}remove(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const n=this.body.edges;cr(e,i=>{const a=n[i];a!==void 0&&a.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){cr(this.body.edges,(e,t)=>{const n=this.body.data.edges.get(t);n!==void 0&&e.setOptions(n)})}create(e){return new Rc(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const i=n[e];i.from=null,i.to=null,i.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];cr(this.body.edges,(t,n)=>{const i=this.body.nodes[t.toId],a=this.body.nodes[t.fromId];i!==void 0&&i.isCluster===!0||a!==void 0&&a.isCluster===!0||(i===void 0||a===void 0)&&e.push(n)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,n=[];Kr(e).call(e,(i,a)=>{t[a]===void 0&&n.push(a)}),this.add(n,!0)}}class WQ{constructor(e,t,n){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(n),this._rng=wy("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,i=n.length,a=this._formBarnesHutTree(t,n);this.barnesHutTree=a;for(let o=0;o<i;o++)e=t[n[o]],e.options.mass>0&&this._getForceContributions(a.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const n=e.centerOfMass.x-t.x,i=e.centerOfMass.y-t.y,a=Math.sqrt(n*n+i*i);a*e.calcSize>this.thetaInversed?this._calculateForces(a,n,i,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(a,n,i,t,e)}}_calculateForces(e,t,n,i,a){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const o=this.options.gravitationalConstant*a.mass*i.options.mass/Math.pow(e,3),u=t*o,c=n*o;this.physicsBody.forces[i.id].x+=u,this.physicsBody.forces[i.id].y+=c}_formBarnesHutTree(e,t){let n;const i=t.length;let a=e[t[0]].x,o=e[t[0]].y,u=e[t[0]].x,c=e[t[0]].y;for(let A=1;A<i;A++){const T=e[t[A]],C=T.x,N=T.y;T.options.mass>0&&(C<a&&(a=C),C>u&&(u=C),N<o&&(o=N),N>c&&(c=N))}const h=Math.abs(u-a)-Math.abs(c-o);h>0?(o-=.5*h,c+=.5*h):(a+=.5*h,u-=.5*h);const v=Math.max(1e-5,Math.abs(u-a)),y=.5*v,g=.5*(a+u),_=.5*(o+c),E={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:g-y,maxX:g+y,minY:_-y,maxY:_+y},size:v,calcSize:1/v,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(E.root);for(let A=0;A<i;A++)n=e[t[A]],n.options.mass>0&&this._placeInTree(E.root,n);return E}_updateBranchMass(e,t){const n=e.centerOfMass,i=e.mass+t.options.mass,a=1/i;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=a,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=a,e.mass=i;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<o?o:e.maxWidth}_placeInTree(e,t,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,t);const i=e.children.NW.range;let a;i.maxX>t.x?i.maxY>t.y?a="NW":a="SW":i.maxY>t.y?a="NE":a="SE",this._placeInRegion(e,t,a)}_placeInRegion(e,t,n){const i=e.children[n];switch(i.childrenCount){case 0:i.children.data=t,i.childrenCount=1,this._updateBranchMass(i,t);break;case 1:i.children.data.x===t.x&&i.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,t));break;case 4:this._placeInTree(i,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let n,i,a,o;const u=.5*e.size;switch(t){case"NW":n=e.range.minX,i=e.range.minX+u,a=e.range.minY,o=e.range.minY+u;break;case"NE":n=e.range.minX+u,i=e.range.maxX,a=e.range.minY,o=e.range.minY+u;break;case"SW":n=e.range.minX,i=e.range.minX+u,a=e.range.minY+u,o=e.range.maxY;break;case"SE":n=e.range.minX+u,i=e.range.maxX,a=e.range.minY+u,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:i,minY:a,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class p2e{constructor(e,t,n){this._rng=wy("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,i,a,o,u,c;const h=this.body.nodes,f=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,y=this.options.nodeDistance,g=-2/3/y,_=4/3;for(let E=0;E<f.length-1;E++){u=h[f[E]];for(let A=E+1;A<f.length;A++)c=h[f[A]],e=c.x-u.x,t=c.y-u.y,n=Math.sqrt(e*e+t*t),n===0&&(n=.1*this._rng(),e=n),n<2*y&&(n<.5*y?o=1:o=g*n+_,o=o/n,i=e*o,a=t*o,v[u.id].x-=i,v[u.id].y-=a,v[c.id].x+=i,v[c.id].y+=a)}}}class v2e{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,i=this.options.nodeDistance;for(let a=0;a<t.length-1;a++){const o=e[t[a]];for(let u=a+1;u<t.length;u++){const c=e[t[u]];if(o.level===c.level){const h=i+this.overlapAvoidanceFactor*((o.shape.radius||0)/2+(c.shape.radius||0)/2),f=c.x-o.x,v=c.y-o.y,y=Math.sqrt(f*f+v*v),g=.05;let _;y<h?_=-Math.pow(g*y,2)+Math.pow(g*h,2):_=0,y!==0&&(_=_/y);const E=f*_,A=v*_;n[o.id].x-=E,n[o.id].y-=A,n[c.id].x+=E,n[c.id].y+=A}}}}}class BT{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t;const n=this.physicsBody.physicsEdgeIndices,i=this.body.edges;let a,o,u;for(let c=0;c<n.length;c++)t=i[n[c]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,a=t.to,o=t.edgeType.via,u=t.from,this._calculateSpringForce(a,o,.5*e),this._calculateSpringForce(o,u,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}_calculateSpringForce(e,t,n){const i=e.x-t.x,a=e.y-t.y,o=Math.max(Math.sqrt(i*i+a*a),.01),u=this.options.springConstant*(n-o)/o,c=i*u,h=a*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=c,this.physicsBody.forces[e.id].y+=h),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=c,this.physicsBody.forces[t.id].y-=h)}}class g2e{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,i,a,o,u,c;const h=this.body.edges,f=.5,v=this.physicsBody.physicsEdgeIndices,y=this.physicsBody.physicsNodeIndices,g=this.physicsBody.forces;for(let k=0;k<y.length;k++){const j=y[k];g[j].springFx=0,g[j].springFy=0}for(let k=0;k<v.length;k++)t=h[v[k]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,i=t.from.y-t.to.y,c=Math.sqrt(n*n+i*i),c=c===0?.01:c,u=this.options.springConstant*(e-c)/c,a=n*u,o=i*u,t.to.level!=t.from.level?(g[t.toId]!==void 0&&(g[t.toId].springFx-=a,g[t.toId].springFy-=o),g[t.fromId]!==void 0&&(g[t.fromId].springFx+=a,g[t.fromId].springFy+=o)):(g[t.toId]!==void 0&&(g[t.toId].x-=f*a,g[t.toId].y-=f*o),g[t.fromId]!==void 0&&(g[t.fromId].x+=f*a,g[t.fromId].y+=f*o)));u=1;let _,E;for(let k=0;k<y.length;k++){const j=y[k];_=Math.min(u,Math.max(-u,g[j].springFx)),E=Math.min(u,Math.max(-u,g[j].springFy)),g[j].x+=_,g[j].y+=E}let A=0,T=0;for(let k=0;k<y.length;k++){const j=y[k];A+=g[j].x,T+=g[j].y}const C=A/y.length,N=T/y.length;for(let k=0;k<y.length;k++){const j=y[k];g[j].x-=C,g[j].y-=N}}}class f1{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,i;const a=this.body.nodes,o=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces;for(let c=0;c<o.length;c++){const h=o[c];i=a[h],e=-i.x,t=-i.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,u,i)}}_calculateForces(e,t,n,i,a){const o=e===0?0:this.options.centralGravity/e;i[a.id].x=t*o,i[a.id].y=n*o}}class m2e extends WQ{constructor(e,t,n){super(e,t,n),this._rng=wy("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,t,n,i,a){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const o=i.edges.length+1,u=this.options.gravitationalConstant*a.mass*i.options.mass*o/Math.pow(e,2),c=t*u,h=n*u;this.physicsBody.forces[i.id].x+=c,this.physicsBody.forces[i.id].y+=h}}class y2e extends f1{constructor(e,t,n){super(e,t,n)}_calculateForces(e,t,n,i,a){if(e>0){const o=a.edges.length+1,u=this.options.centralGravity*o*a.options.mass;i[a.id].x=t*u,i[a.id].y=n*u}}}class b2e{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Jn(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,M1(["stabilization"],this.options,e),Ns(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||m6(t.x))&&(t.x=0),(typeof t.y!="number"||m6(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new m2e(this.body,this.physicsBody,e),this.edgesSolver=new BT(this.body,this.physicsBody,e),this.gravitySolver=new y2e(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new p2e(this.body,this.physicsBody,e),this.edgesSolver=new BT(this.body,this.physicsBody,e),this.gravitySolver=new f1(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new v2e(this.body,this.physicsBody,e),this.edgesSolver=new g2e(this.body,this.physicsBody,e),this.gravitySolver=new f1(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new WQ(this.body,this.physicsBody,e),this.edgesSolver=new BT(this.body,this.physicsBody,e),this.gravitySolver=new f1(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=Ze(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=N1();this.physicsTick(),(N1()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&uu(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];const e=this.body.nodes,t=this.body.edges;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[n].id);for(let n=0;n<this.physicsBody.physicsNodeIndices.length;n++){const i=this.physicsBody.physicsNodeIndices[n];this.physicsBody.forces[i]={x:0,y:0},this.physicsBody.velocities[i]===void 0&&(this.physicsBody.velocities[i]={x:0,y:0})}for(const n in this.physicsBody.velocities)e[n]===void 0&&delete this.physicsBody.velocities[n]}revert(){const e=jn(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(let i=0;i<e.length;i++){const a=e[i];t[a]!==void 0?t[a].options.physics===!0&&(this.referenceState[a]={positions:{x:t[a].x,y:t[a].y}},n[a].x=this.previousStates[a].vx,n[a].y=this.previousStates[a].vy,t[a].x=this.previousStates[a].x,t[a].y=this.previousStates[a].y):delete this.previousStates[a]}}_evaluateStepQuality(){let e,t,n;const i=this.body.nodes,a=this.referenceState,o=.3;for(const u in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,u)&&i[u]!==void 0&&(e=i[u].x-a[u].positions.x,t=i[u].y-a[u].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),n>o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,n=0;const i=5;for(let a=0;a<e.length;a++){const o=e[a],u=this._performStep(o);t=Math.max(t,u),n+=u}this.adaptiveTimestepEnabled=n/e.length<i,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,n){const i=this.modelOptions.damping*e,a=(t-i)/n;e+=a*this.timestep;const o=this.options.maxVelocity||1e9;return Math.abs(e)>o&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);const i=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:i.x,vy:i.y},t.options.fixed.x===!1?(i.x=this.calculateComponentVelocity(i.x,n.x,t.options.mass),t.x+=i.x*this.timestep):(n.x=0,i.x=0),t.options.fixed.y===!1?(i.y=this.calculateComponentVelocity(i.y,n.y,t.options.mass),t.y+=i.y*this.timestep):(n.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,uu(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let n=0;for(;e()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;if(t(),e()){var i;uu(Ze(i=this._stabilizationBatch).call(i,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let t=0;t<this.physicsBody.physicsNodeIndices.length;t++){const n=this.physicsBody.physicsNodeIndices[t],i=this.body.nodes[n],a=this.physicsBody.forces[n],o=20,u=.03,c=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.x,2)),h=Math.min(Math.max(5,c),15),f=3*h,v=p6((180-Math.min(1,Math.max(0,u*c))*180)/360,1,1),y={x:i.x+o*a.x,y:i.y+o*a.y};e.lineWidth=h,e.strokeStyle=v,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(y.x,y.y),e.stroke();const g=Math.atan2(a.y,a.x);e.fillStyle=v,UQ.draw(e,{type:"arrow",point:y,angle:g,length:f}),kg(e).call(e)}}}const Ki=[];for(let r=0;r<256;++r)Ki.push((r+256).toString(16).slice(1));function w2e(r,e=0){return(Ki[r[e+0]]+Ki[r[e+1]]+Ki[r[e+2]]+Ki[r[e+3]]+"-"+Ki[r[e+4]]+Ki[r[e+5]]+"-"+Ki[r[e+6]]+Ki[r[e+7]]+"-"+Ki[r[e+8]]+Ki[r[e+9]]+"-"+Ki[r[e+10]]+Ki[r[e+11]]+Ki[r[e+12]]+Ki[r[e+13]]+Ki[r[e+14]]+Ki[r[e+15]]).toLowerCase()}let FT;const x2e=new Uint8Array(16);function _2e(){if(!FT){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");FT=crypto.getRandomValues.bind(crypto)}return FT(x2e)}const S2e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var WW={randomUUID:S2e};function E2e(r,e,t){r=r||{};const n=r.random??r.rng?.()??_2e();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,w2e(n)}function Cv(r,e,t){return WW.randomUUID&&!r?WW.randomUUID():E2e(r)}class ma{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,i=-1e9,a=1e9,o=-1e9,u;if(t.length>0)for(let c=0;c<t.length;c++)u=e[t[c]],a>u.shape.boundingBox.left&&(a=u.shape.boundingBox.left),o<u.shape.boundingBox.right&&(o=u.shape.boundingBox.right),n>u.shape.boundingBox.top&&(n=u.shape.boundingBox.top),i<u.shape.boundingBox.bottom&&(i=u.shape.boundingBox.bottom);return a===1e9&&o===-1e9&&n===1e9&&i===-1e9&&(n=0,i=0,a=0,o=0),{minX:a,maxX:o,minY:n,maxY:i}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,i=-1e9,a=1e9,o=-1e9,u;if(t.length>0)for(let c=0;c<t.length;c++)u=e[t[c]],a>u.x&&(a=u.x),o<u.x&&(o=u.x),n>u.y&&(n=u.y),i<u.y&&(i=u.y);return a===1e9&&o===-1e9&&n===1e9&&i===-1e9&&(n=0,i=0,a=0,o=0),{minX:a,maxX:o,minY:n,maxY:i}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){const n={};return t===void 0||t==="node"?(rn(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):rn(n,e.options,!0),n}}class T2e extends gn{constructor(e,t,n,i,a,o){super(e,t,n,i,a,o),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!t.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],cr(t.edges,n=>{delete this.containedEdges[n.id]}),cr(t.containedNodes,(n,i)=>{this.containedNodes[i]=n}),t.containedNodes={},cr(t.containedEdges,(n,i)=>{this.containedEdges[i]=n}),t.containedEdges={},cr(t.edges,n=>{cr(this.edges,i=>{var a,o;const u=Lr(a=i.clusteringEdgeReplacingIds).call(a,n.id);u!==-1&&(cr(n.clusteringEdgeReplacingIds,c=>{i.clusteringEdgeReplacingIds.push(c),this.body.edges[c].edgeReplacedById=i.id}),lu(o=i.clusteringEdgeReplacingIds).call(o,u,1))})}),t.edges=[]}}class O2e{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Jn(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const n=[];for(let i=0;i<this.body.nodeIndices.length;i++){const a=this.body.nodes[this.body.nodeIndices[i]];a.edges.length>=e&&n.push(a.id)}for(let i=0;i<n.length;i++)this.clusterByConnection(n[i],t,!0);this.body.emitter.emit("_dataChanged")}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const n={},i={};cr(this.body.nodes,(a,o)=>{a.options&&e.joinCondition(a.options)===!0&&(n[o]=a,cr(a.edges,u=>{this.clusteredEdges[u.id]===void 0&&(i[u.id]=u)}))}),this._cluster(n,i,e,t)}clusterByEdgeCount(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const i=[],a={};let o,u,c;for(let h=0;h<this.body.nodeIndices.length;h++){const f={},v={},y=this.body.nodeIndices[h],g=this.body.nodes[y];if(a[y]===void 0){c=0,u=[];for(let _=0;_<g.edges.length;_++)o=g.edges[_],this.clusteredEdges[o.id]===void 0&&(o.toId!==o.fromId&&c++,u.push(o));if(c===e){const _=function(A){if(t.joinCondition===void 0||t.joinCondition===null)return!0;const T=ma.cloneOptions(A);return t.joinCondition(T)};let E=!0;for(let A=0;A<u.length;A++){o=u[A];const T=this._getConnectedId(o,y);if(_(g))v[o.id]=o,f[y]=g,f[T]=this.body.nodes[T],a[y]=!0;else{E=!1;break}}if(jn(f).length>0&&jn(v).length>0&&E===!0){const T=function(){for(let C=0;C<i.length;++C)for(const N in f)if(i[C].nodes[N]!==void 0)return i[C]}();if(T!==void 0){for(const C in f)T.nodes[C]===void 0&&(T.nodes[C]=f[C]);for(const C in v)T.edges[C]===void 0&&(T.edges[C]=v[C])}else i.push({nodes:f,edges:v})}}}}for(let h=0;h<i.length;h++)this._cluster(i[h].nodes,i[h].edges,t,!1);n===!0&&this.body.emitter.emit("_dataChanged")}clusterOutliers(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var n;let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const a=this.body.nodes[e];t=this._checkOptions(t,a),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=a.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=a.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=a.options.fixed.x,t.clusterNodeProperties.fixed.y=a.options.fixed.y);const o={},u={},c=a.id,h=ma.cloneOptions(a);o[c]=a;for(let v=0;v<a.edges.length;v++){const y=a.edges[v];if(this.clusteredEdges[y.id]===void 0){const g=this._getConnectedId(y,c);if(this.clusteredNodes[g]===void 0)if(g!==c)if(t.joinCondition===void 0)u[y.id]=y,o[g]=this.body.nodes[g];else{const _=ma.cloneOptions(this.body.nodes[g]);t.joinCondition(h,_)===!0&&(u[y.id]=y,o[g]=this.body.nodes[g])}else u[y.id]=y}}const f=Nf(n=jn(o)).call(n,function(v){return o[v].id});for(const v in o){if(!Object.prototype.hasOwnProperty.call(o,v))continue;const y=o[v];for(let g=0;g<y.edges.length;g++){const _=y.edges[g];Lr(f).call(f,this._getConnectedId(_,y.id))>-1&&(u[_.id]=_)}}this._cluster(o,u,t,i)}_createClusterEdges(e,t,n,i){let a,o,u,c,h,f;const v=jn(e),y=[];for(let E=0;E<v.length;E++){o=v[E],u=e[o];for(let A=0;A<u.edges.length;A++)a=u.edges[A],this.clusteredEdges[a.id]===void 0&&(a.toId==a.fromId?t[a.id]=a:a.toId==o?(c=n.id,h=a.fromId,f=h):(c=a.toId,h=n.id,f=c),e[f]===void 0&&y.push({edge:a,fromId:h,toId:c}))}const g=[],_=function(E){for(let A=0;A<g.length;A++){const T=g[A],C=E.fromId===T.fromId&&E.toId===T.toId,N=E.fromId===T.toId&&E.toId===T.fromId;if(C||N)return T}return null};for(let E=0;E<y.length;E++){const A=y[E],T=A.edge;let C=_(A);C===null?(C=this._createClusteredEdge(A.fromId,A.toId,T,i),g.push(C)):C.clusteringEdgeReplacingIds.push(T.id),this.body.edges[T.id].edgeReplacedById=C.id,this._backupEdgeOptions(T),T.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const a=[];for(const f in e)Object.prototype.hasOwnProperty.call(e,f)&&this.clusteredNodes[f]!==void 0&&a.push(f);for(let f=0;f<a.length;++f)delete e[a[f]];if(jn(e).length==0||jn(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let o=rn({},n.clusterNodeProperties);if(n.processProperties!==void 0){const f=[];for(const y in e)if(Object.prototype.hasOwnProperty.call(e,y)){const g=ma.cloneOptions(e[y]);f.push(g)}const v=[];for(const y in t)if(Object.prototype.hasOwnProperty.call(t,y)&&y.substr(0,12)!=="clusterEdge:"){const g=ma.cloneOptions(t[y],"edge");v.push(g)}if(o=n.processProperties(o,f,v),!o)throw new Error("The processProperties function does not return properties!")}o.id===void 0&&(o.id="cluster:"+Cv());const u=o.id;o.label===void 0&&(o.label="cluster");let c;o.x===void 0&&(c=this._getClusterPosition(e),o.x=c.x),o.y===void 0&&(c===void 0&&(c=this._getClusterPosition(e)),o.y=c.y),o.id=u;const h=this.body.functions.createNode(o,T2e);h.containedNodes=e,h.containedEdges=t,h.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[o.id]=h,this._clusterEdges(e,t,o,n.clusterEdgeProperties),o.id=void 0,i===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const t=jn(e);let n=e[t[0]].x,i=e[t[0]].x,a=e[t[0]].y,o=e[t[0]].y,u;for(let c=1;c<t.length;c++)u=e[t[c]],n=u.x<n?u.x:n,i=u.x>i?u.x:i,a=u.y<a?u.y:a,o=u.y>o?u.y:o;return{x:.5*(n+i),y:.5*(a+o)}}openCluster(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const i=this.body.nodes[e];if(i===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(i.isCluster!==!0||i.containedNodes===void 0||i.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const a=this.findNode(e),o=Lr(a).call(a,e)-1;if(o>=0){const f=a[o];this.body.nodes[f]._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}const u=i.containedNodes,c=i.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const f={},v={x:i.x,y:i.y};for(const g in u)if(Object.prototype.hasOwnProperty.call(u,g)){const _=this.body.nodes[g];f[g]={x:_.x,y:_.y}}const y=t.releaseFunction(v,f);for(const g in u)if(Object.prototype.hasOwnProperty.call(u,g)){const _=this.body.nodes[g];y[g]!==void 0&&(_.x=y[g].x===void 0?i.x:y[g].x,_.y=y[g].y===void 0?i.y:y[g].y)}}else cr(u,function(f){f.options.fixed.x===!1&&(f.x=i.x),f.options.fixed.y===!1&&(f.y=i.y)});for(const f in u)if(Object.prototype.hasOwnProperty.call(u,f)){const v=this.body.nodes[f];v.vx=i.vx,v.vy=i.vy,v.setOptions({physics:!0}),delete this.clusteredNodes[f]}const h=[];for(let f=0;f<i.edges.length;f++)h.push(i.edges[f]);for(let f=0;f<h.length;f++){const v=h[f],y=this._getConnectedId(v,e),g=this.clusteredNodes[y];for(let _=0;_<v.clusteringEdgeReplacingIds.length;_++){const E=v.clusteringEdgeReplacingIds[_],A=this.body.edges[E];if(A!==void 0)if(g!==void 0){const T=this.body.nodes[g.clusterId];T.containedEdges[A.id]=A,delete c[A.id];let C=A.fromId,N=A.toId;A.toId==y?N=g.clusterId:C=g.clusterId,this._createClusteredEdge(C,N,A,T.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(A)}v.remove()}for(const f in c)Object.prototype.hasOwnProperty.call(c,f)&&this._restoreEdge(c[f]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const t=[];if(this.isCluster(e)===!0){const n=this.body.nodes[e].containedNodes;for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.push(this.body.nodes[i].id)}return t}findNode(e){const t=[];let i=0,a;for(;this.clusteredNodes[e]!==void 0&&i<100;){if(a=this.body.nodes[e],a===void 0)return[];t.push(a.id),e=this.clusteredNodes[e].clusterId,i++}return a=this.body.nodes[e],a===void 0?[]:(t.push(a.id),Ed(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}updateEdge(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const n=this.getClusteredEdges(e);for(let i=0;i<n.length;i++)this.body.edges[n[i]].setOptions(t);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const t=[];let i=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&i<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,i++;return Ed(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const t=[e],n=[],i=[],a=100;let o=0;for(;t.length>0&&o<a;){const u=t.pop();if(u===void 0)continue;const c=this.body.edges[u];if(c===void 0)continue;o++;const h=c.clusteringEdgeReplacingIds;if(h===void 0)i.push(u);else for(let f=0;f<h.length;++f){const v=h[f];Lr(t).call(t,h)!==-1||Lr(n).call(n,h)!==-1||t.push(v)}n.push(u)}return i}_getConnectedId(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}_getHubSize(){let e=0,t=0,n=0,i=0;for(let c=0;c<this.body.nodeIndices.length;c++){const h=this.body.nodes[this.body.nodeIndices[c]];h.edges.length>i&&(i=h.edges.length),e+=h.edges.length,t+=Math.pow(h.edges.length,2),n+=1}e=e/n,t=t/n;const a=t-Math.pow(e,2),o=Math.sqrt(a);let u=Math.floor(e+2*o);return u>i&&(u=i),u}_createClusteredEdge(e,t,n,i,a){const o=ma.cloneOptions(n,"edge");rn(o,i),o.from=e,o.to=t,o.id="clusterEdge:"+Cv(),a!==void 0&&rn(o,a);const u=this.body.functions.createEdge(o);return u.clusteringEdgeReplacingIds=[n.id],u.connect(),this.body.edges[u.id]=u,u}_clusterEdges(e,t,n,i){if(t instanceof Rc){const a=t,o={};o[a.id]=a,t=o}if(e instanceof gn){const a=e,o={};o[a.id]=a,e=o}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");i===void 0&&(i=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,i);for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&this.body.edges[a]!==void 0){const o=this.body.edges[a];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(this.clusteredNodes[a]={clusterId:n.id,node:this.body.nodes[a]},this.body.nodes[a].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}_filter(e,t){const n=[];return cr(e,i=>{t(i)&&n.push(i)}),n}_updateState(){let e;const t=[],n={},i=c=>{cr(this.body.nodes,h=>{h.isCluster===!0&&c(h)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}i(function(c){for(let h=0;h<t.length;h++)delete c.containedNodes[t[h]]});for(let c=0;c<t.length;c++)delete this.clusteredNodes[t[c]];cr(this.clusteredEdges,c=>{const h=this.body.edges[c];(h===void 0||!h.endPointsValid())&&(n[c]=c)}),i(function(c){cr(c.containedEdges,(h,f)=>{!h.endPointsValid()&&!n[f]&&(n[f]=f)})}),cr(this.body.edges,(c,h)=>{let f=!0;const v=c.clusteringEdgeReplacingIds;if(v!==void 0){let y=0;cr(v,g=>{const _=this.body.edges[g];_!==void 0&&_.endPointsValid()&&(y+=1)}),f=y>0}(!c.endPointsValid()||!f)&&(n[h]=h)}),i(c=>{cr(n,h=>{delete c.containedEdges[h],cr(c.edges,(f,v)=>{if(f.id===h){c.edges[v]=null;return}f.clusteringEdgeReplacingIds=this._filter(f.clusteringEdgeReplacingIds,function(y){return!n[y]})}),c.edges=this._filter(c.edges,function(f){return f!==null})})}),cr(n,c=>{delete this.clusteredEdges[c]}),cr(n,c=>{delete this.body.edges[c]});const a=jn(this.body.edges);cr(a,c=>{const h=this.body.edges[c],f=this._isClusteredNode(h.fromId)||this._isClusteredNode(h.toId);if(f!==this._isClusteredEdge(h.id))if(f){const v=this._getClusterNodeForNode(h.fromId);v!==void 0&&this._clusterEdges(this.body.nodes[h.fromId],h,v);const y=this._getClusterNodeForNode(h.toId);y!==void 0&&this._clusterEdges(this.body.nodes[h.toId],h,y)}else delete this._clusterEdges[c],this._restoreEdge(h)});let o=!1,u=!0;for(;u;){const c=[];i(function(h){const f=jn(h.containedNodes).length,v=h.options.allowSingleNodeCluster===!0;(v&&f<1||!v&&f<2)&&c.push(h.id)});for(let h=0;h<c.length;++h)this.openCluster(c[h],{},!1);u=c.length>0,o=o||u}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class A2e{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Jn(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=uu(()=>{var t;this.zooming=!1,Ze(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",Ze(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&pp(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(Ze(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const n=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,i,a),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(n,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,i,a)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let n;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n=t[i],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.nodes,i=this.body.nodeIndices;let a;const o=[],u=[],c=20,h=this.canvas.DOMtoCanvas({x:-c,y:-c}),f=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+c,y:this.canvas.frame.canvas.clientHeight+c}),v={top:h.y,left:h.x,bottom:f.y,right:f.x},y=[];for(let A=0;A<i.length;A++)if(a=n[i[A]],a.hover)u.push(i[A]);else if(a.isSelected())o.push(i[A]);else if(t===!0){const T=a.draw(e);T.drawExternalLabel!=null&&y.push(T.drawExternalLabel)}else if(a.isBoundingBoxOverlappingWith(v)===!0){const T=a.draw(e);T.drawExternalLabel!=null&&y.push(T.drawExternalLabel)}else a.updateBoundingBox(e,a.selected);let g;const _=o.length,E=u.length;for(g=0;g<_;g++){a=n[o[g]];const A=a.draw(e);A.drawExternalLabel!=null&&y.push(A.drawExternalLabel)}for(g=0;g<E;g++){a=n[u[g]];const A=a.draw(e);A.drawExternalLabel!=null&&y.push(A.drawExternalLabel)}return{drawExternalLabels:()=>{for(const A of y)A()}}}_drawEdges(e){const t=this.body.edges,n=this.body.edgeIndices;for(let i=0;i<n.length;i++){const a=t[n[i]];a.connected===!0&&a.draw(e)}}_drawArrows(e){const t=this.body.edges,n=this.body.edgeIndices;for(let i=0;i<n.length;i++){const a=t[n[i]];a.connected===!0&&a.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}var zT,GW;function R2e(){if(GW)return zT;GW=1,XX();var r=Br();return zT=r.setInterval,zT}var UT,VW;function C2e(){return VW||(VW=1,UT=R2e()),UT}var k2e=C2e(),N2e=Jt(k2e);function L1(r,e){e.inputHandler=function(t){t.isFirst&&e(t)},r.on("hammer.input",e.inputHandler)}function GQ(r,e){return e.inputHandler=function(t){t.isFinal&&e(t)},r.on("hammer.input",e.inputHandler)}class I2e{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Jn(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",t=>{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",Ze(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&pp(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const i=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:a}=this;i.observe(a),this._cleanupCallbacks.push(()=>{i.unobserve(a)})}else{const i=N2e(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(i)})}const n=Ze(t=this._onResize).call(t,this);window.addEventListener("resize",n),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",n)})}}_cleanUp(){var e,t,n;Kr(e=Ed(t=lu(n=this._cleanupCallbacks).call(n,0)).call(t)).call(e,i=>{try{i()}catch(a){console.error(a)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e!=1?n=this.cameraState.scale*e:t!=1&&(n=this.cameraState.scale*t),this.body.view.scale=n;const i=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),a={x:i.x-this.cameraState.position.x,y:i.y-this.cameraState.position.y};this.body.view.translation.x+=a.x*this.body.view.scale,this.body.view.translation.y+=a.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Lr(e).call(e,"%")!==-1||Lr(e).call(e,"px")!==-1)return e;if(Lr(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new _f(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:_f.DIRECTION_ALL}),L1(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new _f(this.frame),GQ(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let n=!1;const i=this.frame.canvas.width,a=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{const u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),c=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==c)&&this._getCameraState(o),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,n=!0),this.frame.canvas.height!==c&&(this.frame.canvas.height=c,n=!0)}return n===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(i/this.pixelRatio),oldHeight:Math.round(a/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function P2e(r,e){const t=Jn({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!Mn(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class j2e{constructor(e,t){var n,i;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",Ze(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",Ze(i=this.releaseNode).call(i,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=P2e(e,this.body.nodeIndices);const n=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;let a,o;if(n===0||i===0)o=1,a=ma.getRange(this.body.nodes,e.nodes);else if(t===!0){let h=0;for(const y in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,y)&&this.body.nodes[y].predefinedPosition===!0&&(h+=1);if(h>.5*this.body.nodeIndices.length){this.fit(e,!1);return}a=ma.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const v=Math.min(n/600,i/600);o*=v}else{this.body.emitter.emit("_resizeNodes"),a=ma.getRange(this.body.nodes,e.nodes);const h=Math.abs(a.maxX-a.minX)*1.1,f=Math.abs(a.maxY-a.minY)*1.1,v=n/h,y=i/f;o=v<=y?v:y}o>e.maxZoomLevel?o=e.maxZoomLevel:o<e.minZoomLevel&&(o=e.minZoomLevel);const c={position:ma.findCenter(a),scale:o,animation:e.animation};this.moveTo(c)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=n,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!wd(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!wd(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!wd(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!wd(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var i;this.viewFunction=Ze(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var a;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=Ze(a=this._transitionRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},i=this.body.view.translation,a={x:i.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:i.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=a}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=z1e[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=Ze(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function YW(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,n={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var u=function(f){h(f,"keydown")},c=function(f){h(f,"keyup")},h=function(f,v){if(i[v][f.keyCode]!==void 0){for(var y=i[v][f.keyCode],g=0;g<y.length;g++)(y[g].shift===void 0||y[g].shift==!0&&f.shiftKey==!0||y[g].shift==!1&&f.shiftKey==!1)&&y[g].fn(f);e==!0&&f.preventDefault()}};return n.bind=function(f,v,y){if(y===void 0&&(y="keydown"),a[f]===void 0)throw new Error("unsupported key: "+f);i[y][a[f].code]===void 0&&(i[y][a[f].code]=[]),i[y][a[f].code].push({fn:v,shift:a[f].shift})},n.bindAll=function(f,v){v===void 0&&(v="keydown");for(var y in a)a.hasOwnProperty(y)&&n.bind(y,f,v)},n.getKey=function(f){for(var v in a)if(a.hasOwnProperty(v)){if(f.shiftKey==!0&&a[v].shift==!0&&f.keyCode==a[v].code)return v;if(f.shiftKey==!1&&a[v].shift==!1&&f.keyCode==a[v].code)return v;if(f.keyCode==a[v].code&&v=="shift")return v}return"unknown key, currently not supported"},n.unbind=function(f,v,y){if(y===void 0&&(y="keydown"),a[f]===void 0)throw new Error("unsupported key: "+f);if(v!==void 0){var g=[],_=i[y][a[f].code];if(_!==void 0)for(var E=0;E<_.length;E++)_[E].fn==v&&_[E].shift==a[f].shift||g.push(i[y][a[f].code][E]);i[y][a[f].code]=g}else i[y][a[f].code]=[]},n.reset=function(){i={keydown:{},keyup:{}}},n.destroy=function(){i={keydown:{},keyup:{}},t.removeEventListener("keydown",u,!0),t.removeEventListener("keyup",c,!0)},t.addEventListener("keydown",u,!0),t.addEventListener("keyup",c,!0),n}class M2e{constructor(e,t){this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};const e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],t=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let o=0;o<e.length;o++){this.navigationDOM[e[o]]=document.createElement("div"),this.navigationDOM[e[o]].className="vis-button vis-"+e[o],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[o]]);const u=new _f(this.navigationDOM[e[o]]);if(t[o]==="_fit"){var n;L1(u,Ze(n=this._fit).call(n,this))}else{var i;L1(u,Ze(i=this.bindToRedraw).call(i,this,t[o]))}this.navigationHammers.push(u)}const a=new _f(this.canvas.frame);GQ(a,()=>{this._stopMovement()}),this.navigationHammers.push(a),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=Ze(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,i=t/e,a=(1-i)*this.canvas.canvasViewCenter.x+n.x*i,o=(1-i)*this.canvas.canvasViewCenter.y+n.y*i;this.body.view.scale=t,this.body.view.translation={x:a,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,i=t/e,a=(1-i)*this.canvas.canvasViewCenter.x+n.x*i,o=(1-i)*this.canvas.canvasViewCenter.y+n.y*i;this.body.view.scale=t,this.body.view.translation={x:a,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=YW({container:window,preventDefault:!0}):this.keycharm=YW({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,n,i,a,o,u,c,h,f,v,y,g,_,E,A,T,C,N,k,j,W,G,D;Ze(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),Ze(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),Ze(n=this.keycharm).call(n,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),Ze(i=this.keycharm).call(i,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),Ze(a=this.keycharm).call(a,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),Ze(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),Ze(u=this.keycharm).call(u,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),Ze(c=this.keycharm).call(c,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),Ze(h=this.keycharm).call(h,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),Ze(f=this.keycharm).call(f,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),Ze(v=this.keycharm).call(v,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),Ze(y=this.keycharm).call(y,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),Ze(g=this.keycharm).call(g,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),Ze(_=this.keycharm).call(_,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),Ze(E=this.keycharm).call(E,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),Ze(A=this.keycharm).call(A,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),Ze(T=this.keycharm).call(T,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),Ze(C=this.keycharm).call(C,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),Ze(N=this.keycharm).call(N,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),Ze(k=this.keycharm).call(k,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),Ze(j=this.keycharm).call(j,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),Ze(W=this.keycharm).call(W,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),Ze(G=this.keycharm).call(G,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),Ze(D=this.keycharm).call(D,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class D2e{constructor(e,t,n){var i,a,o,u,c,h,f,v,y,g,_,E,A;this.body=e,this.canvas=t,this.selectionHandler=n,this.navigationHandler=new M2e(e,t),this.body.eventListeners.onTap=Ze(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=Ze(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=Ze(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=Ze(u=this.onHold).call(u,this),this.body.eventListeners.onDragStart=Ze(c=this.onDragStart).call(c,this),this.body.eventListeners.onDrag=Ze(h=this.onDrag).call(h,this),this.body.eventListeners.onDragEnd=Ze(f=this.onDragEnd).call(f,this),this.body.eventListeners.onMouseWheel=Ze(v=this.onMouseWheel).call(v,this),this.body.eventListeners.onPinch=Ze(y=this.onPinch).call(y,this),this.body.eventListeners.onMouseMove=Ze(g=this.onMouseMove).call(g,this),this.body.eventListeners.onRelease=Ze(_=this.onRelease).call(_,this),this.body.eventListeners.onContext=Ze(E=this.onContext).call(E,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=Ze(A=this.getPointer).call(A,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Jn(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(M1(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),Ns(this.options,e,"keyboard"),e.tooltip&&(Jn(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=f6(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-L1e(this.canvas.frame.canvas),y:e.y-$1e(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const n=function(i,a){const o=[];for(let u=0;u<i.length;u++){const c=i[u];Lr(a).call(a,c)===-1&&o.push(c)}return o};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Jn({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);for(const n of this.selectionHandler.getSelectedNodes()){const i={id:n.id,node:n,x:n.x,y:n.y,xFixed:n.options.fixed.x,yFixed:n.options.fixed.y};n.options.fixed.x=!0,n.options.fixed.y=!0,this.drag.selection.push(i)}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit("unlockNode");const t=this.getPointer(e.center),n=this.drag.selection;if(n&&n.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,t);const i=t.x-this.drag.pointer.x,a=t.y-this.drag.pointer.y;Kr(n).call(n,o=>{const u=o.node;o.xFixed===!1&&(u.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+i)),o.yFixed===!1&&(u.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+a))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const i=t.x-this.drag.pointer.x,a=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+a},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const n=this.body.selectionBox.position,i={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},a=Da(t=this.body.nodeIndices).call(t,u=>{const c=this.body.nodes[u];return c.x>=i.minX&&c.x<=i.maxX&&c.y>=i.minY&&c.y<=i.maxY});Kr(a).call(a,u=>this.selectionHandler.selectObject(this.body.nodes[u]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const n=this.drag.selection;n&&n.length?(Kr(n).call(n,function(i){i.node.options.fixed.x=i.xFixed,i.node.options.fixed.y=i.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const n=this.pinch.scale*e.scale;this.zoom(n,t)}zoom(e,t){if(this.options.zoomView===!0){const n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let i;this.drag!==void 0&&this.drag.dragging===!0&&(i=this.canvas.DOMtoCanvas(this.drag.pointer));const a=this.body.view.translation,o=e/n,u=(1-o)*t.x+a.x*o,c=(1-o)*t.y+a.y*o;if(this.body.view.scale=e,this.body.view.translation={x:u,y:c},i!=null){const h=this.canvas.canvasToDOM(i);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);const n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,n)}e.preventDefault()}}onMouseMove(e){const t=this.getPointer({x:e.clientX,y:e.clientY});let n=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(n=!0,this.popup.setPosition(t.x+3,t.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),n===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=uu(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),i={left:t,top:n,right:t,bottom:n},a=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,u="node";if(this.popupObj===void 0){const c=this.body.nodeIndices,h=this.body.nodes;let f;const v=[];for(let y=0;y<c.length;y++)f=h[c[y]],f.isOverlappingWith(i)===!0&&(o=!0,f.getTitle()!==void 0&&v.push(c[y]));v.length>0&&(this.popupObj=h[v[v.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const c=this.body.edgeIndices,h=this.body.edges;let f;const v=[];for(let y=0;y<c.length;y++)f=h[c[y]],f.isOverlappingWith(i)===!0&&f.connected===!0&&f.getTitle()!==void 0&&v.push(c[y]);v.length>0&&(this.popupObj=h[v[v.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==a&&(this.popup===void 0&&(this.popup=new X1e(this.canvas.frame)),this.popup.popupTargetType=u,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){const i=this.selectionHandler.getNodeAt(e);n=i===void 0?!1:i.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var KW={},XW={},QW;function q2e(){if(QW)return XW;QW=1;var r=UA(),e=MQ();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),XW}var ZW;function L2e(){return ZW||(ZW=1,q2e()),KW}var JW={},HT,eG;function nh(){if(eG)return HT;eG=1;var r=rp(),e=TypeError;return HT=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},HT}var WT,tG;function ih(){if(tG)return WT;tG=1;var r=fs(),e=DQ(),t=r("Set"),n=t.prototype;return WT={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n},WT}var GT,rG;function ah(){if(rG)return GT;rG=1;var r=za();return GT=function(e,t,n){for(var i=n?e:e.iterator,a=e.next,o,u;!(o=r(a,i)).done;)if(u=t(o.value),u!==void 0)return u},GT}var VT,nG;function Dg(){if(nG)return VT;nG=1;var r=ah();return VT=function(e,t,n){return n?r(e.keys(),t,!0):e.forEach(t)},VT}var YT,iG;function XA(){if(iG)return YT;iG=1;var r=ih(),e=Dg(),t=r.Set,n=r.add;return YT=function(i){var a=new t;return e(i,function(o){n(a,o)}),a},YT}var KT,aG;function qg(){return aG||(aG=1,KT=function(r){return r.size}),KT}var XT,sG;function $2e(){return sG||(sG=1,XT=function(r){return{iterator:r,next:r.next,done:!1}}),XT}var QT,oG;function sh(){if(oG)return QT;oG=1;var r=bu(),e=ml(),t=za(),n=sp(),i=$2e(),a="Invalid size",o=RangeError,u=TypeError,c=Math.max,h=function(f,v){this.set=f,this.size=c(v,0),this.has=r(f.has),this.keys=r(f.keys)};return h.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(f){return t(this.has,this.set,f)}},QT=function(f){e(f);var v=+f.size;if(v!==v)throw new u(a);var y=n(v);if(y<0)throw new o(a);return new h(f,y)},QT}var ZT,lG;function B2e(){if(lG)return ZT;lG=1;var r=nh(),e=ih(),t=XA(),n=qg(),i=sh(),a=Dg(),o=ah(),u=e.has,c=e.remove;return ZT=function(f){var v=r(this),y=i(f),g=t(v);return n(v)<=y.size?a(v,function(_){y.includes(_)&&c(g,_)}):o(y.getIterator(),function(_){u(g,_)&&c(g,_)}),g},ZT}var JT,uG;function oh(){return uG||(uG=1,JT=function(){return!1}),JT}var cG;function F2e(){if(cG)return JW;cG=1;var r=Nt(),e=B2e(),t=mr(),n=oh(),i=!n("difference",function(o){return o.size===0}),a=i||t(function(){var o={size:1,has:function(){return!0},keys:function(){var c=0;return{next:function(){var h=c++>1;return u.has(1)&&u.clear(),{done:h,value:2}}}}},u=new Set([1,2,3,4]);return u.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:a},{difference:e}),JW}var dG={},eO,hG;function z2e(){if(hG)return eO;hG=1;var r=nh(),e=ih(),t=qg(),n=sh(),i=Dg(),a=ah(),o=e.Set,u=e.add,c=e.has;return eO=function(f){var v=r(this),y=n(f),g=new o;return t(v)>y.size?a(y.getIterator(),function(_){c(v,_)&&u(g,_)}):i(v,function(_){y.includes(_)&&u(g,_)}),g},eO}var fG;function U2e(){if(fG)return dG;fG=1;var r=Nt(),e=mr(),t=z2e(),n=oh(),i=!n("intersection",function(a){return a.size===2&&a.has(1)&&a.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),dG}var pG={},tO,vG;function H2e(){if(vG)return tO;vG=1;var r=nh(),e=ih().has,t=qg(),n=sh(),i=Dg(),a=ah(),o=FA();return tO=function(c){var h=r(this),f=n(c);if(t(h)<=f.size)return i(h,function(y){if(f.includes(y))return!1},!0)!==!1;var v=f.getIterator();return a(v,function(y){if(e(h,y))return o(v,"normal",!1)})!==!1},tO}var gG;function W2e(){if(gG)return pG;gG=1;var r=Nt(),e=H2e(),t=oh(),n=!t("isDisjointFrom",function(i){return!i});return r({target:"Set",proto:!0,real:!0,forced:n},{isDisjointFrom:e}),pG}var mG={},rO,yG;function G2e(){if(yG)return rO;yG=1;var r=nh(),e=qg(),t=Dg(),n=sh();return rO=function(a){var o=r(this),u=n(a);return e(o)>u.size?!1:t(o,function(c){if(!u.includes(c))return!1},!0)!==!1},rO}var bG;function V2e(){if(bG)return mG;bG=1;var r=Nt(),e=G2e(),t=oh(),n=!t("isSubsetOf",function(i){return i});return r({target:"Set",proto:!0,real:!0,forced:n},{isSubsetOf:e}),mG}var wG={},nO,xG;function Y2e(){if(xG)return nO;xG=1;var r=nh(),e=ih().has,t=qg(),n=sh(),i=ah(),a=FA();return nO=function(u){var c=r(this),h=n(u);if(t(c)<h.size)return!1;var f=h.getIterator();return i(f,function(v){if(!e(c,v))return a(f,"normal",!1)})!==!1},nO}var _G;function K2e(){if(_G)return wG;_G=1;var r=Nt(),e=Y2e(),t=oh(),n=!t("isSupersetOf",function(i){return!i});return r({target:"Set",proto:!0,real:!0,forced:n},{isSupersetOf:e}),wG}var SG={},iO,EG;function X2e(){if(EG)return iO;EG=1;var r=nh(),e=ih(),t=XA(),n=sh(),i=ah(),a=e.add,o=e.has,u=e.remove;return iO=function(h){var f=r(this),v=n(h).getIterator(),y=t(f);return i(v,function(g){o(f,g)?u(y,g):a(y,g)}),y},iO}var aO,TG;function VQ(){return TG||(TG=1,aO=function(r){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},n=e[r](t);return n.size===1&&n.values().next().value===4}catch{return!1}}),aO}var OG;function Q2e(){if(OG)return SG;OG=1;var r=Nt(),e=X2e(),t=VQ(),n=oh(),i=!n("symmetricDifference")||!t("symmetricDifference");return r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),SG}var AG={},sO,RG;function Z2e(){if(RG)return sO;RG=1;var r=nh(),e=ih().add,t=XA(),n=sh(),i=ah();return sO=function(o){var u=r(this),c=n(o).getIterator(),h=t(u);return i(c,function(f){e(h,f)}),h},sO}var CG;function J2e(){if(CG)return AG;CG=1;var r=Nt(),e=Z2e(),t=VQ(),n=oh(),i=!n("union")||!t("union");return r({target:"Set",proto:!0,real:!0,forced:i},{union:e}),AG}var oO,kG;function e5e(){if(kG)return oO;kG=1,cp(),L2e(),F2e(),U2e(),W2e(),V2e(),K2e(),Q2e(),J2e(),WA();var r=Br();return oO=r.Set,oO}var lO,NG;function t5e(){if(NG)return lO;NG=1;var r=e5e();return dp(),lO=r,lO}var uO,IG;function r5e(){return IG||(IG=1,uO=t5e()),uO}var n5e=r5e(),mc=Jt(n5e),PG={},jG={},cO,MG;function i5e(){if(MG)return cO;MG=1;var r=br(),e=HA(),t=xy().getWeakData,n=zA(),i=ml(),a=Jf(),o=ji(),u=_y(),c=$c(),h=Xi(),f=eh(),v=f.set,y=f.getterFor,g=c.find,_=c.findIndex,E=r([].splice),A=0,T=function(k){return k.frozen||(k.frozen=new C)},C=function(){this.entries=[]},N=function(k,j){return g(k.entries,function(W){return W[0]===j})};return C.prototype={get:function(k){var j=N(this,k);if(j)return j[1]},has:function(k){return!!N(this,k)},set:function(k,j){var W=N(this,k);W?W[1]=j:this.entries.push([k,j])},delete:function(k){var j=_(this.entries,function(W){return W[0]===k});return~j&&E(this.entries,j,1),!!~j}},cO={getConstructor:function(k,j,W,G){var D=k(function(q,z){n(q,M),v(q,{type:j,id:A++,frozen:null}),a(z)||u(z,q[G],{that:q,AS_ENTRIES:W})}),M=D.prototype,U=y(j),I=function(q,z,Q){var ce=U(q),re=t(i(z),!0);return re===!0?T(ce).set(z,Q):re[ce.id]=Q,q};return e(M,{delete:function(q){var z=U(this);if(!o(q))return!1;var Q=t(q);return Q===!0?T(z).delete(q):Q&&h(Q,z.id)&&delete Q[z.id]},has:function(z){var Q=U(this);if(!o(z))return!1;var ce=t(z);return ce===!0?T(Q).has(z):ce&&h(ce,Q.id)}}),e(M,W?{get:function(z){var Q=U(this);if(o(z)){var ce=t(z);if(ce===!0)return T(Q).get(z);if(ce)return ce[Q.id]}},set:function(z,Q){return I(this,z,Q)}}:{add:function(z){return I(this,z,!0)}}),D}},cO}var DG;function a5e(){if(DG)return jG;DG=1;var r=PQ(),e=mn(),t=br(),n=HA(),i=xy(),a=UA(),o=i5e(),u=ji(),c=eh().enforce,h=mr(),f=MX(),v=Object,y=Array.isArray,g=v.isExtensible,_=v.isFrozen,E=v.isSealed,A=v.freeze,T=v.seal,C=!e.ActiveXObject&&"ActiveXObject"in e,N,k=function(q){return function(){return q(this,arguments.length?arguments[0]:void 0)}},j=a("WeakMap",k,o),W=j.prototype,G=t(W.set),D=function(){return r&&h(function(){var q=A([]);return G(new j,q,1),!_(q)})};if(f)if(C){N=o.getConstructor(k,"WeakMap",!0),i.enable();var M=t(W.delete),U=t(W.has),I=t(W.get);n(W,{delete:function(q){if(u(q)&&!g(q)){var z=c(this);return z.frozen||(z.frozen=new N),M(this,q)||z.frozen.delete(q)}return M(this,q)},has:function(z){if(u(z)&&!g(z)){var Q=c(this);return Q.frozen||(Q.frozen=new N),U(this,z)||Q.frozen.has(z)}return U(this,z)},get:function(z){if(u(z)&&!g(z)){var Q=c(this);return Q.frozen||(Q.frozen=new N),U(this,z)?I(this,z):Q.frozen.get(z)}return I(this,z)},set:function(z,Q){if(u(z)&&!g(z)){var ce=c(this);ce.frozen||(ce.frozen=new N),U(this,z)?G(this,z,Q):ce.frozen.set(z,Q)}else G(this,z,Q);return this}})}else D()&&n(W,{set:function(z,Q){var ce;return y(z)&&(_(z)?ce=A:E(z)&&(ce=T)),G(this,z,Q),ce&&ce(z),this}});return jG}var qG;function s5e(){return qG||(qG=1,a5e()),PG}var dO,LG;function o5e(){if(LG)return dO;LG=1,cp(),s5e();var r=Br();return dO=r.WeakMap,dO}var hO,$G;function l5e(){if($G)return hO;$G=1;var r=o5e();return dp(),hO=r,hO}var fO,BG;function u5e(){return BG||(BG=1,fO=l5e()),fO}var c5e=u5e(),Lg=Jt(c5e);function kv(r,e,t){d5e(r,e),e.set(r,t)}function d5e(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b6(r,e,t){return r.set(YQ(r,e),t),t}function tn(r,e){return r.get(YQ(r,e))}function YQ(r,e,t){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function FG(r,e){const t=new mc;for(const n of e)r.has(n)||t.add(n);return t}var sf=new Lg,go=new Lg;class zG{constructor(){kv(this,sf,new mc),kv(this,go,new mc)}get size(){return tn(go,this).size}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const i of t)tn(go,this).add(i)}delete(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const i of t)tn(go,this).delete(i)}clear(){tn(go,this).clear()}getSelection(){return[...tn(go,this)]}getChanges(){return{added:[...FG(tn(sf,this),tn(go,this))],deleted:[...FG(tn(go,this),tn(sf,this))],previous:[...new mc(tn(sf,this))],current:[...new mc(tn(go,this))]}}commit(){const e=this.getChanges();b6(sf,this,tn(go,this)),b6(go,this,new mc(tn(sf,this)));for(const t of e.added)t.select();for(const t of e.deleted)t.unselect();return e}}var dd=new Lg,hd=new Lg,pO=new Lg;class h5e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};kv(this,dd,new zG),kv(this,hd,new zG),kv(this,pO,void 0),b6(pO,this,e)}get sizeNodes(){return tn(dd,this).size}get sizeEdges(){return tn(hd,this).size}getNodes(){return tn(dd,this).getSelection()}getEdges(){return tn(hd,this).getSelection()}addNodes(){tn(dd,this).add(...arguments)}addEdges(){tn(hd,this).add(...arguments)}deleteNodes(e){tn(dd,this).delete(e)}deleteEdges(e){tn(hd,this).delete(e)}clear(){tn(dd,this).clear(),tn(hd,this).clear()}commit(){const e={nodes:tn(dd,this).commit(),edges:tn(hd,this).commit()};for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return tn(pO,this).call(this,e,...n),e}}class f5e{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new h5e,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Jn(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&pp(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}generateClickEvent(e,t,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,n);if(a===!0)o.nodes=[],o.edges=[];else{const u=this.getSelection();o.nodes=u.nodes,o.edges=u.edges}i!==void 0&&(o.previousSelection=i),e=="click"&&(o.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof gn?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],n=this.body.nodes;for(let i=0;i<this.body.nodeIndices.length;i++){const a=this.body.nodeIndices[i];n[a].isOverlappingWith(e)&&t.push(a)}return t}_pointerToPositionObject(e){const t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}getNodeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this._pointerToPositionObject(e),i=this._getAllNodesOverlappingWith(n);if(i.length>0)return t===!0?this.body.nodes[i[i.length-1]]:i[i.length-1]}_getEdgesOverlappingWith(e,t){const n=this.body.edges;for(let i=0;i<this.body.edgeIndices.length;i++){const a=this.body.edgeIndices[i];n[a].isOverlappingWith(e)&&t.push(a)}}_getAllEdgesOverlappingWith(e){const t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this.canvas.DOMtoCanvas(e);let i=10,a=null;const o=this.body.edges;for(let u=0;u<this.body.edgeIndices.length;u++){const c=this.body.edgeIndices[u],h=o[c];if(h.connected){const f=h.from.x,v=h.from.y,y=h.to.x,g=h.to.y,_=h.edgeType.getDistanceToEdge(f,v,y,g,n.x,n.y);_<i&&(a=c,i=_)}}if(a!==null)return t===!0?this.body.edges[a]:a}_addToHover(e){e instanceof gn?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof gn?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let t=0;t<e.edges.length;t++){const n=e.edges[t];n.hover=!0,this._addToHover(n)}}emitBlurEvent(e,t,n){const i=this._initBaseEvent(e,t);n.hover===!0&&(n.hover=!1,n instanceof gn?(i.node=n.id,this.body.emitter.emit("blurNode",i)):(i.edge=n.id,this.body.emitter.emit("blurEdge",i)))}emitHoverEvent(e,t,n){const i=this._initBaseEvent(e,t);let a=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),a=!0,n instanceof gn?(i.node=n.id,this.body.emitter.emit("hoverNode",i)):(i.edge=n.id,this.body.emitter.emit("hoverEdge",i))),a}hoverObject(e,t){let n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));let i=!1;for(const a in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,a)&&(n===void 0||n instanceof gn&&n.id!=a||n instanceof Rc)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[a]),delete this.hoverObj.nodes[a],i=!0);for(const a in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,a)&&(i===!0?(this.hoverObj.edges[a].hover=!1,delete this.hoverObj.edges[a]):(n===void 0||n instanceof Rc&&n.id!=a||n instanceof gn&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[a]),delete this.hoverObj.edges[a],i=!0));if(n!==void 0){const a=jn(this.hoverObj.edges).length,o=jn(this.hoverObj.nodes).length,u=n instanceof Rc&&a===0&&o===0,c=n instanceof gn&&a===0&&o===0;(i||u||c)&&(i=this.emitHoverEvent(e,t,n)),n instanceof gn&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}i===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let n=!1;const i=this._selectionAccumulator.commit(),a={nodes:i.nodes.previous,edges:i.edges.previous};i.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,a),n=!0),i.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,a),n=!0),i.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),n=!0),i.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),n=!0),n===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return Nf(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return Nf(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const n of e.nodes){const i=this.body.nodes[n];if(!i)throw new RangeError('Node with id "'+n+'" not found');this.selectObject(i,t.highlightEdges)}if(e.edges)for(const n of e.edges){const i=this.body.edges[n];if(!i)throw new RangeError('Edge with id "'+n+'" not found');this.selectObject(i)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),n=[],i=this.body.nodeIndices,a=this.body.nodes;for(let c=i.length-1;c>=0;c--){const f=a[i[c]].getItemsOnPoint(t);n.push.apply(n,f)}const o=this.body.edgeIndices,u=this.body.edges;for(let c=o.length-1;c>=0;c--){const f=u[o[c]].getItemsOnPoint(t);n.push.apply(n,f)}return n}}var UG={},vO,HG;function p5e(){if(HG)return vO;HG=1;var r=op(),e=Math.floor,t=function(n,i){var a=n.length;if(a<8)for(var o=1,u,c;o<a;){for(c=o,u=n[o];c&&i(n[c-1],u)>0;)n[c]=n[--c];c!==o++&&(n[c]=u)}else for(var h=e(a/2),f=t(r(n,0,h),i),v=t(r(n,h),i),y=f.length,g=v.length,_=0,E=0;_<y||E<g;)n[_+E]=_<y&&E<g?i(f[_],v[E])<=0?f[_++]:v[E++]:_<y?f[_++]:v[E++];return n};return vO=t,vO}var gO,WG;function v5e(){if(WG)return gO;WG=1;var r=ep(),e=r.match(/firefox\/(\d+)/i);return gO=!!e&&+e[1],gO}var mO,GG;function g5e(){if(GG)return mO;GG=1;var r=ep();return mO=/MSIE|Trident/.test(r),mO}var yO,VG;function m5e(){if(VG)return yO;VG=1;var r=ep(),e=r.match(/AppleWebKit\/(\d+)\./);return yO=!!e&&+e[1],yO}var YG;function y5e(){if(YG)return UG;YG=1;var r=Nt(),e=br(),t=bu(),n=ps(),i=wu(),a=GX(),o=Fs(),u=mr(),c=p5e(),h=hp(),f=v5e(),v=g5e(),y=_g(),g=m5e(),_=[],E=e(_.sort),A=e(_.push),T=u(function(){_.sort(void 0)}),C=u(function(){_.sort(null)}),N=h("sort"),k=!u(function(){if(y)return y<70;if(!(f&&f>3)){if(v)return!0;if(g)return g<603;var G="",D,M,U,I;for(D=65;D<76;D++){switch(M=String.fromCharCode(D),D){case 66:case 69:case 70:case 72:U=3;break;case 68:case 71:U=4;break;default:U=2}for(I=0;I<47;I++)_.push({k:M+I,v:U})}for(_.sort(function(q,z){return z.v-q.v}),I=0;I<_.length;I++)M=_[I].k.charAt(0),G.charAt(G.length-1)!==M&&(G+=M);return G!=="DGBEFHACIJK"}}),j=T||!C||!N||!k,W=function(G){return function(D,M){return M===void 0?-1:D===void 0?1:G!==void 0?+G(D,M)||0:o(D)>o(M)?1:-1}};return r({target:"Array",proto:!0,forced:j},{sort:function(D){D!==void 0&&t(D);var M=n(this);if(k)return D===void 0?E(M):E(M,D);var U=[],I=i(M),q,z;for(z=0;z<I;z++)z in M&&A(U,M[z]);for(c(U,W(D)),q=i(U),z=0;z<q;)M[z]=U[z++];for(;z<I;)a(M,z++);return M}}),UG}var bO,KG;function b5e(){if(KG)return bO;KG=1,y5e();var r=Qi();return bO=r("Array","sort"),bO}var wO,XG;function w5e(){if(XG)return wO;XG=1;var r=ni(),e=b5e(),t=Array.prototype;return wO=function(n){var i=n.sort;return n===t||r(t,n)&&i===t.sort?e:i},wO}var xO,QG;function x5e(){if(QG)return xO;QG=1;var r=w5e();return xO=r,xO}var _O,ZG;function _5e(){return ZG||(ZG=1,_O=x5e()),_O}var S5e=_5e(),Ef=Jt(S5e),JG={},SO,eV;function E5e(){if(eV)return SO;eV=1;var r=bu(),e=ps(),t=oy(),n=wu(),i=TypeError,a="Reduce of empty array with no initial value",o=function(u){return function(c,h,f,v){var y=e(c),g=t(y),_=n(y);if(r(h),_===0&&f<2)throw new i(a);var E=u?_-1:0,A=u?-1:1;if(f<2)for(;;){if(E in g){v=g[E],E+=A;break}if(E+=A,u?E<0:_<=E)throw new i(a)}for(;u?E>=0:_>E;E+=A)E in g&&(v=h(v,g[E],E,y));return v}};return SO={left:o(!1),right:o(!0)},SO}var EO,tV;function T5e(){if(tV)return EO;tV=1;var r=YX();return EO=r==="NODE",EO}var rV;function O5e(){if(rV)return JG;rV=1;var r=Nt(),e=E5e().left,t=hp(),n=_g(),i=T5e(),a=!i&&n>79&&n<83,o=a||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(c){var h=arguments.length;return e(this,c,h,h>1?arguments[1]:void 0)}}),JG}var TO,nV;function A5e(){if(nV)return TO;nV=1,O5e();var r=Qi();return TO=r("Array","reduce"),TO}var OO,iV;function R5e(){if(iV)return OO;iV=1;var r=ni(),e=A5e(),t=Array.prototype;return OO=function(n){var i=n.reduce;return n===t||r(t,n)&&i===t.reduce?e:i},OO}var AO,aV;function C5e(){if(aV)return AO;aV=1;var r=R5e();return AO=r,AO}var RO,sV;function k5e(){return sV||(sV=1,RO=C5e()),RO}var N5e=k5e(),KQ=Jt(N5e);class XQ{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class I5e extends XQ{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){Ef(e).call(e,function(t,n){return t.x-n.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class P5e extends XQ{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){Ef(e).call(e,function(t,n){return t.y-n.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var oV={},lV;function j5e(){if(lV)return oV;lV=1;var r=Nt(),e=$c().every,t=hp(),n=t("every");return r({target:"Array",proto:!0,forced:!n},{every:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),oV}var CO,uV;function M5e(){if(uV)return CO;uV=1,j5e();var r=Qi();return CO=r("Array","every"),CO}var kO,cV;function D5e(){if(cV)return kO;cV=1;var r=ni(),e=M5e(),t=Array.prototype;return kO=function(n){var i=n.every;return n===t||r(t,n)&&i===t.every?e:i},kO}var NO,dV;function q5e(){if(dV)return NO;dV=1;var r=D5e();return NO=r,NO}var IO,hV;function L5e(){return hV||(hV=1,IO=q5e()),IO}var $5e=L5e(),QQ=Jt($5e);function B5e(r,e){const t=new mc;return Kr(r).call(r,n=>{var i;Kr(i=n.edges).call(i,a=>{a.connected&&t.add(a)})}),Kr(t).call(t,n=>{const i=n.from.id,a=n.to.id;e[i]==null&&(e[i]=0),(e[a]==null||e[i]>=e[a])&&(e[a]=e[i]+1)}),e}function F5e(r){return ZQ(e=>{var t,n;return QQ(t=Da(n=e.edges).call(n,i=>r.has(i.toId))).call(t,i=>i.to===e)},(e,t)=>t>e,"from",r)}function z5e(r){return ZQ(e=>{var t,n;return QQ(t=Da(n=e.edges).call(n,i=>r.has(i.toId))).call(t,i=>i.from===e)},(e,t)=>t<e,"to",r)}function ZQ(r,e,t,n){var i;const a=Td(null),o=KQ(i=[...zQ(n).call(n)]).call(i,(v,y)=>v+1+y.edges.length,0),u=t+"Id",c=t==="to"?1:-1;for(const[v,y]of n){if(!n.has(v)||!r(y))continue;a[v]=0;const g=[y];let _=0,E;for(;E=g.pop();){var h,f;if(!n.has(v))continue;const A=a[E.id]+c;if(Kr(h=Da(f=E.edges).call(f,T=>T.connected&&T.to!==T.from&&T[t]!==E&&n.has(T.toId)&&n.has(T.fromId))).call(h,T=>{const C=T[u],N=a[C];(N==null||e(A,N))&&(a[C]=A,g.push(T[t]))}),_>o)return B5e(n,a);++_}}return a}class U5e{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},n=i=>{if(t[i]!==void 0)return t[i];let a=this.levels[i];if(this.childrenReference[i]){const o=this.childrenReference[i];if(o.length>0)for(let u=0;u<o.length;u++)a=Math.max(a,n(o[u]))}return t[i]=a,a};return n(e)}levelDownstream(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;const t=new GA;let n=0;const i=Ef(e=[...new mc(ime(this.levels))]).call(e,(a,o)=>a-o);for(const a of i)t.set(a,n++);for(const a in this.levels)Object.prototype.hasOwnProperty.call(this.levels,a)&&(this.levels[a]=t.get(this.levels[a]))}getTreeSize(e,t){let n=1e9,i=-1e9,a=1e9,o=-1e9;for(const u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===t){const c=e[u];n=Math.min(c.x,n),i=Math.max(c.x,i),a=Math.min(c.y,a),o=Math.max(c.y,o)}return{min_x:n,max_x:i,min_y:a,max_y:o}}hasSameParent(e,t){const n=this.parentReference[e.id],i=this.parentReference[t.id];if(n===void 0||i===void 0)return!1;for(let a=0;a<n.length;a++)for(let o=0;o<i.length;o++)if(n[a]==i[o])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return jn(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let n=!1;const i=this.distributionOrdering[t];for(const a in i)if(i[a]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}class H5e{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+N1()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Jn(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("_dataChanged",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const n=this.options.hierarchical,i=n.enabled;if(pp(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Ns(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return i===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),rn(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=wy(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{const i=e.edges.smooth;i.type!==void 0&&i.type!=="dynamic"&&(n=i.type),this.optionsBackup.edges={smooth:{enabled:i.enabled===void 0?!0:i.enabled,type:i.type===void 0?"dynamic":i.type,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}},e.edges.smooth={enabled:i.enabled===void 0?!0:i.enabled,type:n,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let n=0;n<e.length;n++){const i=e[n],a=2*Math.PI*this._rng();i.x===void 0&&(i.x=t*Math.cos(a)),i.y===void 0&&(i.y=t*Math.sin(a))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let t=0;for(let n=0;n<e.length;n++)this.body.nodes[e[n]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let i=0;const a=this.options.clusterThreshold,o={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>a){const c=e.length;for(;e.length>a&&i<=10;){i+=1;const h=e.length;i%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const f=e.length;if(h==f&&i%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*c)})}i>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const u=70;for(let c=0;c<e.length;c++){const h=this.body.nodes[e[c]];h.predefinedPosition===!1&&(h.x+=(.5-this._rng())*u,h.y+=(.5-this._rng())*u)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=ma.getRangeCore(this.body.nodes,this.body.nodeIndices),t=ma.findCenter(e);for(let n=0;n<this.body.nodeIndices.length;n++){const i=this.body.nodes[this.body.nodeIndices[n]];i.x-=t.x,i.y-=t.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,t,n=!1,i=!1;this.lastNodeOnLevel={},this.hierarchical=new U5e;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(n=!0,this.hierarchical.levels[t]=e.options.level):i=!0);if(i===!0&&n===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(i===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const a=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(a),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const n={},i=()=>{const T=o();let C=0;for(let N=0;N<T.length-1;N++){const k=T[N].max-T[N+1].min;C+=k+this.options.hierarchical.treeSpacing,a(N+1,C)}},a=(T,C)=>{const N=this.hierarchical.trees;for(const k in N)Object.prototype.hasOwnProperty.call(N,k)&&N[k]===T&&this.direction.shift(k,C)},o=()=>{const T=[];for(let C=0;C<this.hierarchical.numTrees();C++)T.push(this.direction.getTreeSize(C));return T},u=(T,C)=>{if(!C[T.id]&&(C[T.id]=!0,this.hierarchical.childrenReference[T.id])){const N=this.hierarchical.childrenReference[T.id];if(N.length>0)for(let k=0;k<N.length;k++)u(this.body.nodes[N[k]],C)}},c=function(T){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,N=1e9,k=1e9,j=1e9,W=-1e9;for(const G in T)if(Object.prototype.hasOwnProperty.call(T,G)){const D=e.body.nodes[G],M=e.hierarchical.levels[D.id],U=e.direction.getPosition(D),[I,q]=e._getSpaceAroundNode(D,T);N=Math.min(I,N),k=Math.min(q,k),M<=C&&(j=Math.min(U,j),W=Math.max(U,W))}return[j,W,N,k]},h=(T,C)=>{const N=this.hierarchical.getMaxLevel(T.id),k=this.hierarchical.getMaxLevel(C.id);return Math.min(N,k)},f=(T,C,N)=>{const k=this.hierarchical;for(let j=0;j<C.length;j++){const W=C[j],G=k.distributionOrdering[W];if(G.length>1)for(let D=0;D<G.length-1;D++){const M=G[D],U=G[D+1];k.hasSameParent(M,U)&&k.inSameSubNetwork(M,U)&&T(M,U,N)}}},v=function(T,C){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const k=e.direction.getPosition(T),j=e.direction.getPosition(C),W=Math.abs(j-k),G=e.options.hierarchical.nodeSpacing;if(W>G){const D={},M={};u(T,D),u(C,M);const U=h(T,C),I=c(D,U),q=c(M,U),z=I[1],Q=q[0],ce=q[2];if(Math.abs(z-Q)>G){let J=z-Q+G;J<-ce+G&&(J=-ce+G),J<0&&(e._shiftBlock(C.id,J),t=!0,N===!0&&e._centerParent(C))}}},y=(T,C)=>{const N=C.id,k=C.edges,j=this.hierarchical.levels[C.id],W=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,G={},D=[];for(let ce=0;ce<k.length;ce++){const re=k[ce];if(re.toId!=re.fromId){const J=re.toId==N?re.from:re.to;G[k[ce].id]=J,this.hierarchical.levels[J.id]<j&&D.push(re)}}const M=(ce,re)=>{let J=0;for(let le=0;le<re.length;le++)if(G[re[le].id]!==void 0){const ye=this.direction.getPosition(G[re[le].id])-ce;J+=ye/Math.sqrt(ye*ye+W)}return J},U=(ce,re)=>{let J=0;for(let le=0;le<re.length;le++)if(G[re[le].id]!==void 0){const ye=this.direction.getPosition(G[re[le].id])-ce;J-=W*Math.pow(ye*ye+W,-1.5)}return J},I=(ce,re)=>{let J=this.direction.getPosition(C);const le={};for(let ye=0;ye<ce;ye++){const Z=M(J,re),oe=U(J,re),L=40,Y=Math.max(-L,Math.min(L,Math.round(Z/oe)));if(J=J-Y,le[J]!==void 0)break;le[J]=ye}return J},q=ce=>{const re=this.direction.getPosition(C);if(n[C.id]===void 0){const L={};u(C,L),n[C.id]=L}const J=c(n[C.id]),le=J[2],ye=J[3],Z=ce-re;let oe=0;Z>0?oe=Math.min(Z,ye-this.options.hierarchical.nodeSpacing):Z<0&&(oe=-Math.min(-Z,le-this.options.hierarchical.nodeSpacing)),oe!=0&&(this._shiftBlock(C.id,oe),t=!0)},z=ce=>{const re=this.direction.getPosition(C),[J,le]=this._getSpaceAroundNode(C),ye=ce-re;let Z=re;ye>0?Z=Math.min(re+(le-this.options.hierarchical.nodeSpacing),ce):ye<0&&(Z=Math.max(re-(J-this.options.hierarchical.nodeSpacing),ce)),Z!==re&&(this.direction.setPosition(C,Z),t=!0)};let Q=I(T,D);q(Q),Q=I(T,k),z(Q)},g=T=>{let C=this.hierarchical.getLevels();C=Ed(C).call(C);for(let N=0;N<T;N++){t=!1;for(let k=0;k<C.length;k++){const j=C[k],W=this.hierarchical.distributionOrdering[j];for(let G=0;G<W.length;G++)y(1e3,W[G])}if(t!==!0)break}},_=T=>{let C=this.hierarchical.getLevels();C=Ed(C).call(C);for(let N=0;N<T&&(t=!1,f(v,C,!0),t===!0);N++);},E=()=>{for(const T in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,T)&&this._centerParent(this.body.nodes[T])},A=()=>{let T=this.hierarchical.getLevels();T=Ed(T).call(T);for(let C=0;C<T.length;C++){const N=T[C],k=this.hierarchical.distributionOrdering[N];for(let j=0;j<k.length;j++)this._centerParent(k[j])}};this.options.hierarchical.blockShifting===!0&&(_(5),E()),this.options.hierarchical.edgeMinimization===!0&&g(20),this.options.hierarchical.parentCentralization===!0&&A(),i()}_getSpaceAroundNode(e,t){let n=!0;t===void 0&&(n=!1);const i=this.hierarchical.levels[e.id];if(i!==void 0){const a=this.hierarchical.distributionIndex[e.id],o=this.direction.getPosition(e),u=this.hierarchical.distributionOrdering[i];let c=1e9,h=1e9;if(a!==0){const f=u[a-1];if(n===!0&&t[f.id]===void 0||n===!1){const v=this.direction.getPosition(f);c=o-v}}if(a!=u.length-1){const f=u[a+1];if(n===!0&&t[f.id]===void 0||n===!1){const v=this.direction.getPosition(f);h=Math.min(h,v-o)}}return[c,h]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const t=this.hierarchical.parentReference[e.id];for(let n=0;n<t.length;n++){const i=t[n],a=this.body.nodes[i],o=this.hierarchical.childrenReference[i];if(o!==void 0){const u=this._getCenterPosition(o),c=this.direction.getPosition(a),[h,f]=this._getSpaceAroundNode(a),v=c-u;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<h-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(a,u)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t;let i=jn(e[n]);i=this._indexArrayToNodes(i),Ef(t=this.direction).call(t,i);let a=0;for(let o=0;o<i.length;o++){const u=i[o];if(this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let h=c*a;a>0&&(h=this.direction.getPosition(i[o-1])+c),this.direction.setPosition(u,h,n),this._validatePositionAndContinue(u,n,h),a++}}}}_placeBranchNodes(e,t){var n;const i=this.hierarchical.childrenReference[e];if(i===void 0)return;const a=[];for(let u=0;u<i.length;u++)a.push(this.body.nodes[i[u]]);Ef(n=this.direction).call(n,a);for(let u=0;u<a.length;u++){const c=a[u],h=this.hierarchical.levels[c.id];if(h>t&&this.positionedNodes[c.id]===void 0){const f=this.options.hierarchical.nodeSpacing;let v;u===0?v=this.direction.getPosition(this.body.nodes[e]):v=this.direction.getPosition(a[u-1])+f,this.direction.setPosition(c,v,h),this._validatePositionAndContinue(c,h,v)}else return}const o=this._getCenterPosition(a);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-i<this.options.hierarchical.nodeSpacing){const a=i+this.options.hierarchical.nodeSpacing-n,o=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(o.withChild,a)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){const t=[];for(let n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}_getDistribution(){const e={};let t,n;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){n=this.body.nodes[t];const i=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(n,i),e[i]===void 0&&(e[i]={}),e[i][t]=n}return e}_getActiveEdges(e){const t=[];return cr(e.edges,n=>{var i;Lr(i=this.body.edgeIndices).call(i,n.id)!==-1&&t.push(n)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;cr(t,i=>{const a=this.body.nodes[i],o=this._getActiveEdges(a).length;e[o]=!0});const n=[];return cr(e,i=>{n.push(Number(i))}),Ef(n).call(n,function(i,a){return a-i}),n}_determineLevelsByHubsize(){const e=(n,i)=>{this.hierarchical.levelDownstream(n,i)},t=this._getHubSizes();for(let n=0;n<t.length;++n){const i=t[n];if(i===0)break;cr(this.body.nodeIndices,a=>{const o=this.body.nodes[a];i===this._getActiveEdges(o).length&&this._crawlNetwork(e,a)})}}_determineLevelsCustomCallback(){const t=function(i,a,o){},n=(i,a,o)=>{let u=this.hierarchical.levels[i.id];u===void 0&&(u=this.hierarchical.levels[i.id]=1e5);const c=t(ma.cloneOptions(i,"node"),ma.cloneOptions(a,"node"),ma.cloneOptions(o,"edge"));this.hierarchical.levels[a.id]=u+c};this._crawlNetwork(n),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=KQ(e=this.body.nodeIndices).call(e,(n,i)=>(n.set(i,this.body.nodes[i]),n),new GA);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=z5e(t):this.hierarchical.levels=F5e(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,n)=>{this.hierarchical.levels[n.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,n.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const n={},i=(a,o)=>{if(n[a.id]===void 0){this.hierarchical.setTreeIndex(a,o),n[a.id]=!0;let u;const c=this._getActiveEdges(a);for(let h=0;h<c.length;h++){const f=c[h];f.connected===!0&&(f.toId==a.id?u=f.from:u=f.to,a.id!=u.id&&(e(a,u,f),i(u,o)))}}};if(t===void 0){let a=0;for(let o=0;o<this.body.nodeIndices.length;o++){const u=this.body.nodeIndices[o];if(n[u]===void 0){const c=this.body.nodes[u];i(c,a),a+=1}}}else{const a=this.body.nodes[t];if(a===void 0){console.error("Node not found:",t);return}i(a)}}_shiftBlock(e,t){const n={},i=a=>{if(n[a])return;n[a]=!0,this.direction.shift(a,t);const o=this.hierarchical.childrenReference[a];if(o!==void 0)for(let u=0;u<o.length;u++)i(o[u])};i(e)}_findCommonParent(e,t){const n={},i=(o,u)=>{const c=this.hierarchical.parentReference[u];if(c!==void 0)for(let h=0;h<c.length;h++){const f=c[h];o[f]=!0,i(o,f)}},a=(o,u)=>{const c=this.hierarchical.parentReference[u];if(c!==void 0)for(let h=0;h<c.length;h++){const f=c[h];if(o[f]!==void 0)return{foundParent:f,withChild:u};const v=a(o,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:u}};return i(n,e),a(n,t)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new I5e(this):this.direction=new P5e(this)}_getCenterPosition(e){let t=1e9,n=-1e9;for(let i=0;i<e.length;i++){let a;if(e[i].id!==void 0)a=e[i];else{const u=e[i];a=this.body.nodes[u]}const o=this.direction.getPosition(a);t=Math.min(t,o),n=Math.max(n,o)}return .5*(t+n)}}class W5e{constructor(e,t,n,i){var a,o;this.body=e,this.canvas=t,this.selectionHandler=n,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Jn(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",Ze(a=this._restore).call(a,this)),this.body.emitter.on("_resetData",Ze(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,n){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=n.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,rn(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const n=this.selectionHandler.getSelectedNodeCount(),i=this.selectionHandler.getSelectedEdgeCount(),a=n+i,o=this.options.locales[this.options.locale];let u=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),u=!0),this.options.addEdge!==!1&&(u===!0?this._createSeperator(1):u=!0,this._createAddEdgeButton(o)),n===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(o)):i===1&&n===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(o)),a!==0&&(n>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(o)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,Ze(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",Ze(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,Ze(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",Ze(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=rn({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,n=>{n!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(n),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,n,i,a;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,Ze(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",Ze(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",Ze(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",Ze(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",Ze(i=this._finishConnect).call(i,this)),this._temporaryBindUI("onDragStart",Ze(a=this._dragStartEdge).call(a,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,Ze(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,n,i,a;const o=this.body.edges[this.edgeBeingEditedId],u=this._getNewTargetNode(o.from.x,o.from.y),c=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(u.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI("onTouch",Ze(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",Ze(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI("onDrag",Ze(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI("onDragEnd",Ze(a=this._controlNodeDragEnd).call(a,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",h=>{const f=o.edgeType.findBorderPositions(h);u.selected===!1&&(u.x=f.from.x,u.y=f.from.y),c.selected===!1&&(c.x=f.to.x,c.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let n;if(e.length>0){for(let i=0;i<e.length;i++)if(this.body.nodes[e[i]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(n=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge=="function"&&(n=this.options.deleteEdge);if(typeof n=="function"){const i={nodes:e,edges:t};if(n.length===2)n(i,a=>{a!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(a.edges),this.body.data.nodes.getDataSet().remove(a.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const n=rn({},this.options.controlNodeStyle);n.id="targetNode"+Cv(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;const i=this.body.functions.createNode(n);return i.shape.boundingBox={left:e,right:e,top:t,bottom:t},i}_createEditButton(){var e;this._clean(),this.manipulationDOM={},vc(this.editModeDiv);const t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,Ze(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(vc(this.editModeDiv),vc(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of lu(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),vc(this.manipulationDiv),vc(this.editModeDiv),vc(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Ze(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Ze(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Ze(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Ze(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";const i=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,Ze(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,Ze(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=i,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Cg(jn(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){const t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){const n=new _f(e,{});L1(n,t),this._domEventListenerCleanupQueue.push(()=>{n.destroy()});const i=a=>{let{keyCode:o,key:u}=a;(u==="Enter"||u===" "||o===13||o===32)&&t()};e.addEventListener("keyup",i,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",i,!1)})}_cleanupTemporaryNodesAndEdges(){for(let a=0;a<this.temporaryIds.edges.length;a++){var e;this.body.edges[this.temporaryIds.edges[a]].disconnect(),delete this.body.edges[this.temporaryIds.edges[a]];const o=Lr(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[a]);if(o!==-1){var t;lu(t=this.body.edgeIndices).call(t,o,1)}}for(let a=0;a<this.temporaryIds.nodes.length;a++){var n;delete this.body.nodes[this.temporaryIds.nodes[a]];const o=Lr(n=this.body.nodeIndices).call(n,this.temporaryIds.nodes[a]);if(o!==-1){var i;lu(i=this.body.nodeIndices).call(i,o,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Jn({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],i=this.body.nodes[this.temporaryIds.nodes[1]],a=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const o=n.isOverlappingWith(t),u=i.isOverlappingWith(t);o===!0?(this.selectedControlNode=n,a.edgeType.from=n):u===!0&&(this.selectedControlNode=i,a.edgeType.to=i),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),i=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const a=this.selectionHandler._getAllNodesOverlappingWith(n);let o;for(let u=a.length-1;u>=0;u--)if(a[u]!==this.selectedControlNode.id){o=this.body.nodes[a[u]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const u=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===u.id?this._performEditEdge(o.id,i.to.id):this._performEditEdge(i.from.id,o.id)}else i.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Jn({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const i=this._getNewTargetNode(n.x,n.y);this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id);const a=this.body.functions.createEdge({id:"connectionEdge"+Cv(),from:n.id,to:i.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[a.id]=a,this.body.edgeIndices.push(a.id),this.temporaryIds.nodes.push(i.id),this.temporaryIds.edges.push(a.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const a=this.selectionHandler._getAllNodesOverlappingWith(n);let o;for(let c=a.length-1;c>=0;c--){var u;if(Lr(u=this.temporaryIds.nodes).call(u,a[c])===-1){o=this.body.nodes[a[c]];break}}if(e.controlEdge={from:i,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(t.x),c.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const a=this.selectionHandler._getAllNodesOverlappingWith(n);let o;for(let c=a.length-1;c>=0;c--){var u;if(Lr(u=this.temporaryIds.nodes).call(u,a[c])===-1){o=this.body.nodes[a[c]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[i]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(i,o.id)),e.controlEdge={from:i,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Cv(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,n=>{n!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const n={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(n,i=>{i!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const n={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let i=this.options.editEdge;if(typeof i=="object"&&(i=i.editWithoutDrag),typeof i=="function")if(i.length===2)i(n,a=>{a==null||this.inMode!=="editEdge"?(this.body.edges[n.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const Je="string",Qe="boolean",je="number",yv="array",Ot="object",JQ="dom",G5e="any",PO=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],jO={borderWidth:{number:je},borderWidthSelected:{number:je,undefined:"undefined"},brokenImage:{string:Je,undefined:"undefined"},chosen:{label:{boolean:Qe,function:"function"},node:{boolean:Qe,function:"function"},__type__:{object:Ot,boolean:Qe}},color:{border:{string:Je},background:{string:Je},highlight:{border:{string:Je},background:{string:Je},__type__:{object:Ot,string:Je}},hover:{border:{string:Je},background:{string:Je},__type__:{object:Ot,string:Je}},__type__:{object:Ot,string:Je}},opacity:{number:je,undefined:"undefined"},fixed:{x:{boolean:Qe},y:{boolean:Qe},__type__:{object:Ot,boolean:Qe}},font:{align:{string:Je},color:{string:Je},size:{number:je},face:{string:Je},background:{string:Je},strokeWidth:{number:je},strokeColor:{string:Je},vadjust:{number:je},multi:{boolean:Qe,string:Je},bold:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},boldital:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},ital:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},mono:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},__type__:{object:Ot,string:Je}},group:{string:Je,number:je,undefined:"undefined"},heightConstraint:{minimum:{number:je},valign:{string:Je},__type__:{object:Ot,boolean:Qe,number:je}},hidden:{boolean:Qe},icon:{face:{string:Je},code:{string:Je},size:{number:je},color:{string:Je},weight:{string:Je,number:je},__type__:{object:Ot}},id:{string:Je,number:je},image:{selected:{string:Je,undefined:"undefined"},unselected:{string:Je,undefined:"undefined"},__type__:{object:Ot,string:Je}},imagePadding:{top:{number:je},right:{number:je},bottom:{number:je},left:{number:je},__type__:{object:Ot,number:je}},label:{string:Je,undefined:"undefined"},labelHighlightBold:{boolean:Qe},level:{number:je,undefined:"undefined"},margin:{top:{number:je},right:{number:je},bottom:{number:je},left:{number:je},__type__:{object:Ot,number:je}},mass:{number:je},physics:{boolean:Qe},scaling:{min:{number:je},max:{number:je},label:{enabled:{boolean:Qe},min:{number:je},max:{number:je},maxVisible:{number:je},drawThreshold:{number:je},__type__:{object:Ot,boolean:Qe}},customScalingFunction:{function:"function"},__type__:{object:Ot}},shadow:{enabled:{boolean:Qe},color:{string:Je},size:{number:je},x:{number:je},y:{number:je},__type__:{object:Ot,boolean:Qe}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:Qe,array:yv},borderRadius:{number:je},interpolation:{boolean:Qe},useImageSize:{boolean:Qe},useBorderWithImage:{boolean:Qe},coordinateOrigin:{string:["center","top-left"]},__type__:{object:Ot}},size:{number:je},title:{string:Je,dom:JQ,undefined:"undefined"},value:{number:je,undefined:"undefined"},widthConstraint:{minimum:{number:je},maximum:{number:je},__type__:{object:Ot,boolean:Qe,number:je}},x:{number:je},y:{number:je},__type__:{object:Ot}},V5e={configure:{enabled:{boolean:Qe},filter:{boolean:Qe,string:Je,array:yv,function:"function"},container:{dom:JQ},showButton:{boolean:Qe},__type__:{object:Ot,boolean:Qe,string:Je,array:yv,function:"function"}},edges:{arrows:{to:{enabled:{boolean:Qe},scaleFactor:{number:je},type:{string:PO},imageHeight:{number:je},imageWidth:{number:je},src:{string:Je},__type__:{object:Ot,boolean:Qe}},middle:{enabled:{boolean:Qe},scaleFactor:{number:je},type:{string:PO},imageWidth:{number:je},imageHeight:{number:je},src:{string:Je},__type__:{object:Ot,boolean:Qe}},from:{enabled:{boolean:Qe},scaleFactor:{number:je},type:{string:PO},imageWidth:{number:je},imageHeight:{number:je},src:{string:Je},__type__:{object:Ot,boolean:Qe}},__type__:{string:["from","to","middle"],object:Ot}},endPointOffset:{from:{number:je},to:{number:je},__type__:{object:Ot,number:je}},arrowStrikethrough:{boolean:Qe},background:{enabled:{boolean:Qe},color:{string:Je},size:{number:je},dashes:{boolean:Qe,array:yv},__type__:{object:Ot,boolean:Qe}},chosen:{label:{boolean:Qe,function:"function"},edge:{boolean:Qe,function:"function"},__type__:{object:Ot,boolean:Qe}},color:{color:{string:Je},highlight:{string:Je},hover:{string:Je},inherit:{string:["from","to","both"],boolean:Qe},opacity:{number:je},__type__:{object:Ot,string:Je}},dashes:{boolean:Qe,array:yv},font:{color:{string:Je},size:{number:je},face:{string:Je},background:{string:Je},strokeWidth:{number:je},strokeColor:{string:Je},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:je},multi:{boolean:Qe,string:Je},bold:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},boldital:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},ital:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},mono:{color:{string:Je},size:{number:je},face:{string:Je},mod:{string:Je},vadjust:{number:je},__type__:{object:Ot,string:Je}},__type__:{object:Ot,string:Je}},hidden:{boolean:Qe},hoverWidth:{function:"function",number:je},label:{string:Je,undefined:"undefined"},labelHighlightBold:{boolean:Qe},length:{number:je,undefined:"undefined"},physics:{boolean:Qe},scaling:{min:{number:je},max:{number:je},label:{enabled:{boolean:Qe},min:{number:je},max:{number:je},maxVisible:{number:je},drawThreshold:{number:je},__type__:{object:Ot,boolean:Qe}},customScalingFunction:{function:"function"},__type__:{object:Ot}},selectionWidth:{function:"function",number:je},selfReferenceSize:{number:je},selfReference:{size:{number:je},angle:{number:je},renderBehindTheNode:{boolean:Qe},__type__:{object:Ot}},shadow:{enabled:{boolean:Qe},color:{string:Je},size:{number:je},x:{number:je},y:{number:je},__type__:{object:Ot,boolean:Qe}},smooth:{enabled:{boolean:Qe},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:je},forceDirection:{string:["horizontal","vertical","none"],boolean:Qe},__type__:{object:Ot,boolean:Qe}},title:{string:Je,undefined:"undefined"},width:{number:je},widthConstraint:{maximum:{number:je},__type__:{object:Ot,boolean:Qe,number:je}},value:{number:je,undefined:"undefined"},__type__:{object:Ot}},groups:{useDefaultGroups:{boolean:Qe},__any__:jO,__type__:{object:Ot}},interaction:{dragNodes:{boolean:Qe},dragView:{boolean:Qe},hideEdgesOnDrag:{boolean:Qe},hideEdgesOnZoom:{boolean:Qe},hideNodesOnDrag:{boolean:Qe},hover:{boolean:Qe},keyboard:{enabled:{boolean:Qe},speed:{x:{number:je},y:{number:je},zoom:{number:je},__type__:{object:Ot}},bindToWindow:{boolean:Qe},autoFocus:{boolean:Qe},__type__:{object:Ot,boolean:Qe}},multiselect:{boolean:Qe},navigationButtons:{boolean:Qe},selectable:{boolean:Qe},selectConnectedEdges:{boolean:Qe},hoverConnectedEdges:{boolean:Qe},tooltipDelay:{number:je},zoomView:{boolean:Qe},zoomSpeed:{number:je},__type__:{object:Ot}},layout:{randomSeed:{undefined:"undefined",number:je,string:Je},improvedLayout:{boolean:Qe},clusterThreshold:{number:je},hierarchical:{enabled:{boolean:Qe},levelSeparation:{number:je},nodeSpacing:{number:je},treeSpacing:{number:je},blockShifting:{boolean:Qe},edgeMinimization:{boolean:Qe},parentCentralization:{boolean:Qe},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:Ot,boolean:Qe}},__type__:{object:Ot}},manipulation:{enabled:{boolean:Qe},initiallyActive:{boolean:Qe},addNode:{boolean:Qe,function:"function"},addEdge:{boolean:Qe,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:Ot,boolean:Qe,function:"function"}},deleteNode:{boolean:Qe,function:"function"},deleteEdge:{boolean:Qe,function:"function"},controlNodeStyle:jO,__type__:{object:Ot,boolean:Qe}},nodes:jO,physics:{enabled:{boolean:Qe},barnesHut:{theta:{number:je},gravitationalConstant:{number:je},centralGravity:{number:je},springLength:{number:je},springConstant:{number:je},damping:{number:je},avoidOverlap:{number:je},__type__:{object:Ot}},forceAtlas2Based:{theta:{number:je},gravitationalConstant:{number:je},centralGravity:{number:je},springLength:{number:je},springConstant:{number:je},damping:{number:je},avoidOverlap:{number:je},__type__:{object:Ot}},repulsion:{centralGravity:{number:je},springLength:{number:je},springConstant:{number:je},nodeDistance:{number:je},damping:{number:je},__type__:{object:Ot}},hierarchicalRepulsion:{centralGravity:{number:je},springLength:{number:je},springConstant:{number:je},nodeDistance:{number:je},damping:{number:je},avoidOverlap:{number:je},__type__:{object:Ot}},maxVelocity:{number:je},minVelocity:{number:je},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:Qe},iterations:{number:je},updateInterval:{number:je},onlyDynamicEdges:{boolean:Qe},fit:{boolean:Qe},__type__:{object:Ot,boolean:Qe}},timestep:{number:je},adaptiveTimestep:{boolean:Qe},wind:{x:{number:je},y:{number:je},__type__:{object:Ot}},__type__:{object:Ot,boolean:Qe}},autoResize:{boolean:Qe},clickToUse:{boolean:Qe},locale:{string:Je},locales:{__any__:{any:G5e},__type__:{object:Ot}},height:{string:Je},width:{string:Je},__type__:{object:Ot}},eZ={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Y5e=(r,e,t)=>{var n;return!!(Tc(r).call(r,"physics")&&Tc(n=eZ.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")};class K5e{constructor(){}getDistances(e,t,n){const i={},a=e.edges;for(let u=0;u<t.length;u++){const c=t[u],h={};i[c]=h;for(let f=0;f<t.length;f++)h[t[f]]=u==f?0:1e9}for(let u=0;u<n.length;u++){const c=a[n[u]];c.connected===!0&&i[c.fromId]!==void 0&&i[c.toId]!==void 0&&(i[c.fromId][c.toId]=1,i[c.toId][c.fromId]=1)}const o=t.length;for(let u=0;u<o;u++){const c=t[u],h=i[c];for(let f=0;f<o-1;f++){const v=t[f],y=i[v];for(let g=f+1;g<o;g++){const _=t[g],E=i[_],A=Math.min(y[_],y[c]+h[_]);y[_]=A,E[v]=A}}}return i}}class X5e{constructor(e,t,n){this.body=e,this.springLength=t,this.springConstant=n,this.distanceSolver=new K5e}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix();const a=.01,o=1;let u=0;const c=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5;let f=1e9,v=0,y=0,g=0,_=0,E=0;for(;f>a&&u<c;)for(u+=1,[v,f,y,g]=this._getHighestEnergyNode(n),_=f,E=0;_>o&&E<h;)E+=1,this._moveNode(v,y,g),[_,y,g]=this._getEnergy(v)}_getHighestEnergyNode(e){const t=this.body.nodeIndices,n=this.body.nodes;let i=0,a=t[0],o=0,u=0;for(let c=0;c<t.length;c++){const h=t[c];if(n[h].predefinedPosition!==!0||n[h].isCluster===!0&&e===!0||n[h].options.fixed.x!==!0||n[h].options.fixed.y!==!0){const[f,v,y]=this._getEnergy(h);i<f&&(i=f,a=h,o=v,u=y)}}return[a,i,o,u]}_getEnergy(e){const[t,n]=this.E_sums[e];return[Math.sqrt(t**2+n**2),t,n]}_moveNode(e,t,n){const i=this.body.nodeIndices,a=this.body.nodes;let o=0,u=0,c=0;const h=a[e].x,f=a[e].y,v=this.K_matrix[e],y=this.L_matrix[e];for(let k=0;k<i.length;k++){const j=i[k];if(j!==e){const W=a[j].x,G=a[j].y,D=v[j],M=y[j],U=1/((h-W)**2+(f-G)**2)**1.5;o+=D*(1-M*(f-G)**2*U),u+=D*(M*(h-W)*(f-G)*U),c+=D*(1-M*(h-W)**2*U)}}const g=o,_=u,E=t,A=c,T=n,C=(E/g+T/_)/(_/g-A/_),N=-(_*C+E)/g;a[e].x+=N,a[e].y+=C,this._updateE_matrix(e)}_createL_matrix(e){const t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(let i=0;i<t.length;i++){this.L_matrix[t[i]]={};for(let a=0;a<t.length;a++)this.L_matrix[t[i]][t[a]]=n*e[t[i]][t[a]]}}_createK_matrix(e){const t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(let i=0;i<t.length;i++){this.K_matrix[t[i]]={};for(let a=0;a<t.length;a++)this.K_matrix[t[i]][t[a]]=n*e[t[i]][t[a]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(let n=0;n<e.length;n++){const i=e[n],a=t[i].x,o=t[i].y;let u=0,c=0;for(let h=n;h<e.length;h++){const f=e[h];if(f!==i){const v=t[f].x,y=t[f].y,g=1/Math.sqrt((a-v)**2+(o-y)**2);this.E_matrix[i][h]=[this.K_matrix[i][f]*(a-v-this.L_matrix[i][f]*(a-v)*g),this.K_matrix[i][f]*(o-y-this.L_matrix[i][f]*(o-y)*g)],this.E_matrix[f][n]=this.E_matrix[i][h],u+=this.E_matrix[i][h][0],c+=this.E_matrix[i][h][1]}}this.E_sums[i]=[u,c]}}_updateE_matrix(e){const t=this.body.nodeIndices,n=this.body.nodes,i=this.E_matrix[e],a=this.K_matrix[e],o=this.L_matrix[e],u=n[e].x,c=n[e].y;let h=0,f=0;for(let v=0;v<t.length;v++){const y=t[v];if(y!==e){const g=i[v],_=g[0],E=g[1],A=n[y].x,T=n[y].y,C=1/Math.sqrt((u-A)**2+(c-T)**2),N=a[y]*(u-A-o[y]*(u-A)*C),k=a[y]*(c-T-o[y]*(c-T)*C);i[v]=[N,k],h+=N,f+=k;const j=this.E_sums[y];j[0]+=N-_,j[1]+=k-E}}this.E_sums[e]=[h,f]}}function Et(r,e,t){var n,i,a,o;if(!(this instanceof Et))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:wye,clickToUse:!1},Jn(this.options,this.defaultOptions),this.body={container:r,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:Ze(n=this.on).call(n,this),off:Ze(i=this.off).call(i,this),emit:Ze(a=this.emit).call(a,this),once:Ze(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Sye(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new Lye,this.canvas=new I2e(this.body),this.selectionHandler=new f5e(this.body,this.canvas),this.interactionHandler=new D2e(this.body,this.canvas,this.selectionHandler),this.view=new j2e(this.body,this.canvas),this.renderer=new A2e(this.body,this.canvas),this.physics=new b2e(this.body),this.layoutEngine=new H5e(this.body),this.clustering=new O2e(this.body),this.manipulation=new W5e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Vbe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new f2e(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new X5e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}kX(Et.prototype);Et.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(Q1e.validate(r,V5e)===!0&&console.error("%cErrors have been found in the supplied options object.",TQ),pp(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=xye(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new K1e(this,this.body.container,eZ,this.canvas.pixelRatio,Y5e)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};rn(n.nodes,this.nodesHandler.options),rn(n.edges,this.edgesHandler.options),rn(n.layout,this.layoutEngine.options),rn(n.interaction,this.selectionHandler.options),rn(n.interaction,this.renderer.options),rn(n.interaction,this.interactionHandler.options),rn(n.manipulation,this.manipulation.options),rn(n.physics,this.physics.options),rn(n.global,this.canvas.options),rn(n.global,this.options),this.configurator.setModuleOptions(n)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new Y1e(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};Et.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t],i=r[n.fromId],a=r[n.toId],o=i!==void 0&&a!==void 0;!this.clustering._isClusteredEdge(t)&&n.options.hidden===!1&&o&&i.options.hidden===!1&&a.options.hidden===!1&&this.body.edgeIndices.push(n.id)}};Et.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};Et.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=oye(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=lye(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};Et.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];vc(this.body.container)};Et.prototype._updateValueRange=function(r){let e,t,n,i=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const a=r[e].getValue();a!==void 0&&(t=t===void 0?a:Math.min(a,t),n=n===void 0?a:Math.max(a,n),i+=a)}if(t!==void 0&&n!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,n,i)};Et.prototype.isActive=function(){return!this.activator||this.activator.active};Et.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};Et.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};Et.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};Et.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};Et.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};Et.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};Et.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};Et.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};Et.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};Et.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};Et.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};Et.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};Et.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};Et.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};Et.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};Et.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};Et.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};Et.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};Et.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};Et.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};Et.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};Et.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};Et.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};Et.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};Et.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};Et.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};Et.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};Et.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};Et.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};Et.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};Et.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};Et.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};Et.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};Et.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};Et.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};Et.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};Et.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};Et.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};Et.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};Et.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};Et.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};Et.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};Et.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};Et.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};Et.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};Et.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};Et.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};Et.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};Et.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};Et.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};Et.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};Et.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};function tZ({projectId:r}){const e=he.useRef(null),t=he.useRef(null),[n,i]=he.useState(!0),[a,o]=he.useState(null),[u,c]=he.useState({nodes:0,edges:0});he.useEffect(()=>{h()},[r]);async function h(){try{i(!0),o(null);const y=await(await fetch(`/api/graph/${r}`)).json();if(!y.success)throw new Error(y.error||"Failed to load graph");const{nodes:g,edges:_}=y.data;if(c({nodes:g.length,edges:_.length}),!e.current){i(!1);return}const E={file:"#3b82f6",function:"#10b981",class:"#8b5cf6",concept:"#f59e0b",problem:"#ef4444",decision:"#06b6d4"},A=new kf(g.map(N=>({id:N.id,label:N.label,title:`Type: ${N.type}
|
|
704
|
+
Confidence: ${N.confidence}`,color:E[N.type]||"#6b7280",shape:N.type==="file"?"box":"dot",font:{color:"#ffffff"}}))),T=new kf(_.map(N=>({id:N.id,from:N.sourceId,to:N.targetId,label:N.relationship,arrows:"to",width:N.weight,color:{color:N.confidence==="EXTRACTED"?"#10b981":"#6b7280",opacity:N.confidence==="AMBIGUOUS"?.3:.7}}))),C={nodes:{borderWidth:2,borderWidthSelected:4,size:25},edges:{smooth:{type:"continuous"}},physics:{stabilization:{iterations:200},barnesHut:{gravitationalConstant:-8e3,springConstant:.04,springLength:95}},interaction:{hover:!0,tooltipDelay:100}};t.current=new Et(e.current,{nodes:A,edges:T},C),t.current.on("click",N=>{if(N.nodes.length>0){const k=N.nodes[0];console.log("Clicked node:",k)}}),i(!1)}catch(v){console.error("Error loading graph:",v),o(v instanceof Error?v.message:"Unknown error"),i(!1)}}async function f(){try{i(!0);const g=await(await fetch(`/api/graph/${r}/extract/latest`,{method:"POST"})).json();if(!g.success)throw new Error(g.error||"Failed to extract graph");await h()}catch(v){console.error("Error extracting graph:",v),o(v instanceof Error?v.message:"Unknown error"),i(!1)}}return n?w.jsx("div",{className:"flex items-center justify-center h-96",children:w.jsx("div",{className:"text-gray-400",children:"Loading graph..."})}):a?w.jsxs("div",{className:"flex flex-col items-center justify-center h-96 gap-4",children:[w.jsxs("div",{className:"text-red-400",children:["Error: ",a]}),w.jsx("button",{onClick:h,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",children:"Retry"})]}):w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[w.jsxs("div",{className:"flex gap-4 text-sm text-gray-400",children:[w.jsxs("span",{children:[u.nodes," nodes"]}),w.jsxs("span",{children:[u.edges," edges"]})]}),w.jsxs("div",{className:"flex gap-2",children:[w.jsx("button",{onClick:f,className:"px-3 py-1.5 bg-green-600 text-white text-sm rounded hover:bg-green-700",children:"Extract from Session"}),w.jsx("button",{onClick:h,className:"px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",children:"Refresh"})]})]}),w.jsx("div",{ref:e,className:"flex-1 bg-gray-900"}),w.jsx("div",{className:"p-4 border-t border-gray-700 text-xs text-gray-400",children:w.jsxs("div",{className:"flex gap-4",children:[w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-blue-500"}),"File"]}),w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-green-500"}),"Function"]}),w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-purple-500"}),"Class"]}),w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-500"}),"Concept"]}),w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500"}),"Problem"]}),w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"w-3 h-3 rounded-full bg-cyan-500"}),"Decision"]})]})})]})}function fV(r){const e=[`# ${r.summary_title||"Session"}`,`Date: ${iu(new Date(r.started_at*1e3),"PPpp")}`,`Status: ${r.summary_status||r.status}`,""];r.summary_mood&&e.push(`Mood: ${r.summary_mood}`),r.summary_complexity&&e.push(`Complexity: ${r.summary_complexity}`),r.summary_key_insight&&(e.push(`Key Insight: ${r.summary_key_insight}`),e.push(""));const t=v=>{if(!v)return[];if(Array.isArray(v))return v;try{return JSON.parse(v)}catch{return[]}},n=t(r.summary_what_we_did);n.length&&(e.push("## What We Did"),n.forEach(v=>e.push(`- ${v}`)),e.push(""));const i=t(r.summary_decisions);i.length&&(e.push("## Decisions Made"),i.forEach(v=>e.push(`- ${v}`)),e.push(""));const a=t(r.summary_blockers);a.length&&(e.push("## Blockers"),a.forEach(v=>e.push(`- ${v}`)),e.push(""));const o=t(r.summary_resolved);o.length&&(e.push("## Resolved"),o.forEach(v=>e.push(`- ${v}`)),e.push(""));const u=t(r.summary_files_changed);u.length&&(e.push("## Files Changed"),u.forEach(v=>e.push(`- ${v}`)),e.push(""));const c=t(r.summary_next_steps);c.length&&(e.push("## Next Steps"),c.forEach(v=>e.push(`- ${v}`)),e.push(""));const h=t(r.summary_gotchas);h.length&&(e.push("## Gotchas / Remember"),h.forEach(v=>e.push(`- ${v}`)),e.push(""));const f=t(r.summary_tech_notes);return f.length&&(e.push("## Tech Notes"),f.forEach(v=>e.push(`- ${v}`)),e.push("")),e.join(`
|
|
705
|
+
`)}function Q5e({onOpenSession:r}){const{id:e}=R6(),[t,n]=he.useState(!1),[i,a]=he.useState(!1),[o,u]=he.useState("overview"),{data:c,isLoading:h,refetch:f}=ya({queryKey:["session",e],queryFn:()=>Or.getSession(e),enabled:!!e,refetchInterval:_=>_?.status==="active"?5e3:!1});he.useEffect(()=>{c&&e&&r(e,c.summary_title||`Session ${e.slice(0,8)}`,c.project_id)},[c,e,r]),he.useEffect(()=>{if(!e)return;let _;try{_=M6(),_.onmessage=E=>{try{const A=JSON.parse(E.data);A.session_id===e&&(A.type==="session_end"||A.type==="summary_ready"||A.type==="tool_use"||A.type==="stop")&&f()}catch{}},_.onerror=()=>{console.log("[SessionDetail] WebSocket error, falling back to polling")}}catch(E){console.log("[SessionDetail] WebSocket connection failed:",E)}return()=>{_?.close()}},[e,f]),he.useEffect(()=>{e&&Or.updateSessionActivity(e).catch(_=>{console.error("Failed to update activity:",_)})},[e]);const v=async()=>{if(!e)return;const _=!!c?.summary_title;n(!0);const E=at.loading(_?"Resyncing summary...":"Syncing summary...");try{_?await Or.resyncSession(e):await Or.syncSession(e),at.dismiss(E),at.success("Session queued for summarization"),setTimeout(()=>f(),2e3)}catch(A){at.dismiss(E),at.error("Failed to sync: "+A)}finally{n(!1)}};if(h)return w.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading session..."});if(!c)return w.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Session not found"});const y=c.ended_at?jie(new Date(c.ended_at*1e3),new Date(c.started_at*1e3)):null,g=!!c.summary_title;return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs(cl,{to:`/project/${c.project_id}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[w.jsx(D6,{size:13})," Back to Project"]}),w.jsxs("div",{style:{marginBottom:24},children:[w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12,marginBottom:12},children:[w.jsx("h1",{style:{fontSize:24,fontWeight:700,flex:1},children:c.summary_title||"Session "+c.id.slice(0,12)}),w.jsx(uY,{status:c.summary_status||c.status})]}),w.jsxs("div",{style:{display:"flex",gap:8,borderBottom:"1px solid var(--border)",marginBottom:24,marginTop:20},children:[w.jsx("button",{onClick:()=>u("overview"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:o==="overview"?"2px solid var(--accent)":"2px solid transparent",color:o==="overview"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:"Overview"}),w.jsxs("button",{onClick:()=>u("timeline"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:o==="timeline"?"2px solid var(--accent)":"2px solid transparent",color:o==="timeline"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:["Timeline (",c.observations?.length||0," events)"]}),w.jsx("button",{onClick:()=>u("graph"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:o==="graph"?"2px solid var(--accent)":"2px solid transparent",color:o==="graph"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:"Knowledge Graph"})]}),o==="overview"&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{style:{display:"flex",gap:20,alignItems:"flex-start"},children:[w.jsxs("div",{style:{flex:"0 0 70%"},children:[w.jsxs("div",{style:{display:"flex",gap:16,flexWrap:"wrap",color:"var(--text-muted)",fontSize:14,marginBottom:16},children:[w.jsx("span",{children:iu(new Date(c.started_at*1e3),"PPpp")}),y&&w.jsxs("span",{children:["Duration: ",y]}),c.total_turns>0&&w.jsxs("span",{children:[c.total_turns," turns"]}),c.total_tool_calls>0&&w.jsxs("span",{children:[c.total_tool_calls," tool calls"]})]}),w.jsx("div",{style:{marginBottom:16},children:w.jsx(cY,{sessionId:c.id,projectId:c.project_id,sessionTags:c.tags||[],onUpdate:f})}),c.summary_key_insight&&w.jsxs("div",{style:{padding:"10px 12px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:8,fontSize:15,color:"var(--text)",display:"flex",alignItems:"flex-start",gap:8,marginBottom:16},children:[w.jsx(Mv,{size:16,style:{color:"var(--accent)",flexShrink:0,marginTop:2}}),w.jsxs("div",{children:[w.jsx("strong",{style:{color:"var(--accent)"},children:"Key Insight:"})," ",c.summary_key_insight]})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[c.observations&&c.observations.length>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Total Events"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:c.observations.length})]}),c.observations&&c.observations.filter(_=>_.type==="tool_use").length>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tool Uses"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:c.observations.filter(_=>_.type==="tool_use").length})]}),c.observations&&c.observations.filter(_=>_.type==="user_prompt").length>0&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"User Prompts"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--green)"},children:c.observations.filter(_=>_.type==="user_prompt").length})]}),(()=>{const _=c.summary_files_changed?Array.isArray(c.summary_files_changed)?c.summary_files_changed:JSON.parse(c.summary_files_changed):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Files Changed"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--orange)"},children:_.length})]})})(),(()=>{const _=c.summary_decisions?Array.isArray(c.summary_decisions)?c.summary_decisions:JSON.parse(c.summary_decisions):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Decisions Made"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:_.length})]})})(),(()=>{const _=c.summary_next_steps?Array.isArray(c.summary_next_steps)?c.summary_next_steps:JSON.parse(c.summary_next_steps):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Next Steps"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--yellow)"},children:_.length})]})})(),(()=>{const _=c.summary_gotchas?Array.isArray(c.summary_gotchas)?c.summary_gotchas:JSON.parse(c.summary_gotchas):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Gotchas"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--red)"},children:_.length})]})})(),(()=>{const _=c.summary_tech_notes?Array.isArray(c.summary_tech_notes)?c.summary_tech_notes:JSON.parse(c.summary_tech_notes):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tech Notes"}),w.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:_.length})]})})()]})]}),w.jsxs("div",{style:{flex:"0 0 28%",display:"flex",flexDirection:"column",gap:12},children:[c.summary_mood&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Mood"}),w.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:c.summary_mood})]}),c.summary_complexity&&w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Complexity"}),w.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:c.summary_complexity.replace("_"," ")})]}),(()=>{const _=c.summary_resolved?JSON.parse(c.summary_resolved):[];return _.length===0?null:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[w.jsx(Pc,{size:14,style:{color:"var(--green)"}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Resolved"})]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:_.map((E,A)=>w.jsxs("div",{style:{fontSize:13,color:"var(--text)",lineHeight:1.4},children:["• ",E]},A))})]})})()]})]}),(()=>{const _=c.summary_blockers?JSON.parse(c.summary_blockers):[];return _.length===0?null:w.jsx("div",{style:{marginTop:16},children:w.jsxs("div",{style:{padding:"10px 12px",background:"var(--red)10",border:"1px solid var(--red)30",borderRadius:8,fontSize:14},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6,color:"var(--red)",fontWeight:600},children:[w.jsx(Tf,{size:16}),"Blockers"]}),_.map((E,A)=>w.jsxs("div",{style:{color:"var(--text-muted)",marginBottom:4},children:["• ",E]},A))]})})})(),w.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:20},children:[w.jsxs("button",{onClick:()=>a(!0),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:_=>{_.currentTarget.style.background="var(--surface)"},onMouseLeave:_=>{_.currentTarget.style.background="var(--surface2)"},children:[w.jsx(Ms,{size:16}),c.notes?"Edit Notes":"Add Notes"]}),w.jsx(ile,{sessionId:c.id}),g&&w.jsxs(w.Fragment,{children:[w.jsx(dae,{text:fV(c),label:"Copy as Markdown"}),w.jsx(hae,{text:fV(c),filename:`session-${c.id.slice(0,8)}-${iu(new Date(c.started_at*1e3),"yyyy-MM-dd")}.md`,label:"Download Markdown"}),w.jsx(nle,{session:c})]}),c.status!=="active"&&c.transcript_path&&w.jsxs("button",{onClick:v,disabled:t,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:t?"var(--surface)":"var(--blue)15",color:t?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:t?"var(--border)":"var(--blue)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:t?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:_=>{t||(_.currentTarget.style.background="var(--blue)25")},onMouseLeave:_=>{t||(_.currentTarget.style.background="var(--blue)15")},children:[w.jsx(xc,{size:14}),t?"Processing...":g?"Resync Summary":"Sync Summary"]})]}),g&&w.jsxs("div",{style:{marginBottom:28},children:[w.jsx("h2",{style:{fontSize:13,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:"Summary"}),w.jsx(oae,{summary_what_we_did:c.summary_what_we_did,summary_decisions:c.summary_decisions,summary_files_changed:c.summary_files_changed,summary_next_steps:c.summary_next_steps,summary_gotchas:c.summary_gotchas,summary_tech_notes:c.summary_tech_notes})]}),!g&&c.status==="active"&&w.jsx("div",{style:{padding:"16px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,color:"var(--text-muted)",marginBottom:24},children:"Session is active. Summary will be generated when the session ends."})]})]}),o==="timeline"&&c.observations&&c.observations.length>0&&w.jsx("div",{children:w.jsx(cae,{observations:c.observations})}),o==="graph"&&w.jsx("div",{style:{height:"calc(100vh - 300px)",minHeight:"600px"},children:w.jsx(tZ,{projectId:c.project_id})}),w.jsx(ale,{sessionId:c.id,initialNotes:c.notes||"",isOpen:i,onClose:()=>a(!1)})]})}function Z5e(){const[r,e]=he.useState(""),[t,n]=he.useState(""),{data:i}=ya({queryKey:["projects"],queryFn:Or.getProjects}),{data:a,isLoading:o,isFetching:u}=ya({queryKey:["search",r,t],queryFn:()=>Or.search(r,t||void 0),enabled:r.length>=2});return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs("div",{style:{marginBottom:24},children:[w.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Search"}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Full-text search across all session observations"})]}),w.jsxs("div",{style:{display:"flex",gap:12,marginBottom:20},children:[w.jsx("div",{style:{flex:1},children:w.jsx(dY,{onSearch:e,placeholder:"Search sessions, decisions, file paths...",autoFocus:!0})}),w.jsxs("select",{value:t,onChange:c=>n(c.target.value),style:{padding:"10px 12px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,outline:"none",minWidth:140},children:[w.jsx("option",{value:"",children:"All Projects"}),i?.map(c=>w.jsx("option",{value:c.id,children:c.name},c.id))]})]}),r.length<2&&w.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[w.jsx(mre,{size:36,color:"var(--border)",style:{marginBottom:12}}),w.jsx("div",{style:{fontSize:14},children:"Type at least 2 characters to search"})]}),o&&r.length>=2&&w.jsx("div",{style:{color:"var(--text-muted)",fontSize:13,padding:"20px 0"},children:"Searching..."}),a?.results&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:12},children:[a.results.length," result",a.results.length!==1?"s":"",' for "',r,'"']}),a.results.length===0?w.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No results found"}):a.results.map(c=>w.jsx(cl,{to:`/session/${c.session_id}`,style:{display:"block"},children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s"},onMouseEnter:h=>h.currentTarget.style.borderColor="var(--accent)",onMouseLeave:h=>h.currentTarget.style.borderColor="var(--border)",children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8,marginBottom:6},children:[w.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--accent)"},children:c.project_name}),w.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",flexShrink:0},children:c.created_at?iu(new Date(c.created_at*1e3),"MMM d, yyyy"):""})]}),w.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:4},children:c.content}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:c.session_title||`Session ${c.session_id?.slice(0,8)}`})]})},c.observation_id))]})]})}const J5e={session_start:{icon:Mv,color:"var(--green)",label:"Session Started"},session_end:{icon:UO,color:"var(--text-muted)",label:"Session Ended"},tool_use:{icon:dl,color:"var(--accent)",label:"Tool Use"},user_prompt:{icon:QV,color:"var(--blue)",label:"User Prompt"},stop:{icon:UO,color:"var(--text-muted)",label:"Response"},pre_compact:{icon:jv,color:"var(--yellow)",label:"Pre-Compact"},summary_ready:{icon:Mv,color:"var(--green)",label:"Summary Ready"},connected:{icon:jv,color:"var(--green)",label:"Connected"}};function ewe(){const[r,e]=he.useState([]),[t,n]=he.useState(!1),[i,a]=he.useState(""),o=he.useRef(null),u=he.useRef(null);return he.useEffect(()=>{let c;const h=()=>{try{c=M6(),o.current=c,c.onopen=()=>{n(!0),a("")},c.onmessage=f=>{try{const v=JSON.parse(f.data);e(y=>[v,...y].slice(0,200))}catch{}},c.onclose=()=>{n(!1),setTimeout(h,3e3)},c.onerror=()=>{a("WebSocket connection failed"),n(!1)}}catch(f){a(String(f))}};return h(),()=>{c?.close()}},[]),w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs("div",{style:{marginBottom:24},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[w.jsx("h1",{style:{fontSize:22,fontWeight:700},children:"Live Feed"}),w.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:t?"var(--green)":"var(--red)",display:"inline-block",animation:t?"pulse 1.5s infinite":"none"}}),w.jsx("style",{children:"@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }"})]}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:t?"Real-time events from active Claude Code sessions":"Connecting..."}),i&&w.jsx("p",{style:{color:"var(--red)",fontSize:12,marginTop:4},children:i})]}),r.length===0&&w.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[w.jsx(jv,{size:36,color:"var(--border)",style:{marginBottom:12}}),w.jsx("div",{style:{fontSize:14},children:"Waiting for events..."}),w.jsx("div",{style:{fontSize:12,marginTop:8},children:"Start a Claude Code session to see live activity"})]}),w.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",gap:8},children:r.map((c,h)=>{const f=J5e[c.type]||{icon:jv,color:"var(--text-muted)",label:c.type},v=f.icon;return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 14px",display:"flex",gap:12,alignItems:"flex-start",opacity:h>50?.6:1},children:[w.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:`${f.color}15`,border:`1px solid ${f.color}30`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:w.jsx(v,{size:12,color:f.color})}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[w.jsx("span",{style:{fontSize:12,fontWeight:600,color:f.color},children:f.label}),w.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",flexShrink:0},children:c.timestamp?iu(new Date(c.timestamp),"HH:mm:ss"):""})]}),c.tool_name&&w.jsxs("div",{style:{fontSize:12,color:"var(--text)",marginTop:2,fontFamily:"monospace"},children:[c.tool_name,c.file_path&&w.jsxs("span",{style:{color:"var(--text-muted)"},children:[" ",c.file_path]})]}),c.preview&&w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.preview}),c.session_id&&w.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2,fontFamily:"monospace"},children:[c.session_id.slice(0,16),"..."]}),c.project&&w.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Project: ",c.project.name]}),c.title&&w.jsx("div",{style:{fontSize:12,color:"var(--green)",marginTop:2},children:c.title})]})]},h)})})]})}function twe(){const{id:r}=R6(),{data:e,isLoading:t,error:n}=ya({queryKey:["memory",r],queryFn:()=>Or.getMemory(r),refetchInterval:15e3,enabled:!!r});if(t)return w.jsx(lwe,{});if(n)return w.jsx(uwe,{message:String(n)});const i=e?.stats||{},a=i.total_preferences>0||i.total_knowledge>0||i.total_patterns>0||i.total_tasks>0||i.total_contacts>0;return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsxs(cl,{to:`/project/${r}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:13,marginBottom:20},children:[w.jsx(D6,{size:14})," Back to Project"]}),w.jsxs("div",{style:{marginBottom:32},children:[w.jsxs("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8,display:"flex",alignItems:"center",gap:12},children:[w.jsx(Pv,{size:28,color:"var(--accent)"}),"Memory System"]}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:15},children:"Accumulated knowledge, preferences, patterns, and tasks across all sessions"})]}),a?w.jsxs(w.Fragment,{children:[w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:16,marginBottom:40},children:[w.jsx(vv,{icon:w.jsx(_c,{size:20}),label:"Preferences",value:i.total_preferences,color:"var(--blue)"}),w.jsx(vv,{icon:w.jsx(_k,{size:20}),label:"Knowledge",value:i.total_knowledge,color:"var(--accent)"}),w.jsx(vv,{icon:w.jsx(HO,{size:20}),label:"Patterns",value:i.total_patterns,color:"var(--orange)"}),w.jsx(vv,{icon:w.jsx(y1,{size:20}),label:"Tasks",value:i.total_tasks,color:"var(--green)"}),w.jsx(vv,{icon:w.jsx(Ek,{size:20}),label:"Contacts",value:i.total_contacts,color:"var(--red)"})]}),e.preferences&&e.preferences.length>0&&w.jsx(pv,{title:"Your Preferences",icon:w.jsx(_c,{size:20,color:"var(--blue)"}),children:w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:e.preferences.map(o=>w.jsx(rwe,{pref:o},o.id))})}),e.knowledge&&e.knowledge.length>0&&w.jsx(pv,{title:"Domain Knowledge",icon:w.jsx(_k,{size:20,color:"var(--accent)"}),children:w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:e.knowledge.map(o=>w.jsx(nwe,{knowledge:o},o.id))})}),e.patterns&&e.patterns.length>0&&w.jsx(pv,{title:"Learned Patterns",icon:w.jsx(HO,{size:20,color:"var(--orange)"}),children:w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:e.patterns.map(o=>w.jsx(iwe,{pattern:o},o.id))})}),e.tasks&&e.tasks.length>0&&w.jsx(pv,{title:"Pending Tasks",icon:w.jsx(y1,{size:20,color:"var(--green)"}),children:w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:e.tasks.map(o=>w.jsx(awe,{task:o},o.id))})}),e.contacts&&e.contacts.length>0&&w.jsx(pv,{title:"Contacts",icon:w.jsx(Ek,{size:20,color:"var(--red)"}),children:w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},children:e.contacts.map(o=>w.jsx(swe,{contact:o},o.id))})})]}):w.jsx(owe,{})]})}function pv({title:r,icon:e,children:t}){return w.jsxs("div",{style:{marginBottom:40},children:[w.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:18,display:"flex",alignItems:"center",gap:10},children:[e,r]}),t]})}function vv({icon:r,label:e,value:t,color:n}){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10,color:n},children:[r,w.jsx("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:e})]}),w.jsx("div",{style:{fontSize:32,fontWeight:700},children:t})]})}function rwe({pref:r}){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsxs("div",{children:[w.jsx("div",{style:{fontSize:14,fontWeight:600,marginBottom:4},children:r.key}),w.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:r.category})]}),w.jsx("div",{style:{fontSize:15,color:"var(--text)",fontWeight:500},children:r.value})]})}function nwe({knowledge:r}){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[w.jsx("div",{style:{fontSize:15,fontWeight:700},children:r.topic}),w.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--accent)15",color:"var(--accent)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:r.category})]}),w.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6},children:r.content}),r.confidence&&w.jsxs("div",{style:{marginTop:12,display:"flex",alignItems:"center",gap:8},children:[w.jsx("div",{style:{flex:1,height:5,background:"var(--border)",borderRadius:3,overflow:"hidden"},children:w.jsx("div",{style:{width:`${r.confidence*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})}),w.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:[Math.round(r.confidence*100),"%"]})]})]})}function iwe({pattern:r}){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[w.jsx("div",{style:{fontSize:15,fontWeight:700},children:r.title}),w.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--orange)15",color:"var(--orange)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:r.pattern_type})]}),w.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6,marginBottom:12},children:r.description}),(r.success_count>0||r.failure_count>0)&&w.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)"},children:[w.jsxs("span",{style:{color:"var(--green)"},children:["✓ ",r.success_count," success"]}),r.failure_count>0&&w.jsxs("span",{style:{color:"var(--red)"},children:["✗ ",r.failure_count," failed"]})]})]})}function awe({task:r}){const e={urgent:"var(--red)",high:"var(--orange)",medium:"var(--blue)",low:"var(--text-muted)"};return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",alignItems:"center",gap:14},children:[w.jsx("div",{style:{width:10,height:10,borderRadius:"50%",background:e[r.priority]||"var(--text-muted)",flexShrink:0}}),w.jsxs("div",{style:{flex:1,minWidth:0},children:[w.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:4},children:r.title}),r.description&&w.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:r.description})]}),w.jsx("div",{style:{fontSize:11,padding:"5px 12px",borderRadius:6,background:`${e[r.priority]||"var(--text-muted)"}15`,color:e[r.priority]||"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:r.priority})]})}function swe({contact:r}){return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[w.jsx("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:r.name}),r.role&&w.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:8},children:r.role}),w.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--red)15",color:"var(--red)",fontWeight:600,display:"inline-block",textTransform:"uppercase",letterSpacing:"0.5px"},children:r.type})]})}function owe(){return w.jsxs("div",{style:{textAlign:"center",padding:"80px 20px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12},children:[w.jsx(Pv,{size:48,color:"var(--text-muted)",style:{marginBottom:16,opacity:.5}}),w.jsx("h3",{style:{fontSize:16,fontWeight:700,marginBottom:8},children:"No Memory Data Yet"}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:13,maxWidth:400,margin:"0 auto"},children:"Memory is extracted from session summaries. Complete a few sessions and the system will start learning your preferences, patterns, and knowledge."})]})}function lwe(){return w.jsx("div",{style:{padding:"80px 20px",textAlign:"center"},children:w.jsx("div",{style:{fontSize:14,color:"var(--text-muted)"},children:"Loading memory..."})})}function uwe({message:r}){return w.jsxs("div",{style:{padding:"80px 20px",textAlign:"center"},children:[w.jsx("div",{style:{fontSize:14,color:"#ef4444",marginBottom:8},children:"Failed to load memory"}),w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:r})]})}function cwe(){const{data:r}=ya({queryKey:["metrics"],queryFn:Or.getMetrics,refetchInterval:5e3});if(!r)return w.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading metrics..."});const{summarizations:e,sessions:t,memory:n,queue:i}=r,a=[{label:"Total Summarizations",value:e.total,icon:Dte,color:"var(--accent)"},{label:"Success Rate",value:e.total>0?`${Math.round(e.successful/e.total*100)}%`:"0%",icon:_c,color:"var(--green)"},{label:"Avg Duration",value:e.avgDuration>0?`${(e.avgDuration/1e3).toFixed(1)}s`:"0s",icon:fl,color:"var(--blue)"},{label:"Failed",value:e.failed,icon:Tf,color:"var(--red)"}],o=[{label:"Total Sessions",value:t.total},{label:"Active",value:t.active},{label:"Completed",value:t.completed}],u=[{label:"Preferences",value:n.preferences},{label:"Knowledge",value:n.knowledge},{label:"Patterns",value:n.patterns},{label:"Tasks",value:n.tasks}],c=[{label:"High Priority",value:i.high,color:"var(--red)"},{label:"Normal Priority",value:i.normal,color:"var(--yellow)"},{label:"Low Priority",value:i.low,color:"var(--green)"}];return w.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[w.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:24},children:"System Metrics"}),w.jsxs("div",{style:{marginBottom:32},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Performance"}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:a.map(h=>{const f=h.icon;return w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[w.jsx(f,{size:16,style:{color:h.color}}),w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.5},children:h.label})]}),w.jsx("div",{style:{fontSize:28,fontWeight:700,color:h.color},children:h.value})]},h.label)})})]}),w.jsxs("div",{style:{marginBottom:32},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Sessions"}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:o.map(h=>w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:h.label}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:h.value})]},h.label))})]}),w.jsxs("div",{style:{marginBottom:32},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Memory System"}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:u.map(h=>w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:h.label}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--text)"},children:h.value})]},h.label))})]}),w.jsxs("div",{style:{marginBottom:32},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Queue"}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:c.map(h=>w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:h.label}),w.jsx("div",{style:{fontSize:24,fontWeight:700,color:h.color},children:h.value})]},h.label))})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[w.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:8},children:"Last Updated"}),w.jsx("div",{style:{fontSize:13,color:"var(--text)"},children:new Date().toLocaleString()})]})]})}const dwe=[{label:"Last 5 min",value:5},{label:"Last 10 min",value:10},{label:"Last 15 min",value:15},{label:"Last 30 min",value:30},{label:"Last 1 hour",value:60},{label:"All",value:0}],hwe=[{label:"All",value:""},{label:"Info",value:"info",color:"var(--blue)"},{label:"Warn",value:"warn",color:"var(--yellow)"},{label:"Error",value:"error",color:"var(--red)"},{label:"Hook",value:"hook",color:"var(--purple)"},{label:"Broadcast",value:"broadcast",color:"var(--green)"}];function fwe(){const[r,e]=he.useState(!0),[t,n]=he.useState([]),[i,a]=he.useState(15),[o,u]=he.useState(""),[c,h]=he.useState(""),f=he.useRef(null),v=he.useRef(null),{data:y}=ya({queryKey:["logs",i,o,c],queryFn:async()=>{const T=new URLSearchParams;return i>0&&T.append("minutes",String(i)),o&&T.append("level",o),c&&T.append("search",c),(await(await fetch(`/api/logs?${T}`)).json()).logs||[]},refetchInterval:r?!1:5e3});he.useEffect(()=>{y&&n(y)},[y]),he.useEffect(()=>{if(!r){v.current?.close();return}const T=new EventSource("/api/logs/stream");return v.current=T,T.onmessage=C=>{const k=JSON.parse(C.data).log;o&&!k.toLowerCase().includes(`[${o.toLowerCase()}]`)||c&&!k.toLowerCase().includes(c.toLowerCase())||n(j=>[...j.slice(-999),k])},T.onerror=()=>{console.error("SSE connection error"),T.close()},()=>{T.close()}},[r,o,c]),he.useEffect(()=>{r&&f.current?.scrollIntoView({behavior:"smooth"})},[t,r]);const g=()=>{navigator.clipboard.writeText(t.join(`
|
|
706
|
+
`)),at.success("Logs copied to clipboard!")},_=()=>{const T=new Blob([t.join(`
|
|
707
|
+
`)],{type:"text/plain"}),C=URL.createObjectURL(T),N=document.createElement("a");N.href=C,N.download=`claudectx-logs-${new Date().toISOString()}.txt`,N.click(),URL.revokeObjectURL(C),at.success("Logs downloaded!")},E=()=>{n([]),at.success("Logs cleared!")},A=T=>T.includes("[ERROR]")||T.includes("error")?"var(--red)":T.includes("[WARN]")||T.includes("warn")?"var(--yellow)":T.includes("[INFO]")||T.includes("info")?"var(--blue)":T.includes("[Hook]")?"var(--purple)":T.includes("[Broadcast]")?"var(--green)":"var(--text)";return w.jsxs("div",{style:{padding:"24px",maxWidth:"100%",width:"100%",margin:"0 auto"},children:[w.jsxs("div",{style:{marginBottom:24},children:[w.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8},children:"System Logs"}),w.jsx("p",{style:{color:"var(--text-muted)",fontSize:14},children:"Real-time streaming logs from ClaudeContext worker"})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,marginBottom:16,display:"flex",flexWrap:"wrap",gap:12,alignItems:"center"},children:[w.jsx("div",{style:{display:"flex",gap:6},children:dwe.map(T=>w.jsx("button",{onClick:()=>a(T.value),style:{padding:"6px 12px",background:i===T.value?"var(--accent)":"var(--surface2)",color:i===T.value?"white":"var(--text)",border:"1px solid",borderColor:i===T.value?"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:T.label},T.value))}),w.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),w.jsx("div",{style:{display:"flex",gap:6},children:hwe.map(T=>w.jsx("button",{onClick:()=>u(T.value),style:{padding:"6px 12px",background:o===T.value?T.color||"var(--accent)":"var(--surface2)",color:o===T.value?"white":"var(--text)",border:"1px solid",borderColor:o===T.value?T.color||"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:T.label},T.value))}),w.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),w.jsxs("div",{style:{flex:1,minWidth:200,position:"relative"},children:[w.jsx(L6,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),w.jsx("input",{type:"text",placeholder:"Search logs...",value:c,onChange:T=>h(T.target.value),style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)"}}),c&&w.jsx("button",{onClick:()=>h(""),style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex"},children:w.jsx(ds,{size:14})})]}),w.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),w.jsxs("button",{onClick:()=>e(!r),style:{padding:"8px 12px",background:r?"var(--green)15":"var(--surface2)",color:r?"var(--green)":"var(--text)",border:"1px solid",borderColor:r?"var(--green)30":"var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[r?w.jsx(Hre,{size:14}):w.jsx(Gre,{size:14}),r?"Pause":"Resume"]}),w.jsxs("button",{onClick:g,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[w.jsx(GV,{size:14}),"Copy"]}),w.jsxs("button",{onClick:_,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[w.jsx(F1,{size:14}),"Download"]}),w.jsx("button",{onClick:E,style:{padding:"8px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},children:"Clear"})]}),w.jsxs("div",{style:{background:"#1a1a1a",border:"1px solid var(--border)",borderRadius:12,padding:16,height:"calc(100vh - 320px)",overflow:"auto",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:12,lineHeight:1.6},children:[t.length===0?w.jsx("div",{style:{textAlign:"center",padding:40,color:"var(--text-muted)"},children:"No logs to display. Waiting for logs..."}):t.map((T,C)=>w.jsx("div",{style:{color:A(T),marginBottom:2,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:T},C)),w.jsx("div",{ref:f})]}),w.jsxs("div",{style:{marginTop:12,display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12,color:"var(--text-muted)"},children:[w.jsxs("div",{children:[t.length," logs displayed",r&&w.jsx("span",{style:{color:"var(--green)",marginLeft:8},children:"● Live"})]}),w.jsxs("div",{children:[i>0?`Last ${i} minutes`:"All time",o&&` • ${o}`,c&&` • "${c}"`]})]})]})}function pwe(){const r=Qv(),[e,t]=he.useState({apiProvider:"local-9router",apiKey:"",baseURL:"http://localhost:20128/v1",model:"claude-opus-4-6",disableSummaries:!1}),[n,i]=he.useState("idle"),{data:a,isLoading:o}=ya({queryKey:["settings"],queryFn:Or.getSettings});he.useEffect(()=>{if(a){let f="local-9router";a.baseURL==="http://localhost:20128/v1"?f="local-9router":a.baseURL&&a.baseURL.includes("9router")?f="cloud-9router":(!a.baseURL||a.baseURL==="https://api.anthropic.com")&&(f="direct"),t({apiProvider:f,apiKey:"",baseURL:a.baseURL||"http://localhost:20128/v1",model:a.model||"AWS",disableSummaries:a.disableSummaries||!1})}},[a]);const u=bv({mutationFn:Or.updateSettings,onSuccess:()=>{i("success"),r.invalidateQueries({queryKey:["settings"]}),r.invalidateQueries({queryKey:["health"]}),setTimeout(()=>i("idle"),3e3)},onError:()=>{i("error"),setTimeout(()=>i("idle"),3e3)}}),c=()=>{i("saving");let f="",v=e.apiKey;e.apiProvider==="local-9router"?(f="http://localhost:20128/v1",(!e.apiKey||e.apiKey.trim()==="")&&(v="sk_9router")):e.apiProvider==="cloud-9router"?f=e.baseURL:f="";const y={baseURL:f,model:e.model,disableSummaries:e.disableSummaries};e.apiKey&&e.apiKey.trim()!==""&&(y.apiKey=v),u.mutate(y)},h=[{value:"claude-opus-4-6",label:"Claude Opus 4.6",description:"Most capable - best for complex analysis"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",description:"Balanced - great speed and quality"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5",description:"Fastest - good for simple tasks"},{value:"AWS",label:"AWS",description:"9router combo or Claude Code default"},{value:"custom",label:"Custom Combo/Model...",description:"Enter your own combo name or model"}];return o?w.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading settings..."}):w.jsxs("div",{style:{padding:"28px 32px",maxWidth:1200},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:24},children:[w.jsx(ZV,{size:24,color:"var(--accent)"}),w.jsx("h1",{style:{fontSize:24,fontWeight:700},children:"Settings"})]}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:20,marginBottom:20},children:[w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:"API Configuration"}),w.jsxs("div",{style:{marginBottom:20},children:[w.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:"API Provider"}),w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[w.jsxs("button",{onClick:()=>t({...e,apiProvider:"local-9router",baseURL:"http://localhost:20128/v1"}),style:{padding:"12px 16px",background:e.apiProvider==="local-9router"?"var(--accent)":"var(--surface2)",color:e.apiProvider==="local-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[w.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Local (Recommended)"}),w.jsx("div",{style:{fontSize:12,opacity:.8},children:"Running on localhost:20128 - No API key needed"})]}),w.jsxs("button",{onClick:()=>t({...e,apiProvider:"cloud-9router"}),style:{padding:"12px 16px",background:e.apiProvider==="cloud-9router"?"var(--accent)":"var(--surface2)",color:e.apiProvider==="cloud-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[w.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Cloud"}),w.jsx("div",{style:{fontSize:12,opacity:.8},children:"Remote 9router endpoint - Requires API key only"})]}),w.jsxs("button",{onClick:()=>t({...e,apiProvider:"direct",baseURL:""}),style:{padding:"12px 16px",background:e.apiProvider==="direct"?"var(--accent)":"var(--surface2)",color:e.apiProvider==="direct"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[w.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"Direct (Anthropic)"}),w.jsx("div",{style:{fontSize:12,opacity:.8},children:"Connect directly to Anthropic's Claude API"})]})]})]}),(e.apiProvider==="direct"||e.apiProvider==="cloud-9router")&&w.jsxs("div",{style:{marginBottom:20},children:[w.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["API Key ",e.apiProvider==="cloud-9router"&&w.jsx("span",{style:{color:"var(--accent)"},children:"(Required)"})]}),w.jsx("input",{type:"password",value:e.apiKey,onChange:f=>t({...e,apiKey:f.target.value}),placeholder:e.apiProvider==="direct"?"sk-ant-...":"Your 9router API key",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:e.apiProvider==="direct"?"Get your API key from console.anthropic.com":"API key provided by your 9router cloud service"})]}),e.apiProvider==="cloud-9router"&&w.jsxs("div",{style:{marginBottom:20},children:[w.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["Base URL ",w.jsx("span",{style:{color:"var(--text-muted)",fontWeight:400},children:"(Optional - uses default if empty)"})]}),w.jsx("input",{type:"text",value:e.baseURL,onChange:f=>t({...e,baseURL:f.target.value}),placeholder:"https://your-9router-cloud.com/v1",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:"Leave empty to use default 9router cloud endpoint"})]}),e.apiProvider==="local-9router"&&w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[w.jsx("strong",{style:{color:"var(--text)"},children:"Local 9router:"})," Using localhost:20128/v1 - No API key needed. Make sure 9router is running locally."]})]}),w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[w.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:e.apiProvider==="direct"?"Model Selection":"Combo / Model Name"}),w.jsxs("div",{style:{marginBottom:20},children:[w.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:e.apiProvider==="direct"?"Claude Model":"Combo Name or Model"}),w.jsx("select",{value:h.find(f=>f.value===e.model)?e.model:"custom",onChange:f=>{f.target.value==="custom"?h.find(v=>v.value===e.model)&&t({...e,model:""}):t({...e,model:f.target.value})},style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,cursor:"pointer"},children:h.map(f=>w.jsx("option",{value:f.value,children:f.label},f.value))}),!h.find(f=>f.value===e.model)&&w.jsx("input",{type:"text",value:e.model,placeholder:e.apiProvider==="direct"?"Enter model name (e.g., claude-opus-4-6)":"Enter your combo name (e.g., my-fast-combo, production)",onChange:f=>t({...e,model:f.target.value}),style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,marginTop:8}}),w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:e.apiProvider==="direct"?h.find(f=>f.value===e.model)?.description||"Direct Claude API model name":e.apiProvider==="local-9router"?"9router combo name (configured in your local 9router settings)":"9router combo name or model identifier"})]}),e.apiProvider!=="direct"&&w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6,marginBottom:20},children:[w.jsx("strong",{style:{color:"var(--text)"},children:"About 9router Combos:"}),' Combos are custom routing configurations you create in 9router. Each combo can route to different models/providers with specific settings. Common examples: "AWS", "production-combo", "fast-combo", etc.']}),w.jsxs("div",{style:{marginBottom:0},children:[w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",fontSize:13,fontWeight:500},children:[w.jsx("input",{type:"checkbox",checked:e.disableSummaries,onChange:f=>t({...e,disableSummaries:f.target.checked}),style:{cursor:"pointer"}}),"Disable AI Summaries"]}),w.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6,marginLeft:24},children:"Turn off automatic session summarization (saves API costs)"})]})]})]}),w.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:10,padding:16,marginBottom:20,display:"flex",gap:12},children:[w.jsx(Tf,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),w.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[w.jsx("strong",{style:{color:"var(--text)"},children:"Note:"})," Changes require a worker restart to take effect. After saving, run ",w.jsx("code",{style:{background:"var(--surface)",padding:"2px 6px",borderRadius:4},children:"claudectx restart"})," in your terminal."]})]}),w.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[w.jsxs("button",{onClick:c,disabled:n==="saving",style:{padding:"12px 24px",background:n==="success"?"var(--green)":"var(--accent)",color:"white",border:"none",borderRadius:8,cursor:n==="saving"?"not-allowed":"pointer",fontSize:14,fontWeight:600,display:"flex",alignItems:"center",gap:8,opacity:n==="saving"?.6:1},children:[n==="saving"&&w.jsx(xc,{size:16,style:{animation:"spin 1s linear infinite"}}),n==="success"&&w.jsx(Pc,{size:16}),n==="idle"&&w.jsx(Qre,{size:16}),n==="error"&&w.jsx(Tf,{size:16}),n==="saving"?"Saving...":n==="success"?"Saved!":n==="error"?"Error":"Save Settings"]}),n==="error"&&w.jsx("span",{style:{fontSize:13,color:"var(--red)"},children:"Failed to save settings. Please try again."})]}),w.jsx("style",{children:`
|
|
708
|
+
@keyframes spin {
|
|
709
|
+
from { transform: rotate(0deg); }
|
|
710
|
+
to { transform: rotate(360deg); }
|
|
711
|
+
}
|
|
712
|
+
`})]})}function vwe(){const[r,e]=he.useState(!1);if(he.useEffect(()=>{const n=()=>e(!0),i=()=>e(!1);return document.addEventListener("show-shortcuts",n),document.addEventListener("close-modal",i),()=>{document.removeEventListener("show-shortcuts",n),document.removeEventListener("close-modal",i)}},[]),!r)return null;const t=[{keys:["j"],description:"Next item"},{keys:["k"],description:"Previous item"},{keys:["/"],description:"Focus search"},{keys:["Esc"],description:"Close modal"},{keys:["?"],description:"Show shortcuts"},{keys:["g","h"],description:"Go to home"},{keys:["g","s"],description:"Go to search"},{keys:["g","l"],description:"Go to live"},{keys:["g","m"],description:"Go to metrics"},{keys:["g","b"],description:"Go to memory"}];return w.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:()=>e(!1),children:w.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:500,width:"90%",animation:"scaleIn 0.2s"},onClick:n=>n.stopPropagation(),children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[w.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Keyboard Shortcuts"}),w.jsx("button",{onClick:()=>e(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:n=>n.currentTarget.style.background="var(--surface2)",onMouseLeave:n=>n.currentTarget.style.background="none",children:w.jsx(ds,{size:20})})]}),w.jsx("div",{style:{display:"grid",gap:12},children:t.map((n,i)=>w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsx("span",{style:{fontSize:14,color:"var(--text-muted)"},children:n.description}),w.jsx("div",{style:{display:"flex",gap:4},children:n.keys.map((a,o)=>w.jsx("kbd",{style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:4,fontSize:13,fontFamily:"monospace",color:"var(--text)"},children:a},o))})]},i))})]})})}function gwe({openTabs:r,onCloseTab:e}){const t=$f(),i=So().pathname.match(/\/(project|session)\/([^/]+)/)?.[2];return r.length===0?null:w.jsx("div",{style:{position:"fixed",bottom:0,left:240,right:0,height:48,background:"var(--surface)",borderTop:"1px solid var(--border)",display:"flex",alignItems:"center",gap:4,padding:"0 12px",overflowX:"auto",overflowY:"hidden",zIndex:100,scrollbarWidth:"thin"},children:r.map(a=>{const o=a.id===i;return w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:o?"var(--surface2)":"transparent",border:"1px solid",borderColor:o?"var(--accent)":"var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s",minWidth:120,maxWidth:200,whiteSpace:"nowrap"},onClick:()=>t(`/${a.type}/${a.id}`),onMouseEnter:u=>{o||(u.currentTarget.style.background="var(--surface2)")},onMouseLeave:u=>{o||(u.currentTarget.style.background="transparent")},children:[w.jsx("span",{style:{fontSize:13,fontWeight:o?600:500,color:o?"var(--accent)":"var(--text)",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:a.name}),w.jsx("button",{onClick:u=>{u.stopPropagation(),e(a.id)},style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:2,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:u=>{u.currentTarget.style.background="var(--red)20",u.currentTarget.style.color="var(--red)"},onMouseLeave:u=>{u.currentTarget.style.background="transparent",u.currentTarget.style.color="var(--text-muted)"},children:w.jsx(ds,{size:14})})]},a.id)})})}function mwe(){const r=$f();he.useEffect(()=>{let e=!1;function t(n){if(!(n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement)){if(n.key==="/"){n.preventDefault(),document.querySelector('input[type="search"]')?.focus();return}if(n.key==="Escape"){document.dispatchEvent(new CustomEvent("close-modal"));return}if(n.key==="?"){n.preventDefault(),document.dispatchEvent(new CustomEvent("show-shortcuts"));return}if(n.key==="g"&&!e){e=!0;const i=setTimeout(()=>{e=!1},1e3),a=o=>{clearTimeout(i),e=!1,o.key==="h"?r("/"):o.key==="s"?r("/search"):o.key==="l"?r("/live"):o.key==="m"?r("/metrics"):o.key==="b"&&r("/memory"),window.removeEventListener("keydown",a)};window.addEventListener("keydown",a);return}if(n.key==="j"||n.key==="k"){const i=document.querySelectorAll("[data-keyboard-nav]");if(i.length===0)return;const a=Array.from(i).findIndex(c=>c===document.activeElement||c.contains(document.activeElement));let o=a;n.key==="j"?o=a<i.length-1?a+1:0:o=a>0?a-1:i.length-1;const u=i[o];u?.focus(),u?.scrollIntoView({behavior:"smooth",block:"center"})}}}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[r])}function ywe(){mwe();const r=$f(),[e,t]=he.useState(()=>{const a=localStorage.getItem("openTabs");return a?JSON.parse(a):[]});he.useEffect(()=>{localStorage.setItem("openTabs",JSON.stringify(e))},[e]);const n=(a,o,u,c)=>{t(h=>{if(console.log("addTab called:",{id:a,name:o,type:u,projectId:c,currentTabs:h}),h.some(f=>f.id===a&&f.type===u))return console.log("Tab already exists, skipping"),h;if(u==="session"&&c){const f=h.findIndex(v=>v.id===c&&v.type==="project");if(console.log("Looking for project tab:",c,"found at index:",f),f!==-1){const v=[...h];return v[f]={id:a,name:o,type:u,projectId:c},console.log("Replaced project tab with session tab"),v}}if(u==="project"){const f=h.findIndex(v=>v.projectId===a&&v.type==="session");if(console.log("Looking for session tab from project:",a,"found at index:",f),f!==-1){const v=[...h];return v[f]={id:a,name:o,type:u},console.log("Replaced session tab with project tab"),v}}return console.log("Adding new tab"),[...h,{id:a,name:o,type:u,projectId:c}]})},i=a=>{t(o=>{const u=o.filter(h=>h.id!==a);if(window.location.pathname.includes(`/${a}`))if(u.length>0){const h=u[u.length-1];r(`/${h.type}/${h.id}`)}else r("/");return u})};return w.jsxs(w.Fragment,{children:[w.jsx(wne,{children:w.jsxs(Yee,{children:[w.jsx(mo,{path:"/",element:w.jsx($ie,{onOpenProject:(a,o)=>n(a,o,"project")})}),w.jsx(mo,{path:"/project/:id",element:w.jsx(sae,{onOpenProject:(a,o)=>n(a,o,"project")})}),w.jsx(mo,{path:"/project/:id/memory",element:w.jsx(twe,{})}),w.jsx(mo,{path:"/project/:id/graph",element:w.jsx(tZ,{projectId:window.location.pathname.split("/")[2]})}),w.jsx(mo,{path:"/session/:id",element:w.jsx(Q5e,{onOpenSession:(a,o,u)=>n(a,o,"session",u)})}),w.jsx(mo,{path:"/search",element:w.jsx(Z5e,{})}),w.jsx(mo,{path:"/live",element:w.jsx(ewe,{})}),w.jsx(mo,{path:"/metrics",element:w.jsx(cwe,{})}),w.jsx(mo,{path:"/logs",element:w.jsx(fwe,{})}),w.jsx(mo,{path:"/settings",element:w.jsx(pwe,{})})]})}),w.jsx(gwe,{openTabs:e,onCloseTab:i}),w.jsx(qie,{}),w.jsx(vwe,{})]})}const bwe=new $J({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:1e4}}});vJ.createRoot(document.getElementById("root")).render(w.jsx(oJ.StrictMode,{children:w.jsx(BJ,{client:bwe,children:w.jsx(yte,{children:w.jsx(ywe,{})})})}));export{qr as _,wwe as c,pV as g};
|