expxagents 0.12.2 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/assets/{BufferResource-DTKCcSRK.js → BufferResource-BMmxDv0X.js} +1 -1
- package/dist/dashboard/assets/{CanvasRenderer-RC-R9HHB.js → CanvasRenderer-C8lgY4Ra.js} +1 -1
- package/dist/dashboard/assets/{JarvisView-BxEaO5CE.js → JarvisView-CRecMJxY.js} +1 -1
- package/dist/dashboard/assets/{RenderTargetSystem-BNs6mZy_.js → RenderTargetSystem-DrrJs7jI.js} +1 -1
- package/dist/dashboard/assets/{WebGLRenderer-DZqhYwUo.js → WebGLRenderer-DzCm1r8W.js} +1 -1
- package/dist/dashboard/assets/{WebGPURenderer-DKvNGGnd.js → WebGPURenderer-DFAfTUvS.js} +1 -1
- package/dist/dashboard/assets/{browserAll-DpQDqd5Z.js → browserAll-D5H10uru.js} +1 -1
- package/dist/dashboard/assets/index-DHu3wE8e.css +1 -0
- package/dist/dashboard/assets/index-Dbrb96eX.js +400 -0
- package/dist/dashboard/assets/{webworkerAll-DKgN-y6e.js → webworkerAll-BuXYXspl.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/data/opensquad.db-shm +0 -0
- package/dist/data/opensquad.db-wal +0 -0
- package/dist/server/api/__tests__/graph-routes.test.d.ts +2 -0
- package/dist/server/api/__tests__/graph-routes.test.d.ts.map +1 -0
- package/dist/server/api/__tests__/graph-routes.test.js +105 -0
- package/dist/server/api/__tests__/graph-routes.test.js.map +1 -0
- package/dist/server/api/__tests__/integration-routes.test.d.ts +2 -0
- package/dist/server/api/__tests__/integration-routes.test.d.ts.map +1 -0
- package/dist/server/api/__tests__/integration-routes.test.js +243 -0
- package/dist/server/api/__tests__/integration-routes.test.js.map +1 -0
- package/dist/server/api/__tests__/team-routes.test.d.ts +2 -0
- package/dist/server/api/__tests__/team-routes.test.d.ts.map +1 -0
- package/dist/server/api/__tests__/team-routes.test.js +116 -0
- package/dist/server/api/__tests__/team-routes.test.js.map +1 -0
- package/dist/server/api/graph-routes.d.ts +24 -0
- package/dist/server/api/graph-routes.d.ts.map +1 -0
- package/dist/server/api/graph-routes.js +189 -0
- package/dist/server/api/graph-routes.js.map +1 -0
- package/dist/server/api/integration-routes.d.ts +23 -0
- package/dist/server/api/integration-routes.d.ts.map +1 -0
- package/dist/server/api/integration-routes.js +321 -0
- package/dist/server/api/integration-routes.js.map +1 -0
- package/dist/server/api/squads-routes.d.ts.map +1 -1
- package/dist/server/api/squads-routes.js +12 -1
- package/dist/server/api/squads-routes.js.map +1 -1
- package/dist/server/api/team-routes.d.ts +8 -0
- package/dist/server/api/team-routes.d.ts.map +1 -0
- package/dist/server/api/team-routes.js +55 -0
- package/dist/server/api/team-routes.js.map +1 -0
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/app.js +6 -0
- package/dist/server/app.js.map +1 -1
- package/dist/server/bridge/__tests__/claude-bridge.test.js +79 -11
- package/dist/server/bridge/__tests__/claude-bridge.test.js.map +1 -1
- package/dist/server/bridge/chat-handler.d.ts +6 -1
- package/dist/server/bridge/chat-handler.d.ts.map +1 -1
- package/dist/server/bridge/chat-handler.js +106 -5
- package/dist/server/bridge/chat-handler.js.map +1 -1
- package/dist/server/bridge/claude-bridge.d.ts +6 -0
- package/dist/server/bridge/claude-bridge.d.ts.map +1 -1
- package/dist/server/bridge/claude-bridge.js +90 -10
- package/dist/server/bridge/claude-bridge.js.map +1 -1
- package/dist/server/bridge/conversation.d.ts +1 -0
- package/dist/server/bridge/conversation.d.ts.map +1 -1
- package/dist/server/bridge/conversation.js +5 -0
- package/dist/server/bridge/conversation.js.map +1 -1
- package/dist/server/db/schema.d.ts +1 -1
- package/dist/server/db/schema.d.ts.map +1 -1
- package/dist/server/db/schema.js +18 -0
- package/dist/server/db/schema.js.map +1 -1
- package/dist/server/routes/__tests__/conversations.test.js +18 -1
- package/dist/server/routes/__tests__/conversations.test.js.map +1 -1
- package/dist/server/routes/conversations.d.ts.map +1 -1
- package/dist/server/routes/conversations.js +12 -1
- package/dist/server/routes/conversations.js.map +1 -1
- package/dist/server/ws/ws-handler.d.ts.map +1 -1
- package/dist/server/ws/ws-handler.js +17 -3
- package/dist/server/ws/ws-handler.js.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard/assets/index-B-8_BLE5.css +0 -1
- package/dist/dashboard/assets/index-C_HJOTiO.js +0 -344
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-D5H10uru.js","assets/webworkerAll-BuXYXspl.js","assets/WebGPURenderer-DFAfTUvS.js","assets/BufferResource-BMmxDv0X.js","assets/RenderTargetSystem-DrrJs7jI.js","assets/WebGLRenderer-DzCm1r8W.js","assets/CanvasRenderer-C8lgY4Ra.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const xO="modulepreload",vO=function(t){return"/"+t},kS={},Kd=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){let l=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));r=l(n.map(p=>{if(p=vO(p),p in kS)return;kS[p]=!0;const m=p.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":xO,m||(b.as="script"),b.crossOrigin="",b.href=p,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)return new Promise((v,S)=>{b.addEventListener("load",v),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return r.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};function lu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qb={exports:{}},Pp={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var OS;function _O(){if(OS)return Pp;OS=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,s){var l=null;if(s!==void 0&&(l=""+s),r.key!==void 0&&(l=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:t,type:i,key:l,ref:r!==void 0?r:null,props:s}}return Pp.Fragment=e,Pp.jsx=n,Pp.jsxs=n,Pp}var DS;function SO(){return DS||(DS=1,Qb.exports=_O()),Qb.exports}var N=SO(),Jb={exports:{}},vt={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var zS;function EO(){if(zS)return vt;zS=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function v(K){return K===null||typeof K!="object"?null:(K=b&&K[b]||K["@@iterator"],typeof K=="function"?K:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,T={};function w(K,te,U){this.props=K,this.context=te,this.refs=T,this.updater=U||S}w.prototype.isReactComponent={},w.prototype.setState=function(K,te){if(typeof K!="object"&&typeof K!="function"&&K!=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,K,te,"setState")},w.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function k(){}k.prototype=w.prototype;function M(K,te,U){this.props=K,this.context=te,this.refs=T,this.updater=U||S}var O=M.prototype=new k;O.constructor=M,C(O,w.prototype),O.isPureReactComponent=!0;var H=Array.isArray;function z(){}var F={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function j(K,te,U){var le=U.ref;return{$$typeof:t,type:K,key:te,ref:le!==void 0?le:null,props:U}}function I(K,te){return j(K.type,te,K.props)}function Y(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function X(K){var te={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(U){return te[U]})}var ne=/\/+/g;function q(K,te){return typeof K=="object"&&K!==null&&K.key!=null?X(""+K.key):te.toString(36)}function J(K){switch(K.status){case"fulfilled":return K.value;case"rejected":throw K.reason;default:switch(typeof K.status=="string"?K.then(z,z):(K.status="pending",K.then(function(te){K.status==="pending"&&(K.status="fulfilled",K.value=te)},function(te){K.status==="pending"&&(K.status="rejected",K.reason=te)})),K.status){case"fulfilled":return K.value;case"rejected":throw K.reason}}throw K}function B(K,te,U,le,de){var ge=typeof K;(ge==="undefined"||ge==="boolean")&&(K=null);var se=!1;if(K===null)se=!0;else switch(ge){case"bigint":case"string":case"number":se=!0;break;case"object":switch(K.$$typeof){case t:case e:se=!0;break;case m:return se=K._init,B(se(K._payload),te,U,le,de)}}if(se)return de=de(K),se=le===""?"."+q(K,0):le,H(de)?(U="",se!=null&&(U=se.replace(ne,"$&/")+"/"),B(de,te,U,"",function(Le){return Le})):de!=null&&(Y(de)&&(de=I(de,U+(de.key==null||K&&K.key===de.key?"":(""+de.key).replace(ne,"$&/")+"/")+se)),te.push(de)),1;se=0;var pe=le===""?".":le+":";if(H(K))for(var Ae=0;Ae<K.length;Ae++)le=K[Ae],ge=pe+q(le,Ae),se+=B(le,te,U,ge,de);else if(Ae=v(K),typeof Ae=="function")for(K=Ae.call(K),Ae=0;!(le=K.next()).done;)le=le.value,ge=pe+q(le,Ae++),se+=B(le,te,U,ge,de);else if(ge==="object"){if(typeof K.then=="function")return B(J(K),te,U,le,de);throw te=String(K),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return se}function V(K,te,U){if(K==null)return K;var le=[],de=0;return B(K,le,"","",function(ge){return te.call(U,ge,de++)}),le}function Z(K){if(K._status===-1){var te=K._result;te=te(),te.then(function(U){(K._status===0||K._status===-1)&&(K._status=1,K._result=U)},function(U){(K._status===0||K._status===-1)&&(K._status=2,K._result=U)}),K._status===-1&&(K._status=0,K._result=te)}if(K._status===1)return K._result.default;throw K._result}var Q=typeof reportError=="function"?reportError:function(K){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof K=="object"&&K!==null&&typeof K.message=="string"?String(K.message):String(K),error:K});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",K);return}console.error(K)},G={map:V,forEach:function(K,te,U){V(K,function(){te.apply(this,arguments)},U)},count:function(K){var te=0;return V(K,function(){te++}),te},toArray:function(K){return V(K,function(te){return te})||[]},only:function(K){if(!Y(K))throw Error("React.Children.only expected to receive a single React element child.");return K}};return vt.Activity=g,vt.Children=G,vt.Component=w,vt.Fragment=n,vt.Profiler=r,vt.PureComponent=M,vt.StrictMode=i,vt.Suspense=d,vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,vt.__COMPILER_RUNTIME={__proto__:null,c:function(K){return F.H.useMemoCache(K)}},vt.cache=function(K){return function(){return K.apply(null,arguments)}},vt.cacheSignal=function(){return null},vt.cloneElement=function(K,te,U){if(K==null)throw Error("The argument must be a React element, but you passed "+K+".");var le=C({},K.props),de=K.key;if(te!=null)for(ge in te.key!==void 0&&(de=""+te.key),te)!$.call(te,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&te.ref===void 0||(le[ge]=te[ge]);var ge=arguments.length-2;if(ge===1)le.children=U;else if(1<ge){for(var se=Array(ge),pe=0;pe<ge;pe++)se[pe]=arguments[pe+2];le.children=se}return j(K.type,de,le)},vt.createContext=function(K){return K={$$typeof:l,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null},K.Provider=K,K.Consumer={$$typeof:s,_context:K},K},vt.createElement=function(K,te,U){var le,de={},ge=null;if(te!=null)for(le in te.key!==void 0&&(ge=""+te.key),te)$.call(te,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(de[le]=te[le]);var se=arguments.length-2;if(se===1)de.children=U;else if(1<se){for(var pe=Array(se),Ae=0;Ae<se;Ae++)pe[Ae]=arguments[Ae+2];de.children=pe}if(K&&K.defaultProps)for(le in se=K.defaultProps,se)de[le]===void 0&&(de[le]=se[le]);return j(K,ge,de)},vt.createRef=function(){return{current:null}},vt.forwardRef=function(K){return{$$typeof:c,render:K}},vt.isValidElement=Y,vt.lazy=function(K){return{$$typeof:m,_payload:{_status:-1,_result:K},_init:Z}},vt.memo=function(K,te){return{$$typeof:p,type:K,compare:te===void 0?null:te}},vt.startTransition=function(K){var te=F.T,U={};F.T=U;try{var le=K(),de=F.S;de!==null&&de(U,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(z,Q)}catch(ge){Q(ge)}finally{te!==null&&U.types!==null&&(te.types=U.types),F.T=te}},vt.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},vt.use=function(K){return F.H.use(K)},vt.useActionState=function(K,te,U){return F.H.useActionState(K,te,U)},vt.useCallback=function(K,te){return F.H.useCallback(K,te)},vt.useContext=function(K){return F.H.useContext(K)},vt.useDebugValue=function(){},vt.useDeferredValue=function(K,te){return F.H.useDeferredValue(K,te)},vt.useEffect=function(K,te){return F.H.useEffect(K,te)},vt.useEffectEvent=function(K){return F.H.useEffectEvent(K)},vt.useId=function(){return F.H.useId()},vt.useImperativeHandle=function(K,te,U){return F.H.useImperativeHandle(K,te,U)},vt.useInsertionEffect=function(K,te){return F.H.useInsertionEffect(K,te)},vt.useLayoutEffect=function(K,te){return F.H.useLayoutEffect(K,te)},vt.useMemo=function(K,te){return F.H.useMemo(K,te)},vt.useOptimistic=function(K,te){return F.H.useOptimistic(K,te)},vt.useReducer=function(K,te,U){return F.H.useReducer(K,te,U)},vt.useRef=function(K){return F.H.useRef(K)},vt.useState=function(K){return F.H.useState(K)},vt.useSyncExternalStore=function(K,te,U){return F.H.useSyncExternalStore(K,te,U)},vt.useTransition=function(){return F.H.useTransition()},vt.version="19.2.4",vt}var BS;function ph(){return BS||(BS=1,Jb.exports=EO()),Jb.exports}var P=ph();const sm=lu(P);var ex={exports:{}},Gp={},tx={exports:{}},nx={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var LS;function wO(){return LS||(LS=1,(function(t){function e(B,V){var Z=B.length;B.push(V);e:for(;0<Z;){var Q=Z-1>>>1,G=B[Q];if(0<r(G,V))B[Q]=V,B[Z]=G,Z=Q;else break e}}function n(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var V=B[0],Z=B.pop();if(Z!==V){B[0]=Z;e:for(var Q=0,G=B.length,K=G>>>1;Q<K;){var te=2*(Q+1)-1,U=B[te],le=te+1,de=B[le];if(0>r(U,Z))le<G&&0>r(de,U)?(B[Q]=de,B[le]=Z,Q=le):(B[Q]=U,B[te]=Z,Q=te);else if(le<G&&0>r(de,Z))B[Q]=de,B[le]=Z,Q=le;else break e}}return V}function r(B,V){var Z=B.sortIndex-V.sortIndex;return Z!==0?Z:B.id-V.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var d=[],p=[],m=1,g=null,b=3,v=!1,S=!1,C=!1,T=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var V=n(p);V!==null;){if(V.callback===null)i(p);else if(V.startTime<=B)i(p),V.sortIndex=V.expirationTime,e(d,V);else break;V=n(p)}}function H(B){if(C=!1,O(B),!S)if(n(d)!==null)S=!0,z||(z=!0,X());else{var V=n(p);V!==null&&J(H,V.startTime-B)}}var z=!1,F=-1,$=5,j=-1;function I(){return T?!0:!(t.unstable_now()-j<$)}function Y(){if(T=!1,z){var B=t.unstable_now();j=B;var V=!0;try{e:{S=!1,C&&(C=!1,k(F),F=-1),v=!0;var Z=b;try{t:{for(O(B),g=n(d);g!==null&&!(g.expirationTime>B&&I());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,b=g.priorityLevel;var G=Q(g.expirationTime<=B);if(B=t.unstable_now(),typeof G=="function"){g.callback=G,O(B),V=!0;break t}g===n(d)&&i(d),O(B)}else i(d);g=n(d)}if(g!==null)V=!0;else{var K=n(p);K!==null&&J(H,K.startTime-B),V=!1}}break e}finally{g=null,b=Z,v=!1}V=void 0}}finally{V?X():z=!1}}}var X;if(typeof M=="function")X=function(){M(Y)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,q=ne.port2;ne.port1.onmessage=Y,X=function(){q.postMessage(null)}}else X=function(){w(Y,0)};function J(B,V){F=w(function(){B(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var V=3;break;default:V=b}var Z=b;b=V;try{return B()}finally{b=Z}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(B,V){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Z=b;b=B;try{return V()}finally{b=Z}},t.unstable_scheduleCallback=function(B,V,Z){var Q=t.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?Q+Z:Q):Z=Q,B){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Z+G,B={id:m++,callback:V,priorityLevel:B,startTime:Z,expirationTime:G,sortIndex:-1},Z>Q?(B.sortIndex=Z,e(p,B),n(d)===null&&B===n(p)&&(C?(k(F),F=-1):C=!0,J(H,Z-Q))):(B.sortIndex=G,e(d,B),S||v||(S=!0,z||(z=!0,X()))),B},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(B){var V=b;return function(){var Z=b;b=V;try{return B.apply(this,arguments)}finally{b=Z}}}})(nx)),nx}var US;function TO(){return US||(US=1,tx.exports=wO()),tx.exports}var ix={exports:{}},kr={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var IS;function CO(){if(IS)return kr;IS=1;var t=ph();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(d,p,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:g==null?null:""+g,children:d,containerInfo:p,implementation:m}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return kr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,kr.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return s(d,p,null,m)},kr.flushSync=function(d){var p=l.T,m=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=p,i.p=m,i.d.f()}},kr.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(d,p))},kr.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},kr.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,g=c(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?i.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:v}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:b,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},kr.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=c(p.as,p.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(d)},kr.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,g=c(m,p.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},kr.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=c(p.as,p.crossOrigin);i.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(d)},kr.requestFormReset=function(d){i.d.r(d)},kr.unstable_batchedUpdates=function(d,p){return d(p)},kr.useFormState=function(d,p,m){return l.H.useFormState(d,p,m)},kr.useFormStatus=function(){return l.H.useHostTransitionStatus()},kr.version="19.2.4",kr}var HS;function sC(){if(HS)return ix.exports;HS=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ix.exports=CO(),ix.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var jS;function AO(){if(jS)return Gp;jS=1;var t=TO(),e=ph(),n=sC();function i(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)o+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+a+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function s(a){var o=a,h=a;if(a.alternate)for(;o.return;)o=o.return;else{a=o;do o=a,(o.flags&4098)!==0&&(h=o.return),a=o.return;while(a)}return o.tag===3?h:null}function l(a){if(a.tag===13){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function c(a){if(a.tag===31){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function d(a){if(s(a)!==a)throw Error(i(188))}function p(a){var o=a.alternate;if(!o){if(o=s(a),o===null)throw Error(i(188));return o!==a?null:a}for(var h=a,y=o;;){var _=h.return;if(_===null)break;var A=_.alternate;if(A===null){if(y=_.return,y!==null){h=y;continue}break}if(_.child===A.child){for(A=_.child;A;){if(A===h)return d(_),a;if(A===y)return d(_),o;A=A.sibling}throw Error(i(188))}if(h.return!==y.return)h=_,y=A;else{for(var L=!1,W=_.child;W;){if(W===h){L=!0,h=_,y=A;break}if(W===y){L=!0,y=_,h=A;break}W=W.sibling}if(!L){for(W=A.child;W;){if(W===h){L=!0,h=A,y=_;break}if(W===y){L=!0,y=A,h=_;break}W=W.sibling}if(!L)throw Error(i(189))}}if(h.alternate!==y)throw Error(i(190))}if(h.tag!==3)throw Error(i(188));return h.stateNode.current===h?a:o}function m(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a;for(a=a.child;a!==null;){if(o=m(a),o!==null)return o;a=a.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),M=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function X(a){return a===null||typeof a!="object"?null:(a=Y&&a[Y]||a["@@iterator"],typeof a=="function"?a:null)}var ne=Symbol.for("react.client.reference");function q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ne?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case C:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case H:return"Suspense";case z:return"SuspenseList";case j:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case M:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case O:var o=a.render;return a=a.displayName,a||(a=o.displayName||o.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case F:return o=a.displayName||null,o!==null?o:q(a.type)||"Memo";case $:o=a._payload,a=a._init;try{return q(a(o))}catch{}}return null}var J=Array.isArray,B=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},Q=[],G=-1;function K(a){return{current:a}}function te(a){0>G||(a.current=Q[G],Q[G]=null,G--)}function U(a,o){G++,Q[G]=a.current,a.current=o}var le=K(null),de=K(null),ge=K(null),se=K(null);function pe(a,o){switch(U(ge,o),U(de,a),U(le,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?eS(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=eS(o),a=tS(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(le),U(le,a)}function Ae(){te(le),te(de),te(ge)}function Le(a){a.memoizedState!==null&&U(se,a);var o=le.current,h=tS(o,a.type);o!==h&&(U(de,a),U(le,h))}function Ge(a){de.current===a&&(te(le),te(de)),se.current===a&&(te(se),Up._currentValue=Z)}var Pe,Ie;function We(a){if(Pe===void 0)try{throw Error()}catch(h){var o=h.stack.trim().match(/\n( *(at )?)/);Pe=o&&o[1]||"",Ie=-1<h.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Pe+a+Ie}var ut=!1;function Ue(a,o){if(!a||ut)return"";ut=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(o){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(ve){var be=ve}Reflect.construct(a,[],Ce)}else{try{Ce.call()}catch(ve){be=ve}a.call(Ce.prototype)}}else{try{throw Error()}catch(ve){be=ve}(Ce=a())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(ve){if(ve&&be&&typeof ve.stack=="string")return[ve.stack,be.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=y.DetermineComponentFrameRoot(),L=A[0],W=A[1];if(L&&W){var re=L.split(`
|
|
45
|
+
`),me=W.split(`
|
|
46
|
+
`);for(_=y=0;y<re.length&&!re[y].includes("DetermineComponentFrameRoot");)y++;for(;_<me.length&&!me[_].includes("DetermineComponentFrameRoot");)_++;if(y===re.length||_===me.length)for(y=re.length-1,_=me.length-1;1<=y&&0<=_&&re[y]!==me[_];)_--;for(;1<=y&&0<=_;y--,_--)if(re[y]!==me[_]){if(y!==1||_!==1)do if(y--,_--,0>_||re[y]!==me[_]){var Se=`
|
|
47
|
+
`+re[y].replace(" at new "," at ");return a.displayName&&Se.includes("<anonymous>")&&(Se=Se.replace("<anonymous>",a.displayName)),Se}while(1<=y&&0<=_);break}}}finally{ut=!1,Error.prepareStackTrace=h}return(h=a?a.displayName||a.name:"")?We(h):""}function At(a,o){switch(a.tag){case 26:case 27:case 5:return We(a.type);case 16:return We("Lazy");case 13:return a.child!==o&&o!==null?We("Suspense Fallback"):We("Suspense");case 19:return We("SuspenseList");case 0:case 15:return Ue(a.type,!1);case 11:return Ue(a.type.render,!1);case 1:return Ue(a.type,!0);case 31:return We("Activity");default:return""}}function zn(a){try{var o="",h=null;do o+=At(a,h),h=a,a=a.return;while(a);return o}catch(y){return`
|
|
48
|
+
Error generating stack: `+y.message+`
|
|
49
|
+
`+y.stack}}var Bn=Object.prototype.hasOwnProperty,bn=t.unstable_scheduleCallback,wi=t.unstable_cancelCallback,ka=t.unstable_shouldYield,Lr=t.unstable_requestPaint,hn=t.unstable_now,ua=t.unstable_getCurrentPriorityLevel,_e=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,bt=t.unstable_LowPriority,kt=t.unstable_IdlePriority,yi=t.log,rr=t.unstable_setDisableYieldValue,xn=null,$t=null;function Gn(a){if(typeof yi=="function"&&rr(a),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(xn,a)}catch{}}var Pt=Math.clz32?Math.clz32:go,Fi=Math.log,Qn=Math.LN2;function go(a){return a>>>=0,a===0?32:31-(Fi(a)/Qn|0)|0}var rs=256,Oa=262144,as=4194304;function bi(a){var o=a&42;if(o!==0)return o;switch(a&-a){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:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function ae(a,o,h){var y=a.pendingLanes;if(y===0)return 0;var _=0,A=a.suspendedLanes,L=a.pingedLanes;a=a.warmLanes;var W=y&134217727;return W!==0?(y=W&~A,y!==0?_=bi(y):(L&=W,L!==0?_=bi(L):h||(h=W&~a,h!==0&&(_=bi(h))))):(W=y&~A,W!==0?_=bi(W):L!==0?_=bi(L):h||(h=y&~a,h!==0&&(_=bi(h)))),_===0?0:o!==0&&o!==_&&(o&A)===0&&(A=_&-_,h=o&-o,A>=h||A===32&&(h&4194048)!==0)?o:_}function Ee(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function ze(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 et(){var a=as;return as<<=1,(as&62914560)===0&&(as=4194304),a}function Jt(a){for(var o=[],h=0;31>h;h++)o.push(a);return o}function en(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Fe(a,o,h,y,_,A){var L=a.pendingLanes;a.pendingLanes=h,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=h,a.entangledLanes&=h,a.errorRecoveryDisabledLanes&=h,a.shellSuspendCounter=0;var W=a.entanglements,re=a.expirationTimes,me=a.hiddenUpdates;for(h=L&~h;0<h;){var Se=31-Pt(h),Ce=1<<Se;W[Se]=0,re[Se]=-1;var be=me[Se];if(be!==null)for(me[Se]=null,Se=0;Se<be.length;Se++){var ve=be[Se];ve!==null&&(ve.lane&=-536870913)}h&=~Ce}y!==0&&He(a,y,0),A!==0&&_===0&&a.tag!==0&&(a.suspendedLanes|=A&~(L&~o))}function He(a,o,h){a.pendingLanes|=o,a.suspendedLanes&=~o;var y=31-Pt(o);a.entangledLanes|=o,a.entanglements[y]=a.entanglements[y]|1073741824|h&261930}function tt(a,o){var h=a.entangledLanes|=o;for(a=a.entanglements;h;){var y=31-Pt(h),_=1<<y;_&o|a[y]&o&&(a[y]|=o),h&=~_}}function Cn(a,o){var h=o&-o;return h=(h&42)!==0?1:Gt(h),(h&(a.suspendedLanes|o))!==0?0:h}function Gt(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function fa(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ar(){var a=V.p;return a!==0?a:(a=window.event,a===void 0?32:wS(a.type))}function qi(a,o){var h=V.p;try{return V.p=a,o()}finally{V.p=h}}var sr=Math.random().toString(36).slice(2),yt="__reactFiber$"+sr,li="__reactProps$"+sr,Ur="__reactContainer$"+sr,Bs="__reactEvents$"+sr,_l="__reactListeners$"+sr,Sl="__reactHandles$"+sr,El="__reactResources$"+sr,Da="__reactMarker$"+sr;function Ls(a){delete a[yt],delete a[li],delete a[Bs],delete a[_l],delete a[Sl]}function tn(a){var o=a[yt];if(o)return o;for(var h=a.parentNode;h;){if(o=h[Ur]||h[yt]){if(h=o.alternate,o.child!==null||h!==null&&h.child!==null)for(a=oS(a);a!==null;){if(h=a[yt])return h;a=oS(a)}return o}a=h,h=a.parentNode}return null}function nn(a){if(a=a[yt]||a[Ur]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function lr(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(i(33))}function Ir(a){var o=a[El];return o||(o=a[El]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ln(a){a[Da]=!0}var xr=new Set,da={};function Hr(a,o){Me(a,o),Me(a+"Capture",o)}function Me(a,o){for(da[a]=o,a=0;a<o.length;a++)xr.add(o[a])}var Ve=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]*$"),xt={},Xt={};function Un(a){return Bn.call(Xt,a)?!0:Bn.call(xt,a)?!1:Ve.test(a)?Xt[a]=!0:(xt[a]=!0,!1)}function xi(a,o,h){if(Un(o))if(h===null)a.removeAttribute(o);else{switch(typeof h){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var y=o.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+h)}}function Yi(a,o,h){if(h===null)a.removeAttribute(o);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+h)}}function Ti(a,o,h,y){if(y===null)a.removeAttribute(h);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(h);return}a.setAttributeNS(o,h,""+y)}}function un(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function or(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function yo(a,o,h){var y=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var _=y.get,A=y.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return _.call(this)},set:function(L){h=""+L,A.call(this,L)}}),Object.defineProperty(a,o,{enumerable:y.enumerable}),{getValue:function(){return h},setValue:function(L){h=""+L},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function ha(a){if(!a._valueTracker){var o=or(a)?"checked":"value";a._valueTracker=yo(a,o,""+a[o])}}function wl(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var h=o.getValue(),y="";return a&&(y=or(a)?a.checked?"true":"false":a.value),a=y,a!==h?(o.setValue(a),!0):!1}function za(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var oc=/[\n"\\]/g;function Di(a){return a.replace(oc,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function ss(a,o,h,y,_,A,L,W){a.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.type=L:a.removeAttribute("type"),o!=null?L==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+un(o)):a.value!==""+un(o)&&(a.value=""+un(o)):L!=="submit"&&L!=="reset"||a.removeAttribute("value"),o!=null?Us(a,L,un(o)):h!=null?Us(a,L,un(h)):y!=null&&a.removeAttribute("value"),_==null&&A!=null&&(a.defaultChecked=!!A),_!=null&&(a.checked=_&&typeof _!="function"&&typeof _!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?a.name=""+un(W):a.removeAttribute("name")}function ls(a,o,h,y,_,A,L,W){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(a.type=A),o!=null||h!=null){if(!(A!=="submit"&&A!=="reset"||o!=null)){ha(a);return}h=h!=null?""+un(h):"",o=o!=null?""+un(o):h,W||o===a.value||(a.value=o),a.defaultValue=o}y=y??_,y=typeof y!="function"&&typeof y!="symbol"&&!!y,a.checked=W?a.checked:!!y,a.defaultChecked=!!y,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(a.name=L),ha(a)}function Us(a,o,h){o==="number"&&za(a.ownerDocument)===a||a.defaultValue===""+h||(a.defaultValue=""+h)}function oi(a,o,h,y){if(a=a.options,o){o={};for(var _=0;_<h.length;_++)o["$"+h[_]]=!0;for(h=0;h<a.length;h++)_=o.hasOwnProperty("$"+a[h].value),a[h].selected!==_&&(a[h].selected=_),_&&y&&(a[h].defaultSelected=!0)}else{for(h=""+un(h),o=null,_=0;_<a.length;_++){if(a[_].value===h){a[_].selected=!0,y&&(a[_].defaultSelected=!0);return}o!==null||a[_].disabled||(o=a[_])}o!==null&&(o.selected=!0)}}function cu(a,o,h){if(o!=null&&(o=""+un(o),o!==a.value&&(a.value=o),h==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=h!=null?""+un(h):""}function Ba(a,o,h,y){if(o==null){if(y!=null){if(h!=null)throw Error(i(92));if(J(y)){if(1<y.length)throw Error(i(93));y=y[0]}h=y}h==null&&(h=""),o=h}h=un(o),a.defaultValue=h,y=a.textContent,y===h&&y!==""&&y!==null&&(a.value=y),ha(a)}function it(a,o){if(o){var h=a.firstChild;if(h&&h===a.lastChild&&h.nodeType===3){h.nodeValue=o;return}}a.textContent=o}var bo=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 Hn(a,o,h){var y=o.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?y?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":y?a.setProperty(o,h):typeof h!="number"||h===0||bo.has(o)?o==="float"?a.cssFloat=h:a[o]=(""+h).trim():a[o]=h+"px"}function rn(a,o,h){if(o!=null&&typeof o!="object")throw Error(i(62));if(a=a.style,h!=null){for(var y in h)!h.hasOwnProperty(y)||o!=null&&o.hasOwnProperty(y)||(y.indexOf("--")===0?a.setProperty(y,""):y==="float"?a.cssFloat="":a[y]="");for(var _ in o)y=o[_],o.hasOwnProperty(_)&&h[_]!==y&&Hn(a,_,y)}else for(var A in o)o.hasOwnProperty(A)&&Hn(a,A,o[A])}function os(a){if(a.indexOf("-")===-1)return!1;switch(a){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 cs=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"]]),cc=/^[\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 Is(a){return cc.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function De(){}var qe=null;function mt(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Nt=null,An=null;function jr(a){var o=nn(a);if(o&&(a=o.stateNode)){var h=a[li]||null;e:switch(a=o.stateNode,o.type){case"input":if(ss(a,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),o=h.name,h.type==="radio"&&o!=null){for(h=a;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Di(""+o)+'"][type="radio"]'),o=0;o<h.length;o++){var y=h[o];if(y!==a&&y.form===a.form){var _=y[li]||null;if(!_)throw Error(i(90));ss(y,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(o=0;o<h.length;o++)y=h[o],y.form===a.form&&wl(y)}break e;case"textarea":cu(a,h.value,h.defaultValue);break e;case"select":o=h.value,o!=null&&oi(a,!!h.multiple,o,!1)}}}var uc=!1;function uu(a,o,h){if(uc)return a(o,h);uc=!0;try{var y=a(o);return y}finally{if(uc=!1,(Nt!==null||An!==null)&&(ee(),Nt&&(o=Nt,a=An,An=Nt=null,jr(o),a)))for(o=0;o<a.length;o++)jr(a[o])}}function xo(a,o){var h=a.stateNode;if(h===null)return null;var y=h[li]||null;if(y===null)return null;h=y[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(h&&typeof h!="function")throw Error(i(231,o,typeof h));return h}var us=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=!1;if(us)try{var fu={};Object.defineProperty(fu,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",fu,fu),window.removeEventListener("test",fu,fu)}catch{Cf=!1}var Tl=null,Af=null,Cl=null;function Mf(){if(Cl)return Cl;var a,o=Af,h=o.length,y,_="value"in Tl?Tl.value:Tl.textContent,A=_.length;for(a=0;a<h&&o[a]===_[a];a++);var L=h-a;for(y=1;y<=L&&o[h-y]===_[A-y];y++);return Cl=_.slice(a,1<y?1-y:void 0)}function vo(a){var o=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function du(){return!0}function vh(){return!1}function Vi(a){function o(h,y,_,A,L){this._reactName=h,this._targetInst=_,this.type=y,this.nativeEvent=A,this.target=L,this.currentTarget=null;for(var W in a)a.hasOwnProperty(W)&&(h=a[W],this[W]=h?h(A):A[W]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?du:vh,this.isPropagationStopped=vh,this}return g(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=du)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=du)},persist:function(){},isPersistent:du}),o}var Al={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hu=Vi(Al),La=g({},Al,{view:0,detail:0}),Rf=Vi(La),Nf,pu,fc,mu=g({},La,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yu,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==fc&&(fc&&a.type==="mousemove"?(Nf=a.screenX-fc.screenX,pu=a.screenY-fc.screenY):pu=Nf=0,fc=a),Nf)},movementY:function(a){return"movementY"in a?a.movementY:pu}}),ng=Vi(mu),zi=g({},mu,{dataTransfer:0}),ig=Vi(zi),rg=g({},La,{relatedTarget:0}),kf=Vi(rg),ag=g({},Al,{animationName:0,elapsedTime:0,pseudoElement:0}),sg=Vi(ag),gu=g({},Al,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),_h=Vi(gu),lg=g({},Al,{data:0}),Sh=Vi(lg),og={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Eh={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"},wh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cg(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=wh[a])?!!o[a]:!1}function yu(){return cg}var Th=g({},La,{key:function(a){if(a.key){var o=og[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=vo(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Eh[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yu,charCode:function(a){return a.type==="keypress"?vo(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?vo(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Ch=Vi(Th),ug=g({},mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Of=Vi(ug),fg=g({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yu}),Hs=Vi(fg),Ah=g({},Al,{propertyName:0,elapsedTime:0,pseudoElement:0}),yb=Vi(Ah),dg=g({},mu,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Ml=Vi(dg),js=g({},Al,{newState:0,oldState:0}),Mh=Vi(js),Rh=[9,13,27,32],_o=us&&"CompositionEvent"in window,Rl=null;us&&"documentMode"in document&&(Rl=document.documentMode);var So=us&&"TextEvent"in window&&!Rl,Bi=us&&(!_o||Rl&&8<Rl&&11>=Rl),bu=" ",Nh=!1;function Df(a,o){switch(a){case"keyup":return Rh.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dc(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Nl=!1;function zf(a,o){switch(a){case"compositionend":return dc(o);case"keypress":return o.which!==32?null:(Nh=!0,bu);case"textInput":return a=o.data,a===bu&&Nh?null:a;default:return null}}function hg(a,o){if(Nl)return a==="compositionend"||!_o&&Df(a,o)?(a=Mf(),Cl=Af=Tl=null,Nl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Bi&&o.locale!=="ko"?null:o.data;default:return null}}var Pr={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 kh(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!Pr[a.type]:o==="textarea"}function Bf(a,o,h,y){Nt?An?An.push(y):An=[y]:Nt=y,o=ry(o,"onChange"),0<o.length&&(h=new hu("onChange","change",null,h,y),a.push({event:h,listeners:o}))}var hc=null,pc=null;function Oh(a){K1(a,0)}function mc(a){var o=lr(a);if(wl(o))return a}function Dh(a,o){if(a==="change")return o}var xu=!1;if(us){var Eo;if(us){var Mn="oninput"in document;if(!Mn){var pg=document.createElement("div");pg.setAttribute("oninput","return;"),Mn=typeof pg.oninput=="function"}Eo=Mn}else Eo=!1;xu=Eo&&(!document.documentMode||9<document.documentMode)}function mg(){hc&&(hc.detachEvent("onpropertychange",zh),pc=hc=null)}function zh(a){if(a.propertyName==="value"&&mc(pc)){var o=[];Bf(o,pc,a,mt(a)),uu(Oh,o)}}function vu(a,o,h){a==="focusin"?(mg(),hc=o,pc=h,hc.attachEvent("onpropertychange",zh)):a==="focusout"&&mg()}function kl(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return mc(pc)}function gg(a,o){if(a==="click")return mc(o)}function yg(a,o){if(a==="input"||a==="change")return mc(o)}function wo(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var Rn=typeof Object.is=="function"?Object.is:wo;function gc(a,o){if(Rn(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var h=Object.keys(a),y=Object.keys(o);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var _=h[y];if(!Bn.call(o,_)||!Rn(a[_],o[_]))return!1}return!0}function Bh(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Lh(a,o){var h=Bh(a);a=0;for(var y;h;){if(h.nodeType===3){if(y=a+h.textContent.length,a<=o&&y>=o)return{node:h,offset:o-a};a=y}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Bh(h)}}function Lf(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?Lf(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function Uf(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=za(a.document);o instanceof a.HTMLIFrameElement;){try{var h=typeof o.contentWindow.location.href=="string"}catch{h=!1}if(h)a=o.contentWindow;else break;o=za(a.document)}return o}function yc(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var bg=us&&"documentMode"in document&&11>=document.documentMode,bc=null,If=null,xc=null,Gr=!1;function Hf(a,o,h){var y=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Gr||bc==null||bc!==za(y)||(y=bc,"selectionStart"in y&&yc(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),xc&&gc(xc,y)||(xc=y,y=ry(If,"onSelect"),0<y.length&&(o=new hu("onSelect","select",null,o,h),a.push({event:o,listeners:y}),o.target=bc)))}function Ol(a,o){var h={};return h[a.toLowerCase()]=o.toLowerCase(),h["Webkit"+a]="webkit"+o,h["Moz"+a]="moz"+o,h}var vc={animationend:Ol("Animation","AnimationEnd"),animationiteration:Ol("Animation","AnimationIteration"),animationstart:Ol("Animation","AnimationStart"),transitionrun:Ol("Transition","TransitionRun"),transitionstart:Ol("Transition","TransitionStart"),transitioncancel:Ol("Transition","TransitionCancel"),transitionend:Ol("Transition","TransitionEnd")},_u={},cr={};us&&(cr=document.createElement("div").style,"AnimationEvent"in window||(delete vc.animationend.animation,delete vc.animationiteration.animation,delete vc.animationstart.animation),"TransitionEvent"in window||delete vc.transitionend.transition);function Dl(a){if(_u[a])return _u[a];if(!vc[a])return a;var o=vc[a],h;for(h in o)if(o.hasOwnProperty(h)&&h in cr)return _u[a]=o[h];return a}var vr=Dl("animationend"),Uh=Dl("animationiteration"),fs=Dl("animationstart"),_c=Dl("transitionrun"),zl=Dl("transitionstart"),Ih=Dl("transitioncancel"),jf=Dl("transitionend"),Ps=new Map,Pf="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(" ");Pf.push("scrollEnd");function Xi(a,o){Ps.set(a,o),Hr(o,[a])}var Bl=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Ci=[],To=0,Gf=0;function Ll(){for(var a=To,o=Gf=To=0;o<a;){var h=Ci[o];Ci[o++]=null;var y=Ci[o];Ci[o++]=null;var _=Ci[o];Ci[o++]=null;var A=Ci[o];if(Ci[o++]=null,y!==null&&_!==null){var L=y.pending;L===null?_.next=_:(_.next=L.next,L.next=_),y.pending=_}A!==0&&Ff(h,_,A)}}function Su(a,o,h,y){Ci[To++]=a,Ci[To++]=o,Ci[To++]=h,Ci[To++]=y,Gf|=y,a.lanes|=y,a=a.alternate,a!==null&&(a.lanes|=y)}function Sc(a,o,h,y){return Su(a,o,h,y),Ec(a)}function Ul(a,o){return Su(a,null,null,o),Ec(a)}function Ff(a,o,h){a.lanes|=h;var y=a.alternate;y!==null&&(y.lanes|=h);for(var _=!1,A=a.return;A!==null;)A.childLanes|=h,y=A.alternate,y!==null&&(y.childLanes|=h),A.tag===22&&(a=A.stateNode,a===null||a._visibility&1||(_=!0)),a=A,A=A.return;return a.tag===3?(A=a.stateNode,_&&o!==null&&(_=31-Pt(h),a=A.hiddenUpdates,y=a[_],y===null?a[_]=[o]:y.push(o),o.lane=h|536870912),A):null}function Ec(a){if(50<Go)throw Go=0,Fo=null,Error(i(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var Il={};function xg(a,o,h,y){this.tag=a,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(a,o,h,y){return new xg(a,o,h,y)}function fr(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ds(a,o){var h=a.alternate;return h===null?(h=ur(a.tag,o,a.key,a.mode),h.elementType=a.elementType,h.type=a.type,h.stateNode=a.stateNode,h.alternate=a,a.alternate=h):(h.pendingProps=o,h.type=a.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=a.flags&65011712,h.childLanes=a.childLanes,h.lanes=a.lanes,h.child=a.child,h.memoizedProps=a.memoizedProps,h.memoizedState=a.memoizedState,h.updateQueue=a.updateQueue,o=a.dependencies,h.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},h.sibling=a.sibling,h.index=a.index,h.ref=a.ref,h.refCleanup=a.refCleanup,h}function Ki(a,o){a.flags&=65011714;var h=a.alternate;return h===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=h.childLanes,a.lanes=h.lanes,a.child=h.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=h.memoizedProps,a.memoizedState=h.memoizedState,a.updateQueue=h.updateQueue,a.type=h.type,o=h.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function Eu(a,o,h,y,_,A){var L=0;if(y=a,typeof a=="function")fr(a)&&(L=1);else if(typeof a=="string")L=lO(a,h,le.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case j:return a=ur(31,h,o,_),a.elementType=j,a.lanes=A,a;case C:return Gs(h.children,_,A,o);case T:L=8,_|=24;break;case w:return a=ur(12,h,o,_|2),a.elementType=w,a.lanes=A,a;case H:return a=ur(13,h,o,_),a.elementType=H,a.lanes=A,a;case z:return a=ur(19,h,o,_),a.elementType=z,a.lanes=A,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case M:L=10;break e;case k:L=9;break e;case O:L=11;break e;case F:L=14;break e;case $:L=16,y=null;break e}L=29,h=Error(i(130,a===null?"null":typeof a,"")),y=null}return o=ur(L,h,o,_),o.elementType=a,o.type=y,o.lanes=A,o}function Gs(a,o,h,y){return a=ur(7,a,y,o),a.lanes=h,a}function qf(a,o,h){return a=ur(6,a,null,o),a.lanes=h,a}function vg(a){var o=ur(18,null,null,0);return o.stateNode=a,o}function Ua(a,o,h){return o=ur(4,a.children!==null?a.children:[],a.key,o),o.lanes=h,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var Hh=new WeakMap;function _r(a,o){if(typeof a=="object"&&a!==null){var h=Hh.get(a);return h!==void 0?h:(o={value:a,source:o,stack:zn(o)},Hh.set(a,o),o)}return{value:a,source:o,stack:zn(o)}}var Ia=[],Co=0,wu=null,wc=0,Fr=[],Sr=0,hs=null,ps=1,ms="";function Fs(a,o){Ia[Co++]=wc,Ia[Co++]=wu,wu=a,wc=o}function jh(a,o,h){Fr[Sr++]=ps,Fr[Sr++]=ms,Fr[Sr++]=hs,hs=a;var y=ps;a=ms;var _=32-Pt(y)-1;y&=~(1<<_),h+=1;var A=32-Pt(o)+_;if(30<A){var L=_-_%5;A=(y&(1<<L)-1).toString(32),y>>=L,_-=L,ps=1<<32-Pt(o)+_|h<<_|y,ms=A+a}else ps=1<<A|h<<_|y,ms=a}function Yf(a){a.return!==null&&(Fs(a,1),jh(a,1,0))}function Hl(a){for(;a===wu;)wu=Ia[--Co],Ia[Co]=null,wc=Ia[--Co],Ia[Co]=null;for(;a===hs;)hs=Fr[--Sr],Fr[Sr]=null,ms=Fr[--Sr],Fr[Sr]=null,ps=Fr[--Sr],Fr[Sr]=null}function Tu(a,o){Fr[Sr++]=ps,Fr[Sr++]=ms,Fr[Sr++]=hs,ps=o.id,ms=o.overflow,hs=a}var Ai=null,vn=null,zt=!1,qs=null,Mi=!1,Vf=Error(i(519));function Ot(a){var o=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cu(_r(o,a)),Vf}function Xf(a){var o=a.stateNode,h=a.type,y=a.memoizedProps;switch(o[yt]=a,o[li]=y,h){case"dialog":Bt("cancel",o),Bt("close",o);break;case"iframe":case"object":case"embed":Bt("load",o);break;case"video":case"audio":for(h=0;h<Op.length;h++)Bt(Op[h],o);break;case"source":Bt("error",o);break;case"img":case"image":case"link":Bt("error",o),Bt("load",o);break;case"details":Bt("toggle",o);break;case"input":Bt("invalid",o),ls(o,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":Bt("invalid",o);break;case"textarea":Bt("invalid",o),Ba(o,y.value,y.defaultValue,y.children)}h=y.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||o.textContent===""+h||y.suppressHydrationWarning===!0||Q1(o.textContent,h)?(y.popover!=null&&(Bt("beforetoggle",o),Bt("toggle",o)),y.onScroll!=null&&Bt("scroll",o),y.onScrollEnd!=null&&Bt("scrollend",o),y.onClick!=null&&(o.onclick=De),o=!0):o=!1,o||Ot(a,!0)}function _g(a){for(Ai=a.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:Ai=Ai.return}}function Ao(a){if(a!==Ai)return!1;if(!zt)return _g(a),zt=!0,!1;var o=a.tag,h;if((h=o!==3&&o!==27)&&((h=o===5)&&(h=a.type,h=!(h!=="form"&&h!=="button")||Ub(a.type,a.memoizedProps)),h=!h),h&&vn&&Ot(a),_g(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));vn=lS(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));vn=lS(a)}else o===27?(o=vn,Fc(a.type)?(a=Gb,Gb=null,vn=a):vn=o):vn=Ai?Cs(a.stateNode.nextSibling):null;return!0}function Mo(){vn=Ai=null,zt=!1}function Ph(){var a=qs;return a!==null&&(er===null?er=a:er.push.apply(er,a),qs=null),a}function Cu(a){qs===null?qs=[a]:qs.push(a)}var Gh=K(null),Ys=null,Wi=null;function Vs(a,o,h){U(Gh,o._currentValue),o._currentValue=h}function pa(a){a._currentValue=Gh.current,te(Gh)}function Xs(a,o,h){for(;a!==null;){var y=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,y!==null&&(y.childLanes|=o)):y!==null&&(y.childLanes&o)!==o&&(y.childLanes|=o),a===h)break;a=a.return}}function Kf(a,o,h,y){var _=a.child;for(_!==null&&(_.return=a);_!==null;){var A=_.dependencies;if(A!==null){var L=_.child;A=A.firstContext;e:for(;A!==null;){var W=A;A=_;for(var re=0;re<o.length;re++)if(W.context===o[re]){A.lanes|=h,W=A.alternate,W!==null&&(W.lanes|=h),Xs(A.return,h,a),y||(L=null);break e}A=W.next}}else if(_.tag===18){if(L=_.return,L===null)throw Error(i(341));L.lanes|=h,A=L.alternate,A!==null&&(A.lanes|=h),Xs(L,h,a),L=null}else L=_.child;if(L!==null)L.return=_;else for(L=_;L!==null;){if(L===a){L=null;break}if(_=L.sibling,_!==null){_.return=L.return,L=_;break}L=L.return}_=L}}function jl(a,o,h,y){a=null;for(var _=o,A=!1;_!==null;){if(!A){if((_.flags&524288)!==0)A=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var L=_.alternate;if(L===null)throw Error(i(387));if(L=L.memoizedProps,L!==null){var W=_.type;Rn(_.pendingProps.value,L.value)||(a!==null?a.push(W):a=[W])}}else if(_===se.current){if(L=_.alternate,L===null)throw Error(i(387));L.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(a!==null?a.push(Up):a=[Up])}_=_.return}a!==null&&Kf(o,a,h,y),o.flags|=262144}function Tc(a){for(a=a.firstContext;a!==null;){if(!Rn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Ro(a){Ys=a,Wi=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Ri(a){return Fh(Ys,a)}function Au(a,o){return Ys===null&&Ro(a),Fh(a,o)}function Fh(a,o){var h=o._currentValue;if(o={context:o,memoizedValue:h,next:null},Wi===null){if(a===null)throw Error(i(308));Wi=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else Wi=Wi.next=o;return h}var Sg=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(h,y){a.push(y)}};this.abort=function(){o.aborted=!0,a.forEach(function(h){return h()})}},Eg=t.unstable_scheduleCallback,qh=t.unstable_NormalPriority,$e={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yh(){return{controller:new Sg,data:new Map,refCount:0}}function Li(a){a.refCount--,a.refCount===0&&Eg(qh,function(){a.controller.abort()})}var No=null,Vh=0,Ks=0,Ha=null;function Cc(a,o){if(No===null){var h=No=[];Vh=0,Ks=Mb(),Ha={status:"pending",value:void 0,then:function(y){h.push(y)}}}return Vh++,o.then(Xh,Xh),o}function Xh(){if(--Vh===0&&No!==null){Ha!==null&&(Ha.status="fulfilled");var a=No;No=null,Ks=0,Ha=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function Kh(a,o){var h=[],y={status:"pending",value:null,reason:null,then:function(_){h.push(_)}};return a.then(function(){y.status="fulfilled",y.value=o;for(var _=0;_<h.length;_++)(0,h[_])(o)},function(_){for(y.status="rejected",y.reason=_,_=0;_<h.length;_++)(0,h[_])(void 0)}),y}var wg=B.S;B.S=function(a,o){jc=hn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&Cc(a,o),wg!==null&&wg(a,o)};var Pl=K(null);function gs(){var a=Pl.current;return a!==null?a:sn.pooledCache}function Ac(a,o){o===null?U(Pl,Pl.current):U(Pl,o.pool)}function Wf(){var a=gs();return a===null?null:{parent:$e._currentValue,pool:a}}var Gl=Error(i(460)),Mu=Error(i(474)),ja=Error(i(542)),Ru={then:function(){}};function Tg(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Wh(a,o,h){switch(h=a[h],h===void 0?a.push(o):h!==o&&(o.then(De,De),o=h),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,$h(a),a;default:if(typeof o.status=="string")o.then(De,De);else{if(a=sn,a!==null&&100<a.shellSuspendCounter)throw Error(i(482));a=o,a.status="pending",a.then(function(y){if(o.status==="pending"){var _=o;_.status="fulfilled",_.value=y}},function(y){if(o.status==="pending"){var _=o;_.status="rejected",_.reason=y}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,$h(a),a}throw rt=o,Gl}}function ko(a){try{var o=a._init;return o(a._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(rt=h,Gl):h}}var rt=null;function $f(){if(rt===null)throw Error(i(459));var a=rt;return rt=null,a}function $h(a){if(a===Gl||a===ja)throw Error(i(483))}var Fl=null,ql=0;function Zf(a){var o=ql;return ql+=1,Fl===null&&(Fl=[]),Wh(Fl,a,o)}function Nu(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function ku(a,o){throw o.$$typeof===b?Error(i(525)):(a=Object.prototype.toString.call(o),Error(i(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function Mc(a){function o(ue,oe){if(a){var he=ue.deletions;he===null?(ue.deletions=[oe],ue.flags|=16):he.push(oe)}}function h(ue,oe){if(!a)return null;for(;oe!==null;)o(ue,oe),oe=oe.sibling;return null}function y(ue){for(var oe=new Map;ue!==null;)ue.key!==null?oe.set(ue.key,ue):oe.set(ue.index,ue),ue=ue.sibling;return oe}function _(ue,oe){return ue=ds(ue,oe),ue.index=0,ue.sibling=null,ue}function A(ue,oe,he){return ue.index=he,a?(he=ue.alternate,he!==null?(he=he.index,he<oe?(ue.flags|=67108866,oe):he):(ue.flags|=67108866,oe)):(ue.flags|=1048576,oe)}function L(ue){return a&&ue.alternate===null&&(ue.flags|=67108866),ue}function W(ue,oe,he,Te){return oe===null||oe.tag!==6?(oe=qf(he,ue.mode,Te),oe.return=ue,oe):(oe=_(oe,he),oe.return=ue,oe)}function re(ue,oe,he,Te){var nt=he.type;return nt===C?Se(ue,oe,he.props.children,Te,he.key):oe!==null&&(oe.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===$&&ko(nt)===oe.type)?(oe=_(oe,he.props),Nu(oe,he),oe.return=ue,oe):(oe=Eu(he.type,he.key,he.props,null,ue.mode,Te),Nu(oe,he),oe.return=ue,oe)}function me(ue,oe,he,Te){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==he.containerInfo||oe.stateNode.implementation!==he.implementation?(oe=Ua(he,ue.mode,Te),oe.return=ue,oe):(oe=_(oe,he.children||[]),oe.return=ue,oe)}function Se(ue,oe,he,Te,nt){return oe===null||oe.tag!==7?(oe=Gs(he,ue.mode,Te,nt),oe.return=ue,oe):(oe=_(oe,he),oe.return=ue,oe)}function Ce(ue,oe,he){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=qf(""+oe,ue.mode,he),oe.return=ue,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return he=Eu(oe.type,oe.key,oe.props,null,ue.mode,he),Nu(he,oe),he.return=ue,he;case S:return oe=Ua(oe,ue.mode,he),oe.return=ue,oe;case $:return oe=ko(oe),Ce(ue,oe,he)}if(J(oe)||X(oe))return oe=Gs(oe,ue.mode,he,null),oe.return=ue,oe;if(typeof oe.then=="function")return Ce(ue,Zf(oe),he);if(oe.$$typeof===M)return Ce(ue,Au(ue,oe),he);ku(ue,oe)}return null}function be(ue,oe,he,Te){var nt=oe!==null?oe.key:null;if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return nt!==null?null:W(ue,oe,""+he,Te);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case v:return he.key===nt?re(ue,oe,he,Te):null;case S:return he.key===nt?me(ue,oe,he,Te):null;case $:return he=ko(he),be(ue,oe,he,Te)}if(J(he)||X(he))return nt!==null?null:Se(ue,oe,he,Te,null);if(typeof he.then=="function")return be(ue,oe,Zf(he),Te);if(he.$$typeof===M)return be(ue,oe,Au(ue,he),Te);ku(ue,he)}return null}function ve(ue,oe,he,Te,nt){if(typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint")return ue=ue.get(he)||null,W(oe,ue,""+Te,nt);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case v:return ue=ue.get(Te.key===null?he:Te.key)||null,re(oe,ue,Te,nt);case S:return ue=ue.get(Te.key===null?he:Te.key)||null,me(oe,ue,Te,nt);case $:return Te=ko(Te),ve(ue,oe,he,Te,nt)}if(J(Te)||X(Te))return ue=ue.get(he)||null,Se(oe,ue,Te,nt,null);if(typeof Te.then=="function")return ve(ue,oe,he,Zf(Te),nt);if(Te.$$typeof===M)return ve(ue,oe,he,Au(oe,Te),nt);ku(oe,Te)}return null}function Ye(ue,oe,he,Te){for(var nt=null,on=null,Xe=oe,wt=oe=0,Ht=null;Xe!==null&&wt<he.length;wt++){Xe.index>wt?(Ht=Xe,Xe=null):Ht=Xe.sibling;var cn=be(ue,Xe,he[wt],Te);if(cn===null){Xe===null&&(Xe=Ht);break}a&&Xe&&cn.alternate===null&&o(ue,Xe),oe=A(cn,oe,wt),on===null?nt=cn:on.sibling=cn,on=cn,Xe=Ht}if(wt===he.length)return h(ue,Xe),zt&&Fs(ue,wt),nt;if(Xe===null){for(;wt<he.length;wt++)Xe=Ce(ue,he[wt],Te),Xe!==null&&(oe=A(Xe,oe,wt),on===null?nt=Xe:on.sibling=Xe,on=Xe);return zt&&Fs(ue,wt),nt}for(Xe=y(Xe);wt<he.length;wt++)Ht=ve(Xe,ue,wt,he[wt],Te),Ht!==null&&(a&&Ht.alternate!==null&&Xe.delete(Ht.key===null?wt:Ht.key),oe=A(Ht,oe,wt),on===null?nt=Ht:on.sibling=Ht,on=Ht);return a&&Xe.forEach(function(Kc){return o(ue,Kc)}),zt&&Fs(ue,wt),nt}function lt(ue,oe,he,Te){if(he==null)throw Error(i(151));for(var nt=null,on=null,Xe=oe,wt=oe=0,Ht=null,cn=he.next();Xe!==null&&!cn.done;wt++,cn=he.next()){Xe.index>wt?(Ht=Xe,Xe=null):Ht=Xe.sibling;var Kc=be(ue,Xe,cn.value,Te);if(Kc===null){Xe===null&&(Xe=Ht);break}a&&Xe&&Kc.alternate===null&&o(ue,Xe),oe=A(Kc,oe,wt),on===null?nt=Kc:on.sibling=Kc,on=Kc,Xe=Ht}if(cn.done)return h(ue,Xe),zt&&Fs(ue,wt),nt;if(Xe===null){for(;!cn.done;wt++,cn=he.next())cn=Ce(ue,cn.value,Te),cn!==null&&(oe=A(cn,oe,wt),on===null?nt=cn:on.sibling=cn,on=cn);return zt&&Fs(ue,wt),nt}for(Xe=y(Xe);!cn.done;wt++,cn=he.next())cn=ve(Xe,ue,wt,cn.value,Te),cn!==null&&(a&&cn.alternate!==null&&Xe.delete(cn.key===null?wt:cn.key),oe=A(cn,oe,wt),on===null?nt=cn:on.sibling=cn,on=cn);return a&&Xe.forEach(function(bO){return o(ue,bO)}),zt&&Fs(ue,wt),nt}function En(ue,oe,he,Te){if(typeof he=="object"&&he!==null&&he.type===C&&he.key===null&&(he=he.props.children),typeof he=="object"&&he!==null){switch(he.$$typeof){case v:e:{for(var nt=he.key;oe!==null;){if(oe.key===nt){if(nt=he.type,nt===C){if(oe.tag===7){h(ue,oe.sibling),Te=_(oe,he.props.children),Te.return=ue,ue=Te;break e}}else if(oe.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===$&&ko(nt)===oe.type){h(ue,oe.sibling),Te=_(oe,he.props),Nu(Te,he),Te.return=ue,ue=Te;break e}h(ue,oe);break}else o(ue,oe);oe=oe.sibling}he.type===C?(Te=Gs(he.props.children,ue.mode,Te,he.key),Te.return=ue,ue=Te):(Te=Eu(he.type,he.key,he.props,null,ue.mode,Te),Nu(Te,he),Te.return=ue,ue=Te)}return L(ue);case S:e:{for(nt=he.key;oe!==null;){if(oe.key===nt)if(oe.tag===4&&oe.stateNode.containerInfo===he.containerInfo&&oe.stateNode.implementation===he.implementation){h(ue,oe.sibling),Te=_(oe,he.children||[]),Te.return=ue,ue=Te;break e}else{h(ue,oe);break}else o(ue,oe);oe=oe.sibling}Te=Ua(he,ue.mode,Te),Te.return=ue,ue=Te}return L(ue);case $:return he=ko(he),En(ue,oe,he,Te)}if(J(he))return Ye(ue,oe,he,Te);if(X(he)){if(nt=X(he),typeof nt!="function")throw Error(i(150));return he=nt.call(he),lt(ue,oe,he,Te)}if(typeof he.then=="function")return En(ue,oe,Zf(he),Te);if(he.$$typeof===M)return En(ue,oe,Au(ue,he),Te);ku(ue,he)}return typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint"?(he=""+he,oe!==null&&oe.tag===6?(h(ue,oe.sibling),Te=_(oe,he),Te.return=ue,ue=Te):(h(ue,oe),Te=qf(he,ue.mode,Te),Te.return=ue,ue=Te),L(ue)):h(ue,oe)}return function(ue,oe,he,Te){try{ql=0;var nt=En(ue,oe,he,Te);return Fl=null,nt}catch(Xe){if(Xe===Gl||Xe===ja)throw Xe;var on=ur(29,Xe,null,ue.mode);return on.lanes=Te,on.return=ue,on}finally{}}}var Oo=Mc(!0),Cg=Mc(!1),Yl=!1;function Zh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qh(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ys(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Ws(a,o,h){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Ut&2)!==0){var _=y.pending;return _===null?o.next=o:(o.next=_.next,_.next=o),y.pending=o,o=Ec(a),Ff(a,null,h),o}return Su(a,y,o,h),Ec(a)}function Vl(a,o,h){if(o=o.updateQueue,o!==null&&(o=o.shared,(h&4194048)!==0)){var y=o.lanes;y&=a.pendingLanes,h|=y,o.lanes=h,tt(a,h)}}function Qf(a,o){var h=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var _=null,A=null;if(h=h.firstBaseUpdate,h!==null){do{var L={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};A===null?_=A=L:A=A.next=L,h=h.next}while(h!==null);A===null?_=A=o:A=A.next=o}else _=A=o;h={baseState:y.baseState,firstBaseUpdate:_,lastBaseUpdate:A,shared:y.shared,callbacks:y.callbacks},a.updateQueue=h;return}a=h.lastBaseUpdate,a===null?h.firstBaseUpdate=o:a.next=o,h.lastBaseUpdate=o}var Jh=!1;function Ou(){if(Jh){var a=Ha;if(a!==null)throw a}}function Do(a,o,h,y){Jh=!1;var _=a.updateQueue;Yl=!1;var A=_.firstBaseUpdate,L=_.lastBaseUpdate,W=_.shared.pending;if(W!==null){_.shared.pending=null;var re=W,me=re.next;re.next=null,L===null?A=me:L.next=me,L=re;var Se=a.alternate;Se!==null&&(Se=Se.updateQueue,W=Se.lastBaseUpdate,W!==L&&(W===null?Se.firstBaseUpdate=me:W.next=me,Se.lastBaseUpdate=re))}if(A!==null){var Ce=_.baseState;L=0,Se=me=re=null,W=A;do{var be=W.lane&-536870913,ve=be!==W.lane;if(ve?(Dt&be)===be:(y&be)===be){be!==0&&be===Ks&&(Jh=!0),Se!==null&&(Se=Se.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var Ye=a,lt=W;be=o;var En=h;switch(lt.tag){case 1:if(Ye=lt.payload,typeof Ye=="function"){Ce=Ye.call(En,Ce,be);break e}Ce=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=lt.payload,be=typeof Ye=="function"?Ye.call(En,Ce,be):Ye,be==null)break e;Ce=g({},Ce,be);break e;case 2:Yl=!0}}be=W.callback,be!==null&&(a.flags|=64,ve&&(a.flags|=8192),ve=_.callbacks,ve===null?_.callbacks=[be]:ve.push(be))}else ve={lane:be,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Se===null?(me=Se=ve,re=Ce):Se=Se.next=ve,L|=be;if(W=W.next,W===null){if(W=_.shared.pending,W===null)break;ve=W,W=ve.next,ve.next=null,_.lastBaseUpdate=ve,_.shared.pending=null}}while(!0);Se===null&&(re=Ce),_.baseState=re,_.firstBaseUpdate=me,_.lastBaseUpdate=Se,A===null&&(_.shared.lanes=0),ea|=L,a.lanes=L,a.memoizedState=Ce}}function bs(a,o){if(typeof a!="function")throw Error(i(191,a));a.call(o)}function Ui(a,o){var h=a.callbacks;if(h!==null)for(a.callbacks=null,a=0;a<h.length;a++)bs(h[a],o)}var qr=K(null),dr=K(0);function ep(a,o){a=ii,U(dr,a),U(qr,o),ii=a|o.baseLanes}function tp(){U(dr,ii),U(qr,qr.current)}function $i(){ii=dr.current,te(qr),te(dr)}var vi=K(null),ma=null;function Xl(a){var o=a.alternate;U(Fn,Fn.current&1),U(vi,a),ma===null&&(o===null||qr.current!==null||o.memoizedState!==null)&&(ma=a)}function np(a){U(Fn,Fn.current),U(vi,a),ma===null&&(ma=a)}function Ag(a){a.tag===22?(U(Fn,Fn.current),U(vi,a),ma===null&&(ma=a)):$s()}function $s(){U(Fn,Fn.current),U(vi,vi.current)}function Yr(a){te(vi),ma===a&&(ma=null),te(Fn)}var Fn=K(0);function Jf(a){for(var o=a;o!==null;){if(o.tag===13){var h=o.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||jb(h)||Pb(h)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Er=0,ot=null,pn=null,ci=null,ed=!1,xs=!1,zo=!1,td=0,Du=0,vs=null,bb=0;function qn(){throw Error(i(321))}function ip(a,o){if(o===null)return!1;for(var h=0;h<o.length&&h<a.length;h++)if(!Rn(a[h],o[h]))return!1;return!0}function rp(a,o,h,y,_,A){return Er=A,ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,B.H=a===null||a.memoizedState===null?Xg:kc,zo=!1,A=h(y,_),zo=!1,xs&&(A=Rg(o,h,y,_)),Mg(a),A}function Mg(a){B.H=Iu;var o=pn!==null&&pn.next!==null;if(Er=0,ci=pn=ot=null,ed=!1,Du=0,vs=null,o)throw Error(i(300));a===null||Nn||(a=a.dependencies,a!==null&&Tc(a)&&(Nn=!0))}function Rg(a,o,h,y){ot=a;var _=0;do{if(xs&&(vs=null),Du=0,xs=!1,25<=_)throw Error(i(301));if(_+=1,ci=pn=null,a.updateQueue!=null){var A=a.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}B.H=Hu,A=o(h,y)}while(xs);return A}function xb(){var a=B.H,o=a.useState()[0];return o=typeof o.then=="function"?Bu(o):o,a=a.useState()[0],(pn!==null?pn.memoizedState:null)!==a&&(ot.flags|=1024),o}function ap(){var a=td!==0;return td=0,a}function sp(a,o,h){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~h}function lp(a){if(ed){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}ed=!1}Er=0,ci=pn=ot=null,xs=!1,Du=td=0,vs=null}function hr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ci===null?ot.memoizedState=ci=a:ci=ci.next=a,ci}function Jn(){if(pn===null){var a=ot.alternate;a=a!==null?a.memoizedState:null}else a=pn.next;var o=ci===null?ot.memoizedState:ci.next;if(o!==null)ci=o,pn=a;else{if(a===null)throw ot.alternate===null?Error(i(467)):Error(i(310));pn=a,a={memoizedState:pn.memoizedState,baseState:pn.baseState,baseQueue:pn.baseQueue,queue:pn.queue,next:null},ci===null?ot.memoizedState=ci=a:ci=ci.next=a}return ci}function zu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bu(a){var o=Du;return Du+=1,vs===null&&(vs=[]),a=Wh(vs,a,o),o=ot,(ci===null?o.memoizedState:ci.next)===null&&(o=o.alternate,B.H=o===null||o.memoizedState===null?Xg:kc),a}function nd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Bu(a);if(a.$$typeof===M)return Ri(a)}throw Error(i(438,String(a)))}function op(a){var o=null,h=ot.updateQueue;if(h!==null&&(o=h.memoCache),o==null){var y=ot.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(o={data:y.data.map(function(_){return _.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),h===null&&(h=zu(),ot.updateQueue=h),h.memoCache=o,h=o.data[o.index],h===void 0)for(h=o.data[o.index]=Array(a),y=0;y<a;y++)h[y]=I;return o.index++,h}function Zs(a,o){return typeof o=="function"?o(a):o}function id(a){var o=Jn();return cp(o,pn,a)}function cp(a,o,h){var y=a.queue;if(y===null)throw Error(i(311));y.lastRenderedReducer=h;var _=a.baseQueue,A=y.pending;if(A!==null){if(_!==null){var L=_.next;_.next=A.next,A.next=L}o.baseQueue=_=A,y.pending=null}if(A=a.baseState,_===null)a.memoizedState=A;else{o=_.next;var W=L=null,re=null,me=o,Se=!1;do{var Ce=me.lane&-536870913;if(Ce!==me.lane?(Dt&Ce)===Ce:(Er&Ce)===Ce){var be=me.revertLane;if(be===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),Ce===Ks&&(Se=!0);else if((Er&be)===be){me=me.next,be===Ks&&(Se=!0);continue}else Ce={lane:0,revertLane:me.revertLane,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},re===null?(W=re=Ce,L=A):re=re.next=Ce,ot.lanes|=be,ea|=be;Ce=me.action,zo&&h(A,Ce),A=me.hasEagerState?me.eagerState:h(A,Ce)}else be={lane:Ce,revertLane:me.revertLane,gesture:me.gesture,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},re===null?(W=re=be,L=A):re=re.next=be,ot.lanes|=Ce,ea|=Ce;me=me.next}while(me!==null&&me!==o);if(re===null?L=A:re.next=W,!Rn(A,a.memoizedState)&&(Nn=!0,Se&&(h=Ha,h!==null)))throw h;a.memoizedState=A,a.baseState=L,a.baseQueue=re,y.lastRenderedState=A}return _===null&&(y.lanes=0),[a.memoizedState,y.dispatch]}function rd(a){var o=Jn(),h=o.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=a;var y=h.dispatch,_=h.pending,A=o.memoizedState;if(_!==null){h.pending=null;var L=_=_.next;do A=a(A,L.action),L=L.next;while(L!==_);Rn(A,o.memoizedState)||(Nn=!0),o.memoizedState=A,o.baseQueue===null&&(o.baseState=A),h.lastRenderedState=A}return[A,y]}function up(a,o,h){var y=ot,_=Jn(),A=zt;if(A){if(h===void 0)throw Error(i(407));h=h()}else h=o();var L=!Rn((pn||_).memoizedState,h);if(L&&(_.memoizedState=h,Nn=!0),_=_.queue,mp(dp.bind(null,y,_,a),[a]),_.getSnapshot!==o||L||ci!==null&&ci.memoizedState.tag&1){if(y.flags|=2048,Rc(9,{destroy:void 0},fp.bind(null,y,_,h,o),null),sn===null)throw Error(i(349));A||(Er&127)!==0||Ng(y,o,h)}return h}function Ng(a,o,h){a.flags|=16384,a={getSnapshot:o,value:h},o=ot.updateQueue,o===null?(o=zu(),ot.updateQueue=o,o.stores=[a]):(h=o.stores,h===null?o.stores=[a]:h.push(a))}function fp(a,o,h,y){o.value=h,o.getSnapshot=y,hp(o)&&ad(a)}function dp(a,o,h){return h(function(){hp(o)&&ad(a)})}function hp(a){var o=a.getSnapshot;a=a.value;try{var h=o();return!Rn(a,h)}catch{return!0}}function ad(a){var o=Ul(a,2);o!==null&&f(o,a,2)}function Lu(a){var o=hr();if(typeof a=="function"){var h=a;if(a=h(),zo){Gn(!0);try{h()}finally{Gn(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:a},o}function kg(a,o,h,y){return a.baseState=h,cp(a,pn,typeof y=="function"?y:Zs)}function vb(a,o,h,y,_){if(Qs(a))throw Error(i(485));if(a=o.action,a!==null){var A={payload:_,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){A.listeners.push(L)}};B.T!==null?h(!0):A.isTransition=!1,y(A),h=o.pending,h===null?(A.next=o.pending=A,Og(o,A)):(A.next=h.next,o.pending=h.next=A)}}function Og(a,o){var h=o.action,y=o.payload,_=a.state;if(o.isTransition){var A=B.T,L={};B.T=L;try{var W=h(_,y),re=B.S;re!==null&&re(L,W),Dg(a,o,W)}catch(me){sd(a,o,me)}finally{A!==null&&L.types!==null&&(A.types=L.types),B.T=A}}else try{A=h(_,y),Dg(a,o,A)}catch(me){sd(a,o,me)}}function Dg(a,o,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){pp(a,o,y)},function(y){return sd(a,o,y)}):pp(a,o,h)}function pp(a,o,h){o.status="fulfilled",o.value=h,zg(o),a.state=h,o=a.pending,o!==null&&(h=o.next,h===o?a.pending=null:(h=h.next,o.next=h,Og(a,h)))}function sd(a,o,h){var y=a.pending;if(a.pending=null,y!==null){y=y.next;do o.status="rejected",o.reason=h,zg(o),o=o.next;while(o!==y)}a.action=null}function zg(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function Bg(a,o){return o}function Lg(a,o){if(zt){var h=sn.formState;if(h!==null){e:{var y=ot;if(zt){if(vn){t:{for(var _=vn,A=Mi;_.nodeType!==8;){if(!A){_=null;break t}if(_=Cs(_.nextSibling),_===null){_=null;break t}}A=_.data,_=A==="F!"||A==="F"?_:null}if(_){vn=Cs(_.nextSibling),y=_.data==="F!";break e}}Ot(y)}y=!1}y&&(o=h[0])}}return h=hr(),h.memoizedState=h.baseState=o,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bg,lastRenderedState:o},h.queue=y,h=Vg.bind(null,ot,y),y.dispatch=h,y=Lu(!1),A=Uu.bind(null,ot,!1,y.queue),y=hr(),_={state:o,dispatch:null,action:a,pending:null},y.queue=_,h=vb.bind(null,ot,_,A,h),_.dispatch=h,y.memoizedState=a,[o,h,!1]}function Ug(a){var o=Jn();return Ig(o,pn,a)}function Ig(a,o,h){if(o=cp(a,o,Bg)[0],a=id(Zs)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var y=Bu(o)}catch(L){throw L===Gl?ja:L}else y=o;o=Jn();var _=o.queue,A=_.dispatch;return h!==o.memoizedState&&(ot.flags|=2048,Rc(9,{destroy:void 0},_b.bind(null,_,h),null)),[y,A,a]}function _b(a,o){a.action=o}function Hg(a){var o=Jn(),h=pn;if(h!==null)return Ig(o,h,a);Jn(),o=o.memoizedState,h=Jn();var y=h.queue.dispatch;return h.memoizedState=a,[o,y,!1]}function Rc(a,o,h,y){return a={tag:a,create:h,deps:y,inst:o,next:null},o=ot.updateQueue,o===null&&(o=zu(),ot.updateQueue=o),h=o.lastEffect,h===null?o.lastEffect=a.next=a:(y=h.next,h.next=a,a.next=y,o.lastEffect=a),a}function jg(){return Jn().memoizedState}function ld(a,o,h,y){var _=hr();ot.flags|=a,_.memoizedState=Rc(1|o,{destroy:void 0},h,y===void 0?null:y)}function od(a,o,h,y){var _=Jn();y=y===void 0?null:y;var A=_.memoizedState.inst;pn!==null&&y!==null&&ip(y,pn.memoizedState.deps)?_.memoizedState=Rc(o,A,h,y):(ot.flags|=a,_.memoizedState=Rc(1|o,A,h,y))}function Pg(a,o){ld(8390656,8,a,o)}function mp(a,o){od(2048,8,a,o)}function Gg(a){ot.flags|=4;var o=ot.updateQueue;if(o===null)o=zu(),ot.updateQueue=o,o.events=[a];else{var h=o.events;h===null?o.events=[a]:h.push(a)}}function Fg(a){var o=Jn().memoizedState;return Gg({ref:o,nextImpl:a}),function(){if((Ut&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}function qg(a,o){return od(4,2,a,o)}function Vr(a,o){return od(4,4,a,o)}function gp(a,o){if(typeof o=="function"){a=a();var h=o(a);return function(){typeof h=="function"?h():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function cd(a,o,h){h=h!=null?h.concat([a]):null,od(4,4,gp.bind(null,o,a),h)}function ud(){}function yp(a,o){var h=Jn();o=o===void 0?null:o;var y=h.memoizedState;return o!==null&&ip(o,y[1])?y[0]:(h.memoizedState=[a,o],a)}function bp(a,o){var h=Jn();o=o===void 0?null:o;var y=h.memoizedState;if(o!==null&&ip(o,y[1]))return y[0];if(y=a(),zo){Gn(!0);try{a()}finally{Gn(!1)}}return h.memoizedState=[y,o],y}function xp(a,o,h){return h===void 0||(Er&1073741824)!==0&&(Dt&261930)===0?a.memoizedState=o:(a.memoizedState=h,a=u(),ot.lanes|=a,ea|=a,h)}function vp(a,o,h,y){return Rn(h,o)?h:qr.current!==null?(a=xp(a,h,y),Rn(a,o)||(Nn=!0),a):(Er&42)===0||(Er&1073741824)!==0&&(Dt&261930)===0?(Nn=!0,a.memoizedState=h):(a=u(),ot.lanes|=a,ea|=a,o)}function _p(a,o,h,y,_){var A=V.p;V.p=A!==0&&8>A?A:8;var L=B.T,W={};B.T=W,Uu(a,!1,o,h);try{var re=_(),me=B.S;if(me!==null&&me(W,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var Se=Kh(re,y);Nc(a,o,Se,mr(a))}else Nc(a,o,y,mr(a))}catch(Ce){Nc(a,o,{then:function(){},status:"rejected",reason:Ce},mr())}finally{V.p=A,L!==null&&W.types!==null&&(L.types=W.types),B.T=L}}function Sb(){}function Sp(a,o,h,y){if(a.tag!==5)throw Error(i(476));var _=Yg(a).queue;_p(a,_,o,Z,h===null?Sb:function(){return Ep(a),h(y)})}function Yg(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:Z},next:null};var h={};return o.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:h},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function Ep(a){var o=Yg(a);o.next===null&&(o=a.alternate.memoizedState),Nc(a,o.next.queue,{},mr())}function wp(){return Ri(Up)}function Ii(){return Jn().memoizedState}function Tp(){return Jn().memoizedState}function Eb(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var h=mr();a=ys(h);var y=Ws(o,a,h);y!==null&&(f(y,o,h),Vl(y,o,h)),o={cache:Yh()},a.payload=o;return}o=o.return}}function wb(a,o,h){var y=mr();h={lane:y,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Qs(a)?Bo(o,h):(h=Sc(a,o,h,y),h!==null&&(f(h,a,y),wr(h,o,y)))}function Vg(a,o,h){var y=mr();Nc(a,o,h,y)}function Nc(a,o,h,y){var _={lane:y,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Qs(a))Bo(o,_);else{var A=a.alternate;if(a.lanes===0&&(A===null||A.lanes===0)&&(A=o.lastRenderedReducer,A!==null))try{var L=o.lastRenderedState,W=A(L,h);if(_.hasEagerState=!0,_.eagerState=W,Rn(W,L))return Su(a,o,_,0),sn===null&&Ll(),!1}catch{}finally{}if(h=Sc(a,o,_,y),h!==null)return f(h,a,y),wr(h,o,y),!0}return!1}function Uu(a,o,h,y){if(y={lane:2,revertLane:Mb(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Qs(a)){if(o)throw Error(i(479))}else o=Sc(a,h,y,2),o!==null&&f(o,a,2)}function Qs(a){var o=a.alternate;return a===ot||o!==null&&o===ot}function Bo(a,o){xs=ed=!0;var h=a.pending;h===null?o.next=o:(o.next=h.next,h.next=o),a.pending=o}function wr(a,o,h){if((h&4194048)!==0){var y=o.lanes;y&=a.pendingLanes,h|=y,o.lanes=h,tt(a,h)}}var Iu={readContext:Ri,use:nd,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useLayoutEffect:qn,useInsertionEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useSyncExternalStore:qn,useId:qn,useHostTransitionStatus:qn,useFormState:qn,useActionState:qn,useOptimistic:qn,useMemoCache:qn,useCacheRefresh:qn};Iu.useEffectEvent=qn;var Xg={readContext:Ri,use:nd,useCallback:function(a,o){return hr().memoizedState=[a,o===void 0?null:o],a},useContext:Ri,useEffect:Pg,useImperativeHandle:function(a,o,h){h=h!=null?h.concat([a]):null,ld(4194308,4,gp.bind(null,o,a),h)},useLayoutEffect:function(a,o){return ld(4194308,4,a,o)},useInsertionEffect:function(a,o){ld(4,2,a,o)},useMemo:function(a,o){var h=hr();o=o===void 0?null:o;var y=a();if(zo){Gn(!0);try{a()}finally{Gn(!1)}}return h.memoizedState=[y,o],y},useReducer:function(a,o,h){var y=hr();if(h!==void 0){var _=h(o);if(zo){Gn(!0);try{h(o)}finally{Gn(!1)}}}else _=o;return y.memoizedState=y.baseState=_,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:_},y.queue=a,a=a.dispatch=wb.bind(null,ot,a),[y.memoizedState,a]},useRef:function(a){var o=hr();return a={current:a},o.memoizedState=a},useState:function(a){a=Lu(a);var o=a.queue,h=Vg.bind(null,ot,o);return o.dispatch=h,[a.memoizedState,h]},useDebugValue:ud,useDeferredValue:function(a,o){var h=hr();return xp(h,a,o)},useTransition:function(){var a=Lu(!1);return a=_p.bind(null,ot,a.queue,!0,!1),hr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,h){var y=ot,_=hr();if(zt){if(h===void 0)throw Error(i(407));h=h()}else{if(h=o(),sn===null)throw Error(i(349));(Dt&127)!==0||Ng(y,o,h)}_.memoizedState=h;var A={value:h,getSnapshot:o};return _.queue=A,Pg(dp.bind(null,y,A,a),[a]),y.flags|=2048,Rc(9,{destroy:void 0},fp.bind(null,y,A,h,o),null),h},useId:function(){var a=hr(),o=sn.identifierPrefix;if(zt){var h=ms,y=ps;h=(y&~(1<<32-Pt(y)-1)).toString(32)+h,o="_"+o+"R_"+h,h=td++,0<h&&(o+="H"+h.toString(32)),o+="_"}else h=bb++,o="_"+o+"r_"+h.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:wp,useFormState:Lg,useActionState:Lg,useOptimistic:function(a){var o=hr();o.memoizedState=o.baseState=a;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=h,o=Uu.bind(null,ot,!0,h),h.dispatch=o,[a,o]},useMemoCache:op,useCacheRefresh:function(){return hr().memoizedState=Eb.bind(null,ot)},useEffectEvent:function(a){var o=hr(),h={impl:a};return o.memoizedState=h,function(){if((Ut&2)!==0)throw Error(i(440));return h.impl.apply(void 0,arguments)}}},kc={readContext:Ri,use:nd,useCallback:yp,useContext:Ri,useEffect:mp,useImperativeHandle:cd,useInsertionEffect:qg,useLayoutEffect:Vr,useMemo:bp,useReducer:id,useRef:jg,useState:function(){return id(Zs)},useDebugValue:ud,useDeferredValue:function(a,o){var h=Jn();return vp(h,pn.memoizedState,a,o)},useTransition:function(){var a=id(Zs)[0],o=Jn().memoizedState;return[typeof a=="boolean"?a:Bu(a),o]},useSyncExternalStore:up,useId:Ii,useHostTransitionStatus:wp,useFormState:Ug,useActionState:Ug,useOptimistic:function(a,o){var h=Jn();return kg(h,pn,a,o)},useMemoCache:op,useCacheRefresh:Tp};kc.useEffectEvent=Fg;var Hu={readContext:Ri,use:nd,useCallback:yp,useContext:Ri,useEffect:mp,useImperativeHandle:cd,useInsertionEffect:qg,useLayoutEffect:Vr,useMemo:bp,useReducer:rd,useRef:jg,useState:function(){return rd(Zs)},useDebugValue:ud,useDeferredValue:function(a,o){var h=Jn();return pn===null?xp(h,a,o):vp(h,pn.memoizedState,a,o)},useTransition:function(){var a=rd(Zs)[0],o=Jn().memoizedState;return[typeof a=="boolean"?a:Bu(a),o]},useSyncExternalStore:up,useId:Ii,useHostTransitionStatus:wp,useFormState:Hg,useActionState:Hg,useOptimistic:function(a,o){var h=Jn();return pn!==null?kg(h,pn,a,o):(h.baseState=a,[a,h.queue.dispatch])},useMemoCache:op,useCacheRefresh:Tp};Hu.useEffectEvent=Fg;function Oc(a,o,h,y){o=a.memoizedState,h=h(y,o),h=h==null?o:g({},o,h),a.memoizedState=h,a.lanes===0&&(a.updateQueue.baseState=h)}var ju={enqueueSetState:function(a,o,h){a=a._reactInternals;var y=mr(),_=ys(y);_.payload=o,h!=null&&(_.callback=h),o=Ws(a,_,y),o!==null&&(f(o,a,y),Vl(o,a,y))},enqueueReplaceState:function(a,o,h){a=a._reactInternals;var y=mr(),_=ys(y);_.tag=1,_.payload=o,h!=null&&(_.callback=h),o=Ws(a,_,y),o!==null&&(f(o,a,y),Vl(o,a,y))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var h=mr(),y=ys(h);y.tag=2,o!=null&&(y.callback=o),o=Ws(a,y,h),o!==null&&(f(o,a,h),Vl(o,a,h))}};function Kg(a,o,h,y,_,A,L){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,A,L):o.prototype&&o.prototype.isPureReactComponent?!gc(h,y)||!gc(_,A):!0}function Wg(a,o,h,y){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(h,y),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(h,y),o.state!==a&&ju.enqueueReplaceState(o,o.state,null)}function Hi(a,o){var h=o;if("ref"in o){h={};for(var y in o)y!=="ref"&&(h[y]=o[y])}if(a=a.defaultProps){h===o&&(h=g({},h));for(var _ in a)h[_]===void 0&&(h[_]=a[_])}return h}function Cp(a){Bl(a)}function $g(a){console.error(a)}function fd(a){Bl(a)}function dd(a,o){try{var h=a.onUncaughtError;h(o.value,{componentStack:o.stack})}catch(y){setTimeout(function(){throw y})}}function Zg(a,o,h){try{var y=a.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function Ap(a,o,h){return h=ys(h),h.tag=3,h.payload={element:null},h.callback=function(){dd(a,o)},h}function Dc(a){return a=ys(a),a.tag=3,a}function Tr(a,o,h,y){var _=h.type.getDerivedStateFromError;if(typeof _=="function"){var A=y.value;a.payload=function(){return _(A)},a.callback=function(){Zg(o,h,y)}}var L=h.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(a.callback=function(){Zg(o,h,y),typeof _!="function"&&(Ts===null?Ts=new Set([this]):Ts.add(this));var W=y.stack;this.componentDidCatch(y.value,{componentStack:W!==null?W:""})})}function Xr(a,o,h,y,_){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(o=h.alternate,o!==null&&jl(o,h,_,!0),h=vi.current,h!==null){switch(h.tag){case 31:case 13:return ma===null?ht():h.alternate===null&&ln===0&&(ln=3),h.flags&=-257,h.flags|=65536,h.lanes=_,y===Ru?h.flags|=16384:(o=h.updateQueue,o===null?h.updateQueue=new Set([y]):o.add(y),Tb(a,y,_)),!1;case 22:return h.flags|=65536,y===Ru?h.flags|=16384:(o=h.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=o):(h=o.retryQueue,h===null?o.retryQueue=new Set([y]):h.add(y)),Tb(a,y,_)),!1}throw Error(i(435,h.tag))}return Tb(a,y,_),ht(),!1}if(zt)return o=vi.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=_,y!==Vf&&(a=Error(i(422),{cause:y}),Cu(_r(a,h)))):(y!==Vf&&(o=Error(i(423),{cause:y}),Cu(_r(o,h))),a=a.current.alternate,a.flags|=65536,_&=-_,a.lanes|=_,y=_r(y,h),_=Ap(a.stateNode,y,_),Qf(a,_),ln!==4&&(ln=2)),!1;var A=Error(i(520),{cause:y});if(A=_r(A,h),Ya===null?Ya=[A]:Ya.push(A),ln!==4&&(ln=2),o===null)return!0;y=_r(y,h),h=o;do{switch(h.tag){case 3:return h.flags|=65536,a=_&-_,h.lanes|=a,a=Ap(h.stateNode,y,a),Qf(h,a),!1;case 1:if(o=h.type,A=h.stateNode,(h.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Ts===null||!Ts.has(A))))return h.flags|=65536,_&=-_,h.lanes|=_,_=Dc(_),Tr(_,a,h,y),Qf(h,_),!1}h=h.return}while(h!==null);return!1}var hd=Error(i(461)),Nn=!1;function Yn(a,o,h,y){o.child=a===null?Cg(o,null,h,y):Oo(o,a.child,h,y)}function Pu(a,o,h,y,_){h=h.render;var A=o.ref;if("ref"in y){var L={};for(var W in y)W!=="ref"&&(L[W]=y[W])}else L=y;return Ro(o),y=rp(a,o,h,L,A,_),W=ap(),a!==null&&!Nn?(sp(a,o,_),Fa(a,o,_)):(zt&&W&&Yf(o),o.flags|=1,Yn(a,o,y,_),o.child)}function Gu(a,o,h,y,_){if(a===null){var A=h.type;return typeof A=="function"&&!fr(A)&&A.defaultProps===void 0&&h.compare===null?(o.tag=15,o.type=A,Kr(a,o,A,y,_)):(a=Eu(h.type,null,y,o,o.mode,_),a.ref=o.ref,a.return=o,o.child=a)}if(A=a.child,!Wl(a,_)){var L=A.memoizedProps;if(h=h.compare,h=h!==null?h:gc,h(L,y)&&a.ref===o.ref)return Fa(a,o,_)}return o.flags|=1,a=ds(A,y),a.ref=o.ref,a.return=o,o.child=a}function Kr(a,o,h,y,_){if(a!==null){var A=a.memoizedProps;if(gc(A,y)&&a.ref===o.ref)if(Nn=!1,o.pendingProps=y=A,Wl(a,_))(a.flags&131072)!==0&&(Nn=!0);else return o.lanes=a.lanes,Fa(a,o,_)}return zc(a,o,h,y,_)}function Wr(a,o,h,y){var _=y.children,A=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((o.flags&128)!==0){if(A=A!==null?A.baseLanes|h:h,a!==null){for(y=o.child=a.child,_=0;y!==null;)_=_|y.lanes|y.childLanes,y=y.sibling;y=_&~A}else y=0,o.child=null;return _s(a,o,A,h,y)}if((h&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ac(o,A!==null?A.cachePool:null),A!==null?ep(o,A):tp(),Ag(o);else return y=o.lanes=536870912,_s(a,o,A!==null?A.baseLanes|h:h,h,y)}else A!==null?(Ac(o,A.cachePool),ep(o,A),$s(),o.memoizedState=null):(a!==null&&Ac(o,null),tp(),$s());return Yn(a,o,_,h),o.child}function Pa(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function _s(a,o,h,y,_){var A=gs();return A=A===null?null:{parent:$e._currentValue,pool:A},o.memoizedState={baseLanes:h,cachePool:A},a!==null&&Ac(o,null),tp(),Ag(o),a!==null&&jl(a,o,y,!0),o.childLanes=_,null}function ga(a,o){return o=Bc({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function Ni(a,o,h){return Oo(o,a.child,null,h),a=ga(o,o.pendingProps),a.flags|=2,Yr(o),o.memoizedState=null,a}function Fu(a,o,h){var y=o.pendingProps,_=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(zt){if(y.mode==="hidden")return a=ga(o,y),o.lanes=536870912,Pa(null,a);if(np(o),(a=vn)?(a=sS(a,Mi),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:hs!==null?{id:ps,overflow:ms}:null,retryLane:536870912,hydrationErrors:null},h=vg(a),h.return=o,o.child=h,Ai=o,vn=null)):a=null,a===null)throw Ot(o);return o.lanes=536870912,null}return ga(o,y)}var A=a.memoizedState;if(A!==null){var L=A.dehydrated;if(np(o),_)if(o.flags&256)o.flags&=-257,o=Ni(a,o,h);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(i(558));else if(Nn||jl(a,o,h,!1),_=(h&a.childLanes)!==0,Nn||_){if(y=sn,y!==null&&(L=Cn(y,h),L!==0&&L!==A.retryLane))throw A.retryLane=L,Ul(a,L),f(y,a,L),hd;ht(),o=Ni(a,o,h)}else a=A.treeContext,vn=Cs(L.nextSibling),Ai=o,zt=!0,qs=null,Mi=!1,a!==null&&Tu(o,a),o=ga(o,y),o.flags|=4096;return o}return a=ds(a.child,{mode:y.mode,children:y.children}),a.ref=o.ref,o.child=a,a.return=o,a}function Ga(a,o){var h=o.ref;if(h===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(i(284));(a===null||a.ref!==h)&&(o.flags|=4194816)}}function zc(a,o,h,y,_){return Ro(o),h=rp(a,o,h,y,void 0,_),y=ap(),a!==null&&!Nn?(sp(a,o,_),Fa(a,o,_)):(zt&&y&&Yf(o),o.flags|=1,Yn(a,o,h,_),o.child)}function Zi(a,o,h,y,_,A){return Ro(o),o.updateQueue=null,h=Rg(o,y,h,_),Mg(a),y=ap(),a!==null&&!Nn?(sp(a,o,A),Fa(a,o,A)):(zt&&y&&Yf(o),o.flags|=1,Yn(a,o,h,A),o.child)}function ji(a,o,h,y,_){if(Ro(o),o.stateNode===null){var A=Il,L=h.contextType;typeof L=="object"&&L!==null&&(A=Ri(L)),A=new h(y,A),o.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=ju,o.stateNode=A,A._reactInternals=o,A=o.stateNode,A.props=y,A.state=o.memoizedState,A.refs={},Zh(o),L=h.contextType,A.context=typeof L=="object"&&L!==null?Ri(L):Il,A.state=o.memoizedState,L=h.getDerivedStateFromProps,typeof L=="function"&&(Oc(o,h,L,y),A.state=o.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(L=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),L!==A.state&&ju.enqueueReplaceState(A,A.state,null),Do(o,y,A,_),Ou(),A.state=o.memoizedState),typeof A.componentDidMount=="function"&&(o.flags|=4194308),y=!0}else if(a===null){A=o.stateNode;var W=o.memoizedProps,re=Hi(h,W);A.props=re;var me=A.context,Se=h.contextType;L=Il,typeof Se=="object"&&Se!==null&&(L=Ri(Se));var Ce=h.getDerivedStateFromProps;Se=typeof Ce=="function"||typeof A.getSnapshotBeforeUpdate=="function",W=o.pendingProps!==W,Se||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(W||me!==L)&&Wg(o,A,y,L),Yl=!1;var be=o.memoizedState;A.state=be,Do(o,y,A,_),Ou(),me=o.memoizedState,W||be!==me||Yl?(typeof Ce=="function"&&(Oc(o,h,Ce,y),me=o.memoizedState),(re=Yl||Kg(o,h,re,y,be,me,L))?(Se||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(o.flags|=4194308)):(typeof A.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=y,o.memoizedState=me),A.props=y,A.state=me,A.context=L,y=re):(typeof A.componentDidMount=="function"&&(o.flags|=4194308),y=!1)}else{A=o.stateNode,Qh(a,o),L=o.memoizedProps,Se=Hi(h,L),A.props=Se,Ce=o.pendingProps,be=A.context,me=h.contextType,re=Il,typeof me=="object"&&me!==null&&(re=Ri(me)),W=h.getDerivedStateFromProps,(me=typeof W=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(L!==Ce||be!==re)&&Wg(o,A,y,re),Yl=!1,be=o.memoizedState,A.state=be,Do(o,y,A,_),Ou();var ve=o.memoizedState;L!==Ce||be!==ve||Yl||a!==null&&a.dependencies!==null&&Tc(a.dependencies)?(typeof W=="function"&&(Oc(o,h,W,y),ve=o.memoizedState),(Se=Yl||Kg(o,h,Se,y,be,ve,re)||a!==null&&a.dependencies!==null&&Tc(a.dependencies))?(me||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(y,ve,re),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(y,ve,re)),typeof A.componentDidUpdate=="function"&&(o.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof A.componentDidUpdate!="function"||L===a.memoizedProps&&be===a.memoizedState||(o.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||L===a.memoizedProps&&be===a.memoizedState||(o.flags|=1024),o.memoizedProps=y,o.memoizedState=ve),A.props=y,A.state=ve,A.context=re,y=Se):(typeof A.componentDidUpdate!="function"||L===a.memoizedProps&&be===a.memoizedState||(o.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||L===a.memoizedProps&&be===a.memoizedState||(o.flags|=1024),y=!1)}return A=y,Ga(a,o),y=(o.flags&128)!==0,A||y?(A=o.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:A.render(),o.flags|=1,a!==null&&y?(o.child=Oo(o,a.child,null,_),o.child=Oo(o,null,h,_)):Yn(a,o,h,_),o.memoizedState=A.state,a=o.child):a=Fa(a,o,_),a}function Ft(a,o,h,y){return Mo(),o.flags|=256,Yn(a,o,h,y),o.child}var $r={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ya(a){return{baseLanes:a,cachePool:Wf()}}function qu(a,o,h){return a=a!==null?a.childLanes&~h:0,o&&(a|=It),a}function Zr(a,o,h){var y=o.pendingProps,_=!1,A=(o.flags&128)!==0,L;if((L=A)||(L=a!==null&&a.memoizedState===null?!1:(Fn.current&2)!==0),L&&(_=!0,o.flags&=-129),L=(o.flags&32)!==0,o.flags&=-33,a===null){if(zt){if(_?Xl(o):$s(),(a=vn)?(a=sS(a,Mi),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:hs!==null?{id:ps,overflow:ms}:null,retryLane:536870912,hydrationErrors:null},h=vg(a),h.return=o,o.child=h,Ai=o,vn=null)):a=null,a===null)throw Ot(o);return Pb(a)?o.lanes=32:o.lanes=536870912,null}var W=y.children;return y=y.fallback,_?($s(),_=o.mode,W=Bc({mode:"hidden",children:W},_),y=Gs(y,_,h,null),W.return=o,y.return=o,W.sibling=y,o.child=W,y=o.child,y.memoizedState=ya(h),y.childLanes=qu(a,L,h),o.memoizedState=$r,Pa(null,y)):(Xl(o),Kl(o,W))}var re=a.memoizedState;if(re!==null&&(W=re.dehydrated,W!==null)){if(A)o.flags&256?(Xl(o),o.flags&=-257,o=Lc(a,o,h)):o.memoizedState!==null?($s(),o.child=a.child,o.flags|=128,o=null):($s(),W=y.fallback,_=o.mode,y=Bc({mode:"visible",children:y.children},_),W=Gs(W,_,h,null),W.flags|=2,y.return=o,W.return=o,y.sibling=W,o.child=y,Oo(o,a.child,null,h),y=o.child,y.memoizedState=ya(h),y.childLanes=qu(a,L,h),o.memoizedState=$r,o=Pa(null,y));else if(Xl(o),Pb(W)){if(L=W.nextSibling&&W.nextSibling.dataset,L)var me=L.dgst;L=me,y=Error(i(419)),y.stack="",y.digest=L,Cu({value:y,source:null,stack:null}),o=Lc(a,o,h)}else if(Nn||jl(a,o,h,!1),L=(h&a.childLanes)!==0,Nn||L){if(L=sn,L!==null&&(y=Cn(L,h),y!==0&&y!==re.retryLane))throw re.retryLane=y,Ul(a,y),f(L,a,y),hd;jb(W)||ht(),o=Lc(a,o,h)}else jb(W)?(o.flags|=192,o.child=a.child,o=null):(a=re.treeContext,vn=Cs(W.nextSibling),Ai=o,zt=!0,qs=null,Mi=!1,a!==null&&Tu(o,a),o=Kl(o,y.children),o.flags|=4096);return o}return _?($s(),W=y.fallback,_=o.mode,re=a.child,me=re.sibling,y=ds(re,{mode:"hidden",children:y.children}),y.subtreeFlags=re.subtreeFlags&65011712,me!==null?W=ds(me,W):(W=Gs(W,_,h,null),W.flags|=2),W.return=o,y.return=o,y.sibling=W,o.child=y,Pa(null,y),y=o.child,W=a.child.memoizedState,W===null?W=ya(h):(_=W.cachePool,_!==null?(re=$e._currentValue,_=_.parent!==re?{parent:re,pool:re}:_):_=Wf(),W={baseLanes:W.baseLanes|h,cachePool:_}),y.memoizedState=W,y.childLanes=qu(a,L,h),o.memoizedState=$r,Pa(a.child,y)):(Xl(o),h=a.child,a=h.sibling,h=ds(h,{mode:"visible",children:y.children}),h.return=o,h.sibling=null,a!==null&&(L=o.deletions,L===null?(o.deletions=[a],o.flags|=16):L.push(a)),o.child=h,o.memoizedState=null,h)}function Kl(a,o){return o=Bc({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function Bc(a,o){return a=ur(22,a,null,o),a.lanes=0,a}function Lc(a,o,h){return Oo(o,a.child,null,h),a=Kl(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function Lo(a,o,h){a.lanes|=o;var y=a.alternate;y!==null&&(y.lanes|=o),Xs(a.return,o,h)}function Yu(a,o,h,y,_,A){var L=a.memoizedState;L===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:_,treeForkCount:A}:(L.isBackwards=o,L.rendering=null,L.renderingStartTime=0,L.last=y,L.tail=h,L.tailMode=_,L.treeForkCount=A)}function Vu(a,o,h){var y=o.pendingProps,_=y.revealOrder,A=y.tail;y=y.children;var L=Fn.current,W=(L&2)!==0;if(W?(L=L&1|2,o.flags|=128):L&=1,U(Fn,L),Yn(a,o,y,h),y=zt?wc:0,!W&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Lo(a,h,o);else if(a.tag===19)Lo(a,h,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(_){case"forwards":for(h=o.child,_=null;h!==null;)a=h.alternate,a!==null&&Jf(a)===null&&(_=h),h=h.sibling;h=_,h===null?(_=o.child,o.child=null):(_=h.sibling,h.sibling=null),Yu(o,!1,_,h,A,y);break;case"backwards":case"unstable_legacy-backwards":for(h=null,_=o.child,o.child=null;_!==null;){if(a=_.alternate,a!==null&&Jf(a)===null){o.child=_;break}a=_.sibling,_.sibling=h,h=_,_=a}Yu(o,!0,h,null,A,y);break;case"together":Yu(o,!1,null,null,void 0,y);break;default:o.memoizedState=null}return o.child}function Fa(a,o,h){if(a!==null&&(o.dependencies=a.dependencies),ea|=o.lanes,(h&o.childLanes)===0)if(a!==null){if(jl(a,o,h,!1),(h&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(i(153));if(o.child!==null){for(a=o.child,h=ds(a,a.pendingProps),o.child=h,h.return=o;a.sibling!==null;)a=a.sibling,h=h.sibling=ds(a,a.pendingProps),h.return=o;h.sibling=null}return o.child}function Wl(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&Tc(a)))}function Xu(a,o,h){switch(o.tag){case 3:pe(o,o.stateNode.containerInfo),Vs(o,$e,a.memoizedState.cache),Mo();break;case 27:case 5:Le(o);break;case 4:pe(o,o.stateNode.containerInfo);break;case 10:Vs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,np(o),null;break;case 13:var y=o.memoizedState;if(y!==null)return y.dehydrated!==null?(Xl(o),o.flags|=128,null):(h&o.child.childLanes)!==0?Zr(a,o,h):(Xl(o),a=Fa(a,o,h),a!==null?a.sibling:null);Xl(o);break;case 19:var _=(a.flags&128)!==0;if(y=(h&o.childLanes)!==0,y||(jl(a,o,h,!1),y=(h&o.childLanes)!==0),_){if(y)return Vu(a,o,h);o.flags|=128}if(_=o.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),U(Fn,Fn.current),y)break;return null;case 22:return o.lanes=0,Wr(a,o,h,o.pendingProps);case 24:Vs(o,$e,a.memoizedState.cache)}return Fa(a,o,h)}function pd(a,o,h){if(a!==null)if(a.memoizedProps!==o.pendingProps)Nn=!0;else{if(!Wl(a,h)&&(o.flags&128)===0)return Nn=!1,Xu(a,o,h);Nn=(a.flags&131072)!==0}else Nn=!1,zt&&(o.flags&1048576)!==0&&jh(o,wc,o.index);switch(o.lanes=0,o.tag){case 16:e:{var y=o.pendingProps;if(a=ko(o.elementType),o.type=a,typeof a=="function")fr(a)?(y=Hi(a,y),o.tag=1,o=ji(null,o,a,y,h)):(o.tag=0,o=zc(null,o,a,y,h));else{if(a!=null){var _=a.$$typeof;if(_===O){o.tag=11,o=Pu(null,o,a,y,h);break e}else if(_===F){o.tag=14,o=Gu(null,o,a,y,h);break e}}throw o=q(a)||a,Error(i(306,o,""))}}return o;case 0:return zc(a,o,o.type,o.pendingProps,h);case 1:return y=o.type,_=Hi(y,o.pendingProps),ji(a,o,y,_,h);case 3:e:{if(pe(o,o.stateNode.containerInfo),a===null)throw Error(i(387));y=o.pendingProps;var A=o.memoizedState;_=A.element,Qh(a,o),Do(o,y,null,h);var L=o.memoizedState;if(y=L.cache,Vs(o,$e,y),y!==A.cache&&Kf(o,[$e],h,!0),Ou(),y=L.element,A.isDehydrated)if(A={element:y,isDehydrated:!1,cache:L.cache},o.updateQueue.baseState=A,o.memoizedState=A,o.flags&256){o=Ft(a,o,y,h);break e}else if(y!==_){_=_r(Error(i(424)),o),Cu(_),o=Ft(a,o,y,h);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(vn=Cs(a.firstChild),Ai=o,zt=!0,qs=null,Mi=!0,h=Cg(o,null,y,h),o.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Mo(),y===_){o=Fa(a,o,h);break e}Yn(a,o,y,h)}o=o.child}return o;case 26:return Ga(a,o),a===null?(h=dS(o.type,null,o.pendingProps,null))?o.memoizedState=h:zt||(h=o.type,a=o.pendingProps,y=ay(ge.current).createElement(h),y[yt]=o,y[li]=a,gr(y,h,a),Ln(y),o.stateNode=y):o.memoizedState=dS(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return Le(o),a===null&&zt&&(y=o.stateNode=cS(o.type,o.pendingProps,ge.current),Ai=o,Mi=!0,_=vn,Fc(o.type)?(Gb=_,vn=Cs(y.firstChild)):vn=_),Yn(a,o,o.pendingProps.children,h),Ga(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&zt&&((_=y=vn)&&(y=Kk(y,o.type,o.pendingProps,Mi),y!==null?(o.stateNode=y,Ai=o,vn=Cs(y.firstChild),Mi=!1,_=!0):_=!1),_||Ot(o)),Le(o),_=o.type,A=o.pendingProps,L=a!==null?a.memoizedProps:null,y=A.children,Ub(_,A)?y=null:L!==null&&Ub(_,L)&&(o.flags|=32),o.memoizedState!==null&&(_=rp(a,o,xb,null,null,h),Up._currentValue=_),Ga(a,o),Yn(a,o,y,h),o.child;case 6:return a===null&&zt&&((a=h=vn)&&(h=Wk(h,o.pendingProps,Mi),h!==null?(o.stateNode=h,Ai=o,vn=null,a=!0):a=!1),a||Ot(o)),null;case 13:return Zr(a,o,h);case 4:return pe(o,o.stateNode.containerInfo),y=o.pendingProps,a===null?o.child=Oo(o,null,y,h):Yn(a,o,y,h),o.child;case 11:return Pu(a,o,o.type,o.pendingProps,h);case 7:return Yn(a,o,o.pendingProps,h),o.child;case 8:return Yn(a,o,o.pendingProps.children,h),o.child;case 12:return Yn(a,o,o.pendingProps.children,h),o.child;case 10:return y=o.pendingProps,Vs(o,o.type,y.value),Yn(a,o,y.children,h),o.child;case 9:return _=o.type._context,y=o.pendingProps.children,Ro(o),_=Ri(_),y=y(_),o.flags|=1,Yn(a,o,y,h),o.child;case 14:return Gu(a,o,o.type,o.pendingProps,h);case 15:return Kr(a,o,o.type,o.pendingProps,h);case 19:return Vu(a,o,h);case 31:return Fu(a,o,h);case 22:return Wr(a,o,h,o.pendingProps);case 24:return Ro(o),y=Ri($e),a===null?(_=gs(),_===null&&(_=sn,A=Yh(),_.pooledCache=A,A.refCount++,A!==null&&(_.pooledCacheLanes|=h),_=A),o.memoizedState={parent:y,cache:_},Zh(o),Vs(o,$e,_)):((a.lanes&h)!==0&&(Qh(a,o),Do(o,null,null,h),Ou()),_=a.memoizedState,A=o.memoizedState,_.parent!==y?(_={parent:y,cache:y},o.memoizedState=_,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=_),Vs(o,$e,y)):(y=A.cache,Vs(o,$e,y),y!==_.cache&&Kf(o,[$e],h,!0))),Yn(a,o,o.pendingProps.children,h),o.child;case 29:throw o.pendingProps}throw Error(i(156,o.tag))}function Cr(a){a.flags|=4}function $l(a,o,h,y,_){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(_&335544128)===_)if(a.stateNode.complete)a.flags|=8192;else if(ke())a.flags|=8192;else throw rt=Ru,Mu}else a.flags&=-16777217}function Js(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!yS(o))if(ke())a.flags|=8192;else throw rt=Ru,Mu}function Uc(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?et():536870912,a.lanes|=o,ta|=o)}function Ku(a,o){if(!zt)switch(a.tailMode){case"hidden":o=a.tail;for(var h=null;o!==null;)o.alternate!==null&&(h=o),o=o.sibling;h===null?a.tail=null:h.sibling=null;break;case"collapsed":h=a.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function fn(a){var o=a.alternate!==null&&a.alternate.child===a.child,h=0,y=0;if(o)for(var _=a.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags&65011712,y|=_.flags&65011712,_.return=a,_=_.sibling;else for(_=a.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags,y|=_.flags,_.return=a,_=_.sibling;return a.subtreeFlags|=y,a.childLanes=h,o}function Mp(a,o,h){var y=o.pendingProps;switch(Hl(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fn(o),null;case 1:return fn(o),null;case 3:return h=o.stateNode,y=null,a!==null&&(y=a.memoizedState.cache),o.memoizedState.cache!==y&&(o.flags|=2048),pa($e),Ae(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(a===null||a.child===null)&&(Ao(o)?Cr(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Ph())),fn(o),null;case 26:var _=o.type,A=o.memoizedState;return a===null?(Cr(o),A!==null?(fn(o),Js(o,A)):(fn(o),$l(o,_,null,y,h))):A?A!==a.memoizedState?(Cr(o),fn(o),Js(o,A)):(fn(o),o.flags&=-16777217):(a=a.memoizedProps,a!==y&&Cr(o),fn(o),$l(o,_,a,y,h)),null;case 27:if(Ge(o),h=ge.current,_=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==y&&Cr(o);else{if(!y){if(o.stateNode===null)throw Error(i(166));return fn(o),null}a=le.current,Ao(o)?Xf(o):(a=cS(_,y,h),o.stateNode=a,Cr(o))}return fn(o),null;case 5:if(Ge(o),_=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==y&&Cr(o);else{if(!y){if(o.stateNode===null)throw Error(i(166));return fn(o),null}if(A=le.current,Ao(o))Xf(o);else{var L=ay(ge.current);switch(A){case 1:A=L.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:A=L.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":A=L.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":A=L.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":A=L.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof y.is=="string"?L.createElement("select",{is:y.is}):L.createElement("select"),y.multiple?A.multiple=!0:y.size&&(A.size=y.size);break;default:A=typeof y.is=="string"?L.createElement(_,{is:y.is}):L.createElement(_)}}A[yt]=o,A[li]=y;e:for(L=o.child;L!==null;){if(L.tag===5||L.tag===6)A.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===o)break e;for(;L.sibling===null;){if(L.return===null||L.return===o)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}o.stateNode=A;e:switch(gr(A,_,y),_){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&Cr(o)}}return fn(o),$l(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,h),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==y&&Cr(o);else{if(typeof y!="string"&&o.stateNode===null)throw Error(i(166));if(a=ge.current,Ao(o)){if(a=o.stateNode,h=o.memoizedProps,y=null,_=Ai,_!==null)switch(_.tag){case 27:case 5:y=_.memoizedProps}a[yt]=o,a=!!(a.nodeValue===h||y!==null&&y.suppressHydrationWarning===!0||Q1(a.nodeValue,h)),a||Ot(o,!0)}else a=ay(a).createTextNode(y),a[yt]=o,o.stateNode=a}return fn(o),null;case 31:if(h=o.memoizedState,a===null||a.memoizedState!==null){if(y=Ao(o),h!==null){if(a===null){if(!y)throw Error(i(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(557));a[yt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;fn(o),a=!1}else h=Ph(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=h),a=!0;if(!a)return o.flags&256?(Yr(o),o):(Yr(o),null);if((o.flags&128)!==0)throw Error(i(558))}return fn(o),null;case 13:if(y=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(_=Ao(o),y!==null&&y.dehydrated!==null){if(a===null){if(!_)throw Error(i(318));if(_=o.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(i(317));_[yt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;fn(o),_=!1}else _=Ph(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=_),_=!0;if(!_)return o.flags&256?(Yr(o),o):(Yr(o),null)}return Yr(o),(o.flags&128)!==0?(o.lanes=h,o):(h=y!==null,a=a!==null&&a.memoizedState!==null,h&&(y=o.child,_=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(_=y.alternate.memoizedState.cachePool.pool),A=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(A=y.memoizedState.cachePool.pool),A!==_&&(y.flags|=2048)),h!==a&&h&&(o.child.flags|=8192),Uc(o,o.updateQueue),fn(o),null);case 4:return Ae(),a===null&&Ob(o.stateNode.containerInfo),fn(o),null;case 10:return pa(o.type),fn(o),null;case 19:if(te(Fn),y=o.memoizedState,y===null)return fn(o),null;if(_=(o.flags&128)!==0,A=y.rendering,A===null)if(_)Ku(y,!1);else{if(ln!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(A=Jf(a),A!==null){for(o.flags|=128,Ku(y,!1),a=A.updateQueue,o.updateQueue=a,Uc(o,a),o.subtreeFlags=0,a=h,h=o.child;h!==null;)Ki(h,a),h=h.sibling;return U(Fn,Fn.current&1|2),zt&&Fs(o,y.treeForkCount),o.child}a=a.sibling}y.tail!==null&&hn()>na&&(o.flags|=128,_=!0,Ku(y,!1),o.lanes=4194304)}else{if(!_)if(a=Jf(A),a!==null){if(o.flags|=128,_=!0,a=a.updateQueue,o.updateQueue=a,Uc(o,a),Ku(y,!0),y.tail===null&&y.tailMode==="hidden"&&!A.alternate&&!zt)return fn(o),null}else 2*hn()-y.renderingStartTime>na&&h!==536870912&&(o.flags|=128,_=!0,Ku(y,!1),o.lanes=4194304);y.isBackwards?(A.sibling=o.child,o.child=A):(a=y.last,a!==null?a.sibling=A:o.child=A,y.last=A)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=hn(),a.sibling=null,h=Fn.current,U(Fn,_?h&1|2:h&1),zt&&Fs(o,y.treeForkCount),a):(fn(o),null);case 22:case 23:return Yr(o),$i(),y=o.memoizedState!==null,a!==null?a.memoizedState!==null!==y&&(o.flags|=8192):y&&(o.flags|=8192),y?(h&536870912)!==0&&(o.flags&128)===0&&(fn(o),o.subtreeFlags&6&&(o.flags|=8192)):fn(o),h=o.updateQueue,h!==null&&Uc(o,h.retryQueue),h=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),y=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(y=o.memoizedState.cachePool.pool),y!==h&&(o.flags|=2048),a!==null&&te(Pl),null;case 24:return h=null,a!==null&&(h=a.memoizedState.cache),o.memoizedState.cache!==h&&(o.flags|=2048),pa($e),fn(o),null;case 25:return null;case 30:return null}throw Error(i(156,o.tag))}function md(a,o){switch(Hl(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return pa($e),Ae(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return Ge(o),null;case 31:if(o.memoizedState!==null){if(Yr(o),o.alternate===null)throw Error(i(340));Mo()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(Yr(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(i(340));Mo()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return te(Fn),null;case 4:return Ae(),null;case 10:return pa(o.type),null;case 22:case 23:return Yr(o),$i(),a!==null&&te(Pl),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return pa($e),null;case 25:return null;default:return null}}function Uo(a,o){switch(Hl(o),o.tag){case 3:pa($e),Ae();break;case 26:case 27:case 5:Ge(o);break;case 4:Ae();break;case 31:o.memoizedState!==null&&Yr(o);break;case 13:Yr(o);break;case 19:te(Fn);break;case 10:pa(o.type);break;case 22:case 23:Yr(o),$i(),a!==null&&te(Pl);break;case 24:pa($e)}}function Ss(a,o){try{var h=o.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var _=y.next;h=_;do{if((h.tag&a)===a){y=void 0;var A=h.create,L=h.inst;y=A(),L.destroy=y}h=h.next}while(h!==_)}}catch(W){yn(o,o.return,W)}}function ba(a,o,h){try{var y=o.updateQueue,_=y!==null?y.lastEffect:null;if(_!==null){var A=_.next;y=A;do{if((y.tag&a)===a){var L=y.inst,W=L.destroy;if(W!==void 0){L.destroy=void 0,_=o;var re=h,me=W;try{me()}catch(Se){yn(_,re,Se)}}}y=y.next}while(y!==A)}}catch(Se){yn(o,o.return,Se)}}function Zl(a){var o=a.updateQueue;if(o!==null){var h=a.stateNode;try{Ui(o,h)}catch(y){yn(a,a.return,y)}}}function Rp(a,o,h){h.props=Hi(a.type,a.memoizedProps),h.state=a.memoizedState;try{h.componentWillUnmount()}catch(y){yn(a,o,y)}}function Es(a,o){try{var h=a.ref;if(h!==null){switch(a.tag){case 26:case 27:case 5:var y=a.stateNode;break;case 30:y=a.stateNode;break;default:y=a.stateNode}typeof h=="function"?a.refCleanup=h(y):h.current=y}}catch(_){yn(a,o,_)}}function Qr(a,o){var h=a.ref,y=a.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(_){yn(a,o,_)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(_){yn(a,o,_)}else h.current=null}function Jr(a){var o=a.type,h=a.memoizedProps,y=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":h.autoFocus&&y.focus();break e;case"img":h.src?y.src=h.src:h.srcSet&&(y.srcset=h.srcSet)}}catch(_){yn(a,a.return,_)}}function xa(a,o,h){try{var y=a.stateNode;Gk(y,a.type,h,o),y[li]=o}catch(_){yn(a,a.return,_)}}function ui(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Fc(a.type)||a.tag===4}function ws(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||ui(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Fc(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function _t(a,o,h){var y=a.tag;if(y===5||y===6)a=a.stateNode,o?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(a,o):(o=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,o.appendChild(a),h=h._reactRootContainer,h!=null||o.onclick!==null||(o.onclick=De));else if(y!==4&&(y===27&&Fc(a.type)&&(h=a.stateNode,o=null),a=a.child,a!==null))for(_t(a,o,h),a=a.sibling;a!==null;)_t(a,o,h),a=a.sibling}function Zt(a,o,h){var y=a.tag;if(y===5||y===6)a=a.stateNode,o?h.insertBefore(a,o):h.appendChild(a);else if(y!==4&&(y===27&&Fc(a.type)&&(h=a.stateNode),a=a.child,a!==null))for(Zt(a,o,h),a=a.sibling;a!==null;)Zt(a,o,h),a=a.sibling}function ei(a){var o=a.stateNode,h=a.memoizedProps;try{for(var y=a.type,_=o.attributes;_.length;)o.removeAttributeNode(_[0]);gr(o,y,h),o[yt]=a,o[li]=h}catch(A){yn(a,a.return,A)}}var va=!1,kn=!1,el=!1,Wu=typeof WeakSet=="function"?WeakSet:Set,Vn=null;function Ic(a,o){if(a=a.containerInfo,Bb=dy,a=Uf(a),yc(a)){if("selectionStart"in a)var h={start:a.selectionStart,end:a.selectionEnd};else e:{h=(h=a.ownerDocument)&&h.defaultView||window;var y=h.getSelection&&h.getSelection();if(y&&y.rangeCount!==0){h=y.anchorNode;var _=y.anchorOffset,A=y.focusNode;y=y.focusOffset;try{h.nodeType,A.nodeType}catch{h=null;break e}var L=0,W=-1,re=-1,me=0,Se=0,Ce=a,be=null;t:for(;;){for(var ve;Ce!==h||_!==0&&Ce.nodeType!==3||(W=L+_),Ce!==A||y!==0&&Ce.nodeType!==3||(re=L+y),Ce.nodeType===3&&(L+=Ce.nodeValue.length),(ve=Ce.firstChild)!==null;)be=Ce,Ce=ve;for(;;){if(Ce===a)break t;if(be===h&&++me===_&&(W=L),be===A&&++Se===y&&(re=L),(ve=Ce.nextSibling)!==null)break;Ce=be,be=Ce.parentNode}Ce=ve}h=W===-1||re===-1?null:{start:W,end:re}}else h=null}h=h||{start:0,end:0}}else h=null;for(Lb={focusedElem:a,selectionRange:h},dy=!1,Vn=o;Vn!==null;)if(o=Vn,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Vn=a;else for(;Vn!==null;){switch(o=Vn,A=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(h=0;h<a.length;h++)_=a[h],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&A!==null){a=void 0,h=o,_=A.memoizedProps,A=A.memoizedState,y=h.stateNode;try{var Ye=Hi(h.type,_);a=y.getSnapshotBeforeUpdate(Ye,A),y.__reactInternalSnapshotBeforeUpdate=a}catch(lt){yn(h,h.return,lt)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,h=a.nodeType,h===9)Hb(a);else if(h===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Hb(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(i(163))}if(a=o.sibling,a!==null){a.return=o.return,Vn=a;break}Vn=o.return}}function Qg(a,o,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:tl(a,h),y&4&&Ss(5,h);break;case 1:if(tl(a,h),y&4)if(a=h.stateNode,o===null)try{a.componentDidMount()}catch(L){yn(h,h.return,L)}else{var _=Hi(h.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(_,o,a.__reactInternalSnapshotBeforeUpdate)}catch(L){yn(h,h.return,L)}}y&64&&Zl(h),y&512&&Es(h,h.return);break;case 3:if(tl(a,h),y&64&&(a=h.updateQueue,a!==null)){if(o=null,h.child!==null)switch(h.child.tag){case 27:case 5:o=h.child.stateNode;break;case 1:o=h.child.stateNode}try{Ui(a,o)}catch(L){yn(h,h.return,L)}}break;case 27:o===null&&y&4&&ei(h);case 26:case 5:tl(a,h),o===null&&y&4&&Jr(h),y&512&&Es(h,h.return);break;case 12:tl(a,h);break;case 31:tl(a,h),y&4&&yd(a,h);break;case 13:tl(a,h),y&4&&Np(a,h),y&64&&(a=h.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(h=Nk.bind(null,h),$k(a,h))));break;case 22:if(y=h.memoizedState!==null||va,!y){o=o!==null&&o.memoizedState!==null||kn,_=va;var A=kn;va=y,(kn=o)&&!A?an(a,h,(h.subtreeFlags&8772)!==0):tl(a,h),va=_,kn=A}break;case 30:break;default:tl(a,h)}}function gd(a){var o=a.alternate;o!==null&&(a.alternate=null,gd(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Ls(o)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var qt=null,fi=!1;function Qi(a,o,h){for(h=h.child;h!==null;)Ql(a,o,h),h=h.sibling}function Ql(a,o,h){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(xn,h)}catch{}switch(h.tag){case 26:kn||Qr(h,o),Qi(a,o,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:kn||Qr(h,o);var y=qt,_=fi;Fc(h.type)&&(qt=h.stateNode,fi=!1),Qi(a,o,h),zp(h.stateNode),qt=y,fi=_;break;case 5:kn||Qr(h,o);case 6:if(y=qt,_=fi,qt=null,Qi(a,o,h),qt=y,fi=_,qt!==null)if(fi)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(h.stateNode)}catch(A){yn(h,o,A)}else try{qt.removeChild(h.stateNode)}catch(A){yn(h,o,A)}break;case 18:qt!==null&&(fi?(a=qt,rS(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,h.stateNode),Md(a)):rS(qt,h.stateNode));break;case 4:y=qt,_=fi,qt=h.stateNode.containerInfo,fi=!0,Qi(a,o,h),qt=y,fi=_;break;case 0:case 11:case 14:case 15:ba(2,h,o),kn||ba(4,h,o),Qi(a,o,h);break;case 1:kn||(Qr(h,o),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Rp(h,o,y)),Qi(a,o,h);break;case 21:Qi(a,o,h);break;case 22:kn=(y=kn)||h.memoizedState!==null,Qi(a,o,h),kn=y;break;default:Qi(a,o,h)}}function yd(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Md(a)}catch(h){yn(o,o.return,h)}}}function Np(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Md(a)}catch(h){yn(o,o.return,h)}}function Jg(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new Wu),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new Wu),o;default:throw Error(i(435,a.tag))}}function ti(a,o){var h=Jg(a);o.forEach(function(y){if(!h.has(y)){h.add(y);var _=kk.bind(null,a,y);y.then(_,_)}})}function Ji(a,o){var h=o.deletions;if(h!==null)for(var y=0;y<h.length;y++){var _=h[y],A=a,L=o,W=L;e:for(;W!==null;){switch(W.tag){case 27:if(Fc(W.type)){qt=W.stateNode,fi=!1;break e}break;case 5:qt=W.stateNode,fi=!1;break e;case 3:case 4:qt=W.stateNode.containerInfo,fi=!0;break e}W=W.return}if(qt===null)throw Error(i(160));Ql(A,L,_),qt=null,fi=!1,A=_.alternate,A!==null&&(A.return=null),_.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)Jl(o,a),o=o.sibling}var Ar=null;function Jl(a,o){var h=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Ji(o,a),Xn(a),y&4&&(ba(3,a,a.return),Ss(3,a),ba(5,a,a.return));break;case 1:Ji(o,a),Xn(a),y&512&&(kn||h===null||Qr(h,h.return)),y&64&&va&&(a=a.updateQueue,a!==null&&(y=a.callbacks,y!==null&&(h=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:var _=Ar;if(Ji(o,a),Xn(a),y&512&&(kn||h===null||Qr(h,h.return)),y&4){var A=h!==null?h.memoizedState:null;if(y=a.memoizedState,h===null)if(y===null)if(a.stateNode===null){e:{y=a.type,h=a.memoizedProps,_=_.ownerDocument||_;t:switch(y){case"title":A=_.getElementsByTagName("title")[0],(!A||A[Da]||A[yt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=_.createElement(y),_.head.insertBefore(A,_.querySelector("head > title"))),gr(A,y,h),A[yt]=a,Ln(A),y=A;break e;case"link":var L=mS("link","href",_).get(y+(h.href||""));if(L){for(var W=0;W<L.length;W++)if(A=L[W],A.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&A.getAttribute("rel")===(h.rel==null?null:h.rel)&&A.getAttribute("title")===(h.title==null?null:h.title)&&A.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){L.splice(W,1);break t}}A=_.createElement(y),gr(A,y,h),_.head.appendChild(A);break;case"meta":if(L=mS("meta","content",_).get(y+(h.content||""))){for(W=0;W<L.length;W++)if(A=L[W],A.getAttribute("content")===(h.content==null?null:""+h.content)&&A.getAttribute("name")===(h.name==null?null:h.name)&&A.getAttribute("property")===(h.property==null?null:h.property)&&A.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&A.getAttribute("charset")===(h.charSet==null?null:h.charSet)){L.splice(W,1);break t}}A=_.createElement(y),gr(A,y,h),_.head.appendChild(A);break;default:throw Error(i(468,y))}A[yt]=a,Ln(A),y=A}a.stateNode=y}else gS(_,a.type,a.stateNode);else a.stateNode=pS(_,y,a.memoizedProps);else A!==y?(A===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):A.count--,y===null?gS(_,a.type,a.stateNode):pS(_,y,a.memoizedProps)):y===null&&a.stateNode!==null&&xa(a,a.memoizedProps,h.memoizedProps)}break;case 27:Ji(o,a),Xn(a),y&512&&(kn||h===null||Qr(h,h.return)),h!==null&&y&4&&xa(a,a.memoizedProps,h.memoizedProps);break;case 5:if(Ji(o,a),Xn(a),y&512&&(kn||h===null||Qr(h,h.return)),a.flags&32){_=a.stateNode;try{it(_,"")}catch(Ye){yn(a,a.return,Ye)}}y&4&&a.stateNode!=null&&(_=a.memoizedProps,xa(a,_,h!==null?h.memoizedProps:_)),y&1024&&(el=!0);break;case 6:if(Ji(o,a),Xn(a),y&4){if(a.stateNode===null)throw Error(i(162));y=a.memoizedProps,h=a.stateNode;try{h.nodeValue=y}catch(Ye){yn(a,a.return,Ye)}}break;case 3:if(oy=null,_=Ar,Ar=sy(o.containerInfo),Ji(o,a),Ar=_,Xn(a),y&4&&h!==null&&h.memoizedState.isDehydrated)try{Md(o.containerInfo)}catch(Ye){yn(a,a.return,Ye)}el&&(el=!1,ey(a));break;case 4:y=Ar,Ar=sy(a.stateNode.containerInfo),Ji(o,a),Xn(a),Ar=y;break;case 12:Ji(o,a),Xn(a);break;case 31:Ji(o,a),Xn(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,ti(a,y)));break;case 13:Ji(o,a),Xn(a),a.child.flags&8192&&a.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(rl=hn()),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,ti(a,y)));break;case 22:_=a.memoizedState!==null;var re=h!==null&&h.memoizedState!==null,me=va,Se=kn;if(va=me||_,kn=Se||re,Ji(o,a),kn=Se,va=me,Xn(a),y&8192)e:for(o=a.stateNode,o._visibility=_?o._visibility&-2:o._visibility|1,_&&(h===null||re||va||kn||Io(a)),h=null,o=a;;){if(o.tag===5||o.tag===26){if(h===null){re=h=o;try{if(A=re.stateNode,_)L=A.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{W=re.stateNode;var Ce=re.memoizedProps.style,be=Ce!=null&&Ce.hasOwnProperty("display")?Ce.display:null;W.style.display=be==null||typeof be=="boolean"?"":(""+be).trim()}}catch(Ye){yn(re,re.return,Ye)}}}else if(o.tag===6){if(h===null){re=o;try{re.stateNode.nodeValue=_?"":re.memoizedProps}catch(Ye){yn(re,re.return,Ye)}}}else if(o.tag===18){if(h===null){re=o;try{var ve=re.stateNode;_?aS(ve,!0):aS(re.stateNode,!1)}catch(Ye){yn(re,re.return,Ye)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;h===o&&(h=null),o=o.return}h===o&&(h=null),o.sibling.return=o.return,o=o.sibling}y&4&&(y=a.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,ti(a,h))));break;case 19:Ji(o,a),Xn(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,ti(a,y)));break;case 30:break;case 21:break;default:Ji(o,a),Xn(a)}}function Xn(a){var o=a.flags;if(o&2){try{for(var h,y=a.return;y!==null;){if(ui(y)){h=y;break}y=y.return}if(h==null)throw Error(i(160));switch(h.tag){case 27:var _=h.stateNode,A=ws(a);Zt(a,A,_);break;case 5:var L=h.stateNode;h.flags&32&&(it(L,""),h.flags&=-33);var W=ws(a);Zt(a,W,L);break;case 3:case 4:var re=h.stateNode.containerInfo,me=ws(a);_t(a,me,re);break;default:throw Error(i(161))}}catch(Se){yn(a,a.return,Se)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function ey(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;ey(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function tl(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Qg(a,o.alternate,o),o=o.sibling}function Io(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:ba(4,o,o.return),Io(o);break;case 1:Qr(o,o.return);var h=o.stateNode;typeof h.componentWillUnmount=="function"&&Rp(o,o.return,h),Io(o);break;case 27:zp(o.stateNode);case 26:case 5:Qr(o,o.return),Io(o);break;case 22:o.memoizedState===null&&Io(o);break;case 30:Io(o);break;default:Io(o)}a=a.sibling}}function an(a,o,h){for(h=h&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var y=o.alternate,_=a,A=o,L=A.flags;switch(A.tag){case 0:case 11:case 15:an(_,A,h),Ss(4,A);break;case 1:if(an(_,A,h),y=A,_=y.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(me){yn(y,y.return,me)}if(y=A,_=y.updateQueue,_!==null){var W=y.stateNode;try{var re=_.shared.hiddenCallbacks;if(re!==null)for(_.shared.hiddenCallbacks=null,_=0;_<re.length;_++)bs(re[_],W)}catch(me){yn(y,y.return,me)}}h&&L&64&&Zl(A),Es(A,A.return);break;case 27:ei(A);case 26:case 5:an(_,A,h),h&&y===null&&L&4&&Jr(A),Es(A,A.return);break;case 12:an(_,A,h);break;case 31:an(_,A,h),h&&L&4&&yd(_,A);break;case 13:an(_,A,h),h&&L&4&&Np(_,A);break;case 22:A.memoizedState===null&&an(_,A,h),Es(A,A.return);break;case 30:break;default:an(_,A,h)}o=o.sibling}}function bd(a,o){var h=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==h&&(a!=null&&a.refCount++,h!=null&&Li(h))}function nl(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Li(a))}function _i(a,o,h,y){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)jn(a,o,h,y),o=o.sibling}function jn(a,o,h,y){var _=o.flags;switch(o.tag){case 0:case 11:case 15:_i(a,o,h,y),_&2048&&Ss(9,o);break;case 1:_i(a,o,h,y);break;case 3:_i(a,o,h,y),_&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Li(a)));break;case 12:if(_&2048){_i(a,o,h,y),a=o.stateNode;try{var A=o.memoizedProps,L=A.id,W=A.onPostCommit;typeof W=="function"&&W(L,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(re){yn(o,o.return,re)}}else _i(a,o,h,y);break;case 31:_i(a,o,h,y);break;case 13:_i(a,o,h,y);break;case 23:break;case 22:A=o.stateNode,L=o.alternate,o.memoizedState!==null?A._visibility&2?_i(a,o,h,y):Hc(a,o):A._visibility&2?_i(a,o,h,y):(A._visibility|=2,eo(a,o,h,y,(o.subtreeFlags&10256)!==0||!1)),_&2048&&bd(L,o);break;case 24:_i(a,o,h,y),_&2048&&nl(o.alternate,o);break;default:_i(a,o,h,y)}}function eo(a,o,h,y,_){for(_=_&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var A=a,L=o,W=h,re=y,me=L.flags;switch(L.tag){case 0:case 11:case 15:eo(A,L,W,re,_),Ss(8,L);break;case 23:break;case 22:var Se=L.stateNode;L.memoizedState!==null?Se._visibility&2?eo(A,L,W,re,_):Hc(A,L):(Se._visibility|=2,eo(A,L,W,re,_)),_&&me&2048&&bd(L.alternate,L);break;case 24:eo(A,L,W,re,_),_&&me&2048&&nl(L.alternate,L);break;default:eo(A,L,W,re,_)}o=o.sibling}}function Hc(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var h=a,y=o,_=y.flags;switch(y.tag){case 22:Hc(h,y),_&2048&&bd(y.alternate,y);break;case 24:Hc(h,y),_&2048&&nl(y.alternate,y);break;default:Hc(h,y)}o=o.sibling}}var Kn=8192;function Ho(a,o,h){if(a.subtreeFlags&Kn)for(a=a.child;a!==null;)ni(a,o,h),a=a.sibling}function ni(a,o,h){switch(a.tag){case 26:Ho(a,o,h),a.flags&Kn&&a.memoizedState!==null&&oO(h,Ar,a.memoizedState,a.memoizedProps);break;case 5:Ho(a,o,h);break;case 3:case 4:var y=Ar;Ar=sy(a.stateNode.containerInfo),Ho(a,o,h),Ar=y;break;case 22:a.memoizedState===null&&(y=a.alternate,y!==null&&y.memoizedState!==null?(y=Kn,Kn=16777216,Ho(a,o,h),Kn=y):Ho(a,o,h));break;default:Ho(a,o,h)}}function Mr(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function pr(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var h=0;h<o.length;h++){var y=o[h];Vn=y,$u(y,a)}Mr(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)jo(a),a=a.sibling}function jo(a){switch(a.tag){case 0:case 11:case 15:pr(a),a.flags&2048&&ba(9,a,a.return);break;case 3:pr(a);break;case 12:pr(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,xd(a)):pr(a);break;default:pr(a)}}function xd(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var h=0;h<o.length;h++){var y=o[h];Vn=y,$u(y,a)}Mr(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:ba(8,o,o.return),xd(o);break;case 22:h=o.stateNode,h._visibility&2&&(h._visibility&=-3,xd(o));break;default:xd(o)}a=a.sibling}}function $u(a,o){for(;Vn!==null;){var h=Vn;switch(h.tag){case 0:case 11:case 15:ba(8,h,o);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Li(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,Vn=y;else e:for(h=a;Vn!==null;){y=Vn;var _=y.sibling,A=y.return;if(gd(y),y===h){Vn=null;break e}if(_!==null){_.return=A,Vn=_;break e}Vn=A}}}var vd={getCacheForType:function(a){var o=Ri($e),h=o.data.get(a);return h===void 0&&(h=a(),o.data.set(a,h)),h},cacheSignal:function(){return Ri($e).controller.signal}},_d=typeof WeakMap=="function"?WeakMap:Map,Ut=0,sn=null,St=null,Dt=0,Ze=0,Mt=null,gt=!1,Et=!1,mn=!1,ii=0,ln=0,ea=0,il=0,qa=0,It=0,ta=0,Ya=null,er=null,Rr=!1,rl=0,jc=0,na=1/0,Pc=null,Ts=null,Pn=0,Va=null,ia=null,_a=0,al=0,Po=null,Sd=null,Go=0,Fo=null;function mr(){return(Ut&2)!==0&&Dt!==0?Dt&-Dt:B.T!==null?Mb():ar()}function u(){if(It===0)if((Dt&536870912)===0||zt){var a=Oa;Oa<<=1,(Oa&3932160)===0&&(Oa=262144),It=a}else It=536870912;return a=vi.current,a!==null&&(a.flags|=32),It}function f(a,o,h){(a===sn&&(Ze===2||Ze===9)||a.cancelPendingCommit!==null)&&(fe(a,0),D(a,Dt,It,!1)),en(a,h),((Ut&2)===0||a!==sn)&&(a===sn&&((Ut&2)===0&&(il|=h),ln===4&&D(a,Dt,It,!1)),to(a))}function x(a,o,h){if((Ut&6)!==0)throw Error(i(327));var y=!h&&(o&127)===0&&(o&a.expiredLanes)===0||Ee(a,o),_=y?qo(a,o):Nr(a,o,!0),A=y;do{if(_===0){Et&&!y&&D(a,o,0,!1);break}else{if(h=a.current.alternate,A&&!R(h)){_=Nr(a,o,!1),A=!1;continue}if(_===2){if(A=o,a.errorRecoveryDisabledLanes&A)var L=0;else L=a.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){o=L;e:{var W=a;_=Ya;var re=W.current.memoizedState.isDehydrated;if(re&&(fe(W,L).flags|=256),L=Nr(W,L,!1),L!==2){if(mn&&!re){W.errorRecoveryDisabledLanes|=A,il|=A,_=4;break e}A=er,er=_,A!==null&&(er===null?er=A:er.push.apply(er,A))}_=L}if(A=!1,_!==2)continue}}if(_===1){fe(a,0),D(a,o,0,!0);break}e:{switch(y=a,A=_,A){case 0:case 1:throw Error(i(345));case 4:if((o&4194048)!==o)break;case 6:D(y,o,It,!gt);break e;case 2:er=null;break;case 3:case 5:break;default:throw Error(i(329))}if((o&62914560)===o&&(_=rl+300-hn(),10<_)){if(D(y,o,It,!gt),ae(y,0,!0)!==0)break e;_a=o,y.timeoutHandle=nS(E.bind(null,y,h,er,Pc,Rr,o,It,il,ta,gt,A,"Throttled",-0,0),_);break e}E(y,h,er,Pc,Rr,o,It,il,ta,gt,A,null,-0,0)}}break}while(!0);to(a)}function E(a,o,h,y,_,A,L,W,re,me,Se,Ce,be,ve){if(a.timeoutHandle=-1,Ce=o.subtreeFlags,Ce&8192||(Ce&16785408)===16785408){Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:De},ni(o,A,Ce);var Ye=(A&62914560)===A?rl-hn():(A&4194048)===A?jc-hn():0;if(Ye=cO(Ce,Ye),Ye!==null){_a=A,a.cancelPendingCommit=Ye(ct.bind(null,a,o,A,h,y,_,L,W,re,Se,Ce,null,be,ve)),D(a,A,L,!me);return}}ct(a,o,A,h,y,_,L,W,re)}function R(a){for(var o=a;;){var h=o.tag;if((h===0||h===11||h===15)&&o.flags&16384&&(h=o.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var _=h[y],A=_.getSnapshot;_=_.value;try{if(!Rn(A(),_))return!1}catch{return!1}}if(h=o.child,o.subtreeFlags&16384&&h!==null)h.return=o,o=h;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function D(a,o,h,y){o&=~qa,o&=~il,a.suspendedLanes|=o,a.pingedLanes&=~o,y&&(a.warmLanes|=o),y=a.expirationTimes;for(var _=o;0<_;){var A=31-Pt(_),L=1<<A;y[A]=-1,_&=~L}h!==0&&He(a,h,o)}function ee(){return(Ut&6)===0?(kp(0),!1):!0}function ie(){if(St!==null){if(Ze===0)var a=St.return;else a=St,Wi=Ys=null,lp(a),Fl=null,ql=0,a=St;for(;a!==null;)Uo(a.alternate,a),a=a.return;St=null}}function fe(a,o){var h=a.timeoutHandle;h!==-1&&(a.timeoutHandle=-1,Yk(h)),h=a.cancelPendingCommit,h!==null&&(a.cancelPendingCommit=null,h()),_a=0,ie(),sn=a,St=h=ds(a.current,null),Dt=o,Ze=0,Mt=null,gt=!1,Et=Ee(a,o),mn=!1,ta=It=qa=il=ea=ln=0,er=Ya=null,Rr=!1,(o&8)!==0&&(o|=o&32);var y=a.entangledLanes;if(y!==0)for(a=a.entanglements,y&=o;0<y;){var _=31-Pt(y),A=1<<_;o|=a[_],y&=~A}return ii=o,Ll(),h}function we(a,o){ot=null,B.H=Iu,o===Gl||o===ja?(o=$f(),Ze=3):o===Mu?(o=$f(),Ze=4):Ze=o===hd?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Mt=o,St===null&&(ln=1,dd(a,_r(o,a.current)))}function ke(){var a=vi.current;return a===null?!0:(Dt&4194048)===Dt?ma===null:(Dt&62914560)===Dt||(Dt&536870912)!==0?a===ma:!1}function Be(){var a=B.H;return B.H=Iu,a===null?Iu:a}function je(){var a=B.A;return B.A=vd,a}function ht(){ln=4,gt||(Dt&4194048)!==Dt&&vi.current!==null||(Et=!0),(ea&134217727)===0&&(il&134217727)===0||sn===null||D(sn,Dt,It,!1)}function Nr(a,o,h){var y=Ut;Ut|=2;var _=Be(),A=je();(sn!==a||Dt!==o)&&(Pc=null,fe(a,o)),o=!1;var L=ln;e:do try{if(Ze!==0&&St!==null){var W=St,re=Mt;switch(Ze){case 8:ie(),L=6;break e;case 3:case 2:case 9:case 6:vi.current===null&&(o=!0);var me=Ze;if(Ze=0,Mt=null,Re(a,W,re,me),h&&Et){L=0;break e}break;default:me=Ze,Ze=0,Mt=null,Re(a,W,re,me)}}Zu(),L=ln;break}catch(Se){we(a,Se)}while(!0);return o&&a.shellSuspendCounter++,Wi=Ys=null,Ut=y,B.H=_,B.A=A,St===null&&(sn=null,Dt=0,Ll()),L}function Zu(){for(;St!==null;)ce(St)}function qo(a,o){var h=Ut;Ut|=2;var y=Be(),_=je();sn!==a||Dt!==o?(Pc=null,na=hn()+500,fe(a,o)):Et=Ee(a,o);e:do try{if(Ze!==0&&St!==null){o=St;var A=Mt;t:switch(Ze){case 1:Ze=0,Mt=null,Re(a,o,A,1);break;case 2:case 9:if(Tg(A)){Ze=0,Mt=null,xe(o);break}o=function(){Ze!==2&&Ze!==9||sn!==a||(Ze=7),to(a)},A.then(o,o);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:Tg(A)?(Ze=0,Mt=null,xe(o)):(Ze=0,Mt=null,Re(a,o,A,7));break;case 5:var L=null;switch(St.tag){case 26:L=St.memoizedState;case 5:case 27:var W=St;if(L?yS(L):W.stateNode.complete){Ze=0,Mt=null;var re=W.sibling;if(re!==null)St=re;else{var me=W.return;me!==null?(St=me,Ke(me)):St=null}break t}}Ze=0,Mt=null,Re(a,o,A,5);break;case 6:Ze=0,Mt=null,Re(a,o,A,6);break;case 8:ie(),ln=6;break e;default:throw Error(i(462))}}ye();break}catch(Se){we(a,Se)}while(!0);return Wi=Ys=null,B.H=y,B.A=_,Ut=h,St!==null?0:(sn=null,Dt=0,Ll(),ln)}function ye(){for(;St!==null&&!ka();)ce(St)}function ce(a){var o=pd(a.alternate,a,ii);a.memoizedProps=a.pendingProps,o===null?Ke(a):St=o}function xe(a){var o=a,h=o.alternate;switch(o.tag){case 15:case 0:o=Zi(h,o,o.pendingProps,o.type,void 0,Dt);break;case 11:o=Zi(h,o,o.pendingProps,o.type.render,o.ref,Dt);break;case 5:lp(o);default:Uo(h,o),o=St=Ki(o,ii),o=pd(h,o,ii)}a.memoizedProps=a.pendingProps,o===null?Ke(a):St=o}function Re(a,o,h,y){Wi=Ys=null,lp(o),Fl=null,ql=0;var _=o.return;try{if(Xr(a,_,o,h,Dt)){ln=1,dd(a,_r(h,a.current)),St=null;return}}catch(A){if(_!==null)throw St=_,A;ln=1,dd(a,_r(h,a.current)),St=null;return}o.flags&32768?(zt||y===1?a=!0:Et||(Dt&536870912)!==0?a=!1:(gt=a=!0,(y===2||y===9||y===3||y===6)&&(y=vi.current,y!==null&&y.tag===13&&(y.flags|=16384))),_n(o,a)):Ke(o)}function Ke(a){var o=a;do{if((o.flags&32768)!==0){_n(o,gt);return}a=o.return;var h=Mp(o.alternate,o,ii);if(h!==null){St=h;return}if(o=o.sibling,o!==null){St=o;return}St=o=a}while(o!==null);ln===0&&(ln=5)}function _n(a,o){do{var h=md(a.alternate,a);if(h!==null){h.flags&=32767,St=h;return}if(h=a.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!o&&(a=a.sibling,a!==null)){St=a;return}St=a=h}while(a!==null);ln=6,St=null}function ct(a,o,h,y,_,A,L,W,re){a.cancelPendingCommit=null;do Ed();while(Pn!==0);if((Ut&6)!==0)throw Error(i(327));if(o!==null){if(o===a.current)throw Error(i(177));if(A=o.lanes|o.childLanes,A|=Gf,Fe(a,h,A,L,W,re),a===sn&&(St=sn=null,Dt=0),ia=o,Va=a,_a=h,al=A,Po=_,Sd=y,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Ok(Je,function(){return H1(),null})):(a.callbackNode=null,a.callbackPriority=0),y=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||y){y=B.T,B.T=null,_=V.p,V.p=2,L=Ut,Ut|=4;try{Ic(a,o,h)}finally{Ut=L,V.p=_,B.T=y}}Pn=1,Yt(),Si(),Vt()}}function Yt(){if(Pn===1){Pn=0;var a=Va,o=ia,h=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||h){h=B.T,B.T=null;var y=V.p;V.p=2;var _=Ut;Ut|=4;try{Jl(o,a);var A=Lb,L=Uf(a.containerInfo),W=A.focusedElem,re=A.selectionRange;if(L!==W&&W&&W.ownerDocument&&Lf(W.ownerDocument.documentElement,W)){if(re!==null&&yc(W)){var me=re.start,Se=re.end;if(Se===void 0&&(Se=me),"selectionStart"in W)W.selectionStart=me,W.selectionEnd=Math.min(Se,W.value.length);else{var Ce=W.ownerDocument||document,be=Ce&&Ce.defaultView||window;if(be.getSelection){var ve=be.getSelection(),Ye=W.textContent.length,lt=Math.min(re.start,Ye),En=re.end===void 0?lt:Math.min(re.end,Ye);!ve.extend&<>En&&(L=En,En=lt,lt=L);var ue=Lh(W,lt),oe=Lh(W,En);if(ue&&oe&&(ve.rangeCount!==1||ve.anchorNode!==ue.node||ve.anchorOffset!==ue.offset||ve.focusNode!==oe.node||ve.focusOffset!==oe.offset)){var he=Ce.createRange();he.setStart(ue.node,ue.offset),ve.removeAllRanges(),lt>En?(ve.addRange(he),ve.extend(oe.node,oe.offset)):(he.setEnd(oe.node,oe.offset),ve.addRange(he))}}}}for(Ce=[],ve=W;ve=ve.parentNode;)ve.nodeType===1&&Ce.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Ce.length;W++){var Te=Ce[W];Te.element.scrollLeft=Te.left,Te.element.scrollTop=Te.top}}dy=!!Bb,Lb=Bb=null}finally{Ut=_,V.p=y,B.T=h}}a.current=o,Pn=2}}function Si(){if(Pn===2){Pn=0;var a=Va,o=ia,h=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||h){h=B.T,B.T=null;var y=V.p;V.p=2;var _=Ut;Ut|=4;try{Qg(a,o.alternate,o)}finally{Ut=_,V.p=y,B.T=h}}Pn=3}}function Vt(){if(Pn===4||Pn===3){Pn=0,Lr();var a=Va,o=ia,h=_a,y=Sd;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Pn=5:(Pn=0,ia=Va=null,sl(a,a.pendingLanes));var _=a.pendingLanes;if(_===0&&(Ts=null),fa(h),o=o.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(xn,o,void 0,(o.current.flags&128)===128)}catch{}if(y!==null){o=B.T,_=V.p,V.p=2,B.T=null;try{for(var A=a.onRecoverableError,L=0;L<y.length;L++){var W=y[L];A(W.value,{componentStack:W.stack})}}finally{B.T=o,V.p=_}}(_a&3)!==0&&Ed(),to(a),_=a.pendingLanes,(h&261930)!==0&&(_&42)!==0?a===Fo?Go++:(Go=0,Fo=a):Go=0,kp(0)}}function sl(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,Li(o)))}function Ed(){return Yt(),Si(),Vt(),H1()}function H1(){if(Pn!==5)return!1;var a=Va,o=al;al=0;var h=fa(_a),y=B.T,_=V.p;try{V.p=32>h?32:h,B.T=null,h=Po,Po=null;var A=Va,L=_a;if(Pn=0,ia=Va=null,_a=0,(Ut&6)!==0)throw Error(i(331));var W=Ut;if(Ut|=4,jo(A.current),jn(A,A.current,L,h),Ut=W,kp(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(xn,A)}catch{}return!0}finally{V.p=_,B.T=y,sl(a,o)}}function j1(a,o,h){o=_r(h,o),o=Ap(a.stateNode,o,2),a=Ws(a,o,2),a!==null&&(en(a,2),to(a))}function yn(a,o,h){if(a.tag===3)j1(a,a,h);else for(;o!==null;){if(o.tag===3){j1(o,a,h);break}else if(o.tag===1){var y=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ts===null||!Ts.has(y))){a=_r(h,a),h=Dc(2),y=Ws(o,h,2),y!==null&&(Tr(h,y,o,a),en(y,2),to(y));break}}o=o.return}}function Tb(a,o,h){var y=a.pingCache;if(y===null){y=a.pingCache=new _d;var _=new Set;y.set(o,_)}else _=y.get(o),_===void 0&&(_=new Set,y.set(o,_));_.has(h)||(mn=!0,_.add(h),a=Rk.bind(null,a,o,h),o.then(a,a))}function Rk(a,o,h){var y=a.pingCache;y!==null&&y.delete(o),a.pingedLanes|=a.suspendedLanes&h,a.warmLanes&=~h,sn===a&&(Dt&h)===h&&(ln===4||ln===3&&(Dt&62914560)===Dt&&300>hn()-rl?(Ut&2)===0&&fe(a,0):qa|=h,ta===Dt&&(ta=0)),to(a)}function P1(a,o){o===0&&(o=et()),a=Ul(a,o),a!==null&&(en(a,o),to(a))}function Nk(a){var o=a.memoizedState,h=0;o!==null&&(h=o.retryLane),P1(a,h)}function kk(a,o){var h=0;switch(a.tag){case 31:case 13:var y=a.stateNode,_=a.memoizedState;_!==null&&(h=_.retryLane);break;case 19:y=a.stateNode;break;case 22:y=a.stateNode._retryCache;break;default:throw Error(i(314))}y!==null&&y.delete(o),P1(a,h)}function Ok(a,o){return bn(a,o)}var ty=null,wd=null,Cb=!1,ny=!1,Ab=!1,Gc=0;function to(a){a!==wd&&a.next===null&&(wd===null?ty=wd=a:wd=wd.next=a),ny=!0,Cb||(Cb=!0,zk())}function kp(a,o){if(!Ab&&ny){Ab=!0;do for(var h=!1,y=ty;y!==null;){if(a!==0){var _=y.pendingLanes;if(_===0)var A=0;else{var L=y.suspendedLanes,W=y.pingedLanes;A=(1<<31-Pt(42|a)+1)-1,A&=_&~(L&~W),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(h=!0,Y1(y,A))}else A=Dt,A=ae(y,y===sn?A:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(A&3)===0||Ee(y,A)||(h=!0,Y1(y,A));y=y.next}while(h);Ab=!1}}function Dk(){G1()}function G1(){ny=Cb=!1;var a=0;Gc!==0&&qk()&&(a=Gc);for(var o=hn(),h=null,y=ty;y!==null;){var _=y.next,A=F1(y,o);A===0?(y.next=null,h===null?ty=_:h.next=_,_===null&&(wd=h)):(h=y,(a!==0||(A&3)!==0)&&(ny=!0)),y=_}Pn!==0&&Pn!==5||kp(a),Gc!==0&&(Gc=0)}function F1(a,o){for(var h=a.suspendedLanes,y=a.pingedLanes,_=a.expirationTimes,A=a.pendingLanes&-62914561;0<A;){var L=31-Pt(A),W=1<<L,re=_[L];re===-1?((W&h)===0||(W&y)!==0)&&(_[L]=ze(W,o)):re<=o&&(a.expiredLanes|=W),A&=~W}if(o=sn,h=Dt,h=ae(a,a===o?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y=a.callbackNode,h===0||a===o&&(Ze===2||Ze===9)||a.cancelPendingCommit!==null)return y!==null&&y!==null&&wi(y),a.callbackNode=null,a.callbackPriority=0;if((h&3)===0||Ee(a,h)){if(o=h&-h,o===a.callbackPriority)return o;switch(y!==null&&wi(y),fa(h)){case 2:case 8:h=Ne;break;case 32:h=Je;break;case 268435456:h=kt;break;default:h=Je}return y=q1.bind(null,a),h=bn(h,y),a.callbackPriority=o,a.callbackNode=h,o}return y!==null&&y!==null&&wi(y),a.callbackPriority=2,a.callbackNode=null,2}function q1(a,o){if(Pn!==0&&Pn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var h=a.callbackNode;if(Ed()&&a.callbackNode!==h)return null;var y=Dt;return y=ae(a,a===sn?y:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y===0?null:(x(a,y,o),F1(a,hn()),a.callbackNode!=null&&a.callbackNode===h?q1.bind(null,a):null)}function Y1(a,o){if(Ed())return null;x(a,o,!0)}function zk(){Vk(function(){(Ut&6)!==0?bn(_e,Dk):G1()})}function Mb(){if(Gc===0){var a=Ks;a===0&&(a=rs,rs<<=1,(rs&261888)===0&&(rs=256)),Gc=a}return Gc}function V1(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Is(""+a)}function X1(a,o){var h=o.ownerDocument.createElement("input");return h.name=o.name,h.value=o.value,a.id&&h.setAttribute("form",a.id),o.parentNode.insertBefore(h,o),a=new FormData(a),h.parentNode.removeChild(h),a}function Bk(a,o,h,y,_){if(o==="submit"&&h&&h.stateNode===_){var A=V1((_[li]||null).action),L=y.submitter;L&&(o=(o=L[li]||null)?V1(o.formAction):L.getAttribute("formAction"),o!==null&&(A=o,L=null));var W=new hu("action","action",null,y,_);a.push({event:W,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Gc!==0){var re=L?X1(_,L):new FormData(_);Sp(h,{pending:!0,data:re,method:_.method,action:A},null,re)}}else typeof A=="function"&&(W.preventDefault(),re=L?X1(_,L):new FormData(_),Sp(h,{pending:!0,data:re,method:_.method,action:A},A,re))},currentTarget:_}]})}}for(var Rb=0;Rb<Pf.length;Rb++){var Nb=Pf[Rb],Lk=Nb.toLowerCase(),Uk=Nb[0].toUpperCase()+Nb.slice(1);Xi(Lk,"on"+Uk)}Xi(vr,"onAnimationEnd"),Xi(Uh,"onAnimationIteration"),Xi(fs,"onAnimationStart"),Xi("dblclick","onDoubleClick"),Xi("focusin","onFocus"),Xi("focusout","onBlur"),Xi(_c,"onTransitionRun"),Xi(zl,"onTransitionStart"),Xi(Ih,"onTransitionCancel"),Xi(jf,"onTransitionEnd"),Me("onMouseEnter",["mouseout","mouseover"]),Me("onMouseLeave",["mouseout","mouseover"]),Me("onPointerEnter",["pointerout","pointerover"]),Me("onPointerLeave",["pointerout","pointerover"]),Hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Op="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(" "),Ik=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Op));function K1(a,o){o=(o&4)!==0;for(var h=0;h<a.length;h++){var y=a[h],_=y.event;y=y.listeners;e:{var A=void 0;if(o)for(var L=y.length-1;0<=L;L--){var W=y[L],re=W.instance,me=W.currentTarget;if(W=W.listener,re!==A&&_.isPropagationStopped())break e;A=W,_.currentTarget=me;try{A(_)}catch(Se){Bl(Se)}_.currentTarget=null,A=re}else for(L=0;L<y.length;L++){if(W=y[L],re=W.instance,me=W.currentTarget,W=W.listener,re!==A&&_.isPropagationStopped())break e;A=W,_.currentTarget=me;try{A(_)}catch(Se){Bl(Se)}_.currentTarget=null,A=re}}}}function Bt(a,o){var h=o[Bs];h===void 0&&(h=o[Bs]=new Set);var y=a+"__bubble";h.has(y)||(W1(o,a,2,!1),h.add(y))}function kb(a,o,h){var y=0;o&&(y|=4),W1(h,a,y,o)}var iy="_reactListening"+Math.random().toString(36).slice(2);function Ob(a){if(!a[iy]){a[iy]=!0,xr.forEach(function(h){h!=="selectionchange"&&(Ik.has(h)||kb(h,!1,a),kb(h,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[iy]||(o[iy]=!0,kb("selectionchange",!1,o))}}function W1(a,o,h,y){switch(wS(o)){case 2:var _=dO;break;case 8:_=hO;break;default:_=Xb}h=_.bind(null,o,h,a),_=void 0,!Cf||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(_=!0),y?_!==void 0?a.addEventListener(o,h,{capture:!0,passive:_}):a.addEventListener(o,h,!0):_!==void 0?a.addEventListener(o,h,{passive:_}):a.addEventListener(o,h,!1)}function Db(a,o,h,y,_){var A=y;if((o&1)===0&&(o&2)===0&&y!==null)e:for(;;){if(y===null)return;var L=y.tag;if(L===3||L===4){var W=y.stateNode.containerInfo;if(W===_)break;if(L===4)for(L=y.return;L!==null;){var re=L.tag;if((re===3||re===4)&&L.stateNode.containerInfo===_)return;L=L.return}for(;W!==null;){if(L=tn(W),L===null)return;if(re=L.tag,re===5||re===6||re===26||re===27){y=A=L;continue e}W=W.parentNode}}y=y.return}uu(function(){var me=A,Se=mt(h),Ce=[];e:{var be=Ps.get(a);if(be!==void 0){var ve=hu,Ye=a;switch(a){case"keypress":if(vo(h)===0)break e;case"keydown":case"keyup":ve=Ch;break;case"focusin":Ye="focus",ve=kf;break;case"focusout":Ye="blur",ve=kf;break;case"beforeblur":case"afterblur":ve=kf;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=ng;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=Hs;break;case vr:case Uh:case fs:ve=sg;break;case jf:ve=yb;break;case"scroll":case"scrollend":ve=Rf;break;case"wheel":ve=Ml;break;case"copy":case"cut":case"paste":ve=_h;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Of;break;case"toggle":case"beforetoggle":ve=Mh}var lt=(o&4)!==0,En=!lt&&(a==="scroll"||a==="scrollend"),ue=lt?be!==null?be+"Capture":null:be;lt=[];for(var oe=me,he;oe!==null;){var Te=oe;if(he=Te.stateNode,Te=Te.tag,Te!==5&&Te!==26&&Te!==27||he===null||ue===null||(Te=xo(oe,ue),Te!=null&<.push(Dp(oe,Te,he))),En)break;oe=oe.return}0<lt.length&&(be=new ve(be,Ye,null,h,Se),Ce.push({event:be,listeners:lt}))}}if((o&7)===0){e:{if(be=a==="mouseover"||a==="pointerover",ve=a==="mouseout"||a==="pointerout",be&&h!==qe&&(Ye=h.relatedTarget||h.fromElement)&&(tn(Ye)||Ye[Ur]))break e;if((ve||be)&&(be=Se.window===Se?Se:(be=Se.ownerDocument)?be.defaultView||be.parentWindow:window,ve?(Ye=h.relatedTarget||h.toElement,ve=me,Ye=Ye?tn(Ye):null,Ye!==null&&(En=s(Ye),lt=Ye.tag,Ye!==En||lt!==5&<!==27&<!==6)&&(Ye=null)):(ve=null,Ye=me),ve!==Ye)){if(lt=ng,Te="onMouseLeave",ue="onMouseEnter",oe="mouse",(a==="pointerout"||a==="pointerover")&&(lt=Of,Te="onPointerLeave",ue="onPointerEnter",oe="pointer"),En=ve==null?be:lr(ve),he=Ye==null?be:lr(Ye),be=new lt(Te,oe+"leave",ve,h,Se),be.target=En,be.relatedTarget=he,Te=null,tn(Se)===me&&(lt=new lt(ue,oe+"enter",Ye,h,Se),lt.target=he,lt.relatedTarget=En,Te=lt),En=Te,ve&&Ye)t:{for(lt=Hk,ue=ve,oe=Ye,he=0,Te=ue;Te;Te=lt(Te))he++;Te=0;for(var nt=oe;nt;nt=lt(nt))Te++;for(;0<he-Te;)ue=lt(ue),he--;for(;0<Te-he;)oe=lt(oe),Te--;for(;he--;){if(ue===oe||oe!==null&&ue===oe.alternate){lt=ue;break t}ue=lt(ue),oe=lt(oe)}lt=null}else lt=null;ve!==null&&$1(Ce,be,ve,lt,!1),Ye!==null&&En!==null&&$1(Ce,En,Ye,lt,!0)}}e:{if(be=me?lr(me):window,ve=be.nodeName&&be.nodeName.toLowerCase(),ve==="select"||ve==="input"&&be.type==="file")var on=Dh;else if(kh(be))if(xu)on=yg;else{on=kl;var Xe=vu}else ve=be.nodeName,!ve||ve.toLowerCase()!=="input"||be.type!=="checkbox"&&be.type!=="radio"?me&&os(me.elementType)&&(on=Dh):on=gg;if(on&&(on=on(a,me))){Bf(Ce,on,h,Se);break e}Xe&&Xe(a,be,me),a==="focusout"&&me&&be.type==="number"&&me.memoizedProps.value!=null&&Us(be,"number",be.value)}switch(Xe=me?lr(me):window,a){case"focusin":(kh(Xe)||Xe.contentEditable==="true")&&(bc=Xe,If=me,xc=null);break;case"focusout":xc=If=bc=null;break;case"mousedown":Gr=!0;break;case"contextmenu":case"mouseup":case"dragend":Gr=!1,Hf(Ce,h,Se);break;case"selectionchange":if(bg)break;case"keydown":case"keyup":Hf(Ce,h,Se)}var wt;if(_o)e:{switch(a){case"compositionstart":var Ht="onCompositionStart";break e;case"compositionend":Ht="onCompositionEnd";break e;case"compositionupdate":Ht="onCompositionUpdate";break e}Ht=void 0}else Nl?Df(a,h)&&(Ht="onCompositionEnd"):a==="keydown"&&h.keyCode===229&&(Ht="onCompositionStart");Ht&&(Bi&&h.locale!=="ko"&&(Nl||Ht!=="onCompositionStart"?Ht==="onCompositionEnd"&&Nl&&(wt=Mf()):(Tl=Se,Af="value"in Tl?Tl.value:Tl.textContent,Nl=!0)),Xe=ry(me,Ht),0<Xe.length&&(Ht=new Sh(Ht,a,null,h,Se),Ce.push({event:Ht,listeners:Xe}),wt?Ht.data=wt:(wt=dc(h),wt!==null&&(Ht.data=wt)))),(wt=So?zf(a,h):hg(a,h))&&(Ht=ry(me,"onBeforeInput"),0<Ht.length&&(Xe=new Sh("onBeforeInput","beforeinput",null,h,Se),Ce.push({event:Xe,listeners:Ht}),Xe.data=wt)),Bk(Ce,a,me,h,Se)}K1(Ce,o)})}function Dp(a,o,h){return{instance:a,listener:o,currentTarget:h}}function ry(a,o){for(var h=o+"Capture",y=[];a!==null;){var _=a,A=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||A===null||(_=xo(a,h),_!=null&&y.unshift(Dp(a,_,A)),_=xo(a,o),_!=null&&y.push(Dp(a,_,A))),a.tag===3)return y;a=a.return}return[]}function Hk(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function $1(a,o,h,y,_){for(var A=o._reactName,L=[];h!==null&&h!==y;){var W=h,re=W.alternate,me=W.stateNode;if(W=W.tag,re!==null&&re===y)break;W!==5&&W!==26&&W!==27||me===null||(re=me,_?(me=xo(h,A),me!=null&&L.unshift(Dp(h,me,re))):_||(me=xo(h,A),me!=null&&L.push(Dp(h,me,re)))),h=h.return}L.length!==0&&a.push({event:o,listeners:L})}var jk=/\r\n?/g,Pk=/\u0000|\uFFFD/g;function Z1(a){return(typeof a=="string"?a:""+a).replace(jk,`
|
|
50
|
+
`).replace(Pk,"")}function Q1(a,o){return o=Z1(o),Z1(a)===o}function Sn(a,o,h,y,_,A){switch(h){case"children":typeof y=="string"?o==="body"||o==="textarea"&&y===""||it(a,y):(typeof y=="number"||typeof y=="bigint")&&o!=="body"&&it(a,""+y);break;case"className":Yi(a,"class",y);break;case"tabIndex":Yi(a,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Yi(a,h,y);break;case"style":rn(a,y,A);break;case"data":if(o!=="object"){Yi(a,"data",y);break}case"src":case"href":if(y===""&&(o!=="a"||h!=="href")){a.removeAttribute(h);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(h);break}y=Is(""+y),a.setAttribute(h,y);break;case"action":case"formAction":if(typeof y=="function"){a.setAttribute(h,"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 A=="function"&&(h==="formAction"?(o!=="input"&&Sn(a,o,"name",_.name,_,null),Sn(a,o,"formEncType",_.formEncType,_,null),Sn(a,o,"formMethod",_.formMethod,_,null),Sn(a,o,"formTarget",_.formTarget,_,null)):(Sn(a,o,"encType",_.encType,_,null),Sn(a,o,"method",_.method,_,null),Sn(a,o,"target",_.target,_,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(h);break}y=Is(""+y),a.setAttribute(h,y);break;case"onClick":y!=null&&(a.onclick=De);break;case"onScroll":y!=null&&Bt("scroll",a);break;case"onScrollEnd":y!=null&&Bt("scrollend",a);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(i(61));if(h=y.__html,h!=null){if(_.children!=null)throw Error(i(60));a.innerHTML=h}}break;case"multiple":a.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":a.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){a.removeAttribute("xlink:href");break}h=Is(""+y),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(h,""+y):a.removeAttribute(h);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":y&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(h,""):a.removeAttribute(h);break;case"capture":case"download":y===!0?a.setAttribute(h,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(h,y):a.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?a.setAttribute(h,y):a.removeAttribute(h);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?a.removeAttribute(h):a.setAttribute(h,y);break;case"popover":Bt("beforetoggle",a),Bt("toggle",a),xi(a,"popover",y);break;case"xlinkActuate":Ti(a,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Ti(a,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Ti(a,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Ti(a,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Ti(a,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Ti(a,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Ti(a,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Ti(a,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Ti(a,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":xi(a,"is",y);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=cs.get(h)||h,xi(a,h,y))}}function zb(a,o,h,y,_,A){switch(h){case"style":rn(a,y,A);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(i(61));if(h=y.__html,h!=null){if(_.children!=null)throw Error(i(60));a.innerHTML=h}}break;case"children":typeof y=="string"?it(a,y):(typeof y=="number"||typeof y=="bigint")&&it(a,""+y);break;case"onScroll":y!=null&&Bt("scroll",a);break;case"onScrollEnd":y!=null&&Bt("scrollend",a);break;case"onClick":y!=null&&(a.onclick=De);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!da.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(_=h.endsWith("Capture"),o=h.slice(2,_?h.length-7:void 0),A=a[li]||null,A=A!=null?A[h]:null,typeof A=="function"&&a.removeEventListener(o,A,_),typeof y=="function")){typeof A!="function"&&A!==null&&(h in a?a[h]=null:a.hasAttribute(h)&&a.removeAttribute(h)),a.addEventListener(o,y,_);break e}h in a?a[h]=y:y===!0?a.setAttribute(h,""):xi(a,h,y)}}}function gr(a,o,h){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bt("error",a),Bt("load",a);var y=!1,_=!1,A;for(A in h)if(h.hasOwnProperty(A)){var L=h[A];if(L!=null)switch(A){case"src":y=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:Sn(a,o,A,L,h,null)}}_&&Sn(a,o,"srcSet",h.srcSet,h,null),y&&Sn(a,o,"src",h.src,h,null);return;case"input":Bt("invalid",a);var W=A=L=_=null,re=null,me=null;for(y in h)if(h.hasOwnProperty(y)){var Se=h[y];if(Se!=null)switch(y){case"name":_=Se;break;case"type":L=Se;break;case"checked":re=Se;break;case"defaultChecked":me=Se;break;case"value":A=Se;break;case"defaultValue":W=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(i(137,o));break;default:Sn(a,o,y,Se,h,null)}}ls(a,A,W,re,me,L,_,!1);return;case"select":Bt("invalid",a),y=L=A=null;for(_ in h)if(h.hasOwnProperty(_)&&(W=h[_],W!=null))switch(_){case"value":A=W;break;case"defaultValue":L=W;break;case"multiple":y=W;default:Sn(a,o,_,W,h,null)}o=A,h=L,a.multiple=!!y,o!=null?oi(a,!!y,o,!1):h!=null&&oi(a,!!y,h,!0);return;case"textarea":Bt("invalid",a),A=_=y=null;for(L in h)if(h.hasOwnProperty(L)&&(W=h[L],W!=null))switch(L){case"value":y=W;break;case"defaultValue":_=W;break;case"children":A=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(91));break;default:Sn(a,o,L,W,h,null)}Ba(a,y,_,A);return;case"option":for(re in h)if(h.hasOwnProperty(re)&&(y=h[re],y!=null))switch(re){case"selected":a.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Sn(a,o,re,y,h,null)}return;case"dialog":Bt("beforetoggle",a),Bt("toggle",a),Bt("cancel",a),Bt("close",a);break;case"iframe":case"object":Bt("load",a);break;case"video":case"audio":for(y=0;y<Op.length;y++)Bt(Op[y],a);break;case"image":Bt("error",a),Bt("load",a);break;case"details":Bt("toggle",a);break;case"embed":case"source":case"link":Bt("error",a),Bt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(me in h)if(h.hasOwnProperty(me)&&(y=h[me],y!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:Sn(a,o,me,y,h,null)}return;default:if(os(o)){for(Se in h)h.hasOwnProperty(Se)&&(y=h[Se],y!==void 0&&zb(a,o,Se,y,h,void 0));return}}for(W in h)h.hasOwnProperty(W)&&(y=h[W],y!=null&&Sn(a,o,W,y,h,null))}function Gk(a,o,h,y){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,A=null,L=null,W=null,re=null,me=null,Se=null;for(ve in h){var Ce=h[ve];if(h.hasOwnProperty(ve)&&Ce!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":re=Ce;default:y.hasOwnProperty(ve)||Sn(a,o,ve,null,y,Ce)}}for(var be in y){var ve=y[be];if(Ce=h[be],y.hasOwnProperty(be)&&(ve!=null||Ce!=null))switch(be){case"type":A=ve;break;case"name":_=ve;break;case"checked":me=ve;break;case"defaultChecked":Se=ve;break;case"value":L=ve;break;case"defaultValue":W=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(i(137,o));break;default:ve!==Ce&&Sn(a,o,be,ve,y,Ce)}}ss(a,L,W,re,me,Se,A,_);return;case"select":ve=L=W=be=null;for(A in h)if(re=h[A],h.hasOwnProperty(A)&&re!=null)switch(A){case"value":break;case"multiple":ve=re;default:y.hasOwnProperty(A)||Sn(a,o,A,null,y,re)}for(_ in y)if(A=y[_],re=h[_],y.hasOwnProperty(_)&&(A!=null||re!=null))switch(_){case"value":be=A;break;case"defaultValue":W=A;break;case"multiple":L=A;default:A!==re&&Sn(a,o,_,A,y,re)}o=W,h=L,y=ve,be!=null?oi(a,!!h,be,!1):!!y!=!!h&&(o!=null?oi(a,!!h,o,!0):oi(a,!!h,h?[]:"",!1));return;case"textarea":ve=be=null;for(W in h)if(_=h[W],h.hasOwnProperty(W)&&_!=null&&!y.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:Sn(a,o,W,null,y,_)}for(L in y)if(_=y[L],A=h[L],y.hasOwnProperty(L)&&(_!=null||A!=null))switch(L){case"value":be=_;break;case"defaultValue":ve=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:_!==A&&Sn(a,o,L,_,y,A)}cu(a,be,ve);return;case"option":for(var Ye in h)if(be=h[Ye],h.hasOwnProperty(Ye)&&be!=null&&!y.hasOwnProperty(Ye))switch(Ye){case"selected":a.selected=!1;break;default:Sn(a,o,Ye,null,y,be)}for(re in y)if(be=y[re],ve=h[re],y.hasOwnProperty(re)&&be!==ve&&(be!=null||ve!=null))switch(re){case"selected":a.selected=be&&typeof be!="function"&&typeof be!="symbol";break;default:Sn(a,o,re,be,y,ve)}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 lt in h)be=h[lt],h.hasOwnProperty(lt)&&be!=null&&!y.hasOwnProperty(lt)&&Sn(a,o,lt,null,y,be);for(me in y)if(be=y[me],ve=h[me],y.hasOwnProperty(me)&&be!==ve&&(be!=null||ve!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,o));break;default:Sn(a,o,me,be,y,ve)}return;default:if(os(o)){for(var En in h)be=h[En],h.hasOwnProperty(En)&&be!==void 0&&!y.hasOwnProperty(En)&&zb(a,o,En,void 0,y,be);for(Se in y)be=y[Se],ve=h[Se],!y.hasOwnProperty(Se)||be===ve||be===void 0&&ve===void 0||zb(a,o,Se,be,y,ve);return}}for(var ue in h)be=h[ue],h.hasOwnProperty(ue)&&be!=null&&!y.hasOwnProperty(ue)&&Sn(a,o,ue,null,y,be);for(Ce in y)be=y[Ce],ve=h[Ce],!y.hasOwnProperty(Ce)||be===ve||be==null&&ve==null||Sn(a,o,Ce,be,y,ve)}function J1(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fk(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,h=performance.getEntriesByType("resource"),y=0;y<h.length;y++){var _=h[y],A=_.transferSize,L=_.initiatorType,W=_.duration;if(A&&W&&J1(L)){for(L=0,W=_.responseEnd,y+=1;y<h.length;y++){var re=h[y],me=re.startTime;if(me>W)break;var Se=re.transferSize,Ce=re.initiatorType;Se&&J1(Ce)&&(re=re.responseEnd,L+=Se*(re<W?1:(W-me)/(re-me)))}if(--y,o+=8*(A+L)/(_.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Bb=null,Lb=null;function ay(a){return a.nodeType===9?a:a.ownerDocument}function eS(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tS(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function Ub(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Ib=null;function qk(){var a=window.event;return a&&a.type==="popstate"?a===Ib?!1:(Ib=a,!0):(Ib=null,!1)}var nS=typeof setTimeout=="function"?setTimeout:void 0,Yk=typeof clearTimeout=="function"?clearTimeout:void 0,iS=typeof Promise=="function"?Promise:void 0,Vk=typeof queueMicrotask=="function"?queueMicrotask:typeof iS<"u"?function(a){return iS.resolve(null).then(a).catch(Xk)}:nS;function Xk(a){setTimeout(function(){throw a})}function Fc(a){return a==="head"}function rS(a,o){var h=o,y=0;do{var _=h.nextSibling;if(a.removeChild(h),_&&_.nodeType===8)if(h=_.data,h==="/$"||h==="/&"){if(y===0){a.removeChild(_),Md(o);return}y--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")y++;else if(h==="html")zp(a.ownerDocument.documentElement);else if(h==="head"){h=a.ownerDocument.head,zp(h);for(var A=h.firstChild;A;){var L=A.nextSibling,W=A.nodeName;A[Da]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&A.rel.toLowerCase()==="stylesheet"||h.removeChild(A),A=L}}else h==="body"&&zp(a.ownerDocument.body);h=_}while(h);Md(o)}function aS(a,o){var h=a;a=0;do{var y=h.nextSibling;if(h.nodeType===1?o?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(o?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),y&&y.nodeType===8)if(h=y.data,h==="/$"){if(a===0)break;a--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||a++;h=y}while(h)}function Hb(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var h=o;switch(o=o.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Hb(h),Ls(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}a.removeChild(h)}}function Kk(a,o,h,y){for(;a.nodeType===1;){var _=h;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!y&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(y){if(!a[Da])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(A=a.getAttribute("rel"),A==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(A!==_.rel||a.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||a.getAttribute("title")!==(_.title==null?null:_.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(A=a.getAttribute("src"),(A!==(_.src==null?null:_.src)||a.getAttribute("type")!==(_.type==null?null:_.type)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&A&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var A=_.name==null?null:""+_.name;if(_.type==="hidden"&&a.getAttribute("name")===A)return a}else return a;if(a=Cs(a.nextSibling),a===null)break}return null}function Wk(a,o,h){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!h||(a=Cs(a.nextSibling),a===null))return null;return a}function sS(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Cs(a.nextSibling),a===null))return null;return a}function jb(a){return a.data==="$?"||a.data==="$~"}function Pb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function $k(a,o){var h=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||h.readyState!=="loading")o();else{var y=function(){o(),h.removeEventListener("DOMContentLoaded",y)};h.addEventListener("DOMContentLoaded",y),a._reactRetry=y}}function Cs(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var Gb=null;function lS(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var h=a.data;if(h==="/$"||h==="/&"){if(o===0)return Cs(a.nextSibling);o--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||o++}a=a.nextSibling}return null}function oS(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var h=a.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(o===0)return a;o--}else h!=="/$"&&h!=="/&"||o++}a=a.previousSibling}return null}function cS(a,o,h){switch(o=ay(h),a){case"html":if(a=o.documentElement,!a)throw Error(i(452));return a;case"head":if(a=o.head,!a)throw Error(i(453));return a;case"body":if(a=o.body,!a)throw Error(i(454));return a;default:throw Error(i(451))}}function zp(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Ls(a)}var As=new Map,uS=new Set;function sy(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Yo=V.d;V.d={f:Zk,r:Qk,D:Jk,C:eO,L:tO,m:nO,X:rO,S:iO,M:aO};function Zk(){var a=Yo.f(),o=ee();return a||o}function Qk(a){var o=nn(a);o!==null&&o.tag===5&&o.type==="form"?Ep(o):Yo.r(a)}var Td=typeof document>"u"?null:document;function fS(a,o,h){var y=Td;if(y&&typeof o=="string"&&o){var _=Di(o);_='link[rel="'+a+'"][href="'+_+'"]',typeof h=="string"&&(_+='[crossorigin="'+h+'"]'),uS.has(_)||(uS.add(_),a={rel:a,crossOrigin:h,href:o},y.querySelector(_)===null&&(o=y.createElement("link"),gr(o,"link",a),Ln(o),y.head.appendChild(o)))}}function Jk(a){Yo.D(a),fS("dns-prefetch",a,null)}function eO(a,o){Yo.C(a,o),fS("preconnect",a,o)}function tO(a,o,h){Yo.L(a,o,h);var y=Td;if(y&&a&&o){var _='link[rel="preload"][as="'+Di(o)+'"]';o==="image"&&h&&h.imageSrcSet?(_+='[imagesrcset="'+Di(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(_+='[imagesizes="'+Di(h.imageSizes)+'"]')):_+='[href="'+Di(a)+'"]';var A=_;switch(o){case"style":A=Cd(a);break;case"script":A=Ad(a)}As.has(A)||(a=g({rel:"preload",href:o==="image"&&h&&h.imageSrcSet?void 0:a,as:o},h),As.set(A,a),y.querySelector(_)!==null||o==="style"&&y.querySelector(Bp(A))||o==="script"&&y.querySelector(Lp(A))||(o=y.createElement("link"),gr(o,"link",a),Ln(o),y.head.appendChild(o)))}}function nO(a,o){Yo.m(a,o);var h=Td;if(h&&a){var y=o&&typeof o.as=="string"?o.as:"script",_='link[rel="modulepreload"][as="'+Di(y)+'"][href="'+Di(a)+'"]',A=_;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Ad(a)}if(!As.has(A)&&(a=g({rel:"modulepreload",href:a},o),As.set(A,a),h.querySelector(_)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Lp(A)))return}y=h.createElement("link"),gr(y,"link",a),Ln(y),h.head.appendChild(y)}}}function iO(a,o,h){Yo.S(a,o,h);var y=Td;if(y&&a){var _=Ir(y).hoistableStyles,A=Cd(a);o=o||"default";var L=_.get(A);if(!L){var W={loading:0,preload:null};if(L=y.querySelector(Bp(A)))W.loading=5;else{a=g({rel:"stylesheet",href:a,"data-precedence":o},h),(h=As.get(A))&&Fb(a,h);var re=L=y.createElement("link");Ln(re),gr(re,"link",a),re._p=new Promise(function(me,Se){re.onload=me,re.onerror=Se}),re.addEventListener("load",function(){W.loading|=1}),re.addEventListener("error",function(){W.loading|=2}),W.loading|=4,ly(L,o,y)}L={type:"stylesheet",instance:L,count:1,state:W},_.set(A,L)}}}function rO(a,o){Yo.X(a,o);var h=Td;if(h&&a){var y=Ir(h).hoistableScripts,_=Ad(a),A=y.get(_);A||(A=h.querySelector(Lp(_)),A||(a=g({src:a,async:!0},o),(o=As.get(_))&&qb(a,o),A=h.createElement("script"),Ln(A),gr(A,"link",a),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(_,A))}}function aO(a,o){Yo.M(a,o);var h=Td;if(h&&a){var y=Ir(h).hoistableScripts,_=Ad(a),A=y.get(_);A||(A=h.querySelector(Lp(_)),A||(a=g({src:a,async:!0,type:"module"},o),(o=As.get(_))&&qb(a,o),A=h.createElement("script"),Ln(A),gr(A,"link",a),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},y.set(_,A))}}function dS(a,o,h,y){var _=(_=ge.current)?sy(_):null;if(!_)throw Error(i(446));switch(a){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(o=Cd(h.href),h=Ir(_).hoistableStyles,y=h.get(o),y||(y={type:"style",instance:null,count:0,state:null},h.set(o,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){a=Cd(h.href);var A=Ir(_).hoistableStyles,L=A.get(a);if(L||(_=_.ownerDocument||_,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(a,L),(A=_.querySelector(Bp(a)))&&!A._p&&(L.instance=A,L.state.loading=5),As.has(a)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},As.set(a,h),A||sO(_,a,h,L.state))),o&&y===null)throw Error(i(528,""));return L}if(o&&y!==null)throw Error(i(529,""));return null;case"script":return o=h.async,h=h.src,typeof h=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ad(h),h=Ir(_).hoistableScripts,y=h.get(o),y||(y={type:"script",instance:null,count:0,state:null},h.set(o,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,a))}}function Cd(a){return'href="'+Di(a)+'"'}function Bp(a){return'link[rel="stylesheet"]['+a+"]"}function hS(a){return g({},a,{"data-precedence":a.precedence,precedence:null})}function sO(a,o,h,y){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?y.loading=1:(o=a.createElement("link"),y.preload=o,o.addEventListener("load",function(){return y.loading|=1}),o.addEventListener("error",function(){return y.loading|=2}),gr(o,"link",h),Ln(o),a.head.appendChild(o))}function Ad(a){return'[src="'+Di(a)+'"]'}function Lp(a){return"script[async]"+a}function pS(a,o,h){if(o.count++,o.instance===null)switch(o.type){case"style":var y=a.querySelector('style[data-href~="'+Di(h.href)+'"]');if(y)return o.instance=y,Ln(y),y;var _=g({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return y=(a.ownerDocument||a).createElement("style"),Ln(y),gr(y,"style",_),ly(y,h.precedence,a),o.instance=y;case"stylesheet":_=Cd(h.href);var A=a.querySelector(Bp(_));if(A)return o.state.loading|=4,o.instance=A,Ln(A),A;y=hS(h),(_=As.get(_))&&Fb(y,_),A=(a.ownerDocument||a).createElement("link"),Ln(A);var L=A;return L._p=new Promise(function(W,re){L.onload=W,L.onerror=re}),gr(A,"link",y),o.state.loading|=4,ly(A,h.precedence,a),o.instance=A;case"script":return A=Ad(h.src),(_=a.querySelector(Lp(A)))?(o.instance=_,Ln(_),_):(y=h,(_=As.get(A))&&(y=g({},h),qb(y,_)),a=a.ownerDocument||a,_=a.createElement("script"),Ln(_),gr(_,"link",y),a.head.appendChild(_),o.instance=_);case"void":return null;default:throw Error(i(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(y=o.instance,o.state.loading|=4,ly(y,h.precedence,a));return o.instance}function ly(a,o,h){for(var y=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=y.length?y[y.length-1]:null,A=_,L=0;L<y.length;L++){var W=y[L];if(W.dataset.precedence===o)A=W;else if(A!==_)break}A?A.parentNode.insertBefore(a,A.nextSibling):(o=h.nodeType===9?h.head:h,o.insertBefore(a,o.firstChild))}function Fb(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function qb(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var oy=null;function mS(a,o,h){if(oy===null){var y=new Map,_=oy=new Map;_.set(h,y)}else _=oy,y=_.get(h),y||(y=new Map,_.set(h,y));if(y.has(a))return y;for(y.set(a,null),h=h.getElementsByTagName(a),_=0;_<h.length;_++){var A=h[_];if(!(A[Da]||A[yt]||a==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var L=A.getAttribute(o)||"";L=a+L;var W=y.get(L);W?W.push(A):y.set(L,[A])}}return y}function gS(a,o,h){a=a.ownerDocument||a,a.head.insertBefore(h,o==="title"?a.querySelector("head > title"):null)}function lO(a,o,h){if(h===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function yS(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function oO(a,o,h,y){if(h.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var _=Cd(y.href),A=o.querySelector(Bp(_));if(A){o=A._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=cy.bind(a),o.then(a,a)),h.state.loading|=4,h.instance=A,Ln(A);return}A=o.ownerDocument||o,y=hS(y),(_=As.get(_))&&Fb(y,_),A=A.createElement("link"),Ln(A);var L=A;L._p=new Promise(function(W,re){L.onload=W,L.onerror=re}),gr(A,"link",y),h.instance=A}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(h,o),(o=h.state.preload)&&(h.state.loading&3)===0&&(a.count++,h=cy.bind(a),o.addEventListener("load",h),o.addEventListener("error",h))}}var Yb=0;function cO(a,o){return a.stylesheets&&a.count===0&&fy(a,a.stylesheets),0<a.count||0<a.imgCount?function(h){var y=setTimeout(function(){if(a.stylesheets&&fy(a,a.stylesheets),a.unsuspend){var A=a.unsuspend;a.unsuspend=null,A()}},6e4+o);0<a.imgBytes&&Yb===0&&(Yb=62500*Fk());var _=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&fy(a,a.stylesheets),a.unsuspend)){var A=a.unsuspend;a.unsuspend=null,A()}},(a.imgBytes>Yb?50:800)+o);return a.unsuspend=h,function(){a.unsuspend=null,clearTimeout(y),clearTimeout(_)}}:null}function cy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fy(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var uy=null;function fy(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,uy=new Map,o.forEach(uO,a),uy=null,cy.call(a))}function uO(a,o){if(!(o.state.loading&4)){var h=uy.get(a);if(h)var y=h.get(null);else{h=new Map,uy.set(a,h);for(var _=a.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<_.length;A++){var L=_[A];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(h.set(L.dataset.precedence,L),y=L)}y&&h.set(null,y)}_=o.instance,L=_.getAttribute("data-precedence"),A=h.get(L)||y,A===y&&h.set(null,_),h.set(L,_),this.count++,y=cy.bind(this),_.addEventListener("load",y),_.addEventListener("error",y),A?A.parentNode.insertBefore(_,A.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(_,a.firstChild)),o.state.loading|=4}}var Up={$$typeof:M,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function fO(a,o,h,y,_,A,L,W,re){this.tag=1,this.containerInfo=a,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=Jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jt(0),this.hiddenUpdates=Jt(null),this.identifierPrefix=y,this.onUncaughtError=_,this.onCaughtError=A,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function bS(a,o,h,y,_,A,L,W,re,me,Se,Ce){return a=new fO(a,o,h,L,re,me,Se,Ce,W),o=1,A===!0&&(o|=24),A=ur(3,null,null,o),a.current=A,A.stateNode=a,o=Yh(),o.refCount++,a.pooledCache=o,o.refCount++,A.memoizedState={element:y,isDehydrated:h,cache:o},Zh(A),a}function xS(a){return a?(a=Il,a):Il}function vS(a,o,h,y,_,A){_=xS(_),y.context===null?y.context=_:y.pendingContext=_,y=ys(o),y.payload={element:h},A=A===void 0?null:A,A!==null&&(y.callback=A),h=Ws(a,y,o),h!==null&&(f(h,a,o),Vl(h,a,o))}function _S(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var h=a.retryLane;a.retryLane=h!==0&&h<o?h:o}}function Vb(a,o){_S(a,o),(a=a.alternate)&&_S(a,o)}function SS(a){if(a.tag===13||a.tag===31){var o=Ul(a,67108864);o!==null&&f(o,a,67108864),Vb(a,67108864)}}function ES(a){if(a.tag===13||a.tag===31){var o=mr();o=Gt(o);var h=Ul(a,o);h!==null&&f(h,a,o),Vb(a,o)}}var dy=!0;function dO(a,o,h,y){var _=B.T;B.T=null;var A=V.p;try{V.p=2,Xb(a,o,h,y)}finally{V.p=A,B.T=_}}function hO(a,o,h,y){var _=B.T;B.T=null;var A=V.p;try{V.p=8,Xb(a,o,h,y)}finally{V.p=A,B.T=_}}function Xb(a,o,h,y){if(dy){var _=Kb(y);if(_===null)Db(a,o,y,hy,h),TS(a,y);else if(mO(_,a,o,h,y))y.stopPropagation();else if(TS(a,y),o&4&&-1<pO.indexOf(a)){for(;_!==null;){var A=nn(_);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var L=bi(A.pendingLanes);if(L!==0){var W=A;for(W.pendingLanes|=2,W.entangledLanes|=2;L;){var re=1<<31-Pt(L);W.entanglements[1]|=re,L&=~re}to(A),(Ut&6)===0&&(na=hn()+500,kp(0))}}break;case 31:case 13:W=Ul(A,2),W!==null&&f(W,A,2),ee(),Vb(A,2)}if(A=Kb(y),A===null&&Db(a,o,y,hy,h),A===_)break;_=A}_!==null&&y.stopPropagation()}else Db(a,o,y,null,h)}}function Kb(a){return a=mt(a),Wb(a)}var hy=null;function Wb(a){if(hy=null,a=tn(a),a!==null){var o=s(a);if(o===null)a=null;else{var h=o.tag;if(h===13){if(a=l(o),a!==null)return a;a=null}else if(h===31){if(a=c(o),a!==null)return a;a=null}else if(h===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return hy=a,null}function wS(a){switch(a){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(ua()){case _e:return 2;case Ne:return 8;case Je:case bt:return 32;case kt:return 268435456;default:return 32}default:return 32}}var $b=!1,qc=null,Yc=null,Vc=null,Ip=new Map,Hp=new Map,Xc=[],pO="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 TS(a,o){switch(a){case"focusin":case"focusout":qc=null;break;case"dragenter":case"dragleave":Yc=null;break;case"mouseover":case"mouseout":Vc=null;break;case"pointerover":case"pointerout":Ip.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hp.delete(o.pointerId)}}function jp(a,o,h,y,_,A){return a===null||a.nativeEvent!==A?(a={blockedOn:o,domEventName:h,eventSystemFlags:y,nativeEvent:A,targetContainers:[_]},o!==null&&(o=nn(o),o!==null&&SS(o)),a):(a.eventSystemFlags|=y,o=a.targetContainers,_!==null&&o.indexOf(_)===-1&&o.push(_),a)}function mO(a,o,h,y,_){switch(o){case"focusin":return qc=jp(qc,a,o,h,y,_),!0;case"dragenter":return Yc=jp(Yc,a,o,h,y,_),!0;case"mouseover":return Vc=jp(Vc,a,o,h,y,_),!0;case"pointerover":var A=_.pointerId;return Ip.set(A,jp(Ip.get(A)||null,a,o,h,y,_)),!0;case"gotpointercapture":return A=_.pointerId,Hp.set(A,jp(Hp.get(A)||null,a,o,h,y,_)),!0}return!1}function CS(a){var o=tn(a.target);if(o!==null){var h=s(o);if(h!==null){if(o=h.tag,o===13){if(o=l(h),o!==null){a.blockedOn=o,qi(a.priority,function(){ES(h)});return}}else if(o===31){if(o=c(h),o!==null){a.blockedOn=o,qi(a.priority,function(){ES(h)});return}}else if(o===3&&h.stateNode.current.memoizedState.isDehydrated){a.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}a.blockedOn=null}function py(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var h=Kb(a.nativeEvent);if(h===null){h=a.nativeEvent;var y=new h.constructor(h.type,h);qe=y,h.target.dispatchEvent(y),qe=null}else return o=nn(h),o!==null&&SS(o),a.blockedOn=h,!1;o.shift()}return!0}function AS(a,o,h){py(a)&&h.delete(o)}function gO(){$b=!1,qc!==null&&py(qc)&&(qc=null),Yc!==null&&py(Yc)&&(Yc=null),Vc!==null&&py(Vc)&&(Vc=null),Ip.forEach(AS),Hp.forEach(AS)}function my(a,o){a.blockedOn===o&&(a.blockedOn=null,$b||($b=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,gO)))}var gy=null;function MS(a){gy!==a&&(gy=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){gy===a&&(gy=null);for(var o=0;o<a.length;o+=3){var h=a[o],y=a[o+1],_=a[o+2];if(typeof y!="function"){if(Wb(y||h)===null)continue;break}var A=nn(h);A!==null&&(a.splice(o,3),o-=3,Sp(A,{pending:!0,data:_,method:h.method,action:y},y,_))}}))}function Md(a){function o(re){return my(re,a)}qc!==null&&my(qc,a),Yc!==null&&my(Yc,a),Vc!==null&&my(Vc,a),Ip.forEach(o),Hp.forEach(o);for(var h=0;h<Xc.length;h++){var y=Xc[h];y.blockedOn===a&&(y.blockedOn=null)}for(;0<Xc.length&&(h=Xc[0],h.blockedOn===null);)CS(h),h.blockedOn===null&&Xc.shift();if(h=(a.ownerDocument||a).$$reactFormReplay,h!=null)for(y=0;y<h.length;y+=3){var _=h[y],A=h[y+1],L=_[li]||null;if(typeof A=="function")L||MS(h);else if(L){var W=null;if(A&&A.hasAttribute("formAction")){if(_=A,L=A[li]||null)W=L.formAction;else if(Wb(_)!==null)continue}else W=L.action;typeof W=="function"?h[y+1]=W:(h.splice(y,3),y-=3),MS(h)}}}function RS(){function a(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(L){return _=L})},focusReset:"manual",scroll:"manual"})}function o(){_!==null&&(_(),_=null),y||setTimeout(h,20)}function h(){if(!y&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,_=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(h,100),function(){y=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),_!==null&&(_(),_=null)}}}function Zb(a){this._internalRoot=a}yy.prototype.render=Zb.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(i(409));var h=o.current,y=mr();vS(h,y,a,o,null,null)},yy.prototype.unmount=Zb.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;vS(a.current,2,null,a,null,null),ee(),o[Ur]=null}};function yy(a){this._internalRoot=a}yy.prototype.unstable_scheduleHydration=function(a){if(a){var o=ar();a={blockedOn:null,target:a,priority:o};for(var h=0;h<Xc.length&&o!==0&&o<Xc[h].priority;h++);Xc.splice(h,0,a),h===0&&CS(a)}};var NS=e.version;if(NS!=="19.2.4")throw Error(i(527,NS,"19.2.4"));V.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=p(o),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var yO={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var by=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!by.isDisabled&&by.supportsFiber)try{xn=by.inject(yO),$t=by}catch{}}return Gp.createRoot=function(a,o){if(!r(a))throw Error(i(299));var h=!1,y="",_=Cp,A=$g,L=fd;return o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onUncaughtError!==void 0&&(_=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(L=o.onRecoverableError)),o=bS(a,1,!1,null,null,h,y,null,_,A,L,RS),a[Ur]=o.current,Ob(a),new Zb(o)},Gp.hydrateRoot=function(a,o,h){if(!r(a))throw Error(i(299));var y=!1,_="",A=Cp,L=$g,W=fd,re=null;return h!=null&&(h.unstable_strictMode===!0&&(y=!0),h.identifierPrefix!==void 0&&(_=h.identifierPrefix),h.onUncaughtError!==void 0&&(A=h.onUncaughtError),h.onCaughtError!==void 0&&(L=h.onCaughtError),h.onRecoverableError!==void 0&&(W=h.onRecoverableError),h.formState!==void 0&&(re=h.formState)),o=bS(a,1,!0,o,h??null,y,_,re,A,L,W,RS),o.context=xS(null),h=o.current,y=mr(),y=Gt(y),_=ys(y),_.callback=null,Ws(h,_,y),h=y,o.current.lanes=h,en(o,h),to(o),a[Ur]=o.current,Ob(a),new yy(o)},Gp.version="19.2.4",Gp}var PS;function MO(){if(PS)return ex.exports;PS=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ex.exports=AO(),ex.exports}var RO=MO();/**
|
|
51
|
+
* react-router v7.13.1
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/var GS="popstate";function FS(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function NO(t={}){function e(i,r){var p;let s=(p=r.state)==null?void 0:p.masked,{pathname:l,search:c,hash:d}=s||i.location;return Tv("",{pathname:l,search:c,hash:d},r.state&&r.state.usr||null,r.state&&r.state.key||"default",s?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,r){return typeof r=="string"?r:Em(r)}return OO(e,n,null,t)}function Wn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function yl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function kO(){return Math.random().toString(36).substring(2,10)}function qS(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Tv(t,e,n=null,i,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?mh(e):e,state:n,key:e&&e.key||i||kO(),unstable_mask:r}}function Em({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function mh(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function OO(t,e,n,i={}){let{window:r=document.defaultView,v5Compat:s=!1}=i,l=r.history,c="POP",d=null,p=m();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function m(){return(l.state||{idx:null}).idx}function g(){c="POP";let T=m(),w=T==null?null:T-p;p=T,d&&d({action:c,location:C.location,delta:w})}function b(T,w){c="PUSH";let k=FS(T)?T:Tv(C.location,T,w);p=m()+1;let M=qS(k,p),O=C.createHref(k.unstable_mask||k);try{l.pushState(M,"",O)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(O)}s&&d&&d({action:c,location:C.location,delta:1})}function v(T,w){c="REPLACE";let k=FS(T)?T:Tv(C.location,T,w);p=m();let M=qS(k,p),O=C.createHref(k.unstable_mask||k);l.replaceState(M,"",O),s&&d&&d({action:c,location:C.location,delta:0})}function S(T){return DO(T)}let C={get action(){return c},get location(){return t(r,l)},listen(T){if(d)throw new Error("A history only accepts one active listener");return r.addEventListener(GS,g),d=T,()=>{r.removeEventListener(GS,g),d=null}},createHref(T){return e(r,T)},createURL:S,encodeLocation(T){let w=S(T);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:b,replace:v,go(T){return l.go(T)}};return C}function DO(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Wn(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Em(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function lC(t,e,n="/"){return zO(t,e,n,!1)}function zO(t,e,n,i){let r=typeof e=="string"?mh(e):e,s=nc(r.pathname||"/",n);if(s==null)return null;let l=oC(t);BO(l);let c=null;for(let d=0;c==null&&d<l.length;++d){let p=VO(s);c=qO(l[d],p,i)}return c}function oC(t,e=[],n=[],i="",r=!1){let s=(l,c,d=r,p)=>{let m={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&d)return;Wn(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let g=co([i,m.relativePath]),b=n.concat(m);l.children&&l.children.length>0&&(Wn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),oC(l.children,e,b,g,d)),!(l.path==null&&!l.index)&&e.push({path:g,score:GO(g,l.index),routesMeta:b})};return t.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))s(l,c);else for(let p of cC(l.path))s(l,c,!0,p)}),e}function cC(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let l=cC(i.join("/")),c=[];return c.push(...l.map(d=>d===""?s:[s,d].join("/"))),r&&c.push(...l),c.map(d=>t.startsWith("/")&&d===""?"/":d)}function BO(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:FO(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var LO=/^:[\w-]+$/,UO=3,IO=2,HO=1,jO=10,PO=-2,YS=t=>t==="*";function GO(t,e){let n=t.split("/"),i=n.length;return n.some(YS)&&(i+=PO),e&&(i+=IO),n.filter(r=>!YS(r)).reduce((r,s)=>r+(LO.test(s)?UO:s===""?HO:jO),i)}function FO(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function qO(t,e,n=!1){let{routesMeta:i}=t,r={},s="/",l=[];for(let c=0;c<i.length;++c){let d=i[c],p=c===i.length-1,m=s==="/"?e:e.slice(s.length)||"/",g=g0({path:d.relativePath,caseSensitive:d.caseSensitive,end:p},m),b=d.route;if(!g&&p&&n&&!i[i.length-1].route.index&&(g=g0({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(r,g.params),l.push({params:r,pathname:co([s,g.pathname]),pathnameBase:$O(co([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=co([s,g.pathnameBase]))}return l}function g0(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=YO(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let s=r[0],l=s.replace(/(.)\/+$/,"$1"),c=r.slice(1);return{params:i.reduce((p,{paramName:m,isOptional:g},b)=>{if(m==="*"){let S=c[b]||"";l=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const v=c[b];return g&&!v?p[m]=void 0:p[m]=(v||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:l,pattern:t}}function YO(t,e=!1,n=!0){yl(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d,p,m)=>{if(i.push({paramName:c,isOptional:d!=null}),d){let g=m.charAt(p+l.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function VO(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return yl(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function nc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var XO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function KO(t,e="/"){let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?mh(t):t,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=VS(n.substring(1),"/"):s=VS(n,e)):s=e,{pathname:s,search:ZO(i),hash:QO(r)}}function VS(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function rx(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function WO(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function N_(t){let e=WO(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function G0(t,e,n,i=!1){let r;typeof t=="string"?r=mh(t):(r={...t},Wn(!r.pathname||!r.pathname.includes("?"),rx("?","pathname","search",r)),Wn(!r.pathname||!r.pathname.includes("#"),rx("#","pathname","hash",r)),Wn(!r.search||!r.search.includes("#"),rx("#","search","hash",r)));let s=t===""||r.pathname==="",l=s?"/":r.pathname,c;if(l==null)c=n;else{let g=e.length-1;if(!i&&l.startsWith("..")){let b=l.split("/");for(;b[0]==="..";)b.shift(),g-=1;r.pathname=b.join("/")}c=g>=0?e[g]:"/"}let d=KO(r,c),p=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(p||m)&&(d.pathname+="/"),d}var co=t=>t.join("/").replace(/\/\/+/g,"/"),$O=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),ZO=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,QO=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,JO=class{constructor(t,e,n,i=!1){this.status=t,this.statusText=e||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function e3(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function t3(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var uC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fC(t,e){let n=t;if(typeof n!="string"||!XO.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,r=!1;if(uC)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=nc(l.pathname,e);l.origin===s.origin&&c!=null?n=c+l.search+l.hash:r=!0}catch{yl(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:r,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dC=["POST","PUT","PATCH","DELETE"];new Set(dC);var n3=["GET",...dC];new Set(n3);var gh=P.createContext(null);gh.displayName="DataRouter";var F0=P.createContext(null);F0.displayName="DataRouterState";var i3=P.createContext(!1),hC=P.createContext({isTransitioning:!1});hC.displayName="ViewTransition";var r3=P.createContext(new Map);r3.displayName="Fetchers";var a3=P.createContext(null);a3.displayName="Await";var is=P.createContext(null);is.displayName="Navigation";var Pm=P.createContext(null);Pm.displayName="Location";var bl=P.createContext({outlet:null,matches:[],isDataRoute:!1});bl.displayName="Route";var k_=P.createContext(null);k_.displayName="RouteError";var pC="REACT_ROUTER_ERROR",s3="REDIRECT",l3="ROUTE_ERROR_RESPONSE";function o3(t){if(t.startsWith(`${pC}:${s3}:{`))try{let e=JSON.parse(t.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 c3(t){if(t.startsWith(`${pC}:${l3}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new JO(e.status,e.statusText,e.data)}catch{}}function u3(t,{relative:e}={}){Wn(yh(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=P.useContext(is),{hash:r,pathname:s,search:l}=Gm(t,{relative:e}),c=s;return n!=="/"&&(c=s==="/"?n:co([n,s])),i.createHref({pathname:c,search:l,hash:r})}function yh(){return P.useContext(Pm)!=null}function xl(){return Wn(yh(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(Pm).location}var mC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gC(t){P.useContext(is).static||P.useLayoutEffect(t)}function q0(){let{isDataRoute:t}=P.useContext(bl);return t?T3():f3()}function f3(){Wn(yh(),"useNavigate() may be used only in the context of a <Router> component.");let t=P.useContext(gh),{basename:e,navigator:n}=P.useContext(is),{matches:i}=P.useContext(bl),{pathname:r}=xl(),s=JSON.stringify(N_(i)),l=P.useRef(!1);return gC(()=>{l.current=!0}),P.useCallback((d,p={})=>{if(yl(l.current,mC),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=G0(d,JSON.parse(s),r,p.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:co([e,m.pathname])),(p.replace?n.replace:n.push)(m,p.state,p)},[e,n,s,r,t])}var d3=P.createContext(null);function h3(t){let e=P.useContext(bl).outlet;return P.useMemo(()=>e&&P.createElement(d3.Provider,{value:t},e),[e,t])}function Gm(t,{relative:e}={}){let{matches:n}=P.useContext(bl),{pathname:i}=xl(),r=JSON.stringify(N_(n));return P.useMemo(()=>G0(t,JSON.parse(r),i,e==="path"),[t,r,i,e])}function p3(t,e){return yC(t,e)}function yC(t,e,n){var T;Wn(yh(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=P.useContext(is),{matches:r}=P.useContext(bl),s=r[r.length-1],l=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",p=s&&s.route;{let w=p&&p.path||"";xC(c,!p||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${w}">) 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.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let m=xl(),g;if(e){let w=typeof e=="string"?mh(e):e;Wn(d==="/"||((T=w.pathname)==null?void 0:T.startsWith(d)),`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 "${d}" but pathname "${w.pathname}" was given in the \`location\` prop.`),g=w}else g=m;let b=g.pathname||"/",v=b;if(d!=="/"){let w=d.replace(/^\//,"").split("/");v="/"+b.replace(/^\//,"").split("/").slice(w.length).join("/")}let S=lC(t,{pathname:v});yl(p||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),yl(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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 C=x3(S&&S.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:co([d,i.encodeLocation?i.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?d:co([d,i.encodeLocation?i.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),r,n);return e&&C?P.createElement(Pm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},C):C}function m3(){let t=w3(),e=e3(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:s},"ErrorBoundary")," or"," ",P.createElement("code",{style:s},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),n?P.createElement("pre",{style:r},n):null,l)}var g3=P.createElement(m3,null),bC=class extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=c3(t.digest);n&&(t=n)}let e=t!==void 0?P.createElement(bl.Provider,{value:this.props.routeContext},P.createElement(k_.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?P.createElement(y3,{error:t},e):e}};bC.contextType=i3;var ax=new WeakMap;function y3({children:t,error:e}){let{basename:n}=P.useContext(is);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=o3(e.digest);if(i){let r=ax.get(e);if(r)throw r;let s=fC(i.location,n);if(uC&&!ax.get(e))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw ax.set(e,l),l}return P.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function b3({routeContext:t,match:e,children:n}){let i=P.useContext(gh);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),P.createElement(bl.Provider,{value:t},n)}function x3(t,e=[],n){let i=n==null?void 0:n.state;if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(e.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let r=t,s=i==null?void 0:i.errors;if(s!=null){let m=r.findIndex(g=>g.route.id&&(s==null?void 0:s[g.route.id])!==void 0);Wn(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),r=r.slice(0,Math.min(r.length,m+1))}let l=!1,c=-1;if(n&&i){l=i.renderFallback;for(let m=0;m<r.length;m++){let g=r[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(c=m),g.route.id){let{loaderData:b,errors:v}=i,S=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||S){n.isStatic&&(l=!0),c>=0?r=r.slice(0,c+1):r=[r[0]];break}}}}let d=n==null?void 0:n.onError,p=i&&d?(m,g)=>{var b,v;d(m,{location:i.location,params:((v=(b=i.matches)==null?void 0:b[0])==null?void 0:v.params)??{},unstable_pattern:t3(i.matches),errorInfo:g})}:void 0;return r.reduceRight((m,g,b)=>{let v,S=!1,C=null,T=null;i&&(v=s&&g.route.id?s[g.route.id]:void 0,C=g.route.errorElement||g3,l&&(c<0&&b===0?(xC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,T=null):c===b&&(S=!0,T=g.route.hydrateFallbackElement||null)));let w=e.concat(r.slice(0,b+1)),k=()=>{let M;return v?M=C:S?M=T:g.route.Component?M=P.createElement(g.route.Component,null):g.route.element?M=g.route.element:M=m,P.createElement(b3,{match:g,routeContext:{outlet:m,matches:w,isDataRoute:i!=null},children:M})};return i&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?P.createElement(bC,{location:i.location,revalidation:i.revalidation,component:C,error:v,children:k(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:p}):k()},null)}function O_(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function v3(t){let e=P.useContext(gh);return Wn(e,O_(t)),e}function _3(t){let e=P.useContext(F0);return Wn(e,O_(t)),e}function S3(t){let e=P.useContext(bl);return Wn(e,O_(t)),e}function D_(t){let e=S3(t),n=e.matches[e.matches.length-1];return Wn(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function E3(){return D_("useRouteId")}function w3(){var i;let t=P.useContext(k_),e=_3("useRouteError"),n=D_("useRouteError");return t!==void 0?t:(i=e.errors)==null?void 0:i[n]}function T3(){let{router:t}=v3("useNavigate"),e=D_("useNavigate"),n=P.useRef(!1);return gC(()=>{n.current=!0}),P.useCallback(async(r,s={})=>{yl(n.current,mC),n.current&&(typeof r=="number"?await t.navigate(r):await t.navigate(r,{fromRouteId:e,...s}))},[t,e])}var XS={};function xC(t,e,n){!e&&!XS[t]&&(XS[t]=!0,yl(!1,n))}P.memo(C3);function C3({routes:t,future:e,state:n,isStatic:i,onError:r}){return yC(t,void 0,{state:n,isStatic:i,onError:r})}function A3({to:t,replace:e,state:n,relative:i}){Wn(yh(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=P.useContext(is);yl(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=P.useContext(bl),{pathname:l}=xl(),c=q0(),d=G0(t,N_(s),l,i==="path"),p=JSON.stringify(d);return P.useEffect(()=>{c(JSON.parse(p),{replace:e,state:n,relative:i})},[c,p,i,e,n]),null}function KS(t){return h3(t.context)}function Wa(t){Wn(!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 M3({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:s=!1,unstable_useTransitions:l}){Wn(!yh(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=t.replace(/^\/*/,"/"),d=P.useMemo(()=>({basename:c,navigator:r,static:s,unstable_useTransitions:l,future:{}}),[c,r,s,l]);typeof n=="string"&&(n=mh(n));let{pathname:p="/",search:m="",hash:g="",state:b=null,key:v="default",unstable_mask:S}=n,C=P.useMemo(()=>{let T=nc(p,c);return T==null?null:{location:{pathname:T,search:m,hash:g,state:b,key:v,unstable_mask:S},navigationType:i}},[c,p,m,g,b,v,i,S]);return yl(C!=null,`<Router basename="${c}"> is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:P.createElement(is.Provider,{value:d},P.createElement(Pm.Provider,{children:e,value:C}))}function R3({children:t,location:e}){return p3(Cv(t),e)}function Cv(t,e=[]){let n=[];return P.Children.forEach(t,(i,r)=>{if(!P.isValidElement(i))return;let s=[...e,r];if(i.type===P.Fragment){n.push.apply(n,Cv(i.props.children,s));return}Wn(i.type===Wa,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Wn(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=Cv(i.props.children,s)),n.push(l)}),n}var a0="get",s0="application/x-www-form-urlencoded";function Y0(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function N3(t){return Y0(t)&&t.tagName.toLowerCase()==="button"}function k3(t){return Y0(t)&&t.tagName.toLowerCase()==="form"}function O3(t){return Y0(t)&&t.tagName.toLowerCase()==="input"}function D3(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function z3(t,e){return t.button===0&&(!e||e==="_self")&&!D3(t)}var xy=null;function B3(){if(xy===null)try{new FormData(document.createElement("form"),0),xy=!1}catch{xy=!0}return xy}var L3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sx(t){return t!=null&&!L3.has(t)?(yl(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${s0}"`),null):t}function U3(t,e){let n,i,r,s,l;if(k3(t)){let c=t.getAttribute("action");i=c?nc(c,e):null,n=t.getAttribute("method")||a0,r=sx(t.getAttribute("enctype"))||s0,s=new FormData(t)}else if(N3(t)||O3(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||c.getAttribute("action");if(i=d?nc(d,e):null,n=t.getAttribute("formmethod")||c.getAttribute("method")||a0,r=sx(t.getAttribute("formenctype"))||sx(c.getAttribute("enctype"))||s0,s=new FormData(c,t),!B3()){let{name:p,type:m,value:g}=t;if(m==="image"){let b=p?`${p}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else p&&s.append(p,g)}}else{if(Y0(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=a0,i=null,r=s0,l=t}return s&&r==="text/plain"&&(l=s,s=void 0),{action:i,method:n.toLowerCase(),encType:r,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function z_(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function I3(t,e,n,i){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${i}`:r.pathname=`${r.pathname}.${i}`:r.pathname==="/"?r.pathname=`_root.${i}`:e&&nc(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.${i}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${i}`,r}async function H3(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function j3(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function P3(t,e,n){let i=await Promise.all(t.map(async r=>{let s=e.routes[r.route.id];if(s){let l=await H3(s,n);return l.links?l.links():[]}return[]}));return Y3(i.flat(1).filter(j3).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function WS(t,e,n,i,r,s){let l=(d,p)=>n[p]?d.route.id!==n[p].route.id:!0,c=(d,p)=>{var m;return n[p].pathname!==d.pathname||((m=n[p].route.path)==null?void 0:m.endsWith("*"))&&n[p].params["*"]!==d.params["*"]};return s==="assets"?e.filter((d,p)=>l(d,p)||c(d,p)):s==="data"?e.filter((d,p)=>{var g;let m=i.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,p)||c(d,p))return!0;if(d.route.shouldRevalidate){let b=d.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function G3(t,e,{includeHydrateFallback:n}={}){return F3(t.map(i=>{let r=e.routes[i.route.id];if(!r)return[];let s=[r.module];return r.clientActionModule&&(s=s.concat(r.clientActionModule)),r.clientLoaderModule&&(s=s.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(s=s.concat(r.hydrateFallbackModule)),r.imports&&(s=s.concat(r.imports)),s}).flat(1))}function F3(t){return[...new Set(t)]}function q3(t){let e={},n=Object.keys(t).sort();for(let i of n)e[i]=t[i];return e}function Y3(t,e){let n=new Set;return new Set(e),t.reduce((i,r)=>{let s=JSON.stringify(q3(r));return n.has(s)||(n.add(s),i.push({key:s,link:r})),i},[])}function vC(){let t=P.useContext(gh);return z_(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function V3(){let t=P.useContext(F0);return z_(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var B_=P.createContext(void 0);B_.displayName="FrameworkContext";function _C(){let t=P.useContext(B_);return z_(t,"You must render this element inside a <HydratedRouter> element"),t}function X3(t,e){let n=P.useContext(B_),[i,r]=P.useState(!1),[s,l]=P.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:p,onMouseLeave:m,onTouchStart:g}=e,b=P.useRef(null);P.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let C=w=>{w.forEach(k=>{l(k.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[t]),P.useEffect(()=>{if(i){let C=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(C)}}},[i]);let v=()=>{r(!0)},S=()=>{r(!1),l(!1)};return n?t!=="intent"?[s,b,{}]:[s,b,{onFocus:Fp(c,v),onBlur:Fp(d,S),onMouseEnter:Fp(p,v),onMouseLeave:Fp(m,S),onTouchStart:Fp(g,v)}]:[!1,b,{}]}function Fp(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function K3({page:t,...e}){let{router:n}=vC(),i=P.useMemo(()=>lC(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?P.createElement($3,{page:t,matches:i,...e}):null}function W3(t){let{manifest:e,routeModules:n}=_C(),[i,r]=P.useState([]);return P.useEffect(()=>{let s=!1;return P3(t,e,n).then(l=>{s||r(l)}),()=>{s=!0}},[t,e,n]),i}function $3({page:t,matches:e,...n}){let i=xl(),{future:r,manifest:s,routeModules:l}=_C(),{basename:c}=vC(),{loaderData:d,matches:p}=V3(),m=P.useMemo(()=>WS(t,e,p,s,i,"data"),[t,e,p,s,i]),g=P.useMemo(()=>WS(t,e,p,s,i,"assets"),[t,e,p,s,i]),b=P.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let C=new Set,T=!1;if(e.forEach(k=>{var O;let M=s.routes[k.route.id];!M||!M.hasLoader||(!m.some(H=>H.route.id===k.route.id)&&k.route.id in d&&((O=l[k.route.id])!=null&&O.shouldRevalidate)||M.hasClientLoader?T=!0:C.add(k.route.id))}),C.size===0)return[];let w=I3(t,c,r.unstable_trailingSlashAwareDataRequests,"data");return T&&C.size>0&&w.searchParams.set("_routes",e.filter(k=>C.has(k.route.id)).map(k=>k.route.id).join(",")),[w.pathname+w.search]},[c,r.unstable_trailingSlashAwareDataRequests,d,i,s,m,e,t,l]),v=P.useMemo(()=>G3(g,s),[g,s]),S=W3(g);return P.createElement(P.Fragment,null,b.map(C=>P.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...n})),v.map(C=>P.createElement("link",{key:C,rel:"modulepreload",href:C,...n})),S.map(({key:C,link:T})=>P.createElement("link",{key:C,nonce:n.nonce,...T,crossOrigin:T.crossOrigin??n.crossOrigin})))}function Z3(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var Q3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Q3&&(window.__reactRouterVersion="7.13.1")}catch{}function J3({basename:t,children:e,unstable_useTransitions:n,window:i}){let r=P.useRef();r.current==null&&(r.current=NO({window:i,v5Compat:!0}));let s=r.current,[l,c]=P.useState({action:s.action,location:s.location}),d=P.useCallback(p=>{n===!1?c(p):P.startTransition(()=>c(p))},[n]);return P.useLayoutEffect(()=>s.listen(d),[s,d]),P.createElement(M3,{basename:t,children:e,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:n})}var SC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,EC=P.forwardRef(function({onClick:e,discover:n="render",prefetch:i="none",relative:r,reloadDocument:s,replace:l,unstable_mask:c,state:d,target:p,to:m,preventScrollReset:g,viewTransition:b,unstable_defaultShouldRevalidate:v,...S},C){let{basename:T,navigator:w,unstable_useTransitions:k}=P.useContext(is),M=typeof m=="string"&&SC.test(m),O=fC(m,T);m=O.to;let H=u3(m,{relative:r}),z=xl(),F=null;if(c){let J=G0(c,[],z.unstable_mask?z.unstable_mask.pathname:"/",!0);T!=="/"&&(J.pathname=J.pathname==="/"?T:co([T,J.pathname])),F=w.createHref(J)}let[$,j,I]=X3(i,S),Y=nD(m,{replace:l,unstable_mask:c,state:d,target:p,preventScrollReset:g,relative:r,viewTransition:b,unstable_defaultShouldRevalidate:v,unstable_useTransitions:k});function X(J){e&&e(J),J.defaultPrevented||Y(J)}let ne=!(O.isExternal||s),q=P.createElement("a",{...S,...I,href:(ne?F:void 0)||O.absoluteURL||H,onClick:ne?X:e,ref:Z3(C,j),target:p,"data-discover":!M&&n==="render"?"true":void 0});return $&&!M?P.createElement(P.Fragment,null,q,P.createElement(K3,{page:H})):q});EC.displayName="Link";var wC=P.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:i="",end:r=!1,style:s,to:l,viewTransition:c,children:d,...p},m){let g=Gm(l,{relative:p.relative}),b=xl(),v=P.useContext(F0),{navigator:S,basename:C}=P.useContext(is),T=v!=null&&lD(g)&&c===!0,w=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,k=b.pathname,M=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(k=k.toLowerCase(),M=M?M.toLowerCase():null,w=w.toLowerCase()),M&&C&&(M=nc(M,C)||M);const O=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let H=k===w||!r&&k.startsWith(w)&&k.charAt(O)==="/",z=M!=null&&(M===w||!r&&M.startsWith(w)&&M.charAt(w.length)==="/"),F={isActive:H,isPending:z,isTransitioning:T},$=H?e:void 0,j;typeof i=="function"?j=i(F):j=[i,H?"active":null,z?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(F):s;return P.createElement(EC,{...p,"aria-current":$,className:j,ref:m,style:I,to:l,viewTransition:c},typeof d=="function"?d(F):d)});wC.displayName="NavLink";var eD=P.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:i,replace:r,state:s,method:l=a0,action:c,onSubmit:d,relative:p,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:b,...v},S)=>{let{unstable_useTransitions:C}=P.useContext(is),T=aD(),w=sD(c,{relative:p}),k=l.toLowerCase()==="get"?"get":"post",M=typeof c=="string"&&SC.test(c),O=H=>{if(d&&d(H),H.defaultPrevented)return;H.preventDefault();let z=H.nativeEvent.submitter,F=(z==null?void 0:z.getAttribute("formmethod"))||l,$=()=>T(z||H.currentTarget,{fetcherKey:e,method:F,navigate:n,replace:r,state:s,relative:p,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:b});C&&n!==!1?P.startTransition(()=>$()):$()};return P.createElement("form",{ref:S,method:k,action:w,onSubmit:i?d:O,...v,"data-discover":!M&&t==="render"?"true":void 0})});eD.displayName="Form";function tD(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function TC(t){let e=P.useContext(gh);return Wn(e,tD(t)),e}function nD(t,{target:e,replace:n,unstable_mask:i,state:r,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=q0(),g=xl(),b=Gm(t,{relative:l});return P.useCallback(v=>{if(z3(v,e)){v.preventDefault();let S=n!==void 0?n:Em(g)===Em(b),C=()=>m(t,{replace:S,unstable_mask:i,state:r,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:d});p?P.startTransition(()=>C()):C()}},[g,m,b,n,i,r,e,t,s,l,c,d,p])}var iD=0,rD=()=>`__${String(++iD)}__`;function aD(){let{router:t}=TC("useSubmit"),{basename:e}=P.useContext(is),n=E3(),i=t.fetch,r=t.navigate;return P.useCallback(async(s,l={})=>{let{action:c,method:d,encType:p,formData:m,body:g}=U3(s,e);if(l.navigate===!1){let b=l.fetcherKey||rD();await i(b,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:g,formMethod:l.method||d,formEncType:l.encType||p,flushSync:l.flushSync})}else await r(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:g,formMethod:l.method||d,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,r,e,n])}function sD(t,{relative:e}={}){let{basename:n}=P.useContext(is),i=P.useContext(bl);Wn(i,"useFormAction must be used inside a RouteContext");let[r]=i.matches.slice(-1),s={...Gm(t||".",{relative:e})},l=xl();if(t==null){s.search=l.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(g=>g).forEach(g=>c.append("index",g));let m=c.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&r.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:co([n,s.pathname])),Em(s)}function lD(t,{relative:e}={}){let n=P.useContext(hC);Wn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=TC("useViewTransitionState"),r=Gm(t,{relative:e});if(!n.isTransitioning)return!1;let s=nc(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=nc(n.nextLocation.pathname,i)||n.nextLocation.pathname;return g0(r.pathname,l)!=null||g0(r.pathname,s)!=null}sC();const $S=t=>{let e;const n=new Set,i=(p,m)=>{const g=typeof p=="function"?p(e):p;if(!Object.is(g,e)){const b=e;e=m??(typeof g!="object"||g===null)?g:Object.assign({},e,g),n.forEach(v=>v(e,b))}},r=()=>e,c={setState:i,getState:r,getInitialState:()=>d,subscribe:p=>(n.add(p),()=>n.delete(p))},d=e=t(i,r,c);return c},oD=(t=>t?$S(t):$S),cD=t=>t;function uD(t,e=cD){const n=sm.useSyncExternalStore(t.subscribe,sm.useCallback(()=>e(t.getState()),[t,e]),sm.useCallback(()=>e(t.getInitialState()),[t,e]));return sm.useDebugValue(n),n}const ZS=t=>{const e=oD(t),n=i=>uD(e,i);return Object.assign(n,e),n},Sf=(t=>t?ZS(t):ZS),dl=Sf(t=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(e,n)=>{t({loading:!0,error:null});try{const i=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n}),credentials:"include"}),r=await i.json();if(!i.ok){t({loading:!1,error:r.error||"Login failed"});return}t({user:r.user,isAuthenticated:!0,loading:!1,error:null})}catch{t({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}t({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{t({loading:!0});try{const e=await fetch("/api/auth/me",{credentials:"include"});if(e.ok){const n=await e.json();t({user:n.user,isAuthenticated:!0,loading:!1})}else t({user:null,isAuthenticated:!1,loading:!1})}catch{t({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>t({user:null,isAuthenticated:!1,loading:!1,error:null})})),Ta=Sf((t,e)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const i=await n.json();t({squads:i.squads})}}catch{}},selectSquad:n=>t({selectedSquad:n}),setSquadState:(n,i)=>t(r=>({activeStates:{...r.activeStates,[n]:i}})),clearSquadState:n=>t(i=>{const{[n]:r,...s}=i.activeStates;return{activeStates:s}}),reset:()=>t({squads:[],selectedSquad:null,activeStates:{}})}));let fD=0;function QS(){return`local-${Date.now()}-${++fD}`}const nr=Sf((t,e)=>({conversations:[],messages:[],conversationId:null,streaming:!1,streamingText:"",activity:null,error:null,addUserMessage:n=>{const i={id:QS(),role:"user",content:n,createdAt:new Date().toISOString()};t(r=>{const s=r.conversationId,l=s&&!r.messages.some(c=>c.role==="user")?r.conversations.map(c=>c.id===s?{...c,preview:n.slice(0,80)}:c):r.conversations;return{messages:[...r.messages,i],error:null,conversations:l}})},setConversationId:n=>{t({conversationId:n})},startStreaming:()=>{t({streaming:!0,streamingText:"",activity:null,error:null})},appendChunk:n=>{t(i=>({streamingText:i.streamingText+n,activity:null}))},setActivity:n=>{t({activity:n})},finishStreaming:n=>{const{streamingText:i}=e(),r={id:n,role:"assistant",content:i,createdAt:new Date().toISOString()};t(s=>({messages:[...s.messages,r],streaming:!1,streamingText:"",activity:null}))},addAgentDm:n=>{const i={id:QS(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};t(r=>({messages:[...r.messages,i]}))},setError:n=>{t({error:n,streaming:!1,streamingText:"",activity:null})},loadConversations:async n=>{try{const i=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!i.ok)return;const s=((await i.json()).data||[]).map(l=>({id:l.id,createdAt:l.created_at,preview:""}));for(const l of s)try{const c=await fetch(`/api/conversations/${l.id}/messages?limit=1`,{credentials:"include"});if(c.ok){const p=((await c.json()).data||[])[0];p&&(l.preview=p.content.slice(0,80))}}catch{}t({conversations:s})}catch{}},selectConversation:async n=>{t({conversationId:n,messages:[],streaming:!1,streamingText:"",activity:null,error:null});try{const i=await fetch(`/api/conversations/${n}/messages`,{credentials:"include"});if(!i.ok)return;const s=((await i.json()).data||[]).map(l=>({id:l.id,role:l.role,content:l.content,agentId:l.agent_id??void 0,agentName:l.agent_name??void 0,createdAt:l.created_at}));t({messages:s})}catch{}},deleteConversation:async(n,i)=>{try{if(!(await fetch(`/api/conversations/${n}`,{method:"DELETE",credentials:"include"})).ok)return;const{conversationId:s}=e();t(l=>({conversations:l.conversations.filter(c=>c.id!==n)})),s===n&&t({conversationId:null,messages:[]})}catch{}},loadHistory:async n=>{try{const i=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!i.ok)return;const r=await i.json();if(!r.data||r.data.length===0){t({conversationId:null,messages:[],conversations:[]});return}const s=(r.data||[]).map(g=>({id:g.id,createdAt:g.created_at,preview:""})),l=r.data[0];t({conversationId:l.id,conversations:s});const c=await fetch(`/api/conversations/${l.id}/messages`,{credentials:"include"});if(!c.ok)return;const p=((await c.json()).data||[]).map(g=>({id:g.id,role:g.role,content:g.content,agentId:g.agent_id??void 0,agentName:g.agent_name??void 0,createdAt:g.created_at})),m=p.find(g=>g.role==="user");if(m){const g=s.findIndex(b=>b.id===l.id);g>=0&&(s[g].preview=m.content.slice(0,80))}t({messages:p,conversations:s});for(const g of s)if(g.id!==l.id)try{const b=await fetch(`/api/conversations/${g.id}/messages?limit=1`,{credentials:"include"});if(b.ok){const S=((await b.json()).data||[])[0];S&&(g.preview=S.content.slice(0,80))}}catch{}t({conversations:[...s]})}catch{}},reset:()=>t({conversations:[],messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function dD(t){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,i=new WebSocket(n),r=[];let s=!0;function l(c){i.readyState===WebSocket.OPEN?i.send(JSON.stringify(c)):i.readyState===WebSocket.CONNECTING&&r.push(c)}return i.onopen=()=>{var c,d;s||(d=(c=t.current).onReconnect)==null||d.call(c),s=!1;for(const p of r)i.send(JSON.stringify(p));r.length=0},i.onmessage=c=>{var d,p,m,g,b,v,S,C,T,w,k,M,O,H,z,F,$;try{const j=JSON.parse(c.data),I=t.current;switch(j.type){case"squad:state":(d=I.onSquadState)==null||d.call(I,j.squadName,j.state);break;case"squad:inactive":(p=I.onSquadInactive)==null||p.call(I,j.squadName,j.reason);break;case"chat:chunk":(m=I.onChatChunk)==null||m.call(I,j.squadName,j.conversationId,j.delta);break;case"chat:activity":(g=I.onChatActivity)==null||g.call(I,j.squadName,j.tool,j.summary);break;case"chat:done":(b=I.onChatDone)==null||b.call(I,j.squadName,j.conversationId,j.messageId);break;case"chat:error":(v=I.onChatError)==null||v.call(I,j.squadName,j.error);break;case"chat:agent_dm":(S=I.onChatAgentDm)==null||S.call(I,j.squadName,j.conversationId,j.agentId,j.agentName,j.message);break;case"chat:conversation_created":(C=I.onChatConversationCreated)==null||C.call(I,j.squadName,j.conversationId);break;case"agent:output_chunk":(T=I.onAgentOutputChunk)==null||T.call(I,j.squadName,j.agentId,j.agentName,j.delta);break;case"agent:step_start":(w=I.onAgentStepStart)==null||w.call(I,j.squadName,j.agentId,j.agentName,j.stepIndex,j.stepLabel);break;case"agent:step_complete":(k=I.onAgentStepComplete)==null||k.call(I,j.squadName,j.agentId,j.agentName,j.stepIndex,j.stepLabel);break;case"squad:checkpoint":(M=I.onSquadCheckpoint)==null||M.call(I,j.squadName,j.agentId,j.agentName,j.question);break;case"schedule:started":(O=I.onScheduleStarted)==null||O.call(I,j.squadName,j.jobId,j.attempt);break;case"schedule:chunk":(H=I.onScheduleChunk)==null||H.call(I,j.squadName,j.jobId,j.delta);break;case"schedule:done":(z=I.onScheduleDone)==null||z.call(I,j.squadName,j.jobId,j.summary,j.attempt);break;case"schedule:error":(F=I.onScheduleError)==null||F.call(I,j.squadName,j.jobId,j.error,j.attempt,j.willRetry);break;case"schedule:status_changed":($=I.onScheduleStatusChanged)==null||$.call(I,j.squadName,j.status);break}}catch{}},{subscribe:c=>{l({type:"squad:subscribe",squadName:c})},unsubscribe:c=>{l({type:"squad:unsubscribe",squadName:c})},sendChat:(c,d,p)=>{const m={type:"chat:send",squadName:c,message:d};p&&p.length>0&&(m.files=p),l(m)},newConversation:c=>{l({type:"chat:new_conversation",squadName:c})},sendCheckpointResponse:(c,d)=>{l({type:"squad:checkpoint_response",squadName:c,answer:d})},disconnect:()=>{i.close()}}}function hD(t={}){const e=P.useRef(null),n=P.useRef(t),i=P.useRef(new Set);n.current=t,P.useEffect(()=>{const p=dD(n);e.current=p;for(const m of i.current)p.subscribe(m);return()=>{p.disconnect()}},[]);const r=P.useCallback(p=>{var m;i.current.add(p),(m=e.current)==null||m.subscribe(p)},[]),s=P.useCallback(p=>{var m;i.current.delete(p),(m=e.current)==null||m.unsubscribe(p)},[]),l=P.useCallback((p,m,g)=>{var b;(b=e.current)==null||b.sendChat(p,m,g)},[]),c=P.useCallback(p=>{var m;(m=e.current)==null||m.newConversation(p)},[]),d=P.useCallback((p,m)=>{var g;(g=e.current)==null||g.sendCheckpointResponse(p,m)},[]);return{subscribe:r,unsubscribe:s,sendChat:l,newConversation:c,sendCheckpointResponse:d}}const pD={idle:{color:"var(--status-idle)",glow:"none",icon:"○"},working:{color:"var(--status-active)",glow:"0 0 6px var(--status-active-glow)",icon:"●"},delivering:{color:"var(--accent)",glow:"0 0 6px var(--accent-glow)",icon:"→"},done:{color:"var(--status-active)",glow:"none",icon:"✓"},checkpoint:{color:"var(--status-warning)",glow:"0 0 6px var(--status-warning-glow)",icon:"◆"},running:{color:"var(--status-active)",glow:"0 0 6px var(--status-active-glow)",icon:"●"},completed:{color:"var(--status-active)",glow:"none",icon:"✓"}},mD={color:"var(--status-idle)",glow:"none"};function gD({status:t}){if(!t)return null;const e=pD[t]||mD;return N.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:"var(--font-mono)",fontSize:"0.68rem",color:e.color,letterSpacing:"0.02em"},children:[N.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:e.color,boxShadow:e.glow,animation:t==="working"||t==="running"?"statusPulse 2s ease-in-out infinite":"none"}}),t]})}function yD({squad:t,selected:e,onClick:n}){return N.jsxs("div",{onClick:n,style:{padding:"8px 10px",cursor:"pointer",borderRadius:"var(--radius-sm)",background:e?"var(--accent-glow)":"transparent",borderLeft:e?"2px solid var(--accent)":"2px solid transparent",marginBottom:2,transition:"all var(--duration-fast) var(--ease-out)"},children:[N.jsx("div",{style:{fontSize:"0.82rem",fontWeight:e?600:400,color:e?"var(--text-primary)":"var(--text-secondary)",marginBottom:2},children:t.name}),N.jsx(gD,{status:t.status})]})}function bD({squads:t,selectedSquad:e,onSelect:n}){return N.jsxs("div",{style:{padding:"var(--sp-3)"},children:[N.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-2)"},children:"Squads"}),t.length===0&&N.jsx("div",{style:{padding:"8px 10px",color:"var(--text-muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"No squads found"}),t.map(i=>N.jsx(yD,{squad:i,selected:i.code===e,onClick:()=>n(i.code)},i.code))]})}function xD(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=t%60,r=s=>s.toString().padStart(2,"0");return e>0?`${e}h ${r(n)}m ${r(i)}s`:`${n}m ${r(i)}s`}function vD({state:t}){const[e,n]=P.useState(0);return P.useEffect(()=>{if(!(t!=null&&t.startedAt)||t.status!=="running"){n(0);return}const i=new Date(t.startedAt).getTime(),r=()=>n(Math.floor((Date.now()-i)/1e3));r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[t==null?void 0:t.startedAt,t==null?void 0:t.status]),N.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--statusbar-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:t?N.jsxs(N.Fragment,{children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[N.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:t.status==="running"?"var(--status-active)":t.status==="checkpoint"?"var(--status-warning)":"var(--status-idle)",boxShadow:t.status==="running"?"0 0 8px var(--status-active-glow)":"none",animation:t.status==="running"?"statusPulse 2s ease-in-out infinite":"none"}}),N.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Step ",t.step.current,"/",t.step.total]}),N.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),N.jsx("span",{children:t.step.label})]}),N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[t.handoff&&N.jsxs("span",{style:{color:"var(--accent)"},children:[t.handoff.from," → ",t.handoff.to]}),t.status==="running"&&N.jsx("span",{style:{color:"var(--text-secondary)"},children:xD(e)})]})]}):N.jsxs(N.Fragment,{children:[N.jsx("span",{children:"Ready"}),N.jsx("span",{children:"ExpxAgents Mission Control"})]})})}let Av=null;function _D(t){Av=t}function SD(t,e,n){Av&&Av(t,e,n)}let Mv=null;function ED(t){Mv=t}function wD(t){Mv&&Mv(t)}let Rv=null;function TD(t){Rv=t}function CD(t,e){Rv&&Rv(t,e)}const l0=32,ol=96,Jc=64,dt={floor:13158600,floorHighlight:14211288,floorGrout:12105912,wall:15261904,wallTrim:11577496,baseboard:7035464,desk:15263976,deskTop:16119285,deskShadow:13684944,deskLeg:1710618,deskEdge:14737632,monitor:2236976,monitorScreen:1981020,monitorScreenGlow:2773120,monitorStand:3355456,keyboard:3355456,keyboardKey:4473941,chairSeat:2899536,chairBack:3426654,chairBase:4473924,chairWheel:3355443,plant:5025616,plantDark:3706428,plantLight:6732650,pot:9133628,potRim:10515018,soil:4863264,bookshelf:8020808,bookshelfEdge:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498,35195,16635957],rug:6044974,rugPattern:8016448,rugBorder:4861472},Nv=[5227511,5025616,16750592,15022389,9315498,16771899],AD={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},Or={counter:4073251,counterTop:6111287,machine:3622735,machineTop:4545124,machineLight:5025616,cup:14142664,cupShadow:12364452,saucer:14735052,sink:7901340,faucet:11583173,menu:5125166},Xa={table:6111287,tableTop:7162945,tableEdge:5125166,tableLeg:4073251,chair:3622735,chairSeat:4545124,chairBack:5533306,carpet:2503224,carpetPattern:3030340,whiteboard:15527921,whiteboardFrame:7901340},uf={background:1713022,backgroundGlow:2635155,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592,statusCompleted:5025616},tu={floor:11579568,tile:11053224,grout:10066329,stripe:12632256},ra={floor:14477552,tile:12966120,tileGrout:11453652,wall:14740208,stall:11583173,stallDoor:9479342,sink:15527921,sinkBowl:16777215,mirror:11789820,mirrorFrame:7901340,toilet:16448250,toiletSeat:15658734,pipe:9479342},Sa={floor:6111287,carpet:5125166,carpetBorder:4073251,desk:4073251,deskTop:6111287,deskEdge:2890510,chair:1713022,chairSeat:2635155,window:8508666,windowFrame:5533306,windowSill:7901340,bookshelf:7162945,globe:4367861,nameplate:16766720},Jd={wall:7901340,wallHighlight:10795204,doorFrame:6111287},tr={floor:16115411,tile:15259072,tileGrout:13942952,counter:6111287,counterTop:7951688,fridge:15527921,fridgeDoor:14737632,fridgeHandle:10395294,table:9268835,tableTop:10586239,chair:7162945,coffeeMaker:3622735,coffeeMakerLight:5025616,lamp:16766287},Ea={floor:14142664,carpet:6323595,carpetBorder:4545124,sofa:5533306,sofaCushion:6323595,sofaArm:4545124,tv:2171169,tvScreen:2503224,tvStand:4342338,sideTable:7951688,magazine:15684432,magazineAlt:4367861},$o=480,$a=360,Qu=400,Pi=60,Ka=120,lx=120,JS=160,eE=120,tE=160,MD=64,RD=80,ND=ol+32,kD=Jc+48,nE=2,CC=10,Vo=80;function vy(t,e,n){const i=Math.max(0,Math.min(1,n));return t+(e-t)*i}function OD(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2}const DD=["nw","ne","sw","se"],zD={nw:"right",ne:"left",sw:"top",se:"top"};function y0(t){const e=CC,n=Math.max(1,t),i={nw:0,ne:0,sw:0,se:0},r=[];for(let Q=0;Q<n;Q++){const G=DD[Q%4];r.push({quadrant:G,slot:i[G]}),i[G]++}const s=Math.max(1,i.nw),l=Math.max(1,i.ne),c=Math.max(1,i.sw),d=Math.max(1,i.se),p=Math.max(Qu,Ka),m=s*($a+e),g=l*($a+e),b=Math.max(m+p,g+Ka),v=c*($a+e),S=d*($a+e),C=Math.max(JS,tE),T=Math.max(v+C+e,S+C+e),w=Math.max($o,Ka+e+Qu),k=Math.max($o,Ka),M=Math.max($o,lx),O=Math.max($o,eE),H=Math.max(w,M),z=Math.max(k,O),F=e+H+e+Pi+e+z+e,$=e+b+e+Pi+e+T+e,j={x:e+H+e,y:e,width:Pi,height:$-2*e},I={x:e,y:e+b+e,width:F-2*e,height:Pi},Y={x:j.x+j.width/2,y:I.y+I.height/2},X={x:j.x-e-Qu,y:I.y-e-Qu,width:Qu,height:Qu},ne={x:X.x-e-Ka,y:I.y-e-Ka,width:Ka,height:Ka},q={x:j.x+Pi+e,y:I.y-e-Ka,width:Ka,height:Ka},J={x:j.x-e-lx,y:I.y+Pi+e+c*($a+e),width:lx,height:JS},B={x:j.x+Pi+e,y:I.y+Pi+e+d*($a+e),width:eE,height:tE},V=[],Z={};for(let Q=0;Q<n;Q++){const{quadrant:G,slot:K}=r[Q],te=zD[G];let U;G==="nw"?U={x:j.x-e-$o,y:X.y-e-(K+1)*$a-K*e}:G==="ne"?U={x:j.x+Pi+e,y:q.y-e-(K+1)*$a-K*e}:G==="sw"?U={x:j.x-e-$o,y:I.y+Pi+e+K*($a+e)}:U={x:j.x+Pi+e,y:I.y+Pi+e+K*($a+e)},V.push({origin:U,width:$o,height:$a,quadrant:G,doorSide:te}),te==="right"||te==="left"?Z[`squad-${Q}`]={x:j.x+Pi/2,y:U.y+$a/2}:Z[`squad-${Q}`]={x:U.x+$o/2,y:I.y+Pi/2}}return Z.ceo={x:j.x+Pi/2,y:X.y+Qu/2},Z["bathroom-male"]={x:ne.x+Ka/2,y:I.y+Pi/2},Z["bathroom-female"]={x:q.x+Ka/2,y:I.y+Pi/2},Z.kitchen={x:j.x+Pi/2,y:J.y+J.height/2},Z["rest-area"]={x:j.x+Pi/2,y:B.y+B.height/2},{totalWidth:F,totalHeight:$,squadOrigins:V,ceoOffice:X,corridorH:I,corridorV:j,bathroomMale:ne,bathroomFemale:q,kitchen:J,restArea:B,doorPoints:Z,corridorHub:Y}}function Wd(t,e,n,i){const r=t%nE,s=Math.floor(t/nE);return{x:e.x+MD+r*ND,y:e.y+RD+s*kD}}function dm(t,e,n){return{x:t.x+e-80,y:t.y+n-80}}function AC(t,e,n){return{x:t.x+e-160,y:t.y+Math.floor(n/2)}}function BD(t,e){const n=e==="male"?t.bathroomMale:t.bathroomFemale;return{x:n.x+n.width/2,y:n.y+n.height/2}}function LD(t){return{x:t.kitchen.x+t.kitchen.width/2,y:t.kitchen.y+t.kitchen.height/2}}function UD(t){return{x:t.restArea.x+t.restArea.width/2,y:t.restArea.y+t.restArea.height/2}}function ID(t){const e=t.corridorV;if(e.height>0&&Math.random()<.5)return{x:e.x+10+Math.random()*Math.max(0,e.width-20),y:e.y+10+Math.random()*Math.max(0,e.height-20)};const n=t.corridorH;return{x:n.x+20+Math.random()*Math.max(0,n.width-40),y:n.y+10+Math.random()*Math.max(0,n.height-20)}}function iE(t,e){const n=e.corridorH;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function rE(t,e){const n=e.corridorV;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function HD(t,e){if(t==="ceo"){const i=e.ceoOffice;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="bathroom-male"){const i=e.bathroomMale;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="bathroom-female"){const i=e.bathroomFemale;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="kitchen"){const i=e.kitchen;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="rest-area"){const i=e.restArea;return{x:i.x+i.width/2,y:i.y+i.height/2}}const n=t.match(/^squad-(\d+)$/);if(n){const i=parseInt(n[1],10),r=e.squadOrigins[i];if(r)return{x:r.origin.x+r.width/2,y:r.origin.y+r.height/2}}return e.corridorHub}function hm(t,e,n,i){const r=i.doorPoints[e],s=i.doorPoints[n];if(!r||!s)return[t];const l=i.corridorHub,c=HD(n,i),d=iE(r,i)&&iE(s,i),p=rE(r,i)&&rE(s,i);return d||p?[t,r,s,c]:[t,r,l,s,c]}function _y(t,e){const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}const aE=500,sE=50;let lE=0;function oE(t){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[t]??"idle"}const ri=Sf(t=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(e,n,i)=>{const r=`${e}:${n}`;t(s=>{var d;let c=(((d=s.bubbles[r])==null?void 0:d.text)??"")+i;return c.length>aE&&(c=c.slice(c.length-aE)),{bubbles:{...s.bubbles,[r]:{text:c,updatedAt:Date.now()}}}})},clearBubble:(e,n)=>{const i=`${e}:${n}`;t(r=>{const{[i]:s,...l}=r.bubbles;return{bubbles:l}})},clearAllBubbles:()=>t({bubbles:{}}),addActivity:(e,n,i)=>{const s={id:++lE,agentName:n,action:i,timestamp:Date.now()};t(l=>{var m;const d=[...((m=l.activityLog[e])==null?void 0:m.entries)??[],s],p=d.length>sE?d.slice(d.length-sE):d;return{activityLog:{...l.activityLog,[e]:{entries:p}}}})},setCheckpoint:(e,n,i,r)=>t(s=>({checkpoints:{...s.checkpoints,[e]:{agentId:n,agentName:i,question:r}}})),clearCheckpoint:e=>t(n=>{const{[e]:i,...r}=n.checkpoints;return{checkpoints:r}}),setActiveRoom:e=>t({activeRoom:e}),syncRooms:e=>t(n=>{const i=e;let r;return i.length===0?r=null:n.activeRoom===null||!i.includes(n.activeRoom)?r=i[0]:r=n.activeRoom,{rooms:i,activeRoom:r}}),setAgents:(e,n)=>t(i=>{const r=i.agentVisuals[e]??[],s=new Map(r.map(v=>[v.id,v])),l={x:0,y:0},c=y0(i.rooms.length),d=i.rooms.indexOf(e),p=c.squadOrigins[d],m=(p==null?void 0:p.width)??480,g=(p==null?void 0:p.height)??360,b=n.map((v,S)=>{const C=s.get(v.id);if(C){const k=v.status?oE(v.status):C.status,M=k!==C.status;let O=C.targetPosition;return M&&(k==="working"||k==="checkpoint"?O=Wd(S,l):O=dm(l,m,g)),{...C,name:v.name,deskIndex:S,status:k,targetPosition:O}}const T=v.status?oE(v.status):"idle",w=T==="working"||T==="checkpoint"?Wd(S,l):dm(l,m,g);return{id:v.id,name:v.name,colorIndex:S%6,status:T,deskIndex:S,position:w,targetPosition:null}});return{agentVisuals:{...i.agentVisuals,[e]:b}}}),setAgentStatus:(e,n,i)=>t(r=>{const s=r.agentVisuals[e];if(!s)return r;const l={x:0,y:0},c=y0(r.rooms.length),d=r.rooms.indexOf(e),p=c.squadOrigins[d],m=(p==null?void 0:p.width)??480,g=(p==null?void 0:p.height)??360,b=s.map(v=>{if(v.id!==n)return v;let S;return i==="working"||i==="checkpoint"?S=Wd(v.deskIndex,l):S=dm(l,m,g),{...v,status:i,targetPosition:S}});return{agentVisuals:{...r.agentVisuals,[e]:b}}}),reset:()=>{lE=0,t({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}})),E$={background:"#0a0a0f",grid:"rgba(0, 200, 255, 0.06)",orbStandby:"#1a3a5c",orbListening:"#00c8ff",orbProcessing:"#ff8c00",orbSpeaking:"#00ff88",panelBg:"rgba(0, 200, 255, 0.08)",panelBorder:"rgba(0, 200, 255, 0.25)",textPrimary:"#e0e8f0",textAccent:"#00c8ff",textJarvis:"#00ff88",particleStart:"#00c8ff"},jD={orbRadius:60,orbRingWidth:3,gridSpacing:40,particleCount:65,particleMinRadius:1,particleMaxRadius:3,waveformBars:32,waveformMaxHeight:40,panelWidth:180,panelPadding:12,transcriptLineHeight:20,standbyTimeoutMs:15e3,ttsSplitLength:300};let MC=0;function PD(){return`jarvis-${Date.now()}-${++MC}`}let no=null;const ox=Sf((t,e)=>({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:"",setMode:n=>t({mode:n}),addMessage:(n,i)=>{const r={id:PD(),role:n,content:i,createdAt:new Date().toISOString()};t(s=>({messages:[...s.messages,r]}))},appendChunk:n=>{t(i=>({streamingText:i.streamingText+n}))},finalizeMessage:n=>{const{streamingText:i}=e(),r={id:n,role:"assistant",content:i,createdAt:new Date().toISOString()};t(s=>({messages:[...s.messages,r],streamingText:""}))},selectSquad:n=>t({selectedSquad:n}),setUserName:n=>t({userName:n}),startStandbyTimer:()=>{no&&clearTimeout(no),no=setTimeout(()=>{t({mode:"STANDBY"}),no=null},jD.standbyTimeoutMs)},resetStandbyTimer:()=>{e().startStandbyTimer()},clearStandbyTimer:()=>{no&&(clearTimeout(no),no=null)},reset:()=>{no&&(clearTimeout(no),no=null),MC=0,t({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:""})}})),lo=Sf((t,e)=>({jobs:[],loading:!1,fetchJobs:async()=>{t({loading:!0});try{const n=await fetch("/api/scheduler",{credentials:"include"});if(n.ok){const i=await n.json();t({jobs:i.data,loading:!1})}else t({loading:!1})}catch{t({loading:!1})}},pauseJob:async n=>{await fetch(`/api/scheduler/${n}/pause`,{method:"POST",credentials:"include"}),e().fetchJobs()},resumeJob:async n=>{await fetch(`/api/scheduler/${n}/resume`,{method:"POST",credentials:"include"}),e().fetchJobs()},triggerJob:async n=>{await fetch(`/api/scheduler/${n}/trigger`,{method:"POST",credentials:"include"})},updateJobStatus:(n,i)=>{t(r=>({jobs:r.jobs.map(s=>s.squad_name===n?{...s,status:i}:s)}))}})),GD=[{to:"/office",label:"Office",icon:"⬡"},{to:"/chat",label:"Chat",icon:"◈"},{to:"/kanban",label:"Kanban",icon:"▦"},{to:"/scheduler",label:"Scheduler",icon:"⏣"},{to:"/email",label:"Email",icon:"✉"},{to:"/orgchart",label:"Org Chart",icon:"◎"},{to:"/graph",label:"Graph",icon:"◇"},{to:"/settings",label:"Settings",icon:"⚙"}];function FD(){const t=dl(U=>U.user),e=dl(U=>U.isAuthenticated),n=dl(U=>U.loading),i=dl(U=>U.logout),r=dl(U=>U.checkAuth),s=q0(),l=xl(),c=l.pathname==="/office"||l.pathname==="/",d=l.pathname==="/jarvis",p=Ta(U=>U.squads),m=Ta(U=>U.selectedSquad),g=Ta(U=>m?U.activeStates[m]:null),b=Ta(U=>U.fetchSquads),v=Ta(U=>U.selectSquad),S=Ta(U=>U.setSquadState),C=Ta(U=>U.clearSquadState),T=P.useCallback((U,le)=>{S(U,le);const de=ri.getState();de.rooms.includes(U)||de.syncRooms([...de.rooms,U]),le.status!=="checkpoint"&&de.clearCheckpoint(U),le.agents&&de.setAgents(U,le.agents.map(ge=>({id:ge.id,name:ge.name,status:ge.status})))},[S]),w=P.useCallback(U=>{C(U);const le=ri.getState(),de=le.agentVisuals[U];if(de)for(const ge of de)le.setAgentStatus(U,ge.id,"idle")},[C]),k=P.useCallback((U,le)=>{nr.setState(de=>({conversationId:le,messages:[],conversations:[{id:le,createdAt:new Date().toISOString(),preview:""},...de.conversations.filter(ge=>ge.id!==le)]}))},[]),M=P.useCallback((U,le,de)=>{if(U==="_jarvis"){ox.getState().appendChunk(de);return}const ge=nr.getState();ge.streaming||ge.startStreaming(),ge.appendChunk(de)},[]),O=P.useCallback((U,le,de)=>{if(U==="_jarvis"){ox.getState().finalizeMessage(de);return}nr.getState().finishStreaming(de)},[]),H=P.useCallback((U,le)=>{if(U==="_jarvis"){ox.getState().setMode("LISTENING");return}nr.getState().setError(le)},[]),z=P.useCallback((U,le,de)=>{U!=="_jarvis"&&nr.getState().setActivity(`${le}${de?" "+de:""}`)},[]),F=P.useCallback((U,le,de,ge,se)=>{nr.getState().addAgentDm({agentId:de,agentName:ge,content:se})},[]),$=P.useCallback((U,le,de,ge)=>{ri.getState().appendBubble(U,le,ge)},[]),j=P.useCallback((U,le,de,ge,se)=>{ri.getState().addActivity(U,de,`started "${se}"`),ri.getState().setAgentStatus(U,le,"working")},[]),I=P.useCallback((U,le,de,ge,se)=>{ri.getState().addActivity(U,de,`completed "${se}"`),ri.getState().setAgentStatus(U,le,"idle")},[]),Y=P.useCallback((U,le,de,ge)=>{ri.getState().setCheckpoint(U,le,de,ge),ri.getState().setAgentStatus(U,le,"checkpoint")},[]),X=P.useCallback(()=>{ri.getState().clearAllBubbles()},[]),ne=P.useCallback((U,le,de)=>{lo.getState().fetchJobs()},[]),q=P.useCallback((U,le,de,ge)=>{lo.getState().fetchJobs()},[]),J=P.useCallback((U,le,de,ge,se)=>{lo.getState().fetchJobs()},[]),B=P.useCallback((U,le)=>{lo.getState().updateJobStatus(U,le)},[]),{subscribe:V,unsubscribe:Z,sendChat:Q,newConversation:G,sendCheckpointResponse:K}=hD({onSquadState:T,onSquadInactive:w,onChatConversationCreated:k,onChatChunk:M,onChatActivity:z,onChatDone:O,onChatError:H,onChatAgentDm:F,onAgentOutputChunk:$,onAgentStepStart:j,onAgentStepComplete:I,onSquadCheckpoint:Y,onReconnect:X,onScheduleStarted:ne,onScheduleDone:q,onScheduleError:J,onScheduleStatusChanged:B});P.useEffect(()=>{_D(Q)},[Q]),P.useEffect(()=>{ED(G)},[G]),P.useEffect(()=>{TD(K)},[K]),P.useEffect(()=>{b().then(()=>{const{squads:U}=Ta.getState();if(U.length>0){const le=ri.getState(),de=U.map(pe=>pe.code),ge=le.rooms,se=[...new Set([...ge,...de])];le.syncRooms(se);for(const pe of U)!le.agentVisuals[pe.code]&&pe.agents&&pe.agents.length>0&&le.setAgents(pe.code,pe.agents.map(Ae=>({id:Ae.id,name:Ae.name,status:"idle"})))}})},[b]);const te=ri(U=>U.rooms);return P.useEffect(()=>{for(const U of te)V(U);return()=>{for(const U of te)Z(U)}},[te,V,Z]),P.useEffect(()=>(V("_expxagents"),()=>Z("_expxagents")),[V,Z]),P.useEffect(()=>{if(d)return V("_jarvis"),()=>Z("_jarvis")},[d,V,Z]),P.useEffect(()=>{e||r()},[]),P.useEffect(()=>{!n&&!e&&s("/login",{state:{from:l.pathname}})},[n,e,s,l.pathname]),d?N.jsx(KS,{}):N.jsxs("div",{className:"noise-bg",style:{display:"flex",flexDirection:"column",height:"100vh",background:"var(--surface-0)",color:"var(--text-primary)"},children:[N.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--header-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderBottom:"1px solid var(--border-subtle)",position:"relative",zIndex:10},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[N.jsx("div",{style:{width:28,height:28,borderRadius:"var(--radius-sm)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.8rem",fontWeight:700,color:"var(--text-inverse)",boxShadow:"0 0 12px var(--accent-glow-strong)"},children:"EX"}),N.jsx("span",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",letterSpacing:"-0.02em"},children:"ExpxAgents"}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.05em"},children:"MISSION CONTROL"})]}),N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-4)"},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:[N.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--status-active)",boxShadow:"0 0 8px var(--status-active-glow)",animation:"statusPulse 2s ease-in-out infinite"}}),N.jsx("span",{children:t==null?void 0:t.username})]}),N.jsx("button",{onClick:i,className:"btn-ghost",style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-display)",fontSize:"0.75rem",padding:"4px 8px",borderRadius:"var(--radius-xs)",transition:"color var(--duration-fast) var(--ease-out)"},onMouseEnter:U=>U.currentTarget.style.color="var(--status-error)",onMouseLeave:U=>U.currentTarget.style.color="var(--text-muted)",children:"Logout"})]})]}),N.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[N.jsxs("aside",{style:{width:"var(--sidebar-width)",background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!c&&N.jsxs(N.Fragment,{children:[N.jsx(bD,{squads:p,selectedSquad:m,onSelect:v}),N.jsx("div",{style:{height:1,margin:"0 var(--sp-3)",background:"var(--border-subtle)"}})]}),N.jsxs("nav",{style:{padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-1)",flex:1},children:[N.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-1)"},children:"Navigation"}),GD.map(U=>N.jsxs(wC,{to:U.to,style:({isActive:le})=>({display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:le?600:400,color:le?"var(--accent)":"var(--text-secondary)",background:le?"var(--accent-glow)":"transparent",border:le?"1px solid rgba(0, 200, 255, 0.12)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"}),children:[N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:U.icon}),U.label]},U.to)),N.jsx("div",{style:{height:1,margin:"var(--sp-2) var(--sp-2)",background:"var(--border-subtle)"}}),N.jsxs("a",{href:"/jarvis",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:500,color:"var(--status-active)",background:"var(--status-active-glow)",border:"1px solid rgba(0, 230, 138, 0.12)",transition:"all var(--duration-fast) var(--ease-out)"},children:[N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"◉"}),"Jarvis",N.jsx("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"})]})]}),N.jsxs("div",{style:{padding:"var(--sp-3)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",justifyContent:"space-between"},children:[N.jsxs("span",{children:[p.length," squad",p.length!==1?"s":""]}),N.jsx("span",{children:"v0.1.0"})]})]}),N.jsx("main",{className:"grid-bg",style:{flex:1,overflow:"auto",position:"relative"},children:N.jsx(KS,{})})]}),N.jsx(vD,{state:g})]})}function qD(){var b;const[t,e]=P.useState(""),[n,i]=P.useState(""),r=dl(v=>v.login),s=dl(v=>v.loading),l=dl(v=>v.error),c=dl(v=>v.isAuthenticated),d=q0(),m=((b=xl().state)==null?void 0:b.from)||"/";P.useEffect(()=>{c&&d(m,{replace:!0})},[c,d,m]);const g=v=>{v.preventDefault(),r(t,n)};return N.jsx("div",{className:"noise-bg grid-bg",style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"var(--surface-0)"},children:N.jsxs("div",{style:{animation:"fadeInUp 0.6s var(--ease-out) both",width:360},children:[N.jsxs("div",{style:{textAlign:"center",marginBottom:"var(--sp-8)"},children:[N.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:"var(--radius-md)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",fontSize:"1.1rem",fontWeight:800,color:"var(--text-inverse)",boxShadow:"var(--shadow-glow-strong)",marginBottom:"var(--sp-4)"},children:"EX"}),N.jsx("h1",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.4rem",color:"var(--text-primary)",letterSpacing:"-0.02em",marginBottom:"var(--sp-1)"},children:"ExpxAgents"}),N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.15em"},children:"Mission Control"})]}),N.jsxs("form",{onSubmit:g,className:"glass",style:{padding:"var(--sp-6)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-lg)"},children:[l&&N.jsx("div",{style:{padding:"var(--sp-2) var(--sp-3)",marginBottom:"var(--sp-4)",borderRadius:"var(--radius-sm)",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",fontSize:"0.8rem",fontFamily:"var(--font-mono)"},children:l}),N.jsxs("div",{style:{marginBottom:"var(--sp-3)"},children:[N.jsx("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Username"}),N.jsx("input",{type:"text",className:"input",placeholder:"Enter username",value:t,onChange:v=>e(v.target.value),autoFocus:!0})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Password"}),N.jsx("input",{type:"password",className:"input",placeholder:"Enter password",value:n,onChange:v=>i(v.target.value)})]}),N.jsx("button",{type:"submit",disabled:s,className:"btn btn-accent",style:{width:"100%",padding:"var(--sp-3)",fontSize:"0.85rem",cursor:s?"wait":"pointer",opacity:s?.7:1},children:s?"Authenticating...":"Access Mission Control"})]}),N.jsx("p",{style:{textAlign:"center",marginTop:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:"AI Squad Orchestration Platform"})]})})}function RC(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const r=RC(i,e,n);if(r)return r;i=i.sibling}}function NC(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const L_=NC(P.createContext(null));let kC=class extends P.Component{render(){return P.createElement(L_.Provider,{value:this._reactInternals},this.props.children)}};function YD(){const t=P.useContext(L_);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=P.useId();return P.useMemo(()=>{for(const n of[t,t==null?void 0:t.alternate]){if(!n)continue;const i=RC(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}const VD=Symbol.for("react.context"),XD=t=>t!==null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===VD;function KD(){const t=YD(),[e]=P.useState(()=>new Map);e.clear();let n=t;for(;n;){const i=n.type;XD(i)&&i!==L_&&!e.has(i)&&e.set(i,P.use(NC(i))),n=n.return}return e}function WD(){const t=KD();return P.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>P.createElement(e,null,P.createElement(n.Provider,{...i,value:t.get(n)})),e=>P.createElement(kC,{...e})),[t])}var Rt=(t=>(t.Application="application",t.WebGLPipes="webgl-pipes",t.WebGLPipesAdaptor="webgl-pipes-adaptor",t.WebGLSystem="webgl-system",t.WebGPUPipes="webgpu-pipes",t.WebGPUPipesAdaptor="webgpu-pipes-adaptor",t.WebGPUSystem="webgpu-system",t.CanvasSystem="canvas-system",t.CanvasPipesAdaptor="canvas-pipes-adaptor",t.CanvasPipes="canvas-pipes",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t.MaskEffect="mask-effect",t.BlendMode="blend-mode",t.TextureSource="texture-source",t.Environment="environment",t.ShapeBuilder="shape-builder",t.Batcher="batcher",t))(Rt||{});const kv=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},Sy=(t,e)=>kv(t).priority??e,si={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(kv).forEach(e=>{e.type.forEach(n=>{var i,r;return(r=(i=this._removeHandlers)[n])==null?void 0:r.call(i,e)})}),this},add(...t){return t.map(kv).forEach(e=>{e.type.forEach(n=>{var s,l;const i=this._addHandlers,r=this._queue;i[n]?(l=i[n])==null||l.call(i,e):(r[n]=r[n]||[],(s=r[n])==null||s.push(e))})}),this},handle(t,e,n){var l;const i=this._addHandlers,r=this._removeHandlers;if(i[t]||r[t])throw new Error(`Extension type ${t} already has a handler`);i[t]=e,r[t]=n;const s=this._queue;return s[t]&&((l=s[t])==null||l.forEach(c=>e(c)),delete s[t]),this},handleByMap(t,e){return this.handle(t,n=>{n.name&&(e[n.name]=n.ref)},n=>{n.name&&delete e[n.name]})},handleByNamedList(t,e,n=-1){return this.handle(t,i=>{e.findIndex(s=>s.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((s,l)=>Sy(l.value,n)-Sy(s.value,n)))},i=>{const r=e.findIndex(s=>s.name===i.name);r!==-1&&e.splice(r,1)})},handleByList(t,e,n=-1){return this.handle(t,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((r,s)=>Sy(s,n)-Sy(r,n)))},i=>{const r=e.indexOf(i.ref);r!==-1&&e.splice(r,1)})},mixin(t,...e){for(const n of e)Object.defineProperties(t.prototype,Object.getOwnPropertyDescriptors(n))}},$D={extension:{type:Rt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Kd(()=>import("./browserAll-D5H10uru.js"),__vite__mapDeps([0,1]))}},ZD={extension:{type:Rt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Kd(()=>import("./webworkerAll-BuXYXspl.js"),[])}};class yr{constructor(e,n,i){this._x=n||0,this._y=i||0,this._observer=e}clone(e){return new yr(e??this._observer,this._x,this._y)}set(e=0,n=e){return(this._x!==e||this._y!==n)&&(this._x=e,this._y=n,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}var cx={exports:{}},cE;function QD(){return cE||(cE=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function r(d,p,m){this.fn=d,this.context=p,this.once=m||!1}function s(d,p,m,g,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new r(m,g||d,b),S=n?n+p:p;return d._events[S]?d._events[S].fn?d._events[S]=[d._events[S],v]:d._events[S].push(v):(d._events[S]=v,d._eventsCount++),d}function l(d,p){--d._eventsCount===0?d._events=new i:delete d._events[p]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var p=[],m,g;if(this._eventsCount===0)return p;for(g in m=this._events)e.call(m,g)&&p.push(n?g.slice(1):g);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(m)):p},c.prototype.listeners=function(p){var m=n?n+p:p,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,S=new Array(v);b<v;b++)S[b]=g[b].fn;return S},c.prototype.listenerCount=function(p){var m=n?n+p:p,g=this._events[m];return g?g.fn?1:g.length:0},c.prototype.emit=function(p,m,g,b,v,S){var C=n?n+p:p;if(!this._events[C])return!1;var T=this._events[C],w=arguments.length,k,M;if(T.fn){switch(T.once&&this.removeListener(p,T.fn,void 0,!0),w){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,m),!0;case 3:return T.fn.call(T.context,m,g),!0;case 4:return T.fn.call(T.context,m,g,b),!0;case 5:return T.fn.call(T.context,m,g,b,v),!0;case 6:return T.fn.call(T.context,m,g,b,v,S),!0}for(M=1,k=new Array(w-1);M<w;M++)k[M-1]=arguments[M];T.fn.apply(T.context,k)}else{var O=T.length,H;for(M=0;M<O;M++)switch(T[M].once&&this.removeListener(p,T[M].fn,void 0,!0),w){case 1:T[M].fn.call(T[M].context);break;case 2:T[M].fn.call(T[M].context,m);break;case 3:T[M].fn.call(T[M].context,m,g);break;case 4:T[M].fn.call(T[M].context,m,g,b);break;default:if(!k)for(H=1,k=new Array(w-1);H<w;H++)k[H-1]=arguments[H];T[M].fn.apply(T[M].context,k)}}return!0},c.prototype.on=function(p,m,g){return s(this,p,m,g,!1)},c.prototype.once=function(p,m,g){return s(this,p,m,g,!0)},c.prototype.removeListener=function(p,m,g,b){var v=n?n+p:p;if(!this._events[v])return this;if(!m)return l(this,v),this;var S=this._events[v];if(S.fn)S.fn===m&&(!b||S.once)&&(!g||S.context===g)&&l(this,v);else{for(var C=0,T=[],w=S.length;C<w;C++)(S[C].fn!==m||b&&!S[C].once||g&&S[C].context!==g)&&T.push(S[C]);T.length?this._events[v]=T.length===1?T[0]:T:l(this,v)}return this},c.prototype.removeAllListeners=function(p){var m;return p?(m=n?n+p:p,this._events[m]&&l(this,m)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,t.exports=c})(cx)),cx.exports}var JD=QD();const ho=lu(JD),e4=Math.PI*2,t4=180/Math.PI,n4=Math.PI/180;class Dr{constructor(e=0,n=0){this.x=0,this.y=0,this.x=e,this.y=n}clone(){return new Dr(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,n=e){return this.x=e,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return ux.x=0,ux.y=0,ux}}const ux=new Dr;class jt{constructor(e=1,n=0,i=0,r=1,s=0,l=0){this.array=null,this.a=e,this.b=n,this.c=i,this.d=r,this.tx=s,this.ty=l}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,n,i,r,s,l){return this.a=e,this.b=n,this.c=i,this.d=r,this.tx=s,this.ty=l,this}toArray(e,n){this.array||(this.array=new Float32Array(9));const i=n||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,n){n=n||new Dr;const i=e.x,r=e.y;return n.x=this.a*i+this.c*r+this.tx,n.y=this.b*i+this.d*r+this.ty,n}applyInverse(e,n){n=n||new Dr;const i=this.a,r=this.b,s=this.c,l=this.d,c=this.tx,d=this.ty,p=1/(i*l+s*-r),m=e.x,g=e.y;return n.x=l*p*m+-s*p*g+(d*s-c*l)*p,n.y=i*p*g+-r*p*m+(-d*i+c*r)*p,n}translate(e,n){return this.tx+=e,this.ty+=n,this}scale(e,n){return this.a*=e,this.d*=n,this.c*=e,this.b*=n,this.tx*=e,this.ty*=n,this}rotate(e){const n=Math.cos(e),i=Math.sin(e),r=this.a,s=this.c,l=this.tx;return this.a=r*n-this.b*i,this.b=r*i+this.b*n,this.c=s*n-this.d*i,this.d=s*i+this.d*n,this.tx=l*n-this.ty*i,this.ty=l*i+this.ty*n,this}append(e){const n=this.a,i=this.b,r=this.c,s=this.d;return this.a=e.a*n+e.b*r,this.b=e.a*i+e.b*s,this.c=e.c*n+e.d*r,this.d=e.c*i+e.d*s,this.tx=e.tx*n+e.ty*r+this.tx,this.ty=e.tx*i+e.ty*s+this.ty,this}appendFrom(e,n){const i=e.a,r=e.b,s=e.c,l=e.d,c=e.tx,d=e.ty,p=n.a,m=n.b,g=n.c,b=n.d;return this.a=i*p+r*g,this.b=i*m+r*b,this.c=s*p+l*g,this.d=s*m+l*b,this.tx=c*p+d*g+n.tx,this.ty=c*m+d*b+n.ty,this}setTransform(e,n,i,r,s,l,c,d,p){return this.a=Math.cos(c+p)*s,this.b=Math.sin(c+p)*s,this.c=-Math.sin(c-d)*l,this.d=Math.cos(c-d)*l,this.tx=e-(i*this.a+r*this.c),this.ty=n-(i*this.b+r*this.d),this}prepend(e){const n=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,r=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=n*e.a+this.ty*e.c+e.tx,this.ty=n*e.b+this.ty*e.d+e.ty,this}decompose(e){const n=this.a,i=this.b,r=this.c,s=this.d,l=e.pivot,c=-Math.atan2(-r,s),d=Math.atan2(i,n),p=Math.abs(c+d);return p<1e-5||Math.abs(e4-p)<1e-5?(e.rotation=d,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=c,e.skew.y=d),e.scale.x=Math.sqrt(n*n+i*i),e.scale.y=Math.sqrt(r*r+s*s),e.position.x=this.tx+(l.x*n+l.y*r),e.position.y=this.ty+(l.x*i+l.y*s),e}invert(){const e=this.a,n=this.b,i=this.c,r=this.d,s=this.tx,l=e*r-n*i;return this.a=r/l,this.b=-n/l,this.c=-i/l,this.d=e/l,this.tx=(i*this.ty-r*s)/l,this.ty=-(e*this.ty-n*s)/l,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new jt;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}equals(e){return e.a===this.a&&e.b===this.b&&e.c===this.c&&e.d===this.d&&e.tx===this.tx&&e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return r4.identity()}static get shared(){return i4.identity()}}const i4=new jt,r4=new jt,nf=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],rf=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],af=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],sf=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ov=[],OC=[],Ey=Math.sign;function a4(){for(let t=0;t<16;t++){const e=[];Ov.push(e);for(let n=0;n<16;n++){const i=Ey(nf[t]*nf[n]+af[t]*rf[n]),r=Ey(rf[t]*nf[n]+sf[t]*rf[n]),s=Ey(nf[t]*af[n]+af[t]*sf[n]),l=Ey(rf[t]*af[n]+sf[t]*sf[n]);for(let c=0;c<16;c++)if(nf[c]===i&&rf[c]===r&&af[c]===s&&sf[c]===l){e.push(c);break}}}for(let t=0;t<16;t++){const e=new jt;e.set(nf[t],rf[t],af[t],sf[t],0,0),OC.push(e)}}a4();const On={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>nf[t],uY:t=>rf[t],vX:t=>af[t],vY:t=>sf[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>Ov[t][e],sub:(t,e)=>Ov[t][On.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?On.S:On.N:Math.abs(e)*2<=Math.abs(t)?t>0?On.E:On.W:e>0?t>0?On.SE:On.SW:t>0?On.NE:On.NW,matrixAppendRotationInv:(t,e,n=0,i=0,r=0,s=0)=>{const l=OC[On.inv(e)],c=l.a,d=l.b,p=l.c,m=l.d,g=n-Math.min(0,c*r,p*s,c*r+p*s),b=i-Math.min(0,d*r,m*s,d*r+m*s),v=t.a,S=t.b,C=t.c,T=t.d;t.a=c*v+d*C,t.b=c*S+d*T,t.c=p*v+m*C,t.d=p*S+m*T,t.tx=g*v+b*C+t.tx,t.ty=g*S+b*T+t.ty},transformRectCoords:(t,e,n,i)=>{const{x:r,y:s,width:l,height:c}=t,{x:d,y:p,width:m,height:g}=e;return n===On.E?(i.set(r+d,s+p,l,c),i):n===On.S?i.set(m-s-c+d,r+p,c,l):n===On.W?i.set(m-r-l+d,g-s-c+p,l,c):n===On.N?i.set(s+d,g-r-l+p,c,l):i.set(r+d,s+p,l,c)}},wy=[new Dr,new Dr,new Dr,new Dr];class Ei{constructor(e=0,n=0,i=0,r=0){this.type="rectangle",this.x=Number(e),this.y=Number(n),this.width=Number(i),this.height=Number(r)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Ei(0,0,0,0)}clone(){return new Ei(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(e,n,i,r=.5){const{width:s,height:l}=this;if(s<=0||l<=0)return!1;const c=this.x,d=this.y,p=i*(1-r),m=i-p,g=c-p,b=c+s+p,v=d-p,S=d+l+p,C=c+m,T=c+s-m,w=d+m,k=d+l-m;return e>=g&&e<=b&&n>=v&&n<=S&&!(e>C&&e<T&&n>w&&n<k)}intersects(e,n){if(!n){const $=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=$)return!1;const I=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>I}const i=this.left,r=this.right,s=this.top,l=this.bottom;if(r<=i||l<=s)return!1;const c=wy[0].set(e.left,e.top),d=wy[1].set(e.left,e.bottom),p=wy[2].set(e.right,e.top),m=wy[3].set(e.right,e.bottom);if(p.x<=c.x||d.y<=c.y)return!1;const g=Math.sign(n.a*n.d-n.b*n.c);if(g===0||(n.apply(c,c),n.apply(d,d),n.apply(p,p),n.apply(m,m),Math.max(c.x,d.x,p.x,m.x)<=i||Math.min(c.x,d.x,p.x,m.x)>=r||Math.max(c.y,d.y,p.y,m.y)<=s||Math.min(c.y,d.y,p.y,m.y)>=l))return!1;const b=g*(d.y-c.y),v=g*(c.x-d.x),S=b*i+v*s,C=b*r+v*s,T=b*i+v*l,w=b*r+v*l;if(Math.max(S,C,T,w)<=b*c.x+v*c.y||Math.min(S,C,T,w)>=b*m.x+v*m.y)return!1;const k=g*(c.y-p.y),M=g*(p.x-c.x),O=k*i+M*s,H=k*r+M*s,z=k*i+M*l,F=k*r+M*l;return!(Math.max(O,H,z,F)<=k*c.x+M*c.y||Math.min(O,H,z,F)>=k*m.x+M*m.y)}pad(e=0,n=e){return this.x-=e,this.y-=n,this.width+=e*2,this.height+=n*2,this}fit(e){const n=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return this.x=n,this.width=Math.max(i-n,0),this.y=r,this.height=Math.max(s-r,0),this}ceil(e=1,n=.001){const i=Math.ceil((this.x+this.width-n)*e)/e,r=Math.ceil((this.y+this.height-n)*e)/e;return this.x=Math.floor((this.x+n)*e)/e,this.y=Math.floor((this.y+n)*e)/e,this.width=i-this.x,this.height=r-this.y,this}scale(e,n=e){return this.x*=e,this.y*=n,this.width*=e,this.height*=n,this}enlarge(e){const n=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);return this.x=n,this.width=i-n,this.y=r,this.height=s-r,this}getBounds(e){return e||(e=new Ei),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const n=e.x,i=e.y,r=e.x+e.width,s=e.y+e.height;return n>=this.x&&n<this.x+this.width&&i>=this.y&&i<this.y+this.height&&r>=this.x&&r<this.x+this.width&&s>=this.y&&s<this.y+this.height}set(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const fx={default:-1};function gi(t="default"){return fx[t]===void 0&&(fx[t]=-1),++fx[t]}const uE=new Set,mi="8.0.0",s4="8.3.4",Gd={quiet:!1,noColor:!1},Qt=((t,e,n=3)=>{if(Gd.quiet||uE.has(e))return;let i=new Error().stack;const r=`${e}
|
|
62
|
+
Deprecated since v${t}`,s=typeof console.groupCollapsed=="function"&&!Gd.noColor;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",r):(i=i.split(`
|
|
63
|
+
`).splice(n).join(`
|
|
64
|
+
`),s?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",r),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",r),console.warn(i))),uE.add(e)});Object.defineProperties(Qt,{quiet:{get:()=>Gd.quiet,set:t=>{Gd.quiet=t},enumerable:!0,configurable:!1},noColor:{get:()=>Gd.noColor,set:t=>{Gd.noColor=t},enumerable:!0,configurable:!1}});const DC=()=>{};function eh(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function fE(t){return!(t&t-1)&&!!t}function zC(t){const e={};for(const n in t)t[n]!==void 0&&(e[n]=t[n]);return e}const dE=Object.create(null);function l4(t){const e=dE[t];return e===void 0&&(dE[t]=gi("resource")),e}const BC=class LC extends ho{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...LC.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(e){this.addressModeU=e,this.addressModeV=e,this.addressModeW=e}get addressMode(){return this.addressModeU}set wrapMode(e){Qt(mi,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=e}get wrapMode(){return this.addressMode}set scaleMode(e){this.magFilter=e,this.minFilter=e,this.mipmapFilter=e}get scaleMode(){return this.magFilter}set maxAnisotropy(e){this._maxAnisotropy=Math.min(e,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=l4(e),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};BC.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let th=BC;const UC=class IC extends ho{constructor(e={}){super(),this.options=e,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=gi("textureSource"),this._resourceType="textureSource",this._resourceId=gi("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...IC.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.viewDimension=e.viewDimension??e.dimensions,this.arrayLayerCount=e.arrayLayerCount,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleCount,this.antialias=e.antialias,this.alphaMode=e.alphaMode,this.style=new th(zC(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(e){var n,i;this.style!==e&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=e,(i=this._style)==null||i.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(e){this._style.maxAnisotropy=e}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(e){this._style.addressMode=e}get repeatMode(){return this._style.addressMode}set repeatMode(e){this._style.addressMode=e}get magFilter(){return this._style.magFilter}set magFilter(e){this._style.magFilter=e}get minFilter(){return this._style.minFilter}set minFilter(e){this._style.minFilter=e}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(e){this._style.mipmapFilter=e}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(e){this._style.lodMinClamp=e}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(e){this._style.lodMaxClamp=e}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const e=this._resolution;if(this.resize(this.resourceWidth/e,this.resourceHeight/e))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var e,n;this._resourceId=gi("resource"),this.emit("change",this),this.emit("unload",this);for(const i in this._gpuData)(n=(e=this._gpuData[i])==null?void 0:e.destroy)==null||n.call(e);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:e}=this;return e.naturalWidth||e.videoWidth||e.displayWidth||e.width}get resourceHeight(){const{resource:e}=this;return e.naturalHeight||e.videoHeight||e.displayHeight||e.height}get resolution(){return this._resolution}set resolution(e){this._resolution!==e&&(this._resolution=e,this.width=this.pixelWidth/e,this.height=this.pixelHeight/e)}resize(e,n,i){i||(i=this._resolution),e||(e=this.width),n||(n=this.height);const r=Math.round(e*i),s=Math.round(n*i);return this.width=r/i,this.height=s/i,this._resolution=i,this.pixelWidth===r&&this.pixelHeight===s?!1:(this._refreshPOT(),this.pixelWidth=r,this.pixelHeight=s,this.emit("resize",this),this._resourceId=gi("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(e){this._style.wrapMode=e}get wrapMode(){return this._style.wrapMode}set scaleMode(e){this._style.scaleMode=e}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=fE(this.pixelWidth)&&fE(this.pixelHeight)}static test(e){throw new Error("Unimplemented")}};UC.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let zs=UC;class U_ extends zs{constructor(e){const n=e.resource||new Float32Array(e.width*e.height*4);let i=e.format;i||(n instanceof Float32Array?i="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?i="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?i="rgba16uint":(n instanceof Int8Array,i="bgra8unorm")),super({...e,resource:n,format:i}),this.uploadMethodId="buffer"}static test(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}U_.extension=Rt.TextureSource;const hE=new jt;class o4{constructor(e,n){this.mapCoord=new jt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof n>"u"?this.clampMargin=e.width<10?0:.5:this.clampMargin=n,this.isSimple=!1,this.texture=e}get texture(){return this._texture}set texture(e){var n;this.texture!==e&&((n=this._texture)==null||n.removeListener("update",this.update,this),this._texture=e,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(e,n){n===void 0&&(n=e);const i=this.mapCoord;for(let r=0;r<e.length;r+=2){const s=e[r],l=e[r+1];n[r]=s*i.a+l*i.c+i.tx,n[r+1]=s*i.b+l*i.d+i.ty}return n}update(){const e=this._texture;this._updateID++;const n=e.uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=e.orig,r=e.trim;r&&(hE.set(i.width/r.width,0,0,i.height/r.height,-r.x/r.width,-r.y/r.height),this.mapCoord.append(hE));const s=e.source,l=this.uClampFrame,c=this.clampMargin/s._resolution,d=this.clampOffset/s._resolution;return l[0]=(e.frame.x+c+d)/s.width,l[1]=(e.frame.y+c+d)/s.height,l[2]=(e.frame.x+e.frame.width-c+d)/s.width,l[3]=(e.frame.y+e.frame.height-c+d)/s.height,this.uClampOffset[0]=this.clampOffset/s.pixelWidth,this.uClampOffset[1]=this.clampOffset/s.pixelHeight,this.isSimple=e.frame.width===s.width&&e.frame.height===s.height&&e.rotate===0,!0}}class Tn extends ho{constructor({source:e,label:n,frame:i,orig:r,trim:s,defaultAnchor:l,defaultBorders:c,rotate:d,dynamic:p}={}){if(super(),this.uid=gi("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new Ei,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(e==null?void 0:e.source)??new zs,this.noFrame=!i,i)this.frame.copyFrom(i);else{const{width:m,height:g}=this._source;this.frame.width=m,this.frame.height=g}this.orig=r||this.frame,this.trim=s,this.rotate=d??0,this.defaultAnchor=l,this.defaultBorders=c,this.destroyed=!1,this.dynamic=p||!1,this.updateUvs()}set source(e){this._source&&this._source.off("resize",this.update,this),this._source=e,e.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new o4(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:e,frame:n}=this,{width:i,height:r}=this._source,s=n.x/i,l=n.y/r,c=n.width/i,d=n.height/r;let p=this.rotate;if(p){const m=c/2,g=d/2,b=s+m,v=l+g;p=On.add(p,On.NW),e.x0=b+m*On.uX(p),e.y0=v+g*On.uY(p),p=On.add(p,2),e.x1=b+m*On.uX(p),e.y1=v+g*On.uY(p),p=On.add(p,2),e.x2=b+m*On.uX(p),e.y2=v+g*On.uY(p),p=On.add(p,2),e.x3=b+m*On.uX(p),e.y3=v+g*On.uY(p)}else e.x0=s,e.y0=l,e.x1=s+c,e.y1=l,e.x2=s+c,e.y2=l+d,e.x3=s,e.y3=l+d}destroy(e=!1){this._source&&(this._source.off("resize",this.update,this),e&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return Qt(mi,"Texture.baseTexture is now Texture.source"),this._source}}Tn.EMPTY=new Tn({label:"EMPTY",source:new zs({label:"EMPTY"})});Tn.EMPTY.destroy=DC;Tn.WHITE=new Tn({source:new U_({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Tn.WHITE.destroy=DC;function HC(t,e,n){const{width:i,height:r}=n.orig,s=n.trim;if(s){const l=s.width,c=s.height;t.minX=s.x-e._x*i,t.maxX=t.minX+l,t.minY=s.y-e._y*r,t.maxY=t.minY+c}else t.minX=-e._x*i,t.maxX=t.minX+i,t.minY=-e._y*r,t.maxY=t.minY+r}const pE=new jt;class Ds{constructor(e=1/0,n=1/0,i=-1/0,r=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=pE,this.minX=e,this.minY=n,this.maxX=i,this.maxY=r}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new Ei);const e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(e.x=0,e.y=0,e.width=0,e.height=0):e.copyFromBounds(this),e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=pE,this}set(e,n,i,r){this.minX=e,this.minY=n,this.maxX=i,this.maxY=r}addFrame(e,n,i,r,s){s||(s=this.matrix);const l=s.a,c=s.b,d=s.c,p=s.d,m=s.tx,g=s.ty;let b=this.minX,v=this.minY,S=this.maxX,C=this.maxY,T=l*e+d*n+m,w=c*e+p*n+g;T<b&&(b=T),w<v&&(v=w),T>S&&(S=T),w>C&&(C=w),T=l*i+d*n+m,w=c*i+p*n+g,T<b&&(b=T),w<v&&(v=w),T>S&&(S=T),w>C&&(C=w),T=l*e+d*r+m,w=c*e+p*r+g,T<b&&(b=T),w<v&&(v=w),T>S&&(S=T),w>C&&(C=w),T=l*i+d*r+m,w=c*i+p*r+g,T<b&&(b=T),w<v&&(v=w),T>S&&(S=T),w>C&&(C=w),this.minX=b,this.minY=v,this.maxX=S,this.maxY=C}addRect(e,n){this.addFrame(e.x,e.y,e.x+e.width,e.y+e.height,n)}addBounds(e,n){this.addFrame(e.minX,e.minY,e.maxX,e.maxY,n)}addBoundsMask(e){this.minX=this.minX>e.minX?this.minX:e.minX,this.minY=this.minY>e.minY?this.minY:e.minY,this.maxX=this.maxX<e.maxX?this.maxX:e.maxX,this.maxY=this.maxY<e.maxY?this.maxY:e.maxY}applyMatrix(e){const n=this.minX,i=this.minY,r=this.maxX,s=this.maxY,{a:l,b:c,c:d,d:p,tx:m,ty:g}=e;let b=l*n+d*i+m,v=c*n+p*i+g;this.minX=b,this.minY=v,this.maxX=b,this.maxY=v,b=l*r+d*i+m,v=c*r+p*i+g,this.minX=b<this.minX?b:this.minX,this.minY=v<this.minY?v:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=v>this.maxY?v:this.maxY,b=l*n+d*s+m,v=c*n+p*s+g,this.minX=b<this.minX?b:this.minX,this.minY=v<this.minY?v:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=v>this.maxY?v:this.maxY,b=l*r+d*s+m,v=c*r+p*s+g,this.minX=b<this.minX?b:this.minX,this.minY=v<this.minY?v:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=v>this.maxY?v:this.maxY}fit(e){return this.minX<e.left&&(this.minX=e.left),this.maxX>e.right&&(this.maxX=e.right),this.minY<e.top&&(this.minY=e.top),this.maxY>e.bottom&&(this.maxY=e.bottom),this}fitBounds(e,n,i,r){return this.minX<e&&(this.minX=e),this.maxX>n&&(this.maxX=n),this.minY<i&&(this.minY=i),this.maxY>r&&(this.maxY=r),this}pad(e,n=e){return this.minX-=e,this.maxX+=e,this.minY-=n,this.maxY+=n,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Ds(this.minX,this.minY,this.maxX,this.maxY)}scale(e,n=e){return this.minX*=e,this.minY*=n,this.maxX*=e,this.maxY*=n,this}get x(){return this.minX}set x(e){const n=this.maxX-this.minX;this.minX=e,this.maxX=e+n}get y(){return this.minY}set y(e){const n=this.maxY-this.minY;this.minY=e,this.maxY=e+n}get width(){return this.maxX-this.minX}set width(e){this.maxX=this.minX+e}get height(){return this.maxY-this.minY}set height(e){this.maxY=this.minY+e}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(e,n,i,r){let s=this.minX,l=this.minY,c=this.maxX,d=this.maxY;r||(r=this.matrix);const p=r.a,m=r.b,g=r.c,b=r.d,v=r.tx,S=r.ty;for(let C=n;C<i;C+=2){const T=e[C],w=e[C+1],k=p*T+g*w+v,M=m*T+b*w+S;s=k<s?k:s,l=M<l?M:l,c=k>c?k:c,d=M>d?M:d}this.minX=s,this.minY=l,this.maxX=c,this.maxY=d}containsPoint(e,n){return this.minX<=e&&this.minY<=n&&this.maxX>=e&&this.maxY>=n}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(e){return this.minX=e.minX,this.minY=e.minY,this.maxX=e.maxX,this.maxY=e.maxY,this}}var c4={grad:.9,turn:360,rad:360/(2*Math.PI)},Xo=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},ir=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},ks=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t>e?t:e},jC=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},mE=function(t){return{r:ks(t.r,0,255),g:ks(t.g,0,255),b:ks(t.b,0,255),a:ks(t.a)}},dx=function(t){return{r:ir(t.r),g:ir(t.g),b:ir(t.b),a:ir(t.a,3)}},u4=/^#([0-9a-f]{3,8})$/i,Ty=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},PC=function(t){var e=t.r,n=t.g,i=t.b,r=t.a,s=Math.max(e,n,i),l=s-Math.min(e,n,i),c=l?s===e?(n-i)/l:s===n?2+(i-e)/l:4+(e-n)/l:0;return{h:60*(c<0?c+6:c),s:s?l/s*100:0,v:s/255*100,a:r}},GC=function(t){var e=t.h,n=t.s,i=t.v,r=t.a;e=e/360*6,n/=100,i/=100;var s=Math.floor(e),l=i*(1-n),c=i*(1-(e-s)*n),d=i*(1-(1-e+s)*n),p=s%6;return{r:255*[i,c,l,l,d,i][p],g:255*[d,i,i,c,l,l][p],b:255*[l,l,d,i,i,c][p],a:r}},gE=function(t){return{h:jC(t.h),s:ks(t.s,0,100),l:ks(t.l,0,100),a:ks(t.a)}},yE=function(t){return{h:ir(t.h),s:ir(t.s),l:ir(t.l),a:ir(t.a,3)}},bE=function(t){return GC((n=(e=t).s,{h:e.h,s:(n*=((i=e.l)<50?i:100-i)/100)>0?2*n/(i+n)*100:0,v:i+n,a:e.a}));var e,n,i},pm=function(t){return{h:(e=PC(t)).h,s:(r=(200-(n=e.s))*(i=e.v)/100)>0&&r<200?n*i/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,n,i,r},f4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,d4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,h4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dv={string:[[function(t){var e=u4.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?ir(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?ir(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=h4.exec(t)||p4.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:mE({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=f4.exec(t)||d4.exec(t);if(!e)return null;var n,i,r=gE({h:(n=e[1],i=e[2],i===void 0&&(i="deg"),Number(n)*(c4[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return bE(r)},"hsl"]],object:[[function(t){var e=t.r,n=t.g,i=t.b,r=t.a,s=r===void 0?1:r;return Xo(e)&&Xo(n)&&Xo(i)?mE({r:Number(e),g:Number(n),b:Number(i),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,n=t.s,i=t.l,r=t.a,s=r===void 0?1:r;if(!Xo(e)||!Xo(n)||!Xo(i))return null;var l=gE({h:Number(e),s:Number(n),l:Number(i),a:Number(s)});return bE(l)},"hsl"],[function(t){var e=t.h,n=t.s,i=t.v,r=t.a,s=r===void 0?1:r;if(!Xo(e)||!Xo(n)||!Xo(i))return null;var l=(function(c){return{h:jC(c.h),s:ks(c.s,0,100),v:ks(c.v,0,100),a:ks(c.a)}})({h:Number(e),s:Number(n),v:Number(i),a:Number(s)});return GC(l)},"hsv"]]},xE=function(t,e){for(var n=0;n<e.length;n++){var i=e[n][0](t);if(i)return[i,e[n][1]]}return[null,void 0]},m4=function(t){return typeof t=="string"?xE(t.trim(),Dv.string):typeof t=="object"&&t!==null?xE(t,Dv.object):[null,void 0]},hx=function(t,e){var n=pm(t);return{h:n.h,s:ks(n.s+100*e,0,100),l:n.l,a:n.a}},px=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},vE=function(t,e){var n=pm(t);return{h:n.h,s:n.s,l:ks(n.l+100*e,0,100),a:n.a}},zv=(function(){function t(e){this.parsed=m4(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return ir(px(this.rgba),2)},t.prototype.isDark=function(){return px(this.rgba)<.5},t.prototype.isLight=function(){return px(this.rgba)>=.5},t.prototype.toHex=function(){return e=dx(this.rgba),n=e.r,i=e.g,r=e.b,l=(s=e.a)<1?Ty(ir(255*s)):"","#"+Ty(n)+Ty(i)+Ty(r)+l;var e,n,i,r,s,l},t.prototype.toRgb=function(){return dx(this.rgba)},t.prototype.toRgbString=function(){return e=dx(this.rgba),n=e.r,i=e.g,r=e.b,(s=e.a)<1?"rgba("+n+", "+i+", "+r+", "+s+")":"rgb("+n+", "+i+", "+r+")";var e,n,i,r,s},t.prototype.toHsl=function(){return yE(pm(this.rgba))},t.prototype.toHslString=function(){return e=yE(pm(this.rgba)),n=e.h,i=e.s,r=e.l,(s=e.a)<1?"hsla("+n+", "+i+"%, "+r+"%, "+s+")":"hsl("+n+", "+i+"%, "+r+"%)";var e,n,i,r,s},t.prototype.toHsv=function(){return e=PC(this.rgba),{h:ir(e.h),s:ir(e.s),v:ir(e.v),a:ir(e.a,3)};var e},t.prototype.invert=function(){return io({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),io(hx(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),io(hx(this.rgba,-e))},t.prototype.grayscale=function(){return io(hx(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),io(vE(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),io(vE(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?io({r:(n=this.rgba).r,g:n.g,b:n.b,a:e}):ir(this.rgba.a,3);var n},t.prototype.hue=function(e){var n=pm(this.rgba);return typeof e=="number"?io({h:e,s:n.s,l:n.l,a:n.a}):ir(n.h)},t.prototype.isEqual=function(e){return this.toHex()===io(e).toHex()},t})(),io=function(t){return t instanceof zv?t:new zv(t)},_E=[],g4=function(t){t.forEach(function(e){_E.indexOf(e)<0&&(e(zv,Dv),_E.push(e))})};function y4(t,e){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var r in n)i[n[r]]=r;var s={};t.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,d,p=i[this.toHex()];if(p)return p;if(l!=null&&l.closest){var m=this.toRgb(),g=1/0,b="black";if(!s.length)for(var v in n)s[v]=new t(n[v]).toRgb();for(var S in n){var C=(c=m,d=s[S],Math.pow(c.r-d.r,2)+Math.pow(c.g-d.g,2)+Math.pow(c.b-d.b,2));C<g&&(g=C,b=S)}return b}},e.string.push([function(l){var c=l.toLowerCase(),d=c==="transparent"?"#0000":n[c];return d?new t(d).toRgb():null},"name"])}g4([y4]);const nh=class lm{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof lm)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,e))&&(this._value=this._cloneSource(e),this._normalize(this._value))}}get value(){return this._value}_cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}_isSourceEqual(e,n){const i=typeof e;if(i!==typeof n)return!1;if(i==="number"||i==="string"||e instanceof Number)return e===n;if(Array.isArray(e)&&Array.isArray(n)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(n))return e.length!==n.length?!1:e.every((s,l)=>s===n[l]);if(e!==null&&n!==null){const s=Object.keys(e),l=Object.keys(n);return s.length!==l.length?!1:s.every(c=>e[c]===n[c])}return e===n}toRgba(){const[e,n,i,r]=this._components;return{r:e,g:n,b:i,a:r}}toRgb(){const[e,n,i]=this._components;return{r:e,g:n,b:i}}toRgbaString(){const[e,n,i]=this.toUint8RgbArray();return`rgba(${e},${n},${i},${this.alpha})`}toUint8RgbArray(e){const[n,i,r]=this._components;return this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb),e[0]=Math.round(n*255),e[1]=Math.round(i*255),e[2]=Math.round(r*255),e}toArray(e){this._arrayRgba||(this._arrayRgba=[]),e||(e=this._arrayRgba);const[n,i,r,s]=this._components;return e[0]=n,e[1]=i,e[2]=r,e[3]=s,e}toRgbArray(e){this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb);const[n,i,r]=this._components;return e[0]=n,e[1]=i,e[2]=r,e}toNumber(){return this._int}toBgrNumber(){const[e,n,i]=this.toUint8RgbArray();return(i<<16)+(n<<8)+e}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[n,i,r,s]=lm._temp.setValue(e)._components;return this._components[0]*=n,this._components[1]*=i,this._components[2]*=r,this._components[3]*=s,this._refreshInt(),this._value=null,this}premultiply(e,n=!0){return n&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this._refreshInt(),this._value=null,this}toPremultiplied(e,n=!0){if(e===1)return(255<<24)+this._int;if(e===0)return n?0:this._int;let i=this._int>>16&255,r=this._int>>8&255,s=this._int&255;return n&&(i=i*e+.5|0,r=r*e+.5|0,s=s*e+.5|0),(e*255<<24)+(i<<16)+(r<<8)+s}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const n=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-n.length)+n}setAlpha(e){return this._components[3]=this._clamp(e),this._value=null,this}_normalize(e){let n,i,r,s;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const l=e;n=(l>>16&255)/255,i=(l>>8&255)/255,r=(l&255)/255,s=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[n,i,r,s=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[n,i,r,s=255]=e,n/=255,i/=255,r/=255,s/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const c=lm.HEX_PATTERN.exec(e);c&&(e=`#${c[2]}`)}const l=io(e);l.isValid()&&({r:n,g:i,b:r,a:s}=l.rgba,n/=255,i/=255,r/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=i,this._components[2]=r,this._components[3]=s,this._refreshInt();else throw new Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);const[e,n,i]=this._components;this._int=(e*255<<16)+(n*255<<8)+(i*255|0)}_clamp(e,n=0,i=1){return typeof e=="number"?Math.min(Math.max(e,n),i):(e.forEach((r,s)=>{e[s]=Math.min(Math.max(r,n),i)}),e)}static isColorLike(e){return typeof e=="number"||typeof e=="string"||e instanceof Number||e instanceof lm||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||e.r!==void 0&&e.g!==void 0&&e.b!==void 0||e.r!==void 0&&e.g!==void 0&&e.b!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0&&e.a!==void 0}};nh.shared=new nh;nh._temp=new nh;nh.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Gi=nh;const b4={cullArea:null,cullable:!1,cullableChildren:!0};let mx=0;const SE=500;function ca(...t){mx!==SE&&(mx++,mx===SE?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...t))}const Fm={_registeredResources:new Set,register(t){this._registeredResources.add(t)},unregister(t){this._registeredResources.delete(t)},release(){this._registeredResources.forEach(t=>t.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(t){return this._registeredResources.has(t)},reset(){this._registeredResources.clear()}};class x4{constructor(e,n){this._pool=[],this._count=0,this._index=0,this._classType=e,n&&this.prepopulate(n)}prepopulate(e){for(let n=0;n<e;n++)this._pool[this._index++]=new this._classType;this._count+=e}get(e){var i;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(i=n.init)==null||i.call(n,e),n}return(e){var n;(n=e.reset)==null||n.call(e),this._pool[this._index++]=e}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let e=0;e<this._index;e++)this._pool[e].destroy();this._pool.length=0,this._count=0,this._index=0}}class v4{constructor(){this._poolsByClass=new Map}prepopulate(e,n){this.getPool(e).prepopulate(n)}get(e,n){return this.getPool(e).get(n)}return(e){this.getPool(e.constructor).return(e)}getPool(e){return this._poolsByClass.has(e)||this._poolsByClass.set(e,new x4(e)),this._poolsByClass.get(e)}stats(){const e={};return this._poolsByClass.forEach(n=>{const i=e[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;e[i]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),e}clear(){this._poolsByClass.forEach(e=>e.clear()),this._poolsByClass.clear()}}const Ra=new v4;Fm.register(Ra);const _4={get isCachedAsTexture(){var t;return!!((t=this.renderGroup)!=null&&t.isCachedAsTexture)},cacheAsTexture(t){typeof t=="boolean"&&t===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(t===!0?{}:t))},updateCacheTexture(){var t;(t=this.renderGroup)==null||t.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(t){Qt("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(t)}};function S4(t,e,n){const i=t.length;let r;if(e>=i||n===0)return;n=e+n>i?i-e:n;const s=i-n;for(r=e;r<s;++r)t[r]=t[r+n];t.length=s}const E4={allowChildren:!0,removeChildren(t=0,e){var s;const n=e??this.children.length,i=n-t,r=[];if(i>0&&i<=n){for(let c=n-1;c>=t;c--){const d=this.children[c];d&&(r.push(d),d.parent=null)}S4(this.children,t,n);const l=this.renderGroup||this.parentRenderGroup;l&&l.removeChildren(r);for(let c=0;c<r.length;++c){const d=r[c];(s=d.parentRenderLayer)==null||s.detach(d),this.emit("childRemoved",d,this,c),r[c].emit("removed",this)}return r.length>0&&this._didViewChangeTick++,r}else if(i===0&&this.children.length===0)return r;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(t){const e=this.getChildAt(t);return this.removeChild(e)},getChildAt(t){if(t<0||t>=this.children.length)throw new Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]},setChildIndex(t,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(t),this.addChildAt(t,e)},getChildIndex(t){const e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied Container must be a child of the caller");return e},addChildAt(t,e){this.allowChildren||Qt(mi,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:n}=this;if(e<0||e>n.length)throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${n.length}`);const i=t.parent===this;if(t.parent){const s=t.parent.children.indexOf(t);if(i){if(s===e)return t;t.parent.children.splice(s,1)}else t.removeFromParent()}e===n.length?n.push(t):n.splice(e,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;const r=this.renderGroup||this.parentRenderGroup;return r&&r.addChild(t),this.sortableChildren&&(this.sortDirty=!0),i||(this.emit("childAdded",t,this,e),t.emit("added",this)),t},swapChildren(t,e){if(t===e)return;const n=this.getChildIndex(t),i=this.getChildIndex(e);this.children[n]=e,this.children[i]=t;const r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)},reparentChild(...t){return t.length===1?this.reparentChildAt(t[0],this.children.length):(t.forEach(e=>this.reparentChildAt(e,this.children.length)),t[0])},reparentChildAt(t,e){if(t.parent===this)return this.setChildIndex(t,e),t;const n=t.worldTransform.clone();t.removeFromParent(),this.addChildAt(t,e);const i=this.worldTransform.clone();return i.invert(),n.prepend(i),t.setFromMatrix(n),t},replaceChild(t,e){t.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(t)),e.setFromMatrix(t.localTransform),e.updateLocalTransform(),this.removeChild(t)}},w4={collectRenderables(t,e,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(t,e,n):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,t):this.collectRenderablesWithEffects(t,e,n))},collectRenderablesSimple(t,e,n){const i=this.children,r=i.length;for(let s=0;s<r;s++)i[s].collectRenderables(t,e,n)},collectRenderablesWithEffects(t,e,n){const{renderPipes:i}=e;for(let r=0;r<this.effects.length;r++){const s=this.effects[r];i[s.pipe].push(s,this,t)}this.collectRenderablesSimple(t,e,n);for(let r=this.effects.length-1;r>=0;r--){const s=this.effects[r];i[s.pipe].pop(s,this,t)}}};class EE{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}}class T4{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let n=0;n<this._tests.length;n++){const i=this._tests[n];if(i.test(e))return Ra.get(i.maskClass,e)}return e}returnMaskEffect(e){Ra.return(e)}}const Bv=new T4;si.handleByList(Rt.MaskEffect,Bv._effectClasses);const C4={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const t=this.renderGroup||this.parentRenderGroup;t&&(t.structureDidChange=!0)},addEffect(t){this.effects.indexOf(t)===-1&&(this.effects.push(t),this.effects.sort((n,i)=>n.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(t){const e=this.effects.indexOf(t);e!==-1&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(t){const e=this._maskEffect;(e==null?void 0:e.mask)!==t&&(e&&(this.removeEffect(e),Bv.returnMaskEffect(e),this._maskEffect=null),t!=null&&(this._maskEffect=Bv.getMaskEffect(t),this.addEffect(this._maskEffect)))},get mask(){var t;return(t=this._maskEffect)==null?void 0:t.mask},setMask(t){this._maskOptions={...this._maskOptions,...t},t.mask&&(this.mask=t.mask),this._markStructureAsChanged()},set filters(t){var s;!Array.isArray(t)&&t&&(t=[t]);const e=this._filterEffect||(this._filterEffect=new EE);t=t;const n=(t==null?void 0:t.length)>0,i=((s=e.filters)==null?void 0:s.length)>0,r=n!==i;t=Array.isArray(t)?t.slice(0):t,e.filters=Object.freeze(t),r&&(n?this.addEffect(e):(this.removeEffect(e),e.filters=t??null))},get filters(){var t;return(t=this._filterEffect)==null?void 0:t.filters},set filterArea(t){this._filterEffect||(this._filterEffect=new EE),this._filterEffect.filterArea=t},get filterArea(){var t;return(t=this._filterEffect)==null?void 0:t.filterArea}},A4={label:null,get name(){return Qt(mi,"Container.name property has been removed, use Container.label instead"),this.label},set name(t){Qt(mi,"Container.name property has been removed, use Container.label instead"),this.label=t},getChildByName(t,e=!1){return this.getChildByLabel(t,e)},getChildByLabel(t,e=!1){const n=this.children;for(let i=0;i<n.length;i++){const r=n[i];if(r.label===t||t instanceof RegExp&&t.test(r.label))return r}if(e)for(let i=0;i<n.length;i++){const s=n[i].getChildByLabel(t,!0);if(s)return s}return null},getChildrenByLabel(t,e=!1,n=[]){const i=this.children;for(let r=0;r<i.length;r++){const s=i[r];(s.label===t||t instanceof RegExp&&t.test(s.label))&&n.push(s)}if(e)for(let r=0;r<i.length;r++)i[r].getChildrenByLabel(t,!0,n);return n}},oa=Ra.getPool(jt),ec=Ra.getPool(Ds),M4=new jt,R4={getFastGlobalBounds(t,e){e||(e=new Ds),e.clear(),this._getGlobalBoundsRecursive(!!t,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(n.worldTransform),e},_getGlobalBoundsRecursive(t,e,n){let i=e;if(t&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const r=!!this.effects.length;if((this.renderGroup||r)&&(i=ec.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const l=this.bounds;i.addFrame(l.minX,l.minY,l.maxX,l.maxY,this.groupTransform)}const s=this.children;for(let l=0;l<s.length;l++)s[l]._getGlobalBoundsRecursive(t,i,n)}if(r){let s=!1;const l=this.renderGroup||this.parentRenderGroup;for(let c=0;c<this.effects.length;c++)this.effects[c].addBounds&&(s||(s=!0,i.applyMatrix(l.worldTransform)),this.effects[c].addBounds(i,!0));s&&i.applyMatrix(l.worldTransform.copyTo(M4).invert()),e.addBounds(i),ec.return(i)}else this.renderGroup&&(e.addBounds(i,this.relativeGroupTransform),ec.return(i))}};function FC(t,e,n){n.clear();let i,r;return t.parent?e?i=t.parent.worldTransform:(r=oa.get().identity(),i=I_(t,r)):i=jt.IDENTITY,qC(t,n,i,e),r&&oa.return(r),n.isValid||n.set(0,0,0,0),n}function qC(t,e,n,i){var c,d;if(!t.visible||!t.measurable)return;let r;i?r=t.worldTransform:(t.updateLocalTransform(),r=oa.get(),r.appendFrom(t.localTransform,n));const s=e,l=!!t.effects.length;if(l&&(e=ec.get().clear()),t.boundsArea)e.addRect(t.boundsArea,r);else{const p=t.bounds;p&&!p.isEmpty()&&(e.matrix=r,e.addBounds(p));for(let m=0;m<t.children.length;m++)qC(t.children[m],e,r,i)}if(l){for(let p=0;p<t.effects.length;p++)(d=(c=t.effects[p]).addBounds)==null||d.call(c,e);s.addBounds(e,jt.IDENTITY),ec.return(e)}i||oa.return(r)}function I_(t,e){const n=t.parent;return n&&(I_(n,e),n.updateLocalTransform(),e.append(n.localTransform)),e}function YC(t,e){if(t===16777215||!e)return e;if(e===16777215||!t)return t;const n=t>>16&255,i=t>>8&255,r=t&255,s=e>>16&255,l=e>>8&255,c=e&255,d=n*s/255|0,p=i*l/255|0,m=r*c/255|0;return(d<<16)+(p<<8)+m}const wE=16777215;function TE(t,e){return t===wE?e:e===wE?t:YC(t,e)}function o0(t){return((t&255)<<16)+(t&65280)+(t>>16&255)}const N4={getGlobalAlpha(t){if(t)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,n=this.parent;for(;n;)e*=n.alpha,n=n.parent;return e},getGlobalTransform(t=new jt,e){if(e)return t.copyFrom(this.worldTransform);this.updateLocalTransform();const n=I_(this,oa.get().identity());return t.appendFrom(this.localTransform,n),oa.return(n),t},getGlobalTint(t){if(t)return this.renderGroup?o0(this.renderGroup.worldColor):this.parentRenderGroup?o0(TE(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,n=this.parent;for(;n;)e=TE(e,n.localColor),n=n.parent;return o0(e)}};function VC(t,e,n){return e.clear(),n||(n=jt.IDENTITY),XC(t,e,n,t,!0),e.isValid||e.set(0,0,0,0),e}function XC(t,e,n,i,r){var d,p;let s;if(r)s=oa.get(),s=n.copyTo(s);else{if(!t.visible||!t.measurable)return;t.updateLocalTransform();const m=t.localTransform;s=oa.get(),s.appendFrom(m,n)}const l=e,c=!!t.effects.length;if(c&&(e=ec.get().clear()),t.boundsArea)e.addRect(t.boundsArea,s);else{t.renderPipeId&&(e.matrix=s,e.addBounds(t.bounds));const m=t.children;for(let g=0;g<m.length;g++)XC(m[g],e,s,i,!1)}if(c){for(let m=0;m<t.effects.length;m++)(p=(d=t.effects[m]).addLocalBounds)==null||p.call(d,e,i);l.addBounds(e,jt.IDENTITY),ec.return(e)}oa.return(s)}function KC(t,e){const n=t.children;for(let i=0;i<n.length;i++){const r=n[i],s=r.uid,l=(r._didViewChangeTick&65535)<<16|r._didContainerChangeTick&65535,c=e.index;(e.data[c]!==s||e.data[c+1]!==l)&&(e.data[e.index]=s,e.data[e.index+1]=l,e.didChange=!0),e.index=c+2,r.children.length&&KC(r,e)}return e.didChange}const k4=new jt,O4={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(t,e){const n=Math.sign(this.scale.x)||1;e!==0?this.scale.x=t/e*n:this.scale.x=n},_setHeight(t,e){const n=Math.sign(this.scale.y)||1;e!==0?this.scale.y=t/e*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Ds});const t=this._localBoundsCacheData;return t.index=1,t.didChange=!1,t.data[0]!==this._didViewChangeTick&&(t.didChange=!0,t.data[0]=this._didViewChangeTick),KC(this,t),t.didChange&&VC(this,t.localBounds,k4),t.localBounds},getBounds(t,e){return FC(this,t,e||new Ds)}},D4={_onRender:null,set onRender(t){const e=this.renderGroup||this.parentRenderGroup;if(!t){this._onRender&&(e==null||e.removeOnRender(this)),this._onRender=null;return}this._onRender||e==null||e.addOnRender(this),this._onRender=t},get onRender(){return this._onRender}},z4={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(t){this._zIndex!==t&&(this._zIndex=t,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(B4))}};function B4(t,e){return t._zIndex-e._zIndex}const L4={getGlobalPosition(t=new Dr,e=!1){return this.parent?this.parent.toGlobal(this._position,t,e):(t.x=this._position.x,t.y=this._position.y),t},toGlobal(t,e,n=!1){const i=this.getGlobalTransform(oa.get(),n);return e=i.apply(t,e),oa.return(i),e},toLocal(t,e,n,i){e&&(t=e.toGlobal(t,n,i));const r=this.getGlobalTransform(oa.get(),i);return n=r.applyInverse(t,n),oa.return(r),n}};class H_{constructor(){this.uid=gi("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(e){this.instructions[this.instructionSize++]=e}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let U4=0;class I4{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new th(this.textureOptions)}createTexture(e,n,i,r){const s=new zs({...this.textureOptions,width:e,height:n,resolution:1,antialias:i,autoGarbageCollect:!1,autoGenerateMipmaps:r});return new Tn({source:s,label:`texturePool_${U4++}`})}getOptimalTexture(e,n,i=1,r,s=!1){let l=Math.ceil(e*i-1e-6),c=Math.ceil(n*i-1e-6);l=eh(l),c=eh(c);const d=r?1:0,p=s?1:0,m=(l<<17)+(c<<2)+(p<<1)+d;this._texturePool[m]||(this._texturePool[m]=[]);let g=this._texturePool[m].pop();return g||(g=this.createTexture(l,c,r,s)),g.source._resolution=i,g.source.width=l/i,g.source.height=c/i,g.source.pixelWidth=l,g.source.pixelHeight=c,g.frame.x=0,g.frame.y=0,g.frame.width=e,g.frame.height=n,g.updateUvs(),this._poolKeyHash[g.uid]=m,g}getSameSizeTexture(e,n=!1){const i=e.source;return this.getOptimalTexture(e.width,e.height,i._resolution,n)}returnTexture(e,n=!1){const i=this._poolKeyHash[e.uid];n&&(e.source.style=this.textureStyle),this._texturePool[i].push(e)}clear(e){if(e=e!==!1,e)for(const n in this._texturePool){const i=this._texturePool[n];if(i)for(let r=0;r<i.length;r++)i[r].destroy(!0)}this._texturePool={}}}const V0=new I4;Fm.register(V0);class H4{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new jt,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new H_,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;const n=e.children;for(let i=0;i<n.length;i++){const r=n[i];r._updateFlags=15,this.addChild(r)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(V0.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const e in this.childrenToUpdate){const n=this.childrenToUpdate[e];n.list.fill(null),n.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){const n=this.renderGroupChildren.indexOf(e);n>-1&&this.renderGroupChildren.splice(n,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);const n=e.children;for(let i=0;i<n.length;i++)this.addChild(n[i])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}const n=e.children;for(let i=0;i<n.length;i++)this.removeChild(n[i])}removeChildren(e){for(let n=0;n<e.length;n++)this.removeChild(e[n])}onChildUpdate(e){let n=this.childrenToUpdate[e.relativeRenderGroupDepth];n||(n=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]}),n.list[n.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let n=0;n<this._onRenderContainers.length;n++)this._onRenderContainers[n]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){const n=this.root.children;for(let i=0;i<n.length;i++)this._getChildren(n[i],e);return e}_getChildren(e,n=[]){if(n.push(e),e.renderGroup)return n;const i=e.children;for(let r=0;r<i.length;r++)this._getChildren(i[r],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new jt),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new jt),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new jt),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function j4(t,e,n={}){for(const i in e)!n[i]&&e[i]!==void 0&&(t[i]=e[i])}const gx=new yr(null),Cy=new yr(null),yx=new yr(null,1,1),Ay=new yr(null),CE=1,P4=2,bx=4;class br extends ho{constructor(e={}){var n,i;super(),this.uid=gi("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new jt,this.relativeGroupTransform=new jt,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new yr(this,0,0),this._scale=yx,this._pivot=Cy,this._origin=Ay,this._skew=gx,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],j4(this,e,{children:!0,parent:!0,effects:!0}),(n=e.children)==null||n.forEach(r=>this.addChild(r)),(i=e.parent)==null||i.addChild(this)}static mixin(e){Qt("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),si.mixin(br,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...e){if(this.allowChildren||Qt(mi,"addChild: Only Containers will be allowed to add children in v8.0.0"),e.length>1){for(let r=0;r<e.length;r++)this.addChild(e[r]);return e[0]}const n=e[0],i=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),i&&(i.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,i&&i.addChild(n),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...e){if(e.length>1){for(let r=0;r<e.length;r++)this.removeChild(e[r]);return e[0]}const n=e[0],i=this.children.indexOf(n);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(n):this.parentRenderGroup&&this.parentRenderGroup.removeChild(n),n.parentRenderLayer&&n.parentRenderLayer.detach(n),n.parent=null,this.emit("childRemoved",n,this,i),n.emit("removed",this)),n}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const e=this.parentRenderGroup;e==null||e.removeChild(this),this.renderGroup=Ra.get(H4,this),this.groupTransform=jt.IDENTITY,e==null||e.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const e=this.parentRenderGroup;e==null||e.removeChild(this),Ra.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e==null||e.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new jt),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*t4}set angle(e){this.rotation=e*n4}get pivot(){return this._pivot===Cy&&(this._pivot=new yr(this,0,0)),this._pivot}set pivot(e){this._pivot===Cy&&(this._pivot=new yr(this,0,0),this._origin!==Ay&&ca("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===gx&&(this._skew=new yr(this,0,0)),this._skew}set skew(e){this._skew===gx&&(this._skew=new yr(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===yx&&(this._scale=new yr(this,1,1)),this._scale}set scale(e){this._scale===yx&&(this._scale=new yr(this,0,0)),typeof e=="string"&&(e=parseFloat(e)),typeof e=="number"?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===Ay&&(this._origin=new yr(this,0,0)),this._origin}set origin(e){this._origin===Ay&&(this._origin=new yr(this,0,0),this._pivot!==Cy&&ca("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){const n=this.getLocalBounds().width;this._setWidth(e,n)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){const n=this.getLocalBounds().height;this._setHeight(e,n)}getSize(e){e||(e={});const n=this.getLocalBounds();return e.width=Math.abs(this.scale.x*n.width),e.height=Math.abs(this.scale.y*n.height),e}setSize(e,n){const i=this.getLocalBounds();typeof e=="object"?(n=e.height??e.width,e=e.width):n??(n=e),e!==void 0&&this._setWidth(e,i.width),n!==void 0&&this._setHeight(n,i.height)}_updateSkew(){const e=this._rotation,n=this._skew;this._cx=Math.cos(e+n._y),this._sx=Math.sin(e+n._y),this._cy=-Math.sin(e-n._x),this._sy=Math.cos(e-n._x)}updateTransform(e){return this.position.set(typeof e.x=="number"?e.x:this.position.x,typeof e.y=="number"?e.y:this.position.y),this.scale.set(typeof e.scaleX=="number"?e.scaleX||1:this.scale.x,typeof e.scaleY=="number"?e.scaleY||1:this.scale.y),this.rotation=typeof e.rotation=="number"?e.rotation:this.rotation,this.skew.set(typeof e.skewX=="number"?e.skewX:this.skew.x,typeof e.skewY=="number"?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX=="number"?e.pivotX:this.pivot.x,typeof e.pivotY=="number"?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX=="number"?e.originX:this.origin.x,typeof e.originY=="number"?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){const e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;const n=this.localTransform,i=this._scale,r=this._pivot,s=this._origin,l=this._position,c=i._x,d=i._y,p=r._x,m=r._y,g=-s._x,b=-s._y;n.a=this._cx*c,n.b=this._sx*c,n.c=this._cy*d,n.d=this._sy*d,n.tx=l._x-(p*n.a+m*n.c)+(g*n.a+b*n.c)-g,n.ty=l._y-(p*n.b+m*n.d)+(g*n.b+b*n.d)-b}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=CE,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){const i=Gi.shared.setValue(e??16777215).toBgrNumber();i!==this.localColor&&(this.localColor=i,this._updateFlags|=CE,this._onUpdate())}get tint(){return o0(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=P4,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){const n=e?2:0;(this.localDisplayStatus&2)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=bx,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",e))}get culled(){return!(this.localDisplayStatus&4)}set culled(e){const n=e?0:4;(this.localDisplayStatus&4)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=bx,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){const n=e?1:0;(this.localDisplayStatus&1)!==n&&(this._updateFlags|=bx,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){var r;if(this.destroyed)return;this.destroyed=!0;let n;if(this.children.length&&(n=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof e=="boolean"?e:e==null?void 0:e.children)&&n)for(let s=0;s<n.length;++s)n[s].destroy(e);(r=this.renderGroup)==null||r.destroy(),this.renderGroup=null}}si.mixin(br,E4,R4,L4,D4,O4,C4,A4,z4,b4,_4,N4,w4);class j_ extends br{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Ds(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=e?1:0}containsPoint(e){const n=this.bounds,{x:i,y:r}=e;return i>=n.minX&&i<=n.maxX&&r>=n.minY&&r<=n.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(e){this.unload(),super.destroy(e),this._bounds=null}collectRenderablesSimple(e,n,i){const{renderPipes:r}=n;r.blendMode.pushBlendMode(this,this.groupBlendMode,e);const l=r[this.renderPipeId];l!=null&&l.addRenderable&&l.addRenderable(this,e),this.didViewUpdate=!1;const c=this.children,d=c.length;for(let p=0;p<d;p++)c[p].collectRenderables(e,n,i);r.blendMode.popBlendMode(e)}}class ih extends j_{constructor(e=Tn.EMPTY){e instanceof Tn&&(e={texture:e});const{texture:n=Tn.EMPTY,anchor:i,roundPixels:r,width:s,height:l,...c}=e;super({label:"Sprite",...c}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new yr({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=r??!1,s!==void 0&&(this.width=s),l!==void 0&&(this.height=l)}static from(e,n=!1){return e instanceof Tn?new ih(e):new ih(Tn.from(e,n))}set texture(e){e||(e=Tn.EMPTY);const n=this._texture;n!==e&&(n&&n.dynamic&&n.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return HC(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return Qt("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const e=this._anchor,n=this._texture,i=this._bounds,{width:r,height:s}=n.orig;i.minX=-e._x*r,i.maxX=i.minX+r,i.minY=-e._y*s,i.maxY=i.minY+s}destroy(e=!1){if(super.destroy(e),typeof e=="boolean"?e:e==null?void 0:e.texture){const i=typeof e=="boolean"?e:e==null?void 0:e.textureSource;this._texture.destroy(i)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,n){typeof e=="object"?(n=e.height??e.width,e=e.width):n??(n=e),e!==void 0&&this._setWidth(e,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const G4=new Ds;function WC(t,e,n){const i=G4;t.measurable=!0,FC(t,n,i),e.addBoundsMask(i),t.measurable=!1}function $C(t,e,n){const i=ec.get();t.measurable=!0;const r=oa.get().identity(),s=ZC(t,n,r);VC(t,i,s),t.measurable=!1,e.addBoundsMask(i),oa.return(r),ec.return(i)}function ZC(t,e,n){return t?(t!==e&&(ZC(t.parent,e,n),t.updateLocalTransform(),n.append(t.localTransform)),n):(ca("Mask bounds, renderable is not inside the root container"),n)}class QC{constructor(e){this.priority=0,this.inverse=!1,this.pipe="alphaMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof ih),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,n){this.inverse||WC(this.mask,e,n)}addLocalBounds(e,n){$C(this.mask,e,n)}containsPoint(e,n){const i=this.mask;return n(i,e)}destroy(){this.reset()}static test(e){return e instanceof ih}}QC.extension=Rt.MaskEffect;class JC{constructor(e){this.priority=0,this.pipe="colorMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e=="number"}}JC.extension=Rt.MaskEffect;class eA{constructor(e){this.priority=0,this.pipe="stencilMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,n){WC(this.mask,e,n)}addLocalBounds(e,n){$C(this.mask,e,n)}containsPoint(e,n){const i=this.mask;return n(i,e)}destroy(){this.reset()}static test(e){return e instanceof br}}eA.extension=Rt.MaskEffect;const F4={createCanvas:(t,e)=>{const n=document.createElement("canvas");return n.width=t,n.height=e,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")};let AE=F4;const es={get(){return AE},set(t){AE=t}};class tA extends zs{constructor(e){e.resource||(e.resource=es.get().createCanvas()),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId="image",this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,n=this.height,i=this._resolution){const r=super.resize(e,n,i);return r&&this.resizeCanvas(),r}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}tA.extension=Rt.TextureSource;class b0 extends zs{constructor(e){super(e),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(e){return globalThis.HTMLImageElement&&e instanceof HTMLImageElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||globalThis.VideoFrame&&e instanceof VideoFrame}}b0.extension=Rt.TextureSource;var x0=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(x0||{});class xx{constructor(e,n=null,i=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=n,this.priority=i,this._once=r}match(e,n=null){return this._fn===e&&this._context===n}emit(e){this._fn&&(this._context?this._fn.call(this._context,e):this._fn(e));const n=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=e?null:n,this.previous=null,n}}const nA=class Za{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new xx(null,null,1/0),this.deltaMS=1/Za.targetFPMS,this.elapsedMS=1/Za.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,n,i=x0.NORMAL){return this._addListener(new xx(e,n,i))}addOnce(e,n,i=x0.NORMAL){return this._addListener(new xx(e,n,i,!0))}_addListener(e){let n=this._head.next,i=this._head;if(!n)e.connect(i);else{for(;n;){if(e.priority>n.priority){e.connect(i);break}i=n,n=n.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,n){let i=this._head.next;for(;i;)i.match(e,n)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,n=this._head;for(;n=n.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let n;if(e>this.lastTime){if(n=this.elapsedMS=e-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*Za.targetFPMS;const i=this._head;let r=i.next;for(;r;)r=r.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const n=Math.min(Math.max(0,e)/1e3,Za.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&e>this.maxFPS&&(this.maxFPS=e)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){e===0?this._minElapsedMS=0:(e<this.minFPS&&(this.minFPS=e),this._minElapsedMS=1/(e/1e3))}static get shared(){if(!Za._shared){const e=Za._shared=new Za;e.autoStart=!0,e._protected=!0}return Za._shared}static get system(){if(!Za._system){const e=Za._system=new Za;e.autoStart=!0,e._protected=!0}return Za._system}};nA.targetFPMS=.06;let Fd=nA,vx;async function q4(){return vx??(vx=(async()=>{var l;const e=es.get().createCanvas(1,1).getContext("webgl");if(!e)return"premultiply-alpha-on-upload";const n=await new Promise(c=>{const d=document.createElement("video");d.onloadeddata=()=>c(d),d.onerror=()=>c(null),d.autoplay=!1,d.crossOrigin="anonymous",d.preload="auto",d.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",d.load()});if(!n)return"premultiply-alpha-on-upload";const i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i);const r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n);const s=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,s),e.deleteFramebuffer(r),e.deleteTexture(i),(l=e.getExtension("WEBGL_lose_context"))==null||l.loseContext(),s[0]<=s[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),vx}const X0=class iA extends zs{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...iA.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),e.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const e=Fd.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const e=this.resource,n=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(n.preload||e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlayThrough),e.addEventListener("error",this._onError,!0)),this.alphaMode=await q4(),this._load=new Promise((i,r)=>{this.isValid?i(this):(this._resolve=i,this._reject=r,n.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${n.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const e=this.resource;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlayThrough),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Fd.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Fd.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Fd.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};X0.extension=Rt.TextureSource;X0.defaultOptions={...zs.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};X0.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Y4=X0;const Ud=(t,e,n=!1)=>(Array.isArray(t)||(t=[t]),e?t.map(i=>typeof i=="string"||n?e(i):i):t);class V4{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const n=this._cache.get(e);return n||ca(`[Assets] Asset id ${e} was not found in the Cache`),n}set(e,n){const i=Ud(e);let r;for(let d=0;d<this.parsers.length;d++){const p=this.parsers[d];if(p.test(n)){r=p.getCacheableAssets(i,n);break}}const s=new Map(Object.entries(r||{}));r||i.forEach(d=>{s.set(d,n)});const l=[...s.keys()],c={cacheKeys:l,keys:i};i.forEach(d=>{this._cacheMap.set(d,c)}),l.forEach(d=>{const p=r?r[d]:n;this._cache.has(d)&&this._cache.get(d)!==p&&ca("[Cache] already has key:",d),this._cache.set(d,s.get(d))})}remove(e){if(!this._cacheMap.has(e)){ca(`[Assets] Asset id ${e} was not found in the Cache`);return}const n=this._cacheMap.get(e);n.cacheKeys.forEach(r=>{this._cache.delete(r)}),n.keys.forEach(r=>{this._cacheMap.delete(r)})}get parsers(){return this._parsers}}const Id=new V4,Lv=[];si.handleByList(Rt.TextureSource,Lv);function rA(t={}){const e=t&&t.resource,n=e?t.resource:t,i=e?t:{resource:t};for(let r=0;r<Lv.length;r++){const s=Lv[r];if(s.test(n))return new s(i)}throw new Error(`Could not find a source type for resource: ${i.resource}`)}function X4(t={},e=!1){const n=t&&t.resource,i=n?t.resource:t,r=n?t:{resource:t};if(!e&&Id.has(i))return Id.get(i);const s=new Tn({source:rA(r)});return s.on("destroy",()=>{Id.has(i)&&Id.remove(i)}),e||Id.set(i,s),s}function K4(t,e=!1){return typeof t=="string"?Id.get(t):t instanceof zs?new Tn({source:t}):X4(t,e)}Tn.from=K4;zs.from=rA;si.add(QC,JC,eA,Y4,b0,tA,U_);var aA=(t=>(t[t.Low=0]="Low",t[t.Normal=1]="Normal",t[t.High=2]="High",t))(aA||{});function ll(t){if(typeof t!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function qp(t){return t.split("?")[0].split("#")[0]}function W4(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $4(t,e,n){return t.replace(new RegExp(W4(e),"g"),n)}function Z4(t,e){let n="",i=0,r=-1,s=0,l=-1;for(let c=0;c<=t.length;++c){if(c<t.length)l=t.charCodeAt(c);else{if(l===47)break;l=47}if(l===47){if(!(r===c-1||s===1))if(r!==c-1&&s===2){if(n.length<2||i!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const d=n.lastIndexOf("/");if(d!==n.length-1){d===-1?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),r=c,s=0;continue}}else if(n.length===2||n.length===1){n="",i=0,r=c,s=0;continue}}}else n.length>0?n+=`/${t.slice(r+1,c)}`:n=t.slice(r+1,c),i=c-r-1;r=c,s=0}else l===46&&s!==-1?++s:s=-1}return n}const wm={toPosix(t){return $4(t,"\\","/")},isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl(t){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)},isBlobUrl(t){return t.startsWith("blob:")},hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){ll(t),t=this.toPosix(t);const e=/^file:\/\/\//.exec(t);if(e)return e[0];const n=/^[^/:]+:\/{0,2}/.exec(t);return n?n[0]:""},toAbsolute(t,e,n){if(ll(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;const i=qp(this.toPosix(e??es.get().getBaseUrl())),r=qp(this.toPosix(n??this.rootname(i)));return t=this.toPosix(t),t.startsWith("/")?wm.join(r,t.slice(1)):this.isAbsolute(t)?t:this.join(i,t)},normalize(t){if(ll(t),t.length===0)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="";const n=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));const i=t.endsWith("/");return t=Z4(t),t.length>0&&i&&(t+="/"),n?`/${t}`:e+t},isAbsolute(t){return ll(t),t=this.toPosix(t),this.hasProtocol(t)?!0:t.startsWith("/")},join(...t){if(t.length===0)return".";let e;for(let n=0;n<t.length;++n){const i=t[n];if(ll(i),i.length>0)if(e===void 0)e=i;else{const r=t[n-1]??"";this.joinExtensions.includes(this.extname(r).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(t){if(ll(t),t.length===0)return".";t=this.toPosix(t);let e=t.charCodeAt(0);const n=e===47;let i=-1,r=!0;const s=this.getProtocol(t),l=t;t=t.slice(s.length);for(let c=t.length-1;c>=1;--c)if(e=t.charCodeAt(c),e===47){if(!r){i=c;break}}else r=!1;return i===-1?n?"/":this.isUrl(l)?s+t:s:n&&i===1?"//":s+t.slice(0,i)},rootname(t){ll(t),t=this.toPosix(t);let e="";if(t.startsWith("/")?e="/":e=this.getProtocol(t),this.isUrl(t)){const n=t.indexOf("/",e.length);n!==-1?e=t.slice(0,n):e=t,e.endsWith("/")||(e+="/")}return e},basename(t,e){ll(t),e&&ll(e),t=qp(this.toPosix(t));let n=0,i=-1,r=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let l=e.length-1,c=-1;for(s=t.length-1;s>=0;--s){const d=t.charCodeAt(s);if(d===47){if(!r){n=s+1;break}}else c===-1&&(r=!1,c=s+1),l>=0&&(d===e.charCodeAt(l)?--l===-1&&(i=s):(l=-1,i=c))}return n===i?i=c:i===-1&&(i=t.length),t.slice(n,i)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!r){n=s+1;break}}else i===-1&&(r=!1,i=s+1);return i===-1?"":t.slice(n,i)},extname(t){ll(t),t=qp(this.toPosix(t));let e=-1,n=0,i=-1,r=!0,s=0;for(let l=t.length-1;l>=0;--l){const c=t.charCodeAt(l);if(c===47){if(!r){n=l+1;break}continue}i===-1&&(r=!1,i=l+1),c===46?e===-1?e=l:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===n+1?"":t.slice(e,i)},parse(t){ll(t);const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;t=qp(this.toPosix(t));let n=t.charCodeAt(0);const i=this.isAbsolute(t);let r;e.root=this.rootname(t),i||this.hasProtocol(t)?r=1:r=0;let s=-1,l=0,c=-1,d=!0,p=t.length-1,m=0;for(;p>=r;--p){if(n=t.charCodeAt(p),n===47){if(!d){l=p+1;break}continue}c===-1&&(d=!1,c=p+1),n===46?s===-1?s=p:m!==1&&(m=1):s!==-1&&(m=-1)}return s===-1||c===-1||m===0||m===1&&s===c-1&&s===l+1?c!==-1&&(l===0&&i?e.base=e.name=t.slice(1,c):e.base=e.name=t.slice(l,c)):(l===0&&i?(e.name=t.slice(1,s),e.base=t.slice(1,c)):(e.name=t.slice(l,s),e.base=t.slice(l,c)),e.ext=t.slice(s,c)),e.dir=this.dirname(t),e},sep:"/",delimiter:":",joinExtensions:[".html"]};function sA(t,e,n,i,r){const s=e[n];for(let l=0;l<s.length;l++){const c=s[l];n<e.length-1?sA(t.replace(i[n],c),e,n+1,i,r):r.push(t.replace(i[n],c))}}function Q4(t){const e=/\{(.*?)\}/g,n=t.match(e),i=[];if(n){const r=[];n.forEach(s=>{const l=s.substring(1,s.length-1).split(",");r.push(l)}),sA(t,r,0,n,i)}else i.push(t);return i}const ME=t=>!Array.isArray(t);class lA{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,n)=>`${e}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(e,n)=>n.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const n=e;this._defaultSearchParams=Object.keys(n).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(n[i])}`).join("&")}}getAlias(e){const{alias:n,src:i}=e;return Ud(n||i,s=>typeof s=="string"?s:Array.isArray(s)?s.map(l=>(l==null?void 0:l.src)??l):s!=null&&s.src?s.src:s,!0)}removeAlias(e,n){this._assetMap[e]&&(n&&n!==this._resolverHash[e]||(delete this._resolverHash[e],delete this._assetMap[e]))}addManifest(e){this._manifest&&ca("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(e,n){const i=[];let r=n;Array.isArray(n)||(r=Object.entries(n).map(([s,l])=>typeof l=="string"||Array.isArray(l)?{alias:s,src:l}:{alias:s,...l})),r.forEach(s=>{const l=s.src,c=s.alias;let d;if(typeof c=="string"){const p=this._createBundleAssetId(e,c);i.push(p),d=[c,p]}else{const p=c.map(m=>this._createBundleAssetId(e,m));i.push(...p),d=[...c,...p]}this.add({...s,alias:d,src:l})}),this._bundles[e]=i}add(e){const n=[];Array.isArray(e)?n.push(...e):n.push(e);let i;i=s=>{this.hasKey(s)&&ca(`[Resolver] already has key: ${s} overwriting`)},Ud(n).forEach(s=>{const{src:l}=s;let{data:c,format:d,loadParser:p,parser:m}=s;const g=Ud(l).map(C=>typeof C=="string"?Q4(C):Array.isArray(C)?C:[C]),b=this.getAlias(s);Array.isArray(b)?b.forEach(i):i(b);const v=[],S=C=>{const T=this._parsers.find(w=>w.test(C));return{src:C,...T==null?void 0:T.parse(C)}};g.forEach(C=>{C.forEach(T=>{let w={};if(typeof T!="object"?w=S(T):(c=T.data??c,d=T.format??d,(T.loadParser||T.parser)&&(p=T.loadParser??p,m=T.parser??m),w={...S(T.src),...T}),!b)throw new Error(`[Resolver] alias is undefined for this asset: ${w.src}`);w=this._buildResolvedAsset(w,{aliases:b,data:c,format:d,loadParser:p,parser:m,progressSize:s.progressSize}),v.push(w)})}),b.forEach(C=>{this._assetMap[C]=v})})}resolveBundle(e){const n=ME(e);e=Ud(e);const i={};return e.forEach(r=>{const s=this._bundles[r];if(s){const l=this.resolve(s),c={};for(const d in l){const p=l[d];c[this._extractAssetIdFromBundle(r,d)]=p}i[r]=c}}),n?i[e[0]]:i}resolveUrl(e){const n=this.resolve(e);if(typeof e!="string"){const i={};for(const r in n)i[r]=n[r].src;return i}return n.src}resolve(e){const n=ME(e);e=Ud(e);const i={};return e.forEach(r=>{if(!this._resolverHash[r])if(this._assetMap[r]){let s=this._assetMap[r];const l=this._getPreferredOrder(s);l==null||l.priority.forEach(c=>{l.params[c].forEach(d=>{const p=s.filter(m=>m[c]?m[c]===d:!1);p.length&&(s=p)})}),this._resolverHash[r]=s[0]}else this._resolverHash[r]=this._buildResolvedAsset({alias:[r],src:r},{});i[r]=this._resolverHash[r]}),n?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let n=0;n<e.length;n++){const i=e[n],r=this._preferredOrder.find(s=>s.params.format.includes(i.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const n=/\?/.test(e)?"&":"?";return`${e}${n}${this._defaultSearchParams}`}_buildResolvedAsset(e,n){const{aliases:i,data:r,loadParser:s,parser:l,format:c,progressSize:d}=n;return(this._basePath||this._rootPath)&&(e.src=wm.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...r||{},...e.data},e.loadParser=s??e.loadParser,e.parser=l??e.parser,e.format=c??e.format??J4(e.src),d!==void 0&&(e.progressSize=d),e}}lA.RETINA_PREFIX=/@([0-9\.]+)x/;function J4(t){return t.split(".").pop().split("?").shift().split("#").shift()}const RE=(t,e)=>{const n=e.split("?")[1];return n&&(t+=`?${n}`),t},oA=class om{constructor(e,n){this.linkedSheets=[];let i=e;(e==null?void 0:e.source)instanceof zs&&(i={texture:e,data:n});const{texture:r,data:s,cachePrefix:l=""}=i;this.cachePrefix=l,this._texture=r instanceof Tn?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=s;const c=parseFloat(s.meta.scale);c?(this.resolution=c,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=om.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(e,n=!1){let i=e;const r=n?1/0:om.BATCH_SIZE;for(;i-e<r&&i<this._frameKeys.length;){const s=this._frameKeys[i],l=this._frames[s],c=l.frame;if(c){let d=null,p=null;const m=l.trimmed!==!1&&l.sourceSize?l.sourceSize:l.frame,g=new Ei(0,0,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution);l.rotated?d=new Ei(Math.floor(c.x)/this.resolution,Math.floor(c.y)/this.resolution,Math.floor(c.h)/this.resolution,Math.floor(c.w)/this.resolution):d=new Ei(Math.floor(c.x)/this.resolution,Math.floor(c.y)/this.resolution,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution),l.trimmed!==!1&&l.spriteSourceSize&&(p=new Ei(Math.floor(l.spriteSourceSize.x)/this.resolution,Math.floor(l.spriteSourceSize.y)/this.resolution,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution)),this.textures[s]=new Tn({source:this.textureSource,frame:d,orig:g,trim:p,rotate:l.rotated?2:0,defaultAnchor:l.anchor,defaultBorders:l.borders,label:s.toString()})}i++}}_processAnimations(){const e=this.data.animations||{};for(const n in e){this.animations[n]=[];for(let i=0;i<e[n].length;i++){const r=e[n][i];this.animations[n].push(this.textures[r])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*om.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*om.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var n;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((n=this._texture)==null||n.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};oA.BATCH_SIZE=1e3;let NE=oA;const ez=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function cA(t,e,n){const i={};if(t.forEach(r=>{i[r]=e}),Object.keys(e.textures).forEach(r=>{i[`${e.cachePrefix}${r}`]=e.textures[r]}),!n){const r=wm.dirname(t[0]);e.linkedSheets.forEach((s,l)=>{const c=cA([`${r}/${e.data.meta.related_multi_packs[l]}`],s,!0);Object.assign(i,c)})}return i}const tz={extension:Rt.Asset,cache:{test:t=>t instanceof NE,getCacheableAssets:(t,e)=>cA(t,e,!1)},resolver:{extension:{type:Rt.ResolveParser,name:"resolveSpritesheet"},test:t=>{const n=t.split("?")[0].split("."),i=n.pop(),r=n.pop();return i==="json"&&ez.includes(r)},parse:t=>{var n;const e=t.split(".");return{resolution:parseFloat(((n=lA.RETINA_PREFIX.exec(t))==null?void 0:n[1])??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:Rt.LoadParser,priority:aA.Normal,name:"spritesheetLoader"},async testParse(t,e){return wm.extname(e.src).toLowerCase()===".json"&&!!t.frames},async parse(t,e,n){var g,b;const{texture:i,imageFilename:r,textureOptions:s,cachePrefix:l}=(e==null?void 0:e.data)??{};let c=wm.dirname(e.src);c&&c.lastIndexOf("/")!==c.length-1&&(c+="/");let d;if(i instanceof Tn)d=i;else{const v=RE(c+(r??t.meta.image),e.src);d=(await n.load([{src:v,data:s}]))[v]}const p=new NE({texture:d.source,data:t,cachePrefix:l});await p.parse();const m=(g=t==null?void 0:t.meta)==null?void 0:g.related_multi_packs;if(Array.isArray(m)){const v=[];for(const C of m){if(typeof C!="string")continue;let T=c+C;(b=e.data)!=null&&b.ignoreMultiPack||(T=RE(T,e.src),v.push(n.load({src:T,data:{textureOptions:s,ignoreMultiPack:!0}})))}const S=await Promise.all(v);p.linkedSheets=S,S.forEach(C=>{C.linkedSheets=[p].concat(p.linkedSheets.filter(T=>T!==C))})}return p},async unload(t,e,n){await n.unload(t.textureSource._sourceOrigin),t.destroy(!1)}}};si.add(tz);const _x=Object.create(null),kE=Object.create(null);function P_(t,e){let n=kE[t];return n===void 0&&(_x[e]===void 0&&(_x[e]=1),kE[t]=n=_x[e]++),n}let Rd;function uA(){return(!Rd||Rd!=null&&Rd.isContextLost())&&(Rd=es.get().createCanvas().getContext("webgl",{})),Rd}let My;function nz(){if(!My){My="mediump";const t=uA();t&&t.getShaderPrecisionFormat&&(My=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?"highp":"mediump")}return My}function iz(t,e,n){return e?t:n?(t=t.replace("out vec4 finalColor;",""),`
|
|
65
|
+
|
|
66
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
67
|
+
#define in varying
|
|
68
|
+
#define finalColor gl_FragColor
|
|
69
|
+
#define texture texture2D
|
|
70
|
+
#endif
|
|
71
|
+
${t}
|
|
72
|
+
`):`
|
|
73
|
+
|
|
74
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
75
|
+
#define in attribute
|
|
76
|
+
#define out varying
|
|
77
|
+
#endif
|
|
78
|
+
${t}
|
|
79
|
+
`}function rz(t,e,n){const i=n?e.maxSupportedFragmentPrecision:e.maxSupportedVertexPrecision;if(t.substring(0,9)!=="precision"){let r=n?e.requestedFragmentPrecision:e.requestedVertexPrecision;return r==="highp"&&i!=="highp"&&(r="mediump"),`precision ${r} float;
|
|
80
|
+
${t}`}else if(i!=="highp"&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}function az(t,e){return e?`#version 300 es
|
|
81
|
+
${t}`:t}const sz={},lz={};function oz(t,{name:e="pixi-program"},n=!0){e=e.replace(/\s+/g,"-"),e+=n?"-fragment":"-vertex";const i=n?sz:lz;return i[e]?(i[e]++,e+=`-${i[e]}`):i[e]=1,t.indexOf("#define SHADER_NAME")!==-1?t:`${`#define SHADER_NAME ${e}`}
|
|
82
|
+
${t}`}function cz(t,e){return e?t.replace("#version 300 es",""):t}const Sx={stripVersion:cz,ensurePrecision:rz,addProgramDefines:iz,setProgramName:oz,insertVersion:az},Yp=Object.create(null),fA=class Uv{constructor(e){e={...Uv.defaultOptions,...e};const n=e.fragment.indexOf("#version 300 es")!==-1,i={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:e.preferredFragmentPrecision,requestedVertexPrecision:e.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:nz()},setProgramName:{name:e.name},addProgramDefines:n,insertVersion:n};let r=e.fragment,s=e.vertex;Object.keys(Sx).forEach(l=>{const c=i[l];r=Sx[l](r,c,!0),s=Sx[l](s,c,!1)}),this.fragment=r,this.vertex=s,this.transformFeedbackVaryings=e.transformFeedbackVaryings,this._key=P_(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,Yp[this._cacheKey]=null}static from(e){const n=`${e.vertex}:${e.fragment}`;return Yp[n]||(Yp[n]=new Uv(e),Yp[n]._cacheKey=n),Yp[n]}};fA.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let G_=fA;const OE={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function uz(t){return OE[t]??OE.float32}const fz={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},DE=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function zE(t,e){let n;for(;(n=DE.exec(t))!==null;){const i=fz[n[3]]??"float32";e[n[2]]={location:parseInt(n[1],10),format:i,stride:uz(i).stride,offset:0,instance:!1,start:0}}DE.lastIndex=0}function dz(t){return t.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function hz({source:t,entryPoint:e}){const n={},i=dz(t),r=i.indexOf(`fn ${e}(`);if(r===-1)return n;const s=i.indexOf("->",r);if(s===-1)return n;const l=i.substring(r,s);if(zE(l,n),Object.keys(n).length===0){const c=l.match(/\(\s*\w+\s*:\s*(\w+)/);if(c){const d=c[1],p=new RegExp(`struct\\s+${d}\\s*\\{([^}]+)\\}`,"s"),m=i.match(p);m&&zE(m[1],n)}}return n}function Ex(t){var g,b;const e=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,i=/@binding\((\d+)\)/,r=/var(<[^>]+>)? (\w+)/,s=/:\s*([\w<>]+)/,l=/struct\s+(\w+)\s*{([^}]+)}/g,c=/(\w+)\s*:\s*([\w\<\>]+)/g,d=/struct\s+(\w+)/,p=(g=t.match(e))==null?void 0:g.map(v=>({group:parseInt(v.match(n)[1],10),binding:parseInt(v.match(i)[1],10),name:v.match(r)[2],isUniform:v.match(r)[1]==="<uniform>",type:v.match(s)[1]}));if(!p)return{groups:[],structs:[]};const m=((b=t.match(l))==null?void 0:b.map(v=>{const S=v.match(d)[1],C=v.match(c).reduce((T,w)=>{const[k,M]=w.split(":");return T[k.trim()]=M.trim(),T},{});return C?{name:S,members:C}:null}).filter(({name:v})=>p.some(S=>S.type===v||S.type.includes(`<${v}>`))))??[];return{groups:p,structs:m}}var lf=(t=>(t[t.VERTEX=1]="VERTEX",t[t.FRAGMENT=2]="FRAGMENT",t[t.COMPUTE=4]="COMPUTE",t))(lf||{});function pz({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]=[]),i.isUniform?e[i.group].push({binding:i.binding,visibility:lf.VERTEX|lf.FRAGMENT,buffer:{type:"uniform"}}):i.type==="sampler"?e[i.group].push({binding:i.binding,visibility:lf.FRAGMENT,sampler:{type:"filtering"}}):i.type==="texture_2d"||i.type.startsWith("texture_2d<")?e[i.group].push({binding:i.binding,visibility:lf.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):i.type==="texture_2d_array"||i.type.startsWith("texture_2d_array<")?e[i.group].push({binding:i.binding,visibility:lf.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(i.type==="texture_cube"||i.type.startsWith("texture_cube<"))&&e[i.group].push({binding:i.binding,visibility:lf.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<e.length;n++)e[n]||(e[n]=[]);return e}function mz({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]={}),e[i.group][i.name]=i.binding}return e}function gz(t,e){const n=new Set,i=new Set,r=[...t.structs,...e.structs].filter(l=>n.has(l.name)?!1:(n.add(l.name),!0)),s=[...t.groups,...e.groups].filter(l=>{const c=`${l.name}-${l.binding}`;return i.has(c)?!1:(i.add(c),!0)});return{structs:r,groups:s}}const Vp=Object.create(null);class qm{constructor(e){var c,d;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:i,layout:r,gpuLayout:s,name:l}=e;if(this.name=l,this.fragment=n,this.vertex=i,n.source===i.source){const p=Ex(n.source);this.structsAndGroups=p}else{const p=Ex(i.source),m=Ex(n.source);this.structsAndGroups=gz(p,m)}this.layout=r??mz(this.structsAndGroups),this.gpuLayout=s??pz(this.structsAndGroups),this.autoAssignGlobalUniforms=((c=this.layout[0])==null?void 0:c.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((d=this.layout[1])==null?void 0:d.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:e,fragment:n}=this,i=e.source+n.source+e.entryPoint+n.entryPoint;this._layoutKey=P_(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=hz(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Vp[this._cacheKey]=null}static from(e){const n=`${e.vertex.source}:${e.fragment.source}:${e.fragment.entryPoint}:${e.vertex.entryPoint}`;return Vp[n]||(Vp[n]=new qm(e),Vp[n]._cacheKey=n),Vp[n]}}const dA=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],yz=dA.reduce((t,e)=>(t[e]=!0,t),{});function bz(t,e){switch(t){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*e);case"vec3<f32>":return new Float32Array(3*e);case"vec4<f32>":return new Float32Array(4*e);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const hA=class pA{constructor(e,n){this._touched=0,this.uid=gi("uniform"),this._resourceType="uniformGroup",this._resourceId=gi("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...pA.defaultOptions,...n},this.uniformStructures=e;const i={};for(const r in e){const s=e[r];if(s.name=r,s.size=s.size??1,!yz[s.type]){const l=s.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(l){const[,c,d]=l;throw new Error(`Uniform type ${s.type} is not supported. Use type: '${c}', size: ${d} instead.`)}throw new Error(`Uniform type ${s.type} is not supported. Supported uniform types are: ${dA.join(", ")}`)}s.value??(s.value=bz(s.type,s.size)),i[r]=s.value}this.uniforms=i,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=P_(Object.keys(i).map(r=>`${r}-${e[r].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};hA.defaultOptions={ubo:!1,isStatic:!1};let mA=hA;class c0{constructor(e){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const i in e){const r=e[i];this.setResource(r,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const e=[];let n=0;for(const i in this.resources)e[n++]=this.resources[i]._resourceId;this._key=e.join("|")}setResource(e,n){var r,s;const i=this.resources[n];e!==i&&((r=i==null?void 0:i.off)==null||r.call(i,"change",this.onResourceChange,this),(s=e.on)==null||s.call(e,"change",this.onResourceChange,this),this.resources[n]=e,this._dirty=!0)}getResource(e){return this.resources[e]}_touch(e,n){const i=this.resources;for(const r in i)i[r]._gcLastUsed=e,i[r]._touched=n}destroy(){var n;const e=this.resources;for(const i in e){const r=e[i];(n=r==null?void 0:r.off)==null||n.call(r,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(e){this._dirty=!0,e.destroyed?this.destroy():this._updateKey()}}var Iv=(t=>(t[t.WEBGL=1]="WEBGL",t[t.WEBGPU=2]="WEBGPU",t[t.CANVAS=4]="CANVAS",t[t.BOTH=3]="BOTH",t))(Iv||{});class K0 extends ho{constructor(e){super(),this.uid=gi("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:i,groups:r,resources:s,compatibleRenderers:l,groupMap:c}=e;this.gpuProgram=n,this.glProgram=i,l===void 0&&(l=0,n&&(l|=Iv.WEBGPU),i&&(l|=Iv.WEBGL)),this.compatibleRenderers=l;const d={};if(!s&&!r&&(s={}),s&&r)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&r&&!c)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&r&&c)for(const p in c)for(const m in c[p]){const g=c[p][m];d[g]={group:p,binding:m,name:g}}else if(n&&r&&!c){const p=n.structsAndGroups.groups;c={},p.forEach(m=>{c[m.group]=c[m.group]||{},c[m.group][m.binding]=m.name,d[m.name]=m})}else if(s){r={},c={},n&&n.structsAndGroups.groups.forEach(g=>{c[g.group]=c[g.group]||{},c[g.group][g.binding]=g.name,d[g.name]=g});let p=0;for(const m in s)d[m]||(r[99]||(r[99]=new c0,this._ownedBindGroups.push(r[99])),d[m]={group:99,binding:p,name:m},c[99]=c[99]||{},c[99][p]=m,p++);for(const m in s){const g=m;let b=s[m];!b.source&&!b._resourceType&&(b=new mA(b));const v=d[g];v&&(r[v.group]||(r[v.group]=new c0,this._ownedBindGroups.push(r[v.group])),r[v.group].setResource(b,v.binding))}}this.groups=r,this._uniformBindMap=c,this.resources=this._buildResourceAccessor(r,d)}addResource(e,n,i){var r,s;(r=this._uniformBindMap)[n]||(r[n]={}),(s=this._uniformBindMap[n])[i]||(s[i]=e),this.groups[n]||(this.groups[n]=new c0,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(e,n){const i={};for(const r in n){const s=n[r];Object.defineProperty(i,s.name,{get(){return e[s.group].getResource(s.binding)},set(l){e[s.group].setResource(l,s.binding)}})}return i}destroy(e=!1){var n,i;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),e&&((n=this.gpuProgram)==null||n.destroy(),(i=this.glProgram)==null||i.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(r=>{r.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(e){const{gpu:n,gl:i,...r}=e;let s,l;return n&&(s=qm.from(n)),i&&(l=G_.from(i)),new K0({gpuProgram:s,glProgram:l,...r})}}const xz={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},wx=0,Tx=1,Cx=2,Ax=3,Mx=4,Rx=5,Hv=class gA{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<wx)}set blend(e){!!(this.data&1<<wx)!==e&&(this.data^=1<<wx)}get offsets(){return!!(this.data&1<<Tx)}set offsets(e){!!(this.data&1<<Tx)!==e&&(this.data^=1<<Tx)}set cullMode(e){if(e==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=e==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<Cx)}set culling(e){!!(this.data&1<<Cx)!==e&&(this.data^=1<<Cx)}get depthTest(){return!!(this.data&1<<Ax)}set depthTest(e){!!(this.data&1<<Ax)!==e&&(this.data^=1<<Ax)}get depthMask(){return!!(this.data&1<<Rx)}set depthMask(e){!!(this.data&1<<Rx)!==e&&(this.data^=1<<Rx)}get clockwiseFrontFace(){return!!(this.data&1<<Mx)}set clockwiseFrontFace(e){!!(this.data&1<<Mx)!==e&&(this.data^=1<<Mx)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!=="none",this._blendMode=e,this._blendModeId=xz[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new gA;return e.depthTest=!1,e.blend=!0,e}};Hv.default2d=Hv.for2d();let F_=Hv;const yA=class jv extends K0{constructor(e){e={...jv.defaultOptions,...e},super(e),this.enabled=!0,this._state=F_.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,n,i,r){e.applyFilter(this,n,i,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:n,gl:i,...r}=e;let s,l;return n&&(s=qm.from(n)),i&&(l=G_.from(i)),new jv({gpuProgram:s,glProgram:l,...r})}};yA.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let Ef=yA;const Pv=[];si.handleByNamedList(Rt.Environment,Pv);async function vz(t){if(!t)for(let e=0;e<Pv.length;e++){const n=Pv[e];if(n.value.test()){await n.value.load();return}}}let Xp;function _z(){if(typeof Xp=="boolean")return Xp;try{Xp=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Xp=!1}return Xp}function BE(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=bA(t,0,r,n,!0);const l=[];if(!s||s.next===s.prev)return l;let c,d,p;if(i&&(s=Cz(t,e,s,n)),t.length>80*n){c=t[0],d=t[1];let m=c,g=d;for(let b=n;b<r;b+=n){const v=t[b],S=t[b+1];v<c&&(c=v),S<d&&(d=S),v>m&&(m=v),S>g&&(g=S)}p=Math.max(m-c,g-d),p=p!==0?32767/p:0}return Tm(s,l,n,c,d,p,0),l}function bA(t,e,n,i,r){let s;if(r===Uz(t,e,n,i)>0)for(let l=e;l<n;l+=i)s=LE(l/i|0,t[l],t[l+1],s);else for(let l=n-i;l>=e;l-=i)s=LE(l/i|0,t[l],t[l+1],s);return s&&rh(s,s.next)&&(Am(s),s=s.next),s}function mf(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(rh(n,n.next)||ai(n.prev,n,n.next)===0)){if(Am(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function Tm(t,e,n,i,r,s,l){if(!t)return;!l&&s&&kz(t,i,r,s);let c=t;for(;t.prev!==t.next;){const d=t.prev,p=t.next;if(s?Ez(t,i,r,s):Sz(t)){e.push(d.i,t.i,p.i),Am(t),t=p.next,c=p.next;continue}if(t=p,t===c){l?l===1?(t=wz(mf(t),e),Tm(t,e,n,i,r,s,2)):l===2&&Tz(t,e,n,i,r,s):Tm(mf(t),e,n,i,r,s,1);break}}}function Sz(t){const e=t.prev,n=t,i=t.next;if(ai(e,n,i)>=0)return!1;const r=e.x,s=n.x,l=i.x,c=e.y,d=n.y,p=i.y,m=Math.min(r,s,l),g=Math.min(c,d,p),b=Math.max(r,s,l),v=Math.max(c,d,p);let S=i.next;for(;S!==e;){if(S.x>=m&&S.x<=b&&S.y>=g&&S.y<=v&&cm(r,c,s,d,l,p,S.x,S.y)&&ai(S.prev,S,S.next)>=0)return!1;S=S.next}return!0}function Ez(t,e,n,i){const r=t.prev,s=t,l=t.next;if(ai(r,s,l)>=0)return!1;const c=r.x,d=s.x,p=l.x,m=r.y,g=s.y,b=l.y,v=Math.min(c,d,p),S=Math.min(m,g,b),C=Math.max(c,d,p),T=Math.max(m,g,b),w=Gv(v,S,e,n,i),k=Gv(C,T,e,n,i);let M=t.prevZ,O=t.nextZ;for(;M&&M.z>=w&&O&&O.z<=k;){if(M.x>=v&&M.x<=C&&M.y>=S&&M.y<=T&&M!==r&&M!==l&&cm(c,m,d,g,p,b,M.x,M.y)&&ai(M.prev,M,M.next)>=0||(M=M.prevZ,O.x>=v&&O.x<=C&&O.y>=S&&O.y<=T&&O!==r&&O!==l&&cm(c,m,d,g,p,b,O.x,O.y)&&ai(O.prev,O,O.next)>=0))return!1;O=O.nextZ}for(;M&&M.z>=w;){if(M.x>=v&&M.x<=C&&M.y>=S&&M.y<=T&&M!==r&&M!==l&&cm(c,m,d,g,p,b,M.x,M.y)&&ai(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;O&&O.z<=k;){if(O.x>=v&&O.x<=C&&O.y>=S&&O.y<=T&&O!==r&&O!==l&&cm(c,m,d,g,p,b,O.x,O.y)&&ai(O.prev,O,O.next)>=0)return!1;O=O.nextZ}return!0}function wz(t,e){let n=t;do{const i=n.prev,r=n.next.next;!rh(i,r)&&vA(i,n,n.next,r)&&Cm(i,r)&&Cm(r,i)&&(e.push(i.i,n.i,r.i),Am(n),Am(n.next),n=t=r),n=n.next}while(n!==t);return mf(n)}function Tz(t,e,n,i,r,s){let l=t;do{let c=l.next.next;for(;c!==l.prev;){if(l.i!==c.i&&zz(l,c)){let d=_A(l,c);l=mf(l,l.next),d=mf(d,d.next),Tm(l,e,n,i,r,s,0),Tm(d,e,n,i,r,s,0);return}c=c.next}l=l.next}while(l!==t)}function Cz(t,e,n,i){const r=[];for(let s=0,l=e.length;s<l;s++){const c=e[s]*i,d=s<l-1?e[s+1]*i:t.length,p=bA(t,c,d,i,!1);p===p.next&&(p.steiner=!0),r.push(Dz(p))}r.sort(Az);for(let s=0;s<r.length;s++)n=Mz(r[s],n);return n}function Az(t,e){let n=t.x-e.x;if(n===0&&(n=t.y-e.y,n===0)){const i=(t.next.y-t.y)/(t.next.x-t.x),r=(e.next.y-e.y)/(e.next.x-e.x);n=i-r}return n}function Mz(t,e){const n=Rz(t,e);if(!n)return e;const i=_A(n,t);return mf(i,i.next),mf(n,n.next)}function Rz(t,e){let n=e;const i=t.x,r=t.y;let s=-1/0,l;if(rh(t,n))return n;do{if(rh(t,n.next))return n.next;if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const g=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g<=i&&g>s&&(s=g,l=n.x<n.next.x?n:n.next,g===i))return l}n=n.next}while(n!==e);if(!l)return null;const c=l,d=l.x,p=l.y;let m=1/0;n=l;do{if(i>=n.x&&n.x>=d&&i!==n.x&&xA(r<p?i:s,r,d,p,r<p?s:i,r,n.x,n.y)){const g=Math.abs(r-n.y)/(i-n.x);Cm(n,t)&&(g<m||g===m&&(n.x>l.x||n.x===l.x&&Nz(l,n)))&&(l=n,m=g)}n=n.next}while(n!==c);return l}function Nz(t,e){return ai(t.prev,t,e.prev)<0&&ai(e.next,t,t.next)<0}function kz(t,e,n,i){let r=t;do r.z===0&&(r.z=Gv(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,Oz(r)}function Oz(t){let e,n=1;do{let i=t,r;t=null;let s=null;for(e=0;i;){e++;let l=i,c=0;for(let p=0;p<n&&(c++,l=l.nextZ,!!l);p++);let d=n;for(;c>0||d>0&&l;)c!==0&&(d===0||!l||i.z<=l.z)?(r=i,i=i.nextZ,c--):(r=l,l=l.nextZ,d--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=l}s.nextZ=null,n*=2}while(e>1);return t}function Gv(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Dz(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function xA(t,e,n,i,r,s,l,c){return(r-l)*(e-c)>=(t-l)*(s-c)&&(t-l)*(i-c)>=(n-l)*(e-c)&&(n-l)*(s-c)>=(r-l)*(i-c)}function cm(t,e,n,i,r,s,l,c){return!(t===l&&e===c)&&xA(t,e,n,i,r,s,l,c)}function zz(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Bz(t,e)&&(Cm(t,e)&&Cm(e,t)&&Lz(t,e)&&(ai(t.prev,t,e.prev)||ai(t,e.prev,e))||rh(t,e)&&ai(t.prev,t,t.next)>0&&ai(e.prev,e,e.next)>0)}function ai(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function rh(t,e){return t.x===e.x&&t.y===e.y}function vA(t,e,n,i){const r=Ny(ai(t,e,n)),s=Ny(ai(t,e,i)),l=Ny(ai(n,i,t)),c=Ny(ai(n,i,e));return!!(r!==s&&l!==c||r===0&&Ry(t,n,e)||s===0&&Ry(t,i,e)||l===0&&Ry(n,t,i)||c===0&&Ry(n,e,i))}function Ry(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Ny(t){return t>0?1:t<0?-1:0}function Bz(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&vA(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Cm(t,e){return ai(t.prev,t,t.next)<0?ai(t,e,t.next)>=0&&ai(t,t.prev,e)>=0:ai(t,e,t.prev)<0||ai(t,t.next,e)<0}function Lz(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function _A(t,e){const n=Fv(t.i,t.x,t.y),i=Fv(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function LE(t,e,n,i){const r=Fv(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Am(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Fv(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Uz(t,e,n,i){let r=0;for(let s=e,l=n-i;s<n;s+=i)r+=(t[l]-t[s])*(t[s+1]+t[l+1]),l=s;return r}const Iz=BE.default||BE;var SA=(t=>(t[t.NONE=0]="NONE",t[t.COLOR=16384]="COLOR",t[t.STENCIL=1024]="STENCIL",t[t.DEPTH=256]="DEPTH",t[t.COLOR_DEPTH=16640]="COLOR_DEPTH",t[t.COLOR_STENCIL=17408]="COLOR_STENCIL",t[t.DEPTH_STENCIL=1280]="DEPTH_STENCIL",t[t.ALL=17664]="ALL",t))(SA||{});class Hz{constructor(e){this.items=[],this._name=e}emit(e,n,i,r,s,l,c,d){const{name:p,items:m}=this;for(let g=0,b=m.length;g<b;g++)m[g][p](e,n,i,r,s,l,c,d);return this}add(e){return e[this._name]&&(this.remove(e),this.items.push(e)),this}remove(e){const n=this.items.indexOf(e);return n!==-1&&this.items.splice(n,1),this}contains(e){return this.items.indexOf(e)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const jz=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],EA=class wA extends ho{constructor(e){super(),this.tick=0,this.uid=gi("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=e.type,this.name=e.name,this.config=e;const n=[...jz,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(e={}){const n=e.skipExtensionImports===!0?!0:e.manageImports===!1;await vz(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const i in this._systemsHash)e={...this._systemsHash[i].constructor.defaultOptions,...e};e={...wA.defaultOptions,...e},this._roundPixels=e.roundPixels?1:0;for(let i=0;i<this.runners.init.items.length;i++)await this.runners.init.items[i].init(e);this._initOptions=e}render(e,n){this.tick++;let i=e;if(i instanceof br&&(i={container:i},n&&(Qt(mi,"passing a second argument is deprecated, please use render options instead"),i.target=n.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor??(i.clearColor=this.background.colorRgba),i.clear??(i.clear=this.background.clearBeforeRender)),i.clearColor){const r=Array.isArray(i.clearColor)&&i.clearColor.length===4;i.clearColor=r?i.clearColor:Gi.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.visible&&(i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i))}resize(e,n,i){const r=this.view.resolution;this.view.resize(e,n,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),i!==void 0&&i!==r&&this.runners.resolutionChange.emit(i)}clear(e={}){const n=this;e.target||(e.target=n.renderTarget.renderTarget),e.clearColor||(e.clearColor=this.background.colorRgba),e.clear??(e.clear=SA.ALL);const{clear:i,clearColor:r,target:s,mipLevel:l,layer:c}=e;Gi.shared.setValue(r??this.background.colorRgba),n.renderTarget.clear(s,i,Gi.shared.toArray(),l??0,c??0)}get resolution(){return this.view.resolution}set resolution(e){this.view.resolution=e,this.runners.resolutionChange.emit(e)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...e){e.forEach(n=>{this.runners[n]=new Hz(n)})}_addSystems(e){let n;for(n in e){const i=e[n];this._addSystem(i.value,i.name)}}_addSystem(e,n){const i=new e(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=i,this._systemsHash[n]=i;for(const r in this.runners)this.runners[r].add(i);return this}_addPipes(e,n){const i=n.reduce((r,s)=>(r[s.name]=s.value,r),{});e.forEach(r=>{const s=r.value,l=r.name,c=i[l];this.renderPipes[l]=new s(this,c?new c:null),this.runners.destroy.add(this.renderPipes[l])})}destroy(e=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(e),(e===!0||typeof e=="object"&&e.releaseGlobalResources)&&Fm.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(e){return this.textureGenerator.generateTexture(e)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!_z())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};EA.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let TA=EA,ky;function Pz(t){return ky!==void 0||(ky=(()=>{var n;const e={stencil:!0,failIfMajorPerformanceCaveat:t??TA.defaultOptions.failIfMajorPerformanceCaveat};try{if(!es.get().getWebGLRenderingContext())return!1;let r=es.get().createCanvas().getContext("webgl",e);const s=!!((n=r==null?void 0:r.getContextAttributes())!=null&&n.stencil);if(r){const l=r.getExtension("WEBGL_lose_context");l&&l.loseContext()}return r=null,s}catch{return!1}})()),ky}let Oy;async function Gz(t={}){return Oy!==void 0||(Oy=await(async()=>{const e=es.get().getNavigator().gpu;if(!e)return!1;try{return await(await e.requestAdapter(t)).requestDevice(),!0}catch{return!1}})()),Oy}const UE=["webgl","webgpu","canvas"];async function Fz(t){let e=[];t.preference?(e.push(t.preference),UE.forEach(s=>{s!==t.preference&&e.push(s)})):e=UE.slice();let n,i={};for(let s=0;s<e.length;s++){const l=e[s];if(l==="webgpu"&&await Gz()){const{WebGPURenderer:c}=await Kd(async()=>{const{WebGPURenderer:d}=await import("./WebGPURenderer-DFAfTUvS.js");return{WebGPURenderer:d}},__vite__mapDeps([2,3,4]));n=c,i={...t,...t.webgpu};break}else if(l==="webgl"&&Pz(t.failIfMajorPerformanceCaveat??TA.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:c}=await Kd(async()=>{const{WebGLRenderer:d}=await import("./WebGLRenderer-DzCm1r8W.js");return{WebGLRenderer:d}},__vite__mapDeps([5,3,4]));n=c,i={...t,...t.webgl};break}else if(l==="canvas"){const{CanvasRenderer:c}=await Kd(async()=>{const{CanvasRenderer:d}=await import("./CanvasRenderer-C8lgY4Ra.js");return{CanvasRenderer:d}},__vite__mapDeps([6,4]));n=c,i={...t,...t.canvasOptions};break}}if(delete i.webgpu,delete i.webgl,delete i.canvasOptions,!n)throw new Error("No available renderer for the current environment");const r=new n;return await r.init(i),r}const CA="8.17.0";class AA{static init(){var e;(e=globalThis.__PIXI_APP_INIT__)==null||e.call(globalThis,this,CA)}static destroy(){}}AA.extension=Rt.Application;class qz{constructor(e){this._renderer=e}init(){var e;(e=globalThis.__PIXI_RENDERER_INIT__)==null||e.call(globalThis,this._renderer,CA)}destroy(){this._renderer=null}}qz.extension={type:[Rt.WebGLSystem,Rt.WebGPUSystem],name:"initHook",priority:-10};class MA{static init(e){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let n,i;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:r,clientHeight:s}=this._resizeTo;n=r,i=s}this.renderer.resize(n,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}MA.extension=Rt.Application;class RA{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,x0.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Fd.shared:new Fd,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}RA.extension=Rt.Application;si.add(MA);si.add(RA);const NA=class qv{constructor(...e){this.stage=new br,e[0]!==void 0&&Qt(mi,"Application constructor options are deprecated, please use Application.init() instead.")}async init(e){e={...e},this.stage||(this.stage=new br),this.renderer=await Fz(e),qv._plugins.forEach(n=>{n.init.call(this,e)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return Qt(mi,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(e=!1,n=!1){const i=qv._plugins.slice(0);i.reverse(),i.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(e),this.renderer=null}};NA._plugins=[];let q_=NA;si.handleByList(Rt.Application,q_._plugins);si.add(AA);var Nx,IE;function Yz(){if(IE)return Nx;IE=1,Nx=n;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function n(s){var l=[];return s.replace(e,function(c,d,p){var m=d.toLowerCase();for(p=r(p),m=="m"&&p.length>2&&(l.push([d].concat(p.splice(0,2))),m="l",d=d=="m"?"l":"L");;){if(p.length==t[m])return p.unshift(d),l.push(p);if(p.length<t[m])throw new Error("malformed path data");l.push([d].concat(p.splice(0,t[m])))}}),l}var i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function r(s){var l=s.match(i);return l?l.map(Number):[]}return Nx}var Vz=Yz();const Xz=lu(Vz);function Kz(t,e){const n=Xz(t),i=[];let r=null,s=0,l=0;for(let c=0;c<n.length;c++){const d=n[c],p=d[0],m=d;switch(p){case"M":s=m[1],l=m[2],e.moveTo(s,l);break;case"m":s+=m[1],l+=m[2],e.moveTo(s,l);break;case"H":s=m[1],e.lineTo(s,l);break;case"h":s+=m[1],e.lineTo(s,l);break;case"V":l=m[1],e.lineTo(s,l);break;case"v":l+=m[1],e.lineTo(s,l);break;case"L":s=m[1],l=m[2],e.lineTo(s,l);break;case"l":s+=m[1],l+=m[2],e.lineTo(s,l);break;case"C":s=m[5],l=m[6],e.bezierCurveTo(m[1],m[2],m[3],m[4],s,l);break;case"c":e.bezierCurveTo(s+m[1],l+m[2],s+m[3],l+m[4],s+m[5],l+m[6]),s+=m[5],l+=m[6];break;case"S":s=m[3],l=m[4],e.bezierCurveToShort(m[1],m[2],s,l);break;case"s":e.bezierCurveToShort(s+m[1],l+m[2],s+m[3],l+m[4]),s+=m[3],l+=m[4];break;case"Q":s=m[3],l=m[4],e.quadraticCurveTo(m[1],m[2],s,l);break;case"q":e.quadraticCurveTo(s+m[1],l+m[2],s+m[3],l+m[4]),s+=m[3],l+=m[4];break;case"T":s=m[1],l=m[2],e.quadraticCurveToShort(s,l);break;case"t":s+=m[1],l+=m[2],e.quadraticCurveToShort(s,l);break;case"A":s=m[6],l=m[7],e.arcToSvg(m[1],m[2],m[3],m[4],m[5],s,l);break;case"a":s+=m[6],l+=m[7],e.arcToSvg(m[1],m[2],m[3],m[4],m[5],s,l);break;case"Z":case"z":e.closePath(),i.length>0&&(r=i.pop(),r?(s=r.startX,l=r.startY):(s=0,l=0)),r=null;break;default:ca(`Unknown SVG path command: ${p}`)}p!=="Z"&&p!=="z"&&r===null&&(r={startX:s,startY:l},i.push(r))}return e}class Y_{constructor(e=0,n=0,i=0){this.type="circle",this.x=e,this.y=n,this.radius=i}clone(){return new Y_(this.x,this.y,this.radius)}contains(e,n){if(this.radius<=0)return!1;const i=this.radius*this.radius;let r=this.x-e,s=this.y-n;return r*=r,s*=s,r+s<=i}strokeContains(e,n,i,r=.5){if(this.radius===0)return!1;const s=this.x-e,l=this.y-n,c=this.radius,d=(1-r)*i,p=Math.sqrt(s*s+l*l);return p<=c+d&&p>c-(i-d)}getBounds(e){return e||(e=new Ei),e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class V_{constructor(e=0,n=0,i=0,r=0){this.type="ellipse",this.x=e,this.y=n,this.halfWidth=i,this.halfHeight=r}clone(){return new V_(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(e-this.x)/this.halfWidth,r=(n-this.y)/this.halfHeight;return i*=i,r*=r,i+r<=1}strokeContains(e,n,i,r=.5){const{halfWidth:s,halfHeight:l}=this;if(s<=0||l<=0)return!1;const c=i*(1-r),d=i-c,p=s-d,m=l-d,g=s+c,b=l+c,v=e-this.x,S=n-this.y,C=v*v/(p*p)+S*S/(m*m),T=v*v/(g*g)+S*S/(b*b);return C>1&&T<=1}getBounds(e){return e||(e=new Ei),e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function Wz(t,e,n,i,r,s){const l=t-n,c=e-i,d=r-n,p=s-i,m=l*d+c*p,g=d*d+p*p;let b=-1;g!==0&&(b=m/g);let v,S;b<0?(v=n,S=i):b>1?(v=r,S=s):(v=n+b*d,S=i+b*p);const C=t-v,T=e-S;return C*C+T*T}let $z,Zz;class mm{constructor(...e){this.type="polygon";let n=Array.isArray(e[0])?e[0]:e;if(typeof n[0]!="number"){const i=[];for(let r=0,s=n.length;r<s;r++)i.push(n[r].x,n[r].y);n=i}this.points=n,this.closePath=!0}isClockwise(){let e=0;const n=this.points,i=n.length;for(let r=0;r<i;r+=2){const s=n[r],l=n[r+1],c=n[(r+2)%i],d=n[(r+3)%i];e+=(c-s)*(d+l)}return e<0}containsPolygon(e){const n=this.getBounds($z),i=e.getBounds(Zz);if(!n.containsRect(i))return!1;const r=e.points;for(let s=0;s<r.length;s+=2){const l=r[s],c=r[s+1];if(!this.contains(l,c))return!1}return!0}clone(){const e=this.points.slice(),n=new mm(e);return n.closePath=this.closePath,n}contains(e,n){let i=!1;const r=this.points.length/2;for(let s=0,l=r-1;s<r;l=s++){const c=this.points[s*2],d=this.points[s*2+1],p=this.points[l*2],m=this.points[l*2+1];d>n!=m>n&&e<(p-c)*((n-d)/(m-d))+c&&(i=!i)}return i}strokeContains(e,n,i,r=.5){const s=i*i,l=s*(1-r),c=s-l,{points:d}=this,p=d.length-(this.closePath?0:2);for(let m=0;m<p;m+=2){const g=d[m],b=d[m+1],v=d[(m+2)%d.length],S=d[(m+3)%d.length],C=Wz(e,n,g,b,v,S),T=Math.sign((v-g)*(n-b)-(S-b)*(e-g));if(C<=(T<0?c:l))return!0}return!1}getBounds(e){e||(e=new Ei);const n=this.points;let i=1/0,r=-1/0,s=1/0,l=-1/0;for(let c=0,d=n.length;c<d;c+=2){const p=n[c],m=n[c+1];i=p<i?p:i,r=p>r?p:r,s=m<s?m:s,l=m>l?m:l}return e.x=i,e.width=r-i,e.y=s,e.height=l-s,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,n)=>`${e}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return Qt("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return Qt("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const Dy=(t,e,n,i,r,s,l)=>{const c=t-n,d=e-i,p=Math.sqrt(c*c+d*d);return p>=r-s&&p<=r+l};class X_{constructor(e=0,n=0,i=0,r=0,s=20){this.type="roundedRectangle",this.x=e,this.y=n,this.width=i,this.height=r,this.radius=s}getBounds(e){return e||(e=new Ei),e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new X_(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+i&&n<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let r=e-(this.x+i),s=n-(this.y+i);const l=i*i;if(r*r+s*s<=l||(r=e-(this.x+this.width-i),r*r+s*s<=l)||(s=n-(this.y+this.height-i),r*r+s*s<=l)||(r=e-(this.x+i),r*r+s*s<=l))return!0}return!1}strokeContains(e,n,i,r=.5){const{x:s,y:l,width:c,height:d,radius:p}=this,m=i*(1-r),g=i-m,b=s+p,v=l+p,S=c-p*2,C=d-p*2,T=s+c,w=l+d;return(e>=s-m&&e<=s+g||e>=T-g&&e<=T+m)&&n>=v&&n<=v+C||(n>=l-m&&n<=l+g||n>=w-g&&n<=w+m)&&e>=b&&e<=b+S?!0:e<b&&n<v&&Dy(e,n,b,v,p,g,m)||e>T-p&&n<v&&Dy(e,n,T-p,v,p,g,m)||e>T-p&&n>w-p&&Dy(e,n,T-p,w-p,p,g,m)||e<b&&n>w-p&&Dy(e,n,b,w-p,p,g,m)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const kA={};function Qz(t,e,n){let i=2166136261;for(let r=0;r<e;r++)i^=t[r].uid,i=Math.imul(i,16777619),i>>>=0;return kA[i]||Jz(t,e,i,n)}function Jz(t,e,n,i){const r={};let s=0;for(let c=0;c<i;c++){const d=c<e?t[c]:Tn.EMPTY.source;r[s++]=d.source,r[s++]=d.style}const l=new c0(r);return kA[n]=l,l}class HE{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}function jE(t,e,n,i){if(n??(n=0),i??(i=Math.min(t.byteLength-n,e.byteLength)),!(n&7)&&!(i&7)){const r=i/8;new Float64Array(e,0,r).set(new Float64Array(t,n,r))}else if(!(n&3)&&!(i&3)){const r=i/4;new Float32Array(e,0,r).set(new Float32Array(t,n,r))}else new Uint8Array(e).set(new Uint8Array(t,n,i))}const e5={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var t5=(t=>(t[t.DISABLED=0]="DISABLED",t[t.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",t[t.MASK_ACTIVE=2]="MASK_ACTIVE",t[t.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",t[t.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",t[t.NONE=5]="NONE",t))(t5||{});function PE(t,e){return e.alphaMode==="no-premultiply-alpha"&&e5[t]||t}const n5=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
83
|
+
`);function i5(t){let e="";for(let n=0;n<t;++n)n>0&&(e+=`
|
|
84
|
+
else `),n<t-1&&(e+=`if(test == ${n}.0){}`);return e}function r5(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=e.createShader(e.FRAGMENT_SHADER);try{for(;;){const i=n5.replace(/%forloop%/gi,i5(t));if(e.shaderSource(n,i),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))t=t/2|0;else break}}finally{e.deleteShader(n)}return t}let Nd=null;function a5(){var e;if(Nd)return Nd;const t=uA();return Nd=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),Nd=r5(Nd,t),(e=t.getExtension("WEBGL_lose_context"))==null||e.loseContext(),Nd}class s5{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let e=0;e<this.count;e++){const n=this.textures[e];this.textures[e]=null,this.ids[n.uid]=null}this.count=0}}class l5{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new s5,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const gm=[];let v0=0;Fm.register({clear:()=>{if(gm.length>0)for(const t of gm)t&&t.destroy();gm.length=0,v0=0}});function GE(){return v0>0?gm[--v0]:new l5}function FE(t){t.elements=null,gm[v0++]=t}let Kp=0;const OA=class DA{constructor(e){this.uid=gi("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],e={...DA.defaultOptions,...e},e.maxTextures||(Qt("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),e.maxTextures=a5());const{maxTextures:n,attributesInitialSize:i,indicesInitialSize:r}=e;this.attributeBuffer=new HE(i*4),this.indexBuffer=new Uint16Array(r),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let e=0;e<this.batchIndex;e++)FE(this.batches[e]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(e){this._elements[this.elementSize++]=e,e._indexStart=this.indexSize,e._attributeStart=this.attributeSize,e._batcher=this,this.indexSize+=e.indexSize,this.attributeSize+=e.attributeSize*this.vertexSize}checkAndUpdateTexture(e,n){const i=e._batch.textures.ids[n._source.uid];return!i&&i!==0?!1:(e._textureId=i,e.texture=n,!0)}updateElement(e){this.dirty=!0;const n=this.attributeBuffer;e.packAsQuad?this.packQuadAttributes(e,n.float32View,n.uint32View,e._attributeStart,e._textureId):this.packAttributes(e,n.float32View,n.uint32View,e._attributeStart,e._textureId)}break(e){const n=this._elements;if(!n[this.elementStart])return;let i=GE(),r=i.textures;r.clear();const s=n[this.elementStart];let l=PE(s.blendMode,s.texture._source),c=s.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const d=this.attributeBuffer.float32View,p=this.attributeBuffer.uint32View,m=this.indexBuffer;let g=this._batchIndexSize,b=this._batchIndexStart,v="startBatch",S=[];const C=this.maxTextures;for(let T=this.elementStart;T<this.elementSize;++T){const w=n[T];n[T]=null;const M=w.texture._source,O=PE(w.blendMode,M),H=l!==O||c!==w.topology;if(M._batchTick===Kp&&!H){w._textureId=M._textureBindLocation,g+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,d,p,w._attributeStart,w._textureId),this.packQuadIndex(m,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,d,p,w._attributeStart,w._textureId),this.packIndex(w,m,w._indexStart,w._attributeStart/this.vertexSize)),w._batch=i,S.push(w);continue}M._batchTick=Kp,(r.count>=C||H)&&(this._finishBatch(i,b,g-b,r,l,c,e,v,S),v="renderBatch",b=g,l=O,c=w.topology,i=GE(),r=i.textures,r.clear(),S=[],++Kp),w._textureId=M._textureBindLocation=r.count,r.ids[M.uid]=r.count,r.textures[r.count++]=M,w._batch=i,S.push(w),g+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,d,p,w._attributeStart,w._textureId),this.packQuadIndex(m,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,d,p,w._attributeStart,w._textureId),this.packIndex(w,m,w._indexStart,w._attributeStart/this.vertexSize))}r.count>0&&(this._finishBatch(i,b,g-b,r,l,c,e,v,S),b=g,++Kp),this.elementStart=this.elementSize,this._batchIndexStart=b,this._batchIndexSize=g}_finishBatch(e,n,i,r,s,l,c,d,p){e.gpuBindGroup=null,e.bindGroup=null,e.action=d,e.batcher=this,e.textures=r,e.blendMode=s,e.topology=l,e.start=n,e.size=i,e.elements=p,++Kp,this.batches[this.batchIndex++]=e,c.add(e)}finish(e){this.break(e)}ensureAttributeBuffer(e){e*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(e*4)}ensureIndexBuffer(e){e<=this.indexBuffer.length||this._resizeIndexBuffer(e)}_resizeAttributeBuffer(e){const n=Math.max(e,this.attributeBuffer.size*2),i=new HE(n);jE(this.attributeBuffer.rawBinaryData,i.rawBinaryData),this.attributeBuffer=i}_resizeIndexBuffer(e){const n=this.indexBuffer;let i=Math.max(e,n.length*1.5);i+=i%2;const r=i>65535?new Uint32Array(i):new Uint16Array(i);if(r.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let s=0;s<n.length;s++)r[s]=n[s];else jE(n.buffer,r.buffer);this.indexBuffer=r}packQuadIndex(e,n,i){e[n]=i+0,e[n+1]=i+1,e[n+2]=i+2,e[n+3]=i+0,e[n+4]=i+2,e[n+5]=i+3}packIndex(e,n,i,r){const s=e.indices,l=e.indexSize,c=e.indexOffset,d=e.attributeOffset;for(let p=0;p<l;p++)n[i++]=r+s[p+c]-d}destroy(e={}){var n;if(this.batches!==null){for(let i=0;i<this.batchIndex;i++)FE(this.batches[i]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,e.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let i=0;i<this._elements.length;i++)this._elements[i]&&(this._elements[i]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};OA.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let o5=OA;var Ca=(t=>(t[t.MAP_READ=1]="MAP_READ",t[t.MAP_WRITE=2]="MAP_WRITE",t[t.COPY_SRC=4]="COPY_SRC",t[t.COPY_DST=8]="COPY_DST",t[t.INDEX=16]="INDEX",t[t.VERTEX=32]="VERTEX",t[t.UNIFORM=64]="UNIFORM",t[t.STORAGE=128]="STORAGE",t[t.INDIRECT=256]="INDIRECT",t[t.QUERY_RESOLVE=512]="QUERY_RESOLVE",t[t.STATIC=1024]="STATIC",t))(Ca||{});class Mm extends ho{constructor(e){let{data:n,size:i}=e;const{usage:r,label:s,shrinkToFit:l}=e;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=gi("buffer"),this._resourceType="buffer",this._resourceId=gi("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,n instanceof Array&&(n=new Float32Array(n)),this._data=n,i??(i=n==null?void 0:n.byteLength);const c=!!n;this.descriptor={size:i,usage:r,mappedAtCreation:c,label:s},this.shrinkToFit=l??!0}get data(){return this._data}set data(e){this.setDataWithSize(e,e.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&Ca.STATIC)}set static(e){e?this.descriptor.usage|=Ca.STATIC:this.descriptor.usage&=~Ca.STATIC}setDataWithSize(e,n,i){if(this._updateID++,this._updateSize=n*e.BYTES_PER_ELEMENT,this._data===e){i&&this.emit("update",this);return}const r=this._data;if(this._data=e,this._dataInt32=null,!r||r.length!==e.length){!this.shrinkToFit&&r&&e.byteLength<r.byteLength?i&&this.emit("update",this):(this.descriptor.size=e.byteLength,this._resourceId=gi("resource"),this.emit("change",this));return}i&&this.emit("update",this)}update(e){this._updateSize=e??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function zA(t,e){if(!(t instanceof Mm)){let n=e?Ca.INDEX:Ca.VERTEX;t instanceof Array&&(e?(t=new Uint32Array(t),n=Ca.INDEX|Ca.COPY_DST):(t=new Float32Array(t),n=Ca.VERTEX|Ca.COPY_DST)),t=new Mm({data:t,label:e?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return t}function c5(t,e,n){const i=t.getAttribute(e);if(!i)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const r=i.buffer.data;let s=1/0,l=1/0,c=-1/0,d=-1/0;const p=r.BYTES_PER_ELEMENT,m=(i.offset||0)/p,g=(i.stride||8)/p;for(let b=m;b<r.length;b+=g){const v=r[b],S=r[b+1];v>c&&(c=v),S>d&&(d=S),v<s&&(s=v),S<l&&(l=S)}return n.minX=s,n.minY=l,n.maxX=c,n.maxY=d,n}function u5(t){return(t instanceof Mm||Array.isArray(t)||t.BYTES_PER_ELEMENT)&&(t={buffer:t}),t.buffer=zA(t.buffer,!1),t}class f5 extends ho{constructor(e={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=gi("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Ds,this._boundsDirty=!0;const{attributes:n,indexBuffer:i,topology:r}=e;if(this.buffers=[],this.attributes={},n)for(const s in n)this.addAttribute(s,n[s]);this.instanceCount=e.instanceCount??1,i&&this.addIndex(i),this.topology=r||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(e){return this.attributes[e]}getIndex(){return this.indexBuffer}getBuffer(e){return this.getAttribute(e).buffer}getSize(){for(const e in this.attributes){const n=this.attributes[e];return n.buffer.data.length/(n.stride/4||n.size)}return 0}addAttribute(e,n){const i=u5(n);this.buffers.indexOf(i.buffer)===-1&&(this.buffers.push(i.buffer),i.buffer.on("update",this.onBufferUpdate,this),i.buffer.on("change",this.onBufferUpdate,this)),this.attributes[e]=i}addIndex(e){this.indexBuffer=zA(e,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,c5(this,"aPosition",this._bounds)):this._bounds}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null)}destroy(e=!1){var n;this.emit("destroy",this),this.removeAllListeners(),e&&this.buffers.forEach(i=>i.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const d5=new Float32Array(1),h5=new Uint32Array(1);class p5 extends f5{constructor(){const n=new Mm({data:d5,label:"attribute-batch-buffer",usage:Ca.VERTEX|Ca.COPY_DST,shrinkToFit:!1}),i=new Mm({data:h5,label:"index-batch-buffer",usage:Ca.INDEX|Ca.COPY_DST,shrinkToFit:!1}),r=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:r,offset:0},aUV:{buffer:n,format:"float32x2",stride:r,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:r,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:r,offset:20}},indexBuffer:i})}}function qE(t,e,n){if(t)for(const i in t){const r=i.toLocaleLowerCase(),s=e[r];if(s){let l=t[i];i==="header"&&(l=l.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&s.push(`//----${n}----//`),s.push(l)}else ca(`${i} placement hook does not exist in shader`)}}const m5=/\{\{(.*?)\}\}/g;function YE(t){var i;const e={};return(((i=t.match(m5))==null?void 0:i.map(r=>r.replace(/[{()}]/g,"")))??[]).forEach(r=>{e[r]=[]}),e}function VE(t,e){let n;const i=/@in\s+([^;]+);/g;for(;(n=i.exec(t))!==null;)e.push(n[1])}function XE(t,e,n=!1){const i=[];VE(e,i),t.forEach(c=>{c.header&&VE(c.header,i)});const r=i;n&&r.sort();const s=r.map((c,d)=>` @location(${d}) ${c},`).join(`
|
|
85
|
+
`);let l=e.replace(/@in\s+[^;]+;\s*/g,"");return l=l.replace("{{in}}",`
|
|
86
|
+
${s}
|
|
87
|
+
`),l}function KE(t,e){let n;const i=/@out\s+([^;]+);/g;for(;(n=i.exec(t))!==null;)e.push(n[1])}function g5(t){const n=/\b(\w+)\s*:/g.exec(t);return n?n[1]:""}function y5(t){const e=/@.*?\s+/g;return t.replace(e,"")}function b5(t,e){const n=[];KE(e,n),t.forEach(d=>{d.header&&KE(d.header,n)});let i=0;const r=n.sort().map(d=>d.indexOf("builtin")>-1?d:`@location(${i++}) ${d}`).join(`,
|
|
88
|
+
`),s=n.sort().map(d=>` var ${y5(d)};`).join(`
|
|
89
|
+
`),l=`return VSOutput(
|
|
90
|
+
${n.sort().map(d=>` ${g5(d)}`).join(`,
|
|
91
|
+
`)});`;let c=e.replace(/@out\s+[^;]+;\s*/g,"");return c=c.replace("{{struct}}",`
|
|
92
|
+
${r}
|
|
93
|
+
`),c=c.replace("{{start}}",`
|
|
94
|
+
${s}
|
|
95
|
+
`),c=c.replace("{{return}}",`
|
|
96
|
+
${l}
|
|
97
|
+
`),c}function WE(t,e){let n=t;for(const i in e){const r=e[i];r.join(`
|
|
98
|
+
`).length?n=n.replace(`{{${i}}}`,`//-----${i} START-----//
|
|
99
|
+
${r.join(`
|
|
100
|
+
`)}
|
|
101
|
+
//----${i} FINISH----//`):n=n.replace(`{{${i}}}`,"")}return n}const iu=Object.create(null),kx=new Map;let x5=0;function v5({template:t,bits:e}){const n=BA(t,e);if(iu[n])return iu[n];const{vertex:i,fragment:r}=S5(t,e);return iu[n]=LA(i,r,e),iu[n]}function _5({template:t,bits:e}){const n=BA(t,e);return iu[n]||(iu[n]=LA(t.vertex,t.fragment,e)),iu[n]}function S5(t,e){const n=e.map(l=>l.vertex).filter(l=>!!l),i=e.map(l=>l.fragment).filter(l=>!!l);let r=XE(n,t.vertex,!0);r=b5(n,r);const s=XE(i,t.fragment,!0);return{vertex:r,fragment:s}}function BA(t,e){return e.map(n=>(kx.has(n)||kx.set(n,x5++),kx.get(n))).sort((n,i)=>n-i).join("-")+t.vertex+t.fragment}function LA(t,e,n){const i=YE(t),r=YE(e);return n.forEach(s=>{qE(s.vertex,i,s.name),qE(s.fragment,r,s.name)}),{vertex:WE(t,i),fragment:WE(e,r)}}const E5=`
|
|
102
|
+
@in aPosition: vec2<f32>;
|
|
103
|
+
@in aUV: vec2<f32>;
|
|
104
|
+
|
|
105
|
+
@out @builtin(position) vPosition: vec4<f32>;
|
|
106
|
+
@out vUV : vec2<f32>;
|
|
107
|
+
@out vColor : vec4<f32>;
|
|
108
|
+
|
|
109
|
+
{{header}}
|
|
110
|
+
|
|
111
|
+
struct VSOutput {
|
|
112
|
+
{{struct}}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
@vertex
|
|
116
|
+
fn main( {{in}} ) -> VSOutput {
|
|
117
|
+
|
|
118
|
+
var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
|
|
119
|
+
var modelMatrix = mat3x3<f32>(
|
|
120
|
+
1.0, 0.0, 0.0,
|
|
121
|
+
0.0, 1.0, 0.0,
|
|
122
|
+
0.0, 0.0, 1.0
|
|
123
|
+
);
|
|
124
|
+
var position = aPosition;
|
|
125
|
+
var uv = aUV;
|
|
126
|
+
|
|
127
|
+
{{start}}
|
|
128
|
+
|
|
129
|
+
vColor = vec4<f32>(1., 1., 1., 1.);
|
|
130
|
+
|
|
131
|
+
{{main}}
|
|
132
|
+
|
|
133
|
+
vUV = uv;
|
|
134
|
+
|
|
135
|
+
var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
136
|
+
|
|
137
|
+
vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
|
|
138
|
+
|
|
139
|
+
vColor *= globalUniforms.uWorldColorAlpha;
|
|
140
|
+
|
|
141
|
+
{{end}}
|
|
142
|
+
|
|
143
|
+
{{return}}
|
|
144
|
+
};
|
|
145
|
+
`,w5=`
|
|
146
|
+
@in vUV : vec2<f32>;
|
|
147
|
+
@in vColor : vec4<f32>;
|
|
148
|
+
|
|
149
|
+
{{header}}
|
|
150
|
+
|
|
151
|
+
@fragment
|
|
152
|
+
fn main(
|
|
153
|
+
{{in}}
|
|
154
|
+
) -> @location(0) vec4<f32> {
|
|
155
|
+
|
|
156
|
+
{{start}}
|
|
157
|
+
|
|
158
|
+
var outColor:vec4<f32>;
|
|
159
|
+
|
|
160
|
+
{{main}}
|
|
161
|
+
|
|
162
|
+
var finalColor:vec4<f32> = outColor * vColor;
|
|
163
|
+
|
|
164
|
+
{{end}}
|
|
165
|
+
|
|
166
|
+
return finalColor;
|
|
167
|
+
};
|
|
168
|
+
`,T5=`
|
|
169
|
+
in vec2 aPosition;
|
|
170
|
+
in vec2 aUV;
|
|
171
|
+
|
|
172
|
+
out vec4 vColor;
|
|
173
|
+
out vec2 vUV;
|
|
174
|
+
|
|
175
|
+
{{header}}
|
|
176
|
+
|
|
177
|
+
void main(void){
|
|
178
|
+
|
|
179
|
+
mat3 worldTransformMatrix = uWorldTransformMatrix;
|
|
180
|
+
mat3 modelMatrix = mat3(
|
|
181
|
+
1.0, 0.0, 0.0,
|
|
182
|
+
0.0, 1.0, 0.0,
|
|
183
|
+
0.0, 0.0, 1.0
|
|
184
|
+
);
|
|
185
|
+
vec2 position = aPosition;
|
|
186
|
+
vec2 uv = aUV;
|
|
187
|
+
|
|
188
|
+
{{start}}
|
|
189
|
+
|
|
190
|
+
vColor = vec4(1.);
|
|
191
|
+
|
|
192
|
+
{{main}}
|
|
193
|
+
|
|
194
|
+
vUV = uv;
|
|
195
|
+
|
|
196
|
+
mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
197
|
+
|
|
198
|
+
gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
199
|
+
|
|
200
|
+
vColor *= uWorldColorAlpha;
|
|
201
|
+
|
|
202
|
+
{{end}}
|
|
203
|
+
}
|
|
204
|
+
`,C5=`
|
|
205
|
+
|
|
206
|
+
in vec4 vColor;
|
|
207
|
+
in vec2 vUV;
|
|
208
|
+
|
|
209
|
+
out vec4 finalColor;
|
|
210
|
+
|
|
211
|
+
{{header}}
|
|
212
|
+
|
|
213
|
+
void main(void) {
|
|
214
|
+
|
|
215
|
+
{{start}}
|
|
216
|
+
|
|
217
|
+
vec4 outColor;
|
|
218
|
+
|
|
219
|
+
{{main}}
|
|
220
|
+
|
|
221
|
+
finalColor = outColor * vColor;
|
|
222
|
+
|
|
223
|
+
{{end}}
|
|
224
|
+
}
|
|
225
|
+
`,A5={name:"global-uniforms-bit",vertex:{header:`
|
|
226
|
+
struct GlobalUniforms {
|
|
227
|
+
uProjectionMatrix:mat3x3<f32>,
|
|
228
|
+
uWorldTransformMatrix:mat3x3<f32>,
|
|
229
|
+
uWorldColorAlpha: vec4<f32>,
|
|
230
|
+
uResolution: vec2<f32>,
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
|
|
234
|
+
`}},M5={name:"global-uniforms-bit",vertex:{header:`
|
|
235
|
+
uniform mat3 uProjectionMatrix;
|
|
236
|
+
uniform mat3 uWorldTransformMatrix;
|
|
237
|
+
uniform vec4 uWorldColorAlpha;
|
|
238
|
+
uniform vec2 uResolution;
|
|
239
|
+
`}};function R5({bits:t,name:e}){const n=v5({template:{fragment:w5,vertex:E5},bits:[A5,...t]});return qm.from({name:e,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function N5({bits:t,name:e}){return new G_({name:e,..._5({template:{vertex:T5,fragment:C5},bits:[M5,...t]})})}const k5={name:"color-bit",vertex:{header:`
|
|
240
|
+
@in aColor: vec4<f32>;
|
|
241
|
+
`,main:`
|
|
242
|
+
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
|
243
|
+
`}},O5={name:"color-bit",vertex:{header:`
|
|
244
|
+
in vec4 aColor;
|
|
245
|
+
`,main:`
|
|
246
|
+
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
|
247
|
+
`}},Ox={};function D5(t){const e=[];if(t===1)e.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),e.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let n=0;for(let i=0;i<t;i++)e.push(`@group(1) @binding(${n++}) var textureSource${i+1}: texture_2d<f32>;`),e.push(`@group(1) @binding(${n++}) var textureSampler${i+1}: sampler;`)}return e.join(`
|
|
248
|
+
`)}function z5(t){const e=[];if(t===1)e.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{e.push("switch vTextureId {");for(let n=0;n<t;n++)n===t-1?e.push(" default:{"):e.push(` case ${n}:{`),e.push(` outColor = textureSampleGrad(textureSource${n+1}, textureSampler${n+1}, vUV, uvDx, uvDy);`),e.push(" break;}");e.push("}")}return e.join(`
|
|
249
|
+
`)}function B5(t){return Ox[t]||(Ox[t]={name:"texture-batch-bit",vertex:{header:`
|
|
250
|
+
@in aTextureIdAndRound: vec2<u32>;
|
|
251
|
+
@out @interpolate(flat) vTextureId : u32;
|
|
252
|
+
`,main:`
|
|
253
|
+
vTextureId = aTextureIdAndRound.y;
|
|
254
|
+
`,end:`
|
|
255
|
+
if(aTextureIdAndRound.x == 1)
|
|
256
|
+
{
|
|
257
|
+
vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
|
258
|
+
}
|
|
259
|
+
`},fragment:{header:`
|
|
260
|
+
@in @interpolate(flat) vTextureId: u32;
|
|
261
|
+
|
|
262
|
+
${D5(t)}
|
|
263
|
+
`,main:`
|
|
264
|
+
var uvDx = dpdx(vUV);
|
|
265
|
+
var uvDy = dpdy(vUV);
|
|
266
|
+
|
|
267
|
+
${z5(t)}
|
|
268
|
+
`}}),Ox[t]}const Dx={};function L5(t){const e=[];for(let n=0;n<t;n++)n>0&&e.push("else"),n<t-1&&e.push(`if(vTextureId < ${n}.5)`),e.push("{"),e.push(` outColor = texture(uTextures[${n}], vUV);`),e.push("}");return e.join(`
|
|
269
|
+
`)}function U5(t){return Dx[t]||(Dx[t]={name:"texture-batch-bit",vertex:{header:`
|
|
270
|
+
in vec2 aTextureIdAndRound;
|
|
271
|
+
out float vTextureId;
|
|
272
|
+
|
|
273
|
+
`,main:`
|
|
274
|
+
vTextureId = aTextureIdAndRound.y;
|
|
275
|
+
`,end:`
|
|
276
|
+
if(aTextureIdAndRound.x == 1.)
|
|
277
|
+
{
|
|
278
|
+
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
279
|
+
}
|
|
280
|
+
`},fragment:{header:`
|
|
281
|
+
in float vTextureId;
|
|
282
|
+
|
|
283
|
+
uniform sampler2D uTextures[${t}];
|
|
284
|
+
|
|
285
|
+
`,main:`
|
|
286
|
+
|
|
287
|
+
${L5(t)}
|
|
288
|
+
`}}),Dx[t]}const I5={name:"round-pixels-bit",vertex:{header:`
|
|
289
|
+
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
|
290
|
+
{
|
|
291
|
+
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
292
|
+
}
|
|
293
|
+
`}},H5={name:"round-pixels-bit",vertex:{header:`
|
|
294
|
+
vec2 roundPixels(vec2 position, vec2 targetSize)
|
|
295
|
+
{
|
|
296
|
+
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
297
|
+
}
|
|
298
|
+
`}},$E={};function j5(t){let e=$E[t];if(e)return e;const n=new Int32Array(t);for(let i=0;i<t;i++)n[i]=i;return e=$E[t]=new mA({uTextures:{value:n,type:"i32",size:t}},{isStatic:!0}),e}class ZE extends K0{constructor(e){const n=N5({name:"batch",bits:[O5,U5(e),H5]}),i=R5({name:"batch",bits:[k5,B5(e),I5]});super({glProgram:n,gpuProgram:i,resources:{batchSamplers:j5(e)}}),this.maxTextures=e}}let Wp=null;const UA=class IA extends o5{constructor(e){super(e),this.geometry=new p5,this.name=IA.extension.name,this.vertexSize=6,Wp??(Wp=new ZE(e.maxTextures)),this.shader=Wp}packAttributes(e,n,i,r,s){const l=s<<16|e.roundPixels&65535,c=e.transform,d=c.a,p=c.b,m=c.c,g=c.d,b=c.tx,v=c.ty,{positions:S,uvs:C}=e,T=e.color,w=e.attributeOffset,k=w+e.attributeSize;for(let M=w;M<k;M++){const O=M*2,H=S[O],z=S[O+1];n[r++]=d*H+m*z+b,n[r++]=g*z+p*H+v,n[r++]=C[O],n[r++]=C[O+1],i[r++]=T,i[r++]=l}}packQuadAttributes(e,n,i,r,s){const l=e.texture,c=e.transform,d=c.a,p=c.b,m=c.c,g=c.d,b=c.tx,v=c.ty,S=e.bounds,C=S.maxX,T=S.minX,w=S.maxY,k=S.minY,M=l.uvs,O=e.color,H=s<<16|e.roundPixels&65535;n[r+0]=d*T+m*k+b,n[r+1]=g*k+p*T+v,n[r+2]=M.x0,n[r+3]=M.y0,i[r+4]=O,i[r+5]=H,n[r+6]=d*C+m*k+b,n[r+7]=g*k+p*C+v,n[r+8]=M.x1,n[r+9]=M.y1,i[r+10]=O,i[r+11]=H,n[r+12]=d*C+m*w+b,n[r+13]=g*w+p*C+v,n[r+14]=M.x2,n[r+15]=M.y2,i[r+16]=O,i[r+17]=H,n[r+18]=d*T+m*w+b,n[r+19]=g*w+p*T+v,n[r+20]=M.x3,n[r+21]=M.y3,i[r+22]=O,i[r+23]=H}_updateMaxTextures(e){this.shader.maxTextures!==e&&(Wp=new ZE(e),this.shader=Wp)}destroy(){this.shader=null,super.destroy()}};UA.extension={type:[Rt.Batcher],name:"default"};let P5=UA;class Ym{constructor(e){this.items=Object.create(null);const{renderer:n,type:i,onUnload:r,priority:s,name:l}=e;this._renderer=n,n.gc.addResourceHash(this,"items",i,s??0),this._onUnload=r,this.name=l}add(e){return this.items[e.uid]?!1:(this.items[e.uid]=e,e.once("unload",this.remove,this),e._gcLastUsed=this._renderer.gc.now,!0)}remove(e,...n){var r;if(!this.items[e.uid])return;const i=e._gpuData[this._renderer.uid];i&&((r=this._onUnload)==null||r.call(this,e,...n),i.destroy(),e._gpuData[this._renderer.uid]=null,this.items[e.uid]=null)}removeAll(...e){Object.values(this.items).forEach(n=>n&&this.remove(n,...e))}destroy(...e){this.removeAll(...e),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function G5(t,e,n,i,r,s,l,c=null){let d=0;n*=e,r*=s;const p=c.a,m=c.b,g=c.c,b=c.d,v=c.tx,S=c.ty;for(;d<l;){const C=t[n],T=t[n+1];i[r]=p*C+g*T+v,i[r+1]=m*C+b*T+S,r+=s,n+=e,d++}}function F5(t,e,n,i){let r=0;for(e*=n;r<i;)t[e]=0,t[e+1]=0,e+=n,r++}function HA(t,e,n,i,r){const s=e.a,l=e.b,c=e.c,d=e.d,p=e.tx,m=e.ty;n||(n=0),i||(i=2),r||(r=t.length/i-n);let g=n*i;for(let b=0;b<r;b++){const v=t[g],S=t[g+1];t[g]=s*v+c*S+p,t[g+1]=l*v+d*S+m,g+=i}}const q5=new jt;class K_{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){const e=this.baseColor,n=e>>16|e&65280|(e&255)<<16,i=this.renderable;return i?YC(n,i.groupColor)+(this.alpha*i.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var e;return((e=this.renderable)==null?void 0:e.groupTransform)||q5}copyTo(e){e.indexOffset=this.indexOffset,e.indexSize=this.indexSize,e.attributeOffset=this.attributeOffset,e.attributeSize=this.attributeSize,e.baseColor=this.baseColor,e.alpha=this.alpha,e.texture=this.texture,e.geometryData=this.geometryData,e.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}const Rm={extension:{type:Rt.ShapeBuilder,name:"circle"},build(t,e){let n,i,r,s,l,c;if(t.type==="circle"){const O=t;if(l=c=O.radius,l<=0)return!1;n=O.x,i=O.y,r=s=0}else if(t.type==="ellipse"){const O=t;if(l=O.halfWidth,c=O.halfHeight,l<=0||c<=0)return!1;n=O.x,i=O.y,r=s=0}else{const O=t,H=O.width/2,z=O.height/2;n=O.x+H,i=O.y+z,l=c=Math.max(0,Math.min(O.radius,Math.min(H,z))),r=H-l,s=z-c}if(r<0||s<0)return!1;const d=Math.ceil(2.3*Math.sqrt(l+c)),p=d*8+(r?4:0)+(s?4:0);if(p===0)return!1;if(d===0)return e[0]=e[6]=n+r,e[1]=e[3]=i+s,e[2]=e[4]=n-r,e[5]=e[7]=i-s,!0;let m=0,g=d*4+(r?2:0)+2,b=g,v=p,S=r+l,C=s,T=n+S,w=n-S,k=i+C;if(e[m++]=T,e[m++]=k,e[--g]=k,e[--g]=w,s){const O=i-C;e[b++]=w,e[b++]=O,e[--v]=O,e[--v]=T}for(let O=1;O<d;O++){const H=Math.PI/2*(O/d),z=r+Math.cos(H)*l,F=s+Math.sin(H)*c,$=n+z,j=n-z,I=i+F,Y=i-F;e[m++]=$,e[m++]=I,e[--g]=I,e[--g]=j,e[b++]=j,e[b++]=Y,e[--v]=Y,e[--v]=$}S=r,C=s+c,T=n+S,w=n-S,k=i+C;const M=i-C;return e[m++]=T,e[m++]=k,e[--v]=M,e[--v]=T,r&&(e[m++]=w,e[m++]=k,e[--v]=M,e[--v]=w),!0},triangulate(t,e,n,i,r,s){if(t.length===0)return;let l=0,c=0;for(let m=0;m<t.length;m+=2)l+=t[m],c+=t[m+1];l/=t.length/2,c/=t.length/2;let d=i;e[d*n]=l,e[d*n+1]=c;const p=d++;for(let m=0;m<t.length;m+=2)e[d*n]=t[m],e[d*n+1]=t[m+1],m>0&&(r[s++]=d,r[s++]=p,r[s++]=d-1),d++;r[s++]=p+1,r[s++]=p,r[s++]=d-1}},Y5={...Rm,extension:{...Rm.extension,name:"ellipse"}},V5={...Rm,extension:{...Rm.extension,name:"roundedRectangle"}},jA=1e-4,QE=1e-4;function X5(t){const e=t.length;if(e<6)return 1;let n=0;for(let i=0,r=t[e-2],s=t[e-1];i<e;i+=2){const l=t[i],c=t[i+1];n+=(l-r)*(c+s),r=l,s=c}return n<0?-1:1}function JE(t,e,n,i,r,s,l,c){const d=t-n*r,p=e-i*r,m=t+n*s,g=e+i*s;let b,v;l?(b=i,v=-n):(b=-i,v=n);const S=d+b,C=p+v,T=m+b,w=g+v;return c.push(S,C),c.push(T,w),2}function Ju(t,e,n,i,r,s,l,c){const d=n-t,p=i-e;let m=Math.atan2(d,p),g=Math.atan2(r-t,s-e);c&&m<g?m+=Math.PI*2:!c&&m>g&&(g+=Math.PI*2);let b=m;const v=g-m,S=Math.abs(v),C=Math.sqrt(d*d+p*p),T=(15*S*Math.sqrt(C)/Math.PI>>0)+1,w=v/T;if(b+=w,c){l.push(t,e),l.push(n,i);for(let k=1,M=b;k<T;k++,M+=w)l.push(t,e),l.push(t+Math.sin(M)*C,e+Math.cos(M)*C);l.push(t,e),l.push(r,s)}else{l.push(n,i),l.push(t,e);for(let k=1,M=b;k<T;k++,M+=w)l.push(t+Math.sin(M)*C,e+Math.cos(M)*C),l.push(t,e);l.push(r,s),l.push(t,e)}return T*2}function K5(t,e,n,i,r,s){const l=jA;if(t.length===0)return;const c=e;let d=c.alignment;if(e.alignment!==.5){let Q=X5(t);d=(d-.5)*Q+.5}const p=new Dr(t[0],t[1]),m=new Dr(t[t.length-2],t[t.length-1]),g=i,b=Math.abs(p.x-m.x)<l&&Math.abs(p.y-m.y)<l;if(g){t=t.slice(),b&&(t.pop(),t.pop(),m.set(t[t.length-2],t[t.length-1]));const Q=(p.x+m.x)*.5,G=(m.y+p.y)*.5;t.unshift(Q,G),t.push(Q,G)}const v=r,S=t.length/2;let C=t.length;const T=v.length/2,w=c.width/2,k=w*w,M=c.miterLimit*c.miterLimit;let O=t[0],H=t[1],z=t[2],F=t[3],$=0,j=0,I=-(H-F),Y=O-z,X=0,ne=0,q=Math.sqrt(I*I+Y*Y);I/=q,Y/=q,I*=w,Y*=w;const J=d,B=(1-J)*2,V=J*2;g||(c.cap==="round"?C+=Ju(O-I*(B-V)*.5,H-Y*(B-V)*.5,O-I*B,H-Y*B,O+I*V,H+Y*V,v,!0)+2:c.cap==="square"&&(C+=JE(O,H,I,Y,B,V,!0,v))),v.push(O-I*B,H-Y*B),v.push(O+I*V,H+Y*V);for(let Q=1;Q<S-1;++Q){O=t[(Q-1)*2],H=t[(Q-1)*2+1],z=t[Q*2],F=t[Q*2+1],$=t[(Q+1)*2],j=t[(Q+1)*2+1],I=-(H-F),Y=O-z,q=Math.sqrt(I*I+Y*Y),I/=q,Y/=q,I*=w,Y*=w,X=-(F-j),ne=z-$,q=Math.sqrt(X*X+ne*ne),X/=q,ne/=q,X*=w,ne*=w;const G=z-O,K=H-F,te=z-$,U=j-F,le=G*te+K*U,de=K*te-U*G,ge=de<0;if(Math.abs(de)<.001*Math.abs(le)){v.push(z-I*B,F-Y*B),v.push(z+I*V,F+Y*V),le>=0&&(c.join==="round"?C+=Ju(z,F,z-I*B,F-Y*B,z-X*B,F-ne*B,v,!1)+4:C+=2,v.push(z-X*V,F-ne*V),v.push(z+X*B,F+ne*B));continue}const se=(-I+O)*(-Y+F)-(-I+z)*(-Y+H),pe=(-X+$)*(-ne+F)-(-X+z)*(-ne+j),Ae=(G*pe-te*se)/de,Le=(U*se-K*pe)/de,Ge=(Ae-z)*(Ae-z)+(Le-F)*(Le-F),Pe=z+(Ae-z)*B,Ie=F+(Le-F)*B,We=z-(Ae-z)*V,ut=F-(Le-F)*V,Ue=Math.min(G*G+K*K,te*te+U*U),At=ge?B:V,zn=Ue+At*At*k;Ge<=zn?c.join==="bevel"||Ge/k>M?(ge?(v.push(Pe,Ie),v.push(z+I*V,F+Y*V),v.push(Pe,Ie),v.push(z+X*V,F+ne*V)):(v.push(z-I*B,F-Y*B),v.push(We,ut),v.push(z-X*B,F-ne*B),v.push(We,ut)),C+=2):c.join==="round"?ge?(v.push(Pe,Ie),v.push(z+I*V,F+Y*V),C+=Ju(z,F,z+I*V,F+Y*V,z+X*V,F+ne*V,v,!0)+4,v.push(Pe,Ie),v.push(z+X*V,F+ne*V)):(v.push(z-I*B,F-Y*B),v.push(We,ut),C+=Ju(z,F,z-I*B,F-Y*B,z-X*B,F-ne*B,v,!1)+4,v.push(z-X*B,F-ne*B),v.push(We,ut)):(v.push(Pe,Ie),v.push(We,ut)):(v.push(z-I*B,F-Y*B),v.push(z+I*V,F+Y*V),c.join==="round"?ge?C+=Ju(z,F,z+I*V,F+Y*V,z+X*V,F+ne*V,v,!0)+2:C+=Ju(z,F,z-I*B,F-Y*B,z-X*B,F-ne*B,v,!1)+2:c.join==="miter"&&Ge/k<=M&&(ge?(v.push(We,ut),v.push(We,ut)):(v.push(Pe,Ie),v.push(Pe,Ie)),C+=2),v.push(z-X*B,F-ne*B),v.push(z+X*V,F+ne*V),C+=2)}O=t[(S-2)*2],H=t[(S-2)*2+1],z=t[(S-1)*2],F=t[(S-1)*2+1],I=-(H-F),Y=O-z,q=Math.sqrt(I*I+Y*Y),I/=q,Y/=q,I*=w,Y*=w,v.push(z-I*B,F-Y*B),v.push(z+I*V,F+Y*V),g||(c.cap==="round"?C+=Ju(z-I*(B-V)*.5,F-Y*(B-V)*.5,z-I*B,F-Y*B,z+I*V,F+Y*V,v,!1)+2:c.cap==="square"&&(C+=JE(z,F,I,Y,B,V,!1,v)));const Z=QE*QE;for(let Q=T;Q<C+T-2;++Q)O=v[Q*2],H=v[Q*2+1],z=v[(Q+1)*2],F=v[(Q+1)*2+1],$=v[(Q+2)*2],j=v[(Q+2)*2+1],!(Math.abs(O*(F-j)+z*(j-H)+$*(H-F))<Z)&&s.push(Q,Q+1,Q+2)}function W5(t,e,n,i){const r=jA;if(t.length===0)return;const s=t[0],l=t[1],c=t[t.length-2],d=t[t.length-1],p=e||Math.abs(s-c)<r&&Math.abs(l-d)<r,m=n,g=t.length/2,b=m.length/2;for(let v=0;v<g;v++)m.push(t[v*2]),m.push(t[v*2+1]);for(let v=0;v<g-1;v++)i.push(b+v,b+v+1);p&&i.push(b+g-1,b)}function PA(t,e,n,i,r,s,l){const c=Iz(t,e,2);if(!c)return;for(let p=0;p<c.length;p+=3)s[l++]=c[p]+r,s[l++]=c[p+1]+r,s[l++]=c[p+2]+r;let d=r*i;for(let p=0;p<t.length;p+=2)n[d]=t[p],n[d+1]=t[p+1],d+=i}const $5=[],Z5={extension:{type:Rt.ShapeBuilder,name:"polygon"},build(t,e){for(let n=0;n<t.points.length;n++)e[n]=t.points[n];return!0},triangulate(t,e,n,i,r,s){PA(t,$5,e,n,i,r,s)}},Q5={extension:{type:Rt.ShapeBuilder,name:"rectangle"},build(t,e){const n=t,i=n.x,r=n.y,s=n.width,l=n.height;return s>0&&l>0?(e[0]=i,e[1]=r,e[2]=i+s,e[3]=r,e[4]=i+s,e[5]=r+l,e[6]=i,e[7]=r+l,!0):!1},triangulate(t,e,n,i,r,s){let l=0;i*=n,e[i+l]=t[0],e[i+l+1]=t[1],l+=n,e[i+l]=t[2],e[i+l+1]=t[3],l+=n,e[i+l]=t[6],e[i+l+1]=t[7],l+=n,e[i+l]=t[4],e[i+l+1]=t[5],l+=n;const c=i/n;r[s++]=c,r[s++]=c+1,r[s++]=c+2,r[s++]=c+1,r[s++]=c+3,r[s++]=c+2}},J5={extension:{type:Rt.ShapeBuilder,name:"triangle"},build(t,e){return e[0]=t.x,e[1]=t.y,e[2]=t.x2,e[3]=t.y2,e[4]=t.x3,e[5]=t.y3,!0},triangulate(t,e,n,i,r,s){let l=0;i*=n,e[i+l]=t[0],e[i+l+1]=t[1],l+=n,e[i+l]=t[2],e[i+l+1]=t[3],l+=n,e[i+l]=t[4],e[i+l+1]=t[5];const c=i/n;r[s++]=c,r[s++]=c+1,r[s++]=c+2}},ew=[{offset:0,color:"white"},{offset:1,color:"black"}],W_=class Yv{constructor(...e){this.uid=gi("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=e6(e);n={...n.type==="radial"?Yv.defaultRadialOptions:Yv.defaultLinearOptions,...zC(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type==="radial"?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(r=>{this.addColorStop(r.offset,r.color)})}addColorStop(e,n){return this.colorStops.push({offset:e,color:Gi.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:e,y:n}=this.start,{x:i,y:r}=this.end,s=i-e,l=r-n;const c=s<0||l<0;if(this._wrapMode==="clamp-to-edge"){if(s<0){const T=e;e=i,i=T,s*=-1}if(l<0){const T=n;n=r,r=T,l*=-1}}const d=this.colorStops.length?this.colorStops:ew,p=this._textureSize,{canvas:m,context:g}=nw(p,1),b=c?g.createLinearGradient(this._textureSize,0,0,0):g.createLinearGradient(0,0,this._textureSize,0);tw(b,d),g.fillStyle=b,g.fillRect(0,0,p,1),this.texture=new Tn({source:new b0({resource:m,addressMode:this._wrapMode})});const v=Math.sqrt(s*s+l*l),S=Math.atan2(l,s),C=new jt;C.scale(v/p,1),C.rotate(S),C.translate(e,n),this.textureSpace==="local"&&C.scale(p,p),this.transform=C}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const e=this.colorStops.length?this.colorStops:ew,n=this._textureSize,{canvas:i,context:r}=nw(n,n),{x:s,y:l}=this.center,{x:c,y:d}=this.outerCenter,p=this.innerRadius,m=this.outerRadius,g=c-m,b=d-m,v=n/(m*2),S=(s-g)*v,C=(l-b)*v,T=r.createRadialGradient(S,C,p*v,(c-g)*v,(d-b)*v,m*v);tw(T,e),r.fillStyle=e[e.length-1].color,r.fillRect(0,0,n,n),r.fillStyle=T,r.translate(S,C),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-S,-C),r.fillRect(0,0,n,n),this.texture=new Tn({source:new b0({resource:i,addressMode:this._wrapMode})});const w=new jt;w.scale(1/v,1/v),w.translate(g,b),this.textureSpace==="local"&&w.scale(n,n),this.transform=w}destroy(){var e;(e=this.texture)==null||e.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};W_.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};W_.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let ic=W_;function tw(t,e){for(let n=0;n<e.length;n++){const i=e[n];t.addColorStop(i.offset,i.color)}}function nw(t,e){const n=es.get().createCanvas(t,e),i=n.getContext("2d");return{canvas:n,context:i}}function e6(t){let e=t[0]??{};return(typeof e=="number"||t[1])&&(Qt("8.5.2","use options object instead"),e={type:"linear",start:{x:t[0],y:t[1]},end:{x:t[2],y:t[3]},textureSpace:t[4],textureSize:t[5]??ic.defaultLinearOptions.textureSize}),e}const t6=new jt,n6=new Ei;function i6(t,e,n,i){const r=e.matrix?t.copyFrom(e.matrix).invert():t.identity();if(e.textureSpace==="local"){const l=n.getBounds(n6);e.width&&l.pad(e.width);const{x:c,y:d}=l,p=1/l.width,m=1/l.height,g=-c*p,b=-d*m,v=r.a,S=r.b,C=r.c,T=r.d;r.a*=p,r.b*=p,r.c*=m,r.d*=m,r.tx=g*v+b*C+r.tx,r.ty=g*S+b*T+r.ty}else r.translate(e.texture.frame.x,e.texture.frame.y),r.scale(1/e.texture.source.width,1/e.texture.source.height);const s=e.texture.source.style;return!(e.fill instanceof ic)&&s.addressMode==="clamp-to-edge"&&(s.addressMode="repeat",s.update()),i&&r.append(t6.copyFrom(i).invert()),r}const W0={};si.handleByMap(Rt.ShapeBuilder,W0);si.add(Q5,Z5,J5,Rm,Y5,V5);const r6=new Ei,a6=new jt;function s6(t,e){const{geometryData:n,batches:i}=e;i.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let r=0;r<t.instructions.length;r++){const s=t.instructions[r];if(s.action==="texture")l6(s.data,i,n);else if(s.action==="fill"||s.action==="stroke"){const l=s.action==="stroke",c=s.data.path.shapePath,d=s.data.style,p=s.data.hole;l&&p&&iw(p.shapePath,d,!0,i,n),p&&(c.shapePrimitives[c.shapePrimitives.length-1].holes=p.shapePath.shapePrimitives),iw(c,d,l,i,n)}}}function l6(t,e,n){const i=[],r=W0.rectangle,s=r6;s.x=t.dx,s.y=t.dy,s.width=t.dw,s.height=t.dh;const l=t.transform;if(!r.build(s,i))return;const{vertices:c,uvs:d,indices:p}=n,m=p.length,g=c.length/2;l&&HA(i,l),r.triangulate(i,c,2,g,p,m);const b=t.image,v=b.uvs;d.push(v.x0,v.y0,v.x1,v.y1,v.x3,v.y3,v.x2,v.y2);const S=Ra.get(K_);S.indexOffset=m,S.indexSize=p.length-m,S.attributeOffset=g,S.attributeSize=c.length/2-g,S.baseColor=t.style,S.alpha=t.alpha,S.texture=b,S.geometryData=n,e.push(S)}function iw(t,e,n,i,r){const{vertices:s,uvs:l,indices:c}=r;t.shapePrimitives.forEach(({shape:d,transform:p,holes:m})=>{const g=[],b=W0[d.type];if(!b.build(d,g))return;const v=c.length,S=s.length/2;let C="triangle-list";if(p&&HA(g,p),n){const M=d.closePath??!0,O=e;O.pixelLine?(W5(g,M,s,c),C="line-list"):K5(g,O,!1,M,s,c)}else if(m){const M=[],O=g.slice();o6(m).forEach(z=>{M.push(O.length/2),O.push(...z)}),PA(O,M,s,2,S,c,v)}else b.triangulate(g,s,2,S,c,v);const T=l.length/2,w=e.texture;if(w!==Tn.WHITE){const M=i6(a6,e,d,p);G5(s,2,S,l,T,2,s.length/2-S,M)}else F5(l,T,2,s.length/2-S);const k=Ra.get(K_);k.indexOffset=v,k.indexSize=c.length-v,k.attributeOffset=S,k.attributeSize=s.length/2-S,k.baseColor=e.color,k.alpha=e.alpha,k.texture=w,k.geometryData=r,k.topology=C,i.push(k)})}function o6(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n].shape,r=[];W0[i.type].build(i,r)&&e.push(r)}return e}class c6{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{Ra.return(e)}),this.graphicsData&&Ra.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class u6{constructor(){this.instructions=new H_}init(e){const n=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new P5({maxTextures:n}),this.instructions.reset()}get geometry(){return Qt(s4,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}const $_=class Vv{constructor(e){this._renderer=e,this._managedContexts=new Ym({renderer:e,type:"resource",name:"graphicsContext"})}init(e){Vv.defaultOptions.bezierSmoothness=(e==null?void 0:e.bezierSmoothness)??Vv.defaultOptions.bezierSmoothness}getContextRenderData(e){return e._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(e)}updateGpuContext(e){const n=!!e._gpuData[this._renderer.uid],i=e._gpuData[this._renderer.uid]||this._initContext(e);if(e.dirty||!n){n&&i.reset(),s6(e,i);const r=e.batchMode;e.customShader||r==="no-batch"?i.isBatchable=!1:r==="auto"?i.isBatchable=i.geometryData.vertices.length<400:i.isBatchable=!0,e.dirty=!1}return i}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){const n=Ra.get(u6,{maxTextures:this._renderer.limits.maxBatchableTextures}),i=e._gpuData[this._renderer.uid],{batches:r,geometryData:s}=i;i.graphicsData=n;const l=s.vertices.length,c=s.indices.length;for(let g=0;g<r.length;g++)r[g].applyTransform=!1;const d=n.batcher;d.ensureAttributeBuffer(l),d.ensureIndexBuffer(c),d.begin();for(let g=0;g<r.length;g++){const b=r[g];d.add(b)}d.finish(n.instructions);const p=d.geometry;p.indexBuffer.setDataWithSize(d.indexBuffer,d.indexSize,!0),p.buffers[0].setDataWithSize(d.attributeBuffer.float32View,d.attributeSize,!0);const m=d.batches;for(let g=0;g<m.length;g++){const b=m[g];b.bindGroup=Qz(b.textures.textures,b.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(e){const n=new c6;return n.context=e,e._gpuData[this._renderer.uid]=n,this._managedContexts.add(e),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};$_.extension={type:[Rt.WebGLSystem,Rt.WebGPUSystem],name:"graphicsContext"};$_.defaultOptions={bezierSmoothness:.5};let Z_=$_;const f6=8,zy=11920929e-14,d6=1;function GA(t,e,n,i,r,s,l,c,d,p){const g=Math.min(.99,Math.max(0,p??Z_.defaultOptions.bezierSmoothness));let b=(d6-g)/1;return b*=b,h6(e,n,i,r,s,l,c,d,t,b),t}function h6(t,e,n,i,r,s,l,c,d,p){Xv(t,e,n,i,r,s,l,c,d,p,0),d.push(l,c)}function Xv(t,e,n,i,r,s,l,c,d,p,m){if(m>f6)return;const g=(t+n)/2,b=(e+i)/2,v=(n+r)/2,S=(i+s)/2,C=(r+l)/2,T=(s+c)/2,w=(g+v)/2,k=(b+S)/2,M=(v+C)/2,O=(S+T)/2,H=(w+M)/2,z=(k+O)/2;if(m>0){let F=l-t,$=c-e;const j=Math.abs((n-l)*$-(i-c)*F),I=Math.abs((r-l)*$-(s-c)*F);if(j>zy&&I>zy){if((j+I)*(j+I)<=p*(F*F+$*$)){d.push(H,z);return}}else if(j>zy){if(j*j<=p*(F*F+$*$)){d.push(H,z);return}}else if(I>zy){if(I*I<=p*(F*F+$*$)){d.push(H,z);return}}else if(F=H-(t+l)/2,$=z-(e+c)/2,F*F+$*$<=p){d.push(H,z);return}}Xv(t,e,g,b,w,k,H,z,d,p,m+1),Xv(H,z,M,O,C,T,l,c,d,p,m+1)}const p6=8,m6=11920929e-14,g6=1;function y6(t,e,n,i,r,s,l,c){const p=Math.min(.99,Math.max(0,c??Z_.defaultOptions.bezierSmoothness));let m=(g6-p)/1;return m*=m,b6(e,n,i,r,s,l,t,m),t}function b6(t,e,n,i,r,s,l,c){Kv(l,t,e,n,i,r,s,c,0),l.push(r,s)}function Kv(t,e,n,i,r,s,l,c,d){if(d>p6)return;const p=(e+i)/2,m=(n+r)/2,g=(i+s)/2,b=(r+l)/2,v=(p+g)/2,S=(m+b)/2;let C=s-e,T=l-n;const w=Math.abs((i-s)*T-(r-l)*C);if(w>m6){if(w*w<=c*(C*C+T*T)){t.push(v,S);return}}else if(C=v-(e+s)/2,T=S-(n+l)/2,C*C+T*T<=c){t.push(v,S);return}Kv(t,e,n,p,m,v,S,c,d+1),Kv(t,v,S,g,b,s,l,c,d+1)}function FA(t,e,n,i,r,s,l,c){let d=Math.abs(r-s);(!l&&r>s||l&&s>r)&&(d=2*Math.PI-d),c||(c=Math.max(6,Math.floor(6*Math.pow(i,1/3)*(d/Math.PI)))),c=Math.max(c,3);let p=d/c,m=r;p*=l?-1:1;for(let g=0;g<c+1;g++){const b=Math.cos(m),v=Math.sin(m),S=e+b*i,C=n+v*i;t.push(S,C),m+=p}}function x6(t,e,n,i,r,s){const l=t[t.length-2],d=t[t.length-1]-n,p=l-e,m=r-n,g=i-e,b=Math.abs(d*g-p*m);if(b<1e-8||s===0){(t[t.length-2]!==e||t[t.length-1]!==n)&&t.push(e,n);return}const v=d*d+p*p,S=m*m+g*g,C=d*m+p*g,T=s*Math.sqrt(v)/b,w=s*Math.sqrt(S)/b,k=T*C/v,M=w*C/S,O=T*g+w*p,H=T*m+w*d,z=p*(w+k),F=d*(w+k),$=g*(T+M),j=m*(T+M),I=Math.atan2(F-H,z-O),Y=Math.atan2(j-H,$-O);FA(t,O+e,H+n,s,I,Y,p*m>g*d)}const ym=Math.PI*2,zx={centerX:0,centerY:0,ang1:0,ang2:0},Bx=({x:t,y:e},n,i,r,s,l,c,d)=>{t*=n,e*=i;const p=r*t-s*e,m=s*t+r*e;return d.x=p+l,d.y=m+c,d};function v6(t,e){const n=e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),i=e===1.5707963267948966?.551915024494:n,r=Math.cos(t),s=Math.sin(t),l=Math.cos(t+e),c=Math.sin(t+e);return[{x:r-s*i,y:s+r*i},{x:l+c*i,y:c-l*i},{x:l,y:c}]}const rw=(t,e,n,i)=>{const r=t*i-e*n<0?-1:1;let s=t*n+e*i;return s>1&&(s=1),s<-1&&(s=-1),r*Math.acos(s)},_6=(t,e,n,i,r,s,l,c,d,p,m,g,b)=>{const v=Math.pow(r,2),S=Math.pow(s,2),C=Math.pow(m,2),T=Math.pow(g,2);let w=v*S-v*T-S*C;w<0&&(w=0),w/=v*T+S*C,w=Math.sqrt(w)*(l===c?-1:1);const k=w*r/s*g,M=w*-s/r*m,O=p*k-d*M+(t+n)/2,H=d*k+p*M+(e+i)/2,z=(m-k)/r,F=(g-M)/s,$=(-m-k)/r,j=(-g-M)/s,I=rw(1,0,z,F);let Y=rw(z,F,$,j);c===0&&Y>0&&(Y-=ym),c===1&&Y<0&&(Y+=ym),b.centerX=O,b.centerY=H,b.ang1=I,b.ang2=Y};function S6(t,e,n,i,r,s,l,c=0,d=0,p=0){if(s===0||l===0)return;const m=Math.sin(c*ym/360),g=Math.cos(c*ym/360),b=g*(e-i)/2+m*(n-r)/2,v=-m*(e-i)/2+g*(n-r)/2;if(b===0&&v===0)return;s=Math.abs(s),l=Math.abs(l);const S=Math.pow(b,2)/Math.pow(s,2)+Math.pow(v,2)/Math.pow(l,2);S>1&&(s*=Math.sqrt(S),l*=Math.sqrt(S)),_6(e,n,i,r,s,l,d,p,m,g,b,v,zx);let{ang1:C,ang2:T}=zx;const{centerX:w,centerY:k}=zx;let M=Math.abs(T)/(ym/4);Math.abs(1-M)<1e-7&&(M=1);const O=Math.max(Math.ceil(M),1);T/=O;let H=t[t.length-2],z=t[t.length-1];const F={x:0,y:0};for(let $=0;$<O;$++){const j=v6(C,T),{x:I,y:Y}=Bx(j[0],s,l,g,m,w,k,F),{x:X,y:ne}=Bx(j[1],s,l,g,m,w,k,F),{x:q,y:J}=Bx(j[2],s,l,g,m,w,k,F);GA(t,H,z,I,Y,X,ne,q,J),H=q,z=J,C+=T}}function E6(t,e,n){const i=(l,c)=>{const d=c.x-l.x,p=c.y-l.y,m=Math.sqrt(d*d+p*p),g=d/m,b=p/m;return{len:m,nx:g,ny:b}},r=(l,c)=>{l===0?t.moveTo(c.x,c.y):t.lineTo(c.x,c.y)};let s=e[e.length-1];for(let l=0;l<e.length;l++){const c=e[l%e.length],d=c.radius??n;if(d<=0){r(l,c),s=c;continue}const p=e[(l+1)%e.length],m=i(c,s),g=i(c,p);if(m.len<1e-4||g.len<1e-4){r(l,c),s=c;continue}let b=Math.asin(m.nx*g.ny-m.ny*g.nx),v=1,S=!1;m.nx*g.nx-m.ny*-g.ny<0?b<0?b=Math.PI+b:(b=Math.PI-b,v=-1,S=!0):b>0&&(v=-1,S=!0);const C=b/2;let T,w=Math.abs(Math.cos(C)*d/Math.sin(C));w>Math.min(m.len/2,g.len/2)?(w=Math.min(m.len/2,g.len/2),T=Math.abs(w*Math.sin(C)/Math.cos(C))):T=d;const k=c.x+g.nx*w+-g.ny*T*v,M=c.y+g.ny*w+g.nx*T*v,O=Math.atan2(m.ny,m.nx)+Math.PI/2*v,H=Math.atan2(g.ny,g.nx)-Math.PI/2*v;l===0&&t.moveTo(k+Math.cos(O)*T,M+Math.sin(O)*T),t.arc(k,M,T,O,H,S),s=c}}function w6(t,e,n,i){const r=(c,d)=>Math.sqrt((c.x-d.x)**2+(c.y-d.y)**2),s=(c,d,p)=>({x:c.x+(d.x-c.x)*p,y:c.y+(d.y-c.y)*p}),l=e.length;for(let c=0;c<l;c++){const d=e[(c+1)%l],p=d.radius??n;if(p<=0){c===0?t.moveTo(d.x,d.y):t.lineTo(d.x,d.y);continue}const m=e[c],g=e[(c+2)%l],b=r(m,d);let v;if(b<1e-4)v=d;else{const T=Math.min(b/2,p);v=s(d,m,T/b)}const S=r(g,d);let C;if(S<1e-4)C=d;else{const T=Math.min(S/2,p);C=s(d,g,T/S)}c===0?t.moveTo(v.x,v.y):t.lineTo(v.x,v.y),t.quadraticCurveTo(d.x,d.y,C.x,C.y,i)}}const T6=new Ei;class C6{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Ds,this._graphicsPath2D=e,this.signed=e.checkForHoles}moveTo(e,n){return this.startPoly(e,n),this}lineTo(e,n){this._ensurePoly();const i=this._currentPoly.points,r=i[i.length-2],s=i[i.length-1];return(r!==e||s!==n)&&i.push(e,n),this}arc(e,n,i,r,s,l){this._ensurePoly(!1);const c=this._currentPoly.points;return FA(c,e,n,i,r,s,l),this}arcTo(e,n,i,r,s){this._ensurePoly();const l=this._currentPoly.points;return x6(l,e,n,i,r,s),this}arcToSvg(e,n,i,r,s,l,c){const d=this._currentPoly.points;return S6(d,this._currentPoly.lastX,this._currentPoly.lastY,l,c,e,n,i,r,s),this}bezierCurveTo(e,n,i,r,s,l,c){this._ensurePoly();const d=this._currentPoly;return GA(this._currentPoly.points,d.lastX,d.lastY,e,n,i,r,s,l,c),this}quadraticCurveTo(e,n,i,r,s){this._ensurePoly();const l=this._currentPoly;return y6(this._currentPoly.points,l.lastX,l.lastY,e,n,i,r,s),this}closePath(){return this.endPoly(!0),this}addPath(e,n){this.endPoly(),n&&!n.isIdentity()&&(e=e.clone(!0),e.transform(n));const i=this.shapePrimitives,r=i.length;for(let s=0;s<e.instructions.length;s++){const l=e.instructions[s];this[l.action](...l.data)}if(e.checkForHoles&&i.length-r>1){let s=null;for(let l=r;l<i.length;l++){const c=i[l];if(c.shape.type==="polygon"){const d=c.shape,p=s==null?void 0:s.shape;p&&p.containsPolygon(d)?(s.holes||(s.holes=[]),s.holes.push(c),i.copyWithin(l,l+1),i.length--,l--):s=c}}}return this}finish(e=!1){this.endPoly(e)}rect(e,n,i,r,s){return this.drawShape(new Ei(e,n,i,r),s),this}circle(e,n,i,r){return this.drawShape(new Y_(e,n,i),r),this}poly(e,n,i){const r=new mm(e);return r.closePath=n,this.drawShape(r,i),this}regularPoly(e,n,i,r,s=0,l){r=Math.max(r|0,3);const c=-1*Math.PI/2+s,d=Math.PI*2/r,p=[];for(let m=0;m<r;m++){const g=c-m*d;p.push(e+i*Math.cos(g),n+i*Math.sin(g))}return this.poly(p,!0,l),this}roundPoly(e,n,i,r,s,l=0,c){if(r=Math.max(r|0,3),s<=0)return this.regularPoly(e,n,i,r,l);const d=i*Math.sin(Math.PI/r)-.001;s=Math.min(s,d);const p=-1*Math.PI/2+l,m=Math.PI*2/r,g=(r-2)*Math.PI/r/2;for(let b=0;b<r;b++){const v=b*m+p,S=e+i*Math.cos(v),C=n+i*Math.sin(v),T=v+Math.PI+g,w=v-Math.PI-g,k=S+s*Math.cos(T),M=C+s*Math.sin(T),O=S+s*Math.cos(w),H=C+s*Math.sin(w);b===0?this.moveTo(k,M):this.lineTo(k,M),this.quadraticCurveTo(S,C,O,H,c)}return this.closePath()}roundShape(e,n,i=!1,r){return e.length<3?this:(i?w6(this,e,n,r):E6(this,e,n),this.closePath())}filletRect(e,n,i,r,s){if(s===0)return this.rect(e,n,i,r);const l=Math.min(i,r)/2,c=Math.min(l,Math.max(-l,s)),d=e+i,p=n+r,m=c<0?-c:0,g=Math.abs(c);return this.moveTo(e,n+g).arcTo(e+m,n+m,e+g,n,g).lineTo(d-g,n).arcTo(d-m,n+m,d,n+g,g).lineTo(d,p-g).arcTo(d-m,p-m,e+i-g,p,g).lineTo(e+g,p).arcTo(e+m,p-m,e,p-g,g).closePath()}chamferRect(e,n,i,r,s,l){if(s<=0)return this.rect(e,n,i,r);const c=Math.min(s,Math.min(i,r)/2),d=e+i,p=n+r,m=[e+c,n,d-c,n,d,n+c,d,p-c,d-c,p,e+c,p,e,p-c,e,n+c];for(let g=m.length-1;g>=2;g-=2)m[g]===m[g-2]&&m[g-1]===m[g-3]&&m.splice(g-1,2);return this.poly(m,!0,l)}ellipse(e,n,i,r,s){return this.drawShape(new V_(e,n,i,r),s),this}roundRect(e,n,i,r,s,l){return this.drawShape(new X_(e,n,i,r,s),l),this}drawShape(e,n){return this.endPoly(),this.shapePrimitives.push({shape:e,transform:n}),this}startPoly(e,n){let i=this._currentPoly;return i&&this.endPoly(),i=new mm,i.points.push(e,n),this._currentPoly=i,this}endPoly(e=!1){const n=this._currentPoly;return n&&n.points.length>2&&(n.closePath=e,this.shapePrimitives.push({shape:n})),this._currentPoly=null,this}_ensurePoly(e=!0){if(!this._currentPoly&&(this._currentPoly=new mm,e)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let i=n.shape.x,r=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const s=n.transform,l=i;i=s.a*i+s.c*r+s.tx,r=s.b*l+s.d*r+s.ty}this._currentPoly.points.push(i,r)}else this._currentPoly.points.push(0,0)}}buildPath(){const e=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let n=0;n<e.instructions.length;n++){const i=e.instructions[n];this[i.action](...i.data)}this.finish()}get bounds(){const e=this._bounds;e.clear();const n=this.shapePrimitives;for(let i=0;i<n.length;i++){const r=n[i],s=r.shape.getBounds(T6);r.transform?e.addRect(s,r.transform):e.addRect(s)}return e}}class tc{constructor(e,n=!1){this.instructions=[],this.uid=gi("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof e=="string"?Kz(e,this):this.instructions=(e==null?void 0:e.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new C6(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(e,n){return e=e.clone(),this.instructions.push({action:"addPath",data:[e,n]}),this._dirty=!0,this}arc(...e){return this.instructions.push({action:"arc",data:e}),this._dirty=!0,this}arcTo(...e){return this.instructions.push({action:"arcTo",data:e}),this._dirty=!0,this}arcToSvg(...e){return this.instructions.push({action:"arcToSvg",data:e}),this._dirty=!0,this}bezierCurveTo(...e){return this.instructions.push({action:"bezierCurveTo",data:e}),this._dirty=!0,this}bezierCurveToShort(e,n,i,r,s){const l=this.instructions[this.instructions.length-1],c=this.getLastPoint(Dr.shared);let d=0,p=0;if(!l||l.action!=="bezierCurveTo")d=c.x,p=c.y;else{d=l.data[2],p=l.data[3];const m=c.x,g=c.y;d=m+(m-d),p=g+(g-p)}return this.instructions.push({action:"bezierCurveTo",data:[d,p,e,n,i,r,s]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...e){return this.instructions.push({action:"ellipse",data:e}),this._dirty=!0,this}lineTo(...e){return this.instructions.push({action:"lineTo",data:e}),this._dirty=!0,this}moveTo(...e){return this.instructions.push({action:"moveTo",data:e}),this}quadraticCurveTo(...e){return this.instructions.push({action:"quadraticCurveTo",data:e}),this._dirty=!0,this}quadraticCurveToShort(e,n,i){const r=this.instructions[this.instructions.length-1],s=this.getLastPoint(Dr.shared);let l=0,c=0;if(!r||r.action!=="quadraticCurveTo")l=s.x,c=s.y;else{l=r.data[0],c=r.data[1];const d=s.x,p=s.y;l=d+(d-l),c=p+(p-c)}return this.instructions.push({action:"quadraticCurveTo",data:[l,c,e,n,i]}),this._dirty=!0,this}rect(e,n,i,r,s){return this.instructions.push({action:"rect",data:[e,n,i,r,s]}),this._dirty=!0,this}circle(e,n,i,r){return this.instructions.push({action:"circle",data:[e,n,i,r]}),this._dirty=!0,this}roundRect(...e){return this.instructions.push({action:"roundRect",data:e}),this._dirty=!0,this}poly(...e){return this.instructions.push({action:"poly",data:e}),this._dirty=!0,this}regularPoly(...e){return this.instructions.push({action:"regularPoly",data:e}),this._dirty=!0,this}roundPoly(...e){return this.instructions.push({action:"roundPoly",data:e}),this._dirty=!0,this}roundShape(...e){return this.instructions.push({action:"roundShape",data:e}),this._dirty=!0,this}filletRect(...e){return this.instructions.push({action:"filletRect",data:e}),this._dirty=!0,this}chamferRect(...e){return this.instructions.push({action:"chamferRect",data:e}),this._dirty=!0,this}star(e,n,i,r,s,l,c){s||(s=r/2);const d=-1*Math.PI/2+l,p=i*2,m=Math.PI*2/p,g=[];for(let b=0;b<p;b++){const v=b%2?s:r,S=b*m+d;g.push(e+v*Math.cos(S),n+v*Math.sin(S))}return this.poly(g,!0,c),this}clone(e=!1){const n=new tc;if(n.checkForHoles=this.checkForHoles,!e)n.instructions=this.instructions.slice();else for(let i=0;i<this.instructions.length;i++){const r=this.instructions[i];n.instructions.push({action:r.action,data:r.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(e){if(e.isIdentity())return this;const n=e.a,i=e.b,r=e.c,s=e.d,l=e.tx,c=e.ty;let d=0,p=0,m=0,g=0,b=0,v=0,S=0,C=0;for(let T=0;T<this.instructions.length;T++){const w=this.instructions[T],k=w.data;switch(w.action){case"moveTo":case"lineTo":d=k[0],p=k[1],k[0]=n*d+r*p+l,k[1]=i*d+s*p+c;break;case"bezierCurveTo":m=k[0],g=k[1],b=k[2],v=k[3],d=k[4],p=k[5],k[0]=n*m+r*g+l,k[1]=i*m+s*g+c,k[2]=n*b+r*v+l,k[3]=i*b+s*v+c,k[4]=n*d+r*p+l,k[5]=i*d+s*p+c;break;case"quadraticCurveTo":m=k[0],g=k[1],d=k[2],p=k[3],k[0]=n*m+r*g+l,k[1]=i*m+s*g+c,k[2]=n*d+r*p+l,k[3]=i*d+s*p+c;break;case"arcToSvg":d=k[5],p=k[6],S=k[0],C=k[1],k[0]=n*S+r*C,k[1]=i*S+s*C,k[5]=n*d+r*p+l,k[6]=i*d+s*p+c;break;case"circle":k[4]=$p(k[3],e);break;case"rect":k[4]=$p(k[4],e);break;case"ellipse":k[8]=$p(k[8],e);break;case"roundRect":k[5]=$p(k[5],e);break;case"addPath":k[0].transform(e);break;case"poly":k[2]=$p(k[2],e);break;default:ca("unknown transform action",w.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(e){let n=this.instructions.length-1,i=this.instructions[n];if(!i)return e.x=0,e.y=0,e;for(;i.action==="closePath";){if(n--,n<0)return e.x=0,e.y=0,e;i=this.instructions[n]}switch(i.action){case"moveTo":case"lineTo":e.x=i.data[0],e.y=i.data[1];break;case"quadraticCurveTo":e.x=i.data[2],e.y=i.data[3];break;case"bezierCurveTo":e.x=i.data[4],e.y=i.data[5];break;case"arc":case"arcToSvg":e.x=i.data[5],e.y=i.data[6];break;case"addPath":i.data[0].getLastPoint(e);break}return e}}function $p(t,e){return t?t.prepend(e):e.clone()}function pi(t,e,n){const i=t.getAttribute(e);return i?Number(i):n}function A6(t,e){const n=t.querySelectorAll("defs");for(let i=0;i<n.length;i++){const r=n[i];for(let s=0;s<r.children.length;s++){const l=r.children[s];switch(l.nodeName.toLowerCase()){case"lineargradient":e.defs[l.id]=M6(l);break;case"radialgradient":e.defs[l.id]=R6();break}}}}function M6(t){const e=pi(t,"x1",0),n=pi(t,"y1",0),i=pi(t,"x2",1),r=pi(t,"y2",0),s=t.getAttribute("gradientUnits")||"objectBoundingBox",l=new ic(e,n,i,r,s==="objectBoundingBox"?"local":"global");for(let c=0;c<t.children.length;c++){const d=t.children[c],p=pi(d,"offset",0),m=Gi.shared.setValue(d.getAttribute("stop-color")).toNumber();l.addColorStop(p,m)}return l}function R6(t){return ca("[SVG Parser] Radial gradients are not yet supported"),new ic(0,0,1,0)}function aw(t){const e=t.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return e?e[1]:""}const sw={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function qA(t,e){const n=t.getAttribute("style"),i={},r={},s={strokeStyle:i,fillStyle:r,useFill:!1,useStroke:!1};for(const l in sw){const c=t.getAttribute(l);c&&lw(e,s,l,c.trim())}if(n){const l=n.split(";");for(let c=0;c<l.length;c++){const d=l[c].trim(),[p,m]=d.split(":");sw[p]&&lw(e,s,p,m.trim())}}return{strokeStyle:s.useStroke?i:null,fillStyle:s.useFill?r:null,useFill:s.useFill,useStroke:s.useStroke}}function lw(t,e,n,i){switch(n){case"stroke":if(i!=="none"){if(i.startsWith("url(")){const r=aw(i);e.strokeStyle.fill=t.defs[r]}else e.strokeStyle.color=Gi.shared.setValue(i).toNumber();e.useStroke=!0}break;case"stroke-width":e.strokeStyle.width=Number(i);break;case"fill":if(i!=="none"){if(i.startsWith("url(")){const r=aw(i);e.fillStyle.fill=t.defs[r]}else e.fillStyle.color=Gi.shared.setValue(i).toNumber();e.useFill=!0}break;case"fill-opacity":e.fillStyle.alpha=Number(i);break;case"stroke-opacity":e.strokeStyle.alpha=Number(i);break;case"opacity":e.fillStyle.alpha=Number(i),e.strokeStyle.alpha=Number(i);break}}function N6(t){if(t.length<=2)return!0;const e=t.map(c=>c.area).sort((c,d)=>d-c),[n,i]=e,r=e[e.length-1],s=n/i,l=i/r;return!(s>3&&l<2)}function k6(t){return t.split(/(?=[Mm])/).filter(i=>i.trim().length>0)}function O6(t){const e=t.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!e||e.length<4)return 0;const n=e.map(Number),i=[],r=[];for(let m=0;m<n.length;m+=2)m+1<n.length&&(i.push(n[m]),r.push(n[m+1]));if(i.length===0||r.length===0)return 0;const s=Math.min(...i),l=Math.max(...i),c=Math.min(...r),d=Math.max(...r);return(l-s)*(d-c)}function ow(t,e){const n=new tc(t,!1);for(const i of n.instructions)e.instructions.push(i)}function D6(t,e){if(typeof t=="string"){const l=document.createElement("div");l.innerHTML=t.trim(),t=l.querySelector("svg")}const n={context:e,defs:{},path:new tc};A6(t,n);const i=t.children,{fillStyle:r,strokeStyle:s}=qA(t,n);for(let l=0;l<i.length;l++){const c=i[l];c.nodeName.toLowerCase()!=="defs"&&YA(c,n,r,s)}return e}function YA(t,e,n,i){const r=t.children,{fillStyle:s,strokeStyle:l}=qA(t,e);s&&n?n={...n,...s}:s&&(n=s),l&&i?i={...i,...l}:l&&(i=l);const c=!n&&!i;c&&(n={color:0});let d,p,m,g,b,v,S,C,T,w,k,M,O,H,z,F,$;switch(t.nodeName.toLowerCase()){case"path":{H=t.getAttribute("d");const j=t.getAttribute("fill-rule"),I=k6(H),Y=j==="evenodd",X=I.length>1;if(Y&&X){const q=I.map(B=>({path:B,area:O6(B)}));if(q.sort((B,V)=>V.area-B.area),I.length>3||!N6(q))for(let B=0;B<q.length;B++){const V=q[B],Z=B===0;e.context.beginPath();const Q=new tc(void 0,!0);ow(V.path,Q),e.context.path(Q),Z?(n&&e.context.fill(n),i&&e.context.stroke(i)):e.context.cut()}else for(let B=0;B<q.length;B++){const V=q[B],Z=B%2===1;e.context.beginPath();const Q=new tc(void 0,!0);ow(V.path,Q),e.context.path(Q),Z?e.context.cut():(n&&e.context.fill(n),i&&e.context.stroke(i))}}else{const q=j?j==="evenodd":!0;z=new tc(H,q),e.context.path(z),n&&e.context.fill(n),i&&e.context.stroke(i)}break}case"circle":S=pi(t,"cx",0),C=pi(t,"cy",0),T=pi(t,"r",0),e.context.ellipse(S,C,T,T),n&&e.context.fill(n),i&&e.context.stroke(i);break;case"rect":d=pi(t,"x",0),p=pi(t,"y",0),F=pi(t,"width",0),$=pi(t,"height",0),w=pi(t,"rx",0),k=pi(t,"ry",0),w||k?e.context.roundRect(d,p,F,$,w||k):e.context.rect(d,p,F,$),n&&e.context.fill(n),i&&e.context.stroke(i);break;case"ellipse":S=pi(t,"cx",0),C=pi(t,"cy",0),w=pi(t,"rx",0),k=pi(t,"ry",0),e.context.beginPath(),e.context.ellipse(S,C,w,k),n&&e.context.fill(n),i&&e.context.stroke(i);break;case"line":m=pi(t,"x1",0),g=pi(t,"y1",0),b=pi(t,"x2",0),v=pi(t,"y2",0),e.context.beginPath(),e.context.moveTo(m,g),e.context.lineTo(b,v),i&&e.context.stroke(i);break;case"polygon":O=t.getAttribute("points"),M=O.match(/-?\d+/g).map(j=>parseInt(j,10)),e.context.poly(M,!0),n&&e.context.fill(n),i&&e.context.stroke(i);break;case"polyline":O=t.getAttribute("points"),M=O.match(/-?\d+/g).map(j=>parseInt(j,10)),e.context.poly(M,!1),i&&e.context.stroke(i);break;case"g":case"svg":break;default:{ca(`[SVG parser] <${t.nodeName}> elements unsupported`);break}}c&&(n=null);for(let j=0;j<r.length;j++)YA(r[j],e,n,i)}const cw={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class $0{constructor(e,n){this.uid=gi("fillPattern"),this._tick=0,this.transform=new jt,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),n&&(e.source.style.addressModeU=cw[n].addressModeU,e.source.style.addressModeV=cw[n].addressModeV)}setTransform(e){const n=this.texture;this.transform.copyFrom(e),this.transform.invert(),this.transform.scale(1/n.frame.width,1/n.frame.height),this._tick++}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture=e,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}function z6(t){return Gi.isColorLike(t)}function uw(t){return t instanceof $0}function fw(t){return t instanceof ic}function B6(t){return t instanceof Tn}function L6(t,e,n){const i=Gi.shared.setValue(e??0);return t.color=i.toNumber(),t.alpha=i.alpha===1?n.alpha:i.alpha,t.texture=Tn.WHITE,{...n,...t}}function U6(t,e,n){return t.texture=e,{...n,...t}}function dw(t,e,n){return t.fill=e,t.color=16777215,t.texture=e.texture,t.matrix=e.transform,{...n,...t}}function hw(t,e,n){return e.buildGradient(),t.fill=e,t.color=16777215,t.texture=e.texture,t.matrix=e.transform,t.textureSpace=e.textureSpace,{...n,...t}}function I6(t,e){const n={...e,...t},i=Gi.shared.setValue(n.color);return n.alpha*=i.alpha,n.color=i.toNumber(),n}function ff(t,e){if(t==null)return null;const n={},i=t;return z6(t)?L6(n,t,e):B6(t)?U6(n,t,e):uw(t)?dw(n,t,e):fw(t)?hw(n,t,e):i.fill&&uw(i.fill)?dw(i,i.fill,e):i.fill&&fw(i.fill)?hw(i,i.fill,e):I6(i,e)}function _0(t,e){const{width:n,alignment:i,miterLimit:r,cap:s,join:l,pixelLine:c,...d}=e,p=ff(t,d);return p?{width:n,alignment:i,miterLimit:r,cap:s,join:l,pixelLine:c,...p}:null}function H6(t,e){let n=1;const i=t.shapePath.shapePrimitives;for(let r=0;r<i.length;r++){const s=i[r].shape;if(s.type!=="polygon")continue;const l=s.points,c=l.length;if(c<6)continue;const d=s.closePath;for(let p=0;p<c;p+=2){if(!d&&(p===0||p===c-2))continue;const m=(p-2+c)%c,g=(p+2)%c,b=l[m],v=l[m+1],S=l[p],C=l[p+1],T=l[g],w=l[g+1],k=b-S,M=v-C,O=T-S,H=w-C,z=k*k+M*M,F=O*O+H*H;if(z<1e-12||F<1e-12)continue;let I=(k*O+M*H)/Math.sqrt(z*F);I<-1?I=-1:I>1&&(I=1);const Y=Math.sqrt((1-I)*.5);if(Y<1e-6)continue;const X=Math.min(1/Y,e);X>n&&(n=X)}}return n}const j6=new Dr,pw=new jt,Q_=class ro extends ho{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=gi("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new tc,this._transform=new jt,this._fillStyle={...ro.defaultFillStyle},this._strokeStyle={...ro.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Ds,this._boundsDirty=!0}clone(){const e=new ro;return e.batchMode=this.batchMode,e.instructions=this.instructions.slice(),e._activePath=this._activePath.clone(),e._transform=this._transform.clone(),e._fillStyle={...this._fillStyle},e._strokeStyle={...this._strokeStyle},e._stateStack=this._stateStack.slice(),e._bounds=this._bounds.clone(),e._boundsDirty=!0,e}get fillStyle(){return this._fillStyle}set fillStyle(e){this._fillStyle=ff(e,ro.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(e){this._strokeStyle=_0(e,ro.defaultStrokeStyle)}setFillStyle(e){return this._fillStyle=ff(e,ro.defaultFillStyle),this}setStrokeStyle(e){return this._strokeStyle=ff(e,ro.defaultStrokeStyle),this}texture(e,n,i,r,s,l){return this.instructions.push({action:"texture",data:{image:e,dx:i||0,dy:r||0,dw:s||e.frame.width,dh:l||e.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?Gi.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new tc,this}fill(e,n){let i;const r=this.instructions[this.instructions.length-1];return this._tick===0&&(r==null?void 0:r.action)==="stroke"?i=r.data.path:i=this._activePath.clone(),i?(e!=null&&(n!==void 0&&typeof e=="number"&&(Qt(mi,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),e={color:e,alpha:n}),this._fillStyle=ff(e,ro.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:i}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:e,y:n}=this._activePath.getLastPoint(Dr.shared);this._activePath.clear(),this._activePath.moveTo(e,n)}stroke(e){let n;const i=this.instructions[this.instructions.length-1];return this._tick===0&&(i==null?void 0:i.action)==="fill"?n=i.data.path:n=this._activePath.clone(),n?(e!=null&&(this._strokeStyle=_0(e,ro.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let e=0;e<2;e++){const n=this.instructions[this.instructions.length-1-e],i=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(i);else{n.data.hole=i;break}}return this._initNextPathLocation(),this}arc(e,n,i,r,s,l){this._tick++;const c=this._transform;return this._activePath.arc(c.a*e+c.c*n+c.tx,c.b*e+c.d*n+c.ty,i,r,s,l),this}arcTo(e,n,i,r,s){this._tick++;const l=this._transform;return this._activePath.arcTo(l.a*e+l.c*n+l.tx,l.b*e+l.d*n+l.ty,l.a*i+l.c*r+l.tx,l.b*i+l.d*r+l.ty,s),this}arcToSvg(e,n,i,r,s,l,c){this._tick++;const d=this._transform;return this._activePath.arcToSvg(e,n,i,r,s,d.a*l+d.c*c+d.tx,d.b*l+d.d*c+d.ty),this}bezierCurveTo(e,n,i,r,s,l,c){this._tick++;const d=this._transform;return this._activePath.bezierCurveTo(d.a*e+d.c*n+d.tx,d.b*e+d.d*n+d.ty,d.a*i+d.c*r+d.tx,d.b*i+d.d*r+d.ty,d.a*s+d.c*l+d.tx,d.b*s+d.d*l+d.ty,c),this}closePath(){var e;return this._tick++,(e=this._activePath)==null||e.closePath(),this}ellipse(e,n,i,r){return this._tick++,this._activePath.ellipse(e,n,i,r,this._transform.clone()),this}circle(e,n,i){return this._tick++,this._activePath.circle(e,n,i,this._transform.clone()),this}path(e){return this._tick++,this._activePath.addPath(e,this._transform.clone()),this}lineTo(e,n){this._tick++;const i=this._transform;return this._activePath.lineTo(i.a*e+i.c*n+i.tx,i.b*e+i.d*n+i.ty),this}moveTo(e,n){this._tick++;const i=this._transform,r=this._activePath.instructions,s=i.a*e+i.c*n+i.tx,l=i.b*e+i.d*n+i.ty;return r.length===1&&r[0].action==="moveTo"?(r[0].data[0]=s,r[0].data[1]=l,this):(this._activePath.moveTo(s,l),this)}quadraticCurveTo(e,n,i,r,s){this._tick++;const l=this._transform;return this._activePath.quadraticCurveTo(l.a*e+l.c*n+l.tx,l.b*e+l.d*n+l.ty,l.a*i+l.c*r+l.tx,l.b*i+l.d*r+l.ty,s),this}rect(e,n,i,r){return this._tick++,this._activePath.rect(e,n,i,r,this._transform.clone()),this}roundRect(e,n,i,r,s){return this._tick++,this._activePath.roundRect(e,n,i,r,s,this._transform.clone()),this}poly(e,n){return this._tick++,this._activePath.poly(e,n,this._transform.clone()),this}regularPoly(e,n,i,r,s=0,l){return this._tick++,this._activePath.regularPoly(e,n,i,r,s,l),this}roundPoly(e,n,i,r,s,l){return this._tick++,this._activePath.roundPoly(e,n,i,r,s,l),this}roundShape(e,n,i,r){return this._tick++,this._activePath.roundShape(e,n,i,r),this}filletRect(e,n,i,r,s){return this._tick++,this._activePath.filletRect(e,n,i,r,s),this}chamferRect(e,n,i,r,s,l){return this._tick++,this._activePath.chamferRect(e,n,i,r,s,l),this}star(e,n,i,r,s=0,l=0){return this._tick++,this._activePath.star(e,n,i,r,s,l,this._transform.clone()),this}svg(e){return this._tick++,D6(e,this),this}restore(){const e=this._stateStack.pop();return e&&(this._transform=e.transform,this._fillStyle=e.fillStyle,this._strokeStyle=e.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(e){return this._transform.rotate(e),this}scale(e,n=e){return this._transform.scale(e,n),this}setTransform(e,n,i,r,s,l){return e instanceof jt?(this._transform.set(e.a,e.b,e.c,e.d,e.tx,e.ty),this):(this._transform.set(e,n,i,r,s,l),this)}transform(e,n,i,r,s,l){return e instanceof jt?(this._transform.append(e),this):(pw.set(e,n,i,r,s,l),this._transform.append(pw),this)}translate(e,n=e){return this._transform.translate(e,n),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;const e=this._bounds;e.clear();for(let n=0;n<this.instructions.length;n++){const i=this.instructions[n],r=i.action;if(r==="fill"){const s=i.data;e.addBounds(s.path.bounds)}else if(r==="texture"){const s=i.data;e.addFrame(s.dx,s.dy,s.dx+s.dw,s.dy+s.dh,s.transform)}if(r==="stroke"){const s=i.data,l=s.style.alignment;let c=s.style.width*(1-l);s.style.join==="miter"&&(c*=H6(s.path,s.style.miterLimit));const d=s.path.bounds;e.addFrame(d.minX-c,d.minY-c,d.maxX+c,d.maxY+c)}}return e.isValid||e.set(0,0,0,0),e}containsPoint(e){var r;if(!this.bounds.containsPoint(e.x,e.y))return!1;const n=this.instructions;let i=!1;for(let s=0;s<n.length;s++){const l=n[s],c=l.data,d=c.path;if(!l.action||!d)continue;const p=c.style,m=d.shapePath.shapePrimitives;for(let g=0;g<m.length;g++){const b=m[g].shape;if(!p||!b)continue;const v=m[g].transform,S=v?v.applyInverse(e,j6):e;if(l.action==="fill")i=b.contains(S.x,S.y);else{const T=p;i=b.strokeContains(S.x,S.y,T.width,T.alignment)}const C=c.hole;if(C){const T=(r=C.shapePath)==null?void 0:r.shapePrimitives;if(T)for(let w=0;w<T.length;w++)T[w].shape.contains(S.x,S.y)&&(i=!1)}if(i)return!0}}return i}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null)}destroy(e=!1){if(this.destroyed)return;if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),typeof e=="boolean"?e:e==null?void 0:e.texture){const i=typeof e=="boolean"?e:e==null?void 0:e.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(i)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(i))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Q_.defaultFillStyle={color:16777215,alpha:1,texture:Tn.WHITE,matrix:null,fill:null,textureSpace:"local"};Q_.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Tn.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let fl=Q_;class P6{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class G6{constructor(){this.instructions=new H_}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const J_=class Wv{constructor(e){this._renderer=e,this._managedContexts=new Ym({renderer:e,type:"resource",name:"graphicsContext"})}init(e){Wv.defaultOptions.bezierSmoothness=(e==null?void 0:e.bezierSmoothness)??Wv.defaultOptions.bezierSmoothness}getContextRenderData(e){return this.getGpuContext(e).graphicsData||this._initContextRenderData(e)}updateGpuContext(e){const n=e._gpuData,i=!!n[this._renderer.uid],r=n[this._renderer.uid]||this._initContext(e);return(e.dirty||!i)&&(i&&r.reset(),r.isBatchable=!1,e.dirty=!1),r}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){const n=new G6,i=this.getGpuContext(e);return i.graphicsData=n,n.init(),n}_initContext(e){const n=new P6;return n.context=e,e._gpuData[this._renderer.uid]=n,this._managedContexts.add(e),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};J_.extension={type:[Rt.CanvasSystem],name:"graphicsContext"};J_.defaultOptions={bezierSmoothness:.5};let F6=J_;class VA{constructor(e,n){this.state=F_.for2d(),this.renderer=e,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Ym({renderer:e,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(e){return!1}addRenderable(e,n){this._managedGraphics.add(e),this.renderer.renderPipes.batch.break(n),n.add(e)}updateRenderable(e){}execute(e){e.isRenderable&&this._adaptor.execute(this,e)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null}}VA.extension={type:[Rt.CanvasPipes],name:"graphics"};function q6(t,e,n){const i=(t>>24&255)/255;e[n++]=(t&255)/255*i,e[n++]=(t>>8&255)/255*i,e[n++]=(t>>16&255)/255*i,e[n++]=i}class Y6{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(e=>{Ra.return(e)}),this.batches.length=0}}class XA{constructor(e,n){this.state=F_.for2d(),this.renderer=e,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Ym({renderer:e,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(e){const n=e.context,i=!!e._gpuData,s=this.renderer.graphicsContext.updateGpuContext(n);return!!(s.isBatchable||i!==s.isBatchable)}addRenderable(e,n){const r=this.renderer.graphicsContext.updateGpuContext(e.context);e.didViewUpdate&&this._rebuild(e),r.isBatchable?this._addToBatcher(e,n):(this.renderer.renderPipes.batch.break(n),n.add(e))}updateRenderable(e){const i=this._getGpuDataForRenderable(e).batches;for(let r=0;r<i.length;r++){const s=i[r];s._batcher.updateElement(s)}}execute(e){if(!e.isRenderable)return;const n=this.renderer,i=e.context;if(!n.graphicsContext.getGpuContext(i).batches.length)return;const s=i.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;const l=s.resources.localUniforms.uniforms;l.uTransformMatrix=e.groupTransform,l.uRound=n._roundPixels|e._roundPixels,q6(e.groupColorAlpha,l.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){const n=this._getGpuDataForRenderable(e),r=this.renderer.graphicsContext.updateGpuContext(e.context);n.destroy(),r.isBatchable&&this._updateBatchesForRenderable(e,n)}_addToBatcher(e,n){const i=this.renderer.renderPipes.batch,r=this._getGpuDataForRenderable(e).batches;for(let s=0;s<r.length;s++){const l=r[s];i.addToBatch(l,n)}}_getGpuDataForRenderable(e){return e._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(e)}_initGpuDataForRenderable(e){const n=new Y6;return e._gpuData[this.renderer.uid]=n,this._managedGraphics.add(e),n}_updateBatchesForRenderable(e,n){const i=e.context,s=this.renderer.graphicsContext.getGpuContext(i),l=this.renderer._roundPixels|e._roundPixels;n.batches=s.batches.map(c=>{const d=Ra.get(K_);return c.copyTo(d),d.renderable=e,d.roundPixels=l,d})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}XA.extension={type:[Rt.WebGLPipes,Rt.WebGPUPipes],name:"graphics"};si.add(VA);si.add(XA);si.add(F6);si.add(Z_);class Aa extends j_{constructor(e){e instanceof fl&&(e={context:e});const{context:n,roundPixels:i,...r}=e||{};super({label:"Graphics",...r}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new fl,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=i??!1}set context(e){e!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=e,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(e){return this._context.containsPoint(e)}destroy(e){this._ownedContext&&!e?this._ownedContext.destroy(e):(e===!0||(e==null?void 0:e.context)===!0)&&this._context.destroy(e),this._ownedContext=null,this._context=null,super.destroy(e)}_onTouch(e){this._gcLastUsed=e,this._context._gcLastUsed=e}_callContextMethod(e,n){return this.context[e](...n),this}setFillStyle(...e){return this._callContextMethod("setFillStyle",e)}setStrokeStyle(...e){return this._callContextMethod("setStrokeStyle",e)}fill(...e){return this._callContextMethod("fill",e)}stroke(...e){return this._callContextMethod("stroke",e)}texture(...e){return this._callContextMethod("texture",e)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...e){return this._callContextMethod("arc",e)}arcTo(...e){return this._callContextMethod("arcTo",e)}arcToSvg(...e){return this._callContextMethod("arcToSvg",e)}bezierCurveTo(...e){return this._callContextMethod("bezierCurveTo",e)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...e){return this._callContextMethod("ellipse",e)}circle(...e){return this._callContextMethod("circle",e)}path(...e){return this._callContextMethod("path",e)}lineTo(...e){return this._callContextMethod("lineTo",e)}moveTo(...e){return this._callContextMethod("moveTo",e)}quadraticCurveTo(...e){return this._callContextMethod("quadraticCurveTo",e)}rect(...e){return this._callContextMethod("rect",e)}roundRect(...e){return this._callContextMethod("roundRect",e)}poly(...e){return this._callContextMethod("poly",e)}regularPoly(...e){return this._callContextMethod("regularPoly",e)}roundPoly(...e){return this._callContextMethod("roundPoly",e)}roundShape(...e){return this._callContextMethod("roundShape",e)}filletRect(...e){return this._callContextMethod("filletRect",e)}chamferRect(...e){return this._callContextMethod("chamferRect",e)}star(...e){return this._callContextMethod("star",e)}svg(...e){return this._callContextMethod("svg",e)}restore(...e){return this._callContextMethod("restore",e)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...e){return this._callContextMethod("rotate",e)}scaleTransform(...e){return this._callContextMethod("scale",e)}setTransform(...e){return this._callContextMethod("setTransform",e)}transform(...e){return this._callContextMethod("transform",e)}translateTransform(...e){return this._callContextMethod("translate",e)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(e){this._context.fillStyle=e}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(e){this._context.strokeStyle=e}clone(e=!1){return e?new Aa(this._context.clone()):(this._ownedContext=null,new Aa(this._context))}lineStyle(e,n,i){Qt(mi,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const r={};return e&&(r.width=e),n&&(r.color=n),i&&(r.alpha=i),this.context.strokeStyle=r,this}beginFill(e,n){Qt(mi,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const i={};return e!==void 0&&(i.color=e),n!==void 0&&(i.alpha=n),this.context.fillStyle=i,this}endFill(){Qt(mi,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();const e=this.context.strokeStyle;return(e.width!==fl.defaultStrokeStyle.width||e.color!==fl.defaultStrokeStyle.color||e.alpha!==fl.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...e){return Qt(mi,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",e)}drawEllipse(...e){return Qt(mi,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",e)}drawPolygon(...e){return Qt(mi,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",e)}drawRect(...e){return Qt(mi,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",e)}drawRoundedRect(...e){return Qt(mi,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",e)}drawStar(...e){return Qt(mi,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",e)}}class V6 extends j_{constructor(e,n){const{text:i,resolution:r,style:s,anchor:l,width:c,height:d,roundPixels:p,...m}=e;super({...m}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=i??"",this.style=s,this.resolution=r??null,this.allowChildren=!1,this._anchor=new yr({_onUpdate:()=>{this.onViewUpdate()}}),l&&(this.anchor=l),this.roundPixels=p??!1,c!==void 0&&(this.width=c),d!==void 0&&(this.height=d)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}set text(e){e=e.toString(),this._text!==e&&(this._text=e,this.onViewUpdate())}get text(){return this._text}set resolution(e){this._autoResolution=e===null,this._resolution=e,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(e){var n;e||(e={}),(n=this._style)==null||n.off("update",this.onViewUpdate,this),e instanceof this._styleClass?this._style=e:this._style=new this._styleClass(e),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(e){this._setWidth(e,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(e){this._setHeight(e,this.bounds.height)}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this.bounds.width,e.height=Math.abs(this.scale.y)*this.bounds.height,e}setSize(e,n){typeof e=="object"?(n=e.height??e.width,e=e.width):n??(n=e),e!==void 0&&this._setWidth(e,this.bounds.width),n!==void 0&&this._setHeight(n,this.bounds.height)}containsPoint(e){const n=this.bounds.width,i=this.bounds.height,r=-n*this.anchor.x;let s=0;return e.x>=r&&e.x<=r+n&&(s=-i*this.anchor.y,e.y>=s&&e.y<=s+i)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}destroy(e=!1){super.destroy(e),this.owner=null,this._bounds=null,this._anchor=null,(typeof e=="boolean"?e:e!=null&&e.style)&&this._style.destroy(e),this._style=null,this._text=null}get styleKey(){return`${this._text}:${this._style.styleKey}:${this._resolution}`}}function X6(t,e){let n=t[0]??{};return(typeof n=="string"||t[1])&&(Qt(mi,`use new ${e}({ text: "hi!", style }) instead`),n={text:n,style:t[1]}),n}class K6{constructor(e){this._canvasPool=Object.create(null),this.canvasOptions=e||{},this.enableFullScreen=!1}_createCanvasAndContext(e,n){const i=es.get().createCanvas();i.width=e,i.height=n;const r=i.getContext("2d");return{canvas:i,context:r}}getOptimalCanvasAndContext(e,n,i=1){e=Math.ceil(e*i-1e-6),n=Math.ceil(n*i-1e-6),e=eh(e),n=eh(n);const r=(e<<17)+(n<<1);this._canvasPool[r]||(this._canvasPool[r]=[]);let s=this._canvasPool[r].pop();return s||(s=this._createCanvasAndContext(e,n)),s}returnCanvasAndContext(e){const n=e.canvas,{width:i,height:r}=n,s=(i<<17)+(r<<1);e.context.resetTransform(),e.context.clearRect(0,0,i,r),this._canvasPool[s].push(e)}clear(){this._canvasPool={}}}const $v=new K6;Fm.register($v);let ef=null,Qo=null;function W6(t,e){ef||(ef=es.get().createCanvas(256,128),Qo=ef.getContext("2d",{willReadFrequently:!0}),Qo.globalCompositeOperation="copy",Qo.globalAlpha=1),(ef.width<t||ef.height<e)&&(ef.width=eh(t),ef.height=eh(e))}function mw(t,e,n){for(let i=0,r=4*n*e;i<e;++i,r+=4)if(t[r+3]!==0)return!1;return!0}function gw(t,e,n,i,r){const s=4*e;for(let l=i,c=i*s+4*n;l<=r;++l,c+=s)if(t[c+3]!==0)return!1;return!0}function $6(...t){let e=t[0];e.canvas||(e={canvas:t[0],resolution:t[1]});const{canvas:n}=e,i=Math.min(e.resolution??1,1),r=e.width??n.width,s=e.height??n.height;let l=e.output;if(W6(r,s),!Qo)throw new TypeError("Failed to get canvas 2D context");Qo.drawImage(n,0,0,r,s,0,0,r*i,s*i);const d=Qo.getImageData(0,0,r,s).data;let p=0,m=0,g=r-1,b=s-1;for(;m<s&&mw(d,r,m);)++m;if(m===s)return Ei.EMPTY;for(;mw(d,r,b);)--b;for(;gw(d,r,p,m,b);)++p;for(;gw(d,r,g,m,b);)--g;return++g,++b,Qo.globalCompositeOperation="source-over",Qo.strokeRect(p,m,g-p,b-m),Qo.globalCompositeOperation="copy",l??(l=new Ei),l.set(p/i,m/i,(g-p)/i,(b-m)/i),l}/**
|
|
299
|
+
* tiny-lru
|
|
300
|
+
*
|
|
301
|
+
* @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
302
|
+
* @license BSD-3-Clause
|
|
303
|
+
* @version 11.4.7
|
|
304
|
+
*/class Z6{constructor(e=0,n=0,i=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=e,this.resetTtl=i,this.size=0,this.ttl=n}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(e){if(this.has(e)){const n=this.items[e];delete this.items[e],this.size--,n.prev!==null&&(n.prev.next=n.next),n.next!==null&&(n.next.prev=n.prev),this.first===n&&(this.first=n.next),this.last===n&&(this.last=n.prev)}return this}entries(e=this.keys()){const n=new Array(e.length);for(let i=0;i<e.length;i++){const r=e[i];n[i]=[r,this.get(r)]}return n}evict(e=!1){if(e||this.size>0){const n=this.first;delete this.items[n.key],--this.size===0?(this.first=null,this.last=null):(this.first=n.next,this.first.prev=null)}return this}expiresAt(e){let n;return this.has(e)&&(n=this.items[e].expiry),n}get(e){const n=this.items[e];if(n!==void 0){if(this.ttl>0&&n.expiry<=Date.now()){this.delete(e);return}return this.moveToEnd(n),n.value}}has(e){return e in this.items}moveToEnd(e){this.last!==e&&(e.prev!==null&&(e.prev.next=e.next),e.next!==null&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),e.prev=this.last,e.next=null,this.last!==null&&(this.last.next=e),this.last=e,this.first===null&&(this.first=e))}keys(){const e=new Array(this.size);let n=this.first,i=0;for(;n!==null;)e[i++]=n.key,n=n.next;return e}setWithEvicted(e,n,i=this.resetTtl){let r=null;if(this.has(e))this.set(e,n,!0,i);else{this.max>0&&this.size===this.max&&(r={...this.first},this.evict(!0));let s=this.items[e]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:n};++this.size===1?this.first=s:this.last.next=s,this.last=s}return r}set(e,n,i=!1,r=this.resetTtl){let s=this.items[e];return i||s!==void 0?(s.value=n,i===!1&&r&&(s.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(s)):(this.max>0&&this.size===this.max&&this.evict(!0),s=this.items[e]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:n},++this.size===1?this.first=s:this.last.next=s,this.last=s),this}values(e=this.keys()){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=this.get(e[i]);return n}}function Q6(t=1e3,e=0,n=!1){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");if(typeof n!="boolean")throw new TypeError("Invalid resetTtl value");return new Z6(t,e,n)}function KA(t){return!!t.tagStyles&&Object.keys(t.tagStyles).length>0}function WA(t){return t.includes("<")}function J6(t,e){return t.clone().assign(e)}function eB(t,e){const n=[],i=e.tagStyles;if(!KA(e)||!WA(t))return n.push({text:t,style:e}),n;const r=[e],s=[];let l="",c=0;for(;c<t.length;){const d=t[c];if(d==="<"){const p=t.indexOf(">",c);if(p===-1){l+=d,c++;continue}const m=t.slice(c+1,p);if(m.startsWith("/")){const g=m.slice(1).trim();if(s.length>0&&s[s.length-1]===g){l.length>0&&(n.push({text:l,style:r[r.length-1]}),l=""),r.pop(),s.pop(),c=p+1;continue}else{l+=t.slice(c,p+1),c=p+1;continue}}else{const g=m.trim();if(i[g]){l.length>0&&(n.push({text:l,style:r[r.length-1]}),l="");const b=r[r.length-1],v=J6(b,i[g]);r.push(v),s.push(g),c=p+1;continue}else{l+=t.slice(c,p+1),c=p+1;continue}}}else l+=d,c++}return l.length>0&&n.push({text:l,style:r[r.length-1]}),n}const tB=[10,13],nB=new Set(tB),iB=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],rB=new Set(iB),aB=[9,32];new Set(aB);const sB=[45,8208,8211,8212,173],lB=new Set(sB),oB=/(\r\n|\r|\n)/,cB=/(?:\r\n|\r|\n)/;function S0(t){return typeof t!="string"?!1:nB.has(t.charCodeAt(0))}function Os(t,e){return typeof t!="string"?!1:rB.has(t.charCodeAt(0))}function uB(t){return typeof t!="string"?!1:lB.has(t.charCodeAt(0))}function $A(t){return t==="normal"||t==="pre-line"}function ZA(t){return t==="normal"}function Zo(t){if(typeof t!="string")return"";let e=t.length-1;for(;e>=0&&Os(t[e]);)e--;return e<t.length-1?t.slice(0,e+1):t}function QA(t){const e=[],n=[];if(typeof t!="string")return e;for(let i=0;i<t.length;i++){const r=t[i],s=t[i+1];if(Os(r)||S0(r)){n.length>0&&(e.push(n.join("")),n.length=0),r==="\r"&&s===`
|
|
305
|
+
`?(e.push(`\r
|
|
306
|
+
`),i++):e.push(r);continue}n.push(r),uB(r)&&s&&!Os(s)&&!S0(s)&&(e.push(n.join("")),n.length=0)}return n.length>0&&e.push(n.join("")),e}function JA(t,e,n,i){const r=n(t),s=[];for(let l=0;l<r.length;l++){let c=r[l],d=c,p=1;for(;r[l+p];){const m=r[l+p];if(!i(d,m,t,l,e))c+=m,d=m,p++;else break}l+=p-1,s.push(c)}return s}const fB=/\r\n|\r|\n/g;function dB(t,e,n,i,r,s,l,c){var J,B;const d=eB(t,e);if(ZA(e.whiteSpace))for(let V=0;V<d.length;V++){const Z=d[V];d[V]={text:Z.text.replace(fB," "),style:Z.style}}const m=[];let g=[];for(const V of d){const Z=V.text.split(oB);for(let Q=0;Q<Z.length;Q++){const G=Z[Q];G===`\r
|
|
307
|
+
`||G==="\r"||G===`
|
|
308
|
+
`?(m.push(g),g=[]):G.length>0&&g.push({text:G,style:V.style})}}(g.length>0||m.length===0)&&m.push(g);const b=n?hB(m,e,i,r,l,c):m,v=[],S=[],C=[],T=[],w=[];let k=0;const M=e._fontString,O=s(M);O.fontSize===0&&(O.fontSize=e.fontSize,O.ascent=e.fontSize);let H="",z=!!e.dropShadow,F=((J=e._stroke)==null?void 0:J.width)||0;for(const V of b){let Z=0,Q=O.ascent,G=O.descent,K="";for(const U of V){const le=U.style._fontString,de=s(le);le!==H&&(i.font=le,H=le);const ge=r(U.text,U.style.letterSpacing,i);Z+=ge,Q=Math.max(Q,de.ascent),G=Math.max(G,de.descent),K+=U.text;const se=((B=U.style._stroke)==null?void 0:B.width)||0;se>F&&(F=se),!z&&U.style.dropShadow&&(z=!0)}V.length===0&&(Q=O.ascent,G=O.descent),v.push(Z),S.push(Q),C.push(G),w.push(K);const te=e.lineHeight||Q+G;T.push(te+e.leading),k=Math.max(k,Z)}const $=F,Y=(n&&e.align!=="left"?Math.max(k,e.wordWrapWidth):k)+$+(e.dropShadow?e.dropShadow.distance:0);let X=0;for(let V=0;V<T.length;V++)X+=T[V];X=Math.max(X,T[0]+$);const ne=X+(e.dropShadow?e.dropShadow.distance:0),q=e.lineHeight||O.fontSize;return{width:Y,height:ne,lines:w,lineWidths:v,lineHeight:q+e.leading,maxLineWidth:k,fontProperties:O,runsByLine:b,lineAscents:S,lineDescents:C,lineHeights:T,hasDropShadow:z}}function hB(t,e,n,i,r,s){var T;const{letterSpacing:l,whiteSpace:c,wordWrapWidth:d,breakWords:p}=e,m=$A(c),g=d+l,b={};let v="";const S=(w,k)=>{const M=`${w}|${k.styleKey}`;let O=b[M];if(O===void 0){const H=k._fontString;H!==v&&(n.font=H,v=H),O=i(w,k.letterSpacing,n)+k.letterSpacing,b[M]=O}return O},C=[];for(const w of t){const k=pB(w),M=C.length,O=X=>{let ne=0,q=X;do{const{token:J,style:B}=k[q];ne+=S(J,B),q++}while(q<k.length&&k[q].continuesFromPrevious);return ne},H=X=>{const ne=[];let q=X;do ne.push({token:k[q].token,style:k[q].style}),q++;while(q<k.length&&k[q].continuesFromPrevious);return ne};let z=[],F=0,$=!m,j=null;const I=()=>{j&&j.text.length>0&&z.push(j),j=null},Y=()=>{if(I(),z.length>0){const X=z[z.length-1];X.text=Zo(X.text),X.text.length===0&&z.pop()}C.push(z),z=[],F=0,$=!1};for(let X=0;X<k.length;X++){const{token:ne,style:q,continuesFromPrevious:J}=k[X],B=S(ne,q);if(m){const Q=Os(ne),G=(j==null?void 0:j.text[j.text.length-1])??((T=z[z.length-1])==null?void 0:T.text.slice(-1))??"",K=G?Os(G):!1;if(Q&&K)continue}const V=!J,Z=V?O(X):B;if(Z>g&&V)if(F>0&&Y(),p){const Q=H(X);for(let G=0;G<Q.length;G++){const K=Q[G].token,te=Q[G].style,U=JA(K,p,s,r);for(const le of U){const de=S(le,te);de+F>g&&Y(),!j||j.style!==te?(I(),j={text:le,style:te}):j.text+=le,F+=de}}X+=Q.length-1}else{const Q=H(X);I(),C.push(Q.map(G=>({text:G.token,style:G.style}))),$=!1,X+=Q.length-1}else if(Z+F>g&&V){if(Os(ne)){$=!1;continue}Y(),j={text:ne,style:q},F=B}else if(J&&!p)!j||j.style!==q?(I(),j={text:ne,style:q}):j.text+=ne,F+=B;else{const Q=Os(ne);if(F===0&&Q&&!$)continue;!j||j.style!==q?(I(),j={text:ne,style:q}):j.text+=ne,F+=B}}if(I(),z.length>0){const X=z[z.length-1];X.text=Zo(X.text),X.text.length===0&&z.pop()}(z.length>0||C.length===M)&&C.push(z)}return C}function pB(t){const e=[];let n=!1;for(const i of t){const r=QA(i.text);let s=!0;for(const l of r){const c=Os(l)||S0(l),d=s&&n&&!c;e.push({token:l,style:i.style,continuesFromPrevious:d}),n=!c,s=!1}}return e}const mB={willReadFrequently:!0};function yw(t,e,n,i,r){let s=n[t];return typeof s!="number"&&(s=r(t,e,i)+e,n[t]=s),s}function gB(t,e,n,i,r,s,l){const c=n.getContext("2d",mB);c.font=e._fontString;let d=0,p="";const m=[],g=Object.create(null),{letterSpacing:b,whiteSpace:v}=e,S=$A(v),C=ZA(v);let T=!S;const w=e.wordWrapWidth+b,k=QA(t);for(let O=0;O<k.length;O++){let H=k[O];if(S0(H)){if(!C){m.push(Zo(p)),T=!S,p="",d=0;continue}H=" "}if(S){const F=Os(H),$=Os(p[p.length-1]);if(F&&$)continue}const z=yw(H,b,g,c,i);if(z>w)if(p!==""&&(m.push(Zo(p)),p="",d=0),r(H,e.breakWords)){const F=JA(H,e.breakWords,l,s);for(const $ of F){const j=yw($,b,g,c,i);j+d>w&&(m.push(Zo(p)),T=!1,p="",d=0),p+=$,d+=j}}else p.length>0&&(m.push(Zo(p)),p="",d=0),m.push(Zo(H)),T=!1,p="",d=0;else z+d>w&&(T=!1,m.push(Zo(p)),p="",d=0),(p.length>0||!Os(H)||T)&&(p+=H,d+=z)}const M=Zo(p);return M.length>0&&m.push(M),m.join(`
|
|
309
|
+
`)}const bw={willReadFrequently:!0},ac=class pt{static get experimentalLetterSpacingSupported(){let e=pt._experimentalLetterSpacingSupported;if(e===void 0){const n=es.get().getCanvasRenderingContext2D().prototype;e=pt._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return e}constructor(e,n,i,r,s,l,c,d,p,m){this.text=e,this.style=n,this.width=i,this.height=r,this.lines=s,this.lineWidths=l,this.lineHeight=c,this.maxLineWidth=d,this.fontProperties=p,m&&(this.runsByLine=m.runsByLine,this.lineAscents=m.lineAscents,this.lineDescents=m.lineDescents,this.lineHeights=m.lineHeights,this.hasDropShadow=m.hasDropShadow)}static measureText(e=" ",n,i=pt._canvas,r=n.wordWrap){var H;const s=`${e}-${n.styleKey}-wordWrap-${r}`;if(pt._measurementCache.has(s))return pt._measurementCache.get(s);if(KA(n)&&WA(e)){const z=dB(e,n,r,pt._context,pt._measureText,pt.measureFont,pt.canBreakChars,pt.wordWrapSplit),F=new pt(e,n,z.width,z.height,z.lines,z.lineWidths,z.lineHeight,z.maxLineWidth,z.fontProperties,{runsByLine:z.runsByLine,lineAscents:z.lineAscents,lineDescents:z.lineDescents,lineHeights:z.lineHeights,hasDropShadow:z.hasDropShadow});return pt._measurementCache.set(s,F),F}const c=n._fontString,d=pt.measureFont(c);d.fontSize===0&&(d.fontSize=n.fontSize,d.ascent=n.fontSize,d.descent=0);const p=pt._context;p.font=c;const g=(r?pt._wordWrap(e,n,i):e).split(cB),b=new Array(g.length);let v=0;for(let z=0;z<g.length;z++){const F=pt._measureText(g[z],n.letterSpacing,p);b[z]=F,v=Math.max(v,F)}const S=((H=n._stroke)==null?void 0:H.width)??0,C=n.lineHeight||d.fontSize,T=pt._getAlignWidth(v,n,r),w=pt._adjustWidthForStyle(T,n),k=Math.max(C,d.fontSize+S)+(g.length-1)*(C+n.leading),M=pt._adjustHeightForStyle(k,n),O=new pt(e,n,w,M,g,b,C+n.leading,v,d);return pt._measurementCache.set(s,O),O}static _adjustWidthForStyle(e,n){var s;const i=((s=n._stroke)==null?void 0:s.width)||0;let r=e+i;return n.dropShadow&&(r+=n.dropShadow.distance),r}static _adjustHeightForStyle(e,n){let i=e;return n.dropShadow&&(i+=n.dropShadow.distance),i}static _getAlignWidth(e,n,i){return i&&n.align!=="left"?Math.max(e,n.wordWrapWidth):e}static _measureText(e,n,i){let r=!1;pt.experimentalLetterSpacingSupported&&(pt.experimentalLetterSpacing?(i.letterSpacing=`${n}px`,i.textLetterSpacing=`${n}px`,r=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));const s=i.measureText(e);let l=s.width;const c=-(s.actualBoundingBoxLeft??0);let p=(s.actualBoundingBoxRight??0)-c;if(l>0)if(r)l-=n,p-=n;else{const m=(pt.graphemeSegmenter(e).length-1)*n;l+=m,p+=m}return Math.max(l,p)}static _wordWrap(e,n,i=pt._canvas){return gB(e,n,i,pt._measureText,pt.canBreakWords,pt.canBreakChars,pt.wordWrapSplit)}static isBreakingSpace(e,n){return Os(e)}static canBreakWords(e,n){return n}static canBreakChars(e,n,i,r,s){return!0}static wordWrapSplit(e){return pt.graphemeSegmenter(e)}static measureFont(e){if(pt._fonts[e])return pt._fonts[e];const n=pt._context;n.font=e;const i=n.measureText(pt.METRICS_STRING+pt.BASELINE_SYMBOL),r=i.actualBoundingBoxAscent??0,s=i.actualBoundingBoxDescent??0,l={ascent:r,descent:s,fontSize:r+s};return pt._fonts[e]=l,l}static clearMetrics(e=""){e?delete pt._fonts[e]:pt._fonts={}}static get _canvas(){if(!pt.__canvas){let e;try{const n=new OffscreenCanvas(0,0),i=n.getContext("2d",bw);if(i!=null&&i.measureText)return pt.__canvas=n,n;e=es.get().createCanvas()}catch{e=es.get().createCanvas()}e.width=e.height=10,pt.__canvas=e}return pt.__canvas}static get _context(){return pt.__context||(pt.__context=pt._canvas.getContext("2d",bw)),pt.__context}};ac.METRICS_STRING="|ÉqÅ";ac.BASELINE_SYMBOL="M";ac.BASELINE_MULTIPLIER=1.4;ac.HEIGHT_MULTIPLIER=2;ac.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const t=new Intl.Segmenter;return e=>{const n=t.segment(e),i=[];let r=0;for(const s of n)i[r++]=s.segment;return i}}return t=>[...t]})();ac.experimentalLetterSpacing=!1;ac._fonts={};ac._measurementCache=Q6(1e3);let eu=ac;const yB=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Zv(t){const e=typeof t.fontSize=="number"?`${t.fontSize}px`:t.fontSize;let n=t.fontFamily;Array.isArray(t.fontFamily)||(n=t.fontFamily.split(","));for(let i=n.length-1;i>=0;i--){let r=n[i].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!yB.includes(r)&&(r=`"${r}"`),n[i]=r}return`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${e} ${n.join(",")}`}const xw=1e5;function By(t,e,n,i=0,r=0,s=0){if(t.texture===Tn.WHITE&&!t.fill)return Gi.shared.setValue(t.color).setAlpha(t.alpha??1).toHexa();if(t.fill){if(t.fill instanceof $0){const l=t.fill,c=e.createPattern(l.texture.source.resource,"repeat"),d=l.transform.copyTo(jt.shared);return d.scale(l.texture.source.pixelWidth,l.texture.source.pixelHeight),c.setTransform(d),c}else if(t.fill instanceof ic){const l=t.fill,c=l.type==="linear",d=l.textureSpace==="local";let p=1,m=1;d&&n&&(p=n.width+i,m=n.height+i);let g,b=!1;if(c){const{start:v,end:S}=l;g=e.createLinearGradient(v.x*p+r,v.y*m+s,S.x*p+r,S.y*m+s),b=Math.abs(S.x-v.x)<Math.abs((S.y-v.y)*.1)}else{const{center:v,innerRadius:S,outerCenter:C,outerRadius:T}=l;g=e.createRadialGradient(v.x*p+r,v.y*m+s,S*p,C.x*p+r,C.y*m+s,T*p)}if(b&&d&&n){const v=n.lineHeight/m;for(let S=0;S<n.lines.length;S++){const C=(S*n.lineHeight+i/2)/m;l.colorStops.forEach(T=>{let w=C+T.offset*v;w=Math.max(0,Math.min(1,w)),g.addColorStop(Math.floor(w*xw)/xw,Gi.shared.setValue(T.color).toHex())})}}else l.colorStops.forEach(v=>{g.addColorStop(v.offset,Gi.shared.setValue(v.color).toHex())});return g}}else{const l=e.createPattern(t.texture.source.resource,"repeat"),c=t.matrix.copyTo(jt.shared);return c.scale(t.texture.source.pixelWidth,t.texture.source.pixelHeight),l.setTransform(c),l}return ca("FillStyle not recognised",t),"red"}const vw=new Ei;function kd(t){let e=0;for(let n=0;n<t.length;n++)t.charCodeAt(n)===32&&e++;return e}class bB{getCanvasAndContext(e){const{text:n,style:i,resolution:r=1}=e,s=i._getFinalPadding(),l=eu.measureText(n||" ",i),c=Math.ceil(Math.ceil(Math.max(1,l.width)+s*2)*r),d=Math.ceil(Math.ceil(Math.max(1,l.height)+s*2)*r),p=$v.getOptimalCanvasAndContext(c,d);this._renderTextToCanvas(i,s,r,p,l);const m=i.trim?$6({canvas:p.canvas,width:c,height:d,resolution:1,output:vw}):vw.set(0,0,c,d);return{canvasAndContext:p,frame:m}}returnCanvasAndContext(e){$v.returnCanvasAndContext(e)}_renderTextToCanvas(e,n,i,r,s){var z,F,$;if(s.runsByLine&&s.runsByLine.length>0){this._renderTaggedTextToCanvas(s,e,n,i,r);return}const{canvas:l,context:c}=r,d=Zv(e),p=s.lines,m=s.lineHeight,g=s.lineWidths,b=s.maxLineWidth,v=s.fontProperties,S=l.height;if(c.resetTransform(),c.scale(i,i),c.textBaseline=e.textBaseline,(z=e._stroke)!=null&&z.width){const j=e._stroke;c.lineWidth=j.width,c.miterLimit=j.miterLimit,c.lineJoin=j.join,c.lineCap=j.cap}c.font=d;let C,T;const w=e.dropShadow?2:1,k=e.wordWrap?e.wordWrapWidth:b,O=(((F=e._stroke)==null?void 0:F.width)??0)/2;let H=(m-v.fontSize)/2;m-v.fontSize<0&&(H=0);for(let j=0;j<w;++j){const I=e.dropShadow&&j===0,Y=I?Math.ceil(Math.max(1,S)+n*2):0,X=Y*i;if(I)this._setupDropShadow(c,e,i,X);else{const ne=e._gradientBounds,q=e._gradientOffset;if(ne){const J={width:ne.width,height:ne.height,lineHeight:ne.height,lines:s.lines};this._setFillAndStrokeStyles(c,e,J,n,O,(q==null?void 0:q.x)??0,(q==null?void 0:q.y)??0)}else q?this._setFillAndStrokeStyles(c,e,s,n,O,q.x,q.y):this._setFillAndStrokeStyles(c,e,s,n,O);c.shadowColor="rgba(0,0,0,0)"}for(let ne=0;ne<p.length;ne++){C=O,T=O+ne*m+v.ascent+H,C+=this._getAlignmentOffset(g[ne],k,e.align);let q=0;if(e.align==="justify"&&e.wordWrap&&ne<p.length-1){const J=kd(p[ne]);J>0&&(q=(k-g[ne])/J)}($=e._stroke)!=null&&$.width&&this._drawLetterSpacing(p[ne],e,r,C+n,T+n-Y,!0,q),e._fill!==void 0&&this._drawLetterSpacing(p[ne],e,r,C+n,T+n-Y,!1,q)}}}_renderTaggedTextToCanvas(e,n,i,r,s){var O,H,z;const{canvas:l,context:c}=s,{runsByLine:d,lineWidths:p,maxLineWidth:m,lineAscents:g,lineHeights:b,hasDropShadow:v}=e,S=l.height;c.resetTransform(),c.scale(r,r),c.textBaseline=n.textBaseline;const C=v?2:1,T=n.wordWrap?n.wordWrapWidth:m;let w=((O=n._stroke)==null?void 0:O.width)??0;for(const F of d)for(const $ of F){const j=((H=$.style._stroke)==null?void 0:H.width)??0;j>w&&(w=j)}const k=w/2,M=[];for(let F=0;F<d.length;F++){const $=d[F],j=[];for(const I of $){const Y=Zv(I.style);c.font=Y,j.push({width:eu._measureText(I.text,I.style.letterSpacing,c),font:Y})}M.push(j)}for(let F=0;F<C;++F){const $=v&&F===0,j=$?Math.ceil(Math.max(1,S)+i*2):0,I=j*r;$||(c.shadowColor="rgba(0,0,0,0)");let Y=k;for(let X=0;X<d.length;X++){const ne=d[X],q=p[X],J=g[X],B=b[X],V=M[X];let Z=k;Z+=this._getAlignmentOffset(q,T,n.align);let Q=0;if(n.align==="justify"&&n.wordWrap&&X<d.length-1){let te=0;for(const U of ne)te+=kd(U.text);te>0&&(Q=(T-q)/te)}const G=Y+J;let K=Z+i;for(let te=0;te<ne.length;te++){const U=ne[te],{width:le,font:de}=V[te];if(c.font=de,c.textBaseline=U.style.textBaseline,(z=U.style._stroke)!=null&&z.width){const se=U.style._stroke;if(c.lineWidth=se.width,c.miterLimit=se.miterLimit,c.lineJoin=se.join,c.lineCap=se.cap,$)if(U.style.dropShadow)this._setupDropShadow(c,U.style,r,I);else{const pe=kd(U.text);K+=le+pe*Q;continue}else{const pe=eu.measureFont(de),Ae=U.style.lineHeight||pe.fontSize,Le={width:le,height:Ae,lineHeight:Ae,lines:[U.text]};c.strokeStyle=By(se,c,Le,i*2,K-i,Y)}this._drawLetterSpacing(U.text,U.style,s,K,G+i-j,!0,Q)}const ge=kd(U.text);K+=le+ge*Q}K=Z+i;for(let te=0;te<ne.length;te++){const U=ne[te],{width:le,font:de}=V[te];if(c.font=de,c.textBaseline=U.style.textBaseline,U.style._fill!==void 0){if($)if(U.style.dropShadow)this._setupDropShadow(c,U.style,r,I);else{const se=kd(U.text);K+=le+se*Q;continue}else{const se=eu.measureFont(de),pe=U.style.lineHeight||se.fontSize,Ae={width:le,height:pe,lineHeight:pe,lines:[U.text]};c.fillStyle=By(U.style._fill,c,Ae,i*2,K-i,Y)}this._drawLetterSpacing(U.text,U.style,s,K,G+i-j,!1,Q)}const ge=kd(U.text);K+=le+ge*Q}Y+=B}}}_setFillAndStrokeStyles(e,n,i,r,s,l=0,c=0){var d;if(e.fillStyle=n._fill?By(n._fill,e,i,r*2,l,c):null,(d=n._stroke)!=null&&d.width){const p=s+r*2;e.strokeStyle=By(n._stroke,e,i,p,l,c)}}_setupDropShadow(e,n,i,r){e.fillStyle="black",e.strokeStyle="black";const s=n.dropShadow,l=s.color,c=s.alpha;e.shadowColor=Gi.shared.setValue(l).setAlpha(c).toRgbaString();const d=s.blur*i,p=s.distance*i;e.shadowBlur=d,e.shadowOffsetX=Math.cos(s.angle)*p,e.shadowOffsetY=Math.sin(s.angle)*p+r}_getAlignmentOffset(e,n,i){return i==="right"?n-e:i==="center"?(n-e)/2:0}_drawLetterSpacing(e,n,i,r,s,l=!1,c=0){const{context:d}=i,p=n.letterSpacing;let m=!1;if(eu.experimentalLetterSpacingSupported&&(eu.experimentalLetterSpacing?(d.letterSpacing=`${p}px`,d.textLetterSpacing=`${p}px`,m=!0):(d.letterSpacing="0px",d.textLetterSpacing="0px")),(p===0||m)&&c===0){l?d.strokeText(e,r,s):d.fillText(e,r,s);return}if(c!==0&&(p===0||m)){const C=e.split(" ");let T=r;const w=d.measureText(" ").width;for(let k=0;k<C.length;k++)l?d.strokeText(C[k],T,s):d.fillText(C[k],T,s),T+=d.measureText(C[k]).width+w+c;return}let g=r;const b=eu.graphemeSegmenter(e);let v=d.measureText(e).width,S=0;for(let C=0;C<b.length;++C){const T=b[C];l?d.strokeText(T,g,s):d.fillText(T,g,s);let w="";for(let k=C+1;k<b.length;++k)w+=b[k];S=d.measureText(w).width,g+=v-S+p,T===" "&&(g+=c),v=S}}}const qd=new bB,e1=class of extends ho{constructor(e={}){super(),this.uid=gi("textStyle"),this._tick=0,this._cachedFontString=null,xB(e),e instanceof of&&(e=e._toObject());const r={...of.defaultTextStyle,...e};for(const s in r){const l=s;this[l]=r[s]}this._tagStyles=e.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.update())}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(e!==null&&typeof e=="object"?this._dropShadow=this._createProxy({...of.defaultDropShadow,...e}):this._dropShadow=e?this._createProxy({...of.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.update())}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(typeof e=="string"?this._fontSize=parseInt(e,10):this._fontSize=e,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.update())}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.update())}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.update())}get filters(){return this._filters}set filters(e){this._filters!==e&&(this._filters=Object.freeze(e),this.update())}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.update())}get fill(){return this._originalFill}set fill(e){e!==this._originalFill&&(this._originalFill=e,this._isFillStyle(e)&&(this._originalFill=this._createProxy({...fl.defaultFillStyle,...e},()=>{this._fill=ff({...this._originalFill},fl.defaultFillStyle)})),this._fill=ff(e===0?"black":e,fl.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(e){e!==this._originalStroke&&(this._originalStroke=e,this._isFillStyle(e)&&(this._originalStroke=this._createProxy({...fl.defaultStrokeStyle,...e},()=>{this._stroke=_0({...this._originalStroke},fl.defaultStrokeStyle)})),this._stroke=_0(e,fl.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(e){this._tagStyles!==e&&(this._tagStyles=e??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){const e=of.defaultTextStyle;for(const n in e)this[n]=e[n]}assign(e){for(const n in e){const i=n;this[i]=e[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=Zv(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new of(this._toObject())}_getFinalPadding(){let e=0;if(this._filters)for(let n=0;n<this._filters.length;n++)e+=this._filters[n].padding;return Math.max(this._padding,e)}destroy(e=!1){var i,r,s,l;if(this.removeAllListeners(),typeof e=="boolean"?e:e==null?void 0:e.texture){const c=typeof e=="boolean"?e:e==null?void 0:e.textureSource;(i=this._fill)!=null&&i.texture&&this._fill.texture.destroy(c),(r=this._originalFill)!=null&&r.texture&&this._originalFill.texture.destroy(c),(s=this._stroke)!=null&&s.texture&&this._stroke.texture.destroy(c),(l=this._originalStroke)!=null&&l.texture&&this._originalStroke.texture.destroy(c)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(e,n){return new Proxy(e,{set:(i,r,s)=>(i[r]===s||(i[r]=s,n==null||n(r,s),this.update()),!0)})}_isFillStyle(e){return(e??null)!==null&&!(Gi.isColorLike(e)||e instanceof ic||e instanceof $0)}};e1.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};e1.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let gf=e1;function xB(t){const e=t;if(typeof e.dropShadow=="boolean"&&e.dropShadow){const n=gf.defaultDropShadow;t.dropShadow={alpha:e.dropShadowAlpha??n.alpha,angle:e.dropShadowAngle??n.angle,blur:e.dropShadowBlur??n.blur,color:e.dropShadowColor??n.color,distance:e.dropShadowDistance??n.distance}}if(e.strokeThickness!==void 0){Qt(mi,"strokeThickness is now a part of stroke");const n=e.stroke;let i={};if(Gi.isColorLike(n))i.color=n;else if(n instanceof ic||n instanceof $0)i.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))i=n;else throw new Error("Invalid stroke value.");t.stroke={...i,width:e.strokeThickness}}if(Array.isArray(e.fillGradientStops)){if(Qt(mi,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(e.fill)||e.fill.length===0)throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");e.fill.length!==e.fillGradientStops.length&&ca("The number of fill colors must match the number of fill gradient stops.");const n=new ic({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),i=e.fillGradientStops.slice(),r=e.fill.map(s=>Gi.shared.setValue(s).toNumber());i.forEach((s,l)=>{n.addColorStop(s,r[l])}),t.fill={fill:n}}}function vB(t,e){const{texture:n,bounds:i}=t,r=e._style._getFinalPadding();HC(i,e._anchor,n);const s=e._anchor._x*r*2,l=e._anchor._y*r*2;i.minX-=r-s,i.minY-=r-l,i.maxX-=r-s,i.maxY-=r-l}class _B{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}destroy(){this.reset()}}class SB extends _B{}class eM{constructor(e){this._renderer=e,e.runners.resolutionChange.add(this),this._managedTexts=new Ym({renderer:e,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const e in this._managedTexts.items){const n=this._managedTexts.items[e];n!=null&&n._autoResolution&&n.onViewUpdate()}}validateRenderable(e){const n=this._getGpuText(e),i=e.styleKey;return n.currentKey!==i?!0:e._didTextUpdate}addRenderable(e,n){const i=this._getGpuText(e);if(e._didTextUpdate){const r=e._autoResolution?this._renderer.resolution:e.resolution;(i.currentKey!==e.styleKey||e._resolution!==r)&&this._updateGpuText(e),e._didTextUpdate=!1,vB(i,e)}this._renderer.renderPipes.batch.addToBatch(i,n)}updateRenderable(e){const n=this._getGpuText(e);n._batcher.updateElement(n)}_updateGpuText(e){const n=this._getGpuText(e);n.texture&&this._renderer.canvasText.decreaseReferenceCount(n.currentKey),e._resolution=e._autoResolution?this._renderer.resolution:e.resolution,n.texture=this._renderer.canvasText.getManagedTexture(e),n.currentKey=e.styleKey}_getGpuText(e){return e._gpuData[this._renderer.uid]||this.initGpuText(e)}initGpuText(e){const n=new SB;return n.currentKey="--",n.renderable=e,n.transform=e.groupTransform,n.bounds={minX:0,maxX:1,minY:0,maxY:0},n.roundPixels=this._renderer._roundPixels|e._roundPixels,e._gpuData[this._renderer.uid]=n,this._managedTexts.add(e),n}onTextUnload(e){const n=e._gpuData[this._renderer.uid];if(!n)return;const{canvasText:i}=this._renderer;i.getReferenceCount(n.currentKey)>0?i.decreaseReferenceCount(n.currentKey):n.texture&&i.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}eM.extension={type:[Rt.WebGLPipes,Rt.WebGPUPipes,Rt.CanvasPipes],name:"text"};const EB=new Ds;function wB(t,e,n,i,r=!1){const s=EB;s.minX=0,s.minY=0,s.maxX=t.width/i|0,s.maxY=t.height/i|0;const l=V0.getOptimalTexture(s.width,s.height,i,!1,r);return l.source.uploadMethodId="image",l.source.resource=t,l.source.alphaMode="premultiply-alpha-on-upload",l.frame.width=e/i,l.frame.height=n/i,l.source.emit("update",l.source),l.updateUvs(),l}class tM{constructor(e,n){this._activeTextures={},this._renderer=e,this._retainCanvasContext=n}getTexture(e,n,i,r){typeof e=="string"&&(Qt("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),e={text:e,style:i,resolution:n}),e.style instanceof gf||(e.style=new gf(e.style)),e.textureStyle instanceof th||(e.textureStyle=new th(e.textureStyle)),typeof e.text!="string"&&(e.text=e.text.toString());const{text:s,style:l,textureStyle:c,autoGenerateMipmaps:d}=e,p=e.resolution??this._renderer.resolution,{frame:m,canvasAndContext:g}=qd.getCanvasAndContext({text:s,style:l,resolution:p}),b=wB(g.canvas,m.width,m.height,p,d);if(c&&(b.source.style=c),l.trim&&(m.pad(l.padding),b.frame.copyFrom(m),b.frame.scale(1/p),b.updateUvs()),l.filters){const v=this._applyFilters(b,l.filters);return this.returnTexture(b),qd.returnCanvasAndContext(g),v}return this._renderer.texture.initSource(b._source),this._retainCanvasContext||qd.returnCanvasAndContext(g),b}returnTexture(e){const n=e.source,i=n.resource;if(this._retainCanvasContext&&(i!=null&&i.getContext)){const r=i.getContext("2d");r&&qd.returnCanvasAndContext({canvas:i,context:r})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",V0.returnTexture(e,!0)}renderTextToCanvas(){Qt("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(e){e._resolution=e._autoResolution?this._renderer.resolution:e.resolution;const n=e.styleKey;if(this._activeTextures[n])return this._increaseReferenceCount(n),this._activeTextures[n].texture;const i=this.getTexture({text:e.text,style:e.style,resolution:e._resolution,textureStyle:e.textureStyle,autoGenerateMipmaps:e.autoGenerateMipmaps});return this._activeTextures[n]={texture:i,usageCount:1},i}decreaseReferenceCount(e){const n=this._activeTextures[e];n&&(n.usageCount--,n.usageCount===0&&(this.returnTexture(n.texture),this._activeTextures[e]=null))}getReferenceCount(e){var n;return((n=this._activeTextures[e])==null?void 0:n.usageCount)??0}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}_applyFilters(e,n){const i=this._renderer.renderTarget.renderTarget,r=this._renderer.filter.generateFilteredTexture({texture:e,filters:n});return this._renderer.renderTarget.bind(i,!1),r}destroy(){this._renderer=null;for(const e in this._activeTextures)this._activeTextures[e]&&this.returnTexture(this._activeTextures[e].texture);this._activeTextures=null}}class nM extends tM{constructor(e){super(e,!0)}}nM.extension={type:[Rt.CanvasSystem],name:"canvasText"};class iM extends tM{constructor(e){super(e,!1)}}iM.extension={type:[Rt.WebGLSystem,Rt.WebGPUSystem],name:"canvasText"};si.add(nM);si.add(iM);si.add(eM);class Z0 extends V6{constructor(...e){const n=X6(e,"Text");super(n,gf),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof th?n.textureStyle:new th(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??zs.defaultOptions.autoGenerateMipmaps}updateBounds(){const e=this._bounds,n=this._anchor;let i=0,r=0;if(this._style.trim){const{frame:s,canvasAndContext:l}=qd.getCanvasAndContext({text:this.text,style:this._style,resolution:1});qd.returnCanvasAndContext(l),i=s.width,r=s.height}else{const s=eu.measureText(this._text,this._style);i=s.width,r=s.height}e.minX=-n._x*i,e.maxX=e.minX+i,e.minY=-n._y*r,e.maxY=e.minY+r}}si.add($D,ZD);var Lx={exports:{}},Ko={};/**
|
|
310
|
+
* @license React
|
|
311
|
+
* react-reconciler-constants.production.js
|
|
312
|
+
*
|
|
313
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
314
|
+
*
|
|
315
|
+
* This source code is licensed under the MIT license found in the
|
|
316
|
+
* LICENSE file in the root directory of this source tree.
|
|
317
|
+
*/var _w;function TB(){return _w||(_w=1,Ko.ConcurrentRoot=1,Ko.ContinuousEventPriority=8,Ko.DefaultEventPriority=32,Ko.DiscreteEventPriority=2,Ko.IdleEventPriority=268435456,Ko.LegacyRoot=0,Ko.NoEventPriority=0),Ko}var Sw;function CB(){return Sw||(Sw=1,Lx.exports=TB()),Lx.exports}var Yd=CB();const t1=P.createContext({}),AB=t1.Provider;t1.Consumer;function rM(t,e){const n=Object.getPrototypeOf(t),i=Object.getOwnPropertyDescriptor(n,e);return!(typeof i>"u"||i.writable||i.set)}const au={currentUpdatePriority:Yd.DefaultEventPriority,unmountQueue:new Set};function Ew(t,...e){}function aM(t,e={}){const n=t;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},e),n}var MB="0.0.0-development",RB={version:MB};function NB(){}function sM(t,e,n){e instanceof Ef&&(e.__pixireact.parent=t,typeof n=="number"?t.__pixireact.filters.splice(n,0,e):t.__pixireact.filters.push(e),t.filters=t.__pixireact.filters)}function Ux(t,e){e&&(e instanceof br?t.addChild(e):e instanceof Ef&&sM(t,e))}function kB(){}function OB(){return!1}const Qv=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),E0=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function lM(t){return Array.isArray(t)}function oM(t,e,n={arrays:"reference",objects:"reference",strict:!0}){const{arrays:i,objects:r,strict:s}=n;if(typeof t!=typeof e||!!t!=!!e)return!1;if(LB(t)||zB(t))return t===e;const l=BB(t);if(l&&r==="reference")return t===e;const c=lM(t);if(c&&i==="reference")return t===e;if((c||l)&&t===e)return!0;let d;for(d in t)if(!(d in e))return!1;let p=t;if(s&&(p=e),l&&i==="shallow"&&r==="shallow"){for(d in p)if(!oM(t[d],e[d],{strict:s,objects:"reference"}))return!1}else for(d in p)if(t[d]!==e[d])return!1;if(cM(d)){if(c&&t.length===0&&e.length===0||l&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}function DB(t){return t===null}function zB(t){return typeof t=="number"}function BB(t){return!(t!==Object(t)||lM(t)||typeof t=="function")}function LB(t){return typeof t=="string"}function cM(t){return t===void 0}const UB=Object.freeze(["children","key","ref"]);function IB(t,e=[]){const n={};return Object.entries(t).reduce((i,[r,s])=>(e.includes(r)||(i[r]=s),i),n)}function Jv(t,e=[]){return IB(t,UB.concat(e))}const HB="__default";function uM(t,e={},n=!1){const i=Jv(t),r=Jv(e),s=Object.entries(i),l=[];if(n){const c=Object.keys(r);let d=0;for(;d<c.length;){const p=c[d];!(p in i)&&s.unshift([p,`${HB}remove`]),d+=1}}return s.forEach(([c,d])=>{if(oM(d,r[c]))return;if(c in E0){l.push([c,d,!0,[]]);return}let p=[];c.includes("-")&&(p=c.split("-")),l.push([c,d,!1,p]);for(const m in i){const g=i[m];m.startsWith(`${c}-`)&&l.push([m,g,!1,m.split("-")])}}),{changes:l}}function jB(t){const e=t;return!(!e||!e.changes)}const PB="__default",ww=new Map,Tw={};function Cw(t,e){if(t){const n=t[e];if(!cM(n)&&!DB(n))return n}return t}function fM(t,e){const{__pixireact:n={},...i}=t;let r;jB(e)?r=e:r=uM(e,i);const{changes:s}=r;let l=0;for(;l<s.length;){const c=s[l];let d=!1,p=c[0],m=c[1];const g=c[2],b=c[3];let v=t,S=v[p];if(p==="draw"&&typeof m=="function"&&(t instanceof Aa?m(t):(d=!0,Ew("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),p in Qv){const C=p;d=!0,Tw[p]||(Tw[p]=!0,Ew("warn",`Event names must be pascal case; instead of \`${p}\`, you probably want \`${Qv[C]}\`.`))}if(!d){if(b.length&&(S=b.reduce(Cw,v),!(S&&S.set))){const[C,...T]=b.reverse();v=T.reverse().reduce(Cw,v),p=C}if(m===`${PB}remove`)if(v instanceof br){let C=ww.get(v.constructor);C||(C=v.constructor,C=new C,ww.set(v.constructor,C)),m=C[p]}else m=0;if(g&&n){const T=E0[p];m?v[T]=m:delete v[T]}else rM(v,p)||(v[p]=m)}l+=1}return t}function GB(t,e,n,i){const{children:r,...s}=i,{children:l,...c}=n,d=uM(s,c,!0);return d.changes.length?d:null}function FB(t,e,n,i){const r=GB(t,e,n,i);r&&fM(t,r)}const qB=Object.freeze([...Object.keys(Qv),"draw"]),e_={};function YB(t){const e=t.charAt(0),n=t.substring(1);return`${e.toUpperCase()}${n}`}function VB(t,e){return e.toLowerCase()}function XB(t){let e=t;return t.startsWith("pixi")&&(e=t.replace(/^pixi([A-Z])/,VB)),e}function KB(t,e,n){const i=XB(t),r=YB(i);if(!(r in e_))throw new Error(`${r} is not part of the PIXI namespace! Did you forget to extend?`);const s=e_[r],l=Jv(e,qB);Object.entries(e).forEach(([d,p])=>{if(d in E0){const m=E0[d];l[m]=p}});const c=aM(new s(l),{root:n,type:i});return fM(c,e),c}var Ix={exports:{}},Hx={exports:{}},jx={exports:{}},Px={};/**
|
|
318
|
+
* @license React
|
|
319
|
+
* scheduler.production.js
|
|
320
|
+
*
|
|
321
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the MIT license found in the
|
|
324
|
+
* LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/var Aw;function WB(){return Aw||(Aw=1,(function(t){function e(B,V){var Z=B.length;B.push(V);e:for(;0<Z;){var Q=Z-1>>>1,G=B[Q];if(0<r(G,V))B[Q]=V,B[Z]=G,Z=Q;else break e}}function n(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var V=B[0],Z=B.pop();if(Z!==V){B[0]=Z;e:for(var Q=0,G=B.length,K=G>>>1;Q<K;){var te=2*(Q+1)-1,U=B[te],le=te+1,de=B[le];if(0>r(U,Z))le<G&&0>r(de,U)?(B[Q]=de,B[le]=Z,Q=le):(B[Q]=U,B[te]=Z,Q=te);else if(le<G&&0>r(de,Z))B[Q]=de,B[le]=Z,Q=le;else break e}}return V}function r(B,V){var Z=B.sortIndex-V.sortIndex;return Z!==0?Z:B.id-V.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var d=[],p=[],m=1,g=null,b=3,v=!1,S=!1,C=!1,T=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function M(B){for(var V=n(p);V!==null;){if(V.callback===null)i(p);else if(V.startTime<=B)i(p),V.sortIndex=V.expirationTime,e(d,V);else break;V=n(p)}}function O(B){if(C=!1,M(B),!S)if(n(d)!==null)S=!0,q();else{var V=n(p);V!==null&&J(O,V.startTime-B)}}var H=!1,z=-1,F=5,$=-1;function j(){return!(t.unstable_now()-$<F)}function I(){if(H){var B=t.unstable_now();$=B;var V=!0;try{e:{S=!1,C&&(C=!1,w(z),z=-1),v=!0;var Z=b;try{t:{for(M(B),g=n(d);g!==null&&!(g.expirationTime>B&&j());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,b=g.priorityLevel;var G=Q(g.expirationTime<=B);if(B=t.unstable_now(),typeof G=="function"){g.callback=G,M(B),V=!0;break t}g===n(d)&&i(d),M(B)}else i(d);g=n(d)}if(g!==null)V=!0;else{var K=n(p);K!==null&&J(O,K.startTime-B),V=!1}}break e}finally{g=null,b=Z,v=!1}V=void 0}}finally{V?Y():H=!1}}}var Y;if(typeof k=="function")Y=function(){k(I)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ne=X.port2;X.port1.onmessage=I,Y=function(){ne.postMessage(null)}}else Y=function(){T(I,0)};function q(){H||(H=!0,Y())}function J(B,V){z=T(function(){B(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_continueExecution=function(){S||v||(S=!0,q())},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var V=3;break;default:V=b}var Z=b;b=V;try{return B()}finally{b=Z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(B,V){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Z=b;b=B;try{return V()}finally{b=Z}},t.unstable_scheduleCallback=function(B,V,Z){var Q=t.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?Q+Z:Q):Z=Q,B){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Z+G,B={id:m++,callback:V,priorityLevel:B,startTime:Z,expirationTime:G,sortIndex:-1},Z>Q?(B.sortIndex=Z,e(p,B),n(d)===null&&B===n(p)&&(C?(w(z),z=-1):C=!0,J(O,Z-Q))):(B.sortIndex=G,e(d,B),S||v||(S=!0,q())),B},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(B){var V=b;return function(){var Z=b;b=V;try{return B.apply(this,arguments)}finally{b=Z}}}})(Px)),Px}var Mw;function $B(){return Mw||(Mw=1,jx.exports=WB()),jx.exports}/**
|
|
326
|
+
* @license React
|
|
327
|
+
* react-reconciler.production.js
|
|
328
|
+
*
|
|
329
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the MIT license found in the
|
|
332
|
+
* LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/var Rw;function ZB(){return Rw||(Rw=1,(function(t){t.exports=function(e){function n(u,f,x,E){return new Gh(u,f,x,E)}function i(){}function r(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)f+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(u){return u===null||typeof u!="object"?null:(u=Wh&&u[Wh]||u["@@iterator"],typeof u=="function"?u:null)}function l(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===ko?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case Cc:return"Fragment";case Ha:return"Portal";case Kh:return"Profiler";case Xh:return"StrictMode";case Wf:return"Suspense";case Gl:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case gs:return(u.displayName||"Context")+".Provider";case Pl:return(u._context.displayName||"Context")+".Consumer";case Ac:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case Mu:return f=u.displayName||null,f!==null?f:l(u.type)||"Memo";case ja:f=u._payload,u=u._init;try{return l(u(f))}catch{}}return null}function c(u){if($f===void 0)try{throw Error()}catch(x){var f=x.stack.trim().match(/\n( *(at )?)/);$f=f&&f[1]||"",$h=-1<x.stack.indexOf(`
|
|
334
|
+
at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
335
|
+
`+$f+u+$h}function d(u,f){if(!u||Fl)return"";Fl=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var E={DetermineComponentFrameRoot:function(){try{if(f){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(ht){var je=ht}Reflect.construct(u,[],Be)}else{try{Be.call()}catch(ht){je=ht}u.call(Be.prototype)}}else{try{throw Error()}catch(ht){je=ht}(Be=u())&&typeof Be.catch=="function"&&Be.catch(function(){})}}catch(ht){if(ht&&je&&typeof ht.stack=="string")return[ht.stack,je.stack]}return[null,null]}};E.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(E.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(E.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=E.DetermineComponentFrameRoot(),ee=D[0],ie=D[1];if(ee&&ie){var fe=ee.split(`
|
|
336
|
+
`),we=ie.split(`
|
|
337
|
+
`);for(R=E=0;E<fe.length&&!fe[E].includes("DetermineComponentFrameRoot");)E++;for(;R<we.length&&!we[R].includes("DetermineComponentFrameRoot");)R++;if(E===fe.length||R===we.length)for(E=fe.length-1,R=we.length-1;1<=E&&0<=R&&fe[E]!==we[R];)R--;for(;1<=E&&0<=R;E--,R--)if(fe[E]!==we[R]){if(E!==1||R!==1)do if(E--,R--,0>R||fe[E]!==we[R]){var ke=`
|
|
338
|
+
`+fe[E].replace(" at new "," at ");return u.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",u.displayName)),ke}while(1<=E&&0<=R);break}}}finally{Fl=!1,Error.prepareStackTrace=x}return(x=u?u.displayName||u.name:"")?c(x):""}function p(u){switch(u.tag){case 26:case 27:case 5:return c(u.type);case 16:return c("Lazy");case 13:return c("Suspense");case 19:return c("SuspenseList");case 0:case 15:return u=d(u.type,!1),u;case 11:return u=d(u.type.render,!1),u;case 1:return u=d(u.type,!0),u;default:return""}}function m(u){try{var f="";do f+=p(u),u=u.return;while(u);return f}catch(x){return`
|
|
339
|
+
Error generating stack: `+x.message+`
|
|
340
|
+
`+x.stack}}function g(u){var f=u,x=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&(x=f.return),u=f.return;while(u)}return f.tag===3?x:null}function b(u){if(g(u)!==u)throw Error(r(188))}function v(u){var f=u.alternate;if(!f){if(f=g(u),f===null)throw Error(r(188));return f!==u?null:u}for(var x=u,E=f;;){var R=x.return;if(R===null)break;var D=R.alternate;if(D===null){if(E=R.return,E!==null){x=E;continue}break}if(R.child===D.child){for(D=R.child;D;){if(D===x)return b(R),u;if(D===E)return b(R),f;D=D.sibling}throw Error(r(188))}if(x.return!==E.return)x=R,E=D;else{for(var ee=!1,ie=R.child;ie;){if(ie===x){ee=!0,x=R,E=D;break}if(ie===E){ee=!0,E=R,x=D;break}ie=ie.sibling}if(!ee){for(ie=D.child;ie;){if(ie===x){ee=!0,x=D,E=R;break}if(ie===E){ee=!0,E=D,x=R;break}ie=ie.sibling}if(!ee)throw Error(r(189))}}if(x.alternate!==E)throw Error(r(190))}if(x.tag!==3)throw Error(r(188));return x.stateNode.current===x?u:f}function S(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u;for(u=u.child;u!==null;){if(f=S(u),f!==null)return f;u=u.sibling}return null}function C(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u;for(u=u.child;u!==null;){if(u.tag!==4&&(f=C(u),f!==null))return f;u=u.sibling}return null}function T(u){return{current:u}}function w(u){0>Qs||(u.current=Uu[Qs],Uu[Qs]=null,Qs--)}function k(u,f){Qs++,Uu[Qs]=u.current,u.current=f}function M(u){return u>>>=0,u===0?32:31-(Iu(u)/Xg|0)|0}function O(u){var f=u&42;if(f!==0)return f;switch(u&-u){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: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 u&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function H(u,f){var x=u.pendingLanes;if(x===0)return 0;var E=0,R=u.suspendedLanes,D=u.pingedLanes,ee=u.warmLanes;u=u.finishedLanes!==0;var ie=x&134217727;return ie!==0?(x=ie&~R,x!==0?E=O(x):(D&=ie,D!==0?E=O(D):u||(ee=ie&~ee,ee!==0&&(E=O(ee))))):(ie=x&~R,ie!==0?E=O(ie):D!==0?E=O(D):u||(ee=x&~ee,ee!==0&&(E=O(ee)))),E===0?0:f!==0&&f!==E&&(f&R)===0&&(R=E&-E,ee=f&-f,R>=ee||R===32&&(ee&4194176)!==0)?f:E}function z(u,f){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&f)===0}function F(u,f){switch(u){case 1:case 2:case 4:case 8:return f+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $(){var u=kc;return kc<<=1,(kc&4194176)===0&&(kc=128),u}function j(){var u=Hu;return Hu<<=1,(Hu&62914560)===0&&(Hu=4194304),u}function I(u){for(var f=[],x=0;31>x;x++)f.push(u);return f}function Y(u,f){u.pendingLanes|=f,f!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function X(u,f,x,E,R,D){var ee=u.pendingLanes;u.pendingLanes=x,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=x,u.entangledLanes&=x,u.errorRecoveryDisabledLanes&=x,u.shellSuspendCounter=0;var ie=u.entanglements,fe=u.expirationTimes,we=u.hiddenUpdates;for(x=ee&~x;0<x;){var ke=31-wr(x),Be=1<<ke;ie[ke]=0,fe[ke]=-1;var je=we[ke];if(je!==null)for(we[ke]=null,ke=0;ke<je.length;ke++){var ht=je[ke];ht!==null&&(ht.lane&=-536870913)}x&=~Be}E!==0&&ne(u,E,0),D!==0&&R===0&&u.tag!==0&&(u.suspendedLanes|=D&~(ee&~f))}function ne(u,f,x){u.pendingLanes|=f,u.suspendedLanes&=~f;var E=31-wr(f);u.entangledLanes|=f,u.entanglements[E]=u.entanglements[E]|1073741824|x&4194218}function q(u,f){var x=u.entangledLanes|=f;for(u=u.entanglements;x;){var E=31-wr(x),R=1<<E;R&f|u[E]&f&&(u[E]|=f),x&=~R}}function J(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function B(u){if(Tr&&typeof Tr.onCommitFiberRoot=="function")try{Tr.onCommitFiberRoot(Dc,u,void 0,(u.current.flags&128)===128)}catch{}}function V(u){if(typeof Zg=="function"&&Ap(u),Tr&&typeof Tr.setStrictMode=="function")try{Tr.setStrictMode(Dc,u)}catch{}}function Z(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}function Q(u,f){if(typeof u=="object"&&u!==null){var x=hd.get(u);return x!==void 0?x:(f={value:u,source:f,stack:m(f)},hd.set(u,f),f)}return{value:u,source:f,stack:m(f)}}function G(u,f){Nn[Yn++]=Gu,Nn[Yn++]=Pu,Pu=u,Gu=f}function K(u,f,x){Kr[Wr++]=_s,Kr[Wr++]=ga,Kr[Wr++]=Pa,Pa=u;var E=_s;u=ga;var R=32-wr(E)-1;E&=~(1<<R),x+=1;var D=32-wr(f)+R;if(30<D){var ee=R-R%5;D=(E&(1<<ee)-1).toString(32),E>>=ee,R-=ee,_s=1<<32-wr(f)+R|x<<R|E,ga=D+u}else _s=1<<D|x<<R|E,ga=u}function te(u){u.return!==null&&(G(u,1),K(u,1,0))}function U(u){for(;u===Pu;)Pu=Nn[--Yn],Nn[Yn]=null,Gu=Nn[--Yn],Nn[Yn]=null;for(;u===Pa;)Pa=Kr[--Wr],Kr[Wr]=null,ga=Kr[--Wr],Kr[Wr]=null,_s=Kr[--Wr],Kr[Wr]=null}function le(u,f){k(Ga,f),k(Fu,u),k(Ni,null),u=Oo(f),w(Ni),k(Ni,u)}function de(){w(Ni),w(Fu),w(Ga)}function ge(u){u.memoizedState!==null&&k(zc,u);var f=Ni.current,x=Cg(f,u.type);f!==x&&(k(Fu,u),k(Ni,x))}function se(u){Fu.current===u&&(w(Ni),w(Fu)),zc.current===u&&(w(zc),bs?ot._currentValue=Er:ot._currentValue2=Er)}function pe(u){var f=Error(r(418,""));throw Ie(Q(f,u)),qu}function Ae(u,f){if(!dr)throw Error(r(175));_b(u.stateNode,u.type,u.memoizedProps,f,u)||pe(u)}function Le(u){for(Zi=u.return;Zi;)switch(Zi.tag){case 3:case 27:ya=!0;return;case 5:case 13:ya=!1;return;default:Zi=Zi.return}}function Ge(u){if(!dr||u!==Zi)return!1;if(!Ft)return Le(u),Ft=!0,!1;var f=!1;if(Ii?u.tag!==3&&u.tag!==27&&(u.tag!==5||Gg(u.type)&&!Vl(u.type,u.memoizedProps))&&(f=!0):u.tag!==3&&(u.tag!==5||Gg(u.type)&&!Vl(u.type,u.memoizedProps))&&(f=!0),f&&ji&&pe(u),Le(u),u.tag===13){if(!dr)throw Error(r(316));if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));ji=jg(u)}else ji=Zi?pp(u.stateNode):null;return!0}function Pe(){dr&&(ji=Zi=null,Ft=!1)}function Ie(u){$r===null?$r=[u]:$r.push(u)}function We(){for(var u=Kl,f=Bc=Kl=0;f<u;){var x=Zr[f];Zr[f++]=null;var E=Zr[f];Zr[f++]=null;var R=Zr[f];Zr[f++]=null;var D=Zr[f];if(Zr[f++]=null,E!==null&&R!==null){var ee=E.pending;ee===null?R.next=R:(R.next=ee.next,ee.next=R),E.pending=R}D!==0&&zn(x,R,D)}}function ut(u,f,x,E){Zr[Kl++]=u,Zr[Kl++]=f,Zr[Kl++]=x,Zr[Kl++]=E,Bc|=E,u.lanes|=E,u=u.alternate,u!==null&&(u.lanes|=E)}function Ue(u,f,x,E){return ut(u,f,x,E),Bn(u)}function At(u,f){return ut(u,null,null,f),Bn(u)}function zn(u,f,x){u.lanes|=x;var E=u.alternate;E!==null&&(E.lanes|=x);for(var R=!1,D=u.return;D!==null;)D.childLanes|=x,E=D.alternate,E!==null&&(E.childLanes|=x),D.tag===22&&(u=D.stateNode,u===null||u._visibility&1||(R=!0)),u=D,D=D.return;R&&f!==null&&u.tag===3&&(D=u.stateNode,R=31-wr(x),D=D.hiddenUpdates,u=D[R],u===null?D[R]=[f]:u.push(f),f.lane=x|536870912)}function Bn(u){if(50<Fo)throw Fo=0,mr=null,Error(r(185));for(var f=u.return;f!==null;)u=f,f=u.return;return u.tag===3?u.stateNode:null}function bn(u){u!==Lo&&u.next===null&&(Lo===null?Lc=Lo=u:Lo=Lo.next=u),Vu=!0,Yu||(Yu=!0,_e(ka))}function wi(u,f){if(!Fa&&Vu){Fa=!0;do for(var x=!1,E=Lc;E!==null;){if(u!==0){var R=E.pendingLanes;if(R===0)var D=0;else{var ee=E.suspendedLanes,ie=E.pingedLanes;D=(1<<31-wr(42|u)+1)-1,D&=R&~(ee&~ie),D=D&201326677?D&201326677|1:D?D|2:0}D!==0&&(x=!0,ua(E,D))}else D=Et,D=H(E,E===Mt?D:0),(D&3)===0||z(E,D)||(x=!0,ua(E,D));E=E.next}while(x);Fa=!1}}function ka(){Vu=Yu=!1;var u=0;Wl!==0&&(Xl()&&(u=Wl),Wl=0);for(var f=Hi(),x=null,E=Lc;E!==null;){var R=E.next,D=Lr(E,f);D===0?(E.next=null,x===null?Lc=R:x.next=R,R===null&&(Lo=x)):(x=E,(u!==0||(D&3)!==0)&&(Vu=!0)),E=R}wi(u)}function Lr(u,f){for(var x=u.suspendedLanes,E=u.pingedLanes,R=u.expirationTimes,D=u.pendingLanes&-62914561;0<D;){var ee=31-wr(D),ie=1<<ee,fe=R[ee];fe===-1?((ie&x)===0||(ie&E)!==0)&&(R[ee]=F(ie,f)):fe<=f&&(u.expiredLanes|=ie),D&=~ie}if(f=Mt,x=Et,x=H(u,u===f?x:0),E=u.callbackNode,x===0||u===f&&mn===2||u.cancelPendingCommit!==null)return E!==null&&E!==null&&ju(E),u.callbackNode=null,u.callbackPriority=0;if((x&3)===0||z(u,x)){if(f=x&-x,f===u.callbackPriority)return f;switch(E!==null&&ju(E),J(x)){case 2:case 8:x=$g;break;case 32:x=fd;break;case 268435456:x=dd;break;default:x=fd}return E=hn.bind(null,u),x=Oc(x,E),u.callbackPriority=f,u.callbackNode=x,f}return E!==null&&E!==null&&ju(E),u.callbackPriority=2,u.callbackNode=null,2}function hn(u,f){var x=u.callbackNode;if(Mi()&&u.callbackNode!==x)return null;var E=Et;return E=H(u,u===Mt?E:0),E===0?null:(Eu(u,E,f),Lr(u,Hi()),u.callbackNode!=null&&u.callbackNode===x?hn.bind(null,u):null)}function ua(u,f){if(Mi())return null;Eu(u,f,!0)}function _e(u){ci?ed(function(){(Ze&6)!==0?Oc(Cp,u):u()}):Oc(Cp,u)}function Ne(){return Wl===0&&(Wl=$()),Wl}function Je(u,f){if(Xu===null){var x=Xu=[];pd=0,Cr=Ne(),$l={status:"pending",value:void 0,then:function(E){x.push(E)}}}return pd++,f.then(bt,bt),f}function bt(){if(--pd===0&&Xu!==null){$l!==null&&($l.status="fulfilled");var u=Xu;Xu=null,Cr=0,$l=null;for(var f=0;f<u.length;f++)(0,u[f])()}}function kt(u,f){var x=[],E={status:"pending",value:null,reason:null,then:function(R){x.push(R)}};return u.then(function(){E.status="fulfilled",E.value=f;for(var R=0;R<x.length;R++)(0,x[R])(f)},function(R){for(E.status="rejected",E.reason=R,R=0;R<x.length;R++)(0,x[R])(void 0)}),E}function yi(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rr(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function xn(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function $t(u,f,x){var E=u.updateQueue;if(E===null)return null;if(E=E.shared,(Ze&2)!==0){var R=E.pending;return R===null?f.next=f:(f.next=R.next,R.next=f),E.pending=f,f=Bn(u),zn(u,null,x),f}return ut(u,E,f,x),Bn(u)}function Gn(u,f,x){if(f=f.updateQueue,f!==null&&(f=f.shared,(x&4194176)!==0)){var E=f.lanes;E&=u.pendingLanes,x|=E,f.lanes=x,q(u,x)}}function Pt(u,f){var x=u.updateQueue,E=u.alternate;if(E!==null&&(E=E.updateQueue,x===E)){var R=null,D=null;if(x=x.firstBaseUpdate,x!==null){do{var ee={lane:x.lane,tag:x.tag,payload:x.payload,callback:null,next:null};D===null?R=D=ee:D=D.next=ee,x=x.next}while(x!==null);D===null?R=D=f:D=D.next=f}else R=D=f;x={baseState:E.baseState,firstBaseUpdate:R,lastBaseUpdate:D,shared:E.shared,callbacks:E.callbacks},u.updateQueue=x;return}u=x.lastBaseUpdate,u===null?x.firstBaseUpdate=f:u.next=f,x.lastBaseUpdate=f}function Fi(){if(Uc){var u=$l;if(u!==null)throw u}}function Qn(u,f,x,E){Uc=!1;var R=u.updateQueue;Js=!1;var D=R.firstBaseUpdate,ee=R.lastBaseUpdate,ie=R.shared.pending;if(ie!==null){R.shared.pending=null;var fe=ie,we=fe.next;fe.next=null,ee===null?D=we:ee.next=we,ee=fe;var ke=u.alternate;ke!==null&&(ke=ke.updateQueue,ie=ke.lastBaseUpdate,ie!==ee&&(ie===null?ke.firstBaseUpdate=we:ie.next=we,ke.lastBaseUpdate=fe))}if(D!==null){var Be=R.baseState;ee=0,ke=we=fe=null,ie=D;do{var je=ie.lane&-536870913,ht=je!==ie.lane;if(ht?(Et&je)===je:(E&je)===je){je!==0&&je===Cr&&(Uc=!0),ke!==null&&(ke=ke.next={lane:0,tag:ie.tag,payload:ie.payload,callback:null,next:null});e:{var Nr=u,Zu=ie;je=f;var qo=x;switch(Zu.tag){case 1:if(Nr=Zu.payload,typeof Nr=="function"){Be=Nr.call(qo,Be,je);break e}Be=Nr;break e;case 3:Nr.flags=Nr.flags&-65537|128;case 0:if(Nr=Zu.payload,je=typeof Nr=="function"?Nr.call(qo,Be,je):Nr,je==null)break e;Be=No({},Be,je);break e;case 2:Js=!0}}je=ie.callback,je!==null&&(u.flags|=64,ht&&(u.flags|=8192),ht=R.callbacks,ht===null?R.callbacks=[je]:ht.push(je))}else ht={lane:je,tag:ie.tag,payload:ie.payload,callback:ie.callback,next:null},ke===null?(we=ke=ht,fe=Be):ke=ke.next=ht,ee|=je;if(ie=ie.next,ie===null){if(ie=R.shared.pending,ie===null)break;ht=ie,ie=ht.next,ht.next=null,R.lastBaseUpdate=ht,R.shared.pending=null}}while(!0);ke===null&&(fe=Be),R.baseState=fe,R.firstBaseUpdate=we,R.lastBaseUpdate=ke,D===null&&(R.shared.lanes=0),ta|=ee,u.lanes=ee,u.memoizedState=Be}}function go(u,f){if(typeof u!="function")throw Error(r(191,u));u.call(f)}function rs(u,f){var x=u.callbacks;if(x!==null)for(u.callbacks=null,u=0;u<x.length;u++)go(x[u],f)}function Oa(u,f){if(Xr(u,f))return!0;if(typeof u!="object"||u===null||typeof f!="object"||f===null)return!1;var x=Object.keys(u),E=Object.keys(f);if(x.length!==E.length)return!1;for(E=0;E<x.length;E++){var R=x[E];if(!Ku.call(f,R)||!Xr(u[R],f[R]))return!1}return!0}function as(u){return u=u.status,u==="fulfilled"||u==="rejected"}function bi(){}function ae(u,f,x){switch(x=u[x],x===void 0?u.push(f):x!==f&&(f.then(bi,bi),f=x),f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,u===fn?Error(r(483)):u;default:if(typeof f.status=="string")f.then(bi,bi);else{if(u=Mt,u!==null&&100<u.shellSuspendCounter)throw Error(r(482));u=f,u.status="pending",u.then(function(E){if(f.status==="pending"){var R=f;R.status="fulfilled",R.value=E}},function(E){if(f.status==="pending"){var R=f;R.status="rejected",R.reason=E}})}switch(f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,u===fn?Error(r(483)):u}throw Uo=f,fn}}function Ee(){if(Uo===null)throw Error(r(459));var u=Uo;return Uo=null,u}function ze(u){var f=ba;return ba+=1,Ss===null&&(Ss=[]),ae(Ss,u,f)}function et(u,f){f=f.props.ref,u.ref=f!==void 0?f:null}function Jt(u,f){throw f.$$typeof===Vh?Error(r(525)):(u=Object.prototype.toString.call(f),Error(r(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u)))}function en(u){var f=u._init;return f(u._payload)}function Fe(u){function f(ye,ce){if(u){var xe=ye.deletions;xe===null?(ye.deletions=[ce],ye.flags|=16):xe.push(ce)}}function x(ye,ce){if(!u)return null;for(;ce!==null;)f(ye,ce),ce=ce.sibling;return null}function E(ye){for(var ce=new Map;ye!==null;)ye.key!==null?ce.set(ye.key,ye):ce.set(ye.index,ye),ye=ye.sibling;return ce}function R(ye,ce){return ye=Wi(ye,ce),ye.index=0,ye.sibling=null,ye}function D(ye,ce,xe){return ye.index=xe,u?(xe=ye.alternate,xe!==null?(xe=xe.index,xe<ce?(ye.flags|=33554434,ce):xe):(ye.flags|=33554434,ce)):(ye.flags|=1048576,ce)}function ee(ye){return u&&ye.alternate===null&&(ye.flags|=33554434),ye}function ie(ye,ce,xe,Re){return ce===null||ce.tag!==6?(ce=jl(xe,ye.mode,Re),ce.return=ye,ce):(ce=R(ce,xe),ce.return=ye,ce)}function fe(ye,ce,xe,Re){var Ke=xe.type;return Ke===Cc?ke(ye,ce,xe.props.children,Re,xe.key):ce!==null&&(ce.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===ja&&en(Ke)===ce.type)?(ce=R(ce,xe.props),et(ce,xe),ce.return=ye,ce):(ce=pa(xe.type,xe.key,xe.props,null,ye.mode,Re),et(ce,xe),ce.return=ye,ce)}function we(ye,ce,xe,Re){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==xe.containerInfo||ce.stateNode.implementation!==xe.implementation?(ce=Tc(xe,ye.mode,Re),ce.return=ye,ce):(ce=R(ce,xe.children||[]),ce.return=ye,ce)}function ke(ye,ce,xe,Re,Ke){return ce===null||ce.tag!==7?(ce=Xs(xe,ye.mode,Re,Ke),ce.return=ye,ce):(ce=R(ce,xe),ce.return=ye,ce)}function Be(ye,ce,xe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return ce=jl(""+ce,ye.mode,xe),ce.return=ye,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case Ks:return xe=pa(ce.type,ce.key,ce.props,null,ye.mode,xe),et(xe,ce),xe.return=ye,xe;case Ha:return ce=Tc(ce,ye.mode,xe),ce.return=ye,ce;case ja:var Re=ce._init;return ce=Re(ce._payload),Be(ye,ce,xe)}if(ql(ce)||s(ce))return ce=Xs(ce,ye.mode,xe,null),ce.return=ye,ce;if(typeof ce.then=="function")return Be(ye,ze(ce),xe);if(ce.$$typeof===gs)return Be(ye,bu(ye,ce),xe);Jt(ye,ce)}return null}function je(ye,ce,xe,Re){var Ke=ce!==null?ce.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return Ke!==null?null:ie(ye,ce,""+xe,Re);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case Ks:return xe.key===Ke?fe(ye,ce,xe,Re):null;case Ha:return xe.key===Ke?we(ye,ce,xe,Re):null;case ja:return Ke=xe._init,xe=Ke(xe._payload),je(ye,ce,xe,Re)}if(ql(xe)||s(xe))return Ke!==null?null:ke(ye,ce,xe,Re,null);if(typeof xe.then=="function")return je(ye,ce,ze(xe),Re);if(xe.$$typeof===gs)return je(ye,ce,bu(ye,xe),Re);Jt(ye,xe)}return null}function ht(ye,ce,xe,Re,Ke){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return ye=ye.get(xe)||null,ie(ce,ye,""+Re,Ke);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case Ks:return ye=ye.get(Re.key===null?xe:Re.key)||null,fe(ce,ye,Re,Ke);case Ha:return ye=ye.get(Re.key===null?xe:Re.key)||null,we(ce,ye,Re,Ke);case ja:var _n=Re._init;return Re=_n(Re._payload),ht(ye,ce,xe,Re,Ke)}if(ql(Re)||s(Re))return ye=ye.get(xe)||null,ke(ce,ye,Re,Ke,null);if(typeof Re.then=="function")return ht(ye,ce,xe,ze(Re),Ke);if(Re.$$typeof===gs)return ht(ye,ce,xe,bu(ce,Re),Ke);Jt(ce,Re)}return null}function Nr(ye,ce,xe,Re){for(var Ke=null,_n=null,ct=ce,Yt=ce=0,Si=null;ct!==null&&Yt<xe.length;Yt++){ct.index>Yt?(Si=ct,ct=null):Si=ct.sibling;var Vt=je(ye,ct,xe[Yt],Re);if(Vt===null){ct===null&&(ct=Si);break}u&&ct&&Vt.alternate===null&&f(ye,ct),ce=D(Vt,ce,Yt),_n===null?Ke=Vt:_n.sibling=Vt,_n=Vt,ct=Si}if(Yt===xe.length)return x(ye,ct),Ft&&G(ye,Yt),Ke;if(ct===null){for(;Yt<xe.length;Yt++)ct=Be(ye,xe[Yt],Re),ct!==null&&(ce=D(ct,ce,Yt),_n===null?Ke=ct:_n.sibling=ct,_n=ct);return Ft&&G(ye,Yt),Ke}for(ct=E(ct);Yt<xe.length;Yt++)Si=ht(ct,ye,Yt,xe[Yt],Re),Si!==null&&(u&&Si.alternate!==null&&ct.delete(Si.key===null?Yt:Si.key),ce=D(Si,ce,Yt),_n===null?Ke=Si:_n.sibling=Si,_n=Si);return u&&ct.forEach(function(sl){return f(ye,sl)}),Ft&&G(ye,Yt),Ke}function Zu(ye,ce,xe,Re){if(xe==null)throw Error(r(151));for(var Ke=null,_n=null,ct=ce,Yt=ce=0,Si=null,Vt=xe.next();ct!==null&&!Vt.done;Yt++,Vt=xe.next()){ct.index>Yt?(Si=ct,ct=null):Si=ct.sibling;var sl=je(ye,ct,Vt.value,Re);if(sl===null){ct===null&&(ct=Si);break}u&&ct&&sl.alternate===null&&f(ye,ct),ce=D(sl,ce,Yt),_n===null?Ke=sl:_n.sibling=sl,_n=sl,ct=Si}if(Vt.done)return x(ye,ct),Ft&&G(ye,Yt),Ke;if(ct===null){for(;!Vt.done;Yt++,Vt=xe.next())Vt=Be(ye,Vt.value,Re),Vt!==null&&(ce=D(Vt,ce,Yt),_n===null?Ke=Vt:_n.sibling=Vt,_n=Vt);return Ft&&G(ye,Yt),Ke}for(ct=E(ct);!Vt.done;Yt++,Vt=xe.next())Vt=ht(ct,ye,Yt,Vt.value,Re),Vt!==null&&(u&&Vt.alternate!==null&&ct.delete(Vt.key===null?Yt:Vt.key),ce=D(Vt,ce,Yt),_n===null?Ke=Vt:_n.sibling=Vt,_n=Vt);return u&&ct.forEach(function(Ed){return f(ye,Ed)}),Ft&&G(ye,Yt),Ke}function qo(ye,ce,xe,Re){if(typeof xe=="object"&&xe!==null&&xe.type===Cc&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case Ks:e:{for(var Ke=xe.key;ce!==null;){if(ce.key===Ke){if(Ke=xe.type,Ke===Cc){if(ce.tag===7){x(ye,ce.sibling),Re=R(ce,xe.props.children),Re.return=ye,ye=Re;break e}}else if(ce.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===ja&&en(Ke)===ce.type){x(ye,ce.sibling),Re=R(ce,xe.props),et(Re,xe),Re.return=ye,ye=Re;break e}x(ye,ce);break}else f(ye,ce);ce=ce.sibling}xe.type===Cc?(Re=Xs(xe.props.children,ye.mode,Re,xe.key),Re.return=ye,ye=Re):(Re=pa(xe.type,xe.key,xe.props,null,ye.mode,Re),et(Re,xe),Re.return=ye,ye=Re)}return ee(ye);case Ha:e:{for(Ke=xe.key;ce!==null;){if(ce.key===Ke)if(ce.tag===4&&ce.stateNode.containerInfo===xe.containerInfo&&ce.stateNode.implementation===xe.implementation){x(ye,ce.sibling),Re=R(ce,xe.children||[]),Re.return=ye,ye=Re;break e}else{x(ye,ce);break}else f(ye,ce);ce=ce.sibling}Re=Tc(xe,ye.mode,Re),Re.return=ye,ye=Re}return ee(ye);case ja:return Ke=xe._init,xe=Ke(xe._payload),qo(ye,ce,xe,Re)}if(ql(xe))return Nr(ye,ce,xe,Re);if(s(xe)){if(Ke=s(xe),typeof Ke!="function")throw Error(r(150));return xe=Ke.call(xe),Zu(ye,ce,xe,Re)}if(typeof xe.then=="function")return qo(ye,ce,ze(xe),Re);if(xe.$$typeof===gs)return qo(ye,ce,bu(ye,xe),Re);Jt(ye,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,ce!==null&&ce.tag===6?(x(ye,ce.sibling),Re=R(ce,xe),Re.return=ye,ye=Re):(x(ye,ce),Re=jl(xe,ye.mode,Re),Re.return=ye,ye=Re),ee(ye)):x(ye,ce)}return function(ye,ce,xe,Re){try{ba=0;var Ke=qo(ye,ce,xe,Re);return Ss=null,Ke}catch(ct){if(ct===fn)throw ct;var _n=n(29,ct,null,ye.mode);return _n.lanes=Re,_n.return=ye,_n}finally{}}}function He(u,f){u=qa,k(Qr,u),k(Es,f),qa=u|f.baseLanes}function tt(){k(Qr,qa),k(Es,Es.current)}function Cn(){qa=Qr.current,w(Es),w(Qr)}function Gt(u){var f=u.alternate;k(ui,ui.current&1),k(Jr,u),xa===null&&(f===null||Es.current!==null||f.memoizedState!==null)&&(xa=u)}function fa(u){if(u.tag===22){if(k(ui,ui.current),k(Jr,u),xa===null){var f=u.alternate;f!==null&&f.memoizedState!==null&&(xa=u)}}else ar()}function ar(){k(ui,ui.current),k(Jr,Jr.current)}function qi(u){w(Jr),xa===u&&(xa=null),w(ui)}function sr(u){for(var f=u;f!==null;){if(f.tag===13){var x=f.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||ad(x)||Lu(x)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}function yt(){throw Error(r(321))}function li(u,f){if(f===null)return!1;for(var x=0;x<f.length&&x<u.length;x++)if(!Xr(u[x],f[x]))return!1;return!0}function Ur(u,f,x,E,R,D){return ws=D,_t=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,rt.H=u===null||u.memoizedState===null?fi:Qi,el=!1,D=x(E,R),el=!1,kn&&(D=_l(f,x,E,R)),Bs(u),D}function Bs(u){rt.H=qt;var f=Zt!==null&&Zt.next!==null;if(ws=0,ei=Zt=_t=null,va=!1,Vn=0,Ic=null,f)throw Error(r(300));u===null||ti||(u=u.dependencies,u!==null&&Rl(u)&&(ti=!0))}function _l(u,f,x,E){_t=u;var R=0;do{if(kn&&(Ic=null),Vn=0,kn=!1,25<=R)throw Error(r(301));if(R+=1,ei=Zt=null,u.updateQueue!=null){var D=u.updateQueue;D.lastEffect=null,D.events=null,D.stores=null,D.memoCache!=null&&(D.memoCache.index=0)}rt.H=Ql,D=f(x,E)}while(kn);return D}function Sl(){var u=rt.H,f=u.useState()[0];return f=typeof f.then=="function"?lr(f):f,u=u.useState()[0],(Zt!==null?Zt.memoizedState:null)!==u&&(_t.flags|=1024),f}function El(){var u=Wu!==0;return Wu=0,u}function Da(u,f,x){f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~x}function Ls(u){if(va){for(u=u.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}va=!1}ws=0,ei=Zt=_t=null,kn=!1,Vn=Wu=0,Ic=null}function tn(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ei===null?_t.memoizedState=ei=u:ei=ei.next=u,ei}function nn(){if(Zt===null){var u=_t.alternate;u=u!==null?u.memoizedState:null}else u=Zt.next;var f=ei===null?_t.memoizedState:ei.next;if(f!==null)ei=f,Zt=u;else{if(u===null)throw _t.alternate===null?Error(r(467)):Error(r(310));Zt=u,u={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},ei===null?_t.memoizedState=ei=u:ei=ei.next=u}return ei}function lr(u){var f=Vn;return Vn+=1,Ic===null&&(Ic=[]),u=ae(Ic,u,f),f=_t,(ei===null?f.memoizedState:ei.next)===null&&(f=f.alternate,rt.H=f===null||f.memoizedState===null?fi:Qi),u}function Ir(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return lr(u);if(u.$$typeof===gs)return Bi(u)}throw Error(r(438,String(u)))}function Ln(u){var f=null,x=_t.updateQueue;if(x!==null&&(f=x.memoCache),f==null){var E=_t.alternate;E!==null&&(E=E.updateQueue,E!==null&&(E=E.memoCache,E!=null&&(f={data:E.data.map(function(R){return R.slice()}),index:0})))}if(f==null&&(f={data:[],index:0}),x===null&&(x=gd(),_t.updateQueue=x),x.memoCache=f,x=f.data[f.index],x===void 0)for(x=f.data[f.index]=Array(u),E=0;E<u;E++)x[E]=Tg;return f.index++,x}function xr(u,f){return typeof f=="function"?f(u):f}function da(u){var f=nn();return Hr(f,Zt,u)}function Hr(u,f,x){var E=u.queue;if(E===null)throw Error(r(311));E.lastRenderedReducer=x;var R=u.baseQueue,D=E.pending;if(D!==null){if(R!==null){var ee=R.next;R.next=D.next,D.next=ee}f.baseQueue=R=D,E.pending=null}if(D=u.baseState,R===null)u.memoizedState=D;else{f=R.next;var ie=ee=null,fe=null,we=f,ke=!1;do{var Be=we.lane&-536870913;if(Be!==we.lane?(Et&Be)===Be:(ws&Be)===Be){var je=we.revertLane;if(je===0)fe!==null&&(fe=fe.next={lane:0,revertLane:0,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null}),Be===Cr&&(ke=!0);else if((ws&je)===je){we=we.next,je===Cr&&(ke=!0);continue}else Be={lane:0,revertLane:we.revertLane,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},fe===null?(ie=fe=Be,ee=D):fe=fe.next=Be,_t.lanes|=je,ta|=je;Be=we.action,el&&x(D,Be),D=we.hasEagerState?we.eagerState:x(D,Be)}else je={lane:Be,revertLane:we.revertLane,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},fe===null?(ie=fe=je,ee=D):fe=fe.next=je,_t.lanes|=Be,ta|=Be;we=we.next}while(we!==null&&we!==f);if(fe===null?ee=D:fe.next=ie,!Xr(D,u.memoizedState)&&(ti=!0,ke&&(x=$l,x!==null)))throw x;u.memoizedState=D,u.baseState=ee,u.baseQueue=fe,E.lastRenderedState=D}return R===null&&(E.lanes=0),[u.memoizedState,E.dispatch]}function Me(u){var f=nn(),x=f.queue;if(x===null)throw Error(r(311));x.lastRenderedReducer=u;var E=x.dispatch,R=x.pending,D=f.memoizedState;if(R!==null){x.pending=null;var ee=R=R.next;do D=u(D,ee.action),ee=ee.next;while(ee!==R);Xr(D,f.memoizedState)||(ti=!0),f.memoizedState=D,f.baseQueue===null&&(f.baseState=D),x.lastRenderedState=D}return[D,E]}function Ve(u,f,x){var E=_t,R=nn(),D=Ft;if(D){if(x===void 0)throw Error(r(407));x=x()}else x=f();var ee=!Xr((Zt||R).memoizedState,x);if(ee&&(R.memoizedState=x,ti=!0),R=R.queue,os(Un.bind(null,E,R,u),[u]),R.getSnapshot!==f||ee||ei!==null&&ei.memoizedState.tag&1){if(E.flags|=2048,Ba(9,Xt.bind(null,E,R,x,f),{destroy:void 0},null),Mt===null)throw Error(r(349));D||(ws&60)!==0||xt(E,f,x)}return x}function xt(u,f,x){u.flags|=16384,u={getSnapshot:f,value:x},f=_t.updateQueue,f===null?(f=gd(),_t.updateQueue=f,f.stores=[u]):(x=f.stores,x===null?f.stores=[u]:x.push(u))}function Xt(u,f,x,E){f.value=x,f.getSnapshot=E,xi(f)&&Yi(u)}function Un(u,f,x){return x(function(){xi(f)&&Yi(u)})}function xi(u){var f=u.getSnapshot;u=u.value;try{var x=f();return!Xr(u,x)}catch{return!0}}function Yi(u){var f=At(u,2);f!==null&&Ki(f,u,2)}function Ti(u){var f=tn();if(typeof u=="function"){var x=u;if(u=x(),el){V(!0);try{x()}finally{V(!1)}}}return f.memoizedState=f.baseState=u,f.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:u},f}function un(u,f,x,E){return u.baseState=x,Hr(u,Zt,typeof E=="function"?E:xr)}function or(u,f,x,E,R){if(vo(u))throw Error(r(485));if(u=f.action,u!==null){var D={payload:R,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ee){D.listeners.push(ee)}};rt.T!==null?x(!0):D.isTransition=!1,E(D),x=f.pending,x===null?(D.next=f.pending=D,yo(f,D)):(D.next=x.next,f.pending=x.next=D)}}function yo(u,f){var x=f.action,E=f.payload,R=u.state;if(f.isTransition){var D=rt.T,ee={};rt.T=ee;try{var ie=x(R,E),fe=rt.S;fe!==null&&fe(ee,ie),ha(u,f,ie)}catch(we){za(u,f,we)}finally{rt.T=D}}else try{D=x(R,E),ha(u,f,D)}catch(we){za(u,f,we)}}function ha(u,f,x){x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(function(E){wl(u,f,E)},function(E){return za(u,f,E)}):wl(u,f,x)}function wl(u,f,x){f.status="fulfilled",f.value=x,oc(f),u.state=x,f=u.pending,f!==null&&(x=f.next,x===f?u.pending=null:(x=x.next,f.next=x,yo(u,x)))}function za(u,f,x){var E=u.pending;if(u.pending=null,E!==null){E=E.next;do f.status="rejected",f.reason=x,oc(f),f=f.next;while(f!==E)}u.action=null}function oc(u){u=u.listeners;for(var f=0;f<u.length;f++)(0,u[f])()}function Di(u,f){return f}function ss(u,f){if(Ft){var x=Mt.formState;if(x!==null){e:{var E=_t;if(Ft){if(ji){var R=Og(ji,ya);if(R){ji=pp(R),E=Dg(R);break e}}pe(E)}E=!1}E&&(f=x[0])}}x=tn(),x.memoizedState=x.baseState=f,E={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Di,lastRenderedState:f},x.queue=E,x=Af.bind(null,_t,E),E.dispatch=x,E=Ti(!1);var D=Mf.bind(null,_t,!1,E.queue);return E=tn(),R={state:f,dispatch:null,action:u,pending:null},E.queue=R,x=or.bind(null,_t,R,D,x),R.dispatch=x,E.memoizedState=u,[f,x,!1]}function ls(u){var f=nn();return Us(f,Zt,u)}function Us(u,f,x){f=Hr(u,f,Di)[0],u=da(xr)[0],f=typeof f=="object"&&f!==null&&typeof f.then=="function"?lr(f):f;var E=nn(),R=E.queue,D=R.dispatch;return x!==E.memoizedState&&(_t.flags|=2048,Ba(9,oi.bind(null,R,x),{destroy:void 0},null)),[f,D,u]}function oi(u,f){u.action=f}function cu(u){var f=nn(),x=Zt;if(x!==null)return Us(f,x,u);nn(),f=f.memoizedState,x=nn();var E=x.queue.dispatch;return x.memoizedState=u,[f,E,!1]}function Ba(u,f,x,E){return u={tag:u,create:f,inst:x,deps:E,next:null},f=_t.updateQueue,f===null&&(f=gd(),_t.updateQueue=f),x=f.lastEffect,x===null?f.lastEffect=u.next=u:(E=x.next,x.next=u,u.next=E,f.lastEffect=u),u}function it(){return nn().memoizedState}function bo(u,f,x,E){var R=tn();_t.flags|=u,R.memoizedState=Ba(1|f,x,{destroy:void 0},E===void 0?null:E)}function Hn(u,f,x,E){var R=nn();E=E===void 0?null:E;var D=R.memoizedState.inst;Zt!==null&&E!==null&&li(E,Zt.memoizedState.deps)?R.memoizedState=Ba(f,x,D,E):(_t.flags|=u,R.memoizedState=Ba(1|f,x,D,E))}function rn(u,f){bo(8390656,8,u,f)}function os(u,f){Hn(2048,8,u,f)}function cs(u,f){return Hn(4,2,u,f)}function cc(u,f){return Hn(4,4,u,f)}function Is(u,f){if(typeof f=="function"){u=u();var x=f(u);return function(){typeof x=="function"?x():f(null)}}if(f!=null)return u=u(),f.current=u,function(){f.current=null}}function De(u,f,x){x=x!=null?x.concat([u]):null,Hn(4,4,Is.bind(null,f,u),x)}function qe(){}function mt(u,f){var x=nn();f=f===void 0?null:f;var E=x.memoizedState;return f!==null&&li(f,E[1])?E[0]:(x.memoizedState=[u,f],u)}function Nt(u,f){var x=nn();f=f===void 0?null:f;var E=x.memoizedState;if(f!==null&&li(f,E[1]))return E[0];if(E=u(),el){V(!0);try{u()}finally{V(!1)}}return x.memoizedState=[E,f],E}function An(u,f,x){return x===void 0||(ws&1073741824)!==0?u.memoizedState=f:(u.memoizedState=x,u=ds(),_t.lanes|=u,ta|=u,x)}function jr(u,f,x,E){return Xr(x,f)?x:Es.current!==null?(u=An(u,x,E),Xr(u,f)||(ti=!0),u):(ws&42)===0?(ti=!0,u.memoizedState=x):(u=ds(),_t.lanes|=u,ta|=u,f)}function uc(u,f,x,E,R){var D=vi();$i(D!==0&&8>D?D:8);var ee=rt.T,ie={};rt.T=ie,Mf(u,!1,f,x);try{var fe=R(),we=rt.S;if(we!==null&&we(ie,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var ke=kt(fe,E);Cl(u,f,ke,fr(u))}else Cl(u,f,E,fr(u))}catch(Be){Cl(u,f,{then:function(){},status:"rejected",reason:Be},fr())}finally{$i(D),rt.T=ee}}function uu(u){var f=u.memoizedState;if(f!==null)return f;f={memoizedState:Er,baseState:Er,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:Er},next:null};var x={};return f.next={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:x},next:null},u.memoizedState=f,u=u.alternate,u!==null&&(u.memoizedState=f),f}function xo(){return Bi(ot)}function us(){return nn().memoizedState}function Cf(){return nn().memoizedState}function fu(u){for(var f=u.return;f!==null;){switch(f.tag){case 24:case 3:var x=fr();u=xn(x);var E=$t(f,u,x);E!==null&&(Ki(E,f,x),Gn(E,f,x)),f={cache:Df()},u.payload=f;return}f=f.return}}function Tl(u,f,x){var E=fr();x={lane:E,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null},vo(u)?du(f,x):(x=Ue(u,f,x,E),x!==null&&(Ki(x,u,E),vh(x,f,E)))}function Af(u,f,x){var E=fr();Cl(u,f,x,E)}function Cl(u,f,x,E){var R={lane:E,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null};if(vo(u))du(f,R);else{var D=u.alternate;if(u.lanes===0&&(D===null||D.lanes===0)&&(D=f.lastRenderedReducer,D!==null))try{var ee=f.lastRenderedState,ie=D(ee,x);if(R.hasEagerState=!0,R.eagerState=ie,Xr(ie,ee))return ut(u,f,R,0),Mt===null&&We(),!1}catch{}finally{}if(x=Ue(u,f,R,E),x!==null)return Ki(x,u,E),vh(x,f,E),!0}return!1}function Mf(u,f,x,E){if(E={lane:2,revertLane:Ne(),action:E,hasEagerState:!1,eagerState:null,next:null},vo(u)){if(f)throw Error(r(479))}else f=Ue(u,x,E,2),f!==null&&Ki(f,u,2)}function vo(u){var f=u.alternate;return u===_t||f!==null&&f===_t}function du(u,f){kn=va=!0;var x=u.pending;x===null?f.next=f:(f.next=x.next,x.next=f),u.pending=f}function vh(u,f,x){if((x&4194176)!==0){var E=f.lanes;E&=u.pendingLanes,x|=E,f.lanes=x,q(u,x)}}function Vi(u,f,x,E){f=u.memoizedState,x=x(E,f),x=x==null?f:No({},f,x),u.memoizedState=x,u.lanes===0&&(u.updateQueue.baseState=x)}function Al(u,f,x,E,R,D,ee){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(E,D,ee):f.prototype&&f.prototype.isPureReactComponent?!Oa(x,E)||!Oa(R,D):!0}function hu(u,f,x,E){u=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(x,E),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(x,E),f.state!==u&&yd.enqueueReplaceState(f,f.state,null)}function La(u,f){var x=f;if("ref"in f){x={};for(var E in f)E!=="ref"&&(x[E]=f[E])}if(u=u.defaultProps){x===f&&(x=No({},x));for(var R in u)x[R]===void 0&&(x[R]=u[R])}return x}function Rf(u,f){try{var x=u.onUncaughtError;x(f.value,{componentStack:f.stack})}catch(E){setTimeout(function(){throw E})}}function Nf(u,f,x){try{var E=u.onCaughtError;E(x.value,{componentStack:x.stack,errorBoundary:f.tag===1?f.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function pu(u,f,x){return x=xn(x),x.tag=3,x.payload={element:null},x.callback=function(){Rf(u,f)},x}function fc(u){return u=xn(u),u.tag=3,u}function mu(u,f,x,E){var R=x.type.getDerivedStateFromError;if(typeof R=="function"){var D=E.value;u.payload=function(){return R(D)},u.callback=function(){Nf(f,x,E)}}var ee=x.stateNode;ee!==null&&typeof ee.componentDidCatch=="function"&&(u.callback=function(){Nf(f,x,E),typeof R!="function"&&(ia===null?ia=new Set([this]):ia.add(this));var ie=E.stack;this.componentDidCatch(E.value,{componentStack:ie!==null?ie:""})})}function ng(u,f,x,E,R){if(x.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){if(f=x.alternate,f!==null&&_o(f,x,R,!0),x=Jr.current,x!==null){switch(x.tag){case 13:return xa===null?Sr():x.alternate===null&&It===0&&(It=3),x.flags&=-257,x.flags|=65536,x.lanes=R,E===md?x.flags|=16384:(f=x.updateQueue,f===null?x.updateQueue=new Set([E]):f.add(E),Xf(u,E,R)),!1;case 22:return x.flags|=65536,E===md?x.flags|=16384:(f=x.updateQueue,f===null?(f={transitions:null,markerInstances:null,retryQueue:new Set([E])},x.updateQueue=f):(x=f.retryQueue,x===null?f.retryQueue=new Set([E]):x.add(E)),Xf(u,E,R)),!1}throw Error(r(435,x.tag))}return Xf(u,E,R),Sr(),!1}if(Ft)return f=Jr.current,f!==null?((f.flags&65536)===0&&(f.flags|=256),f.flags|=65536,f.lanes=R,E!==qu&&(u=Error(r(422),{cause:E}),Ie(Q(u,x)))):(E!==qu&&(f=Error(r(423),{cause:E}),Ie(Q(f,x))),u=u.current.alternate,u.flags|=65536,R&=-R,u.lanes|=R,E=Q(E,x),R=pu(u.stateNode,E,R),Pt(u,R),It!==4&&(It=2)),!1;var D=Error(r(520),{cause:E});if(D=Q(D,x),jc===null?jc=[D]:jc.push(D),It!==4&&(It=2),f===null)return!0;E=Q(E,x),x=f;do{switch(x.tag){case 3:return x.flags|=65536,u=R&-R,x.lanes|=u,u=pu(x.stateNode,E,u),Pt(x,u),!1;case 1:if(f=x.type,D=x.stateNode,(x.flags&128)===0&&(typeof f.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(ia===null||!ia.has(D))))return x.flags|=65536,R&=-R,x.lanes|=R,R=fc(R),mu(R,u,x,E),Pt(x,R),!1}x=x.return}while(x!==null);return!1}function zi(u,f,x,E){f.child=u===null?Rp(f,null,x,E):Zl(f,u.child,x,E)}function ig(u,f,x,E,R){x=x.render;var D=f.ref;if("ref"in E){var ee={};for(var ie in E)ie!=="ref"&&(ee[ie]=E[ie])}else ee=E;return So(f),E=Ur(u,f,x,ee,D,R),ie=El(),u!==null&&!ti?(Da(u,f,R),Hs(u,f,R)):(Ft&&ie&&te(f),f.flags|=1,zi(u,f,E,R),f.child)}function rg(u,f,x,E,R){if(u===null){var D=x.type;return typeof D=="function"&&!Ys(D)&&D.defaultProps===void 0&&x.compare===null?(f.tag=15,f.type=D,kf(u,f,D,E,R)):(u=pa(x.type,null,E,f,f.mode,R),u.ref=f.ref,u.return=f,f.child=u)}if(D=u.child,!Ah(u,R)){var ee=D.memoizedProps;if(x=x.compare,x=x!==null?x:Oa,x(ee,E)&&u.ref===f.ref)return Hs(u,f,R)}return f.flags|=1,u=Wi(D,E),u.ref=f.ref,u.return=f,f.child=u}function kf(u,f,x,E,R){if(u!==null){var D=u.memoizedProps;if(Oa(D,E)&&u.ref===f.ref)if(ti=!1,f.pendingProps=E=D,Ah(u,R))(u.flags&131072)!==0&&(ti=!0);else return f.lanes=u.lanes,Hs(u,f,R)}return _h(u,f,x,E,R)}function ag(u,f,x){var E=f.pendingProps,R=E.children,D=(f.stateNode._pendingVisibility&2)!==0,ee=u!==null?u.memoizedState:null;if(gu(u,f),E.mode==="hidden"||D){if((f.flags&128)!==0){if(E=ee!==null?ee.baseLanes|x:x,u!==null){for(R=f.child=u.child,D=0;R!==null;)D=D|R.lanes|R.childLanes,R=R.sibling;f.childLanes=D&~E}else f.childLanes=0,f.child=null;return sg(u,f,E,x)}if((x&536870912)!==0)f.memoizedState={baseLanes:0,cachePool:null},u!==null&&zf(f,ee!==null?ee.cachePool:null),ee!==null?He(f,ee):tt(),fa(f);else return f.lanes=f.childLanes=536870912,sg(u,f,ee!==null?ee.baseLanes|x:x,x)}else ee!==null?(zf(f,ee.cachePool),He(f,ee),ar(),f.memoizedState=null):(u!==null&&zf(f,null),tt(),ar());return zi(u,f,R,x),f.child}function sg(u,f,x,E){var R=Nl();return R=R===null?null:{parent:bs?an._currentValue:an._currentValue2,pool:R},f.memoizedState={baseLanes:x,cachePool:R},u!==null&&zf(f,null),tt(),fa(f),u!==null&&_o(u,f,E,!0),null}function gu(u,f){var x=f.ref;if(x===null)u!==null&&u.ref!==null&&(f.flags|=2097664);else{if(typeof x!="function"&&typeof x!="object")throw Error(r(284));(u===null||u.ref!==x)&&(f.flags|=2097664)}}function _h(u,f,x,E,R){return So(f),x=Ur(u,f,x,E,void 0,R),E=El(),u!==null&&!ti?(Da(u,f,R),Hs(u,f,R)):(Ft&&E&&te(f),f.flags|=1,zi(u,f,x,R),f.child)}function lg(u,f,x,E,R,D){return So(f),f.updateQueue=null,x=_l(f,E,x,R),Bs(u),E=El(),u!==null&&!ti?(Da(u,f,D),Hs(u,f,D)):(Ft&&E&&te(f),f.flags|=1,zi(u,f,x,D),f.child)}function Sh(u,f,x,E,R){if(So(f),f.stateNode===null){var D=Bo,ee=x.contextType;typeof ee=="object"&&ee!==null&&(D=Bi(ee)),D=new x(E,D),f.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=yd,f.stateNode=D,D._reactInternals=f,D=f.stateNode,D.props=E,D.state=f.memoizedState,D.refs={},yi(f),ee=x.contextType,D.context=typeof ee=="object"&&ee!==null?Bi(ee):Bo,D.state=f.memoizedState,ee=x.getDerivedStateFromProps,typeof ee=="function"&&(Vi(f,x,ee,E),D.state=f.memoizedState),typeof x.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(ee=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),ee!==D.state&&yd.enqueueReplaceState(D,D.state,null),Qn(f,E,D,R),Fi(),D.state=f.memoizedState),typeof D.componentDidMount=="function"&&(f.flags|=4194308),E=!0}else if(u===null){D=f.stateNode;var ie=f.memoizedProps,fe=La(x,ie);D.props=fe;var we=D.context,ke=x.contextType;ee=Bo,typeof ke=="object"&&ke!==null&&(ee=Bi(ke));var Be=x.getDerivedStateFromProps;ke=typeof Be=="function"||typeof D.getSnapshotBeforeUpdate=="function",ie=f.pendingProps!==ie,ke||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(ie||we!==ee)&&hu(f,D,E,ee),Js=!1;var je=f.memoizedState;D.state=je,Qn(f,E,D,R),Fi(),we=f.memoizedState,ie||je!==we||Js?(typeof Be=="function"&&(Vi(f,x,Be,E),we=f.memoizedState),(fe=Js||Al(f,x,fe,E,je,we,ee))?(ke||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(f.flags|=4194308)):(typeof D.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=E,f.memoizedState=we),D.props=E,D.state=we,D.context=ee,E=fe):(typeof D.componentDidMount=="function"&&(f.flags|=4194308),E=!1)}else{D=f.stateNode,rr(u,f),ee=f.memoizedProps,ke=La(x,ee),D.props=ke,Be=f.pendingProps,je=D.context,we=x.contextType,fe=Bo,typeof we=="object"&&we!==null&&(fe=Bi(we)),ie=x.getDerivedStateFromProps,(we=typeof ie=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(ee!==Be||je!==fe)&&hu(f,D,E,fe),Js=!1,je=f.memoizedState,D.state=je,Qn(f,E,D,R),Fi();var ht=f.memoizedState;ee!==Be||je!==ht||Js||u!==null&&u.dependencies!==null&&Rl(u.dependencies)?(typeof ie=="function"&&(Vi(f,x,ie,E),ht=f.memoizedState),(ke=Js||Al(f,x,ke,E,je,ht,fe)||u!==null&&u.dependencies!==null&&Rl(u.dependencies))?(we||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(E,ht,fe),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(E,ht,fe)),typeof D.componentDidUpdate=="function"&&(f.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof D.componentDidUpdate!="function"||ee===u.memoizedProps&&je===u.memoizedState||(f.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||ee===u.memoizedProps&&je===u.memoizedState||(f.flags|=1024),f.memoizedProps=E,f.memoizedState=ht),D.props=E,D.state=ht,D.context=fe,E=ke):(typeof D.componentDidUpdate!="function"||ee===u.memoizedProps&&je===u.memoizedState||(f.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||ee===u.memoizedProps&&je===u.memoizedState||(f.flags|=1024),E=!1)}return D=E,gu(u,f),E=(f.flags&128)!==0,D||E?(D=f.stateNode,x=E&&typeof x.getDerivedStateFromError!="function"?null:D.render(),f.flags|=1,u!==null&&E?(f.child=Zl(f,u.child,null,R),f.child=Zl(f,null,x,R)):zi(u,f,x,R),f.memoizedState=D.state,u=f.child):u=Hs(u,f,R),u}function og(u,f,x,E){return Pe(),f.flags|=256,zi(u,f,x,E),f.child}function Eh(u){return{baseLanes:u,cachePool:hg()}}function wh(u,f,x){return u=u!==null?u.childLanes&~x:0,f&&(u|=Rr),u}function cg(u,f,x){var E=f.pendingProps,R=!1,D=(f.flags&128)!==0,ee;if((ee=D)||(ee=u!==null&&u.memoizedState===null?!1:(ui.current&2)!==0),ee&&(R=!0,f.flags&=-129),ee=(f.flags&32)!==0,f.flags&=-33,u===null){if(Ft){if(R?Gt(f):ar(),Ft){var ie=ji,fe;(fe=ie)&&(ie=Ig(ie,ya),ie!==null?(f.memoizedState={dehydrated:ie,treeContext:Pa!==null?{id:_s,overflow:ga}:null,retryLane:536870912},fe=n(18,null,null,0),fe.stateNode=ie,fe.return=f,f.child=fe,Zi=f,ji=null,fe=!0):fe=!1),fe||pe(f)}if(ie=f.memoizedState,ie!==null&&(ie=ie.dehydrated,ie!==null))return Lu(ie)?f.lanes=16:f.lanes=536870912,null;qi(f)}return ie=E.children,E=E.fallback,R?(ar(),R=f.mode,ie=Th({mode:"hidden",children:ie},R),E=Xs(E,R,x,null),ie.return=f,E.return=f,ie.sibling=E,f.child=ie,R=f.child,R.memoizedState=Eh(x),R.childLanes=wh(u,ee,x),f.memoizedState=Ji,E):(Gt(f),yu(f,ie))}if(fe=u.memoizedState,fe!==null&&(ie=fe.dehydrated,ie!==null)){if(D)f.flags&256?(Gt(f),f.flags&=-257,f=Ch(u,f,x)):f.memoizedState!==null?(ar(),f.child=u.child,f.flags|=128,f=null):(ar(),R=E.fallback,ie=f.mode,E=Th({mode:"visible",children:E.children},ie),R=Xs(R,ie,x,null),R.flags|=2,E.return=f,R.return=f,E.sibling=R,f.child=E,Zl(f,u.child,null,x),E=f.child,E.memoizedState=Eh(x),E.childLanes=wh(u,ee,x),f.memoizedState=Ji,f=R);else if(Gt(f),Lu(ie))ee=kg(ie).digest,E=Error(r(419)),E.stack="",E.digest=ee,Ie({value:E,source:null,stack:null}),f=Ch(u,f,x);else if(ti||_o(u,f,x,!1),ee=(x&u.childLanes)!==0,ti||ee){if(ee=Mt,ee!==null){if(E=x&-x,(E&42)!==0)E=1;else switch(E){case 2:E=1;break;case 8:E=4;break;case 32:E=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:E=64;break;case 268435456:E=134217728;break;default:E=0}if(E=(E&(ee.suspendedLanes|x))!==0?0:E,E!==0&&E!==fe.retryLane)throw fe.retryLane=E,At(u,E),Ki(ee,u,E),Jg}ad(ie)||Sr(),f=Ch(u,f,x)}else ad(ie)?(f.flags|=128,f.child=u.child,f=Mo.bind(null,u),vb(ie,f),f=null):(u=fe.treeContext,dr&&(ji=Bg(ie),Zi=f,Ft=!0,$r=null,ya=!1,u!==null&&(Kr[Wr++]=_s,Kr[Wr++]=ga,Kr[Wr++]=Pa,_s=u.id,ga=u.overflow,Pa=f)),f=yu(f,E.children),f.flags|=4096);return f}return R?(ar(),R=E.fallback,ie=f.mode,fe=u.child,D=fe.sibling,E=Wi(fe,{mode:"hidden",children:E.children}),E.subtreeFlags=fe.subtreeFlags&31457280,D!==null?R=Wi(D,R):(R=Xs(R,ie,x,null),R.flags|=2),R.return=f,E.return=f,E.sibling=R,f.child=E,E=R,R=f.child,ie=u.child.memoizedState,ie===null?ie=Eh(x):(fe=ie.cachePool,fe!==null?(D=bs?an._currentValue:an._currentValue2,fe=fe.parent!==D?{parent:D,pool:D}:fe):fe=hg(),ie={baseLanes:ie.baseLanes|x,cachePool:fe}),R.memoizedState=ie,R.childLanes=wh(u,ee,x),f.memoizedState=Ji,E):(Gt(f),x=u.child,u=x.sibling,x=Wi(x,{mode:"visible",children:E.children}),x.return=f,x.sibling=null,u!==null&&(ee=f.deletions,ee===null?(f.deletions=[u],f.flags|=16):ee.push(u)),f.child=x,f.memoizedState=null,x)}function yu(u,f){return f=Th({mode:"visible",children:f},u.mode),f.return=u,u.child=f}function Th(u,f){return Kf(u,f,0,null)}function Ch(u,f,x){return Zl(f,u.child,null,x),u=yu(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function ug(u,f,x){u.lanes|=f;var E=u.alternate;E!==null&&(E.lanes|=f),Mh(u.return,f,x)}function Of(u,f,x,E,R){var D=u.memoizedState;D===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:E,tail:x,tailMode:R}:(D.isBackwards=f,D.rendering=null,D.renderingStartTime=0,D.last=E,D.tail=x,D.tailMode=R)}function fg(u,f,x){var E=f.pendingProps,R=E.revealOrder,D=E.tail;if(zi(u,f,E.children,x),E=ui.current,(E&2)!==0)E=E&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&ug(u,x,f);else if(u.tag===19)ug(u,x,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break e;for(;u.sibling===null;){if(u.return===null||u.return===f)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}E&=1}switch(k(ui,E),R){case"forwards":for(x=f.child,R=null;x!==null;)u=x.alternate,u!==null&&sr(u)===null&&(R=x),x=x.sibling;x=R,x===null?(R=f.child,f.child=null):(R=x.sibling,x.sibling=null),Of(f,!1,R,x,D);break;case"backwards":for(x=null,R=f.child,f.child=null;R!==null;){if(u=R.alternate,u!==null&&sr(u)===null){f.child=R;break}u=R.sibling,R.sibling=x,x=R,R=u}Of(f,!0,x,null,D);break;case"together":Of(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Hs(u,f,x){if(u!==null&&(f.dependencies=u.dependencies),ta|=f.lanes,(x&f.childLanes)===0)if(u!==null){if(_o(u,f,x,!1),(x&f.childLanes)===0)return null}else return null;if(u!==null&&f.child!==u.child)throw Error(r(153));if(f.child!==null){for(u=f.child,x=Wi(u,u.pendingProps),f.child=x,x.return=f;u.sibling!==null;)u=u.sibling,x=x.sibling=Wi(u,u.pendingProps),x.return=f;x.sibling=null}return f.child}function Ah(u,f){return(u.lanes&f)!==0?!0:(u=u.dependencies,!!(u!==null&&Rl(u)))}function yb(u,f,x){switch(f.tag){case 3:le(f,f.stateNode.containerInfo),Ml(f,an,u.memoizedState.cache),Pe();break;case 27:case 5:ge(f);break;case 4:le(f,f.stateNode.containerInfo);break;case 10:Ml(f,f.type,f.memoizedProps.value);break;case 13:var E=f.memoizedState;if(E!==null)return E.dehydrated!==null?(Gt(f),f.flags|=128,null):(x&f.child.childLanes)!==0?cg(u,f,x):(Gt(f),u=Hs(u,f,x),u!==null?u.sibling:null);Gt(f);break;case 19:var R=(u.flags&128)!==0;if(E=(x&f.childLanes)!==0,E||(_o(u,f,x,!1),E=(x&f.childLanes)!==0),R){if(E)return fg(u,f,x);f.flags|=128}if(R=f.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),k(ui,ui.current),E)break;return null;case 22:case 23:return f.lanes=0,ag(u,f,x);case 24:Ml(f,an,u.memoizedState.cache)}return Hs(u,f,x)}function dg(u,f,x){if(u!==null)if(u.memoizedProps!==f.pendingProps)ti=!0;else{if(!Ah(u,x)&&(f.flags&128)===0)return ti=!1,yb(u,f,x);ti=(u.flags&131072)!==0}else ti=!1,Ft&&(f.flags&1048576)!==0&&K(f,Gu,f.index);switch(f.lanes=0,f.tag){case 16:e:{u=f.pendingProps;var E=f.elementType,R=E._init;if(E=R(E._payload),f.type=E,typeof E=="function")Ys(E)?(u=La(E,u),f.tag=1,f=Sh(null,f,E,u,x)):(f.tag=0,f=_h(null,f,E,u,x));else{if(E!=null){if(R=E.$$typeof,R===Ac){f.tag=11,f=ig(null,f,E,u,x);break e}else if(R===Mu){f.tag=14,f=rg(null,f,E,u,x);break e}}throw f=l(E)||E,Error(r(306,f,""))}}return f;case 0:return _h(u,f,f.type,f.pendingProps,x);case 1:return E=f.type,R=La(E,f.pendingProps),Sh(u,f,E,R,x);case 3:e:{if(le(f,f.stateNode.containerInfo),u===null)throw Error(r(387));var D=f.pendingProps;R=f.memoizedState,E=R.element,rr(u,f),Qn(f,D,null,x);var ee=f.memoizedState;if(D=ee.cache,Ml(f,an,D),D!==R.cache&&Rh(f,[an],x,!0),Fi(),D=ee.element,dr&&R.isDehydrated)if(R={element:D,isDehydrated:!1,cache:ee.cache},f.updateQueue.baseState=R,f.memoizedState=R,f.flags&256){f=og(u,f,D,x);break e}else if(D!==E){E=Q(Error(r(424)),f),Ie(E),f=og(u,f,D,x);break e}else for(dr&&(ji=zg(f.stateNode.containerInfo),Zi=f,Ft=!0,$r=null,ya=!0),x=Rp(f,null,D,x),f.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(Pe(),D===E){f=Hs(u,f,x);break e}zi(u,f,D,x)}f=f.child}return f;case 26:if(Vr)return gu(u,f),u===null?(x=ud(f.type,null,f.pendingProps,null))?f.memoizedState=x:Ft||(f.stateNode=Sb(f.type,f.pendingProps,Ga.current,f)):f.memoizedState=ud(f.type,u.memoizedProps,f.pendingProps,u.memoizedState),null;case 27:if(Ii)return ge(f),u===null&&Ii&&Ft&&(E=f.stateNode=Tp(f.type,f.pendingProps,Ga.current,Ni.current,!1),Zi=f,ya=!0,ji=sd(E)),E=f.pendingProps.children,u!==null||Ft?zi(u,f,E,x):f.child=Zl(f,null,E,x),gu(u,f),f.child;case 5:return u===null&&Ft&&(Fg(f.type,f.pendingProps,Ni.current),(R=E=ji)&&(E=Lg(E,f.type,f.pendingProps,ya),E!==null?(f.stateNode=E,Zi=f,ji=sd(E),ya=!1,R=!0):R=!1),R||pe(f)),ge(f),R=f.type,D=f.pendingProps,ee=u!==null?u.memoizedProps:null,E=D.children,Vl(R,D)?E=null:ee!==null&&Vl(R,ee)&&(f.flags|=32),f.memoizedState!==null&&(R=Ur(u,f,Sl,null,null,x),bs?ot._currentValue=R:ot._currentValue2=R),gu(u,f),zi(u,f,E,x),f.child;case 6:return u===null&&Ft&&(qg(f.pendingProps,Ni.current),(u=x=ji)&&(x=Ug(x,f.pendingProps,ya),x!==null?(f.stateNode=x,Zi=f,ji=null,u=!0):u=!1),u||pe(f)),null;case 13:return cg(u,f,x);case 4:return le(f,f.stateNode.containerInfo),E=f.pendingProps,u===null?f.child=Zl(f,null,E,x):zi(u,f,E,x),f.child;case 11:return ig(u,f,f.type,f.pendingProps,x);case 7:return zi(u,f,f.pendingProps,x),f.child;case 8:return zi(u,f,f.pendingProps.children,x),f.child;case 12:return zi(u,f,f.pendingProps.children,x),f.child;case 10:return E=f.pendingProps,Ml(f,f.type,E.value),zi(u,f,E.children,x),f.child;case 9:return R=f.type._context,E=f.pendingProps.children,So(f),R=Bi(R),E=E(R),f.flags|=1,zi(u,f,E,x),f.child;case 14:return rg(u,f,f.type,f.pendingProps,x);case 15:return kf(u,f,f.type,f.pendingProps,x);case 19:return fg(u,f,x);case 22:return ag(u,f,x);case 24:return So(f),E=Bi(an),u===null?(R=Nl(),R===null&&(R=Mt,D=Df(),R.pooledCache=D,D.refCount++,D!==null&&(R.pooledCacheLanes|=x),R=D),f.memoizedState={parent:E,cache:R},yi(f),Ml(f,an,R)):((u.lanes&x)!==0&&(rr(u,f),Qn(f,null,null,x),Fi()),R=u.memoizedState,D=f.memoizedState,R.parent!==E?(R={parent:E,cache:E},f.memoizedState=R,f.lanes===0&&(f.memoizedState=f.updateQueue.baseState=R),Ml(f,an,E)):(E=D.cache,Ml(f,an,E),E!==R.cache&&Rh(f,[an],x,!0))),zi(u,f,f.pendingProps.children,x),f.child;case 29:throw f.pendingProps}throw Error(r(156,f.tag))}function Ml(u,f,x){bs?(k(Ar,f._currentValue),f._currentValue=x):(k(Ar,f._currentValue2),f._currentValue2=x)}function js(u){var f=Ar.current;bs?u._currentValue=f:u._currentValue2=f,w(Ar)}function Mh(u,f,x){for(;u!==null;){var E=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,E!==null&&(E.childLanes|=f)):E!==null&&(E.childLanes&f)!==f&&(E.childLanes|=f),u===x)break;u=u.return}}function Rh(u,f,x,E){var R=u.child;for(R!==null&&(R.return=u);R!==null;){var D=R.dependencies;if(D!==null){var ee=R.child;D=D.firstContext;e:for(;D!==null;){var ie=D;D=R;for(var fe=0;fe<f.length;fe++)if(ie.context===f[fe]){D.lanes|=x,ie=D.alternate,ie!==null&&(ie.lanes|=x),Mh(D.return,x,u),E||(ee=null);break e}D=ie.next}}else if(R.tag===18){if(ee=R.return,ee===null)throw Error(r(341));ee.lanes|=x,D=ee.alternate,D!==null&&(D.lanes|=x),Mh(ee,x,u),ee=null}else ee=R.child;if(ee!==null)ee.return=R;else for(ee=R;ee!==null;){if(ee===u){ee=null;break}if(R=ee.sibling,R!==null){R.return=ee.return,ee=R;break}ee=ee.return}R=ee}}function _o(u,f,x,E){u=null;for(var R=f,D=!1;R!==null;){if(!D){if((R.flags&524288)!==0)D=!0;else if((R.flags&262144)!==0)break}if(R.tag===10){var ee=R.alternate;if(ee===null)throw Error(r(387));if(ee=ee.memoizedProps,ee!==null){var ie=R.type;Xr(R.pendingProps.value,ee.value)||(u!==null?u.push(ie):u=[ie])}}else if(R===zc.current){if(ee=R.alternate,ee===null)throw Error(r(387));ee.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(u!==null?u.push(ot):u=[ot])}R=R.return}u!==null&&Rh(f,u,x,E),f.flags|=262144}function Rl(u){for(u=u.firstContext;u!==null;){var f=u.context;if(!Xr(bs?f._currentValue:f._currentValue2,u.memoizedValue))return!0;u=u.next}return!1}function So(u){Jl=u,Xn=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function Bi(u){return Nh(Jl,u)}function bu(u,f){return Jl===null&&So(u),Nh(u,f)}function Nh(u,f){var x=bs?f._currentValue:f._currentValue2;if(f={context:f,memoizedValue:x,next:null},Xn===null){if(u===null)throw Error(r(308));Xn=f,u.dependencies={lanes:0,firstContext:f},u.flags|=524288}else Xn=Xn.next=f;return x}function Df(){return{controller:new ey,data:new Map,refCount:0}}function dc(u){u.refCount--,u.refCount===0&&tl(Io,function(){u.controller.abort()})}function Nl(){var u=nl.current;return u!==null?u:Mt.pooledCache}function zf(u,f){f===null?k(nl,nl.current):k(nl,f.pool)}function hg(){var u=Nl();return u===null?null:{parent:bs?an._currentValue:an._currentValue2,pool:u}}function Pr(u){u.flags|=4}function kh(u,f){if(u!==null&&u.child===f.child)return!1;if((f.flags&16)!==0)return!0;for(u=f.child;u!==null;){if((u.flags&13878)!==0||(u.subtreeFlags&13878)!==0)return!0;u=u.sibling}return!1}function Bf(u,f,x,E){if(Ui)for(x=f.child;x!==null;){if(x.tag===5||x.tag===6)ys(u,x.stateNode);else if(!(x.tag===4||Ii&&x.tag===27)&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===f)break;for(;x.sibling===null;){if(x.return===null||x.return===f)return;x=x.return}x.sibling.return=x.return,x=x.sibling}else if(qr)for(var R=f.child;R!==null;){if(R.tag===5){var D=R.stateNode;x&&E&&(D=dp(D,R.type,R.memoizedProps)),ys(u,D)}else if(R.tag===6)D=R.stateNode,x&&E&&(D=hp(D,R.memoizedProps)),ys(u,D);else if(R.tag!==4){if(R.tag===22&&R.memoizedState!==null)D=R.child,D!==null&&(D.return=R),Bf(u,R,!0,!0);else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===f)break;for(;R.sibling===null;){if(R.return===null||R.return===f)return;R=R.return}R.sibling.return=R.return,R=R.sibling}}function hc(u,f,x,E){if(qr)for(var R=f.child;R!==null;){if(R.tag===5){var D=R.stateNode;x&&E&&(D=dp(D,R.type,R.memoizedProps)),up(u,D)}else if(R.tag===6)D=R.stateNode,x&&E&&(D=hp(D,R.memoizedProps)),up(u,D);else if(R.tag!==4){if(R.tag===22&&R.memoizedState!==null)D=R.child,D!==null&&(D.return=R),hc(u,R,!(R.memoizedProps!==null&&R.memoizedProps.mode==="manual"),!0);else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===f)break;for(;R.sibling===null;){if(R.return===null||R.return===f)return;R=R.return}R.sibling.return=R.return,R=R.sibling}}function pc(u,f){if(qr&&kh(u,f)){u=f.stateNode;var x=u.containerInfo,E=rd();hc(E,f,!1,!1),u.pendingChildren=E,Pr(f),Ng(x,E)}}function Oh(u,f,x,E){if(Ui)u.memoizedProps!==E&&Pr(f);else if(qr){var R=u.stateNode,D=u.memoizedProps;if((u=kh(u,f))||D!==E){var ee=Ni.current;D=cp(R,x,D,E,!u,null),D===R?f.stateNode=R:(Ws(D,x,E,ee)&&Pr(f),f.stateNode=D,u?Bf(D,f,!1,!1):Pr(f))}else f.stateNode=R}}function mc(u,f,x){if(Ag(f,x)){if(u.flags|=16777216,!$s(f,x))if(wu())u.flags|=8192;else throw Uo=md,Mp}else u.flags&=-16777217}function Dh(u,f){if(Yg(f)){if(u.flags|=16777216,!Ep(f))if(wu())u.flags|=8192;else throw Uo=md,Mp}else u.flags&=-16777217}function xu(u,f){f!==null&&(u.flags|=4),u.flags&16384&&(f=u.tag!==22?j():536870912,u.lanes|=f,rl|=f)}function Eo(u,f){if(!Ft)switch(u.tailMode){case"hidden":f=u.tail;for(var x=null;f!==null;)f.alternate!==null&&(x=f),f=f.sibling;x===null?u.tail=null:x.sibling=null;break;case"collapsed":x=u.tail;for(var E=null;x!==null;)x.alternate!==null&&(E=x),x=x.sibling;E===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:E.sibling=null}}function Mn(u){var f=u.alternate!==null&&u.alternate.child===u.child,x=0,E=0;if(f)for(var R=u.child;R!==null;)x|=R.lanes|R.childLanes,E|=R.subtreeFlags&31457280,E|=R.flags&31457280,R.return=u,R=R.sibling;else for(R=u.child;R!==null;)x|=R.lanes|R.childLanes,E|=R.subtreeFlags,E|=R.flags,R.return=u,R=R.sibling;return u.subtreeFlags|=E,u.childLanes=x,f}function pg(u,f,x){var E=f.pendingProps;switch(U(f),f.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(f),null;case 1:return Mn(f),null;case 3:return x=f.stateNode,E=null,u!==null&&(E=u.memoizedState.cache),f.memoizedState.cache!==E&&(f.flags|=2048),js(an),de(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(u===null||u.child===null)&&(Ge(f)?Pr(f):u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,$r!==null&&(Gs($r),$r=null))),pc(u,f),Mn(f),null;case 26:if(Vr){x=f.type;var R=f.memoizedState;return u===null?(Pr(f),R!==null?(Mn(f),Dh(f,R)):(Mn(f),mc(f,x,E))):R?R!==u.memoizedState?(Pr(f),Mn(f),Dh(f,R)):(Mn(f),f.flags&=-16777217):(Ui?u.memoizedProps!==E&&Pr(f):Oh(u,f,x,E),Mn(f),mc(f,x,E)),null}case 27:if(Ii){if(se(f),x=Ga.current,R=f.type,u!==null&&f.stateNode!=null)Ui?u.memoizedProps!==E&&Pr(f):Oh(u,f,R,E);else{if(!E){if(f.stateNode===null)throw Error(r(166));return Mn(f),null}u=Ni.current,Ge(f)?Ae(f,u):(u=Tp(R,E,x,u,!0),f.stateNode=u,Pr(f))}return Mn(f),null}case 5:if(se(f),x=f.type,u!==null&&f.stateNode!=null)Oh(u,f,x,E);else{if(!E){if(f.stateNode===null)throw Error(r(166));return Mn(f),null}u=Ni.current,Ge(f)?Ae(f,u):(R=Qh(x,E,Ga.current,u,f),Bf(R,f,!1,!1),f.stateNode=R,Ws(R,x,E,u)&&Pr(f))}return Mn(f),mc(f,f.type,f.pendingProps),null;case 6:if(u&&f.stateNode!=null)x=u.memoizedProps,Ui?x!==E&&Pr(f):qr&&(x!==E?(f.stateNode=Qf(E,Ga.current,Ni.current,f),Pr(f)):f.stateNode=u.stateNode);else{if(typeof E!="string"&&f.stateNode===null)throw Error(r(166));if(u=Ga.current,x=Ni.current,Ge(f)){if(!dr)throw Error(r(176));if(u=f.stateNode,x=f.memoizedProps,E=null,R=Zi,R!==null)switch(R.tag){case 27:case 5:E=R.memoizedProps}Hg(u,x,f,E)||pe(f)}else f.stateNode=Qf(E,u,x,f)}return Mn(f),null;case 13:if(E=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(R=Ge(f),E!==null&&E.dehydrated!==null){if(u===null){if(!R)throw Error(r(318));if(!dr)throw Error(r(344));if(R=f.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));Rc(R,f)}else Pe(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Mn(f),R=!1}else $r!==null&&(Gs($r),$r=null),R=!0;if(!R)return f.flags&256?(qi(f),f):(qi(f),null)}if(qi(f),(f.flags&128)!==0)return f.lanes=x,f;if(x=E!==null,u=u!==null&&u.memoizedState!==null,x){E=f.child,R=null,E.alternate!==null&&E.alternate.memoizedState!==null&&E.alternate.memoizedState.cachePool!==null&&(R=E.alternate.memoizedState.cachePool.pool);var D=null;E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(D=E.memoizedState.cachePool.pool),D!==R&&(E.flags|=2048)}return x!==u&&x&&(f.child.flags|=8192),xu(f,f.updateQueue),Mn(f),null;case 4:return de(),pc(u,f),u===null&&tp(f.stateNode.containerInfo),Mn(f),null;case 10:return js(f.type),Mn(f),null;case 19:if(w(ui),R=f.memoizedState,R===null)return Mn(f),null;if(E=(f.flags&128)!==0,D=R.rendering,D===null)if(E)Eo(R,!1);else{if(It!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(D=sr(u),D!==null){for(f.flags|=128,Eo(R,!1),u=D.updateQueue,f.updateQueue=u,xu(f,u),f.subtreeFlags=0,u=x,x=f.child;x!==null;)Vs(x,u),x=x.sibling;return k(ui,ui.current&1|2),f.child}u=u.sibling}R.tail!==null&&Hi()>Pn&&(f.flags|=128,E=!0,Eo(R,!1),f.lanes=4194304)}else{if(!E)if(u=sr(D),u!==null){if(f.flags|=128,E=!0,u=u.updateQueue,f.updateQueue=u,xu(f,u),Eo(R,!0),R.tail===null&&R.tailMode==="hidden"&&!D.alternate&&!Ft)return Mn(f),null}else 2*Hi()-R.renderingStartTime>Pn&&x!==536870912&&(f.flags|=128,E=!0,Eo(R,!1),f.lanes=4194304);R.isBackwards?(D.sibling=f.child,f.child=D):(u=R.last,u!==null?u.sibling=D:f.child=D,R.last=D)}return R.tail!==null?(f=R.tail,R.rendering=f,R.tail=f.sibling,R.renderingStartTime=Hi(),f.sibling=null,u=ui.current,k(ui,E?u&1|2:u&1),f):(Mn(f),null);case 22:case 23:return qi(f),Cn(),E=f.memoizedState!==null,u!==null?u.memoizedState!==null!==E&&(f.flags|=8192):E&&(f.flags|=8192),E?(x&536870912)!==0&&(f.flags&128)===0&&(Mn(f),f.subtreeFlags&6&&(f.flags|=8192)):Mn(f),x=f.updateQueue,x!==null&&xu(f,x.retryQueue),x=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),E=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(E=f.memoizedState.cachePool.pool),E!==x&&(f.flags|=2048),u!==null&&w(nl),null;case 24:return x=null,u!==null&&(x=u.memoizedState.cache),f.memoizedState.cache!==x&&(f.flags|=2048),js(an),Mn(f),null;case 25:return null}throw Error(r(156,f.tag))}function mg(u,f){switch(U(f),f.tag){case 1:return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return js(an),de(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 26:case 27:case 5:return se(f),null;case 13:if(qi(f),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(r(340));Pe()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return w(ui),null;case 4:return de(),null;case 10:return js(f.type),null;case 22:case 23:return qi(f),Cn(),u!==null&&w(nl),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 24:return js(an),null;case 25:return null;default:return null}}function zh(u,f){switch(U(f),f.tag){case 3:js(an),de();break;case 26:case 27:case 5:se(f);break;case 4:de();break;case 13:qi(f);break;case 19:w(ui);break;case 10:js(f.type);break;case 22:case 23:qi(f),Cn(),u!==null&&w(nl);break;case 24:js(an)}}function vu(u,f){try{var x=f.updateQueue,E=x!==null?x.lastEffect:null;if(E!==null){var R=E.next;x=R;do{if((x.tag&u)===u){E=void 0;var D=x.create,ee=x.inst;E=D(),ee.destroy=E}x=x.next}while(x!==R)}}catch(ie){Ot(f,f.return,ie)}}function kl(u,f,x){try{var E=f.updateQueue,R=E!==null?E.lastEffect:null;if(R!==null){var D=R.next;E=D;do{if((E.tag&u)===u){var ee=E.inst,ie=ee.destroy;if(ie!==void 0){ee.destroy=void 0,R=f;var fe=x;try{ie()}catch(we){Ot(R,fe,we)}}}E=E.next}while(E!==D)}}catch(we){Ot(f,f.return,we)}}function gg(u){var f=u.updateQueue;if(f!==null){var x=u.stateNode;try{rs(f,x)}catch(E){Ot(u,u.return,E)}}}function yg(u,f,x){x.props=La(u.type,u.memoizedProps),x.state=u.memoizedState;try{x.componentWillUnmount()}catch(E){Ot(u,f,E)}}function wo(u,f){try{var x=u.ref;if(x!==null){var E=u.stateNode;switch(u.tag){case 26:case 27:case 5:var R=Mc(E);break;default:R=E}typeof x=="function"?u.refCleanup=x(R):x.current=R}}catch(D){Ot(u,f,D)}}function Rn(u,f){var x=u.ref,E=u.refCleanup;if(x!==null)if(typeof E=="function")try{E()}catch(R){Ot(u,f,R)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof x=="function")try{x(null)}catch(R){Ot(u,f,R)}else x.current=null}function gc(u){var f=u.type,x=u.memoizedProps,E=u.stateNode;try{xb(E,f,x,u)}catch(R){Ot(u,u.return,R)}}function Bh(u,f,x){try{ap(u.stateNode,u.type,x,f,u)}catch(E){Ot(u,u.return,E)}}function Lh(u){return u.tag===5||u.tag===3||(Vr?u.tag===26:!1)||(Ii?u.tag===27:!1)||u.tag===4}function Lf(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Lh(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&(!Ii||u.tag!==27)&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Uf(u,f,x){var E=u.tag;if(E===5||E===6)u=u.stateNode,f?lp(x,u,f):Mg(x,u);else if(!(E===4||Ii&&E===27)&&(u=u.child,u!==null))for(Uf(u,f,x),u=u.sibling;u!==null;)Uf(u,f,x),u=u.sibling}function yc(u,f,x){var E=u.tag;if(E===5||E===6)u=u.stateNode,f?sp(x,u,f):rp(x,u);else if(!(E===4||Ii&&E===27)&&(u=u.child,u!==null))for(yc(u,f,x),u=u.sibling;u!==null;)yc(u,f,x),u=u.sibling}function bg(u,f,x){u=u.containerInfo;try{fp(u,x)}catch(E){Ot(f,f.return,E)}}function bc(u,f){for(Yl(u.containerInfo),Kn=f;Kn!==null;)if(u=Kn,f=u.child,(u.subtreeFlags&1028)!==0&&f!==null)f.return=u,Kn=f;else for(;Kn!==null;){u=Kn;var x=u.alternate;switch(f=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((f&1024)!==0&&x!==null){f=void 0;var E=u,R=x.memoizedProps;x=x.memoizedState;var D=E.stateNode;try{var ee=La(E.type,R,E.elementType===E.type);f=D.getSnapshotBeforeUpdate(ee,x),D.__reactInternalSnapshotBeforeUpdate=f}catch(ie){Ot(E,E.return,ie)}}break;case 3:(f&1024)!==0&&Ui&&id(u.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((f&1024)!==0)throw Error(r(163))}if(f=u.sibling,f!==null){f.return=u.return,Kn=f;break}Kn=u.return}return ee=Ho,Ho=!1,ee}function If(u,f,x){var E=x.flags;switch(x.tag){case 0:case 11:case 15:fs(u,x),E&4&&vu(5,x);break;case 1:if(fs(u,x),E&4)if(u=x.stateNode,f===null)try{u.componentDidMount()}catch(ie){Ot(x,x.return,ie)}else{var R=La(x.type,f.memoizedProps);f=f.memoizedState;try{u.componentDidUpdate(R,f,u.__reactInternalSnapshotBeforeUpdate)}catch(ie){Ot(x,x.return,ie)}}E&64&&gg(x),E&512&&wo(x,x.return);break;case 3:if(fs(u,x),E&64&&(E=x.updateQueue,E!==null)){if(u=null,x.child!==null)switch(x.child.tag){case 27:case 5:u=Mc(x.child.stateNode);break;case 1:u=x.child.stateNode}try{rs(E,u)}catch(ie){Ot(x,x.return,ie)}}break;case 26:if(Vr){fs(u,x),E&512&&wo(x,x.return);break}case 27:case 5:fs(u,x),f===null&&E&4&&gc(x),E&512&&wo(x,x.return);break;case 12:fs(u,x);break;case 13:fs(u,x),E&4&&Ol(u,x);break;case 22:if(R=x.memoizedState!==null||_i,!R){f=f!==null&&f.memoizedState!==null||jn;var D=_i,ee=jn;_i=R,(jn=f)&&!ee?zl(u,x,(x.subtreeFlags&8772)!==0):fs(u,x),_i=D,jn=ee}E&512&&(x.memoizedProps.mode==="manual"?wo(x,x.return):Rn(x,x.return));break;default:fs(u,x)}}function xc(u){var f=u.alternate;f!==null&&(u.alternate=null,xc(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&np(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Gr(u,f,x){for(x=x.child;x!==null;)Hf(u,f,x),x=x.sibling}function Hf(u,f,x){if(Tr&&typeof Tr.onCommitFiberUnmount=="function")try{Tr.onCommitFiberUnmount(Dc,x)}catch{}switch(x.tag){case 26:if(Vr){jn||Rn(x,f),Gr(u,f,x),x.memoizedState?bp(x.memoizedState):x.stateNode&&_p(x.stateNode);break}case 27:if(Ii){jn||Rn(x,f);var E=ni,R=Mr;ni=x.stateNode,Gr(u,f,x),Vg(x.stateNode),ni=E,Mr=R;break}case 5:jn||Rn(x,f);case 6:if(Ui){if(E=ni,R=Mr,ni=null,Gr(u,f,x),ni=E,Mr=R,ni!==null)if(Mr)try{Jn(ni,x.stateNode)}catch(D){Ot(x,f,D)}else try{hr(ni,x.stateNode)}catch(D){Ot(x,f,D)}}else Gr(u,f,x);break;case 18:Ui&&ni!==null&&(Mr?mp(ni,x.stateNode):Pg(ni,x.stateNode));break;case 4:Ui?(E=ni,R=Mr,ni=x.stateNode.containerInfo,Mr=!0,Gr(u,f,x),ni=E,Mr=R):(qr&&bg(x.stateNode,x,rd()),Gr(u,f,x));break;case 0:case 11:case 14:case 15:jn||kl(2,x,f),jn||kl(4,x,f),Gr(u,f,x);break;case 1:jn||(Rn(x,f),E=x.stateNode,typeof E.componentWillUnmount=="function"&&yg(x,f,E)),Gr(u,f,x);break;case 21:Gr(u,f,x);break;case 22:jn||Rn(x,f),jn=(E=jn)||x.memoizedState!==null,Gr(u,f,x),jn=E;break;default:Gr(u,f,x)}}function Ol(u,f){if(dr&&f.memoizedState===null&&(u=f.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{od(u)}catch(x){Ot(f,f.return,x)}}function vc(u){switch(u.tag){case 13:case 19:var f=u.stateNode;return f===null&&(f=u.stateNode=new Hc),f;case 22:return u=u.stateNode,f=u._retryCache,f===null&&(f=u._retryCache=new Hc),f;default:throw Error(r(435,u.tag))}}function _u(u,f){var x=vc(u);f.forEach(function(E){var R=Ph.bind(null,u,E);x.has(E)||(x.add(E),E.then(R,R))})}function cr(u,f){var x=f.deletions;if(x!==null)for(var E=0;E<x.length;E++){var R=x[E],D=u,ee=f;if(Ui){var ie=ee;e:for(;ie!==null;){switch(ie.tag){case 27:case 5:ni=ie.stateNode,Mr=!1;break e;case 3:ni=ie.stateNode.containerInfo,Mr=!0;break e;case 4:ni=ie.stateNode.containerInfo,Mr=!0;break e}ie=ie.return}if(ni===null)throw Error(r(160));Hf(D,ee,R),ni=null,Mr=!1}else Hf(D,ee,R);D=R.alternate,D!==null&&(D.return=null),R.return=null}if(f.subtreeFlags&13878)for(f=f.child;f!==null;)Dl(f,u),f=f.sibling}function Dl(u,f){var x=u.alternate,E=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:cr(f,u),vr(u),E&4&&(kl(3,u,u.return),vu(3,u),kl(5,u,u.return));break;case 1:cr(f,u),vr(u),E&512&&(jn||x===null||Rn(x,x.return)),E&64&&_i&&(u=u.updateQueue,u!==null&&(E=u.callbacks,E!==null&&(x=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=x===null?E:x.concat(E))));break;case 26:if(Vr){var R=pr;cr(f,u),vr(u),E&512&&(jn||x===null||Rn(x,x.return)),E&4&&(E=x!==null?x.memoizedState:null,f=u.memoizedState,x===null?f===null?u.stateNode===null?u.stateNode=xp(R,u.type,u.memoizedProps,u):vp(R,u.type,u.stateNode):u.stateNode=yp(R,f,u.memoizedProps):E!==f?(E===null?x.stateNode!==null&&_p(x.stateNode):bp(E),f===null?vp(R,u.type,u.stateNode):yp(R,f,u.memoizedProps)):f===null&&u.stateNode!==null&&Bh(u,u.memoizedProps,x.memoizedProps));break}case 27:if(Ii&&E&4&&u.alternate===null){R=u.stateNode;var D=u.memoizedProps;try{Eb(R),wb(u.type,D,R,u)}catch(ke){Ot(u,u.return,ke)}}case 5:if(cr(f,u),vr(u),E&512&&(jn||x===null||Rn(x,x.return)),Ui){if(u.flags&32){f=u.stateNode;try{zu(f)}catch(ke){Ot(u,u.return,ke)}}E&4&&u.stateNode!=null&&(f=u.memoizedProps,Bh(u,f,x!==null?x.memoizedProps:f)),E&1024&&(eo=!0)}break;case 6:if(cr(f,u),vr(u),E&4&&Ui){if(u.stateNode===null)throw Error(r(162));E=u.memoizedProps,x=x!==null?x.memoizedProps:E,f=u.stateNode;try{Rg(f,x,E)}catch(ke){Ot(u,u.return,ke)}}break;case 3:if(Vr?(Sp(),R=pr,pr=cd(f.containerInfo),cr(f,u),pr=R):cr(f,u),vr(u),E&4){if(Ui&&dr&&x!==null&&x.memoizedState.isDehydrated)try{ld(f.containerInfo)}catch(ke){Ot(u,u.return,ke)}if(qr){E=f.containerInfo,x=f.pendingChildren;try{fp(E,x)}catch(ke){Ot(u,u.return,ke)}}}eo&&(eo=!1,Uh(u));break;case 4:Vr?(x=pr,pr=cd(u.stateNode.containerInfo),cr(f,u),vr(u),pr=x):(cr(f,u),vr(u)),E&4&&qr&&bg(u.stateNode,u,u.stateNode.pendingChildren);break;case 12:cr(f,u),vr(u);break;case 13:cr(f,u),vr(u),u.child.flags&8192&&u.memoizedState!==null!=(x!==null&&x.memoizedState!==null)&&(Ts=Hi()),E&4&&(E=u.updateQueue,E!==null&&(u.updateQueue=null,_u(u,E)));break;case 22:E&512&&(jn||x===null||Rn(x,x.return)),R=u.memoizedState!==null;var ee=x!==null&&x.memoizedState!==null,ie=_i,fe=jn;if(_i=ie||R,jn=fe||ee,cr(f,u),jn=fe,_i=ie,vr(u),f=u.stateNode,f._current=u,f._visibility&=-3,f._visibility|=f._pendingVisibility&2,E&8192&&(f._visibility=R?f._visibility&-2:f._visibility|1,R&&(f=_i||jn,x===null||ee||f||_c(u)),Ui&&(u.memoizedProps===null||u.memoizedProps.mode!=="manual"))){e:if(x=null,Ui)for(f=u;;){if(f.tag===5||Vr&&f.tag===26||Ii&&f.tag===27){if(x===null){ee=x=f;try{D=ee.stateNode,R?Bu(D):op(ee.stateNode,ee.memoizedProps)}catch(ke){Ot(ee,ee.return,ke)}}}else if(f.tag===6){if(x===null){ee=f;try{var we=ee.stateNode;R?nd(we):Zs(we,ee.memoizedProps)}catch(ke){Ot(ee,ee.return,ke)}}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===u)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break e;for(;f.sibling===null;){if(f.return===null||f.return===u)break e;x===f&&(x=null),f=f.return}x===f&&(x=null),f.sibling.return=f.return,f=f.sibling}}E&4&&(E=u.updateQueue,E!==null&&(x=E.retryQueue,x!==null&&(E.retryQueue=null,_u(u,x))));break;case 19:cr(f,u),vr(u),E&4&&(E=u.updateQueue,E!==null&&(u.updateQueue=null,_u(u,E)));break;case 21:break;default:cr(f,u),vr(u)}}function vr(u){var f=u.flags;if(f&2){try{if(Ui&&(!Ii||u.tag!==27)){e:{for(var x=u.return;x!==null;){if(Lh(x)){var E=x;break e}x=x.return}throw Error(r(160))}switch(E.tag){case 27:if(Ii){var R=E.stateNode,D=Lf(u);yc(u,D,R);break}case 5:var ee=E.stateNode;E.flags&32&&(zu(ee),E.flags&=-33);var ie=Lf(u);yc(u,ie,ee);break;case 3:case 4:var fe=E.stateNode.containerInfo,we=Lf(u);Uf(u,we,fe);break;default:throw Error(r(161))}}}catch(ke){Ot(u,u.return,ke)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function Uh(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var f=u;Uh(f),f.tag===5&&f.flags&1024&&pn(f.stateNode),u=u.sibling}}function fs(u,f){if(f.subtreeFlags&8772)for(f=f.child;f!==null;)If(u,f.alternate,f),f=f.sibling}function _c(u){for(u=u.child;u!==null;){var f=u;switch(f.tag){case 0:case 11:case 14:case 15:kl(4,f,f.return),_c(f);break;case 1:Rn(f,f.return);var x=f.stateNode;typeof x.componentWillUnmount=="function"&&yg(f,f.return,x),_c(f);break;case 26:case 27:case 5:Rn(f,f.return),_c(f);break;case 22:Rn(f,f.return),f.memoizedState===null&&_c(f);break;default:_c(f)}u=u.sibling}}function zl(u,f,x){for(x=x&&(f.subtreeFlags&8772)!==0,f=f.child;f!==null;){var E=f.alternate,R=u,D=f,ee=D.flags;switch(D.tag){case 0:case 11:case 15:zl(R,D,x),vu(4,D);break;case 1:if(zl(R,D,x),E=D,R=E.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(we){Ot(E,E.return,we)}if(E=D,R=E.updateQueue,R!==null){var ie=E.stateNode;try{var fe=R.shared.hiddenCallbacks;if(fe!==null)for(R.shared.hiddenCallbacks=null,R=0;R<fe.length;R++)go(fe[R],ie)}catch(we){Ot(E,E.return,we)}}x&&ee&64&&gg(D),wo(D,D.return);break;case 26:case 27:case 5:zl(R,D,x),x&&E===null&&ee&4&&gc(D),wo(D,D.return);break;case 12:zl(R,D,x);break;case 13:zl(R,D,x),x&&ee&4&&Ol(R,D);break;case 22:D.memoizedState===null&&zl(R,D,x),wo(D,D.return);break;default:zl(R,D,x)}f=f.sibling}}function Ih(u,f){var x=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),u=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(u=f.memoizedState.cachePool.pool),u!==x&&(u!=null&&u.refCount++,x!=null&&dc(x))}function jf(u,f){u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&dc(u))}function Ps(u,f,x,E){if(f.subtreeFlags&10256)for(f=f.child;f!==null;)Pf(u,f,x,E),f=f.sibling}function Pf(u,f,x,E){var R=f.flags;switch(f.tag){case 0:case 11:case 15:Ps(u,f,x,E),R&2048&&vu(9,f);break;case 3:Ps(u,f,x,E),R&2048&&(u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&dc(u)));break;case 12:if(R&2048){Ps(u,f,x,E),u=f.stateNode;try{var D=f.memoizedProps,ee=D.id,ie=D.onPostCommit;typeof ie=="function"&&ie(ee,f.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(fe){Ot(f,f.return,fe)}}else Ps(u,f,x,E);break;case 23:break;case 22:D=f.stateNode,f.memoizedState!==null?D._visibility&4?Ps(u,f,x,E):Bl(u,f):D._visibility&4?Ps(u,f,x,E):(D._visibility|=4,Xi(u,f,x,E,(f.subtreeFlags&10256)!==0)),R&2048&&Ih(f.alternate,f);break;case 24:Ps(u,f,x,E),R&2048&&jf(f.alternate,f);break;default:Ps(u,f,x,E)}}function Xi(u,f,x,E,R){for(R=R&&(f.subtreeFlags&10256)!==0,f=f.child;f!==null;){var D=u,ee=f,ie=x,fe=E,we=ee.flags;switch(ee.tag){case 0:case 11:case 15:Xi(D,ee,ie,fe,R),vu(8,ee);break;case 23:break;case 22:var ke=ee.stateNode;ee.memoizedState!==null?ke._visibility&4?Xi(D,ee,ie,fe,R):Bl(D,ee):(ke._visibility|=4,Xi(D,ee,ie,fe,R)),R&&we&2048&&Ih(ee.alternate,ee);break;case 24:Xi(D,ee,ie,fe,R),R&&we&2048&&jf(ee.alternate,ee);break;default:Xi(D,ee,ie,fe,R)}f=f.sibling}}function Bl(u,f){if(f.subtreeFlags&10256)for(f=f.child;f!==null;){var x=u,E=f,R=E.flags;switch(E.tag){case 22:Bl(x,E),R&2048&&Ih(E.alternate,E);break;case 24:Bl(x,E),R&2048&&jf(E.alternate,E);break;default:Bl(x,E)}f=f.sibling}}function Ci(u){if(u.subtreeFlags&jo)for(u=u.child;u!==null;)To(u),u=u.sibling}function To(u){switch(u.tag){case 26:Ci(u),u.flags&jo&&(u.memoizedState!==null?wp(pr,u.memoizedState,u.memoizedProps):Fn(u.type,u.memoizedProps));break;case 5:Ci(u),u.flags&jo&&Fn(u.type,u.memoizedProps);break;case 3:case 4:if(Vr){var f=pr;pr=cd(u.stateNode.containerInfo),Ci(u),pr=f}else Ci(u);break;case 22:u.memoizedState===null&&(f=u.alternate,f!==null&&f.memoizedState!==null?(f=jo,jo=16777216,Ci(u),jo=f):Ci(u));break;default:Ci(u)}}function Gf(u){var f=u.alternate;if(f!==null&&(u=f.child,u!==null)){f.child=null;do f=u.sibling,u.sibling=null,u=f;while(u!==null)}}function Ll(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var x=0;x<f.length;x++){var E=f[x];Kn=E,Ul(E,u)}Gf(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Su(u),u=u.sibling}function Su(u){switch(u.tag){case 0:case 11:case 15:Ll(u),u.flags&2048&&kl(9,u,u.return);break;case 3:Ll(u);break;case 12:Ll(u);break;case 22:var f=u.stateNode;u.memoizedState!==null&&f._visibility&4&&(u.return===null||u.return.tag!==13)?(f._visibility&=-5,Sc(u)):Ll(u);break;default:Ll(u)}}function Sc(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var x=0;x<f.length;x++){var E=f[x];Kn=E,Ul(E,u)}Gf(u)}for(u=u.child;u!==null;){switch(f=u,f.tag){case 0:case 11:case 15:kl(8,f,f.return),Sc(f);break;case 22:x=f.stateNode,x._visibility&4&&(x._visibility&=-5,Sc(f));break;default:Sc(f)}u=u.sibling}}function Ul(u,f){for(;Kn!==null;){var x=Kn;switch(x.tag){case 0:case 11:case 15:kl(8,x,f);break;case 23:case 22:if(x.memoizedState!==null&&x.memoizedState.cachePool!==null){var E=x.memoizedState.cachePool.pool;E!=null&&E.refCount++}break;case 24:dc(x.memoizedState.cache)}if(E=x.child,E!==null)E.return=x,Kn=E;else e:for(x=u;Kn!==null;){E=Kn;var R=E.sibling,D=E.return;if(xc(E),E===x){Kn=null;break e}if(R!==null){R.return=D,Kn=R;break e}Kn=D}}}function Ff(u){var f=ep(u);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(r(364));return f}if(u=zo(u),u===null)throw Error(r(362));return u.stateNode.current}function Ec(u,f){var x=u.tag;switch(f.$$typeof){case $u:if(u.type===f.value)return!0;break;case vd:e:{for(f=f.value,u=[u,0],x=0;x<u.length;){var E=u[x++],R=E.tag,D=u[x++],ee=f[D];if(R!==5&&R!==26&&R!==27||!vs(E)){for(;ee!=null&&Ec(E,ee);)D++,ee=f[D];if(D===f.length){f=!0;break e}else for(E=E.child;E!==null;)u.push(E,D),E=E.sibling}}f=!1}return f;case _d:if((x===5||x===26||x===27)&&bb(u.stateNode,f.value))return!0;break;case sn:if((x===5||x===6||x===26||x===27)&&(u=Du(u),u!==null&&0<=u.indexOf(f.value)))return!0;break;case Ut:if((x===5||x===26||x===27)&&(u=u.memoizedProps["data-testname"],typeof u=="string"&&u.toLowerCase()===f.value.toLowerCase()))return!0;break;default:throw Error(r(365))}return!1}function Il(u){switch(u.$$typeof){case $u:return"<"+(l(u.value)||"Unknown")+">";case vd:return":has("+(Il(u)||"")+")";case _d:return'[role="'+u.value+'"]';case sn:return'"'+u.value+'"';case Ut:return'[data-testname="'+u.value+'"]';default:throw Error(r(365))}}function xg(u,f){var x=[];u=[u,0];for(var E=0;E<u.length;){var R=u[E++],D=R.tag,ee=u[E++],ie=f[ee];if(D!==5&&D!==26&&D!==27||!vs(R)){for(;ie!=null&&Ec(R,ie);)ee++,ie=f[ee];if(ee===f.length)x.push(R);else for(R=R.child;R!==null;)u.push(R,ee),R=R.sibling}}return x}function ur(u,f){if(!xs)throw Error(r(363));u=Ff(u),u=xg(u,f),f=[],u=Array.from(u);for(var x=0;x<u.length;){var E=u[x++],R=E.tag;if(R===5||R===26||R===27)vs(E)||f.push(E.stateNode);else for(E=E.child;E!==null;)u.push(E),E=E.sibling}return f}function fr(){if((Ze&2)!==0&&Et!==0)return Et&-Et;if(rt.T!==null){var u=Cr;return u!==0?u:Ne()}return ma()}function ds(){Rr===0&&(Rr=(Et&536870912)===0||Ft?$():536870912);var u=Jr.current;return u!==null&&(u.flags|=32),Rr}function Ki(u,f,x){(u===Mt&&mn===2||u.cancelPendingCommit!==null)&&(Ia(u,0),Ua(u,Et,Rr,!1)),Y(u,x),((Ze&2)===0||u!==Mt)&&(u===Mt&&((Ze&2)===0&&(Ya|=x),It===4&&Ua(u,Et,Rr,!1)),bn(u))}function Eu(u,f,x){if((Ze&6)!==0)throw Error(r(327));var E=!x&&(f&60)===0&&(f&u.expiredLanes)===0||z(u,f),R=E?ms(u,f):hs(u,f,!0),D=E;do{if(R===0){ea&&!E&&Ua(u,f,0,!1);break}else if(R===6)Ua(u,f,0,!ln);else{if(x=u.current.alternate,D&&!vg(x)){R=hs(u,f,!1),D=!1;continue}if(R===2){if(D=f,u.errorRecoveryDisabledLanes&D)var ee=0;else ee=u.pendingLanes&-536870913,ee=ee!==0?ee:ee&536870912?536870912:0;if(ee!==0){f=ee;e:{var ie=u;R=jc;var fe=dr&&ie.current.memoizedState.isDehydrated;if(fe&&(Ia(ie,ee).flags|=256),ee=hs(ie,ee,!1),ee!==2){if(il&&!fe){ie.errorRecoveryDisabledLanes|=D,Ya|=D,R=4;break e}D=na,na=R,D!==null&&Gs(D)}R=ee}if(D=!1,R!==2)continue}}if(R===1){Ia(u,0),Ua(u,f,0,!0);break}e:{switch(E=u,R){case 0:case 1:throw Error(r(345));case 4:if((f&4194176)===f){Ua(E,f,Rr,!ln);break e}break;case 2:na=null;break;case 3:case 5:break;default:throw Error(r(329))}if(E.finishedWork=x,E.finishedLanes=f,(f&62914560)===f&&(D=Ts+300-Hi(),10<D)){if(Ua(E,f,Rr,!ln),H(E,0)!==0)break e;E.timeoutHandle=Jh(qf.bind(null,E,x,na,Va,Pc,f,Rr,Ya,rl,ln,2,-0,0),D);break e}qf(E,x,na,Va,Pc,f,Rr,Ya,rl,ln,0,-0,0)}}break}while(!0);bn(u)}function Gs(u){na===null?na=u:na.push.apply(na,u)}function qf(u,f,x,E,R,D,ee,ie,fe,we,ke,Be,je){var ht=f.subtreeFlags;if((ht&8192||(ht&16785408)===16785408)&&(Yr(),To(f),f=Jf(),f!==null)){u.cancelPendingCommit=f(vn.bind(null,u,x,E,R,ee,ie,fe,1,Be,je)),Ua(u,D,ee,!we);return}vn(u,x,E,R,ee,ie,fe,ke,Be,je)}function vg(u){for(var f=u;;){var x=f.tag;if((x===0||x===11||x===15)&&f.flags&16384&&(x=f.updateQueue,x!==null&&(x=x.stores,x!==null)))for(var E=0;E<x.length;E++){var R=x[E],D=R.getSnapshot;R=R.value;try{if(!Xr(D(),R))return!1}catch{return!1}}if(x=f.child,f.subtreeFlags&16384&&x!==null)x.return=f,f=x;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Ua(u,f,x,E){f&=~er,f&=~Ya,u.suspendedLanes|=f,u.pingedLanes&=~f,E&&(u.warmLanes|=f),E=u.expirationTimes;for(var R=f;0<R;){var D=31-wr(R),ee=1<<D;E[D]=-1,R&=~ee}x!==0&&ne(u,x,f)}function Hh(){return(Ze&6)===0?(wi(0),!1):!0}function _r(){if(gt!==null){if(mn===0)var u=gt.return;else u=gt,Xn=Jl=null,Ls(u),Ss=null,ba=0,u=gt;for(;u!==null;)zh(u.alternate,u),u=u.return;gt=null}}function Ia(u,f){u.finishedWork=null,u.finishedLanes=0;var x=u.timeoutHandle;x!==Do&&(u.timeoutHandle=Do,Ou(x)),x=u.cancelPendingCommit,x!==null&&(u.cancelPendingCommit=null,x()),_r(),Mt=u,gt=x=Wi(u.current,null),Et=f,mn=0,ii=null,ln=!1,ea=z(u,f),il=!1,rl=Rr=er=Ya=ta=It=0,na=jc=null,Pc=!1,(f&8)!==0&&(f|=f&32);var E=u.entangledLanes;if(E!==0)for(u=u.entanglements,E&=f;0<E;){var R=31-wr(E),D=1<<R;f|=u[R],E&=~D}return qa=f,We(),x}function Co(u,f){_t=null,rt.H=qt,f===fn?(f=Ee(),mn=3):f===Mp?(f=Ee(),mn=4):mn=f===Jg?8:f!==null&&typeof f=="object"&&typeof f.then=="function"?6:1,ii=f,gt===null&&(It=1,Rf(u,Q(f,u.current)))}function wu(){var u=Jr.current;return u===null?!0:(Et&4194176)===Et?xa===null:(Et&62914560)===Et||(Et&536870912)!==0?u===xa:!1}function wc(){var u=rt.H;return rt.H=qt,u===null?qt:u}function Fr(){var u=rt.A;return rt.A=xd,u}function Sr(){It=4,ln||(Et&4194176)!==Et&&Jr.current!==null||(ea=!0),(ta&134217727)===0&&(Ya&134217727)===0||Mt===null||Ua(Mt,Et,Rr,!1)}function hs(u,f,x){var E=Ze;Ze|=2;var R=wc(),D=Fr();(Mt!==u||Et!==f)&&(Va=null,Ia(u,f)),f=!1;var ee=It;e:do try{if(mn!==0&>!==null){var ie=gt,fe=ii;switch(mn){case 8:_r(),ee=6;break e;case 3:case 2:case 6:Jr.current===null&&(f=!0);var we=mn;if(mn=0,ii=null,Hl(u,ie,fe,we),x&&ea){ee=0;break e}break;default:we=mn,mn=0,ii=null,Hl(u,ie,fe,we)}}ps(),ee=It;break}catch(ke){Co(u,ke)}while(!0);return f&&u.shellSuspendCounter++,Xn=Jl=null,Ze=E,rt.H=R,rt.A=D,gt===null&&(Mt=null,Et=0,We()),ee}function ps(){for(;gt!==null;)jh(gt)}function ms(u,f){var x=Ze;Ze|=2;var E=wc(),R=Fr();Mt!==u||Et!==f?(Va=null,Pn=Hi()+500,Ia(u,f)):ea=z(u,f);e:do try{if(mn!==0&>!==null){f=gt;var D=ii;t:switch(mn){case 1:mn=0,ii=null,Hl(u,f,D,1);break;case 2:if(as(D)){mn=0,ii=null,Yf(f);break}f=function(){mn===2&&Mt===u&&(mn=7),bn(u)},D.then(f,f);break e;case 3:mn=7;break e;case 4:mn=5;break e;case 7:as(D)?(mn=0,ii=null,Yf(f)):(mn=0,ii=null,Hl(u,f,D,7));break;case 5:var ee=null;switch(gt.tag){case 26:ee=gt.memoizedState;case 5:case 27:var ie=gt,fe=ie.type,we=ie.pendingProps;if(ee?Ep(ee):$s(fe,we)){mn=0,ii=null;var ke=ie.sibling;if(ke!==null)gt=ke;else{var Be=ie.return;Be!==null?(gt=Be,Tu(Be)):gt=null}break t}}mn=0,ii=null,Hl(u,f,D,5);break;case 6:mn=0,ii=null,Hl(u,f,D,6);break;case 8:_r(),It=6;break e;default:throw Error(r(462))}}Fs();break}catch(je){Co(u,je)}while(!0);return Xn=Jl=null,rt.H=E,rt.A=R,Ze=x,gt!==null?0:(Mt=null,Et=0,We(),It)}function Fs(){for(;gt!==null&&!Kg();)jh(gt)}function jh(u){var f=dg(u.alternate,u,qa);u.memoizedProps=u.pendingProps,f===null?Tu(u):gt=f}function Yf(u){var f=u,x=f.alternate;switch(f.tag){case 15:case 0:f=lg(x,f,f.pendingProps,f.type,void 0,Et);break;case 11:f=lg(x,f,f.pendingProps,f.type.render,f.ref,Et);break;case 5:Ls(f);default:zh(x,f),f=gt=Vs(f,qa),f=dg(x,f,qa)}u.memoizedProps=u.pendingProps,f===null?Tu(u):gt=f}function Hl(u,f,x,E){Xn=Jl=null,Ls(f),Ss=null,ba=0;var R=f.return;try{if(ng(u,R,f,x,Et)){It=1,Rf(u,Q(x,u.current)),gt=null;return}}catch(D){if(R!==null)throw gt=R,D;It=1,Rf(u,Q(x,u.current)),gt=null;return}f.flags&32768?(Ft||E===1?u=!0:ea||(Et&536870912)!==0?u=!1:(ln=u=!0,(E===2||E===3||E===6)&&(E=Jr.current,E!==null&&E.tag===13&&(E.flags|=16384))),Ai(f,u)):Tu(f)}function Tu(u){var f=u;do{if((f.flags&32768)!==0){Ai(f,ln);return}u=f.return;var x=pg(f.alternate,f,qa);if(x!==null){gt=x;return}if(f=f.sibling,f!==null){gt=f;return}gt=f=u}while(f!==null);It===0&&(It=5)}function Ai(u,f){do{var x=mg(u.alternate,u);if(x!==null){x.flags&=32767,gt=x;return}if(x=u.return,x!==null&&(x.flags|=32768,x.subtreeFlags=0,x.deletions=null),!f&&(u=u.sibling,u!==null)){gt=u;return}gt=u=x}while(u!==null);It=6,gt=null}function vn(u,f,x,E,R,D,ee,ie,fe,we){var ke=rt.T,Be=vi();try{$i(2),rt.T=null,zt(u,f,x,E,Be,R,D,ee,ie,fe,we)}finally{rt.T=ke,$i(Be)}}function zt(u,f,x,E,R,D,ee,ie){do Mi();while(al!==null);if((Ze&6)!==0)throw Error(r(327));var fe=u.finishedWork;if(E=u.finishedLanes,fe===null)return null;if(u.finishedWork=null,u.finishedLanes=0,fe===u.current)throw Error(r(177));u.callbackNode=null,u.callbackPriority=0,u.cancelPendingCommit=null;var we=fe.lanes|fe.childLanes;if(we|=Bc,X(u,E,we,D,ee,ie),u===Mt&&(gt=Mt=null,Et=0),(fe.subtreeFlags&10256)===0&&(fe.flags&10256)===0||_a||(_a=!0,Sd=we,Go=x,Cu(fd,function(){return Mi(),null})),x=(fe.flags&15990)!==0,(fe.subtreeFlags&15990)!==0||x?(x=rt.T,rt.T=null,D=vi(),$i(2),ee=Ze,Ze|=4,bc(u,fe),Dl(fe,u),Zh(u.containerInfo),u.current=fe,If(u,fe.alternate,fe),Wg(),Ze=ee,$i(D),rt.T=x):u.current=fe,_a?(_a=!1,al=u,Po=E):qs(u,we),we=u.pendingLanes,we===0&&(ia=null),B(fe.stateNode),bn(u),f!==null)for(R=u.onRecoverableError,fe=0;fe<f.length;fe++)we=f[fe],R(we.value,{componentStack:we.stack});return(Po&3)!==0&&Mi(),we=u.pendingLanes,(E&4194218)!==0&&(we&42)!==0?u===mr?Fo++:(Fo=0,mr=u):Fo=0,wi(0),null}function qs(u,f){(u.pooledCacheLanes&=f)===0&&(f=u.pooledCache,f!=null&&(u.pooledCache=null,dc(f)))}function Mi(){if(al!==null){var u=al,f=Sd;Sd=0;var x=J(Po),E=32>x?32:x;x=rt.T;var R=vi();try{if($i(E),rt.T=null,al===null)var D=!1;else{E=Go,Go=null;var ee=al,ie=Po;if(al=null,Po=0,(Ze&6)!==0)throw Error(r(331));var fe=Ze;if(Ze|=4,Su(ee.current),Pf(ee,ee.current,ie,E),Ze=fe,wi(0,!1),Tr&&typeof Tr.onPostCommitFiberRoot=="function")try{Tr.onPostCommitFiberRoot(Dc,ee)}catch{}D=!0}return D}finally{$i(R),rt.T=x,qs(u,f)}}return!1}function Vf(u,f,x){f=Q(x,f),f=pu(u.stateNode,f,2),u=$t(u,f,2),u!==null&&(Y(u,2),bn(u))}function Ot(u,f,x){if(u.tag===3)Vf(u,u,x);else for(;f!==null;){if(f.tag===3){Vf(f,u,x);break}else if(f.tag===1){var E=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&(ia===null||!ia.has(E))){u=Q(x,u),x=fc(2),E=$t(f,x,2),E!==null&&(mu(x,E,f,u),Y(E,2),bn(E));break}}f=f.return}}function Xf(u,f,x){var E=u.pingCache;if(E===null){E=u.pingCache=new Dt;var R=new Set;E.set(f,R)}else R=E.get(f),R===void 0&&(R=new Set,E.set(f,R));R.has(x)||(il=!0,R.add(x),u=_g.bind(null,u,f,x),f.then(u,u))}function _g(u,f,x){var E=u.pingCache;E!==null&&E.delete(f),u.pingedLanes|=u.suspendedLanes&x,u.warmLanes&=~x,Mt===u&&(Et&x)===x&&(It===4||It===3&&(Et&62914560)===Et&&300>Hi()-Ts?(Ze&2)===0&&Ia(u,0):er|=x,rl===Et&&(rl=0)),bn(u)}function Ao(u,f){f===0&&(f=j()),u=At(u,f),u!==null&&(Y(u,f),bn(u))}function Mo(u){var f=u.memoizedState,x=0;f!==null&&(x=f.retryLane),Ao(u,x)}function Ph(u,f){var x=0;switch(u.tag){case 13:var E=u.stateNode,R=u.memoizedState;R!==null&&(x=R.retryLane);break;case 19:E=u.stateNode;break;case 22:E=u.stateNode._retryCache;break;default:throw Error(r(314))}E!==null&&E.delete(f),Ao(u,x)}function Cu(u,f){return Oc(u,f)}function Gh(u,f,x,E){this.tag=u,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ys(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Wi(u,f){var x=u.alternate;return x===null?(x=n(u.tag,f,u.key,u.mode),x.elementType=u.elementType,x.type=u.type,x.stateNode=u.stateNode,x.alternate=u,u.alternate=x):(x.pendingProps=f,x.type=u.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=u.flags&31457280,x.childLanes=u.childLanes,x.lanes=u.lanes,x.child=u.child,x.memoizedProps=u.memoizedProps,x.memoizedState=u.memoizedState,x.updateQueue=u.updateQueue,f=u.dependencies,x.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},x.sibling=u.sibling,x.index=u.index,x.ref=u.ref,x.refCleanup=u.refCleanup,x}function Vs(u,f){u.flags&=31457282;var x=u.alternate;return x===null?(u.childLanes=0,u.lanes=f,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=x.childLanes,u.lanes=x.lanes,u.child=x.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=x.memoizedProps,u.memoizedState=x.memoizedState,u.updateQueue=x.updateQueue,u.type=x.type,f=x.dependencies,u.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),u}function pa(u,f,x,E,R,D){var ee=0;if(E=u,typeof u=="function")Ys(u)&&(ee=1);else if(typeof u=="string")ee=Vr&&Ii?gp(u,x,Ni.current)?26:Nc(u)?27:5:Vr?gp(u,x,Ni.current)?26:5:Ii&&Nc(u)?27:5;else e:switch(u){case Cc:return Xs(x.children,R,D,f);case Xh:ee=8,R|=24;break;case Kh:return u=n(12,x,f,R|2),u.elementType=Kh,u.lanes=D,u;case Wf:return u=n(13,x,f,R),u.elementType=Wf,u.lanes=D,u;case Gl:return u=n(19,x,f,R),u.elementType=Gl,u.lanes=D,u;case Ru:return Kf(x,R,D,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case wg:case gs:ee=10;break e;case Pl:ee=9;break e;case Ac:ee=11;break e;case Mu:ee=14;break e;case ja:ee=16,E=null;break e}ee=29,x=Error(r(130,u===null?"null":typeof u,"")),E=null}return f=n(ee,x,f,R),f.elementType=u,f.type=E,f.lanes=D,f}function Xs(u,f,x,E){return u=n(7,u,E,f),u.lanes=x,u}function Kf(u,f,x,E){u=n(22,u,E,f),u.elementType=Ru,u.lanes=x;var R={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var D=R._current;if(D===null)throw Error(r(456));if((R._pendingVisibility&2)===0){var ee=At(D,2);ee!==null&&(R._pendingVisibility|=2,Ki(ee,D,2))}},attach:function(){var D=R._current;if(D===null)throw Error(r(456));if((R._pendingVisibility&2)!==0){var ee=At(D,2);ee!==null&&(R._pendingVisibility&=-3,Ki(ee,D,2))}}};return u.stateNode=R,u}function jl(u,f,x){return u=n(6,u,null,f),u.lanes=x,u}function Tc(u,f,x){return f=n(4,u.children!==null?u.children:[],u.key,f),f.lanes=x,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function Ro(u,f,x,E,R,D,ee,ie){this.tag=1,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Do,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=I(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=I(0),this.hiddenUpdates=I(null),this.identifierPrefix=E,this.onUncaughtError=R,this.onCaughtError=D,this.onRecoverableError=ee,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function Ri(u,f,x,E,R,D,ee,ie,fe,we,ke,Be){return u=new Ro(u,f,x,ee,ie,fe,we,Be),f=1,D===!0&&(f|=24),D=n(3,null,null,f),u.current=D,D.stateNode=u,f=Df(),f.refCount++,u.pooledCache=f,f.refCount++,D.memoizedState={element:E,isDehydrated:x,cache:f},yi(D),u}function Au(u){return u?(u=Bo,u):Bo}function Fh(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=v(f),u=u!==null?S(u):null,u===null?null:Mc(u.stateNode)}function Sg(u,f,x,E,R,D){R=Au(R),E.context===null?E.context=R:E.pendingContext=R,E=xn(f),E.payload={element:x},D=D===void 0?null:D,D!==null&&(E.callback=D),x=$t(u,E,f),x!==null&&(Ki(x,u,f),Gn(x,u,f))}function Eg(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var x=u.retryLane;u.retryLane=x!==0&&x<f?x:f}}function qh(u,f){Eg(u,f),(u=u.alternate)&&Eg(u,f)}var $e={},Yh=ph(),Li=$B(),No=Object.assign,Vh=Symbol.for("react.element"),Ks=Symbol.for("react.transitional.element"),Ha=Symbol.for("react.portal"),Cc=Symbol.for("react.fragment"),Xh=Symbol.for("react.strict_mode"),Kh=Symbol.for("react.profiler"),wg=Symbol.for("react.provider"),Pl=Symbol.for("react.consumer"),gs=Symbol.for("react.context"),Ac=Symbol.for("react.forward_ref"),Wf=Symbol.for("react.suspense"),Gl=Symbol.for("react.suspense_list"),Mu=Symbol.for("react.memo"),ja=Symbol.for("react.lazy"),Ru=Symbol.for("react.offscreen"),Tg=Symbol.for("react.memo_cache_sentinel"),Wh=Symbol.iterator,ko=Symbol.for("react.client.reference"),rt=Yh.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$f,$h,Fl=!1,ql=Array.isArray,Zf=e.rendererVersion,Nu=e.rendererPackageName,ku=e.extraDevToolsConfig,Mc=e.getPublicInstance,Oo=e.getRootHostContext,Cg=e.getChildHostContext,Yl=e.prepareForCommit,Zh=e.resetAfterCommit,Qh=e.createInstance,ys=e.appendInitialChild,Ws=e.finalizeInitialChildren,Vl=e.shouldSetTextContent,Qf=e.createTextInstance,Jh=e.scheduleTimeout,Ou=e.cancelTimeout,Do=e.noTimeout,bs=e.isPrimaryRenderer;e.warnsIfNotActing;var Ui=e.supportsMutation,qr=e.supportsPersistence,dr=e.supportsHydration,ep=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var tp=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var $i=e.setCurrentUpdatePriority,vi=e.getCurrentUpdatePriority,ma=e.resolveUpdatePriority;e.resolveEventType,e.resolveEventTimeStamp;var Xl=e.shouldAttemptEagerTransition,np=e.detachDeletedInstance;e.requestPostPaintCallback;var Ag=e.maySuspendCommit,$s=e.preloadInstance,Yr=e.startSuspendingCommit,Fn=e.suspendInstance,Jf=e.waitForCommitToBeReady,Er=e.NotPendingTransition,ot=e.HostTransitionContext,pn=e.resetFormInstance;e.bindToConsole;var ci=e.supportsMicrotasks,ed=e.scheduleMicrotask,xs=e.supportsTestSelectors,zo=e.findFiberRoot,td=e.getBoundingRect,Du=e.getTextContent,vs=e.isHiddenSubtree,bb=e.matchAccessibilityRole,qn=e.setFocusIfFocusable,ip=e.setupIntersectionObserver,rp=e.appendChild,Mg=e.appendChildToContainer,Rg=e.commitTextUpdate,xb=e.commitMount,ap=e.commitUpdate,sp=e.insertBefore,lp=e.insertInContainerBefore,hr=e.removeChild,Jn=e.removeChildFromContainer,zu=e.resetTextContent,Bu=e.hideInstance,nd=e.hideTextInstance,op=e.unhideInstance,Zs=e.unhideTextInstance,id=e.clearContainer,cp=e.cloneInstance,rd=e.createContainerChildSet,up=e.appendChildToContainerChildSet,Ng=e.finalizeContainerChildren,fp=e.replaceContainerChildren,dp=e.cloneHiddenInstance,hp=e.cloneHiddenTextInstance,ad=e.isSuspenseInstancePending,Lu=e.isSuspenseInstanceFallback,kg=e.getSuspenseInstanceFallbackErrorDetails,vb=e.registerSuspenseInstanceRetry,Og=e.canHydrateFormStateMarker,Dg=e.isFormStateMarkerMatching,pp=e.getNextHydratableSibling,sd=e.getFirstHydratableChild,zg=e.getFirstHydratableChildWithinContainer,Bg=e.getFirstHydratableChildWithinSuspenseInstance,Lg=e.canHydrateInstance,Ug=e.canHydrateTextInstance,Ig=e.canHydrateSuspenseInstance,_b=e.hydrateInstance,Hg=e.hydrateTextInstance,Rc=e.hydrateSuspenseInstance,jg=e.getNextHydratableInstanceAfterSuspenseInstance,ld=e.commitHydratedContainer,od=e.commitHydratedSuspenseInstance,Pg=e.clearSuspenseBoundary,mp=e.clearSuspenseBoundaryFromContainer,Gg=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var Fg=e.validateHydratableInstance,qg=e.validateHydratableTextInstance,Vr=e.supportsResources,gp=e.isHostHoistableType,cd=e.getHoistableRoot,ud=e.getResource,yp=e.acquireResource,bp=e.releaseResource,xp=e.hydrateHoistable,vp=e.mountHoistable,_p=e.unmountHoistable,Sb=e.createHoistableInstance,Sp=e.prepareToCommitHoistables,Yg=e.mayResourceSuspendCommit,Ep=e.preloadResource,wp=e.suspendResource,Ii=e.supportsSingletons,Tp=e.resolveSingletonInstance,Eb=e.clearSingleton,wb=e.acquireSingletonInstance,Vg=e.releaseSingletonInstance,Nc=e.isHostSingletonType,Uu=[],Qs=-1,Bo={},wr=Math.clz32?Math.clz32:M,Iu=Math.log,Xg=Math.LN2,kc=128,Hu=4194304,Oc=Li.unstable_scheduleCallback,ju=Li.unstable_cancelCallback,Kg=Li.unstable_shouldYield,Wg=Li.unstable_requestPaint,Hi=Li.unstable_now,Cp=Li.unstable_ImmediatePriority,$g=Li.unstable_UserBlockingPriority,fd=Li.unstable_NormalPriority,dd=Li.unstable_IdlePriority,Zg=Li.log,Ap=Li.unstable_setDisableYieldValue,Dc=null,Tr=null,Xr=typeof Object.is=="function"?Object.is:Z,hd=new WeakMap,Nn=[],Yn=0,Pu=null,Gu=0,Kr=[],Wr=0,Pa=null,_s=1,ga="",Ni=T(null),Fu=T(null),Ga=T(null),zc=T(null),Zi=null,ji=null,Ft=!1,$r=null,ya=!1,qu=Error(r(519)),Zr=[],Kl=0,Bc=0,Lc=null,Lo=null,Yu=!1,Vu=!1,Fa=!1,Wl=0,Xu=null,pd=0,Cr=0,$l=null,Js=!1,Uc=!1,Ku=Object.prototype.hasOwnProperty,fn=Error(r(460)),Mp=Error(r(474)),md={then:function(){}},Uo=null,Ss=null,ba=0,Zl=Fe(!0),Rp=Fe(!1),Es=T(null),Qr=T(0),Jr=T(null),xa=null,ui=T(0),ws=0,_t=null,Zt=null,ei=null,va=!1,kn=!1,el=!1,Wu=0,Vn=0,Ic=null,Qg=0,gd=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},qt={readContext:Bi,use:Ir,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt};qt.useCacheRefresh=yt,qt.useMemoCache=yt,qt.useHostTransitionStatus=yt,qt.useFormState=yt,qt.useActionState=yt,qt.useOptimistic=yt;var fi={readContext:Bi,use:Ir,useCallback:function(u,f){return tn().memoizedState=[u,f===void 0?null:f],u},useContext:Bi,useEffect:rn,useImperativeHandle:function(u,f,x){x=x!=null?x.concat([u]):null,bo(4194308,4,Is.bind(null,f,u),x)},useLayoutEffect:function(u,f){return bo(4194308,4,u,f)},useInsertionEffect:function(u,f){bo(4,2,u,f)},useMemo:function(u,f){var x=tn();f=f===void 0?null:f;var E=u();if(el){V(!0);try{u()}finally{V(!1)}}return x.memoizedState=[E,f],E},useReducer:function(u,f,x){var E=tn();if(x!==void 0){var R=x(f);if(el){V(!0);try{x(f)}finally{V(!1)}}}else R=f;return E.memoizedState=E.baseState=R,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:R},E.queue=u,u=u.dispatch=Tl.bind(null,_t,u),[E.memoizedState,u]},useRef:function(u){var f=tn();return u={current:u},f.memoizedState=u},useState:function(u){u=Ti(u);var f=u.queue,x=Af.bind(null,_t,f);return f.dispatch=x,[u.memoizedState,x]},useDebugValue:qe,useDeferredValue:function(u,f){var x=tn();return An(x,u,f)},useTransition:function(){var u=Ti(!1);return u=uc.bind(null,_t,u.queue,!0,!1),tn().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,f,x){var E=_t,R=tn();if(Ft){if(x===void 0)throw Error(r(407));x=x()}else{if(x=f(),Mt===null)throw Error(r(349));(Et&60)!==0||xt(E,f,x)}R.memoizedState=x;var D={value:x,getSnapshot:f};return R.queue=D,rn(Un.bind(null,E,D,u),[u]),E.flags|=2048,Ba(9,Xt.bind(null,E,D,x,f),{destroy:void 0},null),x},useId:function(){var u=tn(),f=Mt.identifierPrefix;if(Ft){var x=ga,E=_s;x=(E&~(1<<32-wr(E)-1)).toString(32)+x,f=":"+f+"R"+x,x=Wu++,0<x&&(f+="H"+x.toString(32)),f+=":"}else x=Qg++,f=":"+f+"r"+x.toString(32)+":";return u.memoizedState=f},useCacheRefresh:function(){return tn().memoizedState=fu.bind(null,_t)}};fi.useMemoCache=Ln,fi.useHostTransitionStatus=xo,fi.useFormState=ss,fi.useActionState=ss,fi.useOptimistic=function(u){var f=tn();f.memoizedState=f.baseState=u;var x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return f.queue=x,f=Mf.bind(null,_t,!0,x),x.dispatch=f,[u,f]};var Qi={readContext:Bi,use:Ir,useCallback:mt,useContext:Bi,useEffect:os,useImperativeHandle:De,useInsertionEffect:cs,useLayoutEffect:cc,useMemo:Nt,useReducer:da,useRef:it,useState:function(){return da(xr)},useDebugValue:qe,useDeferredValue:function(u,f){var x=nn();return jr(x,Zt.memoizedState,u,f)},useTransition:function(){var u=da(xr)[0],f=nn().memoizedState;return[typeof u=="boolean"?u:lr(u),f]},useSyncExternalStore:Ve,useId:us};Qi.useCacheRefresh=Cf,Qi.useMemoCache=Ln,Qi.useHostTransitionStatus=xo,Qi.useFormState=ls,Qi.useActionState=ls,Qi.useOptimistic=function(u,f){var x=nn();return un(x,Zt,u,f)};var Ql={readContext:Bi,use:Ir,useCallback:mt,useContext:Bi,useEffect:os,useImperativeHandle:De,useInsertionEffect:cs,useLayoutEffect:cc,useMemo:Nt,useReducer:Me,useRef:it,useState:function(){return Me(xr)},useDebugValue:qe,useDeferredValue:function(u,f){var x=nn();return Zt===null?An(x,u,f):jr(x,Zt.memoizedState,u,f)},useTransition:function(){var u=Me(xr)[0],f=nn().memoizedState;return[typeof u=="boolean"?u:lr(u),f]},useSyncExternalStore:Ve,useId:us};Ql.useCacheRefresh=Cf,Ql.useMemoCache=Ln,Ql.useHostTransitionStatus=xo,Ql.useFormState=cu,Ql.useActionState=cu,Ql.useOptimistic=function(u,f){var x=nn();return Zt!==null?un(x,Zt,u,f):(x.baseState=u,[u,x.queue.dispatch])};var yd={isMounted:function(u){return(u=u._reactInternals)?g(u)===u:!1},enqueueSetState:function(u,f,x){u=u._reactInternals;var E=fr(),R=xn(E);R.payload=f,x!=null&&(R.callback=x),f=$t(u,R,E),f!==null&&(Ki(f,u,E),Gn(f,u,E))},enqueueReplaceState:function(u,f,x){u=u._reactInternals;var E=fr(),R=xn(E);R.tag=1,R.payload=f,x!=null&&(R.callback=x),f=$t(u,R,E),f!==null&&(Ki(f,u,E),Gn(f,u,E))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var x=fr(),E=xn(x);E.tag=2,f!=null&&(E.callback=f),f=$t(u,E,x),f!==null&&(Ki(f,u,x),Gn(f,u,x))}},Np=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var f=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(f))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},Jg=Error(r(461)),ti=!1,Ji={dehydrated:null,treeContext:null,retryLane:0},Ar=T(null),Jl=null,Xn=null,ey=typeof AbortController<"u"?AbortController:function(){var u=[],f=this.signal={aborted:!1,addEventListener:function(x,E){u.push(E)}};this.abort=function(){f.aborted=!0,u.forEach(function(x){return x()})}},tl=Li.unstable_scheduleCallback,Io=Li.unstable_NormalPriority,an={$$typeof:gs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},bd=rt.S;rt.S=function(u,f){typeof f=="object"&&f!==null&&typeof f.then=="function"&&Je(u,f),bd!==null&&bd(u,f)};var nl=T(null),_i=!1,jn=!1,eo=!1,Hc=typeof WeakSet=="function"?WeakSet:Set,Kn=null,Ho=!1,ni=null,Mr=!1,pr=null,jo=8192,xd={getCacheForType:function(u){var f=Bi(an),x=f.data.get(u);return x===void 0&&(x=u(),f.data.set(u,x)),x}},$u=0,vd=1,_d=2,Ut=3,sn=4;if(typeof Symbol=="function"&&Symbol.for){var St=Symbol.for;$u=St("selector.component"),vd=St("selector.has_pseudo_class"),_d=St("selector.role"),Ut=St("selector.test_id"),sn=St("selector.text")}var Dt=typeof WeakMap=="function"?WeakMap:Map,Ze=0,Mt=null,gt=null,Et=0,mn=0,ii=null,ln=!1,ea=!1,il=!1,qa=0,It=0,ta=0,Ya=0,er=0,Rr=0,rl=0,jc=null,na=null,Pc=!1,Ts=0,Pn=1/0,Va=null,ia=null,_a=!1,al=null,Po=0,Sd=0,Go=null,Fo=0,mr=null;return $e.attemptContinuousHydration=function(u){if(u.tag===13){var f=At(u,67108864);f!==null&&Ki(f,u,67108864),qh(u,67108864)}},$e.attemptHydrationAtCurrentPriority=function(u){if(u.tag===13){var f=fr(),x=At(u,f);x!==null&&Ki(x,u,f),qh(u,f)}},$e.attemptSynchronousHydration=function(u){switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var f=O(u.pendingLanes);if(f!==0){for(u.pendingLanes|=2,u.entangledLanes|=2;f;){var x=1<<31-wr(f);u.entanglements[1]|=x,f&=~x}bn(u),(Ze&6)===0&&(Pn=Hi()+500,wi(0))}}break;case 13:f=At(u,2),f!==null&&Ki(f,u,2),Hh(),qh(u,2)}},$e.batchedUpdates=function(u,f){return u(f)},$e.createComponentSelector=function(u){return{$$typeof:$u,value:u}},$e.createContainer=function(u,f,x,E,R,D,ee,ie,fe,we){return Ri(u,f,!1,null,x,E,D,ee,ie,fe,we,null)},$e.createHasPseudoClassSelector=function(u){return{$$typeof:vd,value:u}},$e.createHydrationContainer=function(u,f,x,E,R,D,ee,ie,fe,we,ke,Be,je){return u=Ri(x,E,!0,u,R,D,ie,fe,we,ke,Be,je),u.context=Au(null),x=u.current,E=fr(),R=xn(E),R.callback=f??null,$t(x,R,E),u.current.lanes=E,Y(u,E),bn(u),u},$e.createPortal=function(u,f,x){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ha,key:E==null?null:""+E,children:u,containerInfo:f,implementation:x}},$e.createRoleSelector=function(u){return{$$typeof:_d,value:u}},$e.createTestNameSelector=function(u){return{$$typeof:Ut,value:u}},$e.createTextSelector=function(u){return{$$typeof:sn,value:u}},$e.defaultOnCaughtError=function(u){console.error(u)},$e.defaultOnRecoverableError=function(u){Np(u)},$e.defaultOnUncaughtError=function(u){Np(u)},$e.deferredUpdates=function(u){var f=rt.T,x=vi();try{return $i(32),rt.T=null,u()}finally{$i(x),rt.T=f}},$e.discreteUpdates=function(u,f,x,E,R){var D=rt.T,ee=vi();try{return $i(2),rt.T=null,u(f,x,E,R)}finally{$i(ee),rt.T=D,Ze===0&&(Pn=Hi()+500)}},$e.findAllNodes=ur,$e.findBoundingRects=function(u,f){if(!xs)throw Error(r(363));f=ur(u,f),u=[];for(var x=0;x<f.length;x++)u.push(td(f[x]));for(f=u.length-1;0<f;f--){x=u[f];for(var E=x.x,R=E+x.width,D=x.y,ee=D+x.height,ie=f-1;0<=ie;ie--)if(f!==ie){var fe=u[ie],we=fe.x,ke=we+fe.width,Be=fe.y,je=Be+fe.height;if(E>=we&&D>=Be&&R<=ke&&ee<=je){u.splice(f,1);break}else if(E!==we||x.width!==fe.width||je<D||Be>ee){if(!(D!==Be||x.height!==fe.height||ke<E||we>R)){we>E&&(fe.width+=we-E,fe.x=E),ke<R&&(fe.width=R-we),u.splice(f,1);break}}else{Be>D&&(fe.height+=Be-D,fe.y=D),je<ee&&(fe.height=ee-Be),u.splice(f,1);break}}}return u},$e.findHostInstance=Fh,$e.findHostInstanceWithNoPortals=function(u){return u=v(u),u=u!==null?C(u):null,u===null?null:Mc(u.stateNode)},$e.findHostInstanceWithWarning=function(u){return Fh(u)},$e.flushPassiveEffects=Mi,$e.flushSyncFromReconciler=function(u){var f=Ze;Ze|=1;var x=rt.T,E=vi();try{if($i(2),rt.T=null,u)return u()}finally{$i(E),rt.T=x,Ze=f,(Ze&6)===0&&wi(0)}},$e.flushSyncWork=Hh,$e.focusWithin=function(u,f){if(!xs)throw Error(r(363));for(u=Ff(u),f=xg(u,f),f=Array.from(f),u=0;u<f.length;){var x=f[u++],E=x.tag;if(!vs(x)){if((E===5||E===26||E===27)&&qn(x.stateNode))return!0;for(x=x.child;x!==null;)f.push(x),x=x.sibling}}return!1},$e.getFindAllNodesFailureDescription=function(u,f){if(!xs)throw Error(r(363));var x=0,E=[];u=[Ff(u),0];for(var R=0;R<u.length;){var D=u[R++],ee=D.tag,ie=u[R++],fe=f[ie];if((ee!==5&&ee!==26&&ee!==27||!vs(D))&&(Ec(D,fe)&&(E.push(Il(fe)),ie++,ie>x&&(x=ie)),ie<f.length))for(D=D.child;D!==null;)u.push(D,ie),D=D.sibling}if(x<f.length){for(u=[];x<f.length;x++)u.push(Il(f[x]));return`findAllNodes was able to match part of the selector:
|
|
341
|
+
`+(E.join(" > ")+`
|
|
342
|
+
|
|
343
|
+
No matching component was found for:
|
|
344
|
+
`)+u.join(" > ")}return null},$e.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 27:case 5:return Mc(u.child.stateNode);default:return u.child.stateNode}},$e.injectIntoDevTools=function(){var u={bundleType:0,version:Zf,rendererPackageName:Nu,currentDispatcherRef:rt,findFiberByHostInstance:ep,reconcilerVersion:"19.0.0"};if(ku!==null&&(u.rendererConfig=ku),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)u=!0;else{try{Dc=f.inject(u),Tr=f}catch{}u=!!f.checkDCE}}return u},$e.isAlreadyRendering=function(){return!1},$e.observeVisibleRects=function(u,f,x,E){if(!xs)throw Error(r(363));u=ur(u,f);var R=ip(u,x,E).disconnect;return{disconnect:function(){R()}}},$e.shouldError=function(){return null},$e.shouldSuspend=function(){return!1},$e.startHostTransition=function(u,f,x,E){if(u.tag!==5)throw Error(r(476));var R=uu(u).queue;uc(u,R,f,Er,x===null?i:function(){var D=uu(u).next.queue;return Cl(u,D,{},fr()),x(E)})},$e.updateContainer=function(u,f,x,E){var R=f.current,D=fr();return Sg(R,D,u,f,x,E),D},$e.updateContainerSync=function(u,f,x,E){return f.tag===0&&Mi(),Sg(f.current,2,u,f,x,E),2},$e},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})})(Hx)),Hx.exports}var Nw;function QB(){return Nw||(Nw=1,Ix.exports=ZB()),Ix.exports}var JB=QB();const eL=lu(JB),tL=eL;function nL(t,e,n,i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function iL(){}function rL(){return!1}const dM={};function aL(t){return t??dM}function sL(){return au.currentUpdatePriority}function lL(){return null}function oL(t){throw new Error("Not yet implemented.")}function cL(t){return t}function uL(){return dM}function fL(t){t instanceof br?t.visible=!1:t instanceof Ef&&(t.enabled=!1)}function dL(t){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function hM(t){if(t instanceof Ef){const e=t.__pixireact.parent;if(e){const n=e.__pixireact.filters.indexOf(t);e.__pixireact.filters.splice(n,1),e.filters=e.__pixireact.filters}t.__pixireact.parent=null}}function pM(t,e,...n){}function kw(t,e,n){if(pM(),e instanceof br){const i=e,r=e,s=n;i.parent===t&&t.removeChild(r);const l=t.getChildIndex(s);t.addChildAt(r,l)}else if(e instanceof Ef){const s=e.__pixireact.filters.indexOf(n);hM(e),sM(t,e,s)}}function hL(){return!1}function pL(){return!0}function mL(){return null}function gL(){}function yL(){}function Ow(t,e){e instanceof Ef&&hM(e),e.destroy()}function bL(t){}function xL(){}function vL(){}function _L(){return-1.1}function SL(){return null}function EL(){var n;if(au.currentUpdatePriority)return au.currentUpdatePriority;const t=typeof self<"u"&&self||typeof window<"u"&&window;if(!t)return Yd.DefaultEventPriority;switch((n=t.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Yd.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Yd.ContinuousEventPriority;default:return Yd.DefaultEventPriority}}function wL(t){au.currentUpdatePriority=t}function TL(){return!1}function CL(){return!1}function AL(){}function ML(){}function RL(){}function NL(t){t instanceof br?t.visible=!0:t instanceof Ef&&(t.enabled=!0)}function kL(t){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function OL(){return null}const DL={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:NB,appendChild:Ux,appendChildToContainer:Ux,appendInitialChild:Ux,beforeActiveInstanceBlur:kB,cancelTimeout:clearTimeout,clearContainer:OB,commitUpdate:FB,createInstance:KB,createTextInstance:nL,hideTextInstance:dL,unhideTextInstance:kL,detachDeletedInstance:iL,finalizeInitialChildren:rL,getChildHostContext:aL,getCurrentUpdatePriority:sL,getInstanceFromNode:lL,getInstanceFromScope:oL,getPublicInstance:cL,getRootHostContext:uL,hideInstance:fL,insertBefore:kw,insertInContainerBefore:kw,maySuspendCommit:hL,preloadInstance:pL,prepareForCommit:mL,preparePortalMount:gL,prepareScopeUpdate:yL,removeChild:Ow,removeChildFromContainer:Ow,requestPostPaintCallback:bL,resetAfterCommit:xL,resetFormInstance:vL,resolveEventTimeStamp:_L,resolveEventType:SL,resolveUpdatePriority:EL,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:TL,setCurrentUpdatePriority:wL,shouldSetTextContent:CL,startSuspendingCommit:AL,suspendInstance:ML,trackSchedulerEvent:RL,unhideInstance:NL,waitForCommitToBeReady:OL,rendererPackageName:"@pixi/react",rendererVersion:RB.version},w0=tL(DL);w0.injectIntoDevTools();const ah=new Map;function zL(t,e={}){let n=ah.get(t),i=(n==null?void 0:n.applicationState)??{isInitialised:!1,isInitialising:!1};const r=(n==null?void 0:n.internalState)??{};n||(i.app=new q_,r.rootContainer=aM(i.app.stage));const s=(n==null?void 0:n.fiber)??w0.createContainer(r.rootContainer,Yd.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!n){let l;t instanceof HTMLCanvasElement&&(l=t),l||(l=document.createElement("canvas"),t.innerHTML="",t.appendChild(l)),r.canvas=l,n={applicationState:i,fiber:s,internalState:r,render:async(d,p)=>{var m;return!i.app.renderer&&!i.isInitialised&&!i.isInitialising&&(i.isInitialising=!0,await i.app.init({...p,canvas:l}),i.isInitialising=!1,i.isInitialised=!0,i={...i},(m=e.onInit)==null||m.call(e,i.app)),Object.entries(p).forEach(([g,b])=>{const v=g;rM(p,v)||(i.app[v]=b)}),w0.updateContainer(N.jsx(AB,{value:i,children:d}),s,null,()=>{}),i.app}},ah.set(l,n)}return n}function mM(t){au.unmountQueue.delete(t);const e=t.fiber;e&&w0.updateContainer(null,e,null,()=>{t.applicationState.app&&t.applicationState.app.destroy(),ah.delete(t.internalState.canvas)})}function BL(){for(const t of au.unmountQueue)mM(t)}function LL(t){const e=ah.get(t);e&&(e.applicationState.isInitialised?mM(e):au.unmountQueue.add(e))}function UL(t){const e=ah.get(t);e&&au.unmountQueue.delete(e)}var rC,aC;const Ly=typeof window<"u"&&((rC=window.document)!=null&&rC.createElement||((aC=window.navigator)==null?void 0:aC.product)==="ReactNative")?P.useLayoutEffect:P.useEffect,IL={...gf.defaultTextStyle},HL=P.forwardRef(function(e,n){const{children:i,className:r,defaultTextStyle:s,extensions:l,onInit:c,resizeTo:d,...p}=e,m=WD(),g=P.useRef(null),b=P.useRef(null),v=P.useRef(new Set);P.useImperativeHandle(n,()=>({getApplication(){return g.current},getCanvas(){return b.current}}));const S=P.useCallback(()=>{const T=g.current;T&&(d?"current"in d?d.current instanceof HTMLElement&&(T.resizeTo=d.current):T.resizeTo=d:T.resizeTo=void 0)},[d]),C=P.useCallback(T=>{BL(),g.current=T,S(),c==null||c(T)},[c]);return Ly(()=>{if(l){const T=[...l],w=v.current;for(const k of w.values()){const M=T.indexOf(k);M===-1&&(si.remove(k),w.delete(k)),T.splice(M,1)}for(const k of T)si.add(k),w.add(k)}},[l]),Ly(()=>{const T=b.current;if(T){let w=ah.get(T);w||(w=zL(T,{onInit:C})),w.render(N.jsx(m,{children:i}),p)}},[p,i,C,d]),Ly(()=>{S()},[d]),Ly(()=>{s?Object.assign(gf.defaultTextStyle,s):Object.assign(gf.defaultTextStyle,IL)},[s]),P.useEffect(()=>{const T=b.current;if(T)return UL(T),()=>{LL(T)}},[]),N.jsx("canvas",{ref:b,className:r})}),jL=P.forwardRef(function(e,n){return N.jsx(kC,{children:N.jsx(HL,{ref:n,...e})})});function Q0(t){Object.assign(e_,t)}function PL(){const t=P.useContext(t1);return pM(t.app instanceof q_,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function GL({agentName:t,question:e,onRespond:n}){const[i,r]=P.useState(""),s=()=>{const c=i.trim();c&&(n(c),r(""))},l=c=>{c.key==="Enter"&&s()};return N.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(7, 8, 14, 0.8)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,animation:"fadeIn 0.2s var(--ease-out) both"},children:N.jsxs("div",{style:{background:"var(--surface-2)",border:"1px solid var(--status-warning)",borderRadius:"var(--radius-lg)",boxShadow:"0 0 40px var(--status-warning-glow), var(--shadow-lg)",padding:"var(--sp-6)",maxWidth:440,width:"100%",margin:"0 var(--sp-4)",animation:"scaleIn 0.3s var(--ease-spring) both"},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",marginBottom:"var(--sp-4)"},children:[N.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--radius-full)",background:"var(--status-warning-glow)",border:"1px solid var(--status-warning)",color:"var(--status-warning)",fontSize:"0.7rem",fontWeight:700},children:"◆"}),N.jsxs("h2",{style:{fontFamily:"var(--font-mono)",fontSize:"0.78rem",fontWeight:700,color:"var(--status-warning)",textTransform:"uppercase",letterSpacing:"0.08em"},children:["Checkpoint — ",t]})]}),N.jsx("p",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.6,marginBottom:"var(--sp-5)"},children:e}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)"},children:[N.jsx("input",{type:"text",className:"input",placeholder:"Type your response...",value:i,onChange:c=>r(c.target.value),onKeyPress:l,autoFocus:!0,style:{flex:1}}),N.jsx("button",{onClick:s,className:"btn",style:{background:"var(--status-warning)",color:"var(--text-inverse)",border:"1px solid var(--status-warning)",fontWeight:600,padding:"0 var(--sp-4)"},children:"Send"})]})]})})}const Dw=[16109737,15251594,13935988,13012574,10515018,9133628],zw=[2890510,4861722,9136404,12886874,1710618,9118976],FL=l0,at=FL/2,ft=7,dn=14,di=12,hi=5,Ms=10,gn=4,Rs=9,Tt=8;function Od(t,e,n,i,r){t.circle(e,n-1,ft+1),t.fill(r),t.circle(e,n,ft),t.fill(i),t.circle(e-3,n-1,1.5),t.fill(1710618),t.circle(e+3,n-1,1.5),t.fill(1710618),t.circle(e-2.5,n-1.5,.6),t.fill(16777215),t.circle(e+3.5,n-1.5,.6),t.fill(16777215)}function Dd(t,e,n,i,r,s){t.roundRect(e-i/2,n,i,r,3),t.fill(s),t.moveTo(e-3,n),t.lineTo(e,n+4),t.lineTo(e+3,n),t.stroke({width:1,color:qL(s,.15)})}function Bw(t,e,n,i,r){t.roundRect(e-i-1,n,i,r,2),t.fill(2899536),t.roundRect(e+1,n,i,r,2),t.fill(2899536)}function Lw(t,e,n,i){t.roundRect(e-i-2,n,i+2,3,1),t.fill(1710618),t.roundRect(e,n,i+2,3,1),t.fill(1710618)}function qL(t,e){const n=Math.max(0,(t>>16&255)*(1-e)),i=Math.max(0,(t>>8&255)*(1-e)),r=Math.max(0,(t&255)*(1-e));return Math.floor(n)<<16|Math.floor(i)<<8|Math.floor(r)}function YL(t){const e=new Map;for(let n=0;n<Nv.length;n++){const i=Nv[n],r=Dw[n%Dw.length],s=zw[n%zw.length],l=new Aa;Od(l,at,Tt,r,s),Dd(l,at,Tt+ft,dn,di,i),l.roundRect(at-dn/2-gn,Tt+ft+1,gn,Rs,2),l.fill(i),l.roundRect(at+dn/2,Tt+ft+1,gn,Rs,2),l.fill(i),l.circle(at-dn/2-gn/2,Tt+ft+Rs+1,2),l.fill(r),l.circle(at+dn/2+gn/2,Tt+ft+Rs+1,2),l.fill(r),Bw(l,at,Tt+ft+di,hi,Ms),Lw(l,at,Tt+ft+di+Ms,hi),e.set(`agent-${n}-standing`,t.renderer.generateTexture(l));const c=new Aa,d=Tt+4;Od(c,at,d,r,s),Dd(c,at,d+ft,dn,di-2,i),c.roundRect(at-dn/2-gn+1,d+ft+2,gn,Rs-3,2),c.fill(i),c.roundRect(at+dn/2-1,d+ft+2,gn,Rs-3,2),c.fill(i);const p=6;c.roundRect(at-hi-1,d+ft+di-2,hi+1,p,2),c.fill(2899536),c.roundRect(at,d+ft+di-2,hi+1,p,2),c.fill(2899536),e.set(`agent-${n}-seated`,t.renderer.generateTexture(c));const m=new Aa,g=Tt+4;Od(m,at+2,g,r,s),Dd(m,at+1,g+ft,dn,di-2,i),m.roundRect(at+dn/2,g+ft+2,gn+4,4,2),m.fill(i),m.roundRect(at+dn/2-2,g+ft+2,gn+4,4,2),m.fill(i),m.circle(at+dn/2+gn+3,g+ft+4,2),m.fill(r),m.circle(at+dn/2+gn+1,g+ft+4,2),m.fill(r),c.roundRect(at-hi-1,g+ft+di-2,hi+1,p,2),c.fill(2899536),m.roundRect(at,g+ft+di-2,hi+1,p,2),m.fill(2899536),e.set(`agent-${n}-typing`,t.renderer.generateTexture(m));const b=new Aa;Od(b,at,Tt,r,s),Dd(b,at,Tt+ft,dn,di,i),b.roundRect(at-dn/2-gn,Tt+ft-1,gn,Rs+2,2),b.fill(i),b.roundRect(at+dn/2,Tt+ft+3,gn,Rs-2,2),b.fill(i),b.roundRect(at+1,Tt+ft+di,hi,Ms+2,2),b.fill(2899536),b.roundRect(at-hi-1,Tt+ft+di-2,hi,Ms,2),b.fill(2899536),b.roundRect(at,Tt+ft+di+Ms+1,hi+2,3,1),b.fill(1710618),b.roundRect(at-hi-2,Tt+ft+di+Ms-3,hi+1,3,1),b.fill(1710618),e.set(`agent-${n}-walk-right`,t.renderer.generateTexture(b));const v=new Aa;Od(v,at,Tt,r,s),Dd(v,at,Tt+ft,dn,di,i),v.roundRect(at+dn/2,Tt+ft-1,gn,Rs+2,2),v.fill(i),v.roundRect(at-dn/2-gn,Tt+ft+3,gn,Rs-2,2),v.fill(i),v.roundRect(at-hi-1,Tt+ft+di,hi,Ms+2,2),v.fill(2899536),v.roundRect(at+1,Tt+ft+di-2,hi,Ms,2),v.fill(2899536),v.roundRect(at-hi-2,Tt+ft+di+Ms+1,hi+2,3,1),v.fill(1710618),v.roundRect(at,Tt+ft+di+Ms-3,hi+1,3,1),v.fill(1710618),e.set(`agent-${n}-walk-left`,t.renderer.generateTexture(v));const S=new Aa;Od(S,at,Tt,r,s),Dd(S,at,Tt+ft,dn,di,i),S.roundRect(at-dn/2-gn,Tt+ft+1,gn,Rs,2),S.fill(i),S.circle(at-dn/2-gn/2,Tt+ft+Rs+1,2),S.fill(r),S.roundRect(at+dn/2,Tt+ft,gn,6,2),S.fill(i),S.circle(at+dn/2+gn/2+1,Tt+ft,2),S.fill(r),S.roundRect(at+dn/2+gn/2-1,Tt+ft-6,6,7,1),S.fill(14142664),S.moveTo(at+dn/2+gn/2,Tt+ft-7),S.quadraticCurveTo(at+dn/2+gn/2+2,Tt+ft-11,at+dn/2+gn/2,Tt+ft-14),S.stroke({width:1,color:16777215,alpha:.4}),S.moveTo(at+dn/2+gn/2+3,Tt+ft-7),S.quadraticCurveTo(at+dn/2+gn/2+5,Tt+ft-10,at+dn/2+gn/2+3,Tt+ft-13),S.stroke({width:1,color:16777215,alpha:.3}),Bw(S,at,Tt+ft+di,hi,Ms),Lw(S,at,Tt+ft+di+Ms,hi),e.set(`agent-${n}-coffee`,t.renderer.generateTexture(S))}return e}function VL(t,e){const n=t%Nv.length;let i;switch(e){case"working":i="typing";break;case"typing":i="typing";break;case"standing":i="standing";break;case"coffee":i="coffee";break;case"walk-right":i="walk-right";break;case"walk-left":i="walk-left";break;case"delivering":i="walk-right";break;case"idle":i="standing";break;case"seated":i="seated";break;case"checkpoint":case"done":default:i="seated";break}return`agent-${n}-${i}`}function XL(t,e){const n=CC;t.roundRect(0,0,e.totalWidth,e.totalHeight,4),t.fill(Jd.wall),t.rect(0,0,e.totalWidth,3),t.fill({color:Jd.wallHighlight,alpha:.5}),Iw(t,e.corridorH.x,e.corridorH.y,e.corridorH.width,e.corridorH.height,"horizontal"),Iw(t,e.corridorV.x,e.corridorV.y,e.corridorV.width,e.corridorV.height,"vertical");for(const b of e.squadOrigins){const{origin:v,width:S,height:C,doorSide:T}=b;T==="right"?Qp(t,v.x+S,v.y+C/2-Vo/2,n,Vo):T==="left"?Qp(t,v.x-n,v.y+C/2-Vo/2,n,Vo):T==="top"?Zp(t,v.x+S/2-Vo/2,v.y-n,Vo,n):Zp(t,v.x+S/2-Vo/2,v.y+C,Vo,n)}const i=e.ceoOffice,r=Math.min(Vo,60);Qp(t,i.x+i.width,i.y+i.height/2-r/2,n,r),Zp(t,i.x+i.width/2-r/2,i.y+i.height,r,n);const s=e.bathroomMale;Zp(t,s.x+s.width/2-30,s.y+s.height,60,n);const l=e.bathroomFemale;Zp(t,l.x+l.width/2-30,l.y+l.height,60,n);const c=e.kitchen;Qp(t,c.x+c.width,c.y+c.height/2-30,n,60);const d=e.restArea;Qp(t,d.x-n,d.y+d.height/2-30,n,60);const p=e.corridorV;if(p.height>100){const b=p.x+p.width/2;for(let v=p.y+60;v<p.y+p.height-40;v+=200)Uw(t,b,v)}const m=e.corridorH,g=m.y+m.height/2;for(let b=m.x+80;b<m.x+m.width-80;b+=220)Uw(t,b,g);t.roundRect(0,0,e.totalWidth,e.totalHeight,4),t.stroke({width:2,color:5533306,alpha:.6})}function Zp(t,e,n,i,r){t.rect(e,n,i,r),t.fill(tu.floor),t.rect(e-2,n,2,r),t.fill(Jd.doorFrame),t.rect(e+i,n,2,r),t.fill(Jd.doorFrame)}function Qp(t,e,n,i,r){t.rect(e,n,i,r),t.fill(tu.floor),t.rect(e,n-2,i,2),t.fill(Jd.doorFrame),t.rect(e,n+r,i,2),t.fill(Jd.doorFrame)}function Uw(t,e,n){t.roundRect(e-8,n-12,16,12,2),t.fill(9133628),t.circle(e,n-16,8),t.fill(5025616),t.circle(e-4,n-20,5),t.fill(3706428),t.circle(e+4,n-18,6),t.fill(6732650)}function Iw(t,e,n,i,r,s){t.rect(e,n,i,r),t.fill(tu.floor);const l=40;for(let c=0;c<Math.ceil(r/l);c++){for(let d=0;d<Math.ceil(i/l);d++){const p=e+d*l,m=n+c*l;(c+d)%2===0&&(t.rect(p,m,l,l),t.fill({color:tu.tile,alpha:.5})),t.moveTo(p,n),t.lineTo(p,n+r),t.stroke({width:.5,color:tu.grout,alpha:.3})}t.moveTo(e,n+c*l),t.lineTo(e+i,n+c*l),t.stroke({width:.5,color:tu.grout,alpha:.3})}s==="horizontal"?(t.rect(e+10,n+r/2-2,i-20,4),t.fill({color:tu.stripe,alpha:.3})):(t.rect(e+i/2-2,n+10,4,r-20),t.fill({color:tu.stripe,alpha:.3}))}function Hw(t,e,n,i,r,s){t.rect(e,n,i,r),t.fill(ra.floor);const l=20;for(let T=0;T<Math.ceil(r/l);T++)for(let w=0;w<Math.ceil(i/l);w++)if((T+w)%2===0){const k=e+w*l,M=n+T*l;t.rect(k,M,l,l),t.fill({color:ra.tile,alpha:.4})}for(let T=0;T<=Math.ceil(r/l);T++)t.moveTo(e,n+T*l),t.lineTo(e+i,n+T*l),t.stroke({width:.5,color:ra.tileGrout,alpha:.3});for(let T=0;T<=Math.ceil(i/l);T++)t.moveTo(e+T*l,n),t.lineTo(e+T*l,n+r),t.stroke({width:.5,color:ra.tileGrout,alpha:.3});const c=Math.min(6,Math.max(2,Math.floor((i-20)/70))),d=(i-20)/c,p=80,m=n+r-p-10;for(let T=0;T<c;T++){const w=e+10+T*d;t.rect(w,m,3,p),t.fill(ra.stall),t.rect(w+d-3,m,3,p),t.fill(ra.stall),t.roundRect(w+6,m,d-12,p-4,2),t.fill({color:ra.stallDoor,alpha:.6}),t.circle(w+d-16,m+p/2,2),t.fill({color:7901340,alpha:.8});const k=w+d/2,M=m+p-24;t.roundRect(k-8,M,16,20,4),t.fill(ra.toilet),t.roundRect(k-6,M+2,12,14,3),t.fill(ra.toiletSeat),t.roundRect(k-6,M+2,12,14,3),t.stroke({width:.5,color:12434877,alpha:.5})}const g=Math.min(4,Math.max(2,Math.floor(i/100))),b=i/(g+1),v=n+30;t.rect(e+4,n+4,i-8,60),t.fill({color:ra.wall,alpha:.3});for(let T=0;T<g;T++){const w=e+b*(T+1);t.roundRect(w-12,n+8,24,20,3),t.fill(ra.mirrorFrame),t.roundRect(w-10,n+10,20,16,2),t.fill(ra.mirror),t.roundRect(w-6,n+12,6,10,1),t.fill({color:16777215,alpha:.15}),t.roundRect(w-14,v,28,16,3),t.fill(ra.sink),t.ellipse(w,v+8,8,5),t.fill(ra.sinkBowl),t.ellipse(w,v+8,8,5),t.stroke({width:.5,color:12434877,alpha:.4}),t.roundRect(w-2,v+1,4,6,1),t.fill(ra.pipe)}const S=e+i/2,C=n+r-20;t.roundRect(S-12,C-6,24,14,3),t.fill({color:3622735,alpha:.7}),s==="male"?(t.circle(S,C-2,3),t.fill({color:16777215,alpha:.8}),t.rect(S-3,C+1,6,4),t.fill({color:4367861,alpha:.8})):(t.circle(S,C-2,3),t.fill({color:16777215,alpha:.8}),t.moveTo(S-5,C+5),t.lineTo(S+5,C+5),t.lineTo(S,C+1),t.closePath(),t.fill({color:15684432,alpha:.8})),t.rect(e,n,i,r),t.stroke({width:1,color:0,alpha:.08})}function KL(t,e,n,i,r){t.rect(e,n,i,r),t.fill(tr.floor);const s=24;for(let p=0;p<Math.ceil(r/s);p++)for(let m=0;m<Math.ceil(i/s);m++)(p+m)%2===0&&(t.rect(e+m*s,n+p*s,s,s),t.fill({color:tr.tile,alpha:.4}));for(let p=0;p<=Math.ceil(r/s);p++)t.moveTo(e,n+p*s),t.lineTo(e+i,n+p*s),t.stroke({width:.5,color:tr.tileGrout,alpha:.3});for(let p=0;p<=Math.ceil(i/s);p++)t.moveTo(e+p*s,n),t.lineTo(e+p*s,n+r),t.stroke({width:.5,color:tr.tileGrout,alpha:.3});t.roundRect(e+6,n+10,24,r-20,3),t.fill(tr.counter),t.roundRect(e+7,n+11,22,r-22,2),t.fill(tr.counterTop),t.roundRect(e+6,n+10,24,40,3),t.fill(tr.fridge),t.roundRect(e+8,n+12,20,18,2),t.fill(tr.fridgeDoor),t.roundRect(e+8,n+32,20,16,2),t.fill(tr.fridgeDoor),t.roundRect(e+26,n+20,2,8,1),t.fill(tr.fridgeHandle),t.roundRect(e+26,n+36,2,8,1),t.fill(tr.fridgeHandle),t.roundRect(e+10,n+60,16,20,2),t.fill(tr.coffeeMaker),t.circle(e+18,n+64,2),t.fill({color:tr.coffeeMakerLight,alpha:.9});const l=e+i/2-16,c=n+r/2-12;t.roundRect(l,c,32,24,4),t.fill(tr.table),t.roundRect(l+2,c+2,28,20,3),t.fill(tr.tableTop);const d=[{cx:l-6,cy:c+12},{cx:l+38,cy:c+12},{cx:l+16,cy:c+30}];for(const p of d)t.roundRect(p.cx-5,p.cy-5,10,10,3),t.fill(tr.chair);t.circle(e+i/2,n+8,4),t.fill({color:tr.lamp,alpha:.6}),t.circle(e+i/2,n+8,8),t.fill({color:tr.lamp,alpha:.1}),t.rect(e,n,i,r),t.stroke({width:1,color:0,alpha:.08})}function WL(t,e,n,i,r){t.rect(e,n,i,r),t.fill(Ea.floor),t.roundRect(e+8,n+8,i-16,r-16,6),t.fill({color:Ea.carpet,alpha:.2}),t.roundRect(e+12,n+12,i-24,r-24,4),t.stroke({width:1,color:Ea.carpetBorder,alpha:.15});const s=e+10,l=n+10,c=i-20,d=28;t.roundRect(s,l,c,10,3),t.fill(Ea.sofaArm),t.roundRect(s,l+8,c,d-8,4),t.fill(Ea.sofa);const p=(c-12)/3;for(let S=0;S<3;S++)t.roundRect(s+4+S*(p+2),l+10,p,d-14,3),t.fill(Ea.sofaCushion);t.roundRect(s-2,l+6,6,d-4,2),t.fill(Ea.sofaArm),t.roundRect(s+c-4,l+6,6,d-4,2),t.fill(Ea.sofaArm);const m=e+i/2,g=n+r-20;t.roundRect(m-12,g+8,24,10,2),t.fill(Ea.tvStand),t.roundRect(m-20,g-12,40,22,2),t.fill(Ea.tv),t.roundRect(m-18,g-10,36,18,1),t.fill(Ea.tvScreen),t.roundRect(m-14,g-8,10,6,1),t.fill({color:16777215,alpha:.05});const b=e+i-30,v=n+r/2-8;t.roundRect(b,v,20,16,3),t.fill(Ea.sideTable),t.rect(b+3,v+2,8,11),t.fill({color:Ea.magazine,alpha:.7}),t.rect(b+8,v+4,8,10),t.fill({color:Ea.magazineAlt,alpha:.6}),t.roundRect(e+8,n+r-40,12,10,2),t.fill(9133628),t.circle(e+14,n+r-34,7),t.fill(5025616),t.circle(e+11,n+r-38,4),t.fill(3706428),t.rect(e,n,i,r),t.stroke({width:1,color:0,alpha:.08})}function $L(t,e,n){t.rect(0,0,e,n),t.fill(dt.floor);const i=20,r=80;for(let g=0;g<Math.ceil(n/i);g++){const b=g%2*(r/2),v=g*i;t.moveTo(0,v),t.lineTo(e,v),t.stroke({width:1,color:dt.floorGrout,alpha:.4});for(let S=0;S<Math.ceil(e/r)+1;S++){const C=S*r-b;C>0&&C<e&&(t.moveTo(C,v),t.lineTo(C,v+i),t.stroke({width:1,color:dt.floorGrout,alpha:.25}))}g%3===0&&(t.rect(0,v+2,e,i-4),t.fill({color:dt.floorHighlight,alpha:.08}))}const s=42;t.rect(0,s,e,4),t.fill({color:0,alpha:.1}),t.rect(0,0,e,s),t.fill({color:dt.wall,alpha:.2}),t.rect(0,0,e,3),t.fill({color:dt.wallTrim,alpha:.15}),t.rect(0,s-4,e,4),t.fill({color:dt.baseboard,alpha:.2});const l=120,c=e-l*2,d=n-200,p=l,m=100;c>100&&d>60&&(t.roundRect(p+3,m+3,c,d,6),t.fill({color:0,alpha:.08}),t.roundRect(p,m,c,d,6),t.fill({color:dt.rug,alpha:.15}),t.roundRect(p+4,m+4,c-8,d-8,4),t.stroke({width:1.5,color:dt.rugBorder,alpha:.12}),t.roundRect(p+12,m+12,c-24,d-24,3),t.stroke({width:1,color:dt.rugPattern,alpha:.1}))}function ZL(t,e,n){const i=e+ol/2,r=n+Jc+8;for(let C=0;C<5;C++){const T=C/5*Math.PI*2-Math.PI/2,w=i+Math.cos(T)*10,k=r+14+Math.sin(T)*5;t.circle(w,k,2),t.fill(dt.chairWheel)}t.rect(i-1.5,r+4,3,12),t.fill(dt.chairBase),t.roundRect(i-14,r,28,10,4),t.fill(dt.chairSeat),t.roundRect(i-12,r+1,24,4,3),t.fill({color:dt.chairBack,alpha:.5}),t.roundRect(i-12,r-16,24,18,5),t.fill(dt.chairBack),t.roundRect(i-10,r-14,20,8,3),t.fill({color:16777215,alpha:.05}),t.roundRect(e+3,n+3,ol,Jc,4),t.fill({color:0,alpha:.12}),t.roundRect(e,n,ol,Jc,4),t.fill(dt.desk),t.roundRect(e+2,n+2,ol-4,Jc-4,3),t.fill(dt.deskTop);for(let C=0;C<3;C++){const T=n+10+C*16;t.moveTo(e+6,T),t.lineTo(e+ol-6,T),t.stroke({width:.5,color:dt.deskShadow,alpha:.2})}t.rect(e+2,n+Jc-6,ol-4,4),t.fill(dt.deskEdge);const s=4,l=8;t.rect(e+4,n+Jc,s,l),t.fill(dt.deskLeg),t.rect(e+ol-4-s,n+Jc,s,l),t.fill(dt.deskLeg);const c=32,d=22,p=e+(ol-c)/2,m=n+8;t.roundRect(p+c/2-10,m+d+4,20,4,2),t.fill(dt.monitorStand),t.rect(p+c/2-2,m+d,4,6),t.fill(dt.monitorStand),t.roundRect(p,m,c,d,2),t.fill(dt.monitor),t.roundRect(p+2,m+2,c-4,d-5,1),t.fill(dt.monitorScreen),t.roundRect(p+3,m+3,c-6,6,1),t.fill({color:dt.monitorScreenGlow,alpha:.3});const g=24,b=8,v=p+(c-g)/2,S=m+d+10;t.roundRect(v,S,g,b,2),t.fill(dt.keyboard);for(let C=0;C<3;C++)for(let T=0;T<6;T++)t.rect(v+2+T*3.5,S+1.5+C*2.5,2.5,1.5),t.fill(dt.keyboardKey);t.roundRect(e+ol-18,n+14,7,8,2),t.fill(14142664),t.roundRect(e+ol-11,n+16,3,4,1),t.fill(14142664),t.rect(e+8,n+20,14,18),t.fill(16775620),t.rect(e+8,n+20,14,2),t.fill(16635957),t.rect(e+10,n+24,10,1.5),t.fill(1402304)}function QL(t,e,n){t.roundRect(e+2,n+2,44,64,3),t.fill({color:0,alpha:.1}),t.roundRect(e,n,44,64,3),t.fill(dt.bookshelf),t.roundRect(e+1,n+1,42,62,2),t.stroke({width:1,color:dt.bookshelfEdge,alpha:.3}),t.rect(e+3,n+3,38,58),t.fill({color:6048310,alpha:.5});for(let i=0;i<3;i++){const r=n+8+i*20;t.rect(e+3,r+14,38,3),t.fill(dt.bookshelfEdge),t.rect(e+3,r+17,38,1),t.fill({color:0,alpha:.1});const s=4+i%2;for(let l=0;l<s;l++){const c=e+5+l*(34/s),d=Math.max(4,34/s-2),p=10+(l*3+i*2)%5,m=(l+i*3)%dt.bookColors.length;t.rect(c,r+14-p,d,p),t.fill(dt.bookColors[m]),t.rect(c+1,r+14-p+2,.8,p-4),t.fill({color:16777215,alpha:.15})}i===1&&(t.circle(e+38,r+8,4),t.fill({color:4367861,alpha:.6}),t.circle(e+38,r+8,4),t.stroke({width:.5,color:2001125,alpha:.4}))}t.roundRect(e+14,n-4,8,6,1),t.fill(dt.pot),t.circle(e+18,n-6,5),t.fill(dt.plantLight),t.circle(e+15,n-8,3),t.fill(dt.plant)}function jw(t,e,n){t.ellipse(e+12,n+34,12,3),t.fill({color:0,alpha:.1}),t.moveTo(e+2,n+16),t.lineTo(e+4,n+32),t.lineTo(e+20,n+32),t.lineTo(e+22,n+16),t.closePath(),t.fill(dt.pot),t.roundRect(e,n+14,24,5,2),t.fill(dt.potRim),t.roundRect(e+2,n+14,20,2,1),t.fill({color:16777215,alpha:.08}),t.ellipse(e+12,n+16,10,3),t.fill(dt.soil),t.rect(e+11,n+2,2,14),t.fill(dt.plantDark),t.ellipse(e+6,n+4,7,5),t.fill(dt.plantDark),t.ellipse(e+18,n+2,6,5),t.fill(dt.plantDark),t.ellipse(e+12,n+1,8,6),t.fill(dt.plant),t.ellipse(e+4,n+8,6,4),t.fill(dt.plant),t.ellipse(e+20,n+8,6,4),t.fill(dt.plant),t.ellipse(e+9,n+5,5,4),t.fill(dt.plantLight),t.ellipse(e+15,n+3,5,4),t.fill(dt.plantLight),t.moveTo(e+12,n-2),t.lineTo(e+12,n+6),t.stroke({width:.5,color:dt.plantDark,alpha:.3})}function JL(t,e,n){t.roundRect(e+2,n+2,80,40,4),t.fill({color:0,alpha:.1}),t.roundRect(e,n,80,40,4),t.fill(Or.counter),t.roundRect(e+1,n+1,78,8,3),t.fill(Or.counterTop),t.roundRect(e+2,n+2,76,3,2),t.fill({color:16777215,alpha:.06}),t.roundRect(e+4,n-14,28,38,3),t.fill(Or.machine),t.roundRect(e+5,n-14,26,6,2),t.fill(Or.machineTop),t.roundRect(e+8,n+16,20,4,1),t.fill({color:2503224,alpha:.8}),t.rect(e+13,n+8,3,8),t.fill(Or.machineTop),t.rect(e+20,n+8,3,8),t.fill(Or.machineTop),t.circle(e+18,n-8,2.5),t.fill({color:Or.machineLight,alpha:.9}),t.circle(e+18,n-8,5),t.fill({color:Or.machineLight,alpha:.15}),t.roundRect(e+38,n+8,8,10,2),t.fill(Or.cup),t.roundRect(e+46,n+10,3,5,1),t.fill(Or.cup),t.roundRect(e+48,n+6,8,10,2),t.fill(Or.cupShadow),t.ellipse(e+42,n+20,10,3),t.fill(Or.saucer),t.roundRect(e+60,n+6,16,14,3),t.fill(Or.sink),t.roundRect(e+62,n+8,12,10,2),t.fill({color:5533306,alpha:.8}),t.rect(e+66,n-2,3,10),t.fill(Or.faucet),t.roundRect(e+65,n-4,8,3,1),t.fill(Or.faucet),t.roundRect(e+10,n-30,30,14,2),t.fill(Or.menu),t.rect(e+14,n-27,22,2),t.fill({color:16777215,alpha:.5}),t.rect(e+14,n-23,16,1.5),t.fill({color:16777215,alpha:.3}),t.rect(e+14,n-20,18,1.5),t.fill({color:16777215,alpha:.3})}function e8(t,e,n){t.roundRect(e-16,n-24,128,96,6),t.fill({color:Xa.carpet,alpha:.25}),t.roundRect(e-12,n-20,120,88,4),t.stroke({width:1,color:Xa.carpetPattern,alpha:.2});const i=e+10,r=n-20;t.roundRect(i+2,r+2,76,16,2),t.fill({color:0,alpha:.1}),t.roundRect(i,r,76,16,2),t.fill(Xa.whiteboardFrame),t.roundRect(i+2,r+2,72,12,1),t.fill(Xa.whiteboard),t.rect(i+6,r+4,18,8),t.fill({color:16775620,alpha:.6}),t.rect(i+28,r+4,18,8),t.fill({color:12312315,alpha:.6}),t.rect(i+50,r+4,18,8),t.fill({color:13166281,alpha:.6}),t.roundRect(i+20,r+14,36,3,1),t.fill(Xa.whiteboardFrame),t.roundRect(e+3,n+3,96,48,6),t.fill({color:0,alpha:.1}),t.roundRect(e,n,96,48,6),t.fill(Xa.table),t.roundRect(e+2,n+2,92,44,5),t.fill(Xa.tableTop),t.roundRect(e+6,n+4,40,10,3),t.fill({color:16777215,alpha:.04}),t.roundRect(e+1,n+1,94,46,5),t.stroke({width:1,color:Xa.tableEdge,alpha:.4});const s=4,l=6;t.rect(e+8,n+48,s,l),t.fill(Xa.tableLeg),t.rect(e+84,n+48,s,l),t.fill(Xa.tableLeg);const c=[{cx:e+16,cy:n-10},{cx:e+48,cy:n-10},{cx:e+80,cy:n-10},{cx:e+16,cy:n+56},{cx:e+48,cy:n+56},{cx:e+80,cy:n+56}];for(const d of c){const m=d.cy<n?d.cy-6:d.cy+6;t.roundRect(d.cx-8,m-4,16,10,3),t.fill(Xa.chairBack),t.roundRect(d.cx-7,d.cy-4,14,8,3),t.fill(Xa.chairSeat),t.roundRect(d.cx-5,d.cy-3,10,3,2),t.fill({color:16777215,alpha:.06}),t.circle(d.cx,d.cy+5,2),t.fill(Xa.chair)}t.roundRect(e+10,n+8,18,12,2),t.fill(3622735),t.roundRect(e+11,n+9,16,8,1),t.fill(4545124),t.rect(e+60,n+12,12,16),t.fill({color:16777215,alpha:.7}),t.rect(e+62,n+14,8,1),t.fill({color:3355443,alpha:.3}),t.rect(e+62,n+17,6,1),t.fill({color:3355443,alpha:.3}),t.roundRect(e+40,n+10,6,14,2),t.fill({color:4367861,alpha:.6}),t.roundRect(e+41,n+7,4,4,1),t.fill({color:9489145,alpha:.5})}const t8={running:uf.statusRunning,idle:uf.statusIdle,completed:uf.statusCompleted,checkpoint:uf.statusCheckpoint};function n8(t,e,n,i){const r=n*.85,s=e+(n-r)/2,l=6,c=30;t.roundRect(s+2,l+2,r,c,8),t.fill({color:0,alpha:.15}),t.roundRect(s,l,r,c,8),t.fill({color:uf.background,alpha:.85}),t.roundRect(s+2,l+1,r-4,8,6),t.fill({color:uf.backgroundGlow,alpha:.4}),t.roundRect(s,l,r,c,8),t.stroke({width:1,color:16777215,alpha:.08});const d=t8[i]??uf.statusIdle,p=s+r-18,m=l+c/2;t.circle(p,m,7),t.fill({color:d,alpha:.2}),t.circle(p,m,4),t.fill(d),t.circle(p-1,m-1,1.5),t.fill({color:16777215,alpha:.3}),t.circle(s+14,m,2),t.fill({color:16777215,alpha:.1})}Q0({Container:br,Graphics:Aa,Sprite:ih,Text:Z0});function n1({agent:t,textures:e,bubbleText:n,animX:i,animY:r,animPose:s}){const l=VL(t.colorIndex,s),c=e.get(l),d=AD[t.status==="walking"?"idle":t.status]??8947848,p=t.status==="checkpoint",m=P.useCallback(b=>{b.clear(),b.circle(0,0,l0/2+6),b.fill({color:d,alpha:p?.4:.15})},[d,p]),g=P.useCallback(b=>{if(b.clear(),!n)return;const v=Math.min(n.length*5+16,160);b.roundRect(-v/2,-42,v,22,6),b.fill({color:1710638,alpha:.9}),b.moveTo(-4,-20),b.lineTo(4,-20),b.lineTo(0,-15),b.closePath(),b.fill({color:1710638,alpha:.9})},[n]);return N.jsxs("container",{x:i,y:r,children:[N.jsx("graphics",{draw:m}),c&&N.jsx("sprite",{texture:c,anchor:.5}),N.jsx("text",{text:t.name,y:l0/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),p&&N.jsx("text",{text:"⚠",y:-l0/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&N.jsxs(N.Fragment,{children:[N.jsx("graphics",{draw:g}),N.jsx("text",{text:n.length>80?n.slice(-80)+"…":n,y:-31,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}Q0({Container:br,Graphics:Aa,Text:Z0});function i8({squadName:t,status:e,agents:n,textures:i,bubbles:r,animStates:s,originX:l,originY:c,roomWidth:d,roomHeight:p}){const m={x:0,y:0},g=dm(m,d,p),b=AC(m,d,p),v=P.useCallback(S=>{S.clear(),$L(S,d,p),n8(S,0,d,e);for(let C=0;C<n.length;C++){const T=Wd(C,m);ZL(S,T.x-48,T.y-32)}JL(S,g.x,g.y),e8(S,b.x,b.y),QL(S,d-60,44),jw(S,10,p-50),jw(S,d-40,50)},[n.length,e,d,p]);return N.jsxs("container",{x:l,y:c,children:[N.jsx("graphics",{draw:v}),N.jsx("text",{text:t,x:d/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(S=>{const C=`${t}:${S.id}`,T=r[C],w=s[S.id];return w!=null&&w.isExternalTransit?null:N.jsx(n1,{agent:S,textures:i,bubbleText:(T==null?void 0:T.text)??null,animX:(w==null?void 0:w.x)??S.position.x,animY:(w==null?void 0:w.y)??S.position.y,animPose:(w==null?void 0:w.pose)??(S.status==="working"?"typing":"seated")},S.id)})]})}function r8(t,e,n,i,r){t.rect(e,n,i,r),t.fill(Sa.floor);const s=16,l=60;for(let Y=0;Y<Math.ceil(r/s);Y++){const X=Y%2*(l/2),ne=n+Y*s;t.moveTo(e,ne),t.lineTo(e+i,ne),t.stroke({width:.5,color:4861984,alpha:.3});for(let q=0;q<Math.ceil(i/l)+1;q++){const J=e+q*l-X;J>e&&J<e+i&&(t.moveTo(J,ne),t.lineTo(J,ne+s),t.stroke({width:.5,color:4861984,alpha:.2}))}}const c=30,d=i-c*2,p=r-c*2,m=e+c,g=n+c;t.roundRect(m+2,g+2,d,p,6),t.fill({color:0,alpha:.1}),t.roundRect(m,g,d,p,6),t.fill({color:Sa.carpet,alpha:.6}),t.roundRect(m+6,g+6,d-12,p-12,4),t.stroke({width:1.5,color:Sa.carpetBorder,alpha:.4}),t.roundRect(m+14,g+14,d-28,p-28,3),t.stroke({width:1,color:16766287,alpha:.15});const b=e+8,v=n+40,S=6,C=80;t.roundRect(b-2,v-2,S+4,C+4,2),t.fill(Sa.windowFrame),t.roundRect(b,v,S,C,1),t.fill(Sa.window),t.rect(b+1,v+4,2,C/3),t.fill({color:16777215,alpha:.2}),t.roundRect(b-4,v+C+2,S+8,3,1),t.fill(Sa.windowSill);const T=120,w=60,k=e+i/2-T/2,M=n+r/2-w/2-10;t.roundRect(k+3,M+3,T,w,4),t.fill({color:0,alpha:.12}),t.roundRect(k,M,T,w,4),t.fill(Sa.desk),t.roundRect(k+3,M+3,T-6,w-6,3),t.fill(Sa.deskTop),t.roundRect(k+1,M+1,T-2,w-2,4),t.stroke({width:1,color:Sa.deskEdge,alpha:.3}),t.roundRect(k+20,M+8,32,22,2),t.fill(2236976),t.roundRect(k+22,M+10,28,16,1),t.fill(1981020),t.roundRect(k+18,M+34,36,10,2),t.fill(3355456),t.rect(k+70,M+10,16,22),t.fill({color:16777215,alpha:.7}),t.rect(k+72,M+14,10,1),t.fill({color:3355443,alpha:.3}),t.rect(k+72,M+17,8,1),t.fill({color:3355443,alpha:.3}),t.roundRect(k+90,M+12,10,14,2),t.fill(3622735),t.circle(k+100,M+42,5),t.fill(14142664),t.circle(k+100,M+42,3),t.fill(7951688);const O=k+T/2,H=M+w+16;t.roundRect(O-14,H-4,28,16,6),t.fill(Sa.chair),t.roundRect(O-12,H-8,24,12,4),t.fill(Sa.chairSeat),t.roundRect(O-8,H-6,16,4,2),t.fill({color:16777215,alpha:.06}),t.circle(O,H+14,3),t.fill(4473924);for(const Y of[-8,0,8])t.circle(O+Y,H+18,1.5),t.fill(3355443);const z=e+i-54,F=n+20;t.roundRect(z,F,44,80,3),t.fill(Sa.bookshelf);const $=[15022389,2001125,4431943,16750592,9315498,35195];for(let Y=0;Y<3;Y++){const X=F+8+Y*26;t.rect(z+3,X+18,38,3),t.fill(9139029);for(let ne=0;ne<5;ne++){const q=z+5+ne*7,J=12+(ne*3+Y*2)%6;t.rect(q,X+18-J,5,J),t.fill($[(ne+Y*2)%$.length])}}const j=e+i-54,I=n+r-60;t.roundRect(j,I+10,24,16,2),t.fill(6111287),t.rect(j+10,I+4,4,8),t.fill(7901340),t.circle(j+12,I,10),t.fill(Sa.globe),t.circle(j+12,I,10),t.stroke({width:.5,color:2001125,alpha:.4}),t.circle(j+9,I-3,3),t.fill({color:16777215,alpha:.15}),t.roundRect(k+44,M+38,36,10,2),t.fill(Sa.nameplate),t.roundRect(k+44,M+38,36,10,2),t.stroke({width:.5,color:13215744,alpha:.5}),t.rect(e,n,i,r),t.stroke({width:1,color:0,alpha:.08})}Q0({Container:br,Graphics:Aa,Text:Z0});const Pw=["Precisamos escalar o time de vendas...","O Q4 vai ser decisivo.","Investir mais em marketing digital.","Meta trimestral no caminho certo.","Revisar budget de R&D...","Nova parceria pode mudar tudo.","Churn rate precisa cair 20%.","Hora de expandir para LATAM.","Reunião com investidores amanhã.","NPS subiu 15 pontos!","Cultura da empresa vem primeiro.","Mais dados antes de decidir.","Vamos automatizar esse processo.","Roadmap do próximo quarter...","Reter talentos é prioridade.","Revenue cresceu 30% no trimestre.","Precisamos de mais diversidade no time.","O mercado está mudando rápido.","Foco no cliente sempre.","Inovação é nosso diferencial."],Uy=900,Gw=2400,a8=6e3,s8={id:"ceo",name:"CEO",colorIndex:3,status:"working",deskIndex:0,position:{x:0,y:0},targetPosition:null};function l8({x:t,y:e,width:n,height:i,textures:r,ticker:s}){const[l,c]=P.useState(null),[d,p]=P.useState("seated"),m=P.useRef(0),g=P.useRef(Uy+Math.floor(Math.random()*(Gw-Uy))),b=P.useRef(null),v=n/2,S=i/2+10,C=P.useCallback(T=>{T.clear(),r8(T,0,0,n,i)},[n,i]);return P.useEffect(()=>{if(!s)return;const T=()=>{m.current++;const w=m.current,k=Math.floor(w/48)%2===0?"typing":"seated";if(p(k),g.current--,g.current<=0){const M=Pw[Math.floor(Math.random()*Pw.length)];c(M),p("standing"),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{c(null)},a8),g.current=Uy+Math.floor(Math.random()*(Gw-Uy))}};return s.add(T),()=>{s.remove(T),b.current&&clearTimeout(b.current)}},[s]),N.jsxs("container",{x:t,y:e,children:[N.jsx("graphics",{draw:C}),N.jsx("text",{text:"CEO",x:n/2,y:12,anchor:.5,style:{fontSize:13,fill:"#ffd700",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx(n1,{agent:s8,textures:r,bubbleText:l,animX:v,animY:S,animPose:d})]})}const Gx=150,o8=48,Fx=30,Iy=3,c8=4e3,Hy=600,qx=1800,u8=60,Fw=900,qw=5e3,Yw=[["Cafe novo?","Sim, colombiano!"],["Viu o deploy?","Passou nos testes!"],["Reuniao as 3?","Vou confirmar."],["Bug no login?","Ja corrigi."],["Almoco onde?","Sushi hoje?"],["PR aprovado?","Mergeei agora."],["Ta ocupado?","Pode falar."],["Deadline?","Sexta-feira."],["Novo feature?","Ficou muito bom!"],["Ajuda aqui?","Claro, mostra."],["Sprint review?","Amanha cedo."],["Stand-up?","Ja comecou!"],["Refatorei aquele modulo.","Ficou mais limpo."],["Testes passando?","Todos verdes!"],["Viu o Figma?","Design top!"],["Pipeline rodou?","Em 2 min."],["Code review?","Ja olhei, aprovo."],["Qual branch?","feature/office."],["Bom dia!","Bom dia! Tudo bem?"],["Feriado proximo?","Semana que vem!"]];function f8(t,e,n,i,r,s){const l={x:0,y:0},c=Math.random();if(c<.2){const d={x:r+t.x,y:s+t.y},p=hm(d,`squad-${i}`,"kitchen",n),m=LD(n);return{x:m.x,y:m.y,destination:"kitchen",waypoints:p,isExternal:!0}}else if(c<.35){const d={x:r+t.x,y:s+t.y},p=hm(d,`squad-${i}`,"rest-area",n),m=UD(n);return{x:m.x,y:m.y,destination:"restArea",waypoints:p,isExternal:!0}}else if(c<.45){const d=Math.random()<.5?"male":"female",p={x:r+t.x,y:s+t.y},m=d==="male"?"bathroom-male":"bathroom-female",g=hm(p,`squad-${i}`,m,n),b=BD(n,d);return{x:b.x,y:b.y,destination:m,waypoints:g,isExternal:!0}}else if(c<.6){const d=AC(l,e.width,e.height);return{x:d.x+(Math.random()-.5)*40,y:d.y+(Math.random()-.5)*30,destination:"meeting"}}else if(c<.75){const d=dm(l,e.width,e.height);return{x:d.x+(Math.random()-.5)*30,y:d.y+(Math.random()-.5)*20,destination:"coffee"}}else if(c<.9){const d={x:r+t.x,y:s+t.y},p=ID(n),m=[d,n.doorPoints[`squad-${i}`],p];return{x:p.x,y:p.y,destination:"corridor",waypoints:m,isExternal:!0}}else{const d=Math.floor(Math.random()*4),p=Wd(d,l,e.width,e.height);return{x:p.x+(Math.random()-.5)*40,y:p.y+(Math.random()-.5)*20,destination:"neighbor"}}}function d8(t){const[e,n]=P.useState({}),i=P.useRef({}),r=P.useRef({}),s=P.useRef({}),l=P.useRef({}),c=P.useRef(0),d=P.useRef({}),p=P.useRef({});P.useEffect(()=>{const g=ri.subscribe((b,v)=>{var T,w;const S=b.bubbles,C=v.bubbles;for(const k of Object.keys(S))if(((T=S[k])==null?void 0:T.updatedAt)!==((w=C[k])==null?void 0:w.updatedAt)){d.current[k]&&clearTimeout(d.current[k]);const[M,O]=k.split(":");d.current[k]=setTimeout(()=>{ri.getState().clearBubble(M,O),delete d.current[k]},c8)}});return()=>{g();for(const b of Object.values(d.current))clearTimeout(b);d.current={}}},[]);const m=P.useCallback(()=>{c.current++;const g=c.current,b=ri.getState(),v={},S=y0(b.rooms.length);for(const[C,T]of Object.entries(b.agentVisuals)){i.current[C]||(i.current[C]={}),r.current[C]||(r.current[C]={}),v[C]={};const w=b.rooms.indexOf(C),k=S.squadOrigins[w],M=(k==null?void 0:k.origin)??{x:0,y:0},O=[];for(const H of T){const z=i.current[C],F=r.current[C],$=`${C}:${H.id}`;F[H.id]||(F[H.id]={x:H.position.x,y:H.position.y,baseY:H.position.y},s.current[$]=Math.floor(Math.random()*qx));const j=F[H.id];if(H.targetPosition&&(!z[H.id]||z[H.id].progress>=1)){const Y=z[H.id];if(Y!=null&&Y.isExternalTransit){const X=Y.globalX??j.x+M.x,ne=Y.globalY??j.y+M.y,q={x:X,y:ne},J={x:H.targetPosition.x+M.x,y:H.targetPosition.y+M.y},B=l.current[$],V=B==="kitchen"?"kitchen":B==="restArea"?"rest-area":B==="bathroom-male"?"bathroom-male":B==="bathroom-female"?"bathroom-female":`squad-${w}`,Z=hm(q,V,`squad-${w}`,S);Z[Z.length-1]=J;const Q=Z.shift(),G=Z.length>0?Z.shift():Q,K=_y(Q,G);z[H.id]={startX:Q.x,startY:Q.y,targetX:G.x,targetY:G.y,progress:0,duration:Math.max(30,Math.ceil(K/Iy)),baseY:H.targetPosition.y,waypointQueue:Z,isExternalTransit:!0,globalX:X,globalY:ne}}else z[H.id]={startX:j.x,startY:j.baseY,targetX:H.targetPosition.x,targetY:H.targetPosition.y,progress:0,duration:Gx,baseY:H.targetPosition.y,waypointQueue:[],isExternalTransit:!1}}if(H.status==="idle"&&(!z[H.id]||z[H.id].progress>=1)){const Y=z[H.id];if(Y!=null&&Y.isExternalTransit&&Y.waypointQueue.length===0&&Y.progress>=1&&(Y.globalX!==void 0&&Y.globalY!==void 0&&(j.x=Y.globalX-M.x,j.y=Y.globalY-M.y,j.baseY=j.y),Y.isExternalTransit=!1,Y.globalX=void 0,Y.globalY=void 0),s.current[$]===void 0&&(s.current[$]=Hy+Math.floor(Math.random()*(qx-Hy))),s.current[$]--,s.current[$]<=0){const X=z[H.id];if(X!=null&&X.isExternalTransit){const ne=X.globalX??j.x+M.x,q=X.globalY??j.y+M.y,J={x:ne,y:q},B=Wd(H.deskIndex,{x:0,y:0}),V={x:B.x+M.x,y:B.y+M.y},Z=l.current[$],Q=Z==="kitchen"?"kitchen":Z==="restArea"?"rest-area":Z==="bathroom-male"?"bathroom-male":Z==="bathroom-female"?"bathroom-female":`squad-${w}`,G=hm(J,Q,`squad-${w}`,S);G[G.length-1]=V;const K=G.shift(),te=G.length>0?G.shift():K,U=_y(K,te);l.current[$]="neighbor",z[H.id]={startX:K.x,startY:K.y,targetX:te.x,targetY:te.y,progress:0,duration:Math.max(30,Math.ceil(U/Iy)),baseY:B.y,waypointQueue:G,isExternalTransit:!0,globalX:ne,globalY:q}}else{const q=f8(M,k??{width:$o,height:$a},S,w,j.x,j.baseY);if(l.current[$]=q.destination,q.isExternal&&q.waypoints&&q.waypoints.length>1){const J=[...q.waypoints],B=J.shift(),V=J.length>0?J.shift():B,Z=_y(B,V);z[H.id]={startX:B.x,startY:B.y,targetX:V.x,targetY:V.y,progress:0,duration:Math.max(30,Math.ceil(Z/Iy)),baseY:q.y-M.y,waypointQueue:J,isExternalTransit:!0,globalX:B.x,globalY:B.y}}else z[H.id]={startX:j.x,startY:j.baseY,targetX:q.x,targetY:q.y,progress:0,duration:Gx+Math.floor(Math.random()*30),baseY:q.y,waypointQueue:[],isExternalTransit:!1}}s.current[$]=Hy+Math.floor(Math.random()*(qx-Hy))}}const I=z[H.id];if(I&&I.progress<1){I.progress=Math.min(1,I.progress+1/I.duration);const Y=OD(I.progress);if(I.isExternalTransit){const X=vy(I.startX,I.targetX,Y),ne=vy(I.startY,I.targetY,Y);I.globalX=X,I.globalY=ne,j.x=X-M.x,j.y=ne-M.y;const q=Math.floor(g/Fx)%2===0?"walk-right":"walk-left";v[C][H.id]={x:j.x,y:j.y,pose:q,isExternalTransit:!0,globalX:X,globalY:ne}}else{j.x=vy(I.startX,I.targetX,Y),j.y=vy(I.startY,I.targetY,Y),j.baseY=I.baseY;const X=Math.floor(g/Fx)%2===0?"walk-right":"walk-left";v[C][H.id]={x:j.x,y:j.y,pose:X}}}else if(I&&I.progress>=1&&I.waypointQueue.length>0){const Y=I.waypointQueue.shift(),X={x:I.targetX,y:I.targetY},ne=_y(X,Y);I.startX=I.targetX,I.startY=I.targetY,I.targetX=Y.x,I.targetY=Y.y,I.progress=0,I.duration=I.isExternalTransit?Math.max(30,Math.ceil(ne/Iy)):Gx,I.isExternalTransit&&(I.globalX=I.startX,I.globalY=I.startY);const q=Math.floor(g/Fx)%2===0?"walk-right":"walk-left";I.isExternalTransit?v[C][H.id]={x:j.x,y:j.y,pose:q,isExternalTransit:!0,globalX:I.startX,globalY:I.startY}:v[C][H.id]={x:j.x,y:j.y,pose:q}}else if(H.status==="working"){const Y=Math.floor(g/o8)%2===0?"typing":"seated";v[C][H.id]={x:j.x,y:j.baseY,pose:Y}}else if(H.status==="idle"){const Y=l.current[$]??"coffee",X=z[H.id];if((X==null?void 0:X.isExternalTransit)??!1)v[C][H.id]={x:j.x,y:j.y,pose:"standing",isExternalTransit:!0,globalX:(X==null?void 0:X.globalX)??j.x+M.x,globalY:(X==null?void 0:X.globalY)??j.y+M.y};else{const q=Math.sin(g*.07+H.deskIndex*1.5)*2;let J;Y==="coffee"||Y==="kitchen"?J="coffee":Y==="meeting"||Y==="neighbor"?J=Math.floor(g/90)%2===0?"standing":"coffee":Y==="restArea"?J="seated":(Y.startsWith("bathroom"),J="standing"),v[C][H.id]={x:j.x,y:j.baseY+q,pose:J},O.push({agentKey:$,agentId:H.id,agentName:H.name,x:j.x,y:j.baseY})}}else H.status==="checkpoint"?v[C][H.id]={x:j.x,y:j.baseY,pose:"seated"}:v[C][H.id]={x:j.x,y:j.baseY,pose:"seated"}}if(g%60===0&&O.length>=2)for(let H=0;H<O.length;H++){const z=O[H];if(!(p.current[z.agentKey]&&g-p.current[z.agentKey]<Fw)&&!b.bubbles[z.agentKey])for(let F=H+1;F<O.length;F++){const $=O[F];if(p.current[$.agentKey]&&g-p.current[$.agentKey]<Fw||b.bubbles[$.agentKey])continue;const j=z.x-$.x,I=z.y-$.y;if(Math.sqrt(j*j+I*I)<u8){const[X,ne]=Yw[Math.floor(Math.random()*Yw.length)];b.appendBubble(C,z.agentId,X),setTimeout(()=>{ri.getState().appendBubble(C,$.agentId,ne)},1500),p.current[z.agentKey]=g,p.current[$.agentKey]=g;const q=`${C}:${z.agentId}`,J=`${C}:${$.agentId}`;d.current[q]&&clearTimeout(d.current[q]),d.current[J]&&clearTimeout(d.current[J]),d.current[q]=setTimeout(()=>{ri.getState().clearBubble(C,z.agentId),delete d.current[q]},qw),d.current[J]=setTimeout(()=>{ri.getState().clearBubble(C,$.agentId),delete d.current[J]},qw+1500);break}}}}n(v)},[]);return P.useEffect(()=>{if(t)return t.add(m),()=>{t.remove(m)}},[t,m]),e}Q0({Container:br,Graphics:Aa,Text:Z0});const h8=.3,p8=2;function m8(){const{app:t}=PL(),e=P.useRef(null),[n,i]=P.useState(new Map),r=P.useRef(null),s=ri(b=>b.rooms),l=ri(b=>b.agentVisuals),c=ri(b=>b.bubbles),d=Ta(b=>b.activeStates),p=d8((t==null?void 0:t.ticker)??null),m=P.useMemo(()=>y0(s.length),[s.length]);P.useEffect(()=>{t!=null&&t.renderer&&i(YL(t))},[t]);const g=P.useCallback(b=>{b.clear(),XL(b,m),Hw(b,m.bathroomMale.x,m.bathroomMale.y,m.bathroomMale.width,m.bathroomMale.height,"male"),Hw(b,m.bathroomFemale.x,m.bathroomFemale.y,m.bathroomFemale.width,m.bathroomFemale.height,"female"),KL(b,m.kitchen.x,m.kitchen.y,m.kitchen.width,m.kitchen.height),WL(b,m.restArea.x,m.restArea.y,m.restArea.width,m.restArea.height)},[m]);return P.useEffect(()=>{const b=t==null?void 0:t.canvas;if(!b)return;const v=w=>{const k=e.current;k&&(r.current={startX:w.clientX,startY:w.clientY,pivotX:k.position.x,pivotY:k.position.y},b.setPointerCapture(w.pointerId))},S=w=>{const k=e.current,M=r.current;!k||!M||(k.position.x=M.pivotX+(w.clientX-M.startX),k.position.y=M.pivotY+(w.clientY-M.startY))},C=w=>{r.current=null,b.releasePointerCapture(w.pointerId)},T=w=>{w.preventDefault();const k=e.current;if(!k)return;const M=k.scale.x,O=w.deltaY>0?.9:1.1,H=Math.max(h8,Math.min(p8,M*O)),z=b.getBoundingClientRect(),F=w.clientX-z.left,$=w.clientY-z.top,j=H/M;k.position.x=F-(F-k.position.x)*j,k.position.y=$-($-k.position.y)*j,k.scale.set(H)};return b.addEventListener("pointerdown",v),b.addEventListener("pointermove",S),b.addEventListener("pointerup",C),b.addEventListener("pointerleave",C),b.addEventListener("wheel",T,{passive:!1}),()=>{b.removeEventListener("pointerdown",v),b.removeEventListener("pointermove",S),b.removeEventListener("pointerup",C),b.removeEventListener("pointerleave",C),b.removeEventListener("wheel",T)}},[t]),N.jsxs("container",{ref:e,children:[N.jsx("graphics",{draw:g}),m.corridorV.height>0&&N.jsx("text",{text:"Corredor",x:m.corridorV.x+m.corridorV.width/2,y:m.corridorV.y+8,anchor:{x:.5,y:0},style:{fontSize:11,fill:"#666666",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx("text",{text:"Corredor",x:m.corridorH.x+m.corridorH.width/2,y:m.corridorH.y+8,anchor:{x:.5,y:0},style:{fontSize:11,fill:"#666666",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx("text",{text:"WC ♂",x:m.bathroomMale.x+m.bathroomMale.width/2,y:m.bathroomMale.y+m.bathroomMale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx("text",{text:"WC ♀",x:m.bathroomFemale.x+m.bathroomFemale.width/2,y:m.bathroomFemale.y+m.bathroomFemale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx("text",{text:"Cozinha",x:m.kitchen.x+m.kitchen.width/2,y:m.kitchen.y+12,anchor:{x:.5,y:0},style:{fontSize:10,fill:"#795548",fontFamily:"sans-serif",fontWeight:"bold"}}),N.jsx("text",{text:"Descanso",x:m.restArea.x+m.restArea.width/2,y:m.restArea.y+12,anchor:{x:.5,y:0},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),s.map((b,v)=>{var k;const S=m.squadOrigins[v];if(!S)return null;const C=l[b]??[],T=((k=d[b])==null?void 0:k.status)??"idle",w=p[b]??{};return N.jsx(i8,{squadName:b,status:T,agents:C,textures:n,bubbles:c,animStates:w,originX:S.origin.x,originY:S.origin.y,roomWidth:S.width,roomHeight:S.height},b)}),s.map((b,v)=>{const S=l[b]??[],C=p[b]??{};return S.filter(T=>{const w=C[T.id];return(w==null?void 0:w.isExternalTransit)&&w.globalX!==void 0&&w.globalY!==void 0}).map(T=>{const w=C[T.id],k=`${b}:${T.id}`,M=c[k];return N.jsx(n1,{agent:T,textures:n,bubbleText:(M==null?void 0:M.text)??null,animX:w.globalX,animY:w.globalY,animPose:w.pose},`transit-${T.id}`)})}),N.jsx(l8,{x:m.ceoOffice.x,y:m.ceoOffice.y,width:m.ceoOffice.width,height:m.ceoOffice.height,textures:n,ticker:(t==null?void 0:t.ticker)??null})]})}function g8(){const t=ri(i=>i.activeRoom),e=ri(i=>i.checkpoints),n=t?e[t]:void 0;return N.jsx("div",{style:{display:"flex",height:"100%"},children:N.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[N.jsx(jL,{background:13158600,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:N.jsx(m8,{})}),n&&N.jsx(GL,{agentName:n.agentName,question:n.question,onRespond:i=>CD(t,i)})]})})}function y8(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const b8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v8={};function Vw(t,e){return(v8.jsx?x8:b8).test(t)}const _8=/[ \t\n\f\r]/g;function S8(t){return typeof t=="object"?t.type==="text"?Xw(t.value):!1:Xw(t)}function Xw(t){return t.replace(_8,"")===""}class Vm{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}}Vm.prototype.normal={};Vm.prototype.property={};Vm.prototype.space=void 0;function gM(t,e){const n={},i={};for(const r of t)Object.assign(n,r.property),Object.assign(i,r.normal);return new Vm(n,i,e)}function t_(t){return t.toLowerCase()}class Na{constructor(e,n){this.attribute=n,this.property=e}}Na.prototype.attribute="";Na.prototype.booleanish=!1;Na.prototype.boolean=!1;Na.prototype.commaOrSpaceSeparated=!1;Na.prototype.commaSeparated=!1;Na.prototype.defined=!1;Na.prototype.mustUseProperty=!1;Na.prototype.number=!1;Na.prototype.overloadedBoolean=!1;Na.prototype.property="";Na.prototype.spaceSeparated=!1;Na.prototype.space=void 0;let E8=0;const Ct=wf(),ki=wf(),n_=wf(),Oe=wf(),In=wf(),$d=wf(),Qa=wf();function wf(){return 2**++E8}const i_=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ct,booleanish:ki,commaOrSpaceSeparated:Qa,commaSeparated:$d,number:Oe,overloadedBoolean:n_,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),Yx=Object.keys(i_);class i1 extends Na{constructor(e,n,i,r){let s=-1;if(super(e,n),Kw(this,"space",r),typeof i=="number")for(;++s<Yx.length;){const l=Yx[s];Kw(this,Yx[s],(i&i_[l])===i_[l])}}}i1.prototype.defined=!0;function Kw(t,e,n){n&&(t[e]=n)}function bh(t){const e={},n={};for(const[i,r]of Object.entries(t.properties)){const s=new i1(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),e[i]=s,n[t_(i)]=i,n[t_(s.attribute)]=i}return new Vm(e,n,t.space)}const yM=bh({properties:{ariaActiveDescendant:null,ariaAtomic:ki,ariaAutoComplete:null,ariaBusy:ki,ariaChecked:ki,ariaColCount:Oe,ariaColIndex:Oe,ariaColSpan:Oe,ariaControls:In,ariaCurrent:null,ariaDescribedBy:In,ariaDetails:null,ariaDisabled:ki,ariaDropEffect:In,ariaErrorMessage:null,ariaExpanded:ki,ariaFlowTo:In,ariaGrabbed:ki,ariaHasPopup:null,ariaHidden:ki,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:In,ariaLevel:Oe,ariaLive:null,ariaModal:ki,ariaMultiLine:ki,ariaMultiSelectable:ki,ariaOrientation:null,ariaOwns:In,ariaPlaceholder:null,ariaPosInSet:Oe,ariaPressed:ki,ariaReadOnly:ki,ariaRelevant:null,ariaRequired:ki,ariaRoleDescription:In,ariaRowCount:Oe,ariaRowIndex:Oe,ariaRowSpan:Oe,ariaSelected:ki,ariaSetSize:Oe,ariaSort:null,ariaValueMax:Oe,ariaValueMin:Oe,ariaValueNow:Oe,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function bM(t,e){return e in t?t[e]:e}function xM(t,e){return bM(t,e.toLowerCase())}const w8=bh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$d,acceptCharset:In,accessKey:In,action:null,allow:null,allowFullScreen:Ct,allowPaymentRequest:Ct,allowUserMedia:Ct,alt:null,as:null,async:Ct,autoCapitalize:null,autoComplete:In,autoFocus:Ct,autoPlay:Ct,blocking:In,capture:null,charSet:null,checked:Ct,cite:null,className:In,cols:Oe,colSpan:null,content:null,contentEditable:ki,controls:Ct,controlsList:In,coords:Oe|$d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ct,defer:Ct,dir:null,dirName:null,disabled:Ct,download:n_,draggable:ki,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ct,formTarget:null,headers:In,height:Oe,hidden:n_,high:Oe,href:null,hrefLang:null,htmlFor:In,httpEquiv:In,id:null,imageSizes:null,imageSrcSet:null,inert:Ct,inputMode:null,integrity:null,is:null,isMap:Ct,itemId:null,itemProp:In,itemRef:In,itemScope:Ct,itemType:In,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ct,low:Oe,manifest:null,max:null,maxLength:Oe,media:null,method:null,min:null,minLength:Oe,multiple:Ct,muted:Ct,name:null,nonce:null,noModule:Ct,noValidate:Ct,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ct,optimum:Oe,pattern:null,ping:In,placeholder:null,playsInline:Ct,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ct,referrerPolicy:null,rel:In,required:Ct,reversed:Ct,rows:Oe,rowSpan:Oe,sandbox:In,scope:null,scoped:Ct,seamless:Ct,selected:Ct,shadowRootClonable:Ct,shadowRootDelegatesFocus:Ct,shadowRootMode:null,shape:null,size:Oe,sizes:null,slot:null,span:Oe,spellCheck:ki,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Oe,step:null,style:null,tabIndex:Oe,target:null,title:null,translate:null,type:null,typeMustMatch:Ct,useMap:null,value:ki,width:Oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:In,axis:null,background:null,bgColor:null,border:Oe,borderColor:null,bottomMargin:Oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ct,declare:Ct,event:null,face:null,frame:null,frameBorder:null,hSpace:Oe,leftMargin:Oe,link:null,longDesc:null,lowSrc:null,marginHeight:Oe,marginWidth:Oe,noResize:Ct,noHref:Ct,noShade:Ct,noWrap:Ct,object:null,profile:null,prompt:null,rev:null,rightMargin:Oe,rules:null,scheme:null,scrolling:ki,standby:null,summary:null,text:null,topMargin:Oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ct,disableRemotePlayback:Ct,prefix:null,property:null,results:Oe,security:null,unselectable:null},space:"html",transform:xM}),T8=bh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Qa,accentHeight:Oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Oe,amplitude:Oe,arabicForm:null,ascent:Oe,attributeName:null,attributeType:null,azimuth:Oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Oe,by:null,calcMode:null,capHeight:Oe,className:In,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Oe,diffuseConstant:Oe,direction:null,display:null,dur:null,divisor:Oe,dominantBaseline:null,download:Ct,dx:null,dy:null,edgeMode:null,editable:null,elevation:Oe,enableBackground:null,end:null,event:null,exponent:Oe,externalResourcesRequired:null,fill:null,fillOpacity:Oe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$d,g2:$d,glyphName:$d,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Oe,horizOriginX:Oe,horizOriginY:Oe,id:null,ideographic:Oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Oe,k:Oe,k1:Oe,k2:Oe,k3:Oe,k4:Oe,kernelMatrix:Qa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Oe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Oe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Oe,overlineThickness:Oe,paintOrder:null,panose1:null,path:null,pathLength:Oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:In,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Oe,pointsAtY:Oe,pointsAtZ:Oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qa,rev:Qa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qa,requiredFeatures:Qa,requiredFonts:Qa,requiredFormats:Qa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Oe,specularExponent:Oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Oe,strikethroughThickness:Oe,string:null,stroke:null,strokeDashArray:Qa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Oe,strokeOpacity:Oe,strokeWidth:null,style:null,surfaceScale:Oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qa,tabIndex:Oe,tableValues:null,target:null,targetX:Oe,targetY:Oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Oe,underlineThickness:Oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Oe,values:null,vAlphabetic:Oe,vMathematical:Oe,vectorEffect:null,vHanging:Oe,vIdeographic:Oe,version:null,vertAdvY:Oe,vertOriginX:Oe,vertOriginY:Oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bM}),vM=bh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),_M=bh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xM}),SM=bh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),C8={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},A8=/[A-Z]/g,Ww=/-[a-z]/g,M8=/^data[-\w.:]+$/i;function R8(t,e){const n=t_(e);let i=e,r=Na;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&M8.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Ww,k8);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Ww.test(s)){let l=s.replace(A8,N8);l.charAt(0)!=="-"&&(l="-"+l),e="data"+l}}r=i1}return new r(i,e)}function N8(t){return"-"+t.toLowerCase()}function k8(t){return t.charAt(1).toUpperCase()}const O8=gM([yM,w8,vM,_M,SM],"html"),r1=gM([yM,T8,vM,_M,SM],"svg");function D8(t){return t.join(" ").trim()}var zd={},Vx,$w;function z8(){if($w)return Vx;$w=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
345
|
+
`,p="/",m="*",g="",b="comment",v="declaration";function S(T,w){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];w=w||{};var k=1,M=1;function O(q){var J=q.match(e);J&&(k+=J.length);var B=q.lastIndexOf(d);M=~B?q.length-B:M+q.length}function H(){var q={line:k,column:M};return function(J){return J.position=new z(q),j(),J}}function z(q){this.start=q,this.end={line:k,column:M},this.source=w.source}z.prototype.content=T;function F(q){var J=new Error(w.source+":"+k+":"+M+": "+q);if(J.reason=q,J.filename=w.source,J.line=k,J.column=M,J.source=T,!w.silent)throw J}function $(q){var J=q.exec(T);if(J){var B=J[0];return O(B),T=T.slice(B.length),J}}function j(){$(n)}function I(q){var J;for(q=q||[];J=Y();)J!==!1&&q.push(J);return q}function Y(){var q=H();if(!(p!=T.charAt(0)||m!=T.charAt(1))){for(var J=2;g!=T.charAt(J)&&(m!=T.charAt(J)||p!=T.charAt(J+1));)++J;if(J+=2,g===T.charAt(J-1))return F("End of comment missing");var B=T.slice(2,J-2);return M+=2,O(B),T=T.slice(J),M+=2,q({type:b,comment:B})}}function X(){var q=H(),J=$(i);if(J){if(Y(),!$(r))return F("property missing ':'");var B=$(s),V=q({type:v,property:C(J[0].replace(t,g)),value:B?C(B[0].replace(t,g)):g});return $(l),V}}function ne(){var q=[];I(q);for(var J;J=X();)J!==!1&&(q.push(J),I(q));return q}return j(),ne()}function C(T){return T?T.replace(c,g):g}return Vx=S,Vx}var Zw;function B8(){if(Zw)return zd;Zw=1;var t=zd&&zd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zd,"__esModule",{value:!0}),zd.default=n;const e=t(z8());function n(i,r){let s=null;if(!i||typeof i!="string")return s;const l=(0,e.default)(i),c=typeof r=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:m}=d;c?r(p,m,d):m&&(s=s||{},s[p]=m)}),s}return zd}var Jp={},Qw;function L8(){if(Qw)return Jp;Qw=1,Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,s=function(p){return!p||n.test(p)||t.test(p)},l=function(p,m){return m.toUpperCase()},c=function(p,m){return"".concat(m,"-")},d=function(p,m){return m===void 0&&(m={}),s(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(r,c):p=p.replace(i,c),p.replace(e,l))};return Jp.camelCase=d,Jp}var em,Jw;function U8(){if(Jw)return em;Jw=1;var t=em&&em.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},e=t(B8()),n=L8();function i(r,s){var l={};return!r||typeof r!="string"||(0,e.default)(r,function(c,d){c&&d&&(l[(0,n.camelCase)(c,s)]=d)}),l}return i.default=i,em=i,em}var I8=U8();const H8=lu(I8),EM=wM("end"),a1=wM("start");function wM(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function j8(t){const e=a1(t),n=EM(t);if(e&&n)return{start:e,end:n}}function bm(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?e2(t.position):"start"in t||"end"in t?e2(t):"line"in t||"column"in t?r_(t):""}function r_(t){return t2(t&&t.line)+":"+t2(t&&t.column)}function e2(t){return r_(t&&t.start)+"-"+r_(t&&t.end)}function t2(t){return t&&typeof t=="number"?t:1}class Br extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?r=e:!s.cause&&e&&(l=!0,r=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=c?c.line:void 0,this.name=bm(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Br.prototype.file="";Br.prototype.name="";Br.prototype.reason="";Br.prototype.message="";Br.prototype.stack="";Br.prototype.column=void 0;Br.prototype.line=void 0;Br.prototype.ancestors=void 0;Br.prototype.cause=void 0;Br.prototype.fatal=void 0;Br.prototype.place=void 0;Br.prototype.ruleId=void 0;Br.prototype.source=void 0;const s1={}.hasOwnProperty,P8=new Map,G8=/[A-Z]/g,F8=new Set(["table","tbody","thead","tfoot","tr"]),q8=new Set(["td","th"]),TM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Y8(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=J8(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Q8(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?r1:O8,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=CM(r,t,void 0);return s&&typeof s!="string"?s:r.create(t,r.Fragment,{children:s||void 0},void 0)}function CM(t,e,n){if(e.type==="element")return V8(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return X8(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return W8(t,e,n);if(e.type==="mdxjsEsm")return K8(t,e);if(e.type==="root")return $8(t,e,n);if(e.type==="text")return Z8(t,e)}function V8(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=r1,t.schema=r),t.ancestors.push(e);const s=MM(t,e.tagName,!1),l=eU(t,e);let c=o1(t,e);return F8.has(e.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!S8(d):!0})),AM(t,l,s,e),l1(l,c),t.ancestors.pop(),t.schema=i,t.create(e,s,l,n)}function X8(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Nm(t,e.position)}function K8(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Nm(t,e.position)}function W8(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=r1,t.schema=r),t.ancestors.push(e);const s=e.name===null?t.Fragment:MM(t,e.name,!0),l=tU(t,e),c=o1(t,e);return AM(t,l,s,e),l1(l,c),t.ancestors.pop(),t.schema=i,t.create(e,s,l,n)}function $8(t,e,n){const i={};return l1(i,o1(t,e)),t.create(e,t.Fragment,i,n)}function Z8(t,e){return e.value}function AM(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function l1(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Q8(t,e,n){return i;function i(r,s,l,c){const p=Array.isArray(l.children)?n:e;return c?p(s,l,c):p(s,l)}}function J8(t,e){return n;function n(i,r,s,l){const c=Array.isArray(s.children),d=a1(i);return e(r,s,l,c,{columnNumber:d?d.column-1:void 0,fileName:t,lineNumber:d?d.line:void 0},void 0)}}function eU(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&s1.call(e.properties,r)){const s=nU(t,r,e.properties[r]);if(s){const[l,c]=s;t.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&q8.has(e.tagName)?i=c:n[l]=c}}if(i){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function tU(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,t.evaluater.evaluateExpression(c.argument))}else Nm(t,e.position);else{const r=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const c=i.value.data.estree.body[0];c.type,s=t.evaluater.evaluateExpression(c.expression)}else Nm(t,e.position);else s=i.value===null?!0:i.value;n[r]=s}return n}function o1(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:P8;for(;++i<e.children.length;){const s=e.children[i];let l;if(t.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const p=r.get(d)||0;l=d+"-"+p,r.set(d,p+1)}}const c=CM(t,s,l);c!==void 0&&n.push(c)}return n}function nU(t,e,n){const i=R8(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?y8(n):D8(n)),i.property==="style"){let r=typeof n=="object"?n:iU(t,String(n));return t.stylePropertyNameCase==="css"&&(r=rU(r)),["style",r]}return[t.elementAttributeNameCase==="react"&&i.space?C8[i.property]||i.property:i.attribute,n]}}function iU(t,e){try{return H8(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,r=new Br("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=TM+"#cannot-parse-style-attribute",r}}function MM(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const r=e.split(".");let s=-1,l;for(;++s<r.length;){const c=Vw(r[s])?{type:"Identifier",name:r[s]}:{type:"Literal",value:r[s]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=l}else i=Vw(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const r=i.value;return s1.call(t.components,r)?t.components[r]:r}if(t.evaluater)return t.evaluater.evaluateExpression(i);Nm(t)}function Nm(t,e){const n=new Br("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=TM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rU(t){const e={};let n;for(n in t)s1.call(t,n)&&(e[aU(n)]=t[n]);return e}function aU(t){let e=t.replace(G8,sU);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function sU(t){return"-"+t.toLowerCase()}const Xx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},lU={};function c1(t,e){const n=lU,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return RM(t,i,r)}function RM(t,e,n){if(oU(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return n2(t.children,e,n)}return Array.isArray(t)?n2(t,e,n):""}function n2(t,e,n){const i=[];let r=-1;for(;++r<t.length;)i[r]=RM(t[r],e,n);return i.join("")}function oU(t){return!!(t&&typeof t=="object")}const i2=document.createElement("i");function u1(t){const e="&"+t+";";i2.innerHTML=e;const n=i2.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function ts(t,e,n,i){const r=t.length;let s=0,l;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(e,n),t.splice(...l);else for(n&&t.splice(e,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(e,0),t.splice(...l),s+=1e4,e+=1e4}function Ns(t,e){return t.length>0?(ts(t,t.length,0,e),t):e}const r2={}.hasOwnProperty;function NM(t){const e={};let n=-1;for(;++n<t.length;)cU(e,t[n]);return e}function cU(t,e){let n;for(n in e){const r=(r2.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let l;if(s)for(l in s){r2.call(r,l)||(r[l]=[]);const c=s[l];uU(r[l],Array.isArray(c)?c:c?[c]:[])}}}function uU(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);ts(t,0,0,i)}function kM(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const la=ou(/[A-Za-z]/),zr=ou(/[\dA-Za-z]/),fU=ou(/[#-'*+\--9=?A-Z^-~]/);function T0(t){return t!==null&&(t<32||t===127)}const a_=ou(/\d/),dU=ou(/[\dA-Fa-f]/),hU=ou(/[!-/:-@[-`{-~]/);function st(t){return t!==null&&t<-2}function Dn(t){return t!==null&&(t<0||t===32)}function Lt(t){return t===-2||t===-1||t===32}const J0=ou(new RegExp("\\p{P}|\\p{S}","u")),yf=ou(/\s/);function ou(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function xh(t){const e=[];let n=-1,i=0,r=0;for(;++n<t.length;){const s=t.charCodeAt(n);let l="";if(s===37&&zr(t.charCodeAt(n+1))&&zr(t.charCodeAt(n+2)))r=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const c=t.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(l=String.fromCharCode(s,c),r=1):l="�"}else l=String.fromCharCode(s);l&&(e.push(t.slice(i,n),encodeURIComponent(l)),i=n+r+1,l=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function Kt(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(d){return Lt(d)?(t.enter(n),c(d)):e(d)}function c(d){return Lt(d)&&s++<r?(t.consume(d),c):(t.exit(n),e(d))}}const pU={tokenize:mU};function mU(t){const e=t.attempt(this.parser.constructs.contentInitial,i,r);let n;return e;function i(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Kt(t,e,"linePrefix")}function r(c){return t.enter("paragraph"),s(c)}function s(c){const d=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(c);return}return st(c)?(t.consume(c),t.exit("chunkText"),s):(t.consume(c),l)}}const gU={tokenize:yU},a2={tokenize:bU};function yU(t){const e=this,n=[];let i=0,r,s,l;return c;function c(M){if(i<n.length){const O=n[i];return e.containerState=O[1],t.attempt(O[0].continuation,d,p)(M)}return p(M)}function d(M){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,r&&k();const O=e.events.length;let H=O,z;for(;H--;)if(e.events[H][0]==="exit"&&e.events[H][1].type==="chunkFlow"){z=e.events[H][1].end;break}w(i);let F=O;for(;F<e.events.length;)e.events[F][1].end={...z},F++;return ts(e.events,H+1,0,e.events.slice(O)),e.events.length=F,p(M)}return c(M)}function p(M){if(i===n.length){if(!r)return b(M);if(r.currentConstruct&&r.currentConstruct.concrete)return S(M);e.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(a2,m,g)(M)}function m(M){return r&&k(),w(i),b(M)}function g(M){return e.parser.lazy[e.now().line]=i!==n.length,l=e.now().offset,S(M)}function b(M){return e.containerState={},t.attempt(a2,v,S)(M)}function v(M){return i++,n.push([e.currentConstruct,e.containerState]),b(M)}function S(M){if(M===null){r&&k(),w(0),t.consume(M);return}return r=r||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:s}),C(M)}function C(M){if(M===null){T(t.exit("chunkFlow"),!0),w(0),t.consume(M);return}return st(M)?(t.consume(M),T(t.exit("chunkFlow")),i=0,e.interrupt=void 0,c):(t.consume(M),C)}function T(M,O){const H=e.sliceStream(M);if(O&&H.push(null),M.previous=s,s&&(s.next=M),s=M,r.defineSkip(M.start),r.write(H),e.parser.lazy[M.start.line]){let z=r.events.length;for(;z--;)if(r.events[z][1].start.offset<l&&(!r.events[z][1].end||r.events[z][1].end.offset>l))return;const F=e.events.length;let $=F,j,I;for(;$--;)if(e.events[$][0]==="exit"&&e.events[$][1].type==="chunkFlow"){if(j){I=e.events[$][1].end;break}j=!0}for(w(i),z=F;z<e.events.length;)e.events[z][1].end={...I},z++;ts(e.events,$+1,0,e.events.slice(F)),e.events.length=z}}function w(M){let O=n.length;for(;O-- >M;){const H=n[O];e.containerState=H[1],H[0].exit.call(e,t)}n.length=M}function k(){r.write([null]),s=void 0,r=void 0,e.containerState._closeFlow=void 0}}function bU(t,e,n){return Kt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sh(t){if(t===null||Dn(t)||yf(t))return 1;if(J0(t))return 2}function eb(t,e,n){const i=[];let r=-1;for(;++r<t.length;){const s=t[r].resolveAll;s&&!i.includes(s)&&(e=s(e,n),i.push(s))}return e}const s_={name:"attention",resolveAll:xU,tokenize:vU};function xU(t,e){let n=-1,i,r,s,l,c,d,p,m;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;d=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const g={...t[i][1].end},b={...t[n][1].start};s2(g,-d),s2(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...t[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},r={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},t[i][1].end={...l.start},t[n][1].start={...c.end},p=[],t[i][1].end.offset-t[i][1].start.offset&&(p=Ns(p,[["enter",t[i][1],e],["exit",t[i][1],e]])),p=Ns(p,[["enter",r,e],["enter",l,e],["exit",l,e],["enter",s,e]]),p=Ns(p,eb(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),p=Ns(p,[["exit",s,e],["enter",c,e],["exit",c,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(m=2,p=Ns(p,[["enter",t[n][1],e],["exit",t[n][1],e]])):m=0,ts(t,i-1,n-i+3,p),n=i+p.length-m-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function vU(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=sh(i);let s;return l;function l(d){return s=d,t.enter("attentionSequence"),c(d)}function c(d){if(d===s)return t.consume(d),c;const p=t.exit("attentionSequence"),m=sh(d),g=!m||m===2&&r||n.includes(d),b=!r||r===2&&m||n.includes(i);return p._open=!!(s===42?g:g&&(r||!b)),p._close=!!(s===42?b:b&&(m||!g)),e(d)}}function s2(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const _U={name:"autolink",tokenize:SU};function SU(t,e,n){let i=0;return r;function r(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(v){return la(v)?(t.consume(v),l):v===64?n(v):p(v)}function l(v){return v===43||v===45||v===46||zr(v)?(i=1,c(v)):p(v)}function c(v){return v===58?(t.consume(v),i=0,d):(v===43||v===45||v===46||zr(v))&&i++<32?(t.consume(v),c):(i=0,p(v))}function d(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):v===null||v===32||v===60||T0(v)?n(v):(t.consume(v),d)}function p(v){return v===64?(t.consume(v),m):fU(v)?(t.consume(v),p):n(v)}function m(v){return zr(v)?g(v):n(v)}function g(v){return v===46?(t.consume(v),i=0,m):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):b(v)}function b(v){if((v===45||zr(v))&&i++<63){const S=v===45?b:g;return t.consume(v),S}return n(v)}}const Xm={partial:!0,tokenize:EU};function EU(t,e,n){return i;function i(s){return Lt(s)?Kt(t,r,"linePrefix")(s):r(s)}function r(s){return s===null||st(s)?e(s):n(s)}}const OM={continuation:{tokenize:TU},exit:CU,name:"blockQuote",tokenize:wU};function wU(t,e,n){const i=this;return r;function r(l){if(l===62){const c=i.containerState;return c.open||(t.enter("blockQuote",{_container:!0}),c.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(l),t.exit("blockQuoteMarker"),s}return n(l)}function s(l){return Lt(l)?(t.enter("blockQuotePrefixWhitespace"),t.consume(l),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(l))}}function TU(t,e,n){const i=this;return r;function r(l){return Lt(l)?Kt(t,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return t.attempt(OM,e,n)(l)}}function CU(t){t.exit("blockQuote")}const DM={name:"characterEscape",tokenize:AU};function AU(t,e,n){return i;function i(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),r}function r(s){return hU(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const zM={name:"characterReference",tokenize:MU};function MU(t,e,n){const i=this;let r=0,s,l;return c;function c(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),d}function d(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),s=31,l=zr,m(g))}function p(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,l=dU,m):(t.enter("characterReferenceValue"),s=7,l=a_,m(g))}function m(g){if(g===59&&r){const b=t.exit("characterReferenceValue");return l===zr&&!u1(i.sliceSerialize(b))?n(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return l(g)&&r++<s?(t.consume(g),m):n(g)}}const l2={partial:!0,tokenize:NU},o2={concrete:!0,name:"codeFenced",tokenize:RU};function RU(t,e,n){const i=this,r={partial:!0,tokenize:H};let s=0,l=0,c;return d;function d(z){return p(z)}function p(z){const F=i.events[i.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,c=z,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),m(z)}function m(z){return z===c?(l++,t.consume(z),m):l<3?n(z):(t.exit("codeFencedFenceSequence"),Lt(z)?Kt(t,g,"whitespace")(z):g(z))}function g(z){return z===null||st(z)?(t.exit("codeFencedFence"),i.interrupt?e(z):t.check(l2,C,O)(z)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(z))}function b(z){return z===null||st(z)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(z)):Lt(z)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Kt(t,v,"whitespace")(z)):z===96&&z===c?n(z):(t.consume(z),b)}function v(z){return z===null||st(z)?g(z):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),S(z))}function S(z){return z===null||st(z)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(z)):z===96&&z===c?n(z):(t.consume(z),S)}function C(z){return t.attempt(r,O,T)(z)}function T(z){return t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),w}function w(z){return s>0&&Lt(z)?Kt(t,k,"linePrefix",s+1)(z):k(z)}function k(z){return z===null||st(z)?t.check(l2,C,O)(z):(t.enter("codeFlowValue"),M(z))}function M(z){return z===null||st(z)?(t.exit("codeFlowValue"),k(z)):(t.consume(z),M)}function O(z){return t.exit("codeFenced"),e(z)}function H(z,F,$){let j=0;return I;function I(J){return z.enter("lineEnding"),z.consume(J),z.exit("lineEnding"),Y}function Y(J){return z.enter("codeFencedFence"),Lt(J)?Kt(z,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):X(J)}function X(J){return J===c?(z.enter("codeFencedFenceSequence"),ne(J)):$(J)}function ne(J){return J===c?(j++,z.consume(J),ne):j>=l?(z.exit("codeFencedFenceSequence"),Lt(J)?Kt(z,q,"whitespace")(J):q(J)):$(J)}function q(J){return J===null||st(J)?(z.exit("codeFencedFence"),F(J)):$(J)}}}function NU(t,e,n){const i=this;return r;function r(l){return l===null?n(l):(t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):e(l)}}const Kx={name:"codeIndented",tokenize:OU},kU={partial:!0,tokenize:DU};function OU(t,e,n){const i=this;return r;function r(p){return t.enter("codeIndented"),Kt(t,s,"linePrefix",5)(p)}function s(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?d(p):st(p)?t.attempt(kU,l,d)(p):(t.enter("codeFlowValue"),c(p))}function c(p){return p===null||st(p)?(t.exit("codeFlowValue"),l(p)):(t.consume(p),c)}function d(p){return t.exit("codeIndented"),e(p)}}function DU(t,e,n){const i=this;return r;function r(l){return i.parser.lazy[i.now().line]?n(l):st(l)?(t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),r):Kt(t,s,"linePrefix",5)(l)}function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?e(l):st(l)?r(l):n(l)}}const zU={name:"codeText",previous:LU,resolve:BU,tokenize:UU};function BU(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)r===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(r=i):(i===e||t[i][1].type==="lineEnding")&&(t[r][1].type="codeTextData",i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),e-=i-r-2,i=r+2),r=void 0);return t}function LU(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UU(t,e,n){let i=0,r,s;return l;function l(g){return t.enter("codeText"),t.enter("codeTextSequence"),c(g)}function c(g){return g===96?(t.consume(g),i++,c):(t.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),d):g===96?(s=t.enter("codeTextSequence"),r=0,m(g)):st(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),d):(t.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||st(g)?(t.exit("codeTextData"),d(g)):(t.consume(g),p)}function m(g){return g===96?(t.consume(g),r++,m):r===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(g)):(s.type="codeTextData",p(g))}}class IU{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&tm(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),tm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),tm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);tm(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);tm(this.left,n.reverse())}}}function tm(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function BM(t){const e={};let n=-1,i,r,s,l,c,d,p;const m=new IU(t);for(;++n<m.length;){for(;n in e;)n=e[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,HU(m,n)),n=e[n],p=!0);else if(i[1]._container){for(s=n,r=void 0;s--;)if(l=m.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(r&&(m.get(r)[1].type="lineEndingBlank"),l[1].type="lineEnding",r=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;r&&(i[1].end={...m.get(r)[1].start},c=m.slice(r,n),c.unshift(i),m.splice(r,n-r+1,c))}}return ts(t,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function HU(t,e){const n=t.get(e)[1],i=t.get(e)[2];let r=e-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],p={};let m,g,b=-1,v=n,S=0,C=0;const T=[C];for(;v;){for(;t.get(++r)[1]!==v;);s.push(r),v._tokenizer||(m=i.sliceStream(v),v.next||m.push(null),g&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(C=b+1,T.push(C),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):T.pop(),b=T.length;b--;){const w=c.slice(T[b],T[b+1]),k=s.pop();d.push([k,k+w.length-1]),t.splice(k,2,w)}for(d.reverse(),b=-1;++b<d.length;)p[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return p}const jU={resolve:GU,tokenize:FU},PU={partial:!0,tokenize:qU};function GU(t){return BM(t),t}function FU(t,e){let n;return i;function i(c){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),r(c)}function r(c){return c===null?s(c):st(c)?t.check(PU,l,s)(c):(t.consume(c),r)}function s(c){return t.exit("chunkContent"),t.exit("content"),e(c)}function l(c){return t.consume(c),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function qU(t,e,n){const i=this;return r;function r(l){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Kt(t,s,"linePrefix")}function s(l){if(l===null||st(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?e(l):t.interrupt(i.parser.constructs.flow,n,e)(l)}}function LM(t,e,n,i,r,s,l,c,d){const p=d||Number.POSITIVE_INFINITY;let m=0;return g;function g(w){return w===60?(t.enter(i),t.enter(r),t.enter(s),t.consume(w),t.exit(s),b):w===null||w===32||w===41||T0(w)?n(w):(t.enter(i),t.enter(l),t.enter(c),t.enter("chunkString",{contentType:"string"}),C(w))}function b(w){return w===62?(t.enter(s),t.consume(w),t.exit(s),t.exit(r),t.exit(i),e):(t.enter(c),t.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(t.exit("chunkString"),t.exit(c),b(w)):w===null||w===60||st(w)?n(w):(t.consume(w),w===92?S:v)}function S(w){return w===60||w===62||w===92?(t.consume(w),v):v(w)}function C(w){return!m&&(w===null||w===41||Dn(w))?(t.exit("chunkString"),t.exit(c),t.exit(l),t.exit(i),e(w)):m<p&&w===40?(t.consume(w),m++,C):w===41?(t.consume(w),m--,C):w===null||w===32||w===40||T0(w)?n(w):(t.consume(w),w===92?T:C)}function T(w){return w===40||w===41||w===92?(t.consume(w),C):C(w)}}function UM(t,e,n,i,r,s){const l=this;let c=0,d;return p;function p(v){return t.enter(i),t.enter(r),t.consume(v),t.exit(r),t.enter(s),m}function m(v){return c>999||v===null||v===91||v===93&&!d||v===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(t.exit(s),t.enter(r),t.consume(v),t.exit(r),t.exit(i),e):st(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),m):(t.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||st(v)||c++>999?(t.exit("chunkString"),m(v)):(t.consume(v),d||(d=!Lt(v)),v===92?b:g)}function b(v){return v===91||v===92||v===93?(t.consume(v),c++,g):g(v)}}function IM(t,e,n,i,r,s){let l;return c;function c(b){return b===34||b===39||b===40?(t.enter(i),t.enter(r),t.consume(b),t.exit(r),l=b===40?41:b,d):n(b)}function d(b){return b===l?(t.enter(r),t.consume(b),t.exit(r),t.exit(i),e):(t.enter(s),p(b))}function p(b){return b===l?(t.exit(s),d(l)):b===null?n(b):st(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Kt(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===l||b===null||st(b)?(t.exit("chunkString"),p(b)):(t.consume(b),b===92?g:m)}function g(b){return b===l||b===92?(t.consume(b),m):m(b)}}function xm(t,e){let n;return i;function i(r){return st(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):Lt(r)?Kt(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const YU={name:"definition",tokenize:XU},VU={partial:!0,tokenize:KU};function XU(t,e,n){const i=this;let r;return s;function s(v){return t.enter("definition"),l(v)}function l(v){return UM.call(i,t,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return r=gl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),d):n(v)}function d(v){return Dn(v)?xm(t,p)(v):p(v)}function p(v){return LM(t,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return t.attempt(VU,g,g)(v)}function g(v){return Lt(v)?Kt(t,b,"whitespace")(v):b(v)}function b(v){return v===null||st(v)?(t.exit("definition"),i.parser.defined.push(r),e(v)):n(v)}}function KU(t,e,n){return i;function i(c){return Dn(c)?xm(t,r)(c):n(c)}function r(c){return IM(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return Lt(c)?Kt(t,l,"whitespace")(c):l(c)}function l(c){return c===null||st(c)?e(c):n(c)}}const WU={name:"hardBreakEscape",tokenize:$U};function $U(t,e,n){return i;function i(s){return t.enter("hardBreakEscape"),t.consume(s),r}function r(s){return st(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const ZU={name:"headingAtx",resolve:QU,tokenize:JU};function QU(t,e){let n=t.length-2,i=3,r,s;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},s={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},ts(t,i,n-i+1,[["enter",r,e],["enter",s,e],["exit",s,e],["exit",r,e]])),t}function JU(t,e,n){let i=0;return r;function r(m){return t.enter("atxHeading"),s(m)}function s(m){return t.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&i++<6?(t.consume(m),l):m===null||Dn(m)?(t.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(t.enter("atxHeadingSequence"),d(m)):m===null||st(m)?(t.exit("atxHeading"),e(m)):Lt(m)?Kt(t,c,"whitespace")(m):(t.enter("atxHeadingText"),p(m))}function d(m){return m===35?(t.consume(m),d):(t.exit("atxHeadingSequence"),c(m))}function p(m){return m===null||m===35||Dn(m)?(t.exit("atxHeadingText"),c(m)):(t.consume(m),p)}}const eI=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],c2=["pre","script","style","textarea"],tI={concrete:!0,name:"htmlFlow",resolveTo:rI,tokenize:aI},nI={partial:!0,tokenize:lI},iI={partial:!0,tokenize:sI};function rI(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function aI(t,e,n){const i=this;let r,s,l,c,d;return p;function p(U){return m(U)}function m(U){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(U),g}function g(U){return U===33?(t.consume(U),b):U===47?(t.consume(U),s=!0,C):U===63?(t.consume(U),r=3,i.interrupt?e:G):la(U)?(t.consume(U),l=String.fromCharCode(U),T):n(U)}function b(U){return U===45?(t.consume(U),r=2,v):U===91?(t.consume(U),r=5,c=0,S):la(U)?(t.consume(U),r=4,i.interrupt?e:G):n(U)}function v(U){return U===45?(t.consume(U),i.interrupt?e:G):n(U)}function S(U){const le="CDATA[";return U===le.charCodeAt(c++)?(t.consume(U),c===le.length?i.interrupt?e:X:S):n(U)}function C(U){return la(U)?(t.consume(U),l=String.fromCharCode(U),T):n(U)}function T(U){if(U===null||U===47||U===62||Dn(U)){const le=U===47,de=l.toLowerCase();return!le&&!s&&c2.includes(de)?(r=1,i.interrupt?e(U):X(U)):eI.includes(l.toLowerCase())?(r=6,le?(t.consume(U),w):i.interrupt?e(U):X(U)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(U):s?k(U):M(U))}return U===45||zr(U)?(t.consume(U),l+=String.fromCharCode(U),T):n(U)}function w(U){return U===62?(t.consume(U),i.interrupt?e:X):n(U)}function k(U){return Lt(U)?(t.consume(U),k):I(U)}function M(U){return U===47?(t.consume(U),I):U===58||U===95||la(U)?(t.consume(U),O):Lt(U)?(t.consume(U),M):I(U)}function O(U){return U===45||U===46||U===58||U===95||zr(U)?(t.consume(U),O):H(U)}function H(U){return U===61?(t.consume(U),z):Lt(U)?(t.consume(U),H):M(U)}function z(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(t.consume(U),d=U,F):Lt(U)?(t.consume(U),z):$(U)}function F(U){return U===d?(t.consume(U),d=null,j):U===null||st(U)?n(U):(t.consume(U),F)}function $(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Dn(U)?H(U):(t.consume(U),$)}function j(U){return U===47||U===62||Lt(U)?M(U):n(U)}function I(U){return U===62?(t.consume(U),Y):n(U)}function Y(U){return U===null||st(U)?X(U):Lt(U)?(t.consume(U),Y):n(U)}function X(U){return U===45&&r===2?(t.consume(U),B):U===60&&r===1?(t.consume(U),V):U===62&&r===4?(t.consume(U),K):U===63&&r===3?(t.consume(U),G):U===93&&r===5?(t.consume(U),Q):st(U)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(nI,te,ne)(U)):U===null||st(U)?(t.exit("htmlFlowData"),ne(U)):(t.consume(U),X)}function ne(U){return t.check(iI,q,te)(U)}function q(U){return t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),J}function J(U){return U===null||st(U)?ne(U):(t.enter("htmlFlowData"),X(U))}function B(U){return U===45?(t.consume(U),G):X(U)}function V(U){return U===47?(t.consume(U),l="",Z):X(U)}function Z(U){if(U===62){const le=l.toLowerCase();return c2.includes(le)?(t.consume(U),K):X(U)}return la(U)&&l.length<8?(t.consume(U),l+=String.fromCharCode(U),Z):X(U)}function Q(U){return U===93?(t.consume(U),G):X(U)}function G(U){return U===62?(t.consume(U),K):U===45&&r===2?(t.consume(U),G):X(U)}function K(U){return U===null||st(U)?(t.exit("htmlFlowData"),te(U)):(t.consume(U),K)}function te(U){return t.exit("htmlFlow"),e(U)}}function sI(t,e,n){const i=this;return r;function r(l){return st(l)?(t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):e(l)}}function lI(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(Xm,e,n)}}const oI={name:"htmlText",tokenize:cI};function cI(t,e,n){const i=this;let r,s,l;return c;function c(G){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(G),d}function d(G){return G===33?(t.consume(G),p):G===47?(t.consume(G),H):G===63?(t.consume(G),M):la(G)?(t.consume(G),$):n(G)}function p(G){return G===45?(t.consume(G),m):G===91?(t.consume(G),s=0,S):la(G)?(t.consume(G),k):n(G)}function m(G){return G===45?(t.consume(G),v):n(G)}function g(G){return G===null?n(G):G===45?(t.consume(G),b):st(G)?(l=g,V(G)):(t.consume(G),g)}function b(G){return G===45?(t.consume(G),v):g(G)}function v(G){return G===62?B(G):G===45?b(G):g(G)}function S(G){const K="CDATA[";return G===K.charCodeAt(s++)?(t.consume(G),s===K.length?C:S):n(G)}function C(G){return G===null?n(G):G===93?(t.consume(G),T):st(G)?(l=C,V(G)):(t.consume(G),C)}function T(G){return G===93?(t.consume(G),w):C(G)}function w(G){return G===62?B(G):G===93?(t.consume(G),w):C(G)}function k(G){return G===null||G===62?B(G):st(G)?(l=k,V(G)):(t.consume(G),k)}function M(G){return G===null?n(G):G===63?(t.consume(G),O):st(G)?(l=M,V(G)):(t.consume(G),M)}function O(G){return G===62?B(G):M(G)}function H(G){return la(G)?(t.consume(G),z):n(G)}function z(G){return G===45||zr(G)?(t.consume(G),z):F(G)}function F(G){return st(G)?(l=F,V(G)):Lt(G)?(t.consume(G),F):B(G)}function $(G){return G===45||zr(G)?(t.consume(G),$):G===47||G===62||Dn(G)?j(G):n(G)}function j(G){return G===47?(t.consume(G),B):G===58||G===95||la(G)?(t.consume(G),I):st(G)?(l=j,V(G)):Lt(G)?(t.consume(G),j):B(G)}function I(G){return G===45||G===46||G===58||G===95||zr(G)?(t.consume(G),I):Y(G)}function Y(G){return G===61?(t.consume(G),X):st(G)?(l=Y,V(G)):Lt(G)?(t.consume(G),Y):j(G)}function X(G){return G===null||G===60||G===61||G===62||G===96?n(G):G===34||G===39?(t.consume(G),r=G,ne):st(G)?(l=X,V(G)):Lt(G)?(t.consume(G),X):(t.consume(G),q)}function ne(G){return G===r?(t.consume(G),r=void 0,J):G===null?n(G):st(G)?(l=ne,V(G)):(t.consume(G),ne)}function q(G){return G===null||G===34||G===39||G===60||G===61||G===96?n(G):G===47||G===62||Dn(G)?j(G):(t.consume(G),q)}function J(G){return G===47||G===62||Dn(G)?j(G):n(G)}function B(G){return G===62?(t.consume(G),t.exit("htmlTextData"),t.exit("htmlText"),e):n(G)}function V(G){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(G),t.exit("lineEnding"),Z}function Z(G){return Lt(G)?Kt(t,Q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Q(G)}function Q(G){return t.enter("htmlTextData"),l(G)}}const f1={name:"labelEnd",resolveAll:hI,resolveTo:pI,tokenize:mI},uI={tokenize:gI},fI={tokenize:yI},dI={tokenize:bI};function hI(t){let e=-1;const n=[];for(;++e<t.length;){const i=t[e][1];if(n.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const r=i.type==="labelImage"?4:2;i.type="data",e+=r}}return t.length!==n.length&&ts(t,0,t.length,n),t}function pI(t,e){let n=t.length,i=0,r,s,l,c;for(;n--;)if(r=t[n][1],s){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;t[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(l){if(t[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(s=n,r.type!=="labelLink")){i=2;break}}else r.type==="labelEnd"&&(l=n);const d={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[s][1].start},end:{...t[l][1].end}},m={type:"labelText",start:{...t[s+i+2][1].end},end:{...t[l-2][1].start}};return c=[["enter",d,e],["enter",p,e]],c=Ns(c,t.slice(s+1,s+i+3)),c=Ns(c,[["enter",m,e]]),c=Ns(c,eb(e.parser.constructs.insideSpan.null,t.slice(s+i+4,l-3),e)),c=Ns(c,[["exit",m,e],t[l-2],t[l-1],["exit",p,e]]),c=Ns(c,t.slice(l+1)),c=Ns(c,[["exit",d,e]]),ts(t,s,t.length,c),t}function mI(t,e,n){const i=this;let r=i.events.length,s,l;for(;r--;)if((i.events[r][1].type==="labelImage"||i.events[r][1].type==="labelLink")&&!i.events[r][1]._balanced){s=i.events[r][1];break}return c;function c(b){return s?s._inactive?g(b):(l=i.parser.defined.includes(gl(i.sliceSerialize({start:s.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),d):n(b)}function d(b){return b===40?t.attempt(uI,m,l?m:g)(b):b===91?t.attempt(fI,m,l?p:g)(b):l?m(b):g(b)}function p(b){return t.attempt(dI,m,g)(b)}function m(b){return e(b)}function g(b){return s._balanced=!0,n(b)}}function gI(t,e,n){return i;function i(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),r}function r(g){return Dn(g)?xm(t,s)(g):s(g)}function s(g){return g===41?m(g):LM(t,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function l(g){return Dn(g)?xm(t,d)(g):m(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?IM(t,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):m(g)}function p(g){return Dn(g)?xm(t,m)(g):m(g)}function m(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),e):n(g)}}function yI(t,e,n){const i=this;return r;function r(c){return UM.call(i,t,s,l,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(gl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(c):n(c)}function l(c){return n(c)}}function bI(t,e,n){return i;function i(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),r}function r(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const xI={name:"labelStartImage",resolveAll:f1.resolveAll,tokenize:vI};function vI(t,e,n){const i=this;return r;function r(c){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(c),t.exit("labelImageMarker"),s}function s(c){return c===91?(t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):e(c)}}const _I={name:"labelStartLink",resolveAll:f1.resolveAll,tokenize:SI};function SI(t,e,n){const i=this;return r;function r(l){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):e(l)}}const Wx={name:"lineEnding",tokenize:EI};function EI(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Kt(t,e,"linePrefix")}}const u0={name:"thematicBreak",tokenize:wI};function wI(t,e,n){let i=0,r;return s;function s(p){return t.enter("thematicBreak"),l(p)}function l(p){return r=p,c(p)}function c(p){return p===r?(t.enter("thematicBreakSequence"),d(p)):i>=3&&(p===null||st(p))?(t.exit("thematicBreak"),e(p)):n(p)}function d(p){return p===r?(t.consume(p),i++,d):(t.exit("thematicBreakSequence"),Lt(p)?Kt(t,c,"whitespace")(p):c(p))}}const wa={continuation:{tokenize:MI},exit:NI,name:"list",tokenize:AI},TI={partial:!0,tokenize:kI},CI={partial:!0,tokenize:RI};function AI(t,e,n){const i=this,r=i.events[i.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,l=0;return c;function c(v){const S=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:a_(v)){if(i.containerState.type||(i.containerState.type=S,t.enter(S,{_container:!0})),S==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(u0,n,p)(v):p(v);if(!i.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),d(v)}return n(v)}function d(v){return a_(v)&&++l<10?(t.consume(v),d):(!i.interrupt||l<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),p(v)):n(v)}function p(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,t.check(Xm,i.interrupt?n:m,t.attempt(TI,b,g))}function m(v){return i.containerState.initialBlankLine=!0,s++,b(v)}function g(v){return Lt(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return i.containerState.size=s+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(v)}}function MI(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(Xm,r,s);function r(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Kt(t,e,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!Lt(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(CI,e,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Kt(t,t.attempt(wa,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function RI(t,e,n){const i=this;return Kt(t,r,"listItemIndent",i.containerState.size+1);function r(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?e(s):n(s)}}function NI(t){t.exit(this.containerState.type)}function kI(t,e,n){const i=this;return Kt(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(s){const l=i.events[i.events.length-1];return!Lt(s)&&l&&l[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const u2={name:"setextUnderline",resolveTo:OI,tokenize:DI};function OI(t,e){let n=t.length,i,r,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[r][1].type="setextHeadingText",s?(t.splice(r,0,["enter",l,e]),t.splice(s+1,0,["exit",t[i][1],e]),t[i][1].end={...t[s][1].end}):t[i][1]=l,t.push(["exit",l,e]),t}function DI(t,e,n){const i=this;let r;return s;function s(p){let m=i.events.length,g;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){g=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||g)?(t.enter("setextHeadingLine"),r=p,l(p)):n(p)}function l(p){return t.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===r?(t.consume(p),c):(t.exit("setextHeadingLineSequence"),Lt(p)?Kt(t,d,"lineSuffix")(p):d(p))}function d(p){return p===null||st(p)?(t.exit("setextHeadingLine"),e(p)):n(p)}}const zI={tokenize:BI};function BI(t){const e=this,n=t.attempt(Xm,i,t.attempt(this.parser.constructs.flowInitial,r,Kt(t,t.attempt(this.parser.constructs.flow,r,t.attempt(jU,r)),"linePrefix")));return n;function i(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const LI={resolveAll:jM()},UI=HM("string"),II=HM("text");function HM(t){return{resolveAll:jM(t==="text"?HI:void 0),tokenize:e};function e(n){const i=this,r=this.parser.constructs[t],s=n.attempt(r,l,c);return l;function l(m){return p(m)?s(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return p(m)?(n.exit("data"),s(m)):(n.consume(m),d)}function p(m){if(m===null)return!0;const g=r[m];let b=-1;if(g)for(;++b<g.length;){const v=g[b];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function jM(t){return e;function e(n,i){let r=-1,s;for(;++r<=n.length;)s===void 0?n[r]&&n[r][1].type==="data"&&(s=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==s+2&&(n[s][1].end=n[r-1][1].end,n.splice(s+2,r-s-2),r=s+2),s=void 0);return t?t(n,i):n}}function HI(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],r=e.sliceStream(i);let s=r.length,l=-1,c=0,d;for(;s--;){const p=r[s];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(p===-2)d=!0,c++;else if(p!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(c=0),c){const p={type:n===t.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(t.splice(n,0,["enter",p,e],["exit",p,e]),n+=2)}n++}return t}const jI={42:wa,43:wa,45:wa,48:wa,49:wa,50:wa,51:wa,52:wa,53:wa,54:wa,55:wa,56:wa,57:wa,62:OM},PI={91:YU},GI={[-2]:Kx,[-1]:Kx,32:Kx},FI={35:ZU,42:u0,45:[u2,u0],60:tI,61:u2,95:u0,96:o2,126:o2},qI={38:zM,92:DM},YI={[-5]:Wx,[-4]:Wx,[-3]:Wx,33:xI,38:zM,42:s_,60:[_U,oI],91:_I,92:[WU,DM],93:f1,95:s_,96:zU},VI={null:[s_,LI]},XI={null:[42,95]},KI={null:[]},WI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XI,contentInitial:PI,disable:KI,document:jI,flow:FI,flowInitial:GI,insideSpan:VI,string:qI,text:YI},Symbol.toStringTag,{value:"Module"}));function $I(t,e,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const r={},s=[];let l=[],c=[];const d={attempt:F(H),check:F(z),consume:k,enter:M,exit:O,interrupt:F(z,{interrupt:!0})},p={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:t,previous:null,sliceSerialize:b,sliceStream:v,write:g};let m=e.tokenize.call(p,d);return e.resolveAll&&s.push(e),p;function g(Y){return l=Ns(l,Y),T(),l[l.length-1]!==null?[]:($(e,0),p.events=eb(s,p.events,p),p.events)}function b(Y,X){return QI(v(Y),X)}function v(Y){return ZI(l,Y)}function S(){const{_bufferIndex:Y,_index:X,line:ne,column:q,offset:J}=i;return{_bufferIndex:Y,_index:X,line:ne,column:q,offset:J}}function C(Y){r[Y.line]=Y.column,I()}function T(){let Y;for(;i._index<l.length;){const X=l[i._index];if(typeof X=="string")for(Y=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Y&&i._bufferIndex<X.length;)w(X.charCodeAt(i._bufferIndex));else w(X)}}function w(Y){m=m(Y)}function k(Y){st(Y)?(i.line++,i.column=1,i.offset+=Y===-3?2:1,I()):Y!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=Y}function M(Y,X){const ne=X||{};return ne.type=Y,ne.start=S(),p.events.push(["enter",ne,p]),c.push(ne),ne}function O(Y){const X=c.pop();return X.end=S(),p.events.push(["exit",X,p]),X}function H(Y,X){$(Y,X.from)}function z(Y,X){X.restore()}function F(Y,X){return ne;function ne(q,J,B){let V,Z,Q,G;return Array.isArray(q)?te(q):"tokenize"in q?te([q]):K(q);function K(ge){return se;function se(pe){const Ae=pe!==null&&ge[pe],Le=pe!==null&&ge.null,Ge=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return te(Ge)(pe)}}function te(ge){return V=ge,Z=0,ge.length===0?B:U(ge[Z])}function U(ge){return se;function se(pe){return G=j(),Q=ge,ge.partial||(p.currentConstruct=ge),ge.name&&p.parser.constructs.disable.null.includes(ge.name)?de():ge.tokenize.call(X?Object.assign(Object.create(p),X):p,d,le,de)(pe)}}function le(ge){return Y(Q,G),J}function de(ge){return G.restore(),++Z<V.length?U(V[Z]):B}}}function $(Y,X){Y.resolveAll&&!s.includes(Y)&&s.push(Y),Y.resolve&&ts(p.events,X,p.events.length-X,Y.resolve(p.events.slice(X),p)),Y.resolveTo&&(p.events=Y.resolveTo(p.events,p))}function j(){const Y=S(),X=p.previous,ne=p.currentConstruct,q=p.events.length,J=Array.from(c);return{from:q,restore:B};function B(){i=Y,p.previous=X,p.currentConstruct=ne,p.events.length=q,c=J,I()}}function I(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}function ZI(t,e){const n=e.start._index,i=e.start._bufferIndex,r=e.end._index,s=e.end._bufferIndex;let l;if(n===r)l=[t[n].slice(i,s)];else{if(l=t.slice(n,r),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}s>0&&l.push(t[r].slice(0,s))}return l}function QI(t,e){let n=-1;const i=[];let r;for(;++n<t.length;){const s=t[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
346
|
+
`;break}case-3:{l=`\r
|
|
347
|
+
`;break}case-2:{l=e?" ":" ";break}case-1:{if(!e&&r)continue;l=" ";break}default:l=String.fromCharCode(s)}r=s===-2,i.push(l)}return i.join("")}function JI(t){const i={constructs:NM([WI,...(t||{}).extensions||[]]),content:r(pU),defined:[],document:r(gU),flow:r(zI),lazy:{},string:r(UI),text:r(II)};return i;function r(s){return l;function l(c){return $I(i,s,c)}}}function eH(t){for(;!BM(t););return t}const f2=/[\0\t\n\r]/g;function tH(){let t=1,e="",n=!0,i;return r;function r(s,l,c){const d=[];let p,m,g,b,v;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),g=0,e="",n&&(s.charCodeAt(0)===65279&&g++,n=void 0);g<s.length;){if(f2.lastIndex=g,p=f2.exec(s),b=p&&p.index!==void 0?p.index:s.length,v=s.charCodeAt(b),!p){e=s.slice(g);break}if(v===10&&g===b&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),g<b&&(d.push(s.slice(g,b)),t+=b-g),v){case 0:{d.push(65533),t++;break}case 9:{for(m=Math.ceil(t/4)*4,d.push(-2);t++<m;)d.push(-1);break}case 10:{d.push(-4),t=1;break}default:i=!0,t=1}g=b+1}return c&&(i&&d.push(-5),e&&d.push(e),d.push(null)),d}}const nH=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iH(t){return t.replace(nH,rH)}function rH(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),s=r===120||r===88;return kM(n.slice(s?2:1),s?16:10)}return u1(n)||t}const PM={}.hasOwnProperty;function aH(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),sH(n)(eH(JI(n).document().write(tH()(t,e,!0))))}function sH(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Bn),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(ut),blockQuote:s(Le),characterEscape:j,characterReference:j,codeFenced:s(Ge),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Ge,l),codeText:s(Pe,l),codeTextData:j,data:j,codeFlowValue:j,definition:s(Ie),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(We),hardBreakEscape:s(Ue),hardBreakTrailing:s(Ue),htmlFlow:s(At,l),htmlFlowData:j,htmlText:s(At,l),htmlTextData:j,image:s(zn),label:l,link:s(Bn),listItem:s(wi),listItemValue:b,listOrdered:s(bn,g),listUnordered:s(bn),paragraph:s(ka),reference:U,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(ut),strong:s(Lr),thematicBreak:s(ua)},exit:{atxHeading:d(),atxHeadingSequence:H,autolink:d(),autolinkEmail:Ae,autolinkProtocol:pe,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ge,characterReference:se,codeFenced:d(T),codeFencedFence:C,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:I,codeIndented:d(w),codeText:d(J),codeTextData:I,data:I,definition:d(),definitionDestinationString:O,definitionLabelString:k,definitionTitleString:M,emphasis:d(),hardBreakEscape:d(X),hardBreakTrailing:d(X),htmlFlow:d(ne),htmlFlowData:I,htmlText:d(q),htmlTextData:I,image:d(V),label:Q,labelText:Z,lineEnding:Y,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:G,resourceTitleString:K,resource:te,setextHeading:d($),setextHeadingLineSequence:F,setextHeadingText:z,strong:d(),thematicBreak:d()}};GM(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(_e){let Ne={type:"root",children:[]};const Je={stack:[Ne],tokenStack:[],config:e,enter:c,exit:p,buffer:l,resume:m,data:n},bt=[];let kt=-1;for(;++kt<_e.length;)if(_e[kt][1].type==="listOrdered"||_e[kt][1].type==="listUnordered")if(_e[kt][0]==="enter")bt.push(kt);else{const yi=bt.pop();kt=r(_e,yi,kt)}for(kt=-1;++kt<_e.length;){const yi=e[_e[kt][0]];PM.call(yi,_e[kt][1].type)&&yi[_e[kt][1].type].call(Object.assign({sliceSerialize:_e[kt][2].sliceSerialize},Je),_e[kt][1])}if(Je.tokenStack.length>0){const yi=Je.tokenStack[Je.tokenStack.length-1];(yi[1]||d2).call(Je,void 0,yi[0])}for(Ne.position={start:Wc(_e.length>0?_e[0][1].start:{line:1,column:1,offset:0}),end:Wc(_e.length>0?_e[_e.length-2][1].end:{line:1,column:1,offset:0})},kt=-1;++kt<e.transforms.length;)Ne=e.transforms[kt](Ne)||Ne;return Ne}function r(_e,Ne,Je){let bt=Ne-1,kt=-1,yi=!1,rr,xn,$t,Gn;for(;++bt<=Je;){const Pt=_e[bt];switch(Pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pt[0]==="enter"?kt++:kt--,Gn=void 0;break}case"lineEndingBlank":{Pt[0]==="enter"&&(rr&&!Gn&&!kt&&!$t&&($t=bt),Gn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gn=void 0}if(!kt&&Pt[0]==="enter"&&Pt[1].type==="listItemPrefix"||kt===-1&&Pt[0]==="exit"&&(Pt[1].type==="listUnordered"||Pt[1].type==="listOrdered")){if(rr){let Fi=bt;for(xn=void 0;Fi--;){const Qn=_e[Fi];if(Qn[1].type==="lineEnding"||Qn[1].type==="lineEndingBlank"){if(Qn[0]==="exit")continue;xn&&(_e[xn][1].type="lineEndingBlank",yi=!0),Qn[1].type="lineEnding",xn=Fi}else if(!(Qn[1].type==="linePrefix"||Qn[1].type==="blockQuotePrefix"||Qn[1].type==="blockQuotePrefixWhitespace"||Qn[1].type==="blockQuoteMarker"||Qn[1].type==="listItemIndent"))break}$t&&(!xn||$t<xn)&&(rr._spread=!0),rr.end=Object.assign({},xn?_e[xn][1].start:Pt[1].end),_e.splice(xn||bt,0,["exit",rr,Pt[2]]),bt++,Je++}if(Pt[1].type==="listItemPrefix"){const Fi={type:"listItem",_spread:!1,start:Object.assign({},Pt[1].start),end:void 0};rr=Fi,_e.splice(bt,0,["enter",Fi,Pt[2]]),bt++,Je++,$t=void 0,Gn=!0}}}return _e[Ne][1]._spread=yi,Je}function s(_e,Ne){return Je;function Je(bt){c.call(this,_e(bt),bt),Ne&&Ne.call(this,bt)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(_e,Ne,Je){this.stack[this.stack.length-1].children.push(_e),this.stack.push(_e),this.tokenStack.push([Ne,Je||void 0]),_e.position={start:Wc(Ne.start),end:void 0}}function d(_e){return Ne;function Ne(Je){_e&&_e.call(this,Je),p.call(this,Je)}}function p(_e,Ne){const Je=this.stack.pop(),bt=this.tokenStack.pop();if(bt)bt[0].type!==_e.type&&(Ne?Ne.call(this,_e,bt[0]):(bt[1]||d2).call(this,_e,bt[0]));else throw new Error("Cannot close `"+_e.type+"` ("+bm({start:_e.start,end:_e.end})+"): it’s not open");Je.position.end=Wc(_e.end)}function m(){return c1(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(_e){if(this.data.expectingFirstListItemValue){const Ne=this.stack[this.stack.length-2];Ne.start=Number.parseInt(this.sliceSerialize(_e),10),this.data.expectingFirstListItemValue=void 0}}function v(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.lang=_e}function S(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.meta=_e}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=_e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=_e.replace(/(\r?\n|\r)$/g,"")}function k(_e){const Ne=this.resume(),Je=this.stack[this.stack.length-1];Je.label=Ne,Je.identifier=gl(this.sliceSerialize(_e)).toLowerCase()}function M(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.title=_e}function O(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.url=_e}function H(_e){const Ne=this.stack[this.stack.length-1];if(!Ne.depth){const Je=this.sliceSerialize(_e).length;Ne.depth=Je}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function F(_e){const Ne=this.stack[this.stack.length-1];Ne.depth=this.sliceSerialize(_e).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function j(_e){const Je=this.stack[this.stack.length-1].children;let bt=Je[Je.length-1];(!bt||bt.type!=="text")&&(bt=hn(),bt.position={start:Wc(_e.start),end:void 0},Je.push(bt)),this.stack.push(bt)}function I(_e){const Ne=this.stack.pop();Ne.value+=this.sliceSerialize(_e),Ne.position.end=Wc(_e.end)}function Y(_e){const Ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Je=Ne.children[Ne.children.length-1];Je.position.end=Wc(_e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Ne.type)&&(j.call(this,_e),I.call(this,_e))}function X(){this.data.atHardBreak=!0}function ne(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=_e}function q(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=_e}function J(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=_e}function B(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const Ne=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=Ne,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function V(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const Ne=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=Ne,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function Z(_e){const Ne=this.sliceSerialize(_e),Je=this.stack[this.stack.length-2];Je.label=iH(Ne),Je.identifier=gl(Ne).toLowerCase()}function Q(){const _e=this.stack[this.stack.length-1],Ne=this.resume(),Je=this.stack[this.stack.length-1];if(this.data.inReference=!0,Je.type==="link"){const bt=_e.children;Je.children=bt}else Je.alt=Ne}function G(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.url=_e}function K(){const _e=this.resume(),Ne=this.stack[this.stack.length-1];Ne.title=_e}function te(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function le(_e){const Ne=this.resume(),Je=this.stack[this.stack.length-1];Je.label=Ne,Je.identifier=gl(this.sliceSerialize(_e)).toLowerCase(),this.data.referenceType="full"}function de(_e){this.data.characterReferenceType=_e.type}function ge(_e){const Ne=this.sliceSerialize(_e),Je=this.data.characterReferenceType;let bt;Je?(bt=kM(Ne,Je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):bt=u1(Ne);const kt=this.stack[this.stack.length-1];kt.value+=bt}function se(_e){const Ne=this.stack.pop();Ne.position.end=Wc(_e.end)}function pe(_e){I.call(this,_e);const Ne=this.stack[this.stack.length-1];Ne.url=this.sliceSerialize(_e)}function Ae(_e){I.call(this,_e);const Ne=this.stack[this.stack.length-1];Ne.url="mailto:"+this.sliceSerialize(_e)}function Le(){return{type:"blockquote",children:[]}}function Ge(){return{type:"code",lang:null,meta:null,value:""}}function Pe(){return{type:"inlineCode",value:""}}function Ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function We(){return{type:"emphasis",children:[]}}function ut(){return{type:"heading",depth:0,children:[]}}function Ue(){return{type:"break"}}function At(){return{type:"html",value:""}}function zn(){return{type:"image",title:null,url:"",alt:null}}function Bn(){return{type:"link",title:null,url:"",children:[]}}function bn(_e){return{type:"list",ordered:_e.type==="listOrdered",start:null,spread:_e._spread,children:[]}}function wi(_e){return{type:"listItem",spread:_e._spread,checked:null,children:[]}}function ka(){return{type:"paragraph",children:[]}}function Lr(){return{type:"strong",children:[]}}function hn(){return{type:"text",value:""}}function ua(){return{type:"thematicBreak"}}}function Wc(t){return{line:t.line,column:t.column,offset:t.offset}}function GM(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?GM(t,i):lH(t,i)}}function lH(t,e){let n;for(n in e)if(PM.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function d2(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+bm({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+bm({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+bm({start:e.start,end:e.end})+") is still open")}function oH(t){const e=this;e.parser=n;function n(i){return aH(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function cH(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function uH(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
348
|
+
`}]}function fH(t,e){const n=e.value?e.value+`
|
|
349
|
+
`:"",i={},r=e.lang?e.lang.split(/\s+/):[];r.length>0&&(i.className=["language-"+r[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function dH(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function hH(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function pH(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),r=xh(i.toLowerCase()),s=t.footnoteOrder.indexOf(i);let l,c=t.footnoteCounts.get(i);c===void 0?(c=0,t.footnoteOrder.push(i),l=t.footnoteOrder.length):l=s+1,c+=1,t.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};t.patch(e,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return t.patch(e,p),t.applyData(e,p)}function mH(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function gH(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function FM(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const l=r[r.length-1];return l&&l.type==="text"?l.value+=i:r.push({type:"text",value:i}),r}function yH(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return FM(t,e);const r={src:xh(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,s),t.applyData(e,s)}function bH(t,e){const n={src:xh(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function xH(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function vH(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return FM(t,e);const r={href:xh(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function _H(t,e){const n={href:xh(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function SH(t,e,n){const i=t.all(e),r=n?EH(n):qM(e),s={},l=[];if(typeof e.checked=="boolean"){const m=i[0];let g;m&&m.type==="element"&&m.tagName==="p"?g=m:(g={type:"element",tagName:"p",properties:{},children:[]},i.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(r||c!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
|
|
350
|
+
`}),m.type==="element"&&m.tagName==="p"&&!r?l.push(...m.children):l.push(m)}const d=i[i.length-1];d&&(r||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
351
|
+
`});const p={type:"element",tagName:"li",properties:s,children:l};return t.patch(e,p),t.applyData(e,p)}function EH(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=qM(n[i])}return e}function qM(t){const e=t.spread;return e??t.children.length>1}function wH(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r<i.length;){const l=i[r];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function TH(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function CH(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function AH(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function MH(t,e){const n=t.all(e),i=n.shift(),r=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],l),r.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},c=a1(e.children[1]),d=EM(e.children[e.children.length-1]);c&&d&&(l.position={start:c,end:d}),r.push(l)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function RH(t,e,n){const i=n?n.children:void 0,s=(i?i.indexOf(e):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:e.children.length;let d=-1;const p=[];for(;++d<c;){const g=e.children[d],b={},v=l?l[d]:void 0;v&&(b.align=v);let S={type:"element",tagName:s,properties:b,children:[]};g&&(S.children=t.all(g),t.patch(g,S),S=t.applyData(g,S)),p.push(S)}const m={type:"element",tagName:"tr",properties:{},children:t.wrap(p,!0)};return t.patch(e,m),t.applyData(e,m)}function NH(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const h2=9,p2=32;function kH(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),r=0;const s=[];for(;i;)s.push(m2(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return s.push(m2(e.slice(r),r>0,!1)),s.join("")}function m2(t,e,n){let i=0,r=t.length;if(e){let s=t.codePointAt(i);for(;s===h2||s===p2;)i++,s=t.codePointAt(i)}if(n){let s=t.codePointAt(r-1);for(;s===h2||s===p2;)r--,s=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function OH(t,e){const n={type:"text",value:kH(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function DH(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const zH={blockquote:cH,break:uH,code:fH,delete:dH,emphasis:hH,footnoteReference:pH,heading:mH,html:gH,imageReference:yH,image:bH,inlineCode:xH,linkReference:vH,link:_H,listItem:SH,list:wH,paragraph:TH,root:CH,strong:AH,table:MH,tableCell:NH,tableRow:RH,text:OH,thematicBreak:DH,toml:jy,yaml:jy,definition:jy,footnoteDefinition:jy};function jy(){}const YM=-1,tb=0,vm=1,C0=2,d1=3,h1=4,p1=5,m1=6,VM=7,XM=8,g2=typeof self=="object"?self:globalThis,BH=(t,e)=>{const n=(r,s)=>(t.set(s,r),r),i=r=>{if(t.has(r))return t.get(r);const[s,l]=e[r];switch(s){case tb:case YM:return n(l,r);case vm:{const c=n([],r);for(const d of l)c.push(i(d));return c}case C0:{const c=n({},r);for(const[d,p]of l)c[i(d)]=i(p);return c}case d1:return n(new Date(l),r);case h1:{const{source:c,flags:d}=l;return n(new RegExp(c,d),r)}case p1:{const c=n(new Map,r);for(const[d,p]of l)c.set(i(d),i(p));return c}case m1:{const c=n(new Set,r);for(const d of l)c.add(i(d));return c}case VM:{const{name:c,message:d}=l;return n(new g2[c](d),r)}case XM:return n(BigInt(l),r);case"BigInt":return n(Object(BigInt(l)),r);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new g2[s](l),r)};return i},y2=t=>BH(new Map,t)(0),Bd="",{toString:LH}={},{keys:UH}=Object,nm=t=>{const e=typeof t;if(e!=="object"||!t)return[tb,e];const n=LH.call(t).slice(8,-1);switch(n){case"Array":return[vm,Bd];case"Object":return[C0,Bd];case"Date":return[d1,Bd];case"RegExp":return[h1,Bd];case"Map":return[p1,Bd];case"Set":return[m1,Bd];case"DataView":return[vm,n]}return n.includes("Array")?[vm,n]:n.includes("Error")?[VM,n]:[C0,n]},Py=([t,e])=>t===tb&&(e==="function"||e==="symbol"),IH=(t,e,n,i)=>{const r=(l,c)=>{const d=i.push(l)-1;return n.set(c,d),d},s=l=>{if(n.has(l))return n.get(l);let[c,d]=nm(l);switch(c){case tb:{let m=l;switch(d){case"bigint":c=XM,m=l.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return r([YM],l)}return r([c,m],l)}case vm:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),r([d,[...b]],l)}const m=[],g=r([c,m],l);for(const b of l)m.push(s(b));return g}case C0:{if(d)switch(d){case"BigInt":return r([d,l.toString()],l);case"Boolean":case"Number":case"String":return r([d,l.valueOf()],l)}if(e&&"toJSON"in l)return s(l.toJSON());const m=[],g=r([c,m],l);for(const b of UH(l))(t||!Py(nm(l[b])))&&m.push([s(b),s(l[b])]);return g}case d1:return r([c,l.toISOString()],l);case h1:{const{source:m,flags:g}=l;return r([c,{source:m,flags:g}],l)}case p1:{const m=[],g=r([c,m],l);for(const[b,v]of l)(t||!(Py(nm(b))||Py(nm(v))))&&m.push([s(b),s(v)]);return g}case m1:{const m=[],g=r([c,m],l);for(const b of l)(t||!Py(nm(b)))&&m.push(s(b));return g}}const{message:p}=l;return r([c,{name:d,message:p}],l)};return s},b2=(t,{json:e,lossy:n}={})=>{const i=[];return IH(!(e||n),!!e,new Map,i)(t),i},A0=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?y2(b2(t,e)):structuredClone(t):(t,e)=>y2(b2(t,e));function HH(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function jH(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function PH(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||HH,i=t.options.footnoteBackLabel||jH,r=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",l=t.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<t.footnoteOrder.length;){const p=t.footnoteById.get(t.footnoteOrder[d]);if(!p)continue;const m=t.all(p),g=String(p.identifier).toUpperCase(),b=xh(g.toLowerCase());let v=0;const S=[],C=t.footnoteCounts.get(g);for(;C!==void 0&&++v<=C;){S.length>0&&S.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,v);typeof k=="string"&&(k={type:"text",value:k}),S.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,v),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const k=T.children[T.children.length-1];k&&k.type==="text"?k.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...S)}else m.push(...S);const w={type:"element",tagName:"li",properties:{id:e+"fn-"+b},children:t.wrap(m,!0)};t.patch(p,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...A0(l),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
|
|
352
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(c,!0)},{type:"text",value:`
|
|
353
|
+
`}]}}const Km=(function(t){if(t==null)return YH;if(typeof t=="function")return nb(t);if(typeof t=="object")return Array.isArray(t)?GH(t):FH(t);if(typeof t=="string")return qH(t);throw new Error("Expected function, string, or object as test")});function GH(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Km(t[n]);return nb(i);function i(...r){let s=-1;for(;++s<e.length;)if(e[s].apply(this,r))return!0;return!1}}function FH(t){const e=t;return nb(n);function n(i){const r=i;let s;for(s in t)if(r[s]!==e[s])return!1;return!0}}function qH(t){return nb(e);function e(n){return n&&n.type===t}}function nb(t){return e;function e(n,i,r){return!!(VH(n)&&t.call(this,n,typeof i=="number"?i:void 0,r||void 0))}}function YH(){return!0}function VH(t){return t!==null&&typeof t=="object"&&"type"in t}const KM=[],XH=!0,l_=!1,KH="skip";function WM(t,e,n,i){let r;typeof e=="function"&&typeof n!="function"?(i=n,n=e):r=e;const s=Km(r),l=i?-1:1;c(t,void 0,[])();function c(d,p,m){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=KM,S,C,T;if((!e||s(d,p,m[m.length-1]||void 0))&&(v=WH(n(d,m)),v[0]===l_))return v;if("children"in d&&d.children){const w=d;if(w.children&&v[0]!==KH)for(C=(i?w.children.length:-1)+l,T=m.concat(w);C>-1&&C<w.children.length;){const k=w.children[C];if(S=c(k,C,T)(),S[0]===l_)return S;C=typeof S[1]=="number"?S[1]:C+l}}return v}}}function WH(t){return Array.isArray(t)?t:typeof t=="number"?[XH,t]:t==null?KM:[t]}function ib(t,e,n,i){let r,s,l;typeof e=="function"&&typeof n!="function"?(s=void 0,l=e,r=n):(s=e,l=n,r=i),WM(t,s,c,r);function c(d,p){const m=p[p.length-1],g=m?m.children.indexOf(d):void 0;return l(d,g,m)}}const o_={}.hasOwnProperty,$H={};function ZH(t,e){const n=e||$H,i=new Map,r=new Map,s=new Map,l={...zH,...n.handlers},c={all:p,applyData:JH,definitionById:i,footnoteById:r,footnoteCounts:s,footnoteOrder:[],handlers:l,one:d,options:n,patch:QH,wrap:t7};return ib(t,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const g=m.type==="definition"?i:r,b=String(m.identifier).toUpperCase();g.has(b)||g.set(b,m)}}),c;function d(m,g){const b=m.type,v=c.handlers[b];if(o_.call(c.handlers,b)&&v)return v(c,m,g);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const{children:C,...T}=m,w=A0(T);return w.children=c.all(m),w}return A0(m)}return(c.options.unknownHandler||e7)(c,m,g)}function p(m){const g=[];if("children"in m){const b=m.children;let v=-1;for(;++v<b.length;){const S=c.one(b[v],m);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=x2(S.value)),!Array.isArray(S)&&S.type==="element")){const C=S.children[0];C&&C.type==="text"&&(C.value=x2(C.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function QH(t,e){t.position&&(e.position=j8(t))}function JH(t,e){let n=e;if(t&&t.data){const i=t.data.hName,r=t.data.hChildren,s=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,A0(s)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function e7(t,e){const n=e.data||{},i="value"in e&&!(o_.call(n,"hProperties")||o_.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function t7(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
|
|
354
|
+
`});++i<t.length;)i&&n.push({type:"text",value:`
|
|
355
|
+
`}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
356
|
+
`}),n}function x2(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function v2(t,e){const n=ZH(t,e),i=n.one(t,void 0),r=PH(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:`
|
|
357
|
+
`},r),s}function n7(t,e){return t&&"run"in t?async function(n,i){const r=v2(n,{file:i,...e});await t.run(r,i)}:function(n,i){return v2(n,{file:i,...t||e})}}function _2(t){if(t)throw t}var $x,S2;function i7(){if(S2)return $x;S2=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(p){return typeof Array.isArray=="function"?Array.isArray(p):e.call(p)==="[object Array]"},s=function(p){if(!p||e.call(p)!=="[object Object]")return!1;var m=t.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!g)return!1;var b;for(b in p);return typeof b>"u"||t.call(p,b)},l=function(p,m){n&&m.name==="__proto__"?n(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},c=function(p,m){if(m==="__proto__")if(t.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return $x=function d(){var p,m,g,b,v,S,C=arguments[0],T=1,w=arguments.length,k=!1;for(typeof C=="boolean"&&(k=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<w;++T)if(p=arguments[T],p!=null)for(m in p)g=c(C,m),b=c(p,m),C!==b&&(k&&b&&(s(b)||(v=r(b)))?(v?(v=!1,S=g&&r(g)?g:[]):S=g&&s(g)?g:{},l(C,{name:m,newValue:d(k,S,b)})):typeof b<"u"&&l(C,{name:m,newValue:b}));return C},$x}var r7=i7();const Zx=lu(r7);function c_(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function a7(){const t=[],e={run:n,use:i};return e;function n(...r){let s=-1;const l=r.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...r);function c(d,...p){const m=t[++s];let g=-1;if(d){l(d);return}for(;++g<r.length;)(p[g]===null||p[g]===void 0)&&(p[g]=r[g]);r=p,m?s7(m,c)(...p):l(null,...p)}}function i(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return t.push(r),e}}function s7(t,e){let n;return i;function i(...l){const c=t.length>l.length;let d;c&&l.push(r);try{d=t.apply(this,l)}catch(p){const m=p;if(c&&n)throw m;return r(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(s,r):d instanceof Error?r(d):s(d))}function r(l,...c){n||(n=!0,e(l,...c))}function s(l){r(null,l)}}const so={basename:l7,dirname:o7,extname:c7,join:u7,sep:"/"};function l7(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Wm(t);let n=0,i=-1,r=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let l=-1,c=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else l<0&&(s=!0,l=r+1),c>-1&&(t.codePointAt(r)===e.codePointAt(c--)?c<0&&(i=r):(c=-1,i=l));return n===i?i=l:i<0&&(i=t.length),t.slice(n,i)}function o7(t){if(Wm(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function c7(t){Wm(t);let e=t.length,n=-1,i=0,r=-1,s=0,l;for(;e--;){const c=t.codePointAt(e);if(c===47){if(l){i=e+1;break}continue}n<0&&(l=!0,n=e+1),c===46?r<0?r=e:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function u7(...t){let e=-1,n;for(;++e<t.length;)Wm(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":f7(n)}function f7(t){Wm(t);const e=t.codePointAt(0)===47;let n=d7(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function d7(t,e){let n="",i=0,r=-1,s=0,l=-1,c,d;for(;++l<=t.length;){if(l<t.length)c=t.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(r===l-1||s===1))if(r!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),r=l,s=0;continue}}else if(n.length>0){n="",i=0,r=l,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,l):n=t.slice(r+1,l),i=l-r-1;r=l,s=0}else c===46&&s>-1?s++:s=-1}return n}function Wm(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const h7={cwd:p7};function p7(){return"/"}function u_(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function m7(t){if(typeof t=="string")t=new URL(t);else if(!u_(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return g7(t)}function g7(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}const Qx=["history","path","basename","stem","extname","dirname"];class $M{constructor(e){let n;e?u_(e)?n={path:e}:typeof e=="string"||y7(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":h7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Qx.length;){const s=Qx[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let r;for(r in n)Qx.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?so.basename(this.path):void 0}set basename(e){ev(e,"basename"),Jx(e,"basename"),this.path=so.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?so.dirname(this.path):void 0}set dirname(e){E2(this.basename,"dirname"),this.path=so.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?so.extname(this.path):void 0}set extname(e){if(Jx(e,"extname"),E2(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=so.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){u_(e)&&(e=m7(e)),ev(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?so.basename(this.path,this.extname):void 0}set stem(e){ev(e,"stem"),Jx(e,"stem"),this.path=so.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const r=this.message(e,n,i);throw r.fatal=!0,r}info(e,n,i){const r=this.message(e,n,i);return r.fatal=void 0,r}message(e,n,i){const r=new Br(e,n,i);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Jx(t,e){if(t&&t.includes(so.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+so.sep+"`")}function ev(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function E2(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function y7(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const b7=(function(t){const i=this.constructor.prototype,r=i[t],s=function(){return r.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),x7={}.hasOwnProperty;class g1 extends b7{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=a7()}copy(){const e=new g1;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(Zx(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(iv("data",this.frozen),this.namespace[e]=n,this):x7.call(this.namespace,e)&&this.namespace[e]||void 0:e?(iv("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const r=n.call(e,...i);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Gy(e),i=this.parser||this.Parser;return tv("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),tv("process",this.parser||this.Parser),nv("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(s,l){const c=Gy(e),d=i.parse(c);i.run(d,c,function(m,g,b){if(m||!g||!b)return p(m);const v=g,S=i.stringify(v,b);S7(S)?b.value=S:b.result=S,p(m,b)});function p(m,g){m||!g?l(m):s?s(g):n(void 0,g)}}}processSync(e){let n=!1,i;return this.freeze(),tv("processSync",this.parser||this.Parser),nv("processSync",this.compiler||this.Compiler),this.process(e,r),T2("processSync","process",n),i;function r(s,l){n=!0,_2(s),i=l}}run(e,n,i){w2(e),this.freeze();const r=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,c){const d=Gy(n);r.run(e,d,p);function p(m,g,b){const v=g||e;m?c(m):l?l(v):i(void 0,v,b)}}}runSync(e,n){let i=!1,r;return this.run(e,n,s),T2("runSync","run",i),r;function s(l,c){_2(l),r=c,i=!0}}stringify(e,n){this.freeze();const i=Gy(n),r=this.compiler||this.Compiler;return nv("stringify",r),w2(e),r(e,i)}use(e,...n){const i=this.attachers,r=this.namespace;if(iv("use",this.frozen),e!=null)if(typeof e=="function")d(e,n);else if(typeof e=="object")Array.isArray(e)?c(e):l(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...g]=p;d(m,g)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(p.plugins),p.settings&&(r.settings=Zx(!0,r.settings,p.settings))}function c(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const g=p[m];s(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,m){let g=-1,b=-1;for(;++g<i.length;)if(i[g][0]===p){b=g;break}if(b===-1)i.push([p,...m]);else if(m.length>0){let[v,...S]=m;const C=i[b][1];c_(C)&&c_(v)&&(v=Zx(!0,C,v)),i[b]=[p,v,...S]}}}}const v7=new g1().freeze();function tv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function nv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function iv(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function w2(t){if(!c_(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function T2(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Gy(t){return _7(t)?t:new $M(t)}function _7(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function S7(t){return typeof t=="string"||E7(t)}function E7(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const w7="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",C2=[],A2={allowDangerousHtml:!0},T7=/^(https?|ircs?|mailto|xmpp)$/i,C7=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function A7(t){const e=M7(t),n=R7(t);return N7(e.runSync(e.parse(n),n),t)}function M7(t){const e=t.rehypePlugins||C2,n=t.remarkPlugins||C2,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...A2}:A2;return v7().use(oH).use(n).use(n7,i).use(e)}function R7(t){const e=t.children||"",n=new $M;return typeof e=="string"&&(n.value=e),n}function N7(t,e){const n=e.allowedElements,i=e.allowElement,r=e.components,s=e.disallowedElements,l=e.skipHtml,c=e.unwrapDisallowed,d=e.urlTransform||k7;for(const m of C7)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+w7+m.id,void 0);return ib(t,p),Y8(t,{Fragment:N.Fragment,components:r,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function p(m,g,b){if(m.type==="raw"&&b&&typeof g=="number")return l?b.children.splice(g,1):b.children[g]={type:"text",value:m.value},g;if(m.type==="element"){let v;for(v in Xx)if(Object.hasOwn(Xx,v)&&Object.hasOwn(m.properties,v)){const S=m.properties[v],C=Xx[v];(C===null||C.includes(m.tagName))&&(m.properties[v]=d(String(S||""),v,m))}}if(m.type==="element"){let v=n?!n.includes(m.tagName):s?s.includes(m.tagName):!1;if(!v&&i&&typeof g=="number"&&(v=!i(m,g,b)),v&&b&&typeof g=="number")return c&&m.children?b.children.splice(g,1,...m.children):b.children.splice(g,1),g}}}function k7(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e===-1||r!==-1&&e>r||n!==-1&&e>n||i!==-1&&e>i||T7.test(t.slice(0,e))?t:""}function M2(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;r!==-1;)i++,r=n.indexOf(e,r+e.length);return i}function O7(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function D7(t,e,n){const r=Km((n||{}).ignore||[]),s=z7(e);let l=-1;for(;++l<s.length;)WM(t,"text",c);function c(p,m){let g=-1,b;for(;++g<m.length;){const v=m[g],S=b?b.children:void 0;if(r(v,S?S.indexOf(v):void 0,b))return;b=v}if(b)return d(p,m)}function d(p,m){const g=m[m.length-1],b=s[l][0],v=s[l][1];let S=0;const T=g.children.indexOf(p);let w=!1,k=[];b.lastIndex=0;let M=b.exec(p.value);for(;M;){const O=M.index,H={index:M.index,input:M.input,stack:[...m,p]};let z=v(...M,H);if(typeof z=="string"&&(z=z.length>0?{type:"text",value:z}:void 0),z===!1?b.lastIndex=O+1:(S!==O&&k.push({type:"text",value:p.value.slice(S,O)}),Array.isArray(z)?k.push(...z):z&&k.push(z),S=O+M[0].length,w=!0),!b.global)break;M=b.exec(p.value)}return w?(S<p.value.length&&k.push({type:"text",value:p.value.slice(S)}),g.children.splice(T,1,...k)):k=[p],T+k.length}}function z7(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const r=n[i];e.push([B7(r[0]),L7(r[1])])}return e}function B7(t){return typeof t=="string"?new RegExp(O7(t),"g"):t}function L7(t){return typeof t=="function"?t:function(){return t}}const rv="phrasing",av=["autolink","link","image","label"];function U7(){return{transforms:[q7],enter:{literalAutolink:H7,literalAutolinkEmail:sv,literalAutolinkHttp:sv,literalAutolinkWww:sv},exit:{literalAutolink:F7,literalAutolinkEmail:G7,literalAutolinkHttp:j7,literalAutolinkWww:P7}}}function I7(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rv,notInConstruct:av},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rv,notInConstruct:av},{character:":",before:"[ps]",after:"\\/",inConstruct:rv,notInConstruct:av}]}}function H7(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function sv(t){this.config.enter.autolinkProtocol.call(this,t)}function j7(t){this.config.exit.autolinkProtocol.call(this,t)}function P7(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function G7(t){this.config.exit.autolinkEmail.call(this,t)}function F7(t){this.exit(t)}function q7(t){D7(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Y7],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),V7]],{ignore:["link","linkReference"]})}function Y7(t,e,n,i,r){let s="";if(!ZM(r)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!X7(n)))return!1;const l=K7(n+i);if(!l[0])return!1;const c={type:"link",title:null,url:s+e+l[0],children:[{type:"text",value:e+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function V7(t,e,n,i){return!ZM(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function X7(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function K7(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=M2(t,"(");let s=M2(t,")");for(;i!==-1&&r>s;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[t,n]}function ZM(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||yf(n)||J0(n))&&(!e||n!==47)}QM.peek=ij;function W7(){this.buffer()}function $7(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Z7(){this.buffer()}function Q7(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function J7(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gl(this.sliceSerialize(t)).toLowerCase(),n.label=e}function ej(t){this.exit(t)}function tj(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gl(this.sliceSerialize(t)).toLowerCase(),n.label=e}function nj(t){this.exit(t)}function ij(){return"["}function QM(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return s+=r.move(n.safe(n.associationId(t),{after:"]",before:s})),c(),l(),s+=r.move("]"),s}function rj(){return{enter:{gfmFootnoteCallString:W7,gfmFootnoteCall:$7,gfmFootnoteDefinitionLabelString:Z7,gfmFootnoteDefinition:Q7},exit:{gfmFootnoteCallString:J7,gfmFootnoteCall:ej,gfmFootnoteDefinitionLabelString:tj,gfmFootnoteDefinition:nj}}}function aj(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:QM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,r,s,l){const c=s.createTracker(l);let d=c.move("[^");const p=s.enter("footnoteDefinition"),m=s.enter("label");return d+=c.move(s.safe(s.associationId(i),{before:d,after:"]"})),m(),d+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),d+=c.move((e?`
|
|
358
|
+
`:" ")+s.indentLines(s.containerFlow(i,c.current()),e?JM:sj))),p(),d}}function sj(t,e,n){return e===0?t:JM(t,e,n)}function JM(t,e,n){return(n?"":" ")+t}const lj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];eR.peek=dj;function oj(){return{canContainEols:["delete"],enter:{strikethrough:uj},exit:{strikethrough:fj}}}function cj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lj}],handlers:{delete:eR}}}function uj(t){this.enter({type:"delete",children:[]},t)}function fj(t){this.exit(t)}function eR(t,e,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let l=r.move("~~");return l+=n.containerPhrasing(t,{...r.current(),before:l,after:"~"}),l+=r.move("~~"),s(),l}function dj(){return"~"}function hj(t){return t.length}function pj(t,e){const n=e||{},i=(n.align||[]).concat(),r=n.stringLength||hj,s=[],l=[],c=[],d=[];let p=0,m=-1;for(;++m<t.length;){const C=[],T=[];let w=-1;for(t[m].length>p&&(p=t[m].length);++w<t[m].length;){const k=mj(t[m][w]);if(n.alignDelimiters!==!1){const M=r(k);T[w]=M,(d[w]===void 0||M>d[w])&&(d[w]=M)}C.push(k)}l[m]=C,c[m]=T}let g=-1;if(typeof i=="object"&&"length"in i)for(;++g<p;)s[g]=R2(i[g]);else{const C=R2(i);for(;++g<p;)s[g]=C}g=-1;const b=[],v=[];for(;++g<p;){const C=s[g];let T="",w="";C===99?(T=":",w=":"):C===108?T=":":C===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[g]-T.length-w.length);const M=T+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=T.length+k+w.length,k>d[g]&&(d[g]=k),v[g]=k),b[g]=M}l.splice(1,0,b),c.splice(1,0,v),m=-1;const S=[];for(;++m<l.length;){const C=l[m],T=c[m];g=-1;const w=[];for(;++g<p;){const k=C[g]||"";let M="",O="";if(n.alignDelimiters!==!1){const H=d[g]-(T[g]||0),z=s[g];z===114?M=" ".repeat(H):z===99?H%2?(M=" ".repeat(H/2+.5),O=" ".repeat(H/2-.5)):(M=" ".repeat(H/2),O=M):O=" ".repeat(H)}n.delimiterStart!==!1&&!g&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||g)&&w.push(" "),n.alignDelimiters!==!1&&w.push(M),w.push(k),n.alignDelimiters!==!1&&w.push(O),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||g!==p-1)&&w.push("|")}S.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return S.join(`
|
|
359
|
+
`)}function mj(t){return t==null?"":String(t)}function R2(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function gj(t,e,n,i){const r=n.enter("blockquote"),s=n.createTracker(i);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(t,s.current()),yj);return r(),l}function yj(t,e,n){return">"+(n?"":" ")+t}function bj(t,e){return N2(t,e.inConstruct,!0)&&!N2(t,e.notInConstruct,!1)}function N2(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function k2(t,e,n,i){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===`
|
|
360
|
+
`&&bj(n.stack,n.unsafe[r]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
361
|
+
`}function xj(t,e){const n=String(t);let i=n.indexOf(e),r=i,s=0,l=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===r?++s>l&&(l=s):s=1,r=i+e.length,i=n.indexOf(e,r);return l}function vj(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function _j(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Sj(t,e,n,i){const r=_j(n),s=t.value||"",l=r==="`"?"GraveAccent":"Tilde";if(vj(t,n)){const g=n.enter("codeIndented"),b=n.indentLines(s,Ej);return g(),b}const c=n.createTracker(i),d=r.repeat(Math.max(xj(s,r)+1,3)),p=n.enter("codeFenced");let m=c.move(d);if(t.lang){const g=n.enter(`codeFencedLang${l}`);m+=c.move(n.safe(t.lang,{before:m,after:" ",encode:["`"],...c.current()})),g()}if(t.lang&&t.meta){const g=n.enter(`codeFencedMeta${l}`);m+=c.move(" "),m+=c.move(n.safe(t.meta,{before:m,after:`
|
|
362
|
+
`,encode:["`"],...c.current()})),g()}return m+=c.move(`
|
|
363
|
+
`),s&&(m+=c.move(s+`
|
|
364
|
+
`)),m+=c.move(d),p(),m}function Ej(t,e,n){return(n?"":" ")+t}function y1(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function wj(t,e,n,i){const r=y1(n),s=r==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(i);let p=d.move("[");return p+=d.move(n.safe(n.associationId(t),{before:p,after:"]",...d.current()})),p+=d.move("]: "),c(),!t.url||/[\0- \u007F]/.test(t.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(t.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(t.url,{before:p,after:t.title?" ":`
|
|
365
|
+
`,...d.current()}))),c(),t.title&&(c=n.enter(`title${s}`),p+=d.move(" "+r),p+=d.move(n.safe(t.title,{before:p,after:r,...d.current()})),p+=d.move(r),c()),l(),p}function Tj(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function km(t){return"&#x"+t.toString(16).toUpperCase()+";"}function M0(t,e,n){const i=sh(t),r=sh(e);return i===void 0?r===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}tR.peek=Cj;function tR(t,e,n,i){const r=Tj(n),s=n.enter("emphasis"),l=n.createTracker(i),c=l.move(r);let d=l.move(n.containerPhrasing(t,{after:r,before:c,...l.current()}));const p=d.charCodeAt(0),m=M0(i.before.charCodeAt(i.before.length-1),p,r);m.inside&&(d=km(p)+d.slice(1));const g=d.charCodeAt(d.length-1),b=M0(i.after.charCodeAt(0),g,r);b.inside&&(d=d.slice(0,-1)+km(g));const v=l.move(r);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+v}function Cj(t,e,n){return n.options.emphasis||"*"}function Aj(t,e){let n=!1;return ib(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,l_}),!!((!t.depth||t.depth<3)&&c1(t)&&(e.options.setext||n))}function Mj(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(i);if(Aj(t,n)){const m=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(t,{...s.current(),before:`
|
|
366
|
+
`,after:`
|
|
367
|
+
`});return g(),m(),b+`
|
|
368
|
+
`+(r===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
369
|
+
`))+1))}const l="#".repeat(r),c=n.enter("headingAtx"),d=n.enter("phrasing");s.move(l+" ");let p=n.containerPhrasing(t,{before:"# ",after:`
|
|
370
|
+
`,...s.current()});return/^[\t ]/.test(p)&&(p=km(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),d(),c(),p}nR.peek=Rj;function nR(t){return t.value||""}function Rj(){return"<"}iR.peek=Nj;function iR(t,e,n,i){const r=y1(n),s=r==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(i);let p=d.move("![");return p+=d.move(n.safe(t.alt,{before:p,after:"]",...d.current()})),p+=d.move("]("),c(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(t.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(t.url,{before:p,after:t.title?" ":")",...d.current()}))),c(),t.title&&(c=n.enter(`title${s}`),p+=d.move(" "+r),p+=d.move(n.safe(t.title,{before:p,after:r,...d.current()})),p+=d.move(r),c()),p+=d.move(")"),l(),p}function Nj(){return"!"}rR.peek=kj;function rR(t,e,n,i){const r=t.referenceType,s=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(i);let d=c.move("![");const p=n.safe(t.alt,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(t),{before:d,after:"]",...c.current()});return l(),n.stack=m,s(),r==="full"||!p||p!==g?d+=c.move(g+"]"):r==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function kj(){return"!"}aR.peek=Oj;function aR(t,e,n){let i=t.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<n.unsafe.length;){const l=n.unsafe[s],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(i);){let p=d.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(d.index+1)}}return r+i+r}function Oj(){return"`"}function sR(t,e){const n=c1(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}lR.peek=Dj;function lR(t,e,n,i){const r=y1(n),s=r==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let c,d;if(sR(t,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let g=l.move("<");return g+=l.move(n.containerPhrasing(t,{before:g,after:">",...l.current()})),g+=l.move(">"),c(),n.stack=m,g}c=n.enter("link"),d=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(t,{before:p,after:"](",...l.current()})),p+=l.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(t.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(d=n.enter("destinationRaw"),p+=l.move(n.safe(t.url,{before:p,after:t.title?" ":")",...l.current()}))),d(),t.title&&(d=n.enter(`title${s}`),p+=l.move(" "+r),p+=l.move(n.safe(t.title,{before:p,after:r,...l.current()})),p+=l.move(r),d()),p+=l.move(")"),c(),p}function Dj(t,e,n){return sR(t,n)?"<":"["}oR.peek=zj;function oR(t,e,n,i){const r=t.referenceType,s=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(i);let d=c.move("[");const p=n.containerPhrasing(t,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(t),{before:d,after:"]",...c.current()});return l(),n.stack=m,s(),r==="full"||!p||p!==g?d+=c.move(g+"]"):r==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function zj(){return"["}function b1(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Bj(t){const e=b1(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Lj(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function cR(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Uj(t,e,n,i){const r=n.enter("list"),s=n.bulletCurrent;let l=t.ordered?Lj(n):b1(n);const c=t.ordered?l==="."?")":".":Bj(n);let d=e&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!t.ordered){const m=t.children?t.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),cR(n)===l&&m){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(t,i);return n.bulletLastUsed=l,n.bulletCurrent=s,r(),p}function Ij(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function Hj(t,e,n,i){const r=Ij(n);let s=n.bulletCurrent||b1(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let l=s.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(i);c.move(s+" ".repeat(l-s.length)),c.shift(l);const d=n.enter("listItem"),p=n.indentLines(n.containerFlow(t,c.current()),m);return d(),p;function m(g,b,v){return b?(v?"":" ".repeat(l))+g:(v?s:s+" ".repeat(l-s.length))+g}}function jj(t,e,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(t,i);return s(),r(),l}const Pj=Km(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gj(t,e,n,i){return(t.children.some(function(l){return Pj(l)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function Fj(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}uR.peek=qj;function uR(t,e,n,i){const r=Fj(n),s=n.enter("strong"),l=n.createTracker(i),c=l.move(r+r);let d=l.move(n.containerPhrasing(t,{after:r,before:c,...l.current()}));const p=d.charCodeAt(0),m=M0(i.before.charCodeAt(i.before.length-1),p,r);m.inside&&(d=km(p)+d.slice(1));const g=d.charCodeAt(d.length-1),b=M0(i.after.charCodeAt(0),g,r);b.inside&&(d=d.slice(0,-1)+km(g));const v=l.move(r+r);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+v}function qj(t,e,n){return n.options.strong||"*"}function Yj(t,e,n,i){return n.safe(t.value,i)}function Vj(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Xj(t,e,n){const i=(cR(n)+(n.options.ruleSpaces?" ":"")).repeat(Vj(n));return n.options.ruleSpaces?i.slice(0,-1):i}const fR={blockquote:gj,break:k2,code:Sj,definition:wj,emphasis:tR,hardBreak:k2,heading:Mj,html:nR,image:iR,imageReference:rR,inlineCode:aR,link:lR,linkReference:oR,list:Uj,listItem:Hj,paragraph:jj,root:Gj,strong:uR,text:Yj,thematicBreak:Xj};function Kj(){return{enter:{table:Wj,tableData:O2,tableHeader:O2,tableRow:Zj},exit:{codeText:Qj,table:$j,tableData:lv,tableHeader:lv,tableRow:lv}}}function Wj(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function $j(t){this.exit(t),this.data.inTable=void 0}function Zj(t){this.enter({type:"tableRow",children:[]},t)}function lv(t){this.exit(t)}function O2(t){this.enter({type:"tableCell",children:[]},t)}function Qj(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Jj));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Jj(t,e){return e==="|"?e:t}function e9(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
371
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(v,S,C,T){return p(m(v,C,T),v.align)}function c(v,S,C,T){const w=g(v,C,T),k=p([w]);return k.slice(0,k.indexOf(`
|
|
372
|
+
`))}function d(v,S,C,T){const w=C.enter("tableCell"),k=C.enter("phrasing"),M=C.containerPhrasing(v,{...T,before:s,after:s});return k(),w(),M}function p(v,S){return pj(v,{align:S,alignDelimiters:i,padding:n,stringLength:r})}function m(v,S,C){const T=v.children;let w=-1;const k=[],M=S.enter("table");for(;++w<T.length;)k[w]=g(T[w],S,C);return M(),k}function g(v,S,C){const T=v.children;let w=-1;const k=[],M=S.enter("tableRow");for(;++w<T.length;)k[w]=d(T[w],v,S,C);return M(),k}function b(v,S,C){let T=fR.inlineCode(v,S,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function t9(){return{exit:{taskListCheckValueChecked:D2,taskListCheckValueUnchecked:D2,paragraph:i9}}}function n9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:r9}}}function D2(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function i9(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const r=e.children;let s=-1,l;for(;++s<r.length;){const c=r[s];if(c.type==="paragraph"){l=c;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function r9(t,e,n,i){const r=t.children[0],s=typeof t.checked=="boolean"&&r&&r.type==="paragraph",l="["+(t.checked?"x":" ")+"] ",c=n.createTracker(i);s&&c.move(l);let d=fR.listItem(t,e,n,{...i,...c.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),d;function p(m){return m+l}}function a9(){return[U7(),rj(),oj(),Kj(),t9()]}function s9(t){return{extensions:[I7(),aj(t),cj(),e9(t),n9()]}}const l9={tokenize:h9,partial:!0},dR={tokenize:p9,partial:!0},hR={tokenize:m9,partial:!0},pR={tokenize:g9,partial:!0},o9={tokenize:y9,partial:!0},mR={name:"wwwAutolink",tokenize:f9,previous:yR},gR={name:"protocolAutolink",tokenize:d9,previous:bR},sc={name:"emailAutolink",tokenize:u9,previous:xR},po={};function c9(){return{text:po}}let tf=48;for(;tf<123;)po[tf]=sc,tf++,tf===58?tf=65:tf===91&&(tf=97);po[43]=sc;po[45]=sc;po[46]=sc;po[95]=sc;po[72]=[sc,gR];po[104]=[sc,gR];po[87]=[sc,mR];po[119]=[sc,mR];function u9(t,e,n){const i=this;let r,s;return l;function l(g){return!f_(g)||!xR.call(i,i.previous)||x1(i.events)?n(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),c(g))}function c(g){return f_(g)?(t.consume(g),c):g===64?(t.consume(g),d):n(g)}function d(g){return g===46?t.check(o9,m,p)(g):g===45||g===95||zr(g)?(s=!0,t.consume(g),d):m(g)}function p(g){return t.consume(g),r=!0,d}function m(g){return s&&r&&la(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(g)):n(g)}}function f9(t,e,n){const i=this;return r;function r(l){return l!==87&&l!==119||!yR.call(i,i.previous)||x1(i.events)?n(l):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(l9,t.attempt(dR,t.attempt(hR,s),n),n)(l))}function s(l){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(l)}}function d9(t,e,n){const i=this;let r="",s=!1;return l;function l(g){return(g===72||g===104)&&bR.call(i,i.previous)&&!x1(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),r+=String.fromCodePoint(g),t.consume(g),c):n(g)}function c(g){if(la(g)&&r.length<5)return r+=String.fromCodePoint(g),t.consume(g),c;if(g===58){const b=r.toLowerCase();if(b==="http"||b==="https")return t.consume(g),d}return n(g)}function d(g){return g===47?(t.consume(g),s?p:(s=!0,d)):n(g)}function p(g){return g===null||T0(g)||Dn(g)||yf(g)||J0(g)?n(g):t.attempt(dR,t.attempt(hR,m),n)(g)}function m(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(g)}}function h9(t,e,n){let i=0;return r;function r(l){return(l===87||l===119)&&i<3?(i++,t.consume(l),r):l===46&&i===3?(t.consume(l),s):n(l)}function s(l){return l===null?n(l):e(l)}}function p9(t,e,n){let i,r,s;return l;function l(p){return p===46||p===95?t.check(pR,d,c)(p):p===null||Dn(p)||yf(p)||p!==45&&J0(p)?d(p):(s=!0,t.consume(p),l)}function c(p){return p===95?i=!0:(r=i,i=void 0),t.consume(p),l}function d(p){return r||i||!s?n(p):e(p)}}function m9(t,e){let n=0,i=0;return r;function r(l){return l===40?(n++,t.consume(l),r):l===41&&i<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?t.check(pR,e,s)(l):l===null||Dn(l)||yf(l)?e(l):(t.consume(l),r)}function s(l){return l===41&&i++,t.consume(l),r}}function g9(t,e,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(t.consume(c),i):c===38?(t.consume(c),s):c===93?(t.consume(c),r):c===60||c===null||Dn(c)||yf(c)?e(c):n(c)}function r(c){return c===null||c===40||c===91||Dn(c)||yf(c)?e(c):i(c)}function s(c){return la(c)?l(c):n(c)}function l(c){return c===59?(t.consume(c),i):la(c)?(t.consume(c),l):n(c)}}function y9(t,e,n){return i;function i(s){return t.consume(s),r}function r(s){return zr(s)?n(s):e(s)}}function yR(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Dn(t)}function bR(t){return!la(t)}function xR(t){return!(t===47||f_(t))}function f_(t){return t===43||t===45||t===46||t===95||zr(t)}function x1(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const b9={tokenize:C9,partial:!0};function x9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E9,continuation:{tokenize:w9},exit:T9}},text:{91:{name:"gfmFootnoteCall",tokenize:S9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:v9,resolveTo:_9}}}}function v9(t,e,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;r--;){const d=i.events[r][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const p=gl(i.sliceSerialize({start:l.end,end:i.now()}));return p.codePointAt(0)!==94||!s.includes(p.slice(1))?n(d):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),e(d))}}function _9(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",l,e],["exit",l,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...c),t}function S9(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,l;return c;function c(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(g){if(s>999||g===93&&!l||g===null||g===91||Dn(g))return n(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return r.includes(gl(i.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(g)}return Dn(g)||(l=!0),s++,t.consume(g),g===92?m:p}function m(g){return g===91||g===92||g===93?(t.consume(g),s++,p):p(g)}}function E9(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,l=0,c;return d;function d(S){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",m):n(S)}function m(S){if(l>999||S===93&&!c||S===null||S===91||Dn(S))return n(S);if(S===93){t.exit("chunkString");const C=t.exit("gfmFootnoteDefinitionLabelString");return s=gl(i.sliceSerialize(C)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return Dn(S)||(c=!0),l++,t.consume(S),S===92?g:m}function g(S){return S===91||S===92||S===93?(t.consume(S),l++,m):m(S)}function b(S){return S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),r.includes(s)||r.push(s),Kt(t,v,"gfmFootnoteDefinitionWhitespace")):n(S)}function v(S){return e(S)}}function w9(t,e,n){return t.check(Xm,e,t.attempt(b9,e,n))}function T9(t){t.exit("gfmFootnoteDefinition")}function C9(t,e,n){const i=this;return Kt(t,r,"gfmFootnoteDefinitionIndent",5);function r(s){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?e(s):n(s)}}function A9(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let p=d;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[d][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[d][1].end)},g={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",m,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",g,c]],v=c.parser.constructs.insideSpan.null;v&&ts(b,b.length,0,eb(v,l.slice(p+1,d),c)),ts(b,b.length,0,[["exit",g,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",m,c]]),ts(l,p-1,d-p+3,b),d=p+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function s(l,c,d){const p=this.previous,m=this.events;let g=0;return b;function b(S){return p===126&&m[m.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const C=sh(p);if(S===126)return g>1?d(S):(l.consume(S),g++,v);if(g<2&&!n)return d(S);const T=l.exit("strikethroughSequenceTemporary"),w=sh(S);return T._open=!w||w===2&&!!C,T._close=!C||C===2&&!!w,c(S)}}}class M9{constructor(){this.map=[]}add(e,n,i){R9(this,e,n,i)}consume(e){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push(e.slice()),e.length=0;let r=i.pop();for(;r;){for(const s of r)e.push(s);r=i.pop()}this.map.length=0}}function R9(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r<t.map.length;){if(t.map[r][0]===e){t.map[r][1]+=n,t.map[r][2].push(...i);return}r+=1}t.map.push([e,n,i])}}function N9(t,e){let n=!1;const i=[];for(;e<t.length;){const r=t[e];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function k9(){return{flow:{null:{name:"table",tokenize:O9,resolveAll:D9}}}}function O9(t,e,n){const i=this;let r=0,s=0,l;return c;function c(I){let Y=i.events.length-1;for(;Y>-1;){const q=i.events[Y][1].type;if(q==="lineEnding"||q==="linePrefix")Y--;else break}const X=Y>-1?i.events[Y][1].type:null,ne=X==="tableHead"||X==="tableRow"?z:d;return ne===z&&i.parser.lazy[i.now().line]?n(I):ne(I)}function d(I){return t.enter("tableHead"),t.enter("tableRow"),p(I)}function p(I){return I===124||(l=!0,s+=1),m(I)}function m(I){return I===null?n(I):st(I)?s>1?(s=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),v):n(I):Lt(I)?Kt(t,m,"whitespace")(I):(s+=1,l&&(l=!1,r+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),l=!0,m):(t.enter("data"),g(I)))}function g(I){return I===null||I===124||Dn(I)?(t.exit("data"),m(I)):(t.consume(I),I===92?b:g)}function b(I){return I===92||I===124?(t.consume(I),g):g(I)}function v(I){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(I):(t.enter("tableDelimiterRow"),l=!1,Lt(I)?Kt(t,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):S(I))}function S(I){return I===45||I===58?T(I):I===124?(l=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),C):H(I)}function C(I){return Lt(I)?Kt(t,T,"whitespace")(I):T(I)}function T(I){return I===58?(s+=1,l=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),w):I===45?(s+=1,w(I)):I===null||st(I)?O(I):H(I)}function w(I){return I===45?(t.enter("tableDelimiterFiller"),k(I)):H(I)}function k(I){return I===45?(t.consume(I),k):I===58?(l=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),M):(t.exit("tableDelimiterFiller"),M(I))}function M(I){return Lt(I)?Kt(t,O,"whitespace")(I):O(I)}function O(I){return I===124?S(I):I===null||st(I)?!l||r!==s?H(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):H(I)}function H(I){return n(I)}function z(I){return t.enter("tableRow"),F(I)}function F(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),F):I===null||st(I)?(t.exit("tableRow"),e(I)):Lt(I)?Kt(t,F,"whitespace")(I):(t.enter("data"),$(I))}function $(I){return I===null||I===124||Dn(I)?(t.exit("data"),F(I)):(t.consume(I),I===92?j:$)}function j(I){return I===92||I===124?(t.consume(I),$):$(I)}}function D9(t,e){let n=-1,i=!0,r=0,s=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,p,m,g;const b=new M9;for(;++n<t.length;){const v=t[n],S=v[1];v[0]==="enter"?S.type==="tableHead"?(c=!1,d!==0&&(z2(b,e,d,p,m),m=void 0,d=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",p,e]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,g=void 0,s=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",m,e]])),r=S.type==="tableDelimiterRow"?2:m?3:1):r&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],g=Fy(b,e,s,r,void 0,g),s=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(l[0]=l[1],g=Fy(b,e,s,r,void 0,g)),s=l,l=[s[1],n,0,0])):S.type==="tableHead"?(c=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,s[1]!==0?(l[0]=l[1],g=Fy(b,e,s,r,n,g)):l[1]!==0&&(g=Fy(b,e,l,r,n,g)),r=0):r&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&z2(b,e,d,p,m),b.consume(e.events),n=-1;++n<e.events.length;){const v=e.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=N9(e.events,n))}return t}function Fy(t,e,n,i,r,s){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},Hd(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const d=Hd(e.events,n[1]);if(s={type:l,start:Object.assign({},d),end:Object.assign({},d)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const p=Hd(e.events,n[2]),m=Hd(e.events,n[3]),g={type:c,start:Object.assign({},p),end:Object.assign({},m)};if(t.add(n[2],0,[["enter",g,e]]),i!==2){const b=e.events[n[2]],v=e.events[n[3]];if(b[1].end=Object.assign({},v[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,C=n[3]-n[2]-1;t.add(S,C,[])}}t.add(n[3]+1,0,[["exit",g,e]])}return r!==void 0&&(s.end=Object.assign({},Hd(e.events,r)),t.add(r,0,[["exit",s,e]]),s=void 0),s}function z2(t,e,n,i,r){const s=[],l=Hd(e.events,n);r&&(r.end=Object.assign({},l),s.push(["exit",r,e])),i.end=Object.assign({},l),s.push(["exit",i,e]),t.add(n+1,0,s)}function Hd(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const z9={name:"tasklistCheck",tokenize:L9};function B9(){return{text:{91:z9}}}function L9(t,e,n){const i=this;return r;function r(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),s)}function s(d){return Dn(d)?(t.enter("taskListCheckValueUnchecked"),t.consume(d),t.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(t.enter("taskListCheckValueChecked"),t.consume(d),t.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),c):n(d)}function c(d){return st(d)?e(d):Lt(d)?t.check({tokenize:U9},e,n)(d):n(d)}}function U9(t,e,n){return Kt(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function I9(t){return NM([c9(),x9(),A9(t),k9(),B9()])}const H9={};function j9(t){const e=this,n=t||H9,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(I9(n)),s.push(a9()),l.push(s9(n))}const B2=(function(t,e,n){const i=Km(n);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=t.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<t.children.length;)if(i(t.children[e],e,t))return t.children[e]}),Tf=(function(t){if(t==null)return F9;if(typeof t=="string")return G9(t);if(typeof t=="object")return P9(t);if(typeof t=="function")return v1(t);throw new Error("Expected function, string, or array as `test`")});function P9(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Tf(t[n]);return v1(i);function i(...r){let s=-1;for(;++s<e.length;)if(e[s].apply(this,r))return!0;return!1}}function G9(t){return v1(e);function e(n){return n.tagName===t}}function v1(t){return e;function e(n,i,r){return!!(q9(n)&&t.call(this,n,typeof i=="number"?i:void 0,r||void 0))}}function F9(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function q9(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const L2=/\n/g,U2=/[\t ]+/g,d_=Tf("br"),I2=Tf(Q9),Y9=Tf("p"),H2=Tf("tr"),V9=Tf(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Z9,J9]),vR=Tf(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function X9(t,e){const n=e||{},i="children"in t?t.children:[],r=vR(t),s=ER(t,{whitespace:n.whitespace||"normal"}),l=[];(t.type==="text"||t.type==="comment")&&l.push(...SR(t,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<i.length;)l.push(..._R(i[c],t,{whitespace:s,breakBefore:c?void 0:r,breakAfter:c<i.length-1?d_(i[c+1]):r}));const d=[];let p;for(c=-1;++c<l.length;){const m=l[c];typeof m=="number"?p!==void 0&&m>p&&(p=m):m&&(p!==void 0&&p>-1&&d.push(`
|
|
373
|
+
`.repeat(p)||" "),p=-1,d.push(m))}return d.join("")}function _R(t,e,n){return t.type==="element"?K9(t,e,n):t.type==="text"?n.whitespace==="normal"?SR(t,n):W9(t):[]}function K9(t,e,n){const i=ER(t,n),r=t.children||[];let s=-1,l=[];if(V9(t))return l;let c,d;for(d_(t)||H2(t)&&B2(e,t,H2)?d=`
|
|
374
|
+
`:Y9(t)?(c=2,d=2):vR(t)&&(c=1,d=1);++s<r.length;)l=l.concat(_R(r[s],t,{whitespace:i,breakBefore:s?void 0:c,breakAfter:s<r.length-1?d_(r[s+1]):d}));return I2(t)&&B2(e,t,I2)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function SR(t,e){const n=String(t.value),i=[],r=[];let s=0;for(;s<=n.length;){L2.lastIndex=s;const d=L2.exec(n),p=d&&"index"in d?d.index:n.length;i.push($9(n.slice(s,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?e.breakBefore:!0,p===n.length?e.breakAfter:!0)),s=p+1}let l=-1,c;for(;++l<i.length;)i[l].charCodeAt(i[l].length-1)===8203||l<i.length-1&&i[l+1].charCodeAt(0)===8203?(r.push(i[l]),c=void 0):i[l]?(typeof c=="number"&&r.push(c),r.push(i[l]),c=0):(l===0||l===i.length-1)&&r.push(0);return r}function W9(t){return[String(t.value)]}function $9(t,e,n){const i=[];let r=0,s;for(;r<t.length;){U2.lastIndex=r;const l=U2.exec(t);s=l?l.index:t.length,!r&&!s&&l&&!e&&i.push(""),r!==s&&i.push(t.slice(r,s)),r=l?s+l[0].length:s}return r!==s&&!n&&i.push(""),i.join(" ")}function ER(t,e){if(t.type==="element"){const n=t.properties||{};switch(t.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function Z9(t){return!!(t.properties||{}).hidden}function Q9(t){return t.tagName==="td"||t.tagName==="th"}function J9(t){return t.tagName==="dialog"&&!(t.properties||{}).open}function eP(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",l="(?!struct)("+i+"|"+e.optional(r)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:e.optional(r)+t.IDENT_RE,relevance:0},v=e.optional(r)+t.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],C=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],w=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:C,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},H={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},z=[H,g,c,n,t.C_BLOCK_COMMENT_MODE,m,p],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:z.concat([{begin:/\(/,end:/\)/,keywords:O,contains:z.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,p,m,c,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,p,m,c]}]},c,n,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(F,$,H,z,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:O,contains:["self",c]},{begin:t.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function tP(t){const e={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=eP(t),i=n.keywords;return i.type=[...i.type,...e.type],i.literal=[...i.literal,...e.literal],i.built_in=[...i.built_in,...e.built_in],i._hints=e._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function nP(t){const e=t.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n,r]};r.contains.push(c);const d={match:/\\"/},p={className:"string",begin:/'/,end:/'/},m={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=t.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},C=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],T=["true","false"],w={match:/(\/[a-z._-]+)+/},k=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],M=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],H=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:C,literal:T,built_in:[...k,...M,"set","shopt",...O,...H]},contains:[v,t.SHEBANG(),S,g,s,l,w,c,d,p,m,n]}}function iP(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",l="("+i+"|"+e.optional(r)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:e.optional(r)+t.IDENT_RE,relevance:0},v=e.optional(r)+t.IDENT_RE+"\\s*\\(",T={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},w=[g,c,n,t.C_BLOCK_COMMENT_MODE,m,p],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:w.concat([{begin:/\(/,end:/\)/,keywords:T,contains:w.concat(["self"]),relevance:0}]),relevance:0},M={begin:"("+l+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:T,relevance:0},{begin:v,returnBegin:!0,contains:[t.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,p,m,c,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,p,m,c]}]},c,n,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:T,disableAutodetect:!0,illegal:"</",contains:[].concat(k,M,w,[g,{begin:t.IDENT_RE+"::",keywords:T},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:g,strings:p,keywords:T}}}function rP(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",l="(?!struct)("+i+"|"+e.optional(r)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:e.optional(r)+t.IDENT_RE,relevance:0},v=e.optional(r)+t.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],C=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],w=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:C,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},H={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},z=[H,g,c,n,t.C_BLOCK_COMMENT_MODE,m,p],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:z.concat([{begin:/\(/,end:/\)/,keywords:O,contains:z.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,p,m,c,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,p,m,c]}]},c,n,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(F,$,H,z,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:O,contains:["self",c]},{begin:t.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function aP(t){const e=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],i=["default","false","null","true"],r=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:r.concat(s),built_in:e,literal:i},c=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},m={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=t.inherit(m,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},v=t.inherit(b,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,v]},C={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},T=t.inherit(C,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});b.contains=[C,S,m,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,t.C_BLOCK_COMMENT_MODE],v.contains=[T,S,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[p,C,S,m,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},k={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},M=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},w,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,k,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,k,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+M+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,k],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[w,d,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},O]}}const sP=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),lP=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],oP=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],cP=[...lP,...oP],uP=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),fP=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),dP=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hP=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function pP(t){const e=t.regex,n=sP(t),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",s=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+fP.join("|")+")"},{begin:":(:)?("+dP.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hP.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:uP.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+cP.join("|")+")\\b"}]}}function mP(t){const e=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:e.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:e.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function gP(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function yP(t){const e=t.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:e.concat(n,e.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function bP(t){const e=t.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},i=t.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,s,r,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,m=/'[^']*'/,g=e.either(d,p,m),b=e.concat(g,"(\\s*\\.\\s*",g,")*",e.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[i,c,s,r,l,n]}}]}}var jd="[0-9](_*[0-9])*",qy=`\\.(${jd})`,Yy="[0-9a-fA-F](_*[0-9a-fA-F])*",j2={className:"number",variants:[{begin:`(\\b(${jd})((${qy})|\\.)?|(${qy}))[eE][+-]?(${jd})[fFdD]?\\b`},{begin:`\\b(${jd})((${qy})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${qy})[fFdD]?\\b`},{begin:`\\b(${jd})[fFdD]\\b`},{begin:`\\b0[xX]((${Yy})\\.?|(${Yy})?\\.(${Yy}))[pP][+-]?(${jd})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Yy})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function wR(t,e,n){return n===-1?"":t.replace(e,i=>wR(t,e,n-1))}function xP(t){const e=t.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+wR("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},p={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},m={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[m,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[p,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,j2,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},j2,p]}}const P2="[A-Za-z$_][0-9A-Za-z$_]*",vP=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],_P=["true","false","null","undefined","NaN","Infinity"],TR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],CR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],AR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],SP=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],EP=[].concat(AR,TR,CR);function wP(t){const e=t.regex,n=(Z,{after:Q})=>{const G="</"+Z[0].slice(1);return Z.input.indexOf(G,Q)!==-1},i=P2,r={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{const G=Z[0].length+Z.index,K=Z.input[G];if(K==="<"||K===","){Q.ignoreMatch();return}K===">"&&(n(Z,{after:G})||Q.ignoreMatch());let te;const U=Z.input.substring(G);if(te=U.match(/^\s*=/)){Q.ignoreMatch();return}if((te=U.match(/^\s+extends\s+/))&&te.index===0){Q.ignoreMatch();return}}},c={$pattern:P2,keyword:vP,literal:_P,built_in:EP,"variable.language":SP},d="[0-9](_?[0-9])*",p=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${m})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,b]},k={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},M=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,S,C,T,{match:/\$\d+/},g];b.contains=M.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(M)});const O=[].concat(k,b.contains),H=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(O)}]),z={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:H},F={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TR,...CR]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[z],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(Z){return e.concat("(?!",Z.join("|"),")")}const ne={match:e.concat(/\b/,X([...AR,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},z]},B="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(B)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[z]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:H,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,S,C,T,k,{match:/\$\d+/},g,$,{scope:"attr",match:i+e.lookahead(":"),relevance:0},V,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,t.REGEXP_MODE,{className:"function",begin:B,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:H}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[z,t.inherit(t.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[z]},ne,Y,F,J,{match:/\$[(.]/}]}}function TP(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[e,n,t.QUOTE_STRING_MODE,r,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Pd="[0-9](_*[0-9])*",Vy=`\\.(${Pd})`,Xy="[0-9a-fA-F](_*[0-9a-fA-F])*",CP={className:"number",variants:[{begin:`(\\b(${Pd})((${Vy})|\\.)?|(${Vy}))[eE][+-]?(${Pd})[fFdD]?\\b`},{begin:`\\b(${Pd})((${Vy})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Vy})[fFdD]?\\b`},{begin:`\\b(${Pd})[fFdD]\\b`},{begin:`\\b0[xX]((${Xy})\\.?|(${Xy})?\\.(${Xy}))[pP][+-]?(${Pd})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xy})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function AP(t){const e={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,r]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,s,r]}]};r.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(l,{className:"string"}),"self"]}]},p=CP,m=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=g;return b.variants[1].contains=[g],g.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,m,n,i,c,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:t.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[t.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,t.C_LINE_COMMENT_MODE,m],relevance:0},t.C_LINE_COMMENT_MODE,m,c,d,l,t.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,t.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},t.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
375
|
+
`},p]}}const MP=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),RP=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],NP=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],kP=[...RP,...NP],OP=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),MR=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),RR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),DP=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),zP=MR.concat(RR).sort().reverse();function BP(t){const e=MP(t),n=zP,i="and or not only",r="[\\w-]+",s="("+r+"|@\\{"+r+"\\})",l=[],c=[],d=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},p=function(M,O,H){return{className:M,begin:O,relevance:H}},m={$pattern:/[a-z-]+/,keyword:i,attribute:OP.join(" ")},g={begin:"\\(",end:"\\)",contains:c,keywords:m,relevance:0};c.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,d("'"),d('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,g,p("variable","@@?"+r,10),p("variable","@\\{"+r+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const b=c.concat({begin:/\{/,end:/\}/,contains:l}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},S={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+DP.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},C={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:m,returnEnd:!0,contains:c,relevance:0}},T={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:b}},w={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,v,p("keyword","all\\b"),p("variable","@\\{"+r+"\\}"),{begin:"\\b("+kP.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,p("selector-tag",s,0),p("selector-id","#"+s),p("selector-class","\\."+s,0),p("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+MR.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+RR.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},e.FUNCTION_DISPATCH]},k={begin:r+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[w]};return l.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,C,T,k,S,w,v,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function LP(t){const e="\\[=*\\[",n="\\]=*\\]",i={begin:e,end:n,contains:["self"]},r=[t.COMMENT("--(?!"+e+")","$"),t.COMMENT("--"+e,n,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:e,end:n,contains:[i],relevance:5}])}}function UP(t){const e={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,e]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[e,n]},r={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[e]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,e,n,i,r,s,l]}}function IP(t){const e=t.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},m={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=t.inherit(p,{contains:[]}),b=t.inherit(m,{contains:[]});p.contains.push(b),m.contains.push(g);let v=[n,d];return[p,m,g,b].forEach(w=>{w.contains=w.contains.concat(v)}),v=v.concat(p,m),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,s,p,m,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},r,i,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function HP(t){const e={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[e,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}function jP(t){const e=t.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],i=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},p={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},m=[t.BACKSLASH_ESCAPE,s,d],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(C,T,w="\\1")=>{const k=w==="\\1"?w:e.concat(w,T);return e.concat(e.concat("(?:",C,")"),T,/(?:\\.|[^\\\/])*?/,k,/(?:\\.|[^\\\/])*?/,w,i)},v=(C,T,w)=>e.concat(e.concat("(?:",C,")"),T,/(?:\\.|[^\\\/])*?/,w,i),S=[d,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:m,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},p,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:b("s|tr|y",e.either(...g,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",e.either(...g,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,c,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=S,l.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:S}}function PP(t){const e=t.regex,n=/(?![A-Za-z0-9])(?![$])/,i=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=e.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+i},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=t.inherit(t.APOS_STRING_MODE,{illegal:null}),m=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(d)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(q,J)=>{J.data._beginMatch=q[1]||q[2]},"on:end":(q,J)=>{J.data._beginMatch!==q[1]&&J.ignoreMatch()}},b=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
376
|
+
]`,S={scope:"string",variants:[m,p,g,b]},C={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},T=["false","null","true"],w=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],k=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:w,literal:(q=>{const J=[];return q.forEach(B=>{J.push(B),B.toLowerCase()===B?J.push(B.toUpperCase()):J.push(B.toLowerCase())}),J})(T),built_in:k},H=q=>q.map(J=>J.replace(/\|\d+$/,"")),z={variants:[{match:[/new/,e.concat(v,"+"),e.concat("(?!",H(k).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},F=e.concat(i,"\\b(?!\\()"),$={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),F],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,e.concat(/::/,e.lookahead(/(?!class\b)/)),F],scope:{1:"title.class",3:"variable.constant"}},{match:[r,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:e.concat(i,e.lookahead(":"),e.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[j,l,$,t.C_BLOCK_COMMENT_MODE,S,C,z]},Y={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",H(w).join("\\b|"),"|",H(k).join("\\b|"),"\\b)"),i,e.concat(v,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(Y);const X=[j,$,t.C_BLOCK_COMMENT_MODE,S,C,z],ne={begin:e.concat(/#\[\s*\\?/,e.either(r,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:T,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:T,keyword:["new","array"]},contains:["self",...X]},...X,{scope:"meta",variants:[{match:r},{match:s}]}]};return{case_insensitive:!1,keywords:O,contains:[ne,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},c,{scope:"variable.language",match:/\$this\b/},l,Y,$,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},z,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",ne,l,$,t.C_BLOCK_COMMENT_MODE,S,C]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},S,C]}}function GP(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function FP(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function qP(t){const e=t.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},m={begin:/\{\{/,relevance:0},g={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,d,m,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,d,m,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,m,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,m,p]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",v=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,S=`\\b|${i.join("|")}`,C={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${v}))[eE][+-]?(${b})[jJ]?(?=${S})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${b})[jJ](?=${S})`}]},T={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},w={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,C,g,t.HASH_COMMENT_MODE]}]};return p.contains=[g,C,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,C,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,T,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[C,w,g]}]}}function YP(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function VP(t){const e=t.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=e.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:e.lookahead(e.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[s,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function XP(t){const e=t.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=e.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=e.concat(i,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},p=[t.COMMENT("#","$",{contains:[c]}),t.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],m={className:"subst",begin:/#\{/,end:/\}/,keywords:l},g={className:"string",contains:[t.BACKSLASH_ESCAPE,m],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:e.concat(/<<[-~]?'?/,e.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,m]})]}]},b="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},C={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},z=[g,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:l},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,m],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,p),relevance:0}].concat(d,p);m.contains=z,C.contains=z;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:z}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:z}}];return p.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(I).concat(p).concat(z)}}function KP(t){const e=t.regex,n=/(r#)?/,i=e.concat(n,t.UNDERSCORE_IDENT_RE),r=e.concat(n,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,e.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],p=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],m=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:m,keyword:c,literal:d,built_in:p},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:m}},{className:"punctuation",begin:"->"},s]}}const WP=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),$P=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ZP=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],QP=[...$P,...ZP],JP=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),eG=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tG=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nG=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function iG(t){const e=WP(t),n=tG,i=eG,r="@[a-z-]+",s="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,e.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+QP.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nG.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[e.BLOCK_COMMENT,c,e.HEXCOLOR,e.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.IMPORTANT,e.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:JP.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}}function rG(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function aG(t){const e=t.regex,n=t.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],p=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],m=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],b=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=m,S=[...p,...d].filter(H=>!m.includes(H)),C={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},T={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},w={match:e.concat(/\b/,e.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function k(H){return e.concat(/\b/,e.either(...H.map(z=>z.replace(/\s+/,"\\s+"))),/\b/)}const M={scope:"keyword",match:k(b),relevance:0};function O(H,{exceptions:z,when:F}={}){const $=F;return z=z||[],H.map(j=>j.match(/\|\d+$/)||z.includes(j)?j:$(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(S,{when:H=>H.length<3}),literal:s,type:c,built_in:g},contains:[{scope:"type",match:k(l)},M,w,C,i,r,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,n,T]}}function NR(t){return t?typeof t=="string"?t:t.source:null}function im(t){return wn("(?=",t,")")}function wn(...t){return t.map(n=>NR(n)).join("")}function sG(t){const e=t[t.length-1];return typeof e=="object"&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}function aa(...t){return"("+(sG(t).capture?"":"?:")+t.map(i=>NR(i)).join("|")+")"}const _1=t=>wn(/\b/,t,/\w$/.test(t)?/\b/:/\B/),lG=["Protocol","Type"].map(_1),G2=["init","self"].map(_1),oG=["Any","Self"],ov=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],F2=["false","nil","true"],cG=["assignment","associativity","higherThan","left","lowerThan","none","right"],uG=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],q2=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],kR=aa(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),OR=aa(kR,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),cv=wn(kR,OR,"*"),DR=aa(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),R0=aa(DR,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ao=wn(DR,R0,"*"),Ky=wn(/[A-Z]/,R0,"*"),fG=["attached","autoclosure",wn(/convention\(/,aa("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",wn(/objc\(/,ao,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],dG=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function hG(t){const e={match:/\s+/,relevance:0},n=t.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[t.C_LINE_COMMENT_MODE,n],r={match:[/\./,aa(...lG,...G2)],className:{2:"keyword"}},s={match:wn(/\./,aa(...ov)),relevance:0},l=ov.filter(Ue=>typeof Ue=="string").concat(["_|0"]),c=ov.filter(Ue=>typeof Ue!="string").concat(oG).map(_1),d={variants:[{className:"keyword",match:aa(...c,...G2)}]},p={$pattern:aa(/\b\w+/,/#\w+/),keyword:l.concat(uG),literal:F2},m=[r,s,d],g={match:wn(/\./,aa(...q2)),relevance:0},b={className:"built_in",match:wn(/\b/,aa(...q2),/(?=\()/)},v=[g,b],S={match:/->/,relevance:0},C={className:"operator",relevance:0,variants:[{match:cv},{match:`\\.(\\.|${OR})+`}]},T=[S,C],w="([0-9]_*)+",k="([0-9a-fA-F]_*)+",M={className:"number",relevance:0,variants:[{match:`\\b(${w})(\\.(${w}))?([eE][+-]?(${w}))?\\b`},{match:`\\b0x(${k})(\\.(${k}))?([pP][+-]?(${w}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(Ue="")=>({className:"subst",variants:[{match:wn(/\\/,Ue,/[0\\tnr"']/)},{match:wn(/\\/,Ue,/u\{[0-9a-fA-F]{1,8}\}/)}]}),H=(Ue="")=>({className:"subst",match:wn(/\\/,Ue,/[\t ]*(?:[\r\n]|\r\n)/)}),z=(Ue="")=>({className:"subst",label:"interpol",begin:wn(/\\/,Ue,/\(/),end:/\)/}),F=(Ue="")=>({begin:wn(Ue,/"""/),end:wn(/"""/,Ue),contains:[O(Ue),H(Ue),z(Ue)]}),$=(Ue="")=>({begin:wn(Ue,/"/),end:wn(/"/,Ue),contains:[O(Ue),z(Ue)]}),j={className:"string",variants:[F(),F("#"),F("##"),F("###"),$(),$("#"),$("##"),$("###")]},I=[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}],Y={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},X=Ue=>{const At=wn(Ue,/\//),zn=wn(/\//,Ue);return{begin:At,end:zn,contains:[...I,{scope:"comment",begin:`#(?!.*${zn})`,end:/$/}]}},ne={scope:"regexp",variants:[X("###"),X("##"),X("#"),Y]},q={match:wn(/`/,ao,/`/)},J={className:"variable",match:/\$\d+/},B={className:"variable",match:`\\$${R0}+`},V=[q,J,B],Z={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:dG,contains:[...T,M,j]}]}},Q={scope:"keyword",match:wn(/@/,aa(...fG),im(aa(/\(/,/\s+/)))},G={scope:"meta",match:wn(/@/,ao)},K=[Z,Q,G],te={match:im(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:wn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,R0,"+")},{className:"type",match:Ky,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:wn(/\s+&\s+/,im(Ky)),relevance:0}]},U={begin:/</,end:/>/,keywords:p,contains:[...i,...m,...K,S,te]};te.contains.push(U);const le={match:wn(ao,/\s*:/),keywords:"_|0",relevance:0},de={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",le,...i,ne,...m,...v,...T,M,j,...V,...K,te]},ge={begin:/</,end:/>/,keywords:"repeat each",contains:[...i,te]},se={begin:aa(im(wn(ao,/\s*:/)),im(wn(ao,/\s+/,ao,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ao}]},pe={begin:/\(/,end:/\)/,keywords:p,contains:[se,...i,...m,...T,M,j,...K,te,de],endsParent:!0,illegal:/["']/},Ae={match:[/(func|macro)/,/\s+/,aa(q.match,ao,cv)],className:{1:"keyword",3:"title.function"},contains:[ge,pe,e],illegal:[/\[/,/%/]},Le={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ge,pe,e],illegal:/\[|%/},Ge={match:[/operator/,/\s+/,cv],className:{1:"keyword",3:"title"}},Pe={begin:[/precedencegroup/,/\s+/,Ky],className:{1:"keyword",3:"title"},contains:[te],keywords:[...cG,...F2],end:/}/},Ie={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},We={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},ut={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ao,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[ge,...m,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:Ky},...m],relevance:0}]};for(const Ue of j.variants){const At=Ue.contains.find(Bn=>Bn.label==="interpol");At.keywords=p;const zn=[...m,...v,...T,M,j,...V];At.contains=[...zn,{begin:/\(/,end:/\)/,contains:["self",...zn]}]}return{name:"Swift",keywords:p,contains:[...i,Ae,Le,Ie,We,ut,Ge,Pe,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},ne,...m,...v,...T,M,j,...V,...K,te,de]}}const N0="[A-Za-z$_][0-9A-Za-z$_]*",zR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],BR=["true","false","null","undefined","NaN","Infinity"],LR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],UR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],IR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],HR=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],jR=[].concat(IR,LR,UR);function pG(t){const e=t.regex,n=(Z,{after:Q})=>{const G="</"+Z[0].slice(1);return Z.input.indexOf(G,Q)!==-1},i=N0,r={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,Q)=>{const G=Z[0].length+Z.index,K=Z.input[G];if(K==="<"||K===","){Q.ignoreMatch();return}K===">"&&(n(Z,{after:G})||Q.ignoreMatch());let te;const U=Z.input.substring(G);if(te=U.match(/^\s*=/)){Q.ignoreMatch();return}if((te=U.match(/^\s+extends\s+/))&&te.index===0){Q.ignoreMatch();return}}},c={$pattern:N0,keyword:zR,literal:BR,built_in:jR,"variable.language":HR},d="[0-9](_?[0-9])*",p=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${m})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,b]},k={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},M=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,S,C,T,{match:/\$\d+/},g];b.contains=M.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(M)});const O=[].concat(k,b.contains),H=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(O)}]),z={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:H},F={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...LR,...UR]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[z],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(Z){return e.concat("(?!",Z.join("|"),")")}const ne={match:e.concat(/\b/,X([...IR,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},J={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},z]},B="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(B)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[z]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:H,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,v,S,C,T,k,{match:/\$\d+/},g,$,{scope:"attr",match:i+e.lookahead(":"),relevance:0},V,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,t.REGEXP_MODE,{className:"function",begin:B,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:H}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[z,t.inherit(t.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[z]},ne,Y,F,J,{match:/\$[(.]/}]}}function mG(t){const e=t.regex,n=pG(t),i=N0,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:N0,keyword:zR.concat(d),literal:BR,built_in:jR.concat(r),"variable.language":HR},m={className:"meta",begin:"@"+i},g=(C,T,w)=>{const k=C.contains.findIndex(M=>M.label===T);if(k===-1)throw new Error("can not find mode to replace");C.contains.splice(k,1,w)};Object.assign(n.keywords,p),n.exports.PARAMS_CONTAINS.push(m);const b=n.contains.find(C=>C.scope==="attr"),v=Object.assign({},b,{match:e.concat(i,e.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,v]),n.contains=n.contains.concat([m,s,l,v]),g(n,"shebang",t.SHEBANG()),g(n,"use_strict",c);const S=n.contains.find(C=>C.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function gG(t){const e=t.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},r=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:e.concat(/# */,e.either(s,r),/ *#/)},{begin:e.concat(/# */,c,/ *#/)},{begin:e.concat(/# */,l,/ *#/)},{begin:e.concat(/# */,e.either(s,r),/ +/,e.either(l,c),/ *#/)}]},p={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},m={className:"label",begin:/^\w+:/},g=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,i,d,p,m,g,b,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[b]}]}}function yG(t){t.regex;const e=t.COMMENT(/\(;/,/;\)/);e.contains.push("self");const n=t.COMMENT(/;;/,/$/),i=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],r={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[n,e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,l,r,t.QUOTE_STRING_MODE,d,p,c]}}function bG(t){const e=t.regex,n=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=t.inherit(s,{begin:/\(/,end:/\)/}),c=t.inherit(t.APOS_STRING_MODE,{className:"string"}),d=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,l,d,c]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(n,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:p}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function xG(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,r]},c=t.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},S={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},C={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},T=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},b,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},S,C,s,l],w=[...T];return w.pop(),w.push(c),v.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:T}}const vG={arduino:tP,bash:nP,c:iP,cpp:rP,csharp:aP,css:pP,diff:mP,go:gP,graphql:yP,ini:bP,java:xP,javascript:wP,json:TP,kotlin:AP,less:BP,lua:LP,makefile:UP,markdown:IP,objectivec:HP,perl:jP,php:PP,"php-template":GP,plaintext:FP,python:qP,"python-repl":YP,r:VP,ruby:XP,rust:KP,scss:iG,shell:rG,sql:aG,swift:hG,typescript:mG,vbnet:gG,wasm:yG,xml:bG,yaml:xG};var uv,Y2;function _G(){if(Y2)return uv;Y2=1;function t(ae){return ae instanceof Map?ae.clear=ae.delete=ae.set=function(){throw new Error("map is read-only")}:ae instanceof Set&&(ae.add=ae.clear=ae.delete=function(){throw new Error("set is read-only")}),Object.freeze(ae),Object.getOwnPropertyNames(ae).forEach(Ee=>{const ze=ae[Ee],et=typeof ze;(et==="object"||et==="function")&&!Object.isFrozen(ze)&&t(ze)}),ae}class e{constructor(Ee){Ee.data===void 0&&(Ee.data={}),this.data=Ee.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(ae){return ae.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(ae,...Ee){const ze=Object.create(null);for(const et in ae)ze[et]=ae[et];return Ee.forEach(function(et){for(const Jt in et)ze[Jt]=et[Jt]}),ze}const r="</span>",s=ae=>!!ae.scope,l=(ae,{prefix:Ee})=>{if(ae.startsWith("language:"))return ae.replace("language:","language-");if(ae.includes(".")){const ze=ae.split(".");return[`${Ee}${ze.shift()}`,...ze.map((et,Jt)=>`${et}${"_".repeat(Jt+1)}`)].join(" ")}return`${Ee}${ae}`};class c{constructor(Ee,ze){this.buffer="",this.classPrefix=ze.classPrefix,Ee.walk(this)}addText(Ee){this.buffer+=n(Ee)}openNode(Ee){if(!s(Ee))return;const ze=l(Ee.scope,{prefix:this.classPrefix});this.span(ze)}closeNode(Ee){s(Ee)&&(this.buffer+=r)}value(){return this.buffer}span(Ee){this.buffer+=`<span class="${Ee}">`}}const d=(ae={})=>{const Ee={children:[]};return Object.assign(Ee,ae),Ee};class p{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Ee){this.top.children.push(Ee)}openNode(Ee){const ze=d({scope:Ee});this.add(ze),this.stack.push(ze)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Ee){return this.constructor._walk(Ee,this.rootNode)}static _walk(Ee,ze){return typeof ze=="string"?Ee.addText(ze):ze.children&&(Ee.openNode(ze),ze.children.forEach(et=>this._walk(Ee,et)),Ee.closeNode(ze)),Ee}static _collapse(Ee){typeof Ee!="string"&&Ee.children&&(Ee.children.every(ze=>typeof ze=="string")?Ee.children=[Ee.children.join("")]:Ee.children.forEach(ze=>{p._collapse(ze)}))}}class m extends p{constructor(Ee){super(),this.options=Ee}addText(Ee){Ee!==""&&this.add(Ee)}startScope(Ee){this.openNode(Ee)}endScope(){this.closeNode()}__addSublanguage(Ee,ze){const et=Ee.root;ze&&(et.scope=`language:${ze}`),this.add(et)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(ae){return ae?typeof ae=="string"?ae:ae.source:null}function b(ae){return C("(?=",ae,")")}function v(ae){return C("(?:",ae,")*")}function S(ae){return C("(?:",ae,")?")}function C(...ae){return ae.map(ze=>g(ze)).join("")}function T(ae){const Ee=ae[ae.length-1];return typeof Ee=="object"&&Ee.constructor===Object?(ae.splice(ae.length-1,1),Ee):{}}function w(...ae){return"("+(T(ae).capture?"":"?:")+ae.map(et=>g(et)).join("|")+")"}function k(ae){return new RegExp(ae.toString()+"|").exec("").length-1}function M(ae,Ee){const ze=ae&&ae.exec(Ee);return ze&&ze.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function H(ae,{joinWith:Ee}){let ze=0;return ae.map(et=>{ze+=1;const Jt=ze;let en=g(et),Fe="";for(;en.length>0;){const He=O.exec(en);if(!He){Fe+=en;break}Fe+=en.substring(0,He.index),en=en.substring(He.index+He[0].length),He[0][0]==="\\"&&He[1]?Fe+="\\"+String(Number(He[1])+Jt):(Fe+=He[0],He[0]==="("&&ze++)}return Fe}).map(et=>`(${et})`).join(Ee)}const z=/\b\B/,F="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",j="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Y="\\b(0b[01]+)",X="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ne=(ae={})=>{const Ee=/^#![ ]*\//;return ae.binary&&(ae.begin=C(Ee,/.*\b/,ae.binary,/\b.*/)),i({scope:"meta",begin:Ee,end:/$/,relevance:0,"on:begin":(ze,et)=>{ze.index!==0&&et.ignoreMatch()}},ae)},q={begin:"\\\\[\\s\\S]",relevance:0},J={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[q]},B={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[q]},V={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Z=function(ae,Ee,ze={}){const et=i({scope:"comment",begin:ae,end:Ee,contains:[]},ze);et.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Jt=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return et.contains.push({begin:C(/[ ]+/,"(",Jt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),et},Q=Z("//","$"),G=Z("/\\*","\\*/"),K=Z("#","$"),te={scope:"number",begin:j,relevance:0},U={scope:"number",begin:I,relevance:0},le={scope:"number",begin:Y,relevance:0},de={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[q,{begin:/\[/,end:/\]/,relevance:0,contains:[q]}]},ge={scope:"title",begin:F,relevance:0},se={scope:"title",begin:$,relevance:0},pe={begin:"\\.\\s*"+$,relevance:0};var Le=Object.freeze({__proto__:null,APOS_STRING_MODE:J,BACKSLASH_ESCAPE:q,BINARY_NUMBER_MODE:le,BINARY_NUMBER_RE:Y,COMMENT:Z,C_BLOCK_COMMENT_MODE:G,C_LINE_COMMENT_MODE:Q,C_NUMBER_MODE:U,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(ae){return Object.assign(ae,{"on:begin":(Ee,ze)=>{ze.data._beginMatch=Ee[1]},"on:end":(Ee,ze)=>{ze.data._beginMatch!==Ee[1]&&ze.ignoreMatch()}})},HASH_COMMENT_MODE:K,IDENT_RE:F,MATCH_NOTHING_RE:z,METHOD_GUARD:pe,NUMBER_MODE:te,NUMBER_RE:j,PHRASAL_WORDS_MODE:V,QUOTE_STRING_MODE:B,REGEXP_MODE:de,RE_STARTERS_RE:X,SHEBANG:ne,TITLE_MODE:ge,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:se});function Ge(ae,Ee){ae.input[ae.index-1]==="."&&Ee.ignoreMatch()}function Pe(ae,Ee){ae.className!==void 0&&(ae.scope=ae.className,delete ae.className)}function Ie(ae,Ee){Ee&&ae.beginKeywords&&(ae.begin="\\b("+ae.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",ae.__beforeBegin=Ge,ae.keywords=ae.keywords||ae.beginKeywords,delete ae.beginKeywords,ae.relevance===void 0&&(ae.relevance=0))}function We(ae,Ee){Array.isArray(ae.illegal)&&(ae.illegal=w(...ae.illegal))}function ut(ae,Ee){if(ae.match){if(ae.begin||ae.end)throw new Error("begin & end are not supported with match");ae.begin=ae.match,delete ae.match}}function Ue(ae,Ee){ae.relevance===void 0&&(ae.relevance=1)}const At=(ae,Ee)=>{if(!ae.beforeMatch)return;if(ae.starts)throw new Error("beforeMatch cannot be used with starts");const ze=Object.assign({},ae);Object.keys(ae).forEach(et=>{delete ae[et]}),ae.keywords=ze.keywords,ae.begin=C(ze.beforeMatch,b(ze.begin)),ae.starts={relevance:0,contains:[Object.assign(ze,{endsParent:!0})]},ae.relevance=0,delete ze.beforeMatch},zn=["of","and","for","in","not","or","if","then","parent","list","value"],Bn="keyword";function bn(ae,Ee,ze=Bn){const et=Object.create(null);return typeof ae=="string"?Jt(ze,ae.split(" ")):Array.isArray(ae)?Jt(ze,ae):Object.keys(ae).forEach(function(en){Object.assign(et,bn(ae[en],Ee,en))}),et;function Jt(en,Fe){Ee&&(Fe=Fe.map(He=>He.toLowerCase())),Fe.forEach(function(He){const tt=He.split("|");et[tt[0]]=[en,wi(tt[0],tt[1])]})}}function wi(ae,Ee){return Ee?Number(Ee):ka(ae)?0:1}function ka(ae){return zn.includes(ae.toLowerCase())}const Lr={},hn=ae=>{console.error(ae)},ua=(ae,...Ee)=>{console.log(`WARN: ${ae}`,...Ee)},_e=(ae,Ee)=>{Lr[`${ae}/${Ee}`]||(console.log(`Deprecated as of ${ae}. ${Ee}`),Lr[`${ae}/${Ee}`]=!0)},Ne=new Error;function Je(ae,Ee,{key:ze}){let et=0;const Jt=ae[ze],en={},Fe={};for(let He=1;He<=Ee.length;He++)Fe[He+et]=Jt[He],en[He+et]=!0,et+=k(Ee[He-1]);ae[ze]=Fe,ae[ze]._emit=en,ae[ze]._multi=!0}function bt(ae){if(Array.isArray(ae.begin)){if(ae.skip||ae.excludeBegin||ae.returnBegin)throw hn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ne;if(typeof ae.beginScope!="object"||ae.beginScope===null)throw hn("beginScope must be object"),Ne;Je(ae,ae.begin,{key:"beginScope"}),ae.begin=H(ae.begin,{joinWith:""})}}function kt(ae){if(Array.isArray(ae.end)){if(ae.skip||ae.excludeEnd||ae.returnEnd)throw hn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ne;if(typeof ae.endScope!="object"||ae.endScope===null)throw hn("endScope must be object"),Ne;Je(ae,ae.end,{key:"endScope"}),ae.end=H(ae.end,{joinWith:""})}}function yi(ae){ae.scope&&typeof ae.scope=="object"&&ae.scope!==null&&(ae.beginScope=ae.scope,delete ae.scope)}function rr(ae){yi(ae),typeof ae.beginScope=="string"&&(ae.beginScope={_wrap:ae.beginScope}),typeof ae.endScope=="string"&&(ae.endScope={_wrap:ae.endScope}),bt(ae),kt(ae)}function xn(ae){function Ee(Fe,He){return new RegExp(g(Fe),"m"+(ae.case_insensitive?"i":"")+(ae.unicodeRegex?"u":"")+(He?"g":""))}class ze{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(He,tt){tt.position=this.position++,this.matchIndexes[this.matchAt]=tt,this.regexes.push([tt,He]),this.matchAt+=k(He)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const He=this.regexes.map(tt=>tt[1]);this.matcherRe=Ee(H(He,{joinWith:"|"}),!0),this.lastIndex=0}exec(He){this.matcherRe.lastIndex=this.lastIndex;const tt=this.matcherRe.exec(He);if(!tt)return null;const Cn=tt.findIndex((fa,ar)=>ar>0&&fa!==void 0),Gt=this.matchIndexes[Cn];return tt.splice(0,Cn),Object.assign(tt,Gt)}}class et{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(He){if(this.multiRegexes[He])return this.multiRegexes[He];const tt=new ze;return this.rules.slice(He).forEach(([Cn,Gt])=>tt.addRule(Cn,Gt)),tt.compile(),this.multiRegexes[He]=tt,tt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(He,tt){this.rules.push([He,tt]),tt.type==="begin"&&this.count++}exec(He){const tt=this.getMatcher(this.regexIndex);tt.lastIndex=this.lastIndex;let Cn=tt.exec(He);if(this.resumingScanAtSamePosition()&&!(Cn&&Cn.index===this.lastIndex)){const Gt=this.getMatcher(0);Gt.lastIndex=this.lastIndex+1,Cn=Gt.exec(He)}return Cn&&(this.regexIndex+=Cn.position+1,this.regexIndex===this.count&&this.considerAll()),Cn}}function Jt(Fe){const He=new et;return Fe.contains.forEach(tt=>He.addRule(tt.begin,{rule:tt,type:"begin"})),Fe.terminatorEnd&&He.addRule(Fe.terminatorEnd,{type:"end"}),Fe.illegal&&He.addRule(Fe.illegal,{type:"illegal"}),He}function en(Fe,He){const tt=Fe;if(Fe.isCompiled)return tt;[Pe,ut,rr,At].forEach(Gt=>Gt(Fe,He)),ae.compilerExtensions.forEach(Gt=>Gt(Fe,He)),Fe.__beforeBegin=null,[Ie,We,Ue].forEach(Gt=>Gt(Fe,He)),Fe.isCompiled=!0;let Cn=null;return typeof Fe.keywords=="object"&&Fe.keywords.$pattern&&(Fe.keywords=Object.assign({},Fe.keywords),Cn=Fe.keywords.$pattern,delete Fe.keywords.$pattern),Cn=Cn||/\w+/,Fe.keywords&&(Fe.keywords=bn(Fe.keywords,ae.case_insensitive)),tt.keywordPatternRe=Ee(Cn,!0),He&&(Fe.begin||(Fe.begin=/\B|\b/),tt.beginRe=Ee(tt.begin),!Fe.end&&!Fe.endsWithParent&&(Fe.end=/\B|\b/),Fe.end&&(tt.endRe=Ee(tt.end)),tt.terminatorEnd=g(tt.end)||"",Fe.endsWithParent&&He.terminatorEnd&&(tt.terminatorEnd+=(Fe.end?"|":"")+He.terminatorEnd)),Fe.illegal&&(tt.illegalRe=Ee(Fe.illegal)),Fe.contains||(Fe.contains=[]),Fe.contains=[].concat(...Fe.contains.map(function(Gt){return Gn(Gt==="self"?Fe:Gt)})),Fe.contains.forEach(function(Gt){en(Gt,tt)}),Fe.starts&&en(Fe.starts,He),tt.matcher=Jt(tt),tt}if(ae.compilerExtensions||(ae.compilerExtensions=[]),ae.contains&&ae.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return ae.classNameAliases=i(ae.classNameAliases||{}),en(ae)}function $t(ae){return ae?ae.endsWithParent||$t(ae.starts):!1}function Gn(ae){return ae.variants&&!ae.cachedVariants&&(ae.cachedVariants=ae.variants.map(function(Ee){return i(ae,{variants:null},Ee)})),ae.cachedVariants?ae.cachedVariants:$t(ae)?i(ae,{starts:ae.starts?i(ae.starts):null}):Object.isFrozen(ae)?i(ae):ae}var Pt="11.11.1";class Fi extends Error{constructor(Ee,ze){super(Ee),this.name="HTMLInjectionError",this.html=ze}}const Qn=n,go=i,rs=Symbol("nomatch"),Oa=7,as=function(ae){const Ee=Object.create(null),ze=Object.create(null),et=[];let Jt=!0;const en="Could not find the language '{}', did you forget to load/include a language module?",Fe={disableAutodetect:!0,name:"Plain text",contains:[]};let He={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function tt(Me){return He.noHighlightRe.test(Me)}function Cn(Me){let Ve=Me.className+" ";Ve+=Me.parentNode?Me.parentNode.className:"";const xt=He.languageDetectRe.exec(Ve);if(xt){const Xt=tn(xt[1]);return Xt||(ua(en.replace("{}",xt[1])),ua("Falling back to no-highlight mode for this block.",Me)),Xt?xt[1]:"no-highlight"}return Ve.split(/\s+/).find(Xt=>tt(Xt)||tn(Xt))}function Gt(Me,Ve,xt){let Xt="",Un="";typeof Ve=="object"?(Xt=Me,xt=Ve.ignoreIllegals,Un=Ve.language):(_e("10.7.0","highlight(lang, code, ...args) has been deprecated."),_e("10.7.0",`Please use highlight(code, options) instead.
|
|
377
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Un=Me,Xt=Ve),xt===void 0&&(xt=!0);const xi={code:Xt,language:Un};da("before:highlight",xi);const Yi=xi.result?xi.result:fa(xi.language,xi.code,xt);return Yi.code=xi.code,da("after:highlight",Yi),Yi}function fa(Me,Ve,xt,Xt){const Un=Object.create(null);function xi(De,qe){return De.keywords[qe]}function Yi(){if(!it.keywords){Hn.addText(rn);return}let De=0;it.keywordPatternRe.lastIndex=0;let qe=it.keywordPatternRe.exec(rn),mt="";for(;qe;){mt+=rn.substring(De,qe.index);const Nt=oi.case_insensitive?qe[0].toLowerCase():qe[0],An=xi(it,Nt);if(An){const[jr,uc]=An;if(Hn.addText(mt),mt="",Un[Nt]=(Un[Nt]||0)+1,Un[Nt]<=Oa&&(os+=uc),jr.startsWith("_"))mt+=qe[0];else{const uu=oi.classNameAliases[jr]||jr;or(qe[0],uu)}}else mt+=qe[0];De=it.keywordPatternRe.lastIndex,qe=it.keywordPatternRe.exec(rn)}mt+=rn.substring(De),Hn.addText(mt)}function Ti(){if(rn==="")return;let De=null;if(typeof it.subLanguage=="string"){if(!Ee[it.subLanguage]){Hn.addText(rn);return}De=fa(it.subLanguage,rn,!0,bo[it.subLanguage]),bo[it.subLanguage]=De._top}else De=qi(rn,it.subLanguage.length?it.subLanguage:null);it.relevance>0&&(os+=De.relevance),Hn.__addSublanguage(De._emitter,De.language)}function un(){it.subLanguage!=null?Ti():Yi(),rn=""}function or(De,qe){De!==""&&(Hn.startScope(qe),Hn.addText(De),Hn.endScope())}function yo(De,qe){let mt=1;const Nt=qe.length-1;for(;mt<=Nt;){if(!De._emit[mt]){mt++;continue}const An=oi.classNameAliases[De[mt]]||De[mt],jr=qe[mt];An?or(jr,An):(rn=jr,Yi(),rn=""),mt++}}function ha(De,qe){return De.scope&&typeof De.scope=="string"&&Hn.openNode(oi.classNameAliases[De.scope]||De.scope),De.beginScope&&(De.beginScope._wrap?(or(rn,oi.classNameAliases[De.beginScope._wrap]||De.beginScope._wrap),rn=""):De.beginScope._multi&&(yo(De.beginScope,qe),rn="")),it=Object.create(De,{parent:{value:it}}),it}function wl(De,qe,mt){let Nt=M(De.endRe,mt);if(Nt){if(De["on:end"]){const An=new e(De);De["on:end"](qe,An),An.isMatchIgnored&&(Nt=!1)}if(Nt){for(;De.endsParent&&De.parent;)De=De.parent;return De}}if(De.endsWithParent)return wl(De.parent,qe,mt)}function za(De){return it.matcher.regexIndex===0?(rn+=De[0],1):(Is=!0,0)}function oc(De){const qe=De[0],mt=De.rule,Nt=new e(mt),An=[mt.__beforeBegin,mt["on:begin"]];for(const jr of An)if(jr&&(jr(De,Nt),Nt.isMatchIgnored))return za(qe);return mt.skip?rn+=qe:(mt.excludeBegin&&(rn+=qe),un(),!mt.returnBegin&&!mt.excludeBegin&&(rn=qe)),ha(mt,De),mt.returnBegin?0:qe.length}function Di(De){const qe=De[0],mt=Ve.substring(De.index),Nt=wl(it,De,mt);if(!Nt)return rs;const An=it;it.endScope&&it.endScope._wrap?(un(),or(qe,it.endScope._wrap)):it.endScope&&it.endScope._multi?(un(),yo(it.endScope,De)):An.skip?rn+=qe:(An.returnEnd||An.excludeEnd||(rn+=qe),un(),An.excludeEnd&&(rn=qe));do it.scope&&Hn.closeNode(),!it.skip&&!it.subLanguage&&(os+=it.relevance),it=it.parent;while(it!==Nt.parent);return Nt.starts&&ha(Nt.starts,De),An.returnEnd?0:qe.length}function ss(){const De=[];for(let qe=it;qe!==oi;qe=qe.parent)qe.scope&&De.unshift(qe.scope);De.forEach(qe=>Hn.openNode(qe))}let ls={};function Us(De,qe){const mt=qe&&qe[0];if(rn+=De,mt==null)return un(),0;if(ls.type==="begin"&&qe.type==="end"&&ls.index===qe.index&&mt===""){if(rn+=Ve.slice(qe.index,qe.index+1),!Jt){const Nt=new Error(`0 width match regex (${Me})`);throw Nt.languageName=Me,Nt.badRule=ls.rule,Nt}return 1}if(ls=qe,qe.type==="begin")return oc(qe);if(qe.type==="illegal"&&!xt){const Nt=new Error('Illegal lexeme "'+mt+'" for mode "'+(it.scope||"<unnamed>")+'"');throw Nt.mode=it,Nt}else if(qe.type==="end"){const Nt=Di(qe);if(Nt!==rs)return Nt}if(qe.type==="illegal"&&mt==="")return rn+=`
|
|
378
|
+
`,1;if(cc>1e5&&cc>qe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return rn+=mt,mt.length}const oi=tn(Me);if(!oi)throw hn(en.replace("{}",Me)),new Error('Unknown language: "'+Me+'"');const cu=xn(oi);let Ba="",it=Xt||cu;const bo={},Hn=new He.__emitter(He);ss();let rn="",os=0,cs=0,cc=0,Is=!1;try{if(oi.__emitTokens)oi.__emitTokens(Ve,Hn);else{for(it.matcher.considerAll();;){cc++,Is?Is=!1:it.matcher.considerAll(),it.matcher.lastIndex=cs;const De=it.matcher.exec(Ve);if(!De)break;const qe=Ve.substring(cs,De.index),mt=Us(qe,De);cs=De.index+mt}Us(Ve.substring(cs))}return Hn.finalize(),Ba=Hn.toHTML(),{language:Me,value:Ba,relevance:os,illegal:!1,_emitter:Hn,_top:it}}catch(De){if(De.message&&De.message.includes("Illegal"))return{language:Me,value:Qn(Ve),illegal:!0,relevance:0,_illegalBy:{message:De.message,index:cs,context:Ve.slice(cs-100,cs+100),mode:De.mode,resultSoFar:Ba},_emitter:Hn};if(Jt)return{language:Me,value:Qn(Ve),illegal:!1,relevance:0,errorRaised:De,_emitter:Hn,_top:it};throw De}}function ar(Me){const Ve={value:Qn(Me),illegal:!1,relevance:0,_top:Fe,_emitter:new He.__emitter(He)};return Ve._emitter.addText(Me),Ve}function qi(Me,Ve){Ve=Ve||He.languages||Object.keys(Ee);const xt=ar(Me),Xt=Ve.filter(tn).filter(lr).map(un=>fa(un,Me,!1));Xt.unshift(xt);const Un=Xt.sort((un,or)=>{if(un.relevance!==or.relevance)return or.relevance-un.relevance;if(un.language&&or.language){if(tn(un.language).supersetOf===or.language)return 1;if(tn(or.language).supersetOf===un.language)return-1}return 0}),[xi,Yi]=Un,Ti=xi;return Ti.secondBest=Yi,Ti}function sr(Me,Ve,xt){const Xt=Ve&&ze[Ve]||xt;Me.classList.add("hljs"),Me.classList.add(`language-${Xt}`)}function yt(Me){let Ve=null;const xt=Cn(Me);if(tt(xt))return;if(da("before:highlightElement",{el:Me,language:xt}),Me.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Me);return}if(Me.children.length>0&&(He.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Me)),He.throwUnescapedHTML))throw new Fi("One of your code blocks includes unescaped HTML.",Me.innerHTML);Ve=Me;const Xt=Ve.textContent,Un=xt?Gt(Xt,{language:xt,ignoreIllegals:!0}):qi(Xt);Me.innerHTML=Un.value,Me.dataset.highlighted="yes",sr(Me,xt,Un.language),Me.result={language:Un.language,re:Un.relevance,relevance:Un.relevance},Un.secondBest&&(Me.secondBest={language:Un.secondBest.language,relevance:Un.secondBest.relevance}),da("after:highlightElement",{el:Me,result:Un,text:Xt})}function li(Me){He=go(He,Me)}const Ur=()=>{Sl(),_e("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Bs(){Sl(),_e("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _l=!1;function Sl(){function Me(){Sl()}if(document.readyState==="loading"){_l||window.addEventListener("DOMContentLoaded",Me,!1),_l=!0;return}document.querySelectorAll(He.cssSelector).forEach(yt)}function El(Me,Ve){let xt=null;try{xt=Ve(ae)}catch(Xt){if(hn("Language definition for '{}' could not be registered.".replace("{}",Me)),Jt)hn(Xt);else throw Xt;xt=Fe}xt.name||(xt.name=Me),Ee[Me]=xt,xt.rawDefinition=Ve.bind(null,ae),xt.aliases&&nn(xt.aliases,{languageName:Me})}function Da(Me){delete Ee[Me];for(const Ve of Object.keys(ze))ze[Ve]===Me&&delete ze[Ve]}function Ls(){return Object.keys(Ee)}function tn(Me){return Me=(Me||"").toLowerCase(),Ee[Me]||Ee[ze[Me]]}function nn(Me,{languageName:Ve}){typeof Me=="string"&&(Me=[Me]),Me.forEach(xt=>{ze[xt.toLowerCase()]=Ve})}function lr(Me){const Ve=tn(Me);return Ve&&!Ve.disableAutodetect}function Ir(Me){Me["before:highlightBlock"]&&!Me["before:highlightElement"]&&(Me["before:highlightElement"]=Ve=>{Me["before:highlightBlock"](Object.assign({block:Ve.el},Ve))}),Me["after:highlightBlock"]&&!Me["after:highlightElement"]&&(Me["after:highlightElement"]=Ve=>{Me["after:highlightBlock"](Object.assign({block:Ve.el},Ve))})}function Ln(Me){Ir(Me),et.push(Me)}function xr(Me){const Ve=et.indexOf(Me);Ve!==-1&&et.splice(Ve,1)}function da(Me,Ve){const xt=Me;et.forEach(function(Xt){Xt[xt]&&Xt[xt](Ve)})}function Hr(Me){return _e("10.7.0","highlightBlock will be removed entirely in v12.0"),_e("10.7.0","Please use highlightElement now."),yt(Me)}Object.assign(ae,{highlight:Gt,highlightAuto:qi,highlightAll:Sl,highlightElement:yt,highlightBlock:Hr,configure:li,initHighlighting:Ur,initHighlightingOnLoad:Bs,registerLanguage:El,unregisterLanguage:Da,listLanguages:Ls,getLanguage:tn,registerAliases:nn,autoDetection:lr,inherit:go,addPlugin:Ln,removePlugin:xr}),ae.debugMode=function(){Jt=!1},ae.safeMode=function(){Jt=!0},ae.versionString=Pt,ae.regex={concat:C,lookahead:b,either:w,optional:S,anyNumberOfTimes:v};for(const Me in Le)typeof Le[Me]=="object"&&t(Le[Me]);return Object.assign(ae,Le),ae},bi=as({});return bi.newInstance=()=>as({}),uv=bi,bi.HighlightJS=bi,bi.default=bi,uv}var SG=_G();const EG=lu(SG),V2={},wG="hljs-";function TG(t){const e=EG.newInstance();return t&&s(t),{highlight:n,highlightAuto:i,listLanguages:r,register:s,registerAlias:l,registered:c};function n(d,p,m){const g=m||V2,b=typeof g.prefix=="string"?g.prefix:wG;if(!e.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");e.configure({__emitter:CG,classPrefix:b});const v=e.highlight(p,{ignoreIllegals:!0,language:d});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const S=v._emitter.root,C=S.data;return C.language=v.language,C.relevance=v.relevance,S}function i(d,p){const g=(p||V2).subset||r();let b=-1,v=0,S;for(;++b<g.length;){const C=g[b];if(!e.getLanguage(C))continue;const T=n(C,d,p);T.data&&T.data.relevance!==void 0&&T.data.relevance>v&&(v=T.data.relevance,S=T)}return S||{type:"root",children:[],data:{language:void 0,relevance:v}}}function r(){return e.listLanguages()}function s(d,p){if(typeof d=="string")e.registerLanguage(d,p);else{let m;for(m in d)Object.hasOwn(d,m)&&e.registerLanguage(m,d[m])}}function l(d,p){if(typeof d=="string")e.registerAliases(typeof p=="string"?p:[...p],{languageName:d});else{let m;for(m in d)if(Object.hasOwn(d,m)){const g=d[m];e.registerAliases(typeof g=="string"?g:[...g],{languageName:m})}}}function c(d){return!!e.getLanguage(d)}}class CG{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const n=this.stack[this.stack.length-1],i=n.children[n.children.length-1];i&&i.type==="text"?i.value+=e:n.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,n){const i=this.stack[this.stack.length-1],r=e.root.children;n?i.children.push({type:"element",tagName:"span",properties:{className:[n]},children:r}):i.children.push(...r)}openNode(e){const n=this,i=e.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),r=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:i},children:[]};r.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const AG={};function MG(t){const e=t||AG,n=e.aliases,i=e.detect||!1,r=e.languages||vG,s=e.plainText,l=e.prefix,c=e.subset;let d="hljs";const p=TG(r);if(n&&p.registerAlias(n),l){const m=l.indexOf("-");d=m===-1?l:l.slice(0,m)}return function(m,g){ib(m,"element",function(b,v,S){if(b.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const C=RG(b);if(C===!1||!C&&!i||C&&s&&s.includes(C))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const T=X9(b,{whitespace:"pre"});let w;try{w=C?p.highlight(C,T,{prefix:l}):p.highlightAuto(T,{prefix:l,subset:c})}catch(k){const M=k;if(C&&/Unknown language/.test(M.message)){g.message("Cannot highlight as `"+C+"`, it’s not registered",{ancestors:[S,b],cause:M,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw M}!C&&w.data&&w.data.language&&b.properties.className.push("language-"+w.data.language),w.children.length>0&&(b.children=w.children)})}}function RG(t){const e=t.properties.className;let n=-1;if(!Array.isArray(e))return;let i;for(;++n<e.length;){const r=String(e[n]);if(r==="no-highlight"||r==="nohighlight")return!1;!i&&r.slice(0,5)==="lang-"&&(i=r.slice(5)),!i&&r.slice(0,9)==="language-"&&(i=r.slice(9))}return i}function NG({text:t}){const[e,n]=P.useState(!1),i=()=>{navigator.clipboard.writeText(t).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)})};return N.jsx("button",{onClick:i,style:{position:"absolute",top:6,right:6,background:"var(--surface-4)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",color:e?"var(--status-active)":"var(--text-muted)",fontSize:"0.65rem",fontFamily:"var(--font-mono)",padding:"2px 8px",cursor:"pointer",transition:"color var(--duration-fast) var(--ease-out)"},children:e?"Copied!":"Copy"})}function h_({content:t}){return N.jsx("div",{className:"markdown-message",children:N.jsx(A7,{remarkPlugins:[j9],rehypePlugins:[MG],components:{pre({children:e,...n}){const i=Array.isArray(e)?e.find(s=>{var l,c;return(s==null?void 0:s.type)==="code"||((c=(l=s==null?void 0:s.props)==null?void 0:l.node)==null?void 0:c.tagName)==="code"}):e,r=typeof i=="object"&&i!==null&&"props"in i?p_(i.props.children):"";return N.jsxs("div",{style:{position:"relative"},children:[N.jsx(NG,{text:r}),N.jsx("pre",{...n,style:{background:"var(--surface-0)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-sm)",padding:"12px 14px",paddingTop:28,margin:"8px 0",overflowX:"auto",fontSize:"0.78rem",lineHeight:1.6,fontFamily:"var(--font-mono)"},children:e})]})},code({className:e,children:n,...i}){return e?N.jsx("code",{className:e,...i,children:n}):N.jsx("code",{...i,style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-xs)",padding:"1px 5px",fontSize:"0.82em",fontFamily:"var(--font-mono)",color:"var(--accent)"},children:n})},a({href:e,children:n,...i}){return N.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",textDecoration:"none"},...i,children:n})},table({children:e,...n}){return N.jsx("div",{style:{overflowX:"auto",margin:"8px 0"},children:N.jsx("table",{...n,style:{borderCollapse:"collapse",width:"100%",fontSize:"0.82rem"},children:e})})},th({children:e,...n}){return N.jsx("th",{...n,style:{borderBottom:"2px solid var(--border-default)",padding:"6px 10px",textAlign:"left",fontWeight:600,color:"var(--text-primary)"},children:e})},td({children:e,...n}){return N.jsx("td",{...n,style:{borderBottom:"1px solid var(--border-subtle)",padding:"5px 10px",color:"var(--text-secondary)"},children:e})},blockquote({children:e,...n}){return N.jsx("blockquote",{...n,style:{borderLeft:"3px solid var(--accent-dim)",margin:"8px 0",padding:"4px 12px",color:"var(--text-secondary)",background:"rgba(0, 200, 255, 0.04)",borderRadius:"0 var(--radius-xs) var(--radius-xs) 0"},children:e})},hr(){return N.jsx("hr",{style:{border:"none",borderTop:"1px solid var(--border-default)",margin:"12px 0"}})},ul({children:e,...n}){return N.jsx("ul",{...n,style:{paddingLeft:20,margin:"4px 0"},children:e})},ol({children:e,...n}){return N.jsx("ol",{...n,style:{paddingLeft:20,margin:"4px 0"},children:e})},li({children:e,...n}){return N.jsx("li",{...n,style:{marginBottom:2},children:e})},h1({children:e,...n}){return N.jsx("h1",{...n,style:{fontSize:"1.3em",fontWeight:700,margin:"12px 0 6px"},children:e})},h2({children:e,...n}){return N.jsx("h2",{...n,style:{fontSize:"1.15em",fontWeight:600,margin:"10px 0 4px"},children:e})},h3({children:e,...n}){return N.jsx("h3",{...n,style:{fontSize:"1.05em",fontWeight:600,margin:"8px 0 4px"},children:e})},p({children:e,...n}){return N.jsx("p",{...n,style:{margin:"4px 0",lineHeight:1.6},children:e})}},children:t})})}function p_(t){var e;return typeof t=="string"?t:Array.isArray(t)?t.map(p_).join(""):(e=t==null?void 0:t.props)!=null&&e.children?p_(t.props.children):""}function kG({commands:t,filter:e,selectedIndex:n,onSelect:i,visible:r}){const s=P.useRef(null),l=P.useRef(null),c=t.filter(d=>d.command.toLowerCase().includes(e.toLowerCase())||d.description.toLowerCase().includes(e.toLowerCase()));return P.useEffect(()=>{var d;(d=l.current)==null||d.scrollIntoView({block:"nearest"})},[n]),!r||c.length===0?null:N.jsxs("div",{ref:s,style:{position:"absolute",bottom:"100%",left:0,right:0,marginBottom:4,background:"var(--surface-2)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-lg)",maxHeight:280,overflowY:"auto",zIndex:100,animation:"fadeInUp 0.15s var(--ease-out) both"},children:[N.jsx("div",{style:{padding:"8px 12px 4px",fontSize:"0.65rem",fontFamily:"var(--font-mono)",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Commands"}),c.map((d,p)=>{const m=p===n;return N.jsxs("div",{ref:m?l:void 0,onClick:()=>i(d),style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",cursor:"pointer",background:m?"var(--accent-glow)":"transparent",borderLeft:m?"2px solid var(--accent)":"2px solid transparent",transition:"background var(--duration-fast) var(--ease-out)"},onMouseEnter:g=>{m||(g.currentTarget.style.background="var(--surface-3)")},onMouseLeave:g=>{m||(g.currentTarget.style.background="transparent")},children:[N.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.8rem",fontWeight:600,color:m?"var(--accent)":"var(--text-primary)",whiteSpace:"nowrap"},children:["/",d.command,d.args&&N.jsxs("span",{style:{color:"var(--text-muted)",fontWeight:400},children:[" ",d.args]})]}),N.jsx("span",{style:{fontSize:"0.75rem",color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.description})]},d.command)})]})}const X2=[{command:"expxagents",description:"Show main menu"},{command:"expxagents create",args:"[description]",description:"Design a new squad"},{command:"expxagents run",args:"<name>",description:"Execute a squad pipeline"},{command:"expxagents list",description:"List all squads"},{command:"expxagents edit",args:"<name>",description:"Modify a squad"},{command:"expxagents delete",args:"<name>",description:"Delete a squad"},{command:"expxagents skills",description:"Browse skills"},{command:"expxagents install",args:"<name>",description:"Install a skill"},{command:"expxagents uninstall",args:"<name>",description:"Remove a skill"},{command:"expxagents dashboard",description:"Open virtual office"},{command:"expxagents virtual-office",description:"Open virtual office in browser"},{command:"expxagents jarvis",description:"Open Jarvis voice assistant"},{command:"expxagents help",description:"Show help text"}],Wy="_expxagents",$c=[.72,.78,.85,.95,1.08,1.2],OG=2;function DG({file:t,onRemove:e}){return N.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"var(--surface-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",padding:"2px 8px",fontSize:"0.72rem",fontFamily:"var(--font-mono)",color:"var(--accent)",maxWidth:180},children:[N.jsx("span",{style:{opacity:.6},children:"📎"}),N.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),N.jsx("button",{onClick:e,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:0,fontSize:"0.8rem",lineHeight:1},"aria-label":`Remove ${t.name}`,children:"×"})]})}function zG({message:t,fontSize:e}){if(t.role==="agent_dm")return N.jsxs("div",{"data-role":"agent_dm",style:{alignSelf:"flex-start",background:"var(--surface-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:"85%",marginBottom:"var(--sp-2)",animation:"fadeInUp 0.3s var(--ease-out) both"},children:[N.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--accent)",fontWeight:600,marginBottom:4,letterSpacing:"0.02em"},children:t.agentName}),N.jsx("div",{style:{color:"var(--text-primary)",fontSize:`${e}rem`,lineHeight:1.55},children:N.jsx(h_,{content:t.content})})]});const n=t.role==="user";return N.jsx("div",{"data-role":t.role,style:{alignSelf:n?"flex-end":"flex-start",background:n?"var(--user-bubble)":"var(--agent-bubble)",border:n?"1px solid rgba(100, 160, 255, 0.15)":"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:n?"75%":"85%",marginBottom:"var(--sp-2)",animation:"fadeInUp 0.3s var(--ease-out) both"},children:N.jsx("div",{style:{color:"var(--text-primary)",fontSize:`${e}rem`,lineHeight:1.55},children:n?N.jsx("span",{style:{whiteSpace:"pre-wrap"},children:t.content}):N.jsx(h_,{content:t.content})})})}function BG({conv:t,isActive:e,onSelect:n,onDelete:i}){const[r,s]=P.useState(!1),l=new Date(t.createdAt),c=l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),d=l.toLocaleDateString([],{day:"2-digit",month:"2-digit"});return N.jsxs("div",{onClick:n,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{padding:"8px 10px",borderRadius:"var(--radius-sm)",cursor:"pointer",background:e?"var(--accent-glow)":r?"var(--surface-3)":"transparent",border:e?"1px solid rgba(0, 200, 255, 0.12)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)",display:"flex",alignItems:"center",gap:8},children:[N.jsxs("div",{style:{flex:1,minWidth:0},children:[N.jsx("div",{style:{fontSize:"0.72rem",fontFamily:"var(--font-mono)",color:e?"var(--accent)":"var(--text-secondary)",fontWeight:e?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.preview||"New conversation"}),N.jsxs("div",{style:{fontSize:"0.6rem",fontFamily:"var(--font-mono)",color:"var(--text-muted)",marginTop:2},children:[d," ",c]})]}),r&&N.jsx("button",{onClick:p=>{p.stopPropagation(),i()},title:"Delete conversation","aria-label":"Delete conversation",style:{background:"none",border:"none",color:"var(--status-error)",cursor:"pointer",padding:"2px 4px",fontSize:"0.75rem",lineHeight:1,opacity:.7,flexShrink:0},children:"×"})]})}function LG(){const[t,e]=P.useState(""),[n,i]=P.useState([]),[r,s]=P.useState(OG),[l,c]=P.useState(!1),[d,p]=P.useState(""),[m,g]=P.useState(0),b=P.useRef(null),v=P.useRef(null),S=P.useRef(null),C=P.useRef(null),T=nr(se=>se.conversations),w=nr(se=>se.conversationId),k=nr(se=>se.messages),M=nr(se=>se.streaming),O=nr(se=>se.streamingText),H=nr(se=>se.activity),z=nr(se=>se.error),F=nr(se=>se.addUserMessage),$=nr(se=>se.startStreaming),j=nr(se=>se.loadHistory),I=nr(se=>se.selectConversation),Y=nr(se=>se.deleteConversation);P.useEffect(()=>{j(Wy)},[j]),P.useEffect(()=>{var se,pe;(pe=(se=b.current)==null?void 0:se.scrollIntoView)==null||pe.call(se,{behavior:"smooth"})},[k,O]);const X=P.useCallback(()=>{const se=v.current;se&&(se.style.height="auto",se.style.height=Math.min(se.scrollHeight,200)+"px")},[]);P.useEffect(()=>{X()},[t,X]);const ne=P.useCallback(se=>{if(se.startsWith("/")){const pe=se.slice(1);p(pe),c(!0),g(0)}else c(!1)},[]),q=P.useCallback(()=>X2.filter(se=>se.command.toLowerCase().includes(d.toLowerCase())||se.description.toLowerCase().includes(d.toLowerCase())),[d]),J=P.useCallback(se=>{var pe;e("/"+se.command+(se.args?" ":"")),c(!1),(pe=v.current)==null||pe.focus()},[]),B=P.useCallback(()=>{M||wD(Wy)},[M]),V=P.useCallback(se=>{M||Y(se,Wy)},[M,Y]),Z=P.useCallback(se=>{M||se===w||I(se)},[M,w,I]),Q=P.useCallback(()=>{const se=t.trim();!se||M||(F(se),$(),SD(Wy,se,n.length>0?n:void 0),e(""),i([]),c(!1),v.current&&(v.current.style.height="auto"))},[t,M,n,F,$]),G=P.useCallback(se=>{if(l){const pe=q();if(se.key==="ArrowDown"){se.preventDefault(),g(Ae=>Math.min(Ae+1,pe.length-1));return}if(se.key==="ArrowUp"){se.preventDefault(),g(Ae=>Math.max(Ae-1,0));return}if(se.key==="Enter"&&!se.shiftKey){se.preventDefault(),pe[m]&&J(pe[m]);return}if(se.key==="Escape"){se.preventDefault(),c(!1);return}if(se.key==="Tab"){se.preventDefault(),pe[m]&&J(pe[m]);return}}se.key==="Enter"&&!se.shiftKey&&(se.preventDefault(),Q())},[l,q,m,J,Q]),K=P.useCallback(se=>{const pe=se.target.value;e(pe),ne(pe)},[ne]),te=P.useCallback(async se=>{var Ae;if(!se)return;const pe=[];for(const Le of Array.from(se))if(!(Le.size>512e3))try{const Ge=await Le.text();pe.push({name:Le.name,content:Ge})}catch{}i(Le=>[...Le,...pe]),(Ae=v.current)==null||Ae.focus()},[]),U=P.useCallback(se=>{se.preventDefault(),se.stopPropagation(),te(se.dataTransfer.files)},[te]),le=P.useCallback(se=>{se.preventDefault(),se.stopPropagation()},[]),de=P.useCallback(se=>{i(pe=>pe.filter((Ae,Le)=>Le!==se))},[]),ge=t.trim()&&!M;return N.jsxs("div",{style:{display:"flex",height:"100%"},onDrop:U,onDragOver:le,children:[N.jsxs("div",{style:{width:220,borderRight:"1px solid var(--border-subtle)",background:"var(--surface-1)",display:"flex",flexDirection:"column",flexShrink:0},children:[N.jsx("div",{style:{padding:"var(--sp-2)"},children:N.jsx("button",{onClick:B,disabled:M,"aria-label":"New conversation",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",background:"var(--accent-glow)",border:"1px solid rgba(0, 200, 255, 0.15)",borderRadius:"var(--radius-sm)",color:"var(--accent)",cursor:M?"not-allowed":"pointer",fontFamily:"var(--font-mono)",fontSize:"0.72rem",fontWeight:600,letterSpacing:"0.02em",opacity:M?.5:1,transition:"all var(--duration-fast) var(--ease-out)"},children:"+ New Chat"})}),N.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"0 var(--sp-2) var(--sp-2)",display:"flex",flexDirection:"column",gap:2},children:[T.length===0&&N.jsx("div",{style:{padding:"var(--sp-4) var(--sp-2)",textAlign:"center",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)"},children:"No conversations yet"}),T.map(se=>N.jsx(BG,{conv:se,isActive:se.id===w,onSelect:()=>Z(se.id),onDelete:()=>V(se.id)},se.id))]})]}),N.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minWidth:0},children:[N.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"4px var(--sp-4)",borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",gap:2},children:[N.jsx("button",{onClick:()=>s(se=>Math.max(se-1,0)),disabled:r===0,title:"Decrease font size","aria-label":"Decrease font size",style:{background:"none",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",color:r===0?"var(--text-muted)":"var(--text-secondary)",cursor:r===0?"not-allowed":"pointer",padding:"2px 7px",fontFamily:"var(--font-mono)",fontSize:"0.7rem",fontWeight:700,lineHeight:1.4,opacity:r===0?.35:.7},children:"A-"}),N.jsx("button",{onClick:()=>s(se=>Math.min(se+1,$c.length-1)),disabled:r===$c.length-1,title:"Increase font size","aria-label":"Increase font size",style:{background:"none",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",color:r===$c.length-1?"var(--text-muted)":"var(--text-secondary)",cursor:r===$c.length-1?"not-allowed":"pointer",padding:"2px 7px",fontFamily:"var(--font-mono)",fontSize:"0.8rem",fontWeight:700,lineHeight:1.4,opacity:r===$c.length-1?.35:.7},children:"A+"})]}),N.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"var(--sp-4)",display:"flex",flexDirection:"column"},children:[k.length===0&&!M&&N.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,gap:"var(--sp-3)",opacity:.6},children:[N.jsx("div",{style:{width:48,height:48,borderRadius:"var(--radius-md)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.2rem",color:"var(--accent)"},children:"EX"}),N.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.82rem",fontFamily:"var(--font-display)"},children:"ExpxAgents Terminal"}),N.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.7rem",fontFamily:"var(--font-mono)"},children:"Type / to see available commands"})]}),k.map(se=>N.jsx(zG,{message:se,fontSize:$c[r]},se.id)),M&&O&&N.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"var(--agent-bubble)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:"85%",marginBottom:"var(--sp-2)"},children:N.jsxs("div",{style:{color:"var(--text-primary)",fontSize:`${$c[r]}rem`,lineHeight:1.55},children:[N.jsx(h_,{content:O}),N.jsx("span",{style:{display:"inline-block",width:6,height:14,background:"var(--accent)",marginLeft:2,animation:"pulse 1s ease-in-out infinite",borderRadius:1,verticalAlign:"text-bottom"}})]})}),M&&!O&&N.jsx("div",{style:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:4,padding:"10px 14px",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.75rem"},children:N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[N.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--accent)",animation:"pulse 1s ease-in-out infinite"}}),H||"Thinking..."]})}),z&&N.jsx("div",{style:{alignSelf:"center",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.25)",borderRadius:"var(--radius-sm)",padding:"8px 14px",color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.78rem",marginBottom:"var(--sp-2)"},children:z}),N.jsx("div",{ref:b})]}),N.jsxs("div",{ref:C,style:{borderTop:"1px solid var(--border-subtle)",background:"var(--surface-1)",position:"relative"},children:[N.jsx("div",{style:{position:"relative",padding:"0 var(--sp-4)"},children:N.jsx(kG,{commands:X2,filter:d,selectedIndex:m,onSelect:J,visible:l})}),n.length>0&&N.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,padding:"var(--sp-2) var(--sp-4) 0"},children:n.map((se,pe)=>N.jsx(DG,{file:se,onRemove:()=>de(pe)},`${se.name}-${pe}`))}),N.jsxs("div",{style:{display:"flex",padding:"var(--sp-3) var(--sp-4)",gap:"var(--sp-2)",alignItems:"flex-end"},children:[N.jsx("button",{onClick:()=>{var se;return(se=S.current)==null?void 0:se.click()},disabled:M,title:"Attach files (text only, max 500KB)",style:{background:"none",border:"1px solid var(--border-default)",borderRadius:"var(--radius-sm)",color:"var(--text-muted)",cursor:M?"not-allowed":"pointer",padding:"6px 8px",fontSize:"1rem",lineHeight:1,opacity:M?.4:.7,transition:"opacity var(--duration-fast) var(--ease-out)",flexShrink:0},"aria-label":"Attach file",children:"📎"}),N.jsx("input",{ref:S,type:"file",multiple:!0,style:{display:"none"},onChange:se=>te(se.target.files)}),N.jsx("textarea",{ref:v,className:"input",value:t,onChange:K,onKeyDown:G,placeholder:"Type a message... (/ for commands)",disabled:M,rows:1,style:{flex:1,resize:"none",overflow:"hidden",minHeight:36,maxHeight:200,lineHeight:1.5,fontFamily:"var(--font-mono)",fontSize:`${$c[r]}rem`}}),N.jsx("button",{onClick:Q,disabled:!ge,"aria-label":"Send",className:ge?"btn btn-accent":"btn",style:{padding:"0 var(--sp-5)",cursor:ge?"pointer":"not-allowed",opacity:ge?1:.4,flexShrink:0,height:36},children:"Send"})]})]})]})]})}const UG={planned:"var(--status-idle)",executing:"var(--accent)",done:"var(--status-active)"},IG={planned:"planejado",executing:"executando",done:"finalizado"},K2={idle:"var(--status-idle)",working:"var(--accent)",delivering:"var(--accent-dim)",done:"var(--status-active)",checkpoint:"var(--status-warning)"};function HG({step:t}){const e=UG[t.status],n=t.status==="executing";return N.jsxs("div",{style:{background:"var(--surface-3)",borderRadius:"var(--radius-sm)",padding:"12px 14px",marginBottom:"var(--sp-2)",border:"1px solid",borderColor:n?e:"var(--border-subtle)",transition:"border-color var(--duration-fast) var(--ease-out)"},children:[N.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[N.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.62rem",fontWeight:700,color:"var(--text-muted)",letterSpacing:"0.04em"},children:["STEP ",t.stepIndex]}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",fontWeight:600,color:e,padding:"2px 8px",borderRadius:"var(--radius-full)",border:`1px solid ${e}`,letterSpacing:"0.02em"},children:IG[t.status]})]}),N.jsx("div",{style:{fontWeight:600,fontSize:"0.82rem",color:"var(--text-primary)",marginBottom:8,lineHeight:1.4},children:t.label}),N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-secondary)"},children:t.agentName}),t.agentStatus&&t.status==="executing"&&N.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:K2[t.agentStatus],boxShadow:`0 0 4px ${K2[t.agentStatus]}`,display:"inline-block"}})]})]})}const jG=[{key:"planned",label:"Planejado",color:"var(--status-idle)",glow:"none"},{key:"executing",label:"Executando",color:"var(--accent)",glow:"var(--accent-glow)"},{key:"done",label:"Finalizado",color:"var(--status-active)",glow:"var(--status-active-glow)"}];function PG(t){return!t||t==="idle"?"planned":t==="done"?"done":"executing"}function GG(){const t=Ta(c=>c.selectedSquad),e=Ta(c=>c.activeStates),n=Ta(c=>c.squads),i=t?e[t]:null,r=t?n.find(c=>c.code===t):null,s=P.useMemo(()=>{var c,d;if(i)return i.agents.filter(p=>p.stepIndex>0).sort((p,m)=>p.stepIndex-m.stepIndex).map(p=>({stepIndex:p.stepIndex,stepId:`step-${p.stepIndex}`,label:p.stepLabel,agentId:p.id,agentName:p.name,agentIcon:p.icon,agentStatus:p.status,status:PG(p.status)}));if((d=(c=r==null?void 0:r.pipeline)==null?void 0:c.steps)!=null&&d.length){const p=r.agents||[];return r.pipeline.steps.map((m,g)=>{const b=p.find(v=>v.id===m.agent);return{stepIndex:g+1,stepId:m.id,label:m.label,agentId:m.agent,agentName:(b==null?void 0:b.name)||m.agent,agentIcon:(b==null?void 0:b.icon)||"robot",agentStatus:null,status:"planned"}})}return[]},[i,r]),l=P.useMemo(()=>jG.map(c=>({...c,steps:s.filter(d=>d.status===c.key)})),[s]);return t?s.length===0?N.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"var(--sp-3)",animation:"fadeIn 0.5s var(--ease-out) both"},children:[N.jsx("span",{style:{fontSize:"1.2rem",color:"var(--text-muted)"},children:"▦"}),N.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.85rem"},children:"No pipeline configured for this squad"})]}):N.jsx("div",{style:{display:"flex",gap:"var(--sp-4)",padding:"var(--sp-5)",height:"100%",overflow:"auto"},children:l.map((c,d)=>N.jsxs("div",{"data-testid":`column-${c.key}`,style:{flex:1,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-4)",display:"flex",flexDirection:"column",minWidth:220,animation:`fadeInUp 0.4s var(--ease-out) ${d*80}ms both`},children:[N.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--sp-4)",paddingBottom:"var(--sp-3)",borderBottom:`2px solid ${c.color}`},children:[N.jsx("span",{style:{fontWeight:600,fontSize:"0.82rem",color:"var(--text-primary)"},children:c.label}),N.jsx("span",{"data-testid":`count-${c.key}`,style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",fontWeight:700,color:c.color,background:c.glow,width:22,height:22,borderRadius:"var(--radius-full)",display:"flex",alignItems:"center",justifyContent:"center",border:`1px solid ${c.color}`},children:c.steps.length})]}),N.jsx("div",{style:{flex:1,overflowY:"auto"},children:c.steps.map(p=>N.jsx(HG,{step:p},p.stepId))})]},c.key))}):N.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"var(--sp-3)",animation:"fadeIn 0.5s var(--ease-out) both"},children:[N.jsx("span",{style:{fontSize:"1.2rem",color:"var(--text-muted)"},children:"▦"}),N.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.85rem"},children:"Select a squad to view the kanban board"})]})}function FG(){const t=dl(M=>M.user),[e,n]=P.useState([]),[i,r]=P.useState(!0),[s,l]=P.useState(""),[c,d]=P.useState(""),[p,m]=P.useState("viewer"),[g,b]=P.useState(null),[v,S]=P.useState(null),C=P.useCallback(async()=>{try{const M=await fetch("/api/users",{credentials:"include"});if(M.ok){const O=await M.json();n(O.users)}}catch{b("Failed to load users")}finally{r(!1)}},[]);P.useEffect(()=>{C()},[C]);const T=async()=>{if(!(!s.trim()||!c.trim())){b(null);try{const M=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:c,role:p}),credentials:"include"});if(!M.ok){const O=await M.json();b(O.error||"Failed to create user");return}l(""),d(""),m("viewer"),await C()}catch{b("Network error")}}},w=async(M,O)=>{try{(await fetch(`/api/users/${M}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:O}),credentials:"include"})).ok&&await C()}catch{b("Failed to update role")}},k=async M=>{try{(await fetch(`/api/users/${M}`,{method:"DELETE",credentials:"include"})).ok&&(S(null),await C())}catch{b("Failed to delete user")}};return i?N.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading users..."}):N.jsxs("div",{children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-4)"},children:"User Management"}),g&&N.jsx("div",{style:{background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",padding:"var(--sp-2) var(--sp-3)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-3)",fontFamily:"var(--font-mono)",fontSize:"0.78rem"},children:g}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-5)",flexWrap:"wrap",alignItems:"center"},children:[N.jsx("input",{className:"input",placeholder:"Username",value:s,onChange:M=>l(M.target.value),style:{flex:1,minWidth:120}}),N.jsx("input",{className:"input",placeholder:"Password",type:"password",value:c,onChange:M=>d(M.target.value),style:{flex:1,minWidth:120}}),N.jsxs("select",{className:"input",value:p,onChange:M=>m(M.target.value),style:{minWidth:100},children:[N.jsx("option",{value:"viewer",children:"viewer"}),N.jsx("option",{value:"operator",children:"operator"}),N.jsx("option",{value:"admin",children:"admin"})]}),N.jsx("button",{onClick:T,className:"btn btn-accent",children:"Create User"})]}),N.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[N.jsx("thead",{children:N.jsx("tr",{style:{borderBottom:"1px solid var(--border-default)"},children:["Username","Email","Role","Last Login","Actions"].map((M,O)=>N.jsx("th",{style:{textAlign:O===4?"right":"left",padding:"8px 12px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em"},children:M},M))})}),N.jsx("tbody",{children:e.map(M=>N.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[N.jsx("td",{style:{padding:"10px 12px",color:"var(--text-primary)",fontSize:"0.82rem"},children:M.username}),N.jsx("td",{style:{padding:"10px 12px",color:"var(--text-secondary)",fontSize:"0.82rem"},children:M.email||"—"}),N.jsx("td",{style:{padding:"10px 12px"},children:M.id===(t==null?void 0:t.id)?N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-secondary)"},children:M.role}):N.jsxs("select",{className:"input",value:M.role,onChange:O=>w(M.id,O.target.value),style:{padding:"4px 8px",fontSize:"0.75rem"},children:[N.jsx("option",{value:"viewer",children:"viewer"}),N.jsx("option",{value:"operator",children:"operator"}),N.jsx("option",{value:"admin",children:"admin"})]})}),N.jsx("td",{style:{padding:"10px 12px",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:M.last_login?new Date(M.last_login).toLocaleDateString():"—"}),N.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:M.id!==(t==null?void 0:t.id)&&(v===M.id?N.jsxs("span",{style:{display:"inline-flex",gap:"var(--sp-2)",alignItems:"center"},children:[N.jsx("span",{style:{color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:"Confirm?"}),N.jsx("button",{onClick:()=>k(M.id),className:"btn btn-sm btn-danger",children:"Yes"}),N.jsx("button",{onClick:()=>S(null),className:"btn btn-sm",children:"No"})]}):N.jsx("button",{onClick:()=>S(M.id),className:"btn btn-sm btn-danger",children:"Delete"}))})]},M.id))})]})]})}function qG(){const t=Ta(d=>d.selectedSquad),e=Ta(d=>d.activeStates),[n,i]=P.useState(null),[r,s]=P.useState(!1),l=t?e[t]:null;if(P.useEffect(()=>{if(!t){i(null);return}s(!0),fetch(`/api/squads/${t}`,{credentials:"include"}).then(d=>d.ok?d.json():null).then(d=>{d&&i(d.data)}).finally(()=>s(!1))},[t]),!t)return N.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontSize:"0.85rem"},children:"Select a squad to view details"});if(r)return N.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading squad details..."});const c={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,marginBottom:"var(--sp-2)",textTransform:"uppercase",letterSpacing:"0.08em"};return N.jsxs("div",{children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-4)"},children:"Squad Info"}),n&&N.jsxs(N.Fragment,{children:[N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:c,children:"Name"}),N.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.9rem",fontWeight:600},children:n.name})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:c,children:"Description"}),N.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.5},children:n.description})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:c,children:"Agents"}),N.jsx("div",{style:{display:"flex",gap:"var(--sp-2)",flexWrap:"wrap"},children:n.agents.map(d=>N.jsx("span",{style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"4px 10px",fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-primary)"},children:d.name},d.id))})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:c,children:"Pipeline Steps"}),N.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:n.pipeline.steps.map((d,p)=>N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"8px 12px",fontSize:"0.82rem"},children:[N.jsx("span",{style:{background:"var(--accent)",color:"var(--text-inverse)",width:22,height:22,borderRadius:"var(--radius-full)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-mono)",fontSize:"0.65rem",fontWeight:700,flexShrink:0},children:p+1}),N.jsx("span",{style:{color:"var(--text-primary)"},children:d.label}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",color:"var(--text-muted)",fontSize:"0.68rem",marginLeft:"auto"},children:d.agent})]},d.id))})]})]}),l&&N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:c,children:"Current State"}),N.jsx("pre",{"data-testid":"state-json",style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--accent)",overflow:"auto",maxHeight:400,lineHeight:1.5},children:JSON.stringify(l,null,2)})]})]})}function YG(){const[t,e]=P.useState(null),[n,i]=P.useState(null),[r,s]=P.useState(!0),[l,c]=P.useState(null),d=P.useCallback(async()=>{s(!0);try{const g=await fetch("/api/health",{credentials:"include"});if(g.ok){const b=await g.json();e(b),i(b.status==="ok")}else i(!1)}catch{i(!1)}finally{s(!1),c(new Date().toLocaleTimeString())}},[]);P.useEffect(()=>{d()},[d]);const p={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,marginBottom:"var(--sp-2)",textTransform:"uppercase",letterSpacing:"0.08em"},m={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-2)",fontSize:"0.82rem"};return N.jsxs("div",{children:[N.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--sp-4)"},children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)"},children:"Server Info"}),N.jsx("button",{onClick:d,className:"btn btn-sm",children:"Refresh"})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:p,children:"Health Status"}),N.jsxs("div",{style:m,children:[N.jsx("span",{style:{color:"var(--text-primary)"},children:"API Server"}),r?N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-muted)",animation:"pulse 1.5s ease-in-out infinite"},children:"Checking..."}):N.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"var(--sp-1)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",fontWeight:600,color:n?"var(--status-active)":"var(--status-error)"},children:[N.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:n?"var(--status-active)":"var(--status-error)",display:"inline-block",boxShadow:n?"0 0 8px var(--status-active-glow)":"0 0 8px var(--status-error-glow)"}}),n?"Healthy":"Unhealthy"]})]})]}),N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("div",{style:p,children:"Environment"}),N.jsxs("div",{style:m,children:[N.jsx("span",{style:{color:"var(--text-primary)"},children:"API Port"}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:"3001"})]}),N.jsxs("div",{style:m,children:[N.jsx("span",{style:{color:"var(--text-primary)"},children:"Dashboard Port (dev)"}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:"5173"})]})]}),l&&N.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textAlign:"right"},children:["Last checked: ",l]})]})}const VG=[{key:"AWS_ACCESS_KEY_ID",label:"AWS Access Key ID",type:"password",hint:"Your AWS IAM access key"},{key:"AWS_SECRET_ACCESS_KEY",label:"AWS Secret Access Key",type:"password",hint:"Your AWS IAM secret key"},{key:"AWS_REGION",label:"AWS Region",type:"text",hint:"e.g. us-east-1, eu-west-1"},{key:"SES_FROM_EMAIL",label:"SES From Email",type:"text",hint:"Verified sender email in SES"},{key:"SES_RATE_LIMIT",label:"SES Rate Limit",type:"text",hint:"Max emails per second (default: 14)"},{key:"SERVER_URL",label:"Server URL",type:"text",hint:"Public URL for unsubscribe links"},{key:"PORT",label:"Port",type:"text",hint:"Server port (requires restart)"},{key:"CORS_ORIGIN",label:"CORS Origin",type:"text",hint:"Allowed origin for CORS"},{key:"NODE_ENV",label:"Node Environment",type:"text",hint:"development or production"}];function XG(){const[t,e]=P.useState({}),[n,i]=P.useState(!0),[r,s]=P.useState(!1),[l,c]=P.useState(null),[d,p]=P.useState(new Set);P.useEffect(()=>{fetch("/api/settings/env").then(b=>b.json()).then(b=>{e(b.settings||{}),i(!1)}).catch(()=>i(!1))},[]);const m=(b,v)=>{e(S=>({...S,[b]:v})),p(S=>new Set(S).add(b)),c(null)},g=async()=>{if(d.size===0)return;s(!0),c(null);const b={};for(const v of d)b[v]=t[v]||"";try{const v=await fetch("/api/settings/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(v.ok){const S=await v.json();e(S.settings),p(new Set),c({type:"success",text:"Settings saved successfully"})}else{const S=await v.json();c({type:"error",text:S.error||"Failed to save"})}}catch{c({type:"error",text:"Network error"})}finally{s(!1)}};return n?N.jsx("div",{style:{textAlign:"center",padding:"var(--sp-6)",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.75rem"},children:"Loading..."}):N.jsxs("div",{style:{maxWidth:640},children:[N.jsx("div",{style:{marginBottom:"var(--sp-4)"},children:N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",lineHeight:1.6},children:"Server environment variables. Secret values are masked. Changes to PORT or NODE_ENV require a server restart."})}),N.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:VG.map(b=>N.jsxs("div",{children:[N.jsx("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-secondary)",fontWeight:600,letterSpacing:"0.04em",marginBottom:4},children:b.label}),N.jsx("input",{type:b.type,value:t[b.key]||"",onChange:v=>m(b.key,v.target.value),placeholder:b.hint,style:{width:"100%",padding:"8px 12px",background:"var(--surface-2)",border:d.has(b.key)?"1px solid var(--accent)":"1px solid var(--border-default)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)",fontFamily:"var(--font-mono)",fontSize:"0.78rem",boxSizing:"border-box"}}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:b.hint})]},b.key))}),N.jsxs("div",{style:{marginTop:"var(--sp-4)",display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[N.jsx("button",{onClick:g,disabled:d.size===0||r,style:{padding:"8px 24px",background:d.size>0?"var(--accent)":"var(--surface-3)",border:"none",borderRadius:"var(--radius-sm)",color:d.size>0?"var(--text-inverse)":"var(--text-muted)",cursor:d.size>0?"pointer":"default",fontFamily:"var(--font-display)",fontSize:"0.82rem",fontWeight:600,opacity:r?.6:1},children:r?"Saving...":`Save ${d.size>0?`(${d.size})`:""}`}),l&&N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:l.type==="success"?"var(--status-active)":"var(--status-error)"},children:l.text})]})]})}function KG(){const[t,e]=P.useState([]),[n,i]=P.useState(!0),[r,s]=P.useState(null),[l,c]=P.useState(null),[d,p]=P.useState(""),[m,g]=P.useState(""),[b,v]=P.useState(""),[S,C]=P.useState(""),[T,w]=P.useState(null),[k,M]=P.useState(""),[O,H]=P.useState(""),[z,F]=P.useState(""),[$,j]=P.useState(""),I=P.useCallback(async()=>{try{const B=await fetch("/api/team",{credentials:"include"});if(B.ok){const V=await B.json();e(V.members)}}catch{s("Failed to load team members")}finally{i(!1)}},[]);P.useEffect(()=>{I()},[I]);const Y=async()=>{if(!(!d.trim()||!m.trim())){s(null);try{const B=await fetch("/api/team",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.trim(),role:m.trim(),email:b.trim()||void 0,phone:S.trim()||void 0}),credentials:"include"});if(!B.ok){const V=await B.json();s(V.error||"Failed to create team member");return}p(""),g(""),v(""),C(""),await I()}catch{s("Network error")}}},X=B=>{w(B.id),M(B.name),H(B.role),F(B.email||""),j(B.phone||"")},ne=()=>{w(null)},q=async()=>{if(!(!T||!k.trim()||!O.trim())){s(null);try{(await fetch(`/api/team/${T}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k.trim(),role:O.trim(),email:z.trim()||void 0,phone:$.trim()||void 0}),credentials:"include"})).ok&&(w(null),await I())}catch{s("Failed to update member")}}},J=async B=>{try{(await fetch(`/api/team/${B}`,{method:"DELETE",credentials:"include"})).ok&&(c(null),await I())}catch{s("Failed to delete member")}};return n?N.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading team..."}):N.jsxs("div",{children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-4)"},children:"Team Members"}),r&&N.jsx("div",{style:{background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",padding:"var(--sp-2) var(--sp-3)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-3)",fontFamily:"var(--font-mono)",fontSize:"0.78rem"},children:r}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-5)",flexWrap:"wrap",alignItems:"center"},children:[N.jsx("input",{className:"input",placeholder:"Name *",value:d,onChange:B=>p(B.target.value),style:{flex:1,minWidth:120}}),N.jsx("input",{className:"input",placeholder:"Role *",value:m,onChange:B=>g(B.target.value),style:{flex:1,minWidth:120}}),N.jsx("input",{className:"input",placeholder:"Email",type:"email",value:b,onChange:B=>v(B.target.value),style:{flex:1,minWidth:150}}),N.jsx("input",{className:"input",placeholder:"Phone",type:"tel",value:S,onChange:B=>C(B.target.value),style:{flex:1,minWidth:130}}),N.jsx("button",{onClick:Y,className:"btn btn-accent",children:"Add Member"})]}),N.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[N.jsx("thead",{children:N.jsx("tr",{style:{borderBottom:"1px solid var(--border-default)"},children:["Name","Role","Email","Phone","Actions"].map((B,V)=>N.jsx("th",{style:{textAlign:V===4?"right":"left",padding:"8px 12px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em"},children:B},B))})}),N.jsxs("tbody",{children:[t.length===0&&N.jsx("tr",{children:N.jsx("td",{colSpan:5,style:{padding:"var(--sp-5)",textAlign:"center",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.78rem"},children:"No team members yet"})}),t.map(B=>T===B.id?N.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-3)"},children:[N.jsx("td",{style:{padding:"6px 12px"},children:N.jsx("input",{className:"input",value:k,onChange:V=>M(V.target.value),style:{width:"100%",fontSize:"0.82rem"}})}),N.jsx("td",{style:{padding:"6px 12px"},children:N.jsx("input",{className:"input",value:O,onChange:V=>H(V.target.value),style:{width:"100%",fontSize:"0.82rem"}})}),N.jsx("td",{style:{padding:"6px 12px"},children:N.jsx("input",{className:"input",value:z,onChange:V=>F(V.target.value),style:{width:"100%",fontSize:"0.82rem"}})}),N.jsx("td",{style:{padding:"6px 12px"},children:N.jsx("input",{className:"input",value:$,onChange:V=>j(V.target.value),style:{width:"100%",fontSize:"0.82rem"}})}),N.jsx("td",{style:{padding:"6px 12px",textAlign:"right"},children:N.jsxs("span",{style:{display:"inline-flex",gap:"var(--sp-2)"},children:[N.jsx("button",{onClick:q,className:"btn btn-sm btn-accent",children:"Save"}),N.jsx("button",{onClick:ne,className:"btn btn-sm",children:"Cancel"})]})})]},B.id):N.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[N.jsx("td",{style:{padding:"10px 12px",color:"var(--text-primary)",fontSize:"0.82rem"},children:B.name}),N.jsx("td",{style:{padding:"10px 12px",color:"var(--text-secondary)",fontSize:"0.82rem"},children:B.role}),N.jsx("td",{style:{padding:"10px 12px",color:"var(--text-secondary)",fontSize:"0.82rem"},children:B.email||"—"}),N.jsx("td",{style:{padding:"10px 12px",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-muted)"},children:B.phone||"—"}),N.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:l===B.id?N.jsxs("span",{style:{display:"inline-flex",gap:"var(--sp-2)",alignItems:"center"},children:[N.jsx("span",{style:{color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:"Confirm?"}),N.jsx("button",{onClick:()=>J(B.id),className:"btn btn-sm btn-danger",children:"Yes"}),N.jsx("button",{onClick:()=>c(null),className:"btn btn-sm",children:"No"})]}):N.jsxs("span",{style:{display:"inline-flex",gap:"var(--sp-2)"},children:[N.jsx("button",{onClick:()=>X(B),className:"btn btn-sm",children:"Edit"}),N.jsx("button",{onClick:()=>c(B.id),className:"btn btn-sm btn-danger",children:"Delete"})]})})]},B.id))]})]})]})}const WG={dev:"Development",messaging:"Messaging",ads:"Advertising",crm:"CRM",support:"Support",email:"Email Marketing",sales:"Sales & Payments",pm:"Project Management",monitoring:"Monitoring",cloud:"Cloud & Deploy",design:"Design"},$G={dev:"⌨",messaging:"💬",ads:"📢",crm:"📊",support:"🎧",email:"✉",sales:"💰",pm:"📋",monitoring:"🔍",cloud:"☁",design:"🎨"};function ZG(){const[t,e]=P.useState([]),[n,i]=P.useState([]),[r,s]=P.useState(!0),[l,c]=P.useState(null),[d,p]=P.useState(null),[m,g]=P.useState(!1),[b,v]=P.useState({}),[S,C]=P.useState(!1),[T,w]=P.useState(null),[k,M]=P.useState(""),O=P.useCallback(async()=>{try{const[X,ne]=await Promise.all([fetch("/api/integrations/catalog",{credentials:"include"}),fetch("/api/integrations",{credentials:"include"})]);if(X.ok){const q=await X.json();e(q.providers)}if(ne.ok){const q=await ne.json();i(q.integrations)}}catch{c("Failed to load integrations")}finally{s(!1)}},[]);P.useEffect(()=>{O()},[O]);const H=X=>n.find(ne=>ne.provider===X),z=X=>{const ne=H(X.key),q={};for(const J of X.fields)q[J.key]=(ne==null?void 0:ne.config[J.key])||"";v(q),C((ne==null?void 0:ne.enabled)??!1),p(X.key),c(null)},F=async()=>{if(d){g(!0),c(null);try{const X=await fetch(`/api/integrations/${d}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:S,config:b}),credentials:"include"});if(!X.ok){const ne=await X.json();c(ne.error||"Failed to save");return}await O(),p(null)}catch{c("Network error")}finally{g(!1)}}},$=async X=>{try{(await fetch(`/api/integrations/${X}`,{method:"DELETE",credentials:"include"})).ok&&(await O(),d===X&&p(null))}catch{c("Failed to disconnect")}},j=Array.from(new Set(t.map(X=>X.category))),I=k.toLowerCase(),Y=t.filter(X=>!(T&&X.category!==T||k&&!X.name.toLowerCase().includes(I)&&!X.description.toLowerCase().includes(I)));return r?N.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading integrations..."}):N.jsxs("div",{children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-2)"},children:"Integrations"}),N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-muted)",marginBottom:"var(--sp-4)"},children:"Configure third-party services for your squads and agents"}),N.jsx("input",{className:"input",type:"text",placeholder:"Search integrations...",value:k,onChange:X=>M(X.target.value),style:{width:"100%",fontSize:"0.8rem",marginBottom:"var(--sp-3)"}}),l&&N.jsx("div",{style:{background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",padding:"var(--sp-2) var(--sp-3)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-3)",fontFamily:"var(--font-mono)",fontSize:"0.78rem"},children:l}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-4)",flexWrap:"wrap"},children:[N.jsx("button",{onClick:()=>w(null),style:{padding:"4px 12px",border:"1px solid",borderColor:T?"var(--border-subtle)":"var(--accent)",borderRadius:"var(--radius-sm)",background:T?"transparent":"var(--accent)",color:T?"var(--text-secondary)":"#fff",fontFamily:"var(--font-mono)",fontSize:"0.7rem",cursor:"pointer"},children:"All"}),j.map(X=>N.jsxs("button",{onClick:()=>w(X),style:{padding:"4px 12px",border:"1px solid",borderColor:T===X?"var(--accent)":"var(--border-subtle)",borderRadius:"var(--radius-sm)",background:T===X?"var(--accent)":"transparent",color:T===X?"#fff":"var(--text-secondary)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",cursor:"pointer"},children:[$G[X]||""," ",WG[X]||X]},X))]}),N.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:"var(--sp-3)"},children:Y.map(X=>{const ne=H(X.key),q=d===X.key;return N.jsxs("div",{style:{background:"var(--surface-3)",border:"1px solid",borderColor:ne!=null&&ne.enabled?"var(--status-running)":"var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-3)",transition:"all var(--duration-fast) var(--ease-out)",gridColumn:q?"1 / -1":void 0},children:[N.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:q?"var(--sp-3)":0},children:[N.jsxs("div",{children:[N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[N.jsx("span",{style:{fontFamily:"var(--font-display)",fontWeight:600,fontSize:"0.85rem",color:"var(--text-primary)"},children:X.name}),(ne==null?void 0:ne.enabled)&&N.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"var(--status-running)",boxShadow:"0 0 4px var(--status-running)",display:"inline-block"}})]}),N.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.68rem",color:"var(--text-muted)"},children:X.description})]}),N.jsx("button",{onClick:()=>q?p(null):z(X),className:"btn btn-sm",style:{flexShrink:0},children:q?"Close":ne?"Edit":"Configure"})]}),q&&N.jsxs("div",{style:{borderTop:"1px solid var(--border-subtle)",paddingTop:"var(--sp-3)"},children:[N.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",marginBottom:"var(--sp-3)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)",cursor:"pointer"},children:[N.jsx("input",{type:"checkbox",checked:S,onChange:J=>C(J.target.checked)}),"Enabled"]}),N.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:X.fields.map(J=>N.jsxs("div",{children:[N.jsxs("label",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:2,display:"block"},children:[J.label," ",J.required&&"*"]}),N.jsx("input",{className:"input",type:J.type==="password"?"password":"text",placeholder:J.placeholder||"",value:b[J.key]||"",onChange:B=>v(V=>({...V,[J.key]:B.target.value})),style:{width:"100%",fontSize:"0.8rem"}})]},J.key))}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginTop:"var(--sp-3)",justifyContent:"flex-end"},children:[ne&&N.jsx("button",{onClick:()=>$(X.key),className:"btn btn-sm btn-danger",children:"Disconnect"}),N.jsx("button",{onClick:()=>p(null),className:"btn btn-sm",children:"Cancel"}),N.jsx("button",{onClick:F,className:"btn btn-sm btn-accent",disabled:m,children:m?"Saving...":"Save"})]})]})]},X.key)})})]})}function QG(){const t=dl(l=>l.user),e=(t==null?void 0:t.role)==="admin",[n,i]=P.useState(e?"users":"squad"),s=[{key:"users",label:"Users",icon:"◉",adminOnly:!0},{key:"team",label:"Team",icon:"◎"},{key:"integrations",label:"Integrations",icon:"⬡"},{key:"squad",label:"Squad",icon:"⬢"},{key:"server",label:"Server",icon:"⚙"},{key:"env",label:"Environment",icon:"◆",adminOnly:!0}].filter(l=>!l.adminOnly||e);return N.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:"var(--sp-5)",animation:"fadeIn 0.4s var(--ease-out) both"},children:[N.jsxs("div",{style:{marginBottom:"var(--sp-4)"},children:[N.jsx("h2",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.1rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:"Settings"}),N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:"Configuration and management"})]}),N.jsx("div",{style:{display:"flex",gap:"var(--sp-1)",marginBottom:"var(--sp-5)",borderBottom:"1px solid var(--border-subtle)"},children:s.map(l=>N.jsxs("button",{onClick:()=>i(l.key),style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"10px 16px",border:"none",borderBottom:n===l.key?"2px solid var(--accent)":"2px solid transparent",background:"transparent",color:n===l.key?"var(--text-primary)":"var(--text-muted)",fontFamily:"var(--font-display)",fontWeight:n===l.key?600:400,fontSize:"0.82rem",cursor:"pointer",transition:"all var(--duration-fast) var(--ease-out)"},children:[N.jsx("span",{style:{fontSize:"0.75rem",opacity:.7},children:l.icon}),l.label]},l.key))}),N.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&e&&N.jsx(FG,{}),n==="team"&&N.jsx(KG,{}),n==="integrations"&&N.jsx(ZG,{}),n==="squad"&&N.jsx(qG,{}),n==="server"&&N.jsx(YG,{}),n==="env"&&e&&N.jsx(XG,{})]})]})}function JG(){const t=lo(d=>d.jobs),e=lo(d=>d.loading),n=lo(d=>d.fetchJobs),i=lo(d=>d.pauseJob),r=lo(d=>d.resumeJob),s=lo(d=>d.triggerJob);P.useEffect(()=>{n()},[n]);const l=d=>d==="active"?"var(--status-active)":d==="paused"?"var(--status-warning)":"var(--status-error)",c=d=>d==="active"?"var(--status-active-glow)":d==="paused"?"var(--status-warning-glow)":"var(--status-error-glow)";return N.jsxs("div",{style:{padding:"var(--sp-6)",animation:"fadeIn 0.4s var(--ease-out) both"},children:[N.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[N.jsx("h2",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.1rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:"Scheduler"}),N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:"Autonomous job execution and monitoring"})]}),e&&N.jsx("p",{style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading jobs..."}),!e&&t.length===0&&N.jsxs("div",{style:{padding:"var(--sp-8)",textAlign:"center",color:"var(--text-muted)"},children:[N.jsx("div",{style:{fontSize:"1.5rem",marginBottom:"var(--sp-3)"},children:"⏣"}),N.jsx("p",{style:{fontSize:"0.85rem",marginBottom:"var(--sp-2)"},children:"No scheduled jobs"}),N.jsxs("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:["Add ",N.jsx("code",{style:{background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)"},children:"schedule.enabled: true"})," to a squad.yaml to get started."]})]}),N.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:t.map((d,p)=>N.jsxs("div",{style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-4)",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"border-color var(--duration-fast) var(--ease-out)",animation:`fadeInUp 0.4s var(--ease-out) ${p*60}ms both`},children:[N.jsxs("div",{style:{flex:1,minWidth:0},children:[N.jsx("div",{style:{fontWeight:600,fontSize:"0.9rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:d.squad_name}),N.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-secondary)",display:"flex",alignItems:"center",gap:"var(--sp-3)",flexWrap:"wrap"},children:[N.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,color:l(d.status)},children:[N.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:l(d.status),boxShadow:`0 0 8px ${c(d.status)}`,display:"inline-block",animation:d.status==="active"?"statusPulse 2s ease-in-out infinite":"none"}}),d.status]}),N.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),N.jsx("code",{style:{background:"var(--surface-3)",padding:"1px 5px",borderRadius:"var(--radius-xs)",fontSize:"0.65rem"},children:d.cron_expression}),d.last_run_at&&N.jsxs(N.Fragment,{children:[N.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),N.jsxs("span",{children:["Last: ",new Date(d.last_run_at).toLocaleString()]})]}),d.last_result&&N.jsxs(N.Fragment,{children:[N.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),N.jsx("span",{children:d.last_result})]})]})]}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginLeft:"var(--sp-3)"},children:[d.status==="active"?N.jsx("button",{onClick:()=>i(d.squad_name),className:"btn btn-sm",children:"Pause"}):N.jsx("button",{onClick:()=>r(d.squad_name),className:"btn btn-sm",children:"Resume"}),N.jsx("button",{onClick:()=>s(d.squad_name),className:"btn btn-sm btn-accent",children:"Trigger"})]})]},d.squad_name))})]})}const cl=Sf(t=>({leads:[],campaigns:[],lists:[],tags:[],total:0,loading:!1,fetchLeads:async(e={})=>{t({loading:!0});try{const n=new URLSearchParams(e),i=await fetch(`/api/email/leads?${n}`);if(i.ok){const r=await i.json();t({leads:r.data,total:r.total})}}finally{t({loading:!1})}},fetchCampaigns:async(e={})=>{t({loading:!0});try{const n=new URLSearchParams(e),i=await fetch(`/api/email/campaigns?${n}`);if(i.ok){const r=await i.json();t({campaigns:r.data})}}finally{t({loading:!1})}},fetchLists:async()=>{const e=await fetch("/api/email/leads/lists");if(e.ok){const n=await e.json();t({lists:n.lists})}},fetchTags:async()=>{const e=await fetch("/api/email/leads/tags");if(e.ok){const n=await e.json();t({tags:n.tags})}}}));function eF(){const t=cl(g=>g.leads),e=cl(g=>g.total),n=cl(g=>g.lists),i=cl(g=>g.tags),r=cl(g=>g.loading),s=cl(g=>g.fetchLeads),l=cl(g=>g.fetchLists),c=cl(g=>g.fetchTags),[d,p]=P.useState("");P.useEffect(()=>{s(),l(),c()},[s,l,c]);const m=()=>{s(d?{search:d}:{})};return N.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-4)"},children:[N.jsxs("div",{style:{display:"flex",gap:"var(--sp-3)"},children:[N.jsx(fv,{label:"Total Leads",value:e}),N.jsx(fv,{label:"Lists",value:n.length}),N.jsx(fv,{label:"Tags",value:i.length})]}),N.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)"},children:[N.jsx("input",{type:"text",placeholder:"Search leads...",value:d,onChange:g=>p(g.target.value),onKeyDown:g=>g.key==="Enter"&&m(),style:{flex:1,padding:"8px 12px",background:"var(--surface-2)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)",fontFamily:"var(--font-body)",fontSize:"0.82rem"}}),N.jsx("button",{onClick:m,className:"btn-ghost",style:{padding:"8px 16px",background:"var(--accent-glow)",border:"1px solid rgba(0, 200, 255, 0.2)",borderRadius:"var(--radius-sm)",color:"var(--accent)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.75rem"},children:"Search"})]}),r?N.jsx("div",{style:{textAlign:"center",padding:"var(--sp-6)",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.75rem"},children:"Loading..."}):N.jsx("div",{style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",overflow:"hidden"},children:N.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[N.jsx("thead",{children:N.jsx("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:["Email","Name","Company","Status","Source","Created"].map(g=>N.jsx("th",{style:{textAlign:"left",padding:"10px 14px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600},children:g},g))})}),N.jsxs("tbody",{children:[t.map(g=>N.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[N.jsx("td",{style:sa,children:g.email}),N.jsx("td",{style:sa,children:g.name||"—"}),N.jsx("td",{style:sa,children:g.company||"—"}),N.jsx("td",{style:sa,children:N.jsx(PR,{status:g.status})}),N.jsx("td",{style:sa,children:g.source||"—"}),N.jsx("td",{style:{...sa,fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:new Date(g.created_at).toLocaleDateString()})]},g.id)),t.length===0&&N.jsx("tr",{children:N.jsx("td",{colSpan:6,style:{...sa,textAlign:"center",color:"var(--text-muted)"},children:"No leads found"})})]})]})})]})}function tF(){const t=cl(i=>i.campaigns),e=cl(i=>i.loading),n=cl(i=>i.fetchCampaigns);return P.useEffect(()=>{n()},[n]),N.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-4)"},children:e?N.jsx("div",{style:{textAlign:"center",padding:"var(--sp-6)",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.75rem"},children:"Loading..."}):N.jsx("div",{style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",overflow:"hidden"},children:N.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[N.jsx("thead",{children:N.jsx("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:["Name","Subject","Status","Recipients","Sent","Bounced","Created"].map(i=>N.jsx("th",{style:{textAlign:"left",padding:"10px 14px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600},children:i},i))})}),N.jsxs("tbody",{children:[t.map(i=>N.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[N.jsx("td",{style:sa,children:i.name}),N.jsx("td",{style:sa,children:i.subject}),N.jsx("td",{style:sa,children:N.jsx(PR,{status:i.status})}),N.jsx("td",{style:{...sa,fontFamily:"var(--font-mono)"},children:i.total_recipients}),N.jsx("td",{style:{...sa,fontFamily:"var(--font-mono)"},children:i.sent_count}),N.jsx("td",{style:{...sa,fontFamily:"var(--font-mono)"},children:i.bounce_count}),N.jsx("td",{style:{...sa,fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:new Date(i.created_at).toLocaleDateString()})]},i.id)),t.length===0&&N.jsx("tr",{children:N.jsx("td",{colSpan:7,style:{...sa,textAlign:"center",color:"var(--text-muted)"},children:"No campaigns yet"})})]})]})})})}function nF(){return N.jsxs("div",{style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-4)"},children:[N.jsx("h3",{style:{fontFamily:"var(--font-display)",fontSize:"0.9rem",color:"var(--text-primary)",marginBottom:"var(--sp-3)"},children:"Amazon SES Configuration"}),N.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)",lineHeight:1.8},children:[N.jsx("p",{children:"Configure these environment variables on the server:"}),N.jsxs("div",{style:{background:"var(--surface-2)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-sm)",padding:"var(--sp-3)",marginTop:"var(--sp-2)"},children:[N.jsx("code",{children:"AWS_ACCESS_KEY_ID=..."}),N.jsx("br",{}),N.jsx("code",{children:"AWS_SECRET_ACCESS_KEY=..."}),N.jsx("br",{}),N.jsx("code",{children:"AWS_REGION=us-east-1"}),N.jsx("br",{}),N.jsx("code",{children:"SES_FROM_EMAIL=noreply@yourdomain.com"}),N.jsx("br",{}),N.jsx("code",{children:"SES_RATE_LIMIT=14"}),N.jsx("br",{}),N.jsx("code",{children:"SERVER_URL=https://yourdomain.com"})]})]})]})}function fv({label:t,value:e}){return N.jsxs("div",{style:{flex:1,background:"var(--surface-1)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-3)"},children:[N.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:t}),N.jsx("div",{style:{fontFamily:"var(--font-display)",fontSize:"1.4rem",fontWeight:700,color:"var(--accent)"},children:e})]})}function PR({status:t}){const n={active:{bg:"rgba(0, 230, 138, 0.1)",text:"var(--status-active)"},unsubscribed:{bg:"rgba(255, 100, 100, 0.1)",text:"var(--status-error)"},draft:{bg:"rgba(150, 150, 150, 0.1)",text:"var(--text-muted)"},queued:{bg:"rgba(0, 200, 255, 0.1)",text:"var(--accent)"},sending:{bg:"rgba(255, 180, 0, 0.1)",text:"var(--status-warning)"},sent:{bg:"rgba(0, 230, 138, 0.1)",text:"var(--status-active)"},paused:{bg:"rgba(255, 180, 0, 0.1)",text:"var(--status-warning)"},cancelled:{bg:"rgba(255, 100, 100, 0.1)",text:"var(--status-error)"}}[t]||{bg:"rgba(150, 150, 150, 0.1)",text:"var(--text-muted)"};return N.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:"var(--radius-xs)",background:n.bg,color:n.text,fontFamily:"var(--font-mono)",fontSize:"0.65rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em"},children:t})}const sa={padding:"10px 14px",fontSize:"0.82rem",color:"var(--text-secondary)"};function iF(){const[t,e]=P.useState("leads"),n=[{key:"leads",label:"Leads"},{key:"campaigns",label:"Campaigns"},{key:"settings",label:"Settings"}];return N.jsxs("div",{style:{padding:"var(--sp-4)",maxWidth:1100,margin:"0 auto"},children:[N.jsxs("div",{style:{marginBottom:"var(--sp-4)"},children:[N.jsx("h2",{style:{fontFamily:"var(--font-display)",fontSize:"1.1rem",fontWeight:700,color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:"Email Engine"}),N.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:"Lead management, campaigns, and Amazon SES integration"})]}),N.jsx("div",{style:{display:"flex",gap:"var(--sp-1)",marginBottom:"var(--sp-4)",borderBottom:"1px solid var(--border-subtle)",paddingBottom:"var(--sp-1)"},children:n.map(i=>N.jsx("button",{onClick:()=>e(i.key),style:{padding:"8px 16px",background:t===i.key?"var(--accent-glow)":"transparent",border:t===i.key?"1px solid rgba(0, 200, 255, 0.15)":"1px solid transparent",borderRadius:"var(--radius-sm)",color:t===i.key?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontFamily:"var(--font-display)",fontSize:"0.82rem",fontWeight:t===i.key?600:400,transition:"all var(--duration-fast) var(--ease-out)"},children:i.label},i.key))}),t==="leads"&&N.jsx(eF,{}),t==="campaigns"&&N.jsx(tF,{}),t==="settings"&&N.jsx(nF,{})]})}function Oi(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,i;n<t.length;n++)(i=Oi(t[n]))!==""&&(e+=(e&&" ")+i);else for(let n in t)t[n]&&(e+=(e&&" ")+n);return e}var rF={value:()=>{}};function rb(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new f0(n)}function f0(t){this._=t}function aF(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}f0.prototype=rb.prototype={constructor:f0,on:function(t,e){var n=this._,i=aF(t+"",n),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=sF(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<l;)if(r=(t=i[s]).type)n[r]=W2(n[r],t.name,e);else if(e==null)for(r in n)n[r]=W2(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new f0(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function sF(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function W2(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=rF,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var m_="http://www.w3.org/1999/xhtml";const $2={svg:"http://www.w3.org/2000/svg",xhtml:m_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ab(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$2.hasOwnProperty(e)?{space:$2[e],local:t}:t}function lF(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===m_&&e.documentElement.namespaceURI===m_?e.createElement(t):e.createElementNS(n,t)}}function oF(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function GR(t){var e=ab(t);return(e.local?oF:lF)(e)}function cF(){}function S1(t){return t==null?cF:function(){return this.querySelector(t)}}function uF(t){typeof t!="function"&&(t=S1(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],l=s.length,c=i[r]=new Array(l),d,p,m=0;m<l;++m)(d=s[m])&&(p=t.call(d,d.__data__,m,s))&&("__data__"in d&&(p.__data__=d.__data__),c[m]=p);return new ns(i,this._parents)}function fF(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function dF(){return[]}function FR(t){return t==null?dF:function(){return this.querySelectorAll(t)}}function hF(t){return function(){return fF(t.apply(this,arguments))}}function pF(t){typeof t=="function"?t=hF(t):t=FR(t);for(var e=this._groups,n=e.length,i=[],r=[],s=0;s<n;++s)for(var l=e[s],c=l.length,d,p=0;p<c;++p)(d=l[p])&&(i.push(t.call(d,d.__data__,p,l)),r.push(d));return new ns(i,r)}function qR(t){return function(){return this.matches(t)}}function YR(t){return function(e){return e.matches(t)}}var mF=Array.prototype.find;function gF(t){return function(){return mF.call(this.children,t)}}function yF(){return this.firstElementChild}function bF(t){return this.select(t==null?yF:gF(typeof t=="function"?t:YR(t)))}var xF=Array.prototype.filter;function vF(){return Array.from(this.children)}function _F(t){return function(){return xF.call(this.children,t)}}function SF(t){return this.selectAll(t==null?vF:_F(typeof t=="function"?t:YR(t)))}function EF(t){typeof t!="function"&&(t=qR(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],l=s.length,c=i[r]=[],d,p=0;p<l;++p)(d=s[p])&&t.call(d,d.__data__,p,s)&&c.push(d);return new ns(i,this._parents)}function VR(t){return new Array(t.length)}function wF(){return new ns(this._enter||this._groups.map(VR),this._parents)}function k0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}k0.prototype={constructor:k0,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function TF(t){return function(){return t}}function CF(t,e,n,i,r,s){for(var l=0,c,d=e.length,p=s.length;l<p;++l)(c=e[l])?(c.__data__=s[l],i[l]=c):n[l]=new k0(t,s[l]);for(;l<d;++l)(c=e[l])&&(r[l]=c)}function AF(t,e,n,i,r,s,l){var c,d,p=new Map,m=e.length,g=s.length,b=new Array(m),v;for(c=0;c<m;++c)(d=e[c])&&(b[c]=v=l.call(d,d.__data__,c,e)+"",p.has(v)?r[c]=d:p.set(v,d));for(c=0;c<g;++c)v=l.call(t,s[c],c,s)+"",(d=p.get(v))?(i[c]=d,d.__data__=s[c],p.delete(v)):n[c]=new k0(t,s[c]);for(c=0;c<m;++c)(d=e[c])&&p.get(b[c])===d&&(r[c]=d)}function MF(t){return t.__data__}function RF(t,e){if(!arguments.length)return Array.from(this,MF);var n=e?AF:CF,i=this._parents,r=this._groups;typeof t!="function"&&(t=TF(t));for(var s=r.length,l=new Array(s),c=new Array(s),d=new Array(s),p=0;p<s;++p){var m=i[p],g=r[p],b=g.length,v=NF(t.call(m,m&&m.__data__,p,i)),S=v.length,C=c[p]=new Array(S),T=l[p]=new Array(S),w=d[p]=new Array(b);n(m,g,C,T,w,v,e);for(var k=0,M=0,O,H;k<S;++k)if(O=C[k]){for(k>=M&&(M=k+1);!(H=T[M])&&++M<S;);O._next=H||null}}return l=new ns(l,i),l._enter=c,l._exit=d,l}function NF(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kF(){return new ns(this._exit||this._groups.map(VR),this._parents)}function OF(t,e,n){var i=this.enter(),r=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function DF(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,s=i.length,l=Math.min(r,s),c=new Array(r),d=0;d<l;++d)for(var p=n[d],m=i[d],g=p.length,b=c[d]=new Array(g),v,S=0;S<g;++S)(v=p[S]||m[S])&&(b[S]=v);for(;d<r;++d)c[d]=n[d];return new ns(c,this._parents)}function zF(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,s=i[r],l;--r>=0;)(l=i[r])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function BF(t){t||(t=LF);function e(g,b){return g&&b?t(g.__data__,b.__data__):!g-!b}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var l=n[s],c=l.length,d=r[s]=new Array(c),p,m=0;m<c;++m)(p=l[m])&&(d[m]=p);d.sort(e)}return new ns(r,this._parents).order()}function LF(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function UF(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function IF(){return Array.from(this)}function HF(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length;r<s;++r){var l=i[r];if(l)return l}return null}function jF(){let t=0;for(const e of this)++t;return t}function PF(){return!this.node()}function GF(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],s=0,l=r.length,c;s<l;++s)(c=r[s])&&t.call(c,c.__data__,s,r);return this}function FF(t){return function(){this.removeAttribute(t)}}function qF(t){return function(){this.removeAttributeNS(t.space,t.local)}}function YF(t,e){return function(){this.setAttribute(t,e)}}function VF(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function XF(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function KF(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function WF(t,e){var n=ab(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?qF:FF:typeof e=="function"?n.local?KF:XF:n.local?VF:YF)(n,e))}function XR(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $F(t){return function(){this.style.removeProperty(t)}}function ZF(t,e,n){return function(){this.style.setProperty(t,e,n)}}function QF(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function JF(t,e,n){return arguments.length>1?this.each((e==null?$F:typeof e=="function"?QF:ZF)(t,e,n??"")):lh(this.node(),t)}function lh(t,e){return t.style.getPropertyValue(e)||XR(t).getComputedStyle(t,null).getPropertyValue(e)}function eq(t){return function(){delete this[t]}}function tq(t,e){return function(){this[t]=e}}function nq(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function iq(t,e){return arguments.length>1?this.each((e==null?eq:typeof e=="function"?nq:tq)(t,e)):this.node()[t]}function KR(t){return t.trim().split(/^|\s+/)}function E1(t){return t.classList||new WR(t)}function WR(t){this._node=t,this._names=KR(t.getAttribute("class")||"")}WR.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function $R(t,e){for(var n=E1(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ZR(t,e){for(var n=E1(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function rq(t){return function(){$R(this,t)}}function aq(t){return function(){ZR(this,t)}}function sq(t,e){return function(){(e.apply(this,arguments)?$R:ZR)(this,t)}}function lq(t,e){var n=KR(t+"");if(arguments.length<2){for(var i=E1(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?sq:e?rq:aq)(n,e))}function oq(){this.textContent=""}function cq(t){return function(){this.textContent=t}}function uq(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function fq(t){return arguments.length?this.each(t==null?oq:(typeof t=="function"?uq:cq)(t)):this.node().textContent}function dq(){this.innerHTML=""}function hq(t){return function(){this.innerHTML=t}}function pq(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function mq(t){return arguments.length?this.each(t==null?dq:(typeof t=="function"?pq:hq)(t)):this.node().innerHTML}function gq(){this.nextSibling&&this.parentNode.appendChild(this)}function yq(){return this.each(gq)}function bq(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xq(){return this.each(bq)}function vq(t){var e=typeof t=="function"?t:GR(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function _q(){return null}function Sq(t,e){var n=typeof t=="function"?t:GR(t),i=e==null?_q:typeof e=="function"?e:S1(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Eq(){var t=this.parentNode;t&&t.removeChild(this)}function wq(){return this.each(Eq)}function Tq(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Cq(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Aq(t){return this.select(t?Cq:Tq)}function Mq(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Rq(t){return function(e){t.call(this,e,this.__data__)}}function Nq(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function kq(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,s;n<r;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function Oq(t,e,n){return function(){var i=this.__on,r,s=Rq(e);if(i){for(var l=0,c=i.length;l<c;++l)if((r=i[l]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=e;return}}this.addEventListener(t.type,s,n),r={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(r):this.__on=[r]}}function Dq(t,e,n){var i=Nq(t+""),r,s=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var d=0,p=c.length,m;d<p;++d)for(r=0,m=c[d];r<s;++r)if((l=i[r]).type===m.type&&l.name===m.name)return m.value}return}for(c=e?Oq:kq,r=0;r<s;++r)this.each(c(i[r],e,n));return this}function QR(t,e,n){var i=XR(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function zq(t,e){return function(){return QR(this,t,e)}}function Bq(t,e){return function(){return QR(this,t,e.apply(this,arguments))}}function Lq(t,e){return this.each((typeof e=="function"?Bq:zq)(t,e))}function*Uq(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length,l;r<s;++r)(l=i[r])&&(yield l)}var JR=[null];function ns(t,e){this._groups=t,this._parents=e}function $m(){return new ns([[document.documentElement]],JR)}function Iq(){return this}ns.prototype=$m.prototype={constructor:ns,select:uF,selectAll:pF,selectChild:bF,selectChildren:SF,filter:EF,data:RF,enter:wF,exit:kF,join:OF,merge:DF,selection:Iq,order:zF,sort:BF,call:UF,nodes:IF,node:HF,size:jF,empty:PF,each:GF,attr:WF,style:JF,property:iq,classed:lq,text:fq,html:mq,raise:yq,lower:xq,append:vq,insert:Sq,remove:wq,clone:Aq,datum:Mq,on:Dq,dispatch:Lq,[Symbol.iterator]:Uq};function Ja(t){return typeof t=="string"?new ns([[document.querySelector(t)]],[document.documentElement]):new ns([[t]],JR)}function Hq(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ul(t,e){if(t=Hq(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const jq={passive:!1},Om={capture:!0,passive:!1};function dv(t){t.stopImmediatePropagation()}function Zd(t){t.preventDefault(),t.stopImmediatePropagation()}function eN(t){var e=t.document.documentElement,n=Ja(t).on("dragstart.drag",Zd,Om);"onselectstart"in e?n.on("selectstart.drag",Zd,Om):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function tN(t,e){var n=t.document.documentElement,i=Ja(t).on("dragstart.drag",null);e&&(i.on("click.drag",Zd,Om),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const $y=t=>()=>t;function g_(t,{sourceEvent:e,subject:n,target:i,identifier:r,active:s,x:l,y:c,dx:d,dy:p,dispatch:m}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:m}})}g_.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Pq(t){return!t.ctrlKey&&!t.button}function Gq(){return this.parentNode}function Fq(t,e){return e??{x:t.x,y:t.y}}function qq(){return navigator.maxTouchPoints||"ontouchstart"in this}function nN(){var t=Pq,e=Gq,n=Fq,i=qq,r={},s=rb("start","drag","end"),l=0,c,d,p,m,g=0;function b(O){O.on("mousedown.drag",v).filter(i).on("touchstart.drag",T).on("touchmove.drag",w,jq).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(O,H){if(!(m||!t.call(this,O,H))){var z=M(this,e.call(this,O,H),O,H,"mouse");z&&(Ja(O.view).on("mousemove.drag",S,Om).on("mouseup.drag",C,Om),eN(O.view),dv(O),p=!1,c=O.clientX,d=O.clientY,z("start",O))}}function S(O){if(Zd(O),!p){var H=O.clientX-c,z=O.clientY-d;p=H*H+z*z>g}r.mouse("drag",O)}function C(O){Ja(O.view).on("mousemove.drag mouseup.drag",null),tN(O.view,p),Zd(O),r.mouse("end",O)}function T(O,H){if(t.call(this,O,H)){var z=O.changedTouches,F=e.call(this,O,H),$=z.length,j,I;for(j=0;j<$;++j)(I=M(this,F,O,H,z[j].identifier,z[j]))&&(dv(O),I("start",O,z[j]))}}function w(O){var H=O.changedTouches,z=H.length,F,$;for(F=0;F<z;++F)($=r[H[F].identifier])&&(Zd(O),$("drag",O,H[F]))}function k(O){var H=O.changedTouches,z=H.length,F,$;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),F=0;F<z;++F)($=r[H[F].identifier])&&(dv(O),$("end",O,H[F]))}function M(O,H,z,F,$,j){var I=s.copy(),Y=ul(j||z,H),X,ne,q;if((q=n.call(O,new g_("beforestart",{sourceEvent:z,target:b,identifier:$,active:l,x:Y[0],y:Y[1],dx:0,dy:0,dispatch:I}),F))!=null)return X=q.x-Y[0]||0,ne=q.y-Y[1]||0,function J(B,V,Z){var Q=Y,G;switch(B){case"start":r[$]=J,G=l++;break;case"end":delete r[$],--l;case"drag":Y=ul(Z||V,H),G=l;break}I.call(B,O,new g_(B,{sourceEvent:V,subject:q,target:b,identifier:$,active:G,x:Y[0]+X,y:Y[1]+ne,dx:Y[0]-Q[0],dy:Y[1]-Q[1],dispatch:I}),F)}}return b.filter=function(O){return arguments.length?(t=typeof O=="function"?O:$y(!!O),b):t},b.container=function(O){return arguments.length?(e=typeof O=="function"?O:$y(O),b):e},b.subject=function(O){return arguments.length?(n=typeof O=="function"?O:$y(O),b):n},b.touchable=function(O){return arguments.length?(i=typeof O=="function"?O:$y(!!O),b):i},b.on=function(){var O=s.on.apply(s,arguments);return O===s?b:O},b.clickDistance=function(O){return arguments.length?(g=(O=+O)*O,b):Math.sqrt(g)},b}function w1(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function iN(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Zm(){}var Dm=.7,O0=1/Dm,Qd="\\s*([+-]?\\d+)\\s*",zm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yq=/^#([0-9a-f]{3,8})$/,Vq=new RegExp(`^rgb\\(${Qd},${Qd},${Qd}\\)$`),Xq=new RegExp(`^rgb\\(${uo},${uo},${uo}\\)$`),Kq=new RegExp(`^rgba\\(${Qd},${Qd},${Qd},${zm}\\)$`),Wq=new RegExp(`^rgba\\(${uo},${uo},${uo},${zm}\\)$`),$q=new RegExp(`^hsl\\(${zm},${uo},${uo}\\)$`),Zq=new RegExp(`^hsla\\(${zm},${uo},${uo},${zm}\\)$`),Z2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};w1(Zm,bf,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Q2,formatHex:Q2,formatHex8:Qq,formatHsl:Jq,formatRgb:J2,toString:J2});function Q2(){return this.rgb().formatHex()}function Qq(){return this.rgb().formatHex8()}function Jq(){return rN(this).formatHsl()}function J2(){return this.rgb().formatRgb()}function bf(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yq.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?eT(e):n===3?new Ma(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Zy(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Zy(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Vq.exec(t))?new Ma(e[1],e[2],e[3],1):(e=Xq.exec(t))?new Ma(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Kq.exec(t))?Zy(e[1],e[2],e[3],e[4]):(e=Wq.exec(t))?Zy(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$q.exec(t))?iT(e[1],e[2]/100,e[3]/100,1):(e=Zq.exec(t))?iT(e[1],e[2]/100,e[3]/100,e[4]):Z2.hasOwnProperty(t)?eT(Z2[t]):t==="transparent"?new Ma(NaN,NaN,NaN,0):null}function eT(t){return new Ma(t>>16&255,t>>8&255,t&255,1)}function Zy(t,e,n,i){return i<=0&&(t=e=n=NaN),new Ma(t,e,n,i)}function eY(t){return t instanceof Zm||(t=bf(t)),t?(t=t.rgb(),new Ma(t.r,t.g,t.b,t.opacity)):new Ma}function y_(t,e,n,i){return arguments.length===1?eY(t):new Ma(t,e,n,i??1)}function Ma(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}w1(Ma,y_,iN(Zm,{brighter(t){return t=t==null?O0:Math.pow(O0,t),new Ma(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Dm:Math.pow(Dm,t),new Ma(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ma(hf(this.r),hf(this.g),hf(this.b),D0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tT,formatHex:tT,formatHex8:tY,formatRgb:nT,toString:nT}));function tT(){return`#${df(this.r)}${df(this.g)}${df(this.b)}`}function tY(){return`#${df(this.r)}${df(this.g)}${df(this.b)}${df((isNaN(this.opacity)?1:this.opacity)*255)}`}function nT(){const t=D0(this.opacity);return`${t===1?"rgb(":"rgba("}${hf(this.r)}, ${hf(this.g)}, ${hf(this.b)}${t===1?")":`, ${t})`}`}function D0(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function hf(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function df(t){return t=hf(t),(t<16?"0":"")+t.toString(16)}function iT(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hl(t,e,n,i)}function rN(t){if(t instanceof hl)return new hl(t.h,t.s,t.l,t.opacity);if(t instanceof Zm||(t=bf(t)),!t)return new hl;if(t instanceof hl)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),l=NaN,c=s-r,d=(s+r)/2;return c?(e===s?l=(n-i)/c+(n<i)*6:n===s?l=(i-e)/c+2:l=(e-n)/c+4,c/=d<.5?s+r:2-s-r,l*=60):c=d>0&&d<1?0:l,new hl(l,c,d,t.opacity)}function nY(t,e,n,i){return arguments.length===1?rN(t):new hl(t,e,n,i??1)}function hl(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}w1(hl,nY,iN(Zm,{brighter(t){return t=t==null?O0:Math.pow(O0,t),new hl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Dm:Math.pow(Dm,t),new hl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Ma(hv(t>=240?t-240:t+120,r,i),hv(t,r,i),hv(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new hl(rT(this.h),Qy(this.s),Qy(this.l),D0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=D0(this.opacity);return`${t===1?"hsl(":"hsla("}${rT(this.h)}, ${Qy(this.s)*100}%, ${Qy(this.l)*100}%${t===1?")":`, ${t})`}`}}));function rT(t){return t=(t||0)%360,t<0?t+360:t}function Qy(t){return Math.max(0,Math.min(1,t||0))}function hv(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const T1=t=>()=>t;function iY(t,e){return function(n){return t+n*e}}function rY(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function aY(t){return(t=+t)==1?aN:function(e,n){return n-e?rY(e,n,t):T1(isNaN(e)?n:e)}}function aN(t,e){var n=e-t;return n?iY(t,n):T1(isNaN(t)?e:t)}const z0=(function t(e){var n=aY(e);function i(r,s){var l=n((r=y_(r)).r,(s=y_(s)).r),c=n(r.g,s.g),d=n(r.b,s.b),p=aN(r.opacity,s.opacity);return function(m){return r.r=l(m),r.g=c(m),r.b=d(m),r.opacity=p(m),r+""}}return i.gamma=t,i})(1);function sY(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=t[r]*(1-s)+e[r]*s;return i}}function lY(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function oY(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),s=new Array(n),l;for(l=0;l<i;++l)r[l]=_m(t[l],e[l]);for(;l<n;++l)s[l]=e[l];return function(c){for(l=0;l<i;++l)s[l]=r[l](c);return s}}function cY(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function oo(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function uY(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=_m(t[r],e[r]):i[r]=e[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var b_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pv=new RegExp(b_.source,"g");function fY(t){return function(){return t}}function dY(t){return function(e){return t(e)+""}}function sN(t,e){var n=b_.lastIndex=pv.lastIndex=0,i,r,s,l=-1,c=[],d=[];for(t=t+"",e=e+"";(i=b_.exec(t))&&(r=pv.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),c[l]?c[l]+=s:c[++l]=s),(i=i[0])===(r=r[0])?c[l]?c[l]+=r:c[++l]=r:(c[++l]=null,d.push({i:l,x:oo(i,r)})),n=pv.lastIndex;return n<e.length&&(s=e.slice(n),c[l]?c[l]+=s:c[++l]=s),c.length<2?d[0]?dY(d[0].x):fY(e):(e=d.length,function(p){for(var m=0,g;m<e;++m)c[(g=d[m]).i]=g.x(p);return c.join("")})}function _m(t,e){var n=typeof e,i;return e==null||n==="boolean"?T1(e):(n==="number"?oo:n==="string"?(i=bf(e))?(e=i,z0):sN:e instanceof bf?z0:e instanceof Date?cY:lY(e)?sY:Array.isArray(e)?oY:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?uY:oo)(t,e)}var aT=180/Math.PI,x_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lN(t,e,n,i,r,s){var l,c,d;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(d=t*n+e*i)&&(n-=t*d,i-=e*d),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,d/=c),t*i<e*n&&(t=-t,e=-e,d=-d,l=-l),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*aT,skewX:Math.atan(d)*aT,scaleX:l,scaleY:c}}var Jy;function hY(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x_:lN(e.a,e.b,e.c,e.d,e.e,e.f)}function pY(t){return t==null||(Jy||(Jy=document.createElementNS("http://www.w3.org/2000/svg","g")),Jy.setAttribute("transform",t),!(t=Jy.transform.baseVal.consolidate()))?x_:(t=t.matrix,lN(t.a,t.b,t.c,t.d,t.e,t.f))}function oN(t,e,n,i){function r(p){return p.length?p.pop()+" ":""}function s(p,m,g,b,v,S){if(p!==g||m!==b){var C=v.push("translate(",null,e,null,n);S.push({i:C-4,x:oo(p,g)},{i:C-2,x:oo(m,b)})}else(g||b)&&v.push("translate("+g+e+b+n)}function l(p,m,g,b){p!==m?(p-m>180?m+=360:m-p>180&&(p+=360),b.push({i:g.push(r(g)+"rotate(",null,i)-2,x:oo(p,m)})):m&&g.push(r(g)+"rotate("+m+i)}function c(p,m,g,b){p!==m?b.push({i:g.push(r(g)+"skewX(",null,i)-2,x:oo(p,m)}):m&&g.push(r(g)+"skewX("+m+i)}function d(p,m,g,b,v,S){if(p!==g||m!==b){var C=v.push(r(v)+"scale(",null,",",null,")");S.push({i:C-4,x:oo(p,g)},{i:C-2,x:oo(m,b)})}else(g!==1||b!==1)&&v.push(r(v)+"scale("+g+","+b+")")}return function(p,m){var g=[],b=[];return p=t(p),m=t(m),s(p.translateX,p.translateY,m.translateX,m.translateY,g,b),l(p.rotate,m.rotate,g,b),c(p.skewX,m.skewX,g,b),d(p.scaleX,p.scaleY,m.scaleX,m.scaleY,g,b),p=m=null,function(v){for(var S=-1,C=b.length,T;++S<C;)g[(T=b[S]).i]=T.x(v);return g.join("")}}}var mY=oN(hY,"px, ","px)","deg)"),gY=oN(pY,", ",")",")"),yY=1e-12;function sT(t){return((t=Math.exp(t))+1/t)/2}function bY(t){return((t=Math.exp(t))-1/t)/2}function xY(t){return((t=Math.exp(2*t))-1)/(t+1)}const d0=(function t(e,n,i){function r(s,l){var c=s[0],d=s[1],p=s[2],m=l[0],g=l[1],b=l[2],v=m-c,S=g-d,C=v*v+S*S,T,w;if(C<yY)w=Math.log(b/p)/e,T=function(F){return[c+F*v,d+F*S,p*Math.exp(e*F*w)]};else{var k=Math.sqrt(C),M=(b*b-p*p+i*C)/(2*p*n*k),O=(b*b-p*p-i*C)/(2*b*n*k),H=Math.log(Math.sqrt(M*M+1)-M),z=Math.log(Math.sqrt(O*O+1)-O);w=(z-H)/e,T=function(F){var $=F*w,j=sT(H),I=p/(n*k)*(j*xY(e*$+H)-bY(H));return[c+I*v,d+I*S,p*j/sT(e*$+H)]}}return T.duration=w*1e3*e/Math.SQRT2,T}return r.rho=function(s){var l=Math.max(.001,+s),c=l*l,d=c*c;return t(l,c,d)},r})(Math.SQRT2,2,4);var oh=0,um=0,rm=0,cN=1e3,B0,fm,L0=0,xf=0,sb=0,Bm=typeof performance=="object"&&performance.now?performance:Date,uN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function C1(){return xf||(uN(vY),xf=Bm.now()+sb)}function vY(){xf=0}function U0(){this._call=this._time=this._next=null}U0.prototype=fN.prototype={constructor:U0,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?C1():+n)+(e==null?0:+e),!this._next&&fm!==this&&(fm?fm._next=this:B0=this,fm=this),this._call=t,this._time=n,v_()},stop:function(){this._call&&(this._call=null,this._time=1/0,v_())}};function fN(t,e,n){var i=new U0;return i.restart(t,e,n),i}function _Y(){C1(),++oh;for(var t=B0,e;t;)(e=xf-t._time)>=0&&t._call.call(void 0,e),t=t._next;--oh}function lT(){xf=(L0=Bm.now())+sb,oh=um=0;try{_Y()}finally{oh=0,EY(),xf=0}}function SY(){var t=Bm.now(),e=t-L0;e>cN&&(sb-=e,L0=t)}function EY(){for(var t,e=B0,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:B0=n);fm=t,v_(i)}function v_(t){if(!oh){um&&(um=clearTimeout(um));var e=t-xf;e>24?(t<1/0&&(um=setTimeout(lT,t-Bm.now()-sb)),rm&&(rm=clearInterval(rm))):(rm||(L0=Bm.now(),rm=setInterval(SY,cN)),oh=1,uN(lT))}}function oT(t,e,n){var i=new U0;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var wY=rb("start","end","cancel","interrupt"),TY=[],dN=0,cT=1,__=2,h0=3,uT=4,S_=5,p0=6;function lb(t,e,n,i,r,s){var l=t.__transition;if(!l)t.__transition={};else if(n in l)return;CY(t,n,{name:e,index:i,group:r,on:wY,tween:TY,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:dN})}function A1(t,e){var n=vl(t,e);if(n.state>dN)throw new Error("too late; already scheduled");return n}function mo(t,e){var n=vl(t,e);if(n.state>h0)throw new Error("too late; already running");return n}function vl(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function CY(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=fN(s,0,n.time);function s(p){n.state=cT,n.timer.restart(l,n.delay,n.time),n.delay<=p&&l(p-n.delay)}function l(p){var m,g,b,v;if(n.state!==cT)return d();for(m in i)if(v=i[m],v.name===n.name){if(v.state===h0)return oT(l);v.state===uT?(v.state=p0,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete i[m]):+m<e&&(v.state=p0,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete i[m])}if(oT(function(){n.state===h0&&(n.state=uT,n.timer.restart(c,n.delay,n.time),c(p))}),n.state=__,n.on.call("start",t,t.__data__,n.index,n.group),n.state===__){for(n.state=h0,r=new Array(b=n.tween.length),m=0,g=-1;m<b;++m)(v=n.tween[m].value.call(t,t.__data__,n.index,n.group))&&(r[++g]=v);r.length=g+1}}function c(p){for(var m=p<n.duration?n.ease.call(null,p/n.duration):(n.timer.restart(d),n.state=S_,1),g=-1,b=r.length;++g<b;)r[g].call(t,m);n.state===S_&&(n.on.call("end",t,t.__data__,n.index,n.group),d())}function d(){n.state=p0,n.timer.stop(),delete i[e];for(var p in i)return;delete t.__transition}}function m0(t,e){var n=t.__transition,i,r,s=!0,l;if(n){e=e==null?null:e+"";for(l in n){if((i=n[l]).name!==e){s=!1;continue}r=i.state>__&&i.state<S_,i.state=p0,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[l]}s&&delete t.__transition}}function AY(t){return this.each(function(){m0(this,t)})}function MY(t,e){var n,i;return function(){var r=mo(this,t),s=r.tween;if(s!==n){i=n=s;for(var l=0,c=i.length;l<c;++l)if(i[l].name===e){i=i.slice(),i.splice(l,1);break}}r.tween=i}}function RY(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=mo(this,t),l=s.tween;if(l!==i){r=(i=l).slice();for(var c={name:e,value:n},d=0,p=r.length;d<p;++d)if(r[d].name===e){r[d]=c;break}d===p&&r.push(c)}s.tween=r}}function NY(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=vl(this.node(),n).tween,r=0,s=i.length,l;r<s;++r)if((l=i[r]).name===t)return l.value;return null}return this.each((e==null?MY:RY)(n,t,e))}function M1(t,e,n){var i=t._id;return t.each(function(){var r=mo(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return vl(r,i).value[e]}}function hN(t,e){var n;return(typeof e=="number"?oo:e instanceof bf?z0:(n=bf(e))?(e=n,z0):sN)(t,e)}function kY(t){return function(){this.removeAttribute(t)}}function OY(t){return function(){this.removeAttributeNS(t.space,t.local)}}function DY(t,e,n){var i,r=n+"",s;return function(){var l=this.getAttribute(t);return l===r?null:l===i?s:s=e(i=l,n)}}function zY(t,e,n){var i,r=n+"",s;return function(){var l=this.getAttributeNS(t.space,t.local);return l===r?null:l===i?s:s=e(i=l,n)}}function BY(t,e,n){var i,r,s;return function(){var l,c=n(this),d;return c==null?void this.removeAttribute(t):(l=this.getAttribute(t),d=c+"",l===d?null:l===i&&d===r?s:(r=d,s=e(i=l,c)))}}function LY(t,e,n){var i,r,s;return function(){var l,c=n(this),d;return c==null?void this.removeAttributeNS(t.space,t.local):(l=this.getAttributeNS(t.space,t.local),d=c+"",l===d?null:l===i&&d===r?s:(r=d,s=e(i=l,c)))}}function UY(t,e){var n=ab(t),i=n==="transform"?gY:hN;return this.attrTween(t,typeof e=="function"?(n.local?LY:BY)(n,i,M1(this,"attr."+t,e)):e==null?(n.local?OY:kY)(n):(n.local?zY:DY)(n,i,e))}function IY(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function HY(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function jY(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&HY(t,s)),n}return r._value=e,r}function PY(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&IY(t,s)),n}return r._value=e,r}function GY(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=ab(t);return this.tween(n,(i.local?jY:PY)(i,e))}function FY(t,e){return function(){A1(this,t).delay=+e.apply(this,arguments)}}function qY(t,e){return e=+e,function(){A1(this,t).delay=e}}function YY(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?FY:qY)(e,t)):vl(this.node(),e).delay}function VY(t,e){return function(){mo(this,t).duration=+e.apply(this,arguments)}}function XY(t,e){return e=+e,function(){mo(this,t).duration=e}}function KY(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?VY:XY)(e,t)):vl(this.node(),e).duration}function WY(t,e){if(typeof e!="function")throw new Error;return function(){mo(this,t).ease=e}}function $Y(t){var e=this._id;return arguments.length?this.each(WY(e,t)):vl(this.node(),e).ease}function ZY(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;mo(this,t).ease=n}}function QY(t){if(typeof t!="function")throw new Error;return this.each(ZY(this._id,t))}function JY(t){typeof t!="function"&&(t=qR(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],l=s.length,c=i[r]=[],d,p=0;p<l;++p)(d=s[p])&&t.call(d,d.__data__,p,s)&&c.push(d);return new rc(i,this._parents,this._name,this._id)}function eV(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),l=new Array(i),c=0;c<s;++c)for(var d=e[c],p=n[c],m=d.length,g=l[c]=new Array(m),b,v=0;v<m;++v)(b=d[v]||p[v])&&(g[v]=b);for(;c<i;++c)l[c]=e[c];return new rc(l,this._parents,this._name,this._id)}function tV(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function nV(t,e,n){var i,r,s=tV(e)?A1:mo;return function(){var l=s(this,t),c=l.on;c!==i&&(r=(i=c).copy()).on(e,n),l.on=r}}function iV(t,e){var n=this._id;return arguments.length<2?vl(this.node(),n).on.on(t):this.each(nV(n,t,e))}function rV(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function aV(){return this.on("end.remove",rV(this._id))}function sV(t){var e=this._name,n=this._id;typeof t!="function"&&(t=S1(t));for(var i=this._groups,r=i.length,s=new Array(r),l=0;l<r;++l)for(var c=i[l],d=c.length,p=s[l]=new Array(d),m,g,b=0;b<d;++b)(m=c[b])&&(g=t.call(m,m.__data__,b,c))&&("__data__"in m&&(g.__data__=m.__data__),p[b]=g,lb(p[b],e,n,b,p,vl(m,n)));return new rc(s,this._parents,e,n)}function lV(t){var e=this._name,n=this._id;typeof t!="function"&&(t=FR(t));for(var i=this._groups,r=i.length,s=[],l=[],c=0;c<r;++c)for(var d=i[c],p=d.length,m,g=0;g<p;++g)if(m=d[g]){for(var b=t.call(m,m.__data__,g,d),v,S=vl(m,n),C=0,T=b.length;C<T;++C)(v=b[C])&&lb(v,e,n,C,b,S);s.push(b),l.push(m)}return new rc(s,l,e,n)}var oV=$m.prototype.constructor;function cV(){return new oV(this._groups,this._parents)}function uV(t,e){var n,i,r;return function(){var s=lh(this,t),l=(this.style.removeProperty(t),lh(this,t));return s===l?null:s===n&&l===i?r:r=e(n=s,i=l)}}function pN(t){return function(){this.style.removeProperty(t)}}function fV(t,e,n){var i,r=n+"",s;return function(){var l=lh(this,t);return l===r?null:l===i?s:s=e(i=l,n)}}function dV(t,e,n){var i,r,s;return function(){var l=lh(this,t),c=n(this),d=c+"";return c==null&&(d=c=(this.style.removeProperty(t),lh(this,t))),l===d?null:l===i&&d===r?s:(r=d,s=e(i=l,c))}}function hV(t,e){var n,i,r,s="style."+e,l="end."+s,c;return function(){var d=mo(this,t),p=d.on,m=d.value[s]==null?c||(c=pN(e)):void 0;(p!==n||r!==m)&&(i=(n=p).copy()).on(l,r=m),d.on=i}}function pV(t,e,n){var i=(t+="")=="transform"?mY:hN;return e==null?this.styleTween(t,uV(t,i)).on("end.style."+t,pN(t)):typeof e=="function"?this.styleTween(t,dV(t,i,M1(this,"style."+t,e))).each(hV(this._id,t)):this.styleTween(t,fV(t,i,e),n).on("end.style."+t,null)}function mV(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function gV(t,e,n){var i,r;function s(){var l=e.apply(this,arguments);return l!==r&&(i=(r=l)&&mV(t,l,n)),i}return s._value=e,s}function yV(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,gV(t,e,n??""))}function bV(t){return function(){this.textContent=t}}function xV(t){return function(){var e=t(this);this.textContent=e??""}}function vV(t){return this.tween("text",typeof t=="function"?xV(M1(this,"text",t)):bV(t==null?"":t+""))}function _V(t){return function(e){this.textContent=t.call(this,e)}}function SV(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_V(r)),e}return i._value=t,i}function EV(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,SV(t))}function wV(){for(var t=this._name,e=this._id,n=mN(),i=this._groups,r=i.length,s=0;s<r;++s)for(var l=i[s],c=l.length,d,p=0;p<c;++p)if(d=l[p]){var m=vl(d,e);lb(d,t,n,p,l,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new rc(i,this._parents,t,n)}function TV(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(s,l){var c={value:l},d={value:function(){--r===0&&s()}};n.each(function(){var p=mo(this,i),m=p.on;m!==t&&(e=(t=m).copy(),e._.cancel.push(c),e._.interrupt.push(c),e._.end.push(d)),p.on=e}),r===0&&s()})}var CV=0;function rc(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function mN(){return++CV}var Wo=$m.prototype;rc.prototype={constructor:rc,select:sV,selectAll:lV,selectChild:Wo.selectChild,selectChildren:Wo.selectChildren,filter:JY,merge:eV,selection:cV,transition:wV,call:Wo.call,nodes:Wo.nodes,node:Wo.node,size:Wo.size,empty:Wo.empty,each:Wo.each,on:iV,attr:UY,attrTween:GY,style:pV,styleTween:yV,text:vV,textTween:EV,remove:aV,tween:NY,delay:YY,duration:KY,ease:$Y,easeVarying:QY,end:TV,[Symbol.iterator]:Wo[Symbol.iterator]};function AV(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var MV={time:null,delay:0,duration:250,ease:AV};function RV(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function NV(t){var e,n;t instanceof rc?(e=t._id,t=t._name):(e=mN(),(n=MV).time=C1(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var l=i[s],c=l.length,d,p=0;p<c;++p)(d=l[p])&&lb(d,t,e,p,l,n||RV(d,e));return new rc(i,this._parents,t,e)}$m.prototype.interrupt=AY;$m.prototype.transition=NV;const e0=t=>()=>t;function kV(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Jo(t,e,n){this.k=t,this.x=e,this.y=n}Jo.prototype={constructor:Jo,scale:function(t){return t===1?this:new Jo(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Jo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ob=new Jo(1,0,0);gN.prototype=Jo.prototype;function gN(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ob;return t.__zoom}function mv(t){t.stopImmediatePropagation()}function am(t){t.preventDefault(),t.stopImmediatePropagation()}function OV(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function DV(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function fT(){return this.__zoom||ob}function zV(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function BV(){return navigator.maxTouchPoints||"ontouchstart"in this}function LV(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],l=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function yN(){var t=OV,e=DV,n=LV,i=zV,r=BV,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,d=d0,p=rb("start","zoom","end"),m,g,b,v=500,S=150,C=0,T=10;function w(q){q.property("__zoom",fT).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",I).filter(r).on("touchstart.zoom",Y).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",ne).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(q,J,B,V){var Z=q.selection?q.selection():q;Z.property("__zoom",fT),q!==Z?H(q,J,B,V):Z.interrupt().each(function(){z(this,arguments).event(V).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},w.scaleBy=function(q,J,B,V){w.scaleTo(q,function(){var Z=this.__zoom.k,Q=typeof J=="function"?J.apply(this,arguments):J;return Z*Q},B,V)},w.scaleTo=function(q,J,B,V){w.transform(q,function(){var Z=e.apply(this,arguments),Q=this.__zoom,G=B==null?O(Z):typeof B=="function"?B.apply(this,arguments):B,K=Q.invert(G),te=typeof J=="function"?J.apply(this,arguments):J;return n(M(k(Q,te),G,K),Z,l)},B,V)},w.translateBy=function(q,J,B,V){w.transform(q,function(){return n(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof B=="function"?B.apply(this,arguments):B),e.apply(this,arguments),l)},null,V)},w.translateTo=function(q,J,B,V,Z){w.transform(q,function(){var Q=e.apply(this,arguments),G=this.__zoom,K=V==null?O(Q):typeof V=="function"?V.apply(this,arguments):V;return n(ob.translate(K[0],K[1]).scale(G.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof B=="function"?-B.apply(this,arguments):-B),Q,l)},V,Z)};function k(q,J){return J=Math.max(s[0],Math.min(s[1],J)),J===q.k?q:new Jo(J,q.x,q.y)}function M(q,J,B){var V=J[0]-B[0]*q.k,Z=J[1]-B[1]*q.k;return V===q.x&&Z===q.y?q:new Jo(q.k,V,Z)}function O(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function H(q,J,B,V){q.on("start.zoom",function(){z(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(V).end()}).tween("zoom",function(){var Z=this,Q=arguments,G=z(Z,Q).event(V),K=e.apply(Z,Q),te=B==null?O(K):typeof B=="function"?B.apply(Z,Q):B,U=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),le=Z.__zoom,de=typeof J=="function"?J.apply(Z,Q):J,ge=d(le.invert(te).concat(U/le.k),de.invert(te).concat(U/de.k));return function(se){if(se===1)se=de;else{var pe=ge(se),Ae=U/pe[2];se=new Jo(Ae,te[0]-pe[0]*Ae,te[1]-pe[1]*Ae)}G.zoom(null,se)}})}function z(q,J,B){return!B&&q.__zooming||new F(q,J)}function F(q,J){this.that=q,this.args=J,this.active=0,this.sourceEvent=null,this.extent=e.apply(q,J),this.taps=0}F.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,J){return this.mouse&&q!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var J=Ja(this.that).datum();p.call(q,this.that,new kV(q,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:p}),J)}};function $(q,...J){if(!t.apply(this,arguments))return;var B=z(this,J).event(q),V=this.__zoom,Z=Math.max(s[0],Math.min(s[1],V.k*Math.pow(2,i.apply(this,arguments)))),Q=ul(q);if(B.wheel)(B.mouse[0][0]!==Q[0]||B.mouse[0][1]!==Q[1])&&(B.mouse[1]=V.invert(B.mouse[0]=Q)),clearTimeout(B.wheel);else{if(V.k===Z)return;B.mouse=[Q,V.invert(Q)],m0(this),B.start()}am(q),B.wheel=setTimeout(G,S),B.zoom("mouse",n(M(k(V,Z),B.mouse[0],B.mouse[1]),B.extent,l));function G(){B.wheel=null,B.end()}}function j(q,...J){if(b||!t.apply(this,arguments))return;var B=q.currentTarget,V=z(this,J,!0).event(q),Z=Ja(q.view).on("mousemove.zoom",te,!0).on("mouseup.zoom",U,!0),Q=ul(q,B),G=q.clientX,K=q.clientY;eN(q.view),mv(q),V.mouse=[Q,this.__zoom.invert(Q)],m0(this),V.start();function te(le){if(am(le),!V.moved){var de=le.clientX-G,ge=le.clientY-K;V.moved=de*de+ge*ge>C}V.event(le).zoom("mouse",n(M(V.that.__zoom,V.mouse[0]=ul(le,B),V.mouse[1]),V.extent,l))}function U(le){Z.on("mousemove.zoom mouseup.zoom",null),tN(le.view,V.moved),am(le),V.event(le).end()}}function I(q,...J){if(t.apply(this,arguments)){var B=this.__zoom,V=ul(q.changedTouches?q.changedTouches[0]:q,this),Z=B.invert(V),Q=B.k*(q.shiftKey?.5:2),G=n(M(k(B,Q),V,Z),e.apply(this,J),l);am(q),c>0?Ja(this).transition().duration(c).call(H,G,V,q):Ja(this).call(w.transform,G,V,q)}}function Y(q,...J){if(t.apply(this,arguments)){var B=q.touches,V=B.length,Z=z(this,J,q.changedTouches.length===V).event(q),Q,G,K,te;for(mv(q),G=0;G<V;++G)K=B[G],te=ul(K,this),te=[te,this.__zoom.invert(te),K.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==te[2]&&(Z.touch1=te,Z.taps=0):(Z.touch0=te,Q=!0,Z.taps=1+!!m);m&&(m=clearTimeout(m)),Q&&(Z.taps<2&&(g=te[0],m=setTimeout(function(){m=null},v)),m0(this),Z.start())}}function X(q,...J){if(this.__zooming){var B=z(this,J).event(q),V=q.changedTouches,Z=V.length,Q,G,K,te;for(am(q),Q=0;Q<Z;++Q)G=V[Q],K=ul(G,this),B.touch0&&B.touch0[2]===G.identifier?B.touch0[0]=K:B.touch1&&B.touch1[2]===G.identifier&&(B.touch1[0]=K);if(G=B.that.__zoom,B.touch1){var U=B.touch0[0],le=B.touch0[1],de=B.touch1[0],ge=B.touch1[1],se=(se=de[0]-U[0])*se+(se=de[1]-U[1])*se,pe=(pe=ge[0]-le[0])*pe+(pe=ge[1]-le[1])*pe;G=k(G,Math.sqrt(se/pe)),K=[(U[0]+de[0])/2,(U[1]+de[1])/2],te=[(le[0]+ge[0])/2,(le[1]+ge[1])/2]}else if(B.touch0)K=B.touch0[0],te=B.touch0[1];else return;B.zoom("touch",n(M(G,K,te),B.extent,l))}}function ne(q,...J){if(this.__zooming){var B=z(this,J).event(q),V=q.changedTouches,Z=V.length,Q,G;for(mv(q),b&&clearTimeout(b),b=setTimeout(function(){b=null},v),Q=0;Q<Z;++Q)G=V[Q],B.touch0&&B.touch0[2]===G.identifier?delete B.touch0:B.touch1&&B.touch1[2]===G.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(G=ul(G,this),Math.hypot(g[0]-G[0],g[1]-G[1])<T)){var K=Ja(this).on("dblclick.zoom");K&&K.apply(this,arguments)}}}return w.wheelDelta=function(q){return arguments.length?(i=typeof q=="function"?q:e0(+q),w):i},w.filter=function(q){return arguments.length?(t=typeof q=="function"?q:e0(!!q),w):t},w.touchable=function(q){return arguments.length?(r=typeof q=="function"?q:e0(!!q),w):r},w.extent=function(q){return arguments.length?(e=typeof q=="function"?q:e0([[+q[0][0],+q[0][1]],[+q[1][0],+q[1][1]]]),w):e},w.scaleExtent=function(q){return arguments.length?(s[0]=+q[0],s[1]=+q[1],w):[s[0],s[1]]},w.translateExtent=function(q){return arguments.length?(l[0][0]=+q[0][0],l[1][0]=+q[1][0],l[0][1]=+q[0][1],l[1][1]=+q[1][1],w):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},w.constrain=function(q){return arguments.length?(n=q,w):n},w.duration=function(q){return arguments.length?(c=+q,w):c},w.interpolate=function(q){return arguments.length?(d=q,w):d},w.on=function(){var q=p.on.apply(p,arguments);return q===p?w:q},w.clickDistance=function(q){return arguments.length?(C=(q=+q)*q,w):Math.sqrt(C)},w.tapDistance=function(q){return arguments.length?(T=+q,w):T},w}const fo={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${t} handle id: "${t==="source"?n:i}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Lm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],bN=["Enter"," ","Escape"],xN={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:e,y:n})=>`Moved selected node ${t}. New position, x: ${e}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ch;(function(t){t.Strict="strict",t.Loose="loose"})(ch||(ch={}));var pf;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(pf||(pf={}));var Um;(function(t){t.Partial="partial",t.Full="full"})(Um||(Um={}));const vN={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var nu;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(nu||(nu={}));var I0;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(I0||(I0={}));var Qe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(Qe||(Qe={}));const dT={[Qe.Left]:Qe.Right,[Qe.Right]:Qe.Left,[Qe.Top]:Qe.Bottom,[Qe.Bottom]:Qe.Top};function _N(t){return t===null?null:t?"valid":"invalid"}const SN=t=>"id"in t&&"source"in t&&"target"in t,UV=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),R1=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Qm=(t,e=[0,0])=>{const{width:n,height:i}=lc(t),r=t.origin??e,s=n*r[0],l=i*r[1];return{x:t.position.x-s,y:t.position.y-l}},IV=(t,e={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const n=t.reduce((i,r)=>{const s=typeof r=="string";let l=!e.nodeLookup&&!s?r:void 0;e.nodeLookup&&(l=s?e.nodeLookup.get(r):R1(r)?r:e.nodeLookup.get(r.id));const c=l?H0(l,e.nodeOrigin):{x:0,y:0,x2:0,y2:0};return cb(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ub(n)},Jm=(t,e={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return t.forEach(r=>{(e.filter===void 0||e.filter(r))&&(n=cb(n,H0(r)),i=!0)}),i?ub(n):{x:0,y:0,width:0,height:0}},N1=(t,e,[n,i,r]=[0,0,1],s=!1,l=!1)=>{const c={...tg(e,[n,i,r]),width:e.width/r,height:e.height/r},d=[];for(const p of t.values()){const{measured:m,selectable:g=!0,hidden:b=!1}=p;if(l&&!g||b)continue;const v=m.width??p.width??p.initialWidth??null,S=m.height??p.height??p.initialHeight??null,C=Im(c,fh(p)),T=(v??0)*(S??0),w=s&&C>0;(!p.internals.handleBounds||w||C>=T||p.dragging)&&d.push(p)}return d},HV=(t,e)=>{const n=new Set;return t.forEach(i=>{n.add(i.id)}),e.filter(i=>n.has(i.source)||n.has(i.target))};function jV(t,e){const n=new Map,i=e!=null&&e.nodes?new Set(e.nodes.map(r=>r.id)):null;return t.forEach(r=>{r.measured.width&&r.measured.height&&((e==null?void 0:e.includeHiddenNodes)||!r.hidden)&&(!i||i.has(r.id))&&n.set(r.id,r)}),n}async function PV({nodes:t,width:e,height:n,panZoom:i,minZoom:r,maxZoom:s},l){if(t.size===0)return Promise.resolve(!0);const c=jV(t,l),d=Jm(c),p=k1(d,e,n,(l==null?void 0:l.minZoom)??r,(l==null?void 0:l.maxZoom)??s,(l==null?void 0:l.padding)??.1);return await i.setViewport(p,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)}function EN({nodeId:t,nextPosition:e,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:r,onError:s}){const l=n.get(t),c=l.parentId?n.get(l.parentId):void 0,{x:d,y:p}=c?c.internals.positionAbsolute:{x:0,y:0},m=l.origin??i;let g=l.extent||r;if(l.extent==="parent"&&!l.expandParent)if(!c)s==null||s("005",fo.error005());else{const v=c.measured.width,S=c.measured.height;v&&S&&(g=[[d,p],[d+v,p+S]])}else c&&dh(l.extent)&&(g=[[l.extent[0][0]+d,l.extent[0][1]+p],[l.extent[1][0]+d,l.extent[1][1]+p]]);const b=dh(g)?vf(e,g,l.measured):e;return(l.measured.width===void 0||l.measured.height===void 0)&&(s==null||s("015",fo.error015())),{position:{x:b.x-d+(l.measured.width??0)*m[0],y:b.y-p+(l.measured.height??0)*m[1]},positionAbsolute:b}}async function GV({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:i,onBeforeDelete:r}){const s=new Set(t.map(b=>b.id)),l=[];for(const b of n){if(b.deletable===!1)continue;const v=s.has(b.id),S=!v&&b.parentId&&l.find(C=>C.id===b.parentId);(v||S)&&l.push(b)}const c=new Set(e.map(b=>b.id)),d=i.filter(b=>b.deletable!==!1),m=HV(l,d);for(const b of d)c.has(b.id)&&!m.find(S=>S.id===b.id)&&m.push(b);if(!r)return{edges:m,nodes:l};const g=await r({nodes:l,edges:m});return typeof g=="boolean"?g?{edges:m,nodes:l}:{edges:[],nodes:[]}:g}const uh=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),vf=(t={x:0,y:0},e,n)=>({x:uh(t.x,e[0][0],e[1][0]-((n==null?void 0:n.width)??0)),y:uh(t.y,e[0][1],e[1][1]-((n==null?void 0:n.height)??0))});function wN(t,e,n){const{width:i,height:r}=lc(n),{x:s,y:l}=n.internals.positionAbsolute;return vf(t,[[s,l],[s+i,l+r]],e)}const hT=(t,e,n)=>t<e?uh(Math.abs(t-e),1,e)/e:t>n?-uh(Math.abs(t-n),1,e)/e:0,TN=(t,e,n=15,i=40)=>{const r=hT(t.x,i,e.width-i)*n,s=hT(t.y,i,e.height-i)*n;return[r,s]},cb=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),E_=({x:t,y:e,width:n,height:i})=>({x:t,y:e,x2:t+n,y2:e+i}),ub=({x:t,y:e,x2:n,y2:i})=>({x:t,y:e,width:n-t,height:i-e}),fh=(t,e=[0,0])=>{var r,s;const{x:n,y:i}=R1(t)?t.internals.positionAbsolute:Qm(t,e);return{x:n,y:i,width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((s=t.measured)==null?void 0:s.height)??t.height??t.initialHeight??0}},H0=(t,e=[0,0])=>{var r,s;const{x:n,y:i}=R1(t)?t.internals.positionAbsolute:Qm(t,e);return{x:n,y:i,x2:n+(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0),y2:i+(((s=t.measured)==null?void 0:s.height)??t.height??t.initialHeight??0)}},CN=(t,e)=>ub(cb(E_(t),E_(e))),Im=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),i=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*i)},pT=t=>pl(t.width)&&pl(t.height)&&pl(t.x)&&pl(t.y),pl=t=>!isNaN(t)&&isFinite(t),FV=(t,e)=>{},eg=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),tg=({x:t,y:e},[n,i,r],s=!1,l=[1,1])=>{const c={x:(t-n)/r,y:(e-i)/r};return s?eg(c,l):c},j0=({x:t,y:e},[n,i,r])=>({x:t*r+n,y:e*r+i});function Ld(t,e){if(typeof t=="number")return Math.floor((e-e/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(n)}if(typeof t=="string"&&t.endsWith("%")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function qV(t,e,n){if(typeof t=="string"||typeof t=="number"){const i=Ld(t,n),r=Ld(t,e);return{top:i,right:r,bottom:i,left:r,x:r*2,y:i*2}}if(typeof t=="object"){const i=Ld(t.top??t.y??0,n),r=Ld(t.bottom??t.y??0,n),s=Ld(t.left??t.x??0,e),l=Ld(t.right??t.x??0,e);return{top:i,right:l,bottom:r,left:s,x:s+l,y:i+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function YV(t,e,n,i,r,s){const{x:l,y:c}=j0(t,[e,n,i]),{x:d,y:p}=j0({x:t.x+t.width,y:t.y+t.height},[e,n,i]),m=r-d,g=s-p;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(g)}}const k1=(t,e,n,i,r,s)=>{const l=qV(s,e,n),c=(e-l.x)/t.width,d=(n-l.y)/t.height,p=Math.min(c,d),m=uh(p,i,r),g=t.x+t.width/2,b=t.y+t.height/2,v=e/2-g*m,S=n/2-b*m,C=YV(t,v,S,m,e,n),T={left:Math.min(C.left-l.left,0),top:Math.min(C.top-l.top,0),right:Math.min(C.right-l.right,0),bottom:Math.min(C.bottom-l.bottom,0)};return{x:v-T.left+T.right,y:S-T.top+T.bottom,zoom:m}},Hm=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function dh(t){return t!=null&&t!=="parent"}function lc(t){var e,n;return{width:((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth??0,height:((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight??0}}function AN(t){var e,n;return(((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth)!==void 0&&(((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight)!==void 0}function MN(t,e={width:0,height:0},n,i,r){const s={...t},l=i.get(n);if(l){const c=l.origin||r;s.x+=l.internals.positionAbsolute.x-(e.width??0)*c[0],s.y+=l.internals.positionAbsolute.y-(e.height??0)*c[1]}return s}function mT(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function VV(){let t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}function XV(t){return{...xN,...t||{}}}function Sm(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:i,containerBounds:r}){const{x:s,y:l}=ml(t),c=tg({x:s-((r==null?void 0:r.left)??0),y:l-((r==null?void 0:r.top)??0)},i),{x:d,y:p}=n?eg(c,e):c;return{xSnapped:d,ySnapped:p,...c}}const O1=t=>({width:t.offsetWidth,height:t.offsetHeight}),RN=t=>{var e;return((e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},KV=["INPUT","SELECT","TEXTAREA"];function NN(t){var i,r;const e=((r=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:r[0])||t.target;return(e==null?void 0:e.nodeType)!==1?!1:KV.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey")}const kN=t=>"clientX"in t,ml=(t,e)=>{var s,l;const n=kN(t),i=n?t.clientX:(s=t.touches)==null?void 0:s[0].clientX,r=n?t.clientY:(l=t.touches)==null?void 0:l[0].clientY;return{x:i-((e==null?void 0:e.left)??0),y:r-((e==null?void 0:e.top)??0)}},gT=(t,e,n,i,r)=>{const s=e.querySelectorAll(`.${t}`);return!s||!s.length?null:Array.from(s).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:t,nodeId:r,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/i,y:(c.top-n.top)/i,...O1(l)}})};function ON({sourceX:t,sourceY:e,targetX:n,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:l,targetControlY:c}){const d=t*.125+r*.375+l*.375+n*.125,p=e*.125+s*.375+c*.375+i*.125,m=Math.abs(d-t),g=Math.abs(p-e);return[d,p,m,g]}function t0(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function yT({pos:t,x1:e,y1:n,x2:i,y2:r,c:s}){switch(t){case Qe.Left:return[e-t0(e-i,s),n];case Qe.Right:return[e+t0(i-e,s),n];case Qe.Top:return[e,n-t0(n-r,s)];case Qe.Bottom:return[e,n+t0(r-n,s)]}}function DN({sourceX:t,sourceY:e,sourcePosition:n=Qe.Bottom,targetX:i,targetY:r,targetPosition:s=Qe.Top,curvature:l=.25}){const[c,d]=yT({pos:n,x1:t,y1:e,x2:i,y2:r,c:l}),[p,m]=yT({pos:s,x1:i,y1:r,x2:t,y2:e,c:l}),[g,b,v,S]=ON({sourceX:t,sourceY:e,targetX:i,targetY:r,sourceControlX:c,sourceControlY:d,targetControlX:p,targetControlY:m});return[`M${t},${e} C${c},${d} ${p},${m} ${i},${r}`,g,b,v,S]}function zN({sourceX:t,sourceY:e,targetX:n,targetY:i}){const r=Math.abs(n-t)/2,s=n<t?n+r:n-r,l=Math.abs(i-e)/2,c=i<e?i+l:i-l;return[s,c,r,l]}function WV({sourceNode:t,targetNode:e,selected:n=!1,zIndex:i=0,elevateOnSelect:r=!1,zIndexMode:s="basic"}){if(s==="manual")return i;const l=r&&n?i+1e3:i,c=Math.max(t.parentId||r&&t.selected?t.internals.z:0,e.parentId||r&&e.selected?e.internals.z:0);return l+c}function $V({sourceNode:t,targetNode:e,width:n,height:i,transform:r}){const s=cb(H0(t),H0(e));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:i/r[2]};return Im(l,ub(s))>0}const ZV=({source:t,sourceHandle:e,target:n,targetHandle:i})=>`xy-edge__${t}${e||""}-${n}${i||""}`,QV=(t,e)=>e.some(n=>n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)),JV=(t,e,n={})=>{if(!t.source||!t.target)return e;const i=n.getEdgeId||ZV;let r;return SN(t)?r={...t}:r={...t,id:i(t)},QV(r,e)?e:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,e.concat(r))};function BN({sourceX:t,sourceY:e,targetX:n,targetY:i}){const[r,s,l,c]=zN({sourceX:t,sourceY:e,targetX:n,targetY:i});return[`M ${t},${e}L ${n},${i}`,r,s,l,c]}const bT={[Qe.Left]:{x:-1,y:0},[Qe.Right]:{x:1,y:0},[Qe.Top]:{x:0,y:-1},[Qe.Bottom]:{x:0,y:1}},eX=({source:t,sourcePosition:e=Qe.Bottom,target:n})=>e===Qe.Left||e===Qe.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},xT=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function tX({source:t,sourcePosition:e=Qe.Bottom,target:n,targetPosition:i=Qe.Top,center:r,offset:s,stepPosition:l}){const c=bT[e],d=bT[i],p={x:t.x+c.x*s,y:t.y+c.y*s},m={x:n.x+d.x*s,y:n.y+d.y*s},g=eX({source:p,sourcePosition:e,target:m}),b=g.x!==0?"x":"y",v=g[b];let S=[],C,T;const w={x:0,y:0},k={x:0,y:0},[,,M,O]=zN({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(c[b]*d[b]===-1){b==="x"?(C=r.x??p.x+(m.x-p.x)*l,T=r.y??(p.y+m.y)/2):(C=r.x??(p.x+m.x)/2,T=r.y??p.y+(m.y-p.y)*l);const z=[{x:C,y:p.y},{x:C,y:m.y}],F=[{x:p.x,y:T},{x:m.x,y:T}];c[b]===v?S=b==="x"?z:F:S=b==="x"?F:z}else{const z=[{x:p.x,y:m.y}],F=[{x:m.x,y:p.y}];if(b==="x"?S=c.x===v?F:z:S=c.y===v?z:F,e===i){const X=Math.abs(t[b]-n[b]);if(X<=s){const ne=Math.min(s-1,s-X);c[b]===v?w[b]=(p[b]>t[b]?-1:1)*ne:k[b]=(m[b]>n[b]?-1:1)*ne}}if(e!==i){const X=b==="x"?"y":"x",ne=c[b]===d[X],q=p[X]>m[X],J=p[X]<m[X];(c[b]===1&&(!ne&&q||ne&&J)||c[b]!==1&&(!ne&&J||ne&&q))&&(S=b==="x"?z:F)}const $={x:p.x+w.x,y:p.y+w.y},j={x:m.x+k.x,y:m.y+k.y},I=Math.max(Math.abs($.x-S[0].x),Math.abs(j.x-S[0].x)),Y=Math.max(Math.abs($.y-S[0].y),Math.abs(j.y-S[0].y));I>=Y?(C=($.x+j.x)/2,T=S[0].y):(C=S[0].x,T=($.y+j.y)/2)}return[[t,{x:p.x+w.x,y:p.y+w.y},...S,{x:m.x+k.x,y:m.y+k.y},n],C,T,M,O]}function nX(t,e,n,i){const r=Math.min(xT(t,e)/2,xT(e,n)/2,i),{x:s,y:l}=e;if(t.x===s&&s===n.x||t.y===l&&l===n.y)return`L${s} ${l}`;if(t.y===l){const p=t.x<n.x?-1:1,m=t.y<n.y?1:-1;return`L ${s+r*p},${l}Q ${s},${l} ${s},${l+r*m}`}const c=t.x<n.x?1:-1,d=t.y<n.y?-1:1;return`L ${s},${l+r*d}Q ${s},${l} ${s+r*c},${l}`}function w_({sourceX:t,sourceY:e,sourcePosition:n=Qe.Bottom,targetX:i,targetY:r,targetPosition:s=Qe.Top,borderRadius:l=5,centerX:c,centerY:d,offset:p=20,stepPosition:m=.5}){const[g,b,v,S,C]=tX({source:{x:t,y:e},sourcePosition:n,target:{x:i,y:r},targetPosition:s,center:{x:c,y:d},offset:p,stepPosition:m});return[g.reduce((w,k,M)=>{let O="";return M>0&&M<g.length-1?O=nX(g[M-1],k,g[M+1],l):O=`${M===0?"M":"L"}${k.x} ${k.y}`,w+=O,w},""),b,v,S,C]}function vT(t){var e;return t&&!!(t.internals.handleBounds||(e=t.handles)!=null&&e.length)&&!!(t.measured.width||t.width||t.initialWidth)}function iX(t){var g;const{sourceNode:e,targetNode:n}=t;if(!vT(e)||!vT(n))return null;const i=e.internals.handleBounds||_T(e.handles),r=n.internals.handleBounds||_T(n.handles),s=ST((i==null?void 0:i.source)??[],t.sourceHandle),l=ST(t.connectionMode===ch.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),t.targetHandle);if(!s||!l)return(g=t.onError)==null||g.call(t,"008",fo.error008(s?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const c=(s==null?void 0:s.position)||Qe.Bottom,d=(l==null?void 0:l.position)||Qe.Top,p=_f(e,s,c),m=_f(n,l,d);return{sourceX:p.x,sourceY:p.y,targetX:m.x,targetY:m.y,sourcePosition:c,targetPosition:d}}function _T(t){if(!t)return null;const e=[],n=[];for(const i of t)i.width=i.width??1,i.height=i.height??1,i.type==="source"?e.push(i):i.type==="target"&&n.push(i);return{source:e,target:n}}function _f(t,e,n=Qe.Left,i=!1){const r=((e==null?void 0:e.x)??0)+t.internals.positionAbsolute.x,s=((e==null?void 0:e.y)??0)+t.internals.positionAbsolute.y,{width:l,height:c}=e??lc(t);if(i)return{x:r+l/2,y:s+c/2};switch((e==null?void 0:e.position)??n){case Qe.Top:return{x:r+l/2,y:s};case Qe.Right:return{x:r+l,y:s+c/2};case Qe.Bottom:return{x:r+l/2,y:s+c};case Qe.Left:return{x:r,y:s+c/2}}}function ST(t,e){return t&&(e?t.find(n=>n.id===e):t[0])||null}function T_(t,e){return t?typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(i=>`${i}=${t[i]}`).join("&")}`:""}function rX(t,{id:e,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:r}){const s=new Set;return t.reduce((l,c)=>([c.markerStart||i,c.markerEnd||r].forEach(d=>{if(d&&typeof d=="object"){const p=T_(d,e);s.has(p)||(l.push({id:p,color:d.color||n,...d}),s.add(p))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const LN=1e3,aX=10,D1={nodeOrigin:[0,0],nodeExtent:Lm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},sX={...D1,checkEquality:!0};function z1(t,e){const n={...t};for(const i in e)e[i]!==void 0&&(n[i]=e[i]);return n}function lX(t,e,n){const i=z1(D1,n);for(const r of t.values())if(r.parentId)L1(r,t,e,i);else{const s=Qm(r,i.nodeOrigin),l=dh(r.extent)?r.extent:i.nodeExtent,c=vf(s,l,lc(r));r.internals.positionAbsolute=c}}function oX(t,e){if(!t.handles)return t.measured?e==null?void 0:e.internals.handleBounds:void 0;const n=[],i=[];for(const r of t.handles){const s={id:r.id,width:r.width??1,height:r.height??1,nodeId:t.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(s):r.type==="target"&&i.push(s)}return{source:n,target:i}}function B1(t){return t==="manual"}function C_(t,e,n,i={}){var p,m;const r=z1(sX,i),s={i:0},l=new Map(e),c=r!=null&&r.elevateNodesOnSelect&&!B1(r.zIndexMode)?LN:0;let d=t.length>0;e.clear(),n.clear();for(const g of t){let b=l.get(g.id);if(r.checkEquality&&g===(b==null?void 0:b.internals.userNode))e.set(g.id,b);else{const v=Qm(g,r.nodeOrigin),S=dh(g.extent)?g.extent:r.nodeExtent,C=vf(v,S,lc(g));b={...r.defaults,...g,measured:{width:(p=g.measured)==null?void 0:p.width,height:(m=g.measured)==null?void 0:m.height},internals:{positionAbsolute:C,handleBounds:oX(g,b),z:UN(g,c,r.zIndexMode),userNode:g}},e.set(g.id,b)}(b.measured===void 0||b.measured.width===void 0||b.measured.height===void 0)&&!b.hidden&&(d=!1),g.parentId&&L1(b,e,n,i,s)}return d}function cX(t,e){if(!t.parentId)return;const n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}function L1(t,e,n,i,r){const{elevateNodesOnSelect:s,nodeOrigin:l,nodeExtent:c,zIndexMode:d}=z1(D1,i),p=t.parentId,m=e.get(p);if(!m){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}cX(t,n),r&&!m.parentId&&m.internals.rootParentIndex===void 0&&d==="auto"&&(m.internals.rootParentIndex=++r.i,m.internals.z=m.internals.z+r.i*aX),r&&m.internals.rootParentIndex!==void 0&&(r.i=m.internals.rootParentIndex);const g=s&&!B1(d)?LN:0,{x:b,y:v,z:S}=uX(t,m,l,c,g,d),{positionAbsolute:C}=t.internals,T=b!==C.x||v!==C.y;(T||S!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:T?{x:b,y:v}:C,z:S}})}function UN(t,e,n){const i=pl(t.zIndex)?t.zIndex:0;return B1(n)?i:i+(t.selected?e:0)}function uX(t,e,n,i,r,s){const{x:l,y:c}=e.internals.positionAbsolute,d=lc(t),p=Qm(t,n),m=dh(t.extent)?vf(p,t.extent,d):p;let g=vf({x:l+m.x,y:c+m.y},i,d);t.extent==="parent"&&(g=wN(g,d,e));const b=UN(t,r,s),v=e.internals.z??0;return{x:g.x,y:g.y,z:v>=b?v+1:b}}function U1(t,e,n,i=[0,0]){var l;const r=[],s=new Map;for(const c of t){const d=e.get(c.parentId);if(!d)continue;const p=((l=s.get(c.parentId))==null?void 0:l.expandedRect)??fh(d),m=CN(p,c.rect);s.set(c.parentId,{expandedRect:m,parent:d})}return s.size>0&&s.forEach(({expandedRect:c,parent:d},p)=>{var M;const m=d.internals.positionAbsolute,g=lc(d),b=d.origin??i,v=c.x<m.x?Math.round(Math.abs(m.x-c.x)):0,S=c.y<m.y?Math.round(Math.abs(m.y-c.y)):0,C=Math.max(g.width,Math.round(c.width)),T=Math.max(g.height,Math.round(c.height)),w=(C-g.width)*b[0],k=(T-g.height)*b[1];(v>0||S>0||w||k)&&(r.push({id:p,type:"position",position:{x:d.position.x-v+w,y:d.position.y-S+k}}),(M=n.get(p))==null||M.forEach(O=>{t.some(H=>H.id===O.id)||r.push({id:O.id,type:"position",position:{x:O.position.x+v,y:O.position.y+S}})})),(g.width<c.width||g.height<c.height||v||S)&&r.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:C+(v?b[0]*v-w:0),height:T+(S?b[1]*S-k:0)}})}),r}function fX(t,e,n,i,r,s,l){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let d=!1;if(!c)return{changes:[],updatedInternals:d};const p=[],m=window.getComputedStyle(c),{m22:g}=new window.DOMMatrixReadOnly(m.transform),b=[];for(const v of t.values()){const S=e.get(v.id);if(!S)continue;if(S.hidden){e.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),d=!0;continue}const C=O1(v.nodeElement),T=S.measured.width!==C.width||S.measured.height!==C.height;if(!!(C.width&&C.height&&(T||!S.internals.handleBounds||v.force))){const k=v.nodeElement.getBoundingClientRect(),M=dh(S.extent)?S.extent:s;let{positionAbsolute:O}=S.internals;S.parentId&&S.extent==="parent"?O=wN(O,C,e.get(S.parentId)):M&&(O=vf(O,M,C));const H={...S,measured:C,internals:{...S.internals,positionAbsolute:O,handleBounds:{source:gT("source",v.nodeElement,k,g,S.id),target:gT("target",v.nodeElement,k,g,S.id)}}};e.set(S.id,H),S.parentId&&L1(H,e,n,{nodeOrigin:r,zIndexMode:l}),d=!0,T&&(p.push({id:S.id,type:"dimensions",dimensions:C}),S.expandParent&&S.parentId&&b.push({id:S.id,parentId:S.parentId,rect:fh(H,r)}))}}if(b.length>0){const v=U1(b,e,n,r);p.push(...v)}return{changes:p,updatedInternals:d}}async function dX({delta:t,panZoom:e,transform:n,translateExtent:i,width:r,height:s}){if(!e||!t.x&&!t.y)return Promise.resolve(!1);const l=await e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[r,s]],i),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function ET(t,e,n,i,r,s){let l=r;const c=i.get(l)||new Map;i.set(l,c.set(n,e)),l=`${r}-${t}`;const d=i.get(l)||new Map;if(i.set(l,d.set(n,e)),s){l=`${r}-${t}-${s}`;const p=i.get(l)||new Map;i.set(l,p.set(n,e))}}function IN(t,e,n){t.clear(),e.clear();for(const i of n){const{source:r,target:s,sourceHandle:l=null,targetHandle:c=null}=i,d={edgeId:i.id,source:r,target:s,sourceHandle:l,targetHandle:c},p=`${r}-${l}--${s}-${c}`,m=`${s}-${c}--${r}-${l}`;ET("source",d,m,t,r,l),ET("target",d,p,t,s,c),e.set(i.id,i)}}function HN(t,e){if(!t.parentId)return!1;const n=e.get(t.parentId);return n?n.selected?!0:HN(n,e):!1}function wT(t,e,n){var r;let i=t;do{if((r=i==null?void 0:i.matches)!=null&&r.call(i,e))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function hX(t,e,n,i){const r=new Map;for(const[s,l]of t)if((l.selected||l.id===i)&&(!l.parentId||!HN(l,t))&&(l.draggable||e&&typeof l.draggable>"u")){const c=t.get(s);c&&r.set(s,{id:s,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return r}function gv({nodeId:t,dragItems:e,nodeLookup:n,dragging:i=!0}){var l,c,d;const r=[];for(const[p,m]of e){const g=(l=n.get(p))==null?void 0:l.internals.userNode;g&&r.push({...g,position:m.position,dragging:i})}if(!t)return[r[0],r];const s=(c=n.get(t))==null?void 0:c.internals.userNode;return[s?{...s,position:((d=e.get(t))==null?void 0:d.position)||s.position,dragging:i}:r[0],r]}function pX({dragItems:t,snapGrid:e,x:n,y:i}){const r=t.values().next().value;if(!r)return null;const s={x:n-r.distance.x,y:i-r.distance.y},l=eg(s,e);return{x:l.x-s.x,y:l.y-s.y}}function mX({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:i,onDragStop:r}){let s={x:null,y:null},l=0,c=new Map,d=!1,p={x:0,y:0},m=null,g=!1,b=null,v=!1,S=!1,C=null;function T({noDragClassName:k,handleSelector:M,domNode:O,isSelectable:H,nodeId:z,nodeClickDistance:F=0}){b=Ja(O);function $({x:X,y:ne}){const{nodeLookup:q,nodeExtent:J,snapGrid:B,snapToGrid:V,nodeOrigin:Z,onNodeDrag:Q,onSelectionDrag:G,onError:K,updateNodePositions:te}=e();s={x:X,y:ne};let U=!1;const le=c.size>1,de=le&&J?E_(Jm(c)):null,ge=le&&V?pX({dragItems:c,snapGrid:B,x:X,y:ne}):null;for(const[se,pe]of c){if(!q.has(se))continue;let Ae={x:X-pe.distance.x,y:ne-pe.distance.y};V&&(Ae=ge?{x:Math.round(Ae.x+ge.x),y:Math.round(Ae.y+ge.y)}:eg(Ae,B));let Le=null;if(le&&J&&!pe.extent&&de){const{positionAbsolute:Ie}=pe.internals,We=Ie.x-de.x+J[0][0],ut=Ie.x+pe.measured.width-de.x2+J[1][0],Ue=Ie.y-de.y+J[0][1],At=Ie.y+pe.measured.height-de.y2+J[1][1];Le=[[We,Ue],[ut,At]]}const{position:Ge,positionAbsolute:Pe}=EN({nodeId:se,nextPosition:Ae,nodeLookup:q,nodeExtent:Le||J,nodeOrigin:Z,onError:K});U=U||pe.position.x!==Ge.x||pe.position.y!==Ge.y,pe.position=Ge,pe.internals.positionAbsolute=Pe}if(S=S||U,!!U&&(te(c,!0),C&&(i||Q||!z&&G))){const[se,pe]=gv({nodeId:z,dragItems:c,nodeLookup:q});i==null||i(C,c,se,pe),Q==null||Q(C,se,pe),z||G==null||G(C,pe)}}async function j(){if(!m)return;const{transform:X,panBy:ne,autoPanSpeed:q,autoPanOnNodeDrag:J}=e();if(!J){d=!1,cancelAnimationFrame(l);return}const[B,V]=TN(p,m,q);(B!==0||V!==0)&&(s.x=(s.x??0)-B/X[2],s.y=(s.y??0)-V/X[2],await ne({x:B,y:V})&&$(s)),l=requestAnimationFrame(j)}function I(X){var le;const{nodeLookup:ne,multiSelectionActive:q,nodesDraggable:J,transform:B,snapGrid:V,snapToGrid:Z,selectNodesOnDrag:Q,onNodeDragStart:G,onSelectionDragStart:K,unselectNodesAndEdges:te}=e();g=!0,(!Q||!H)&&!q&&z&&((le=ne.get(z))!=null&&le.selected||te()),H&&Q&&z&&(t==null||t(z));const U=Sm(X.sourceEvent,{transform:B,snapGrid:V,snapToGrid:Z,containerBounds:m});if(s=U,c=hX(ne,J,U,z),c.size>0&&(n||G||!z&&K)){const[de,ge]=gv({nodeId:z,dragItems:c,nodeLookup:ne});n==null||n(X.sourceEvent,c,de,ge),G==null||G(X.sourceEvent,de,ge),z||K==null||K(X.sourceEvent,ge)}}const Y=nN().clickDistance(F).on("start",X=>{const{domNode:ne,nodeDragThreshold:q,transform:J,snapGrid:B,snapToGrid:V}=e();m=(ne==null?void 0:ne.getBoundingClientRect())||null,v=!1,S=!1,C=X.sourceEvent,q===0&&I(X),s=Sm(X.sourceEvent,{transform:J,snapGrid:B,snapToGrid:V,containerBounds:m}),p=ml(X.sourceEvent,m)}).on("drag",X=>{const{autoPanOnNodeDrag:ne,transform:q,snapGrid:J,snapToGrid:B,nodeDragThreshold:V,nodeLookup:Z}=e(),Q=Sm(X.sourceEvent,{transform:q,snapGrid:J,snapToGrid:B,containerBounds:m});if(C=X.sourceEvent,(X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1||z&&!Z.has(z))&&(v=!0),!v){if(!d&&ne&&g&&(d=!0,j()),!g){const G=ml(X.sourceEvent,m),K=G.x-p.x,te=G.y-p.y;Math.sqrt(K*K+te*te)>V&&I(X)}(s.x!==Q.xSnapped||s.y!==Q.ySnapped)&&c&&g&&(p=ml(X.sourceEvent,m),$(Q))}}).on("end",X=>{if(!(!g||v)&&(d=!1,g=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:ne,updateNodePositions:q,onNodeDragStop:J,onSelectionDragStop:B}=e();if(S&&(q(c,!1),S=!1),r||J||!z&&B){const[V,Z]=gv({nodeId:z,dragItems:c,nodeLookup:ne,dragging:!1});r==null||r(X.sourceEvent,c,V,Z),J==null||J(X.sourceEvent,V,Z),z||B==null||B(X.sourceEvent,Z)}}}).filter(X=>{const ne=X.target;return!X.button&&(!k||!wT(ne,`.${k}`,O))&&(!M||wT(ne,M,O))});b.call(Y)}function w(){b==null||b.on(".drag",null)}return{update:T,destroy:w}}function gX(t,e,n){const i=[],r={x:t.x-n,y:t.y-n,width:n*2,height:n*2};for(const s of e.values())Im(r,fh(s))>0&&i.push(s);return i}const yX=250;function bX(t,e,n,i){var c,d;let r=[],s=1/0;const l=gX(t,n,e+yX);for(const p of l){const m=[...((c=p.internals.handleBounds)==null?void 0:c.source)??[],...((d=p.internals.handleBounds)==null?void 0:d.target)??[]];for(const g of m){if(i.nodeId===g.nodeId&&i.type===g.type&&i.id===g.id)continue;const{x:b,y:v}=_f(p,g,g.position,!0),S=Math.sqrt(Math.pow(b-t.x,2)+Math.pow(v-t.y,2));S>e||(S<s?(r=[{...g,x:b,y:v}],s=S):S===s&&r.push({...g,x:b,y:v}))}}if(!r.length)return null;if(r.length>1){const p=i.type==="source"?"target":"source";return r.find(m=>m.type===p)??r[0]}return r[0]}function jN(t,e,n,i,r,s=!1){var p,m,g;const l=i.get(t);if(!l)return null;const c=r==="strict"?(p=l.internals.handleBounds)==null?void 0:p[e]:[...((m=l.internals.handleBounds)==null?void 0:m.source)??[],...((g=l.internals.handleBounds)==null?void 0:g.target)??[]],d=(n?c==null?void 0:c.find(b=>b.id===n):c==null?void 0:c[0])??null;return d&&s?{...d,..._f(l,d,d.position,!0)}:d}function PN(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function xX(t,e){let n=null;return e?n=!0:t&&!e&&(n=!1),n}const GN=()=>!0;function vX(t,{connectionMode:e,connectionRadius:n,handleId:i,nodeId:r,edgeUpdaterType:s,isTarget:l,domNode:c,nodeLookup:d,lib:p,autoPanOnConnect:m,flowId:g,panBy:b,cancelConnection:v,onConnectStart:S,onConnect:C,onConnectEnd:T,isValidConnection:w=GN,onReconnectEnd:k,updateConnection:M,getTransform:O,getFromHandle:H,autoPanSpeed:z,dragThreshold:F=1,handleDomNode:$}){const j=RN(t.target);let I=0,Y;const{x:X,y:ne}=ml(t),q=PN(s,$),J=c==null?void 0:c.getBoundingClientRect();let B=!1;if(!J||!q)return;const V=jN(r,q,i,d,e);if(!V)return;let Z=ml(t,J),Q=!1,G=null,K=!1,te=null;function U(){if(!m||!J)return;const[Ge,Pe]=TN(Z,J,z);b({x:Ge,y:Pe}),I=requestAnimationFrame(U)}const le={...V,nodeId:r,type:q,position:V.position},de=d.get(r);let se={inProgress:!0,isValid:null,from:_f(de,le,Qe.Left,!0),fromHandle:le,fromPosition:le.position,fromNode:de,to:Z,toHandle:null,toPosition:dT[le.position],toNode:null,pointer:Z};function pe(){B=!0,M(se),S==null||S(t,{nodeId:r,handleId:i,handleType:q})}F===0&&pe();function Ae(Ge){if(!B){const{x:At,y:zn}=ml(Ge),Bn=At-X,bn=zn-ne;if(!(Bn*Bn+bn*bn>F*F))return;pe()}if(!H()||!le){Le(Ge);return}const Pe=O();Z=ml(Ge,J),Y=bX(tg(Z,Pe,!1,[1,1]),n,d,le),Q||(U(),Q=!0);const Ie=FN(Ge,{handle:Y,connectionMode:e,fromNodeId:r,fromHandleId:i,fromType:l?"target":"source",isValidConnection:w,doc:j,lib:p,flowId:g,nodeLookup:d});te=Ie.handleDomNode,G=Ie.connection,K=xX(!!Y,Ie.isValid);const We=d.get(r),ut=We?_f(We,le,Qe.Left,!0):se.from,Ue={...se,from:ut,isValid:K,to:Ie.toHandle&&K?j0({x:Ie.toHandle.x,y:Ie.toHandle.y},Pe):Z,toHandle:Ie.toHandle,toPosition:K&&Ie.toHandle?Ie.toHandle.position:dT[le.position],toNode:Ie.toHandle?d.get(Ie.toHandle.nodeId):null,pointer:Z};M(Ue),se=Ue}function Le(Ge){if(!("touches"in Ge&&Ge.touches.length>0)){if(B){(Y||te)&&G&&K&&(C==null||C(G));const{inProgress:Pe,...Ie}=se,We={...Ie,toPosition:se.toHandle?se.toPosition:null};T==null||T(Ge,We),s&&(k==null||k(Ge,We))}v(),cancelAnimationFrame(I),Q=!1,K=!1,G=null,te=null,j.removeEventListener("mousemove",Ae),j.removeEventListener("mouseup",Le),j.removeEventListener("touchmove",Ae),j.removeEventListener("touchend",Le)}}j.addEventListener("mousemove",Ae),j.addEventListener("mouseup",Le),j.addEventListener("touchmove",Ae),j.addEventListener("touchend",Le)}function FN(t,{handle:e,connectionMode:n,fromNodeId:i,fromHandleId:r,fromType:s,doc:l,lib:c,flowId:d,isValidConnection:p=GN,nodeLookup:m}){const g=s==="target",b=e?l.querySelector(`.${c}-flow__handle[data-id="${d}-${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`):null,{x:v,y:S}=ml(t),C=l.elementFromPoint(v,S),T=C!=null&&C.classList.contains(`${c}-flow__handle`)?C:b,w={handleDomNode:T,isValid:!1,connection:null,toHandle:null};if(T){const k=PN(void 0,T),M=T.getAttribute("data-nodeid"),O=T.getAttribute("data-handleid"),H=T.classList.contains("connectable"),z=T.classList.contains("connectableend");if(!M||!k)return w;const F={source:g?M:i,sourceHandle:g?O:r,target:g?i:M,targetHandle:g?r:O};w.connection=F;const j=H&&z&&(n===ch.Strict?g&&k==="source"||!g&&k==="target":M!==i||O!==r);w.isValid=j&&p(F),w.toHandle=jN(M,k,O,m,n,!0)}return w}const A_={onPointerDown:vX,isValid:FN};function _X({domNode:t,panZoom:e,getTransform:n,getViewScale:i}){const r=Ja(t);function s({translateExtent:c,width:d,height:p,zoomStep:m=1,pannable:g=!0,zoomable:b=!0,inversePan:v=!1}){const S=M=>{if(M.sourceEvent.type!=="wheel"||!e)return;const O=n(),H=M.sourceEvent.ctrlKey&&Hm()?10:1,z=-M.sourceEvent.deltaY*(M.sourceEvent.deltaMode===1?.05:M.sourceEvent.deltaMode?1:.002)*m,F=O[2]*Math.pow(2,z*H);e.scaleTo(F)};let C=[0,0];const T=M=>{(M.sourceEvent.type==="mousedown"||M.sourceEvent.type==="touchstart")&&(C=[M.sourceEvent.clientX??M.sourceEvent.touches[0].clientX,M.sourceEvent.clientY??M.sourceEvent.touches[0].clientY])},w=M=>{const O=n();if(M.sourceEvent.type!=="mousemove"&&M.sourceEvent.type!=="touchmove"||!e)return;const H=[M.sourceEvent.clientX??M.sourceEvent.touches[0].clientX,M.sourceEvent.clientY??M.sourceEvent.touches[0].clientY],z=[H[0]-C[0],H[1]-C[1]];C=H;const F=i()*Math.max(O[2],Math.log(O[2]))*(v?-1:1),$={x:O[0]-z[0]*F,y:O[1]-z[1]*F},j=[[0,0],[d,p]];e.setViewportConstrained({x:$.x,y:$.y,zoom:O[2]},j,c)},k=yN().on("start",T).on("zoom",g?w:null).on("zoom.wheel",b?S:null);r.call(k,{})}function l(){r.on("zoom",null)}return{update:s,destroy:l,pointer:ul}}const fb=t=>({x:t.x,y:t.y,zoom:t.k}),yv=({x:t,y:e,zoom:n})=>ob.translate(t,e).scale(n),Vd=(t,e)=>t.target.closest(`.${e}`),qN=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),SX=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,bv=(t,e=0,n=SX,i=()=>{})=>{const r=typeof e=="number"&&e>0;return r||i(),r?t.transition().duration(e).ease(n).on("end",i):t},YN=t=>{const e=t.ctrlKey&&Hm()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e};function EX({zoomPanValues:t,noWheelClassName:e,d3Selection:n,d3Zoom:i,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:d,onPanZoomEnd:p}){return m=>{if(Vd(m,e))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const g=n.property("__zoom").k||1;if(m.ctrlKey&&l){const T=ul(m),w=YN(m),k=g*Math.pow(2,w);i.scaleTo(n,k,T,m);return}const b=m.deltaMode===1?20:1;let v=r===pf.Vertical?0:m.deltaX*b,S=r===pf.Horizontal?0:m.deltaY*b;!Hm()&&m.shiftKey&&r!==pf.Vertical&&(v=m.deltaY*b,S=0),i.translateBy(n,-(v/g)*s,-(S/g)*s,{internal:!0});const C=fb(n.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(d==null||d(m,C),t.panScrollTimeout=setTimeout(()=>{p==null||p(m,C),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,c==null||c(m,C))}}function wX({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(i,r){const s=i.type==="wheel",l=!e&&s&&!i.ctrlKey,c=Vd(i,t);if(i.ctrlKey&&s&&c&&i.preventDefault(),l||c)return null;i.preventDefault(),n.call(this,i,r)}}function TX({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return i=>{var s,l,c;if((s=i.sourceEvent)!=null&&s.internal)return;const r=fb(i.transform);t.mouseButton=((l=i.sourceEvent)==null?void 0:l.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=r,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&e(!0),n&&(n==null||n(i.sourceEvent,r))}}function CX({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:i,onPanZoom:r}){return s=>{var l,c;t.usedRightMouseButton=!!(n&&qN(e,t.mouseButton??0)),(l=s.sourceEvent)!=null&&l.sync||i([s.transform.x,s.transform.y,s.transform.k]),r&&!((c=s.sourceEvent)!=null&&c.internal)&&(r==null||r(s.sourceEvent,fb(s.transform)))}}function AX({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:r,onPaneContextMenu:s}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(t.isZoomingOrPanning=!1,s&&qN(e,t.mouseButton??0)&&!t.usedRightMouseButton&&l.sourceEvent&&s(l.sourceEvent),t.usedRightMouseButton=!1,i(!1),r)){const d=fb(l.transform);t.prevViewport=d,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{r==null||r(l.sourceEvent,d)},n?150:0)}}}function MX({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:i,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:l,noWheelClassName:c,noPanClassName:d,lib:p,connectionInProgress:m}){return g=>{var T;const b=t||e,v=n&&g.ctrlKey,S=g.type==="wheel";if(g.button===1&&g.type==="mousedown"&&(Vd(g,`${p}-flow__node`)||Vd(g,`${p}-flow__edge`)))return!0;if(!i&&!b&&!r&&!s&&!n||l||m&&!S||Vd(g,c)&&S||Vd(g,d)&&(!S||r&&S&&!t)||!n&&g.ctrlKey&&S)return!1;if(!n&&g.type==="touchstart"&&((T=g.touches)==null?void 0:T.length)>1)return g.preventDefault(),!1;if(!b&&!r&&!v&&S||!i&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(i)&&!i.includes(g.button)&&g.type==="mousedown")return!1;const C=Array.isArray(i)&&i.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||S)&&C}}function RX({domNode:t,minZoom:e,maxZoom:n,translateExtent:i,viewport:r,onPanZoom:s,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:d}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=t.getBoundingClientRect(),g=yN().scaleExtent([e,n]).translateExtent(i),b=Ja(t).call(g);k({x:r.x,y:r.y,zoom:uh(r.zoom,e,n)},[[0,0],[m.width,m.height]],i);const v=b.on("wheel.zoom"),S=b.on("dblclick.zoom");g.wheelDelta(YN);function C(Y,X){return b?new Promise(ne=>{g==null||g.interpolate((X==null?void 0:X.interpolate)==="linear"?_m:d0).transform(bv(b,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>ne(!0)),Y)}):Promise.resolve(!1)}function T({noWheelClassName:Y,noPanClassName:X,onPaneContextMenu:ne,userSelectionActive:q,panOnScroll:J,panOnDrag:B,panOnScrollMode:V,panOnScrollSpeed:Z,preventScrolling:Q,zoomOnPinch:G,zoomOnScroll:K,zoomOnDoubleClick:te,zoomActivationKeyPressed:U,lib:le,onTransformChange:de,connectionInProgress:ge,paneClickDistance:se,selectionOnDrag:pe}){q&&!p.isZoomingOrPanning&&w();const Ae=J&&!U&&!q;g.clickDistance(pe?1/0:!pl(se)||se<0?0:se);const Le=Ae?EX({zoomPanValues:p,noWheelClassName:Y,d3Selection:b,d3Zoom:g,panOnScrollMode:V,panOnScrollSpeed:Z,zoomOnPinch:G,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}):wX({noWheelClassName:Y,preventScrolling:Q,d3ZoomHandler:v});if(b.on("wheel.zoom",Le,{passive:!1}),!q){const Pe=TX({zoomPanValues:p,onDraggingChange:d,onPanZoomStart:l});g.on("start",Pe);const Ie=CX({zoomPanValues:p,panOnDrag:B,onPaneContextMenu:!!ne,onPanZoom:s,onTransformChange:de});g.on("zoom",Ie);const We=AX({zoomPanValues:p,panOnDrag:B,panOnScroll:J,onPaneContextMenu:ne,onPanZoomEnd:c,onDraggingChange:d});g.on("end",We)}const Ge=MX({zoomActivationKeyPressed:U,panOnDrag:B,zoomOnScroll:K,panOnScroll:J,zoomOnDoubleClick:te,zoomOnPinch:G,userSelectionActive:q,noPanClassName:X,noWheelClassName:Y,lib:le,connectionInProgress:ge});g.filter(Ge),te?b.on("dblclick.zoom",S):b.on("dblclick.zoom",null)}function w(){g.on("zoom",null)}async function k(Y,X,ne){const q=yv(Y),J=g==null?void 0:g.constrain()(q,X,ne);return J&&await C(J),new Promise(B=>B(J))}async function M(Y,X){const ne=yv(Y);return await C(ne,X),new Promise(q=>q(ne))}function O(Y){if(b){const X=yv(Y),ne=b.property("__zoom");(ne.k!==Y.zoom||ne.x!==Y.x||ne.y!==Y.y)&&(g==null||g.transform(b,X,null,{sync:!0}))}}function H(){const Y=b?gN(b.node()):{x:0,y:0,k:1};return{x:Y.x,y:Y.y,zoom:Y.k}}function z(Y,X){return b?new Promise(ne=>{g==null||g.interpolate((X==null?void 0:X.interpolate)==="linear"?_m:d0).scaleTo(bv(b,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>ne(!0)),Y)}):Promise.resolve(!1)}function F(Y,X){return b?new Promise(ne=>{g==null||g.interpolate((X==null?void 0:X.interpolate)==="linear"?_m:d0).scaleBy(bv(b,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>ne(!0)),Y)}):Promise.resolve(!1)}function $(Y){g==null||g.scaleExtent(Y)}function j(Y){g==null||g.translateExtent(Y)}function I(Y){const X=!pl(Y)||Y<0?0:Y;g==null||g.clickDistance(X)}return{update:T,destroy:w,setViewport:M,setViewportConstrained:k,getViewport:H,scaleTo:z,scaleBy:F,setScaleExtent:$,setTranslateExtent:j,syncViewport:O,setClickDistance:I}}var hh;(function(t){t.Line="line",t.Handle="handle"})(hh||(hh={}));function NX({width:t,prevWidth:e,height:n,prevHeight:i,affectsX:r,affectsY:s}){const l=t-e,c=n-i,d=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&r&&(d[0]=d[0]*-1),c&&s&&(d[1]=d[1]*-1),d}function TT(t){const e=t.includes("right")||t.includes("left"),n=t.includes("bottom")||t.includes("top"),i=t.includes("left"),r=t.includes("top");return{isHorizontal:e,isVertical:n,affectsX:i,affectsY:r}}function Zc(t,e){return Math.max(0,e-t)}function Qc(t,e){return Math.max(0,t-e)}function n0(t,e,n){return Math.max(0,e-t,t-n)}function CT(t,e){return t?!e:e}function kX(t,e,n,i,r,s,l,c){let{affectsX:d,affectsY:p}=e;const{isHorizontal:m,isVertical:g}=e,b=m&&g,{xSnapped:v,ySnapped:S}=n,{minWidth:C,maxWidth:T,minHeight:w,maxHeight:k}=i,{x:M,y:O,width:H,height:z,aspectRatio:F}=t;let $=Math.floor(m?v-t.pointerX:0),j=Math.floor(g?S-t.pointerY:0);const I=H+(d?-$:$),Y=z+(p?-j:j),X=-s[0]*H,ne=-s[1]*z;let q=n0(I,C,T),J=n0(Y,w,k);if(l){let Z=0,Q=0;d&&$<0?Z=Zc(M+$+X,l[0][0]):!d&&$>0&&(Z=Qc(M+I+X,l[1][0])),p&&j<0?Q=Zc(O+j+ne,l[0][1]):!p&&j>0&&(Q=Qc(O+Y+ne,l[1][1])),q=Math.max(q,Z),J=Math.max(J,Q)}if(c){let Z=0,Q=0;d&&$>0?Z=Qc(M+$,c[0][0]):!d&&$<0&&(Z=Zc(M+I,c[1][0])),p&&j>0?Q=Qc(O+j,c[0][1]):!p&&j<0&&(Q=Zc(O+Y,c[1][1])),q=Math.max(q,Z),J=Math.max(J,Q)}if(r){if(m){const Z=n0(I/F,w,k)*F;if(q=Math.max(q,Z),l){let Q=0;!d&&!p||d&&!p&&b?Q=Qc(O+ne+I/F,l[1][1])*F:Q=Zc(O+ne+(d?$:-$)/F,l[0][1])*F,q=Math.max(q,Q)}if(c){let Q=0;!d&&!p||d&&!p&&b?Q=Zc(O+I/F,c[1][1])*F:Q=Qc(O+(d?$:-$)/F,c[0][1])*F,q=Math.max(q,Q)}}if(g){const Z=n0(Y*F,C,T)/F;if(J=Math.max(J,Z),l){let Q=0;!d&&!p||p&&!d&&b?Q=Qc(M+Y*F+X,l[1][0])/F:Q=Zc(M+(p?j:-j)*F+X,l[0][0])/F,J=Math.max(J,Q)}if(c){let Q=0;!d&&!p||p&&!d&&b?Q=Zc(M+Y*F,c[1][0])/F:Q=Qc(M+(p?j:-j)*F,c[0][0])/F,J=Math.max(J,Q)}}}j=j+(j<0?J:-J),$=$+($<0?q:-q),r&&(b?I>Y*F?j=(CT(d,p)?-$:$)/F:$=(CT(d,p)?-j:j)*F:m?(j=$/F,p=d):($=j*F,d=p));const B=d?M+$:M,V=p?O+j:O;return{width:H+(d?-$:$),height:z+(p?-j:j),x:s[0]*$*(d?-1:1)+B,y:s[1]*j*(p?-1:1)+V}}const VN={width:0,height:0,x:0,y:0},OX={...VN,pointerX:0,pointerY:0,aspectRatio:1};function DX(t){return[[0,0],[t.measured.width,t.measured.height]]}function zX(t,e,n){const i=e.position.x+t.position.x,r=e.position.y+t.position.y,s=t.measured.width??0,l=t.measured.height??0,c=n[0]*s,d=n[1]*l;return[[i-c,r-d],[i+s-c,r+l-d]]}function BX({domNode:t,nodeId:e,getStoreItems:n,onChange:i,onEnd:r}){const s=Ja(t);let l={controlDirection:TT("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:p,boundaries:m,keepAspectRatio:g,resizeDirection:b,onResizeStart:v,onResize:S,onResizeEnd:C,shouldResize:T}){let w={...VN},k={...OX};l={boundaries:m,resizeDirection:b,keepAspectRatio:g,controlDirection:TT(p)};let M,O=null,H=[],z,F,$,j=!1;const I=nN().on("start",Y=>{const{nodeLookup:X,transform:ne,snapGrid:q,snapToGrid:J,nodeOrigin:B,paneDomNode:V}=n();if(M=X.get(e),!M)return;O=(V==null?void 0:V.getBoundingClientRect())??null;const{xSnapped:Z,ySnapped:Q}=Sm(Y.sourceEvent,{transform:ne,snapGrid:q,snapToGrid:J,containerBounds:O});w={width:M.measured.width??0,height:M.measured.height??0,x:M.position.x??0,y:M.position.y??0},k={...w,pointerX:Z,pointerY:Q,aspectRatio:w.width/w.height},z=void 0,M.parentId&&(M.extent==="parent"||M.expandParent)&&(z=X.get(M.parentId),F=z&&M.extent==="parent"?DX(z):void 0),H=[],$=void 0;for(const[G,K]of X)if(K.parentId===e&&(H.push({id:G,position:{...K.position},extent:K.extent}),K.extent==="parent"||K.expandParent)){const te=zX(K,M,K.origin??B);$?$=[[Math.min(te[0][0],$[0][0]),Math.min(te[0][1],$[0][1])],[Math.max(te[1][0],$[1][0]),Math.max(te[1][1],$[1][1])]]:$=te}v==null||v(Y,{...w})}).on("drag",Y=>{const{transform:X,snapGrid:ne,snapToGrid:q,nodeOrigin:J}=n(),B=Sm(Y.sourceEvent,{transform:X,snapGrid:ne,snapToGrid:q,containerBounds:O}),V=[];if(!M)return;const{x:Z,y:Q,width:G,height:K}=w,te={},U=M.origin??J,{width:le,height:de,x:ge,y:se}=kX(k,l.controlDirection,B,l.boundaries,l.keepAspectRatio,U,F,$),pe=le!==G,Ae=de!==K,Le=ge!==Z&&pe,Ge=se!==Q&&Ae;if(!Le&&!Ge&&!pe&&!Ae)return;if((Le||Ge||U[0]===1||U[1]===1)&&(te.x=Le?ge:w.x,te.y=Ge?se:w.y,w.x=te.x,w.y=te.y,H.length>0)){const ut=ge-Z,Ue=se-Q;for(const At of H)At.position={x:At.position.x-ut+U[0]*(le-G),y:At.position.y-Ue+U[1]*(de-K)},V.push(At)}if((pe||Ae)&&(te.width=pe&&(!l.resizeDirection||l.resizeDirection==="horizontal")?le:w.width,te.height=Ae&&(!l.resizeDirection||l.resizeDirection==="vertical")?de:w.height,w.width=te.width,w.height=te.height),z&&M.expandParent){const ut=U[0]*(te.width??0);te.x&&te.x<ut&&(w.x=ut,k.x=k.x-(te.x-ut));const Ue=U[1]*(te.height??0);te.y&&te.y<Ue&&(w.y=Ue,k.y=k.y-(te.y-Ue))}const Pe=NX({width:w.width,prevWidth:G,height:w.height,prevHeight:K,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),Ie={...w,direction:Pe};(T==null?void 0:T(Y,Ie))!==!1&&(j=!0,S==null||S(Y,Ie),i(te,V))}).on("end",Y=>{j&&(C==null||C(Y,{...w}),r==null||r({...w}),j=!1)});s.call(I)}function d(){s.on(".drag",null)}return{update:c,destroy:d}}var xv={exports:{}},vv={},_v={exports:{}},Sv={};/**
|
|
379
|
+
* @license React
|
|
380
|
+
* use-sync-external-store-shim.production.js
|
|
381
|
+
*
|
|
382
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the MIT license found in the
|
|
385
|
+
* LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/var AT;function LX(){if(AT)return Sv;AT=1;var t=ph();function e(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function c(g,b){var v=b(),S=i({inst:{value:v,getSnapshot:b}}),C=S[0].inst,T=S[1];return s(function(){C.value=v,C.getSnapshot=b,d(C)&&T({inst:C})},[g,v,b]),r(function(){return d(C)&&T({inst:C}),g(function(){d(C)&&T({inst:C})})},[g]),l(v),v}function d(g){var b=g.getSnapshot;g=g.value;try{var v=b();return!n(g,v)}catch{return!0}}function p(g,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return Sv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:m,Sv}var MT;function UX(){return MT||(MT=1,_v.exports=LX()),_v.exports}/**
|
|
387
|
+
* @license React
|
|
388
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
389
|
+
*
|
|
390
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the MIT license found in the
|
|
393
|
+
* LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/var RT;function IX(){if(RT)return vv;RT=1;var t=ph(),e=UX();function n(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var i=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,s=t.useRef,l=t.useEffect,c=t.useMemo,d=t.useDebugValue;return vv.useSyncExternalStoreWithSelector=function(p,m,g,b,v){var S=s(null);if(S.current===null){var C={hasValue:!1,value:null};S.current=C}else C=S.current;S=c(function(){function w(z){if(!k){if(k=!0,M=z,z=b(z),v!==void 0&&C.hasValue){var F=C.value;if(v(F,z))return O=F}return O=z}if(F=O,i(M,z))return F;var $=b(z);return v!==void 0&&v(F,$)?(M=z,F):(M=z,O=$)}var k=!1,M,O,H=g===void 0?null:g;return[function(){return w(m())},H===null?void 0:function(){return w(H())}]},[m,g,b,v]);var T=r(p,S[0],S[1]);return l(function(){C.hasValue=!0,C.value=T},[T]),d(T),T},vv}var NT;function HX(){return NT||(NT=1,xv.exports=IX()),xv.exports}var jX=HX();const PX=lu(jX),GX={},kT=t=>{let e;const n=new Set,i=(m,g)=>{const b=typeof m=="function"?m(e):m;if(!Object.is(b,e)){const v=e;e=g??(typeof b!="object"||b===null)?b:Object.assign({},e,b),n.forEach(S=>S(e,v))}},r=()=>e,d={setState:i,getState:r,getInitialState:()=>p,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(GX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},p=e=t(i,r,d);return d},FX=t=>t?kT(t):kT,{useDebugValue:qX}=sm,{useSyncExternalStoreWithSelector:YX}=PX,VX=t=>t;function XN(t,e=VX,n){const i=YX(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return qX(i),i}const OT=(t,e)=>{const n=FX(t),i=(r,s=e)=>XN(n,r,s);return Object.assign(i,n),i},XX=(t,e)=>t?OT(t,e):OT;function $n(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[i,r]of t)if(!Object.is(r,e.get(i)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||!Object.is(t[i],e[i]))return!1;return!0}const db=P.createContext(null),KX=db.Provider,KN=fo.error001();function Wt(t,e){const n=P.useContext(db);if(n===null)throw new Error(KN);return XN(n,t,e)}function Zn(){const t=P.useContext(db);if(t===null)throw new Error(KN);return P.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const DT={display:"none"},WX={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},WN="react-flow__node-desc",$N="react-flow__edge-desc",$X="react-flow__aria-live",ZX=t=>t.ariaLiveMessage,QX=t=>t.ariaLabelConfig;function JX({rfId:t}){const e=Wt(ZX);return N.jsx("div",{id:`${$X}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:WX,children:e})}function eK({rfId:t,disableKeyboardA11y:e}){const n=Wt(QX);return N.jsxs(N.Fragment,{children:[N.jsx("div",{id:`${WN}-${t}`,style:DT,children:e?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),N.jsx("div",{id:`${$N}-${t}`,style:DT,children:n["edge.a11yDescription.default"]}),!e&&N.jsx(JX,{rfId:t})]})}const hb=P.forwardRef(({position:t="top-left",children:e,className:n,style:i,...r},s)=>{const l=`${t}`.split("-");return N.jsx("div",{className:Oi(["react-flow__panel",n,...l]),style:i,ref:s,...r,children:e})});hb.displayName="Panel";function tK({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:N.jsx(hb,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:N.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const nK=t=>{const e=[],n=[];for(const[,i]of t.nodeLookup)i.selected&&e.push(i.internals.userNode);for(const[,i]of t.edgeLookup)i.selected&&n.push(i);return{selectedNodes:e,selectedEdges:n}},i0=t=>t.id;function iK(t,e){return $n(t.selectedNodes.map(i0),e.selectedNodes.map(i0))&&$n(t.selectedEdges.map(i0),e.selectedEdges.map(i0))}function rK({onSelectionChange:t}){const e=Zn(),{selectedNodes:n,selectedEdges:i}=Wt(nK,iK);return P.useEffect(()=>{const r={nodes:n,edges:i};t==null||t(r),e.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,i,t]),null}const aK=t=>!!t.onSelectionChangeHandlers;function sK({onSelectionChange:t}){const e=Wt(aK);return t||e?N.jsx(rK,{onSelectionChange:t}):null}const ZN=[0,0],lK={x:0,y:0,zoom:1},oK=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],zT=[...oK,"rfId"],cK=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),BT={translateExtent:Lm,nodeOrigin:ZN,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function uK(t){const{setNodes:e,setEdges:n,setMinZoom:i,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:d}=Wt(cK,$n),p=Zn();P.useEffect(()=>(d(t.defaultNodes,t.defaultEdges),()=>{m.current=BT,c()}),[]);const m=P.useRef(BT);return P.useEffect(()=>{for(const g of zT){const b=t[g],v=m.current[g];b!==v&&(typeof t[g]>"u"||(g==="nodes"?e(b):g==="edges"?n(b):g==="minZoom"?i(b):g==="maxZoom"?r(b):g==="translateExtent"?s(b):g==="nodeExtent"?l(b):g==="ariaLabelConfig"?p.setState({ariaLabelConfig:XV(b)}):g==="fitView"?p.setState({fitViewQueued:b}):g==="fitViewOptions"?p.setState({fitViewOptions:b}):p.setState({[g]:b})))}m.current=t},zT.map(g=>t[g])),null}function LT(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function fK(t){var i;const[e,n]=P.useState(t==="system"?null:t);return P.useEffect(()=>{if(t!=="system"){n(t);return}const r=LT(),s=()=>n(r!=null&&r.matches?"dark":"light");return s(),r==null||r.addEventListener("change",s),()=>{r==null||r.removeEventListener("change",s)}},[t]),e!==null?e:(i=LT())!=null&&i.matches?"dark":"light"}const UT=typeof document<"u"?document:null;function jm(t=null,e={target:UT,actInsideInputWithModifier:!0}){const[n,i]=P.useState(!1),r=P.useRef(!1),s=P.useRef(new Set([])),[l,c]=P.useMemo(()=>{if(t!==null){const p=(Array.isArray(t)?t:[t]).filter(g=>typeof g=="string").map(g=>g.replace("+",`
|
|
395
|
+
`).replace(`
|
|
396
|
+
|
|
397
|
+
`,`
|
|
398
|
+
+`).split(`
|
|
399
|
+
`)),m=p.reduce((g,b)=>g.concat(...b),[]);return[p,m]}return[[],[]]},[t]);return P.useEffect(()=>{const d=(e==null?void 0:e.target)??UT,p=(e==null?void 0:e.actInsideInputWithModifier)??!0;if(t!==null){const m=v=>{var T,w;if(r.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!r.current||r.current&&!p)&&NN(v))return!1;const C=HT(v.code,c);if(s.current.add(v[C]),IT(l,s.current,!1)){const k=((w=(T=v.composedPath)==null?void 0:T.call(v))==null?void 0:w[0])||v.target,M=(k==null?void 0:k.nodeName)==="BUTTON"||(k==null?void 0:k.nodeName)==="A";e.preventDefault!==!1&&(r.current||!M)&&v.preventDefault(),i(!0)}},g=v=>{const S=HT(v.code,c);IT(l,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(v[S]),v.key==="Meta"&&s.current.clear(),r.current=!1},b=()=>{s.current.clear(),i(!1)};return d==null||d.addEventListener("keydown",m),d==null||d.addEventListener("keyup",g),window.addEventListener("blur",b),window.addEventListener("contextmenu",b),()=>{d==null||d.removeEventListener("keydown",m),d==null||d.removeEventListener("keyup",g),window.removeEventListener("blur",b),window.removeEventListener("contextmenu",b)}}},[t,i]),n}function IT(t,e,n){return t.filter(i=>n||i.length===e.size).some(i=>i.every(r=>e.has(r)))}function HT(t,e){return e.includes(t)?"code":"key"}const dK=()=>{const t=Zn();return P.useMemo(()=>({zoomIn:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1.2,{duration:e==null?void 0:e.duration}):Promise.resolve(!1)},zoomOut:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1/1.2,{duration:e==null?void 0:e.duration}):Promise.resolve(!1)},zoomTo:(e,n)=>{const{panZoom:i}=t.getState();return i?i.scaleTo(e,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(e,n)=>{const{transform:[i,r,s],panZoom:l}=t.getState();return l?(await l.setViewport({x:e.x??i,y:e.y??r,zoom:e.zoom??s},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[e,n,i]=t.getState().transform;return{x:e,y:n,zoom:i}},setCenter:async(e,n,i)=>t.getState().setCenter(e,n,i),fitBounds:async(e,n)=>{const{width:i,height:r,minZoom:s,maxZoom:l,panZoom:c}=t.getState(),d=k1(e,i,r,s,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(d,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(e,n={})=>{const{transform:i,snapGrid:r,snapToGrid:s,domNode:l}=t.getState();if(!l)return e;const{x:c,y:d}=l.getBoundingClientRect(),p={x:e.x-c,y:e.y-d},m=n.snapGrid??r,g=n.snapToGrid??s;return tg(p,i,g,m)},flowToScreenPosition:e=>{const{transform:n,domNode:i}=t.getState();if(!i)return e;const{x:r,y:s}=i.getBoundingClientRect(),l=j0(e,n);return{x:l.x+r,y:l.y+s}}}),[])};function QN(t,e){const n=[],i=new Map,r=[];for(const s of t)if(s.type==="add"){r.push(s);continue}else if(s.type==="remove"||s.type==="replace")i.set(s.id,[s]);else{const l=i.get(s.id);l?l.push(s):i.set(s.id,[s])}for(const s of e){const l=i.get(s.id);if(!l){n.push(s);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...s};for(const d of l)hK(d,c);n.push(c)}return r.length&&r.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function hK(t,e){switch(t.type){case"select":{e.selected=t.selected;break}case"position":{typeof t.position<"u"&&(e.position=t.position),typeof t.dragging<"u"&&(e.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(e.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(e.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(e.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(e.resizing=t.resizing);break}}}function pK(t,e){return QN(t,e)}function mK(t,e){return QN(t,e)}function cf(t,e){return{id:t,type:"select",selected:e}}function Xd(t,e=new Set,n=!1){const i=[];for(const[r,s]of t){const l=e.has(r);!(s.selected===void 0&&!l)&&s.selected!==l&&(n&&(s.selected=l),i.push(cf(s.id,l)))}return i}function jT({items:t=[],lookup:e}){var r;const n=[],i=new Map(t.map(s=>[s.id,s]));for(const[s,l]of t.entries()){const c=e.get(l.id),d=((r=c==null?void 0:c.internals)==null?void 0:r.userNode)??c;d!==void 0&&d!==l&&n.push({id:l.id,item:l,type:"replace"}),d===void 0&&n.push({item:l,type:"add",index:s})}for(const[s]of e)i.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function PT(t){return{id:t.id,type:"remove"}}const GT=t=>UV(t),gK=t=>SN(t);function JN(t){return P.forwardRef(t)}const yK=typeof window<"u"?P.useLayoutEffect:P.useEffect;function FT(t){const[e,n]=P.useState(BigInt(0)),[i]=P.useState(()=>bK(()=>n(r=>r+BigInt(1))));return yK(()=>{const r=i.get();r.length&&(t(r),i.reset())},[e]),i}function bK(t){let e=[];return{get:()=>e,reset:()=>{e=[]},push:n=>{e.push(n),t()}}}const ek=P.createContext(null);function xK({children:t}){const e=Zn(),n=P.useCallback(c=>{const{nodes:d=[],setNodes:p,hasDefaultNodes:m,onNodesChange:g,nodeLookup:b,fitViewQueued:v,onNodesChangeMiddlewareMap:S}=e.getState();let C=d;for(const w of c)C=typeof w=="function"?w(C):w;let T=jT({items:C,lookup:b});for(const w of S.values())T=w(T);m&&p(C),T.length>0?g==null||g(T):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:k,setNodes:M}=e.getState();w&&M(k)})},[]),i=FT(n),r=P.useCallback(c=>{const{edges:d=[],setEdges:p,hasDefaultEdges:m,onEdgesChange:g,edgeLookup:b}=e.getState();let v=d;for(const S of c)v=typeof S=="function"?S(v):S;m?p(v):g&&g(jT({items:v,lookup:b}))},[]),s=FT(r),l=P.useMemo(()=>({nodeQueue:i,edgeQueue:s}),[]);return N.jsx(ek.Provider,{value:l,children:t})}function vK(){const t=P.useContext(ek);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const _K=t=>!!t.panZoom;function pb(){const t=dK(),e=Zn(),n=vK(),i=Wt(_K),r=P.useMemo(()=>{const s=g=>e.getState().nodeLookup.get(g),l=g=>{n.nodeQueue.push(g)},c=g=>{n.edgeQueue.push(g)},d=g=>{var w,k;const{nodeLookup:b,nodeOrigin:v}=e.getState(),S=GT(g)?g:b.get(g.id),C=S.parentId?MN(S.position,S.measured,S.parentId,b,v):S.position,T={...S,position:C,width:((w=S.measured)==null?void 0:w.width)??S.width,height:((k=S.measured)==null?void 0:k.height)??S.height};return fh(T)},p=(g,b,v={replace:!1})=>{l(S=>S.map(C=>{if(C.id===g){const T=typeof b=="function"?b(C):b;return v.replace&>(T)?T:{...C,...T}}return C}))},m=(g,b,v={replace:!1})=>{c(S=>S.map(C=>{if(C.id===g){const T=typeof b=="function"?b(C):b;return v.replace&&gK(T)?T:{...C,...T}}return C}))};return{getNodes:()=>e.getState().nodes.map(g=>({...g})),getNode:g=>{var b;return(b=s(g))==null?void 0:b.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:g=[]}=e.getState();return g.map(b=>({...b}))},getEdge:g=>e.getState().edgeLookup.get(g),setNodes:l,setEdges:c,addNodes:g=>{const b=Array.isArray(g)?g:[g];n.nodeQueue.push(v=>[...v,...b])},addEdges:g=>{const b=Array.isArray(g)?g:[g];n.edgeQueue.push(v=>[...v,...b])},toObject:()=>{const{nodes:g=[],edges:b=[],transform:v}=e.getState(),[S,C,T]=v;return{nodes:g.map(w=>({...w})),edges:b.map(w=>({...w})),viewport:{x:S,y:C,zoom:T}}},deleteElements:async({nodes:g=[],edges:b=[]})=>{const{nodes:v,edges:S,onNodesDelete:C,onEdgesDelete:T,triggerNodeChanges:w,triggerEdgeChanges:k,onDelete:M,onBeforeDelete:O}=e.getState(),{nodes:H,edges:z}=await GV({nodesToRemove:g,edgesToRemove:b,nodes:v,edges:S,onBeforeDelete:O}),F=z.length>0,$=H.length>0;if(F){const j=z.map(PT);T==null||T(z),k(j)}if($){const j=H.map(PT);C==null||C(H),w(j)}return($||F)&&(M==null||M({nodes:H,edges:z})),{deletedNodes:H,deletedEdges:z}},getIntersectingNodes:(g,b=!0,v)=>{const S=pT(g),C=S?g:d(g),T=v!==void 0;return C?(v||e.getState().nodes).filter(w=>{const k=e.getState().nodeLookup.get(w.id);if(k&&!S&&(w.id===g.id||!k.internals.positionAbsolute))return!1;const M=fh(T?w:k),O=Im(M,C);return b&&O>0||O>=M.width*M.height||O>=C.width*C.height}):[]},isNodeIntersecting:(g,b,v=!0)=>{const C=pT(g)?g:d(g);if(!C)return!1;const T=Im(C,b);return v&&T>0||T>=b.width*b.height||T>=C.width*C.height},updateNode:p,updateNodeData:(g,b,v={replace:!1})=>{p(g,S=>{const C=typeof b=="function"?b(S):b;return v.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},v)},updateEdge:m,updateEdgeData:(g,b,v={replace:!1})=>{m(g,S=>{const C=typeof b=="function"?b(S):b;return v.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},v)},getNodesBounds:g=>{const{nodeLookup:b,nodeOrigin:v}=e.getState();return IV(g,{nodeLookup:b,nodeOrigin:v})},getHandleConnections:({type:g,id:b,nodeId:v})=>{var S;return Array.from(((S=e.getState().connectionLookup.get(`${v}-${g}${b?`-${b}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:g,handleId:b,nodeId:v})=>{var S;return Array.from(((S=e.getState().connectionLookup.get(`${v}${g?b?`-${g}-${b}`:`-${g}`:""}`))==null?void 0:S.values())??[])},fitView:async g=>{const b=e.getState().fitViewResolver??VV();return e.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:b}),n.nodeQueue.push(v=>[...v]),b.promise}}},[]);return P.useMemo(()=>({...r,...t,viewportInitialized:i}),[i])}const qT=t=>t.selected,SK=typeof window<"u"?window:void 0;function EK({deleteKeyCode:t,multiSelectionKeyCode:e}){const n=Zn(),{deleteElements:i}=pb(),r=jm(t,{actInsideInputWithModifier:!1}),s=jm(e,{target:SK});P.useEffect(()=>{if(r){const{edges:l,nodes:c}=n.getState();i({nodes:c.filter(qT),edges:l.filter(qT)}),n.setState({nodesSelectionActive:!1})}},[r]),P.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function wK(t){const e=Zn();P.useEffect(()=>{const n=()=>{var r,s,l,c;if(!t.current||!(((s=(r=t.current).checkVisibility)==null?void 0:s.call(r))??!0))return!1;const i=O1(t.current);(i.height===0||i.width===0)&&((c=(l=e.getState()).onError)==null||c.call(l,"004",fo.error004())),e.setState({width:i.width||500,height:i.height||500})};if(t.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(t.current),()=>{window.removeEventListener("resize",n),i&&t.current&&i.unobserve(t.current)}}},[])}const mb={position:"absolute",width:"100%",height:"100%",top:0,left:0},TK=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function CK({onPaneContextMenu:t,zoomOnScroll:e=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:r=.5,panOnScrollMode:s=pf.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:d,translateExtent:p,minZoom:m,maxZoom:g,zoomActivationKeyCode:b,preventScrolling:v=!0,children:S,noWheelClassName:C,noPanClassName:T,onViewportChange:w,isControlledViewport:k,paneClickDistance:M,selectionOnDrag:O}){const H=Zn(),z=P.useRef(null),{userSelectionActive:F,lib:$,connectionInProgress:j}=Wt(TK,$n),I=jm(b),Y=P.useRef();wK(z);const X=P.useCallback(ne=>{w==null||w({x:ne[0],y:ne[1],zoom:ne[2]}),k||H.setState({transform:ne})},[w,k]);return P.useEffect(()=>{if(z.current){Y.current=RX({domNode:z.current,minZoom:m,maxZoom:g,translateExtent:p,viewport:d,onDraggingChange:B=>H.setState(V=>V.paneDragging===B?V:{paneDragging:B}),onPanZoomStart:(B,V)=>{const{onViewportChangeStart:Z,onMoveStart:Q}=H.getState();Q==null||Q(B,V),Z==null||Z(V)},onPanZoom:(B,V)=>{const{onViewportChange:Z,onMove:Q}=H.getState();Q==null||Q(B,V),Z==null||Z(V)},onPanZoomEnd:(B,V)=>{const{onViewportChangeEnd:Z,onMoveEnd:Q}=H.getState();Q==null||Q(B,V),Z==null||Z(V)}});const{x:ne,y:q,zoom:J}=Y.current.getViewport();return H.setState({panZoom:Y.current,transform:[ne,q,J],domNode:z.current.closest(".react-flow")}),()=>{var B;(B=Y.current)==null||B.destroy()}}},[]),P.useEffect(()=>{var ne;(ne=Y.current)==null||ne.update({onPaneContextMenu:t,zoomOnScroll:e,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:r,panOnScrollMode:s,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:I,preventScrolling:v,noPanClassName:T,userSelectionActive:F,noWheelClassName:C,lib:$,onTransformChange:X,connectionInProgress:j,selectionOnDrag:O,paneClickDistance:M})},[t,e,n,i,r,s,l,c,I,v,T,F,C,$,X,j,O,M]),N.jsx("div",{className:"react-flow__renderer",ref:z,style:mb,children:S})}const AK=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function MK(){const{userSelectionActive:t,userSelectionRect:e}=Wt(AK,$n);return t&&e?N.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const Ev=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},RK=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function NK({isSelecting:t,selectionKeyPressed:e,selectionMode:n=Um.Full,panOnDrag:i,paneClickDistance:r,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:p,onPaneScroll:m,onPaneMouseEnter:g,onPaneMouseMove:b,onPaneMouseLeave:v,children:S}){const C=Zn(),{userSelectionActive:T,elementsSelectable:w,dragging:k,connectionInProgress:M}=Wt(RK,$n),O=w&&(t||T),H=P.useRef(null),z=P.useRef(),F=P.useRef(new Set),$=P.useRef(new Set),j=P.useRef(!1),I=Z=>{if(j.current||M){j.current=!1;return}d==null||d(Z),C.getState().resetSelectedElements(),C.setState({nodesSelectionActive:!1})},Y=Z=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){Z.preventDefault();return}p==null||p(Z)},X=m?Z=>m(Z):void 0,ne=Z=>{j.current&&(Z.stopPropagation(),j.current=!1)},q=Z=>{var de,ge;const{domNode:Q}=C.getState();if(z.current=Q==null?void 0:Q.getBoundingClientRect(),!z.current)return;const G=Z.target===H.current;if(!G&&!!Z.target.closest(".nokey")||!t||!(s&&G||e)||Z.button!==0||!Z.isPrimary)return;(ge=(de=Z.target)==null?void 0:de.setPointerCapture)==null||ge.call(de,Z.pointerId),j.current=!1;const{x:U,y:le}=ml(Z.nativeEvent,z.current);C.setState({userSelectionRect:{width:0,height:0,startX:U,startY:le,x:U,y:le}}),G||(Z.stopPropagation(),Z.preventDefault())},J=Z=>{const{userSelectionRect:Q,transform:G,nodeLookup:K,edgeLookup:te,connectionLookup:U,triggerNodeChanges:le,triggerEdgeChanges:de,defaultEdgeOptions:ge,resetSelectedElements:se}=C.getState();if(!z.current||!Q)return;const{x:pe,y:Ae}=ml(Z.nativeEvent,z.current),{startX:Le,startY:Ge}=Q;if(!j.current){const Ue=e?0:r;if(Math.hypot(pe-Le,Ae-Ge)<=Ue)return;se(),l==null||l(Z)}j.current=!0;const Pe={startX:Le,startY:Ge,x:pe<Le?pe:Le,y:Ae<Ge?Ae:Ge,width:Math.abs(pe-Le),height:Math.abs(Ae-Ge)},Ie=F.current,We=$.current;F.current=new Set(N1(K,Pe,G,n===Um.Partial,!0).map(Ue=>Ue.id)),$.current=new Set;const ut=(ge==null?void 0:ge.selectable)??!0;for(const Ue of F.current){const At=U.get(Ue);if(At)for(const{edgeId:zn}of At.values()){const Bn=te.get(zn);Bn&&(Bn.selectable??ut)&&$.current.add(zn)}}if(!mT(Ie,F.current)){const Ue=Xd(K,F.current,!0);le(Ue)}if(!mT(We,$.current)){const Ue=Xd(te,$.current);de(Ue)}C.setState({userSelectionRect:Pe,userSelectionActive:!0,nodesSelectionActive:!1})},B=Z=>{var Q,G;Z.button===0&&((G=(Q=Z.target)==null?void 0:Q.releasePointerCapture)==null||G.call(Q,Z.pointerId),!T&&Z.target===H.current&&C.getState().userSelectionRect&&(I==null||I(Z)),C.setState({userSelectionActive:!1,userSelectionRect:null}),j.current&&(c==null||c(Z),C.setState({nodesSelectionActive:F.current.size>0})))},V=i===!0||Array.isArray(i)&&i.includes(0);return N.jsxs("div",{className:Oi(["react-flow__pane",{draggable:V,dragging:k,selection:t}]),onClick:O?void 0:Ev(I,H),onContextMenu:Ev(Y,H),onWheel:Ev(X,H),onPointerEnter:O?void 0:g,onPointerMove:O?J:b,onPointerUp:O?B:void 0,onPointerDownCapture:O?q:void 0,onClickCapture:O?ne:void 0,onPointerLeave:v,ref:H,style:mb,children:[S,N.jsx(MK,{})]})}function M_({id:t,store:e,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:r,unselectNodesAndEdges:s,multiSelectionActive:l,nodeLookup:c,onError:d}=e.getState(),p=c.get(t);if(!p){d==null||d("012",fo.error012(t));return}e.setState({nodesSelectionActive:!1}),p.selected?(n||p.selected&&l)&&(s({nodes:[p],edges:[]}),requestAnimationFrame(()=>{var m;return(m=i==null?void 0:i.current)==null?void 0:m.blur()})):r([t])}function tk({nodeRef:t,disabled:e=!1,noDragClassName:n,handleSelector:i,nodeId:r,isSelectable:s,nodeClickDistance:l}){const c=Zn(),[d,p]=P.useState(!1),m=P.useRef();return P.useEffect(()=>{m.current=mX({getStoreItems:()=>c.getState(),onNodeMouseDown:g=>{M_({id:g,store:c,nodeRef:t})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),P.useEffect(()=>{if(!(e||!t.current||!m.current))return m.current.update({noDragClassName:n,handleSelector:i,domNode:t.current,isSelectable:s,nodeId:r,nodeClickDistance:l}),()=>{var g;(g=m.current)==null||g.destroy()}},[n,i,e,s,t,r,l]),d}const kK=t=>e=>e.selected&&(e.draggable||t&&typeof e.draggable>"u");function nk(){const t=Zn();return P.useCallback(n=>{const{nodeExtent:i,snapToGrid:r,snapGrid:s,nodesDraggable:l,onError:c,updateNodePositions:d,nodeLookup:p,nodeOrigin:m}=t.getState(),g=new Map,b=kK(l),v=r?s[0]:5,S=r?s[1]:5,C=n.direction.x*v*n.factor,T=n.direction.y*S*n.factor;for(const[,w]of p){if(!b(w))continue;let k={x:w.internals.positionAbsolute.x+C,y:w.internals.positionAbsolute.y+T};r&&(k=eg(k,s));const{position:M,positionAbsolute:O}=EN({nodeId:w.id,nextPosition:k,nodeLookup:p,nodeExtent:i,nodeOrigin:m,onError:c});w.position=M,w.internals.positionAbsolute=O,g.set(w.id,w)}d(g)},[])}const I1=P.createContext(null),OK=I1.Provider;I1.Consumer;const ik=()=>P.useContext(I1),DK=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),zK=(t,e,n)=>i=>{const{connectionClickStartHandle:r,connectionMode:s,connection:l}=i,{fromHandle:c,toHandle:d,isValid:p}=l,m=(d==null?void 0:d.nodeId)===t&&(d==null?void 0:d.id)===e&&(d==null?void 0:d.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===t&&(c==null?void 0:c.id)===e&&(c==null?void 0:c.type)===n,connectingTo:m,clickConnecting:(r==null?void 0:r.nodeId)===t&&(r==null?void 0:r.id)===e&&(r==null?void 0:r.type)===n,isPossibleEndHandle:s===ch.Strict?(c==null?void 0:c.type)!==n:t!==(c==null?void 0:c.nodeId)||e!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!r,valid:m&&p}};function BK({type:t="source",position:e=Qe.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:r=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:d,className:p,onMouseDown:m,onTouchStart:g,...b},v){var J,B;const S=l||null,C=t==="target",T=Zn(),w=ik(),{connectOnClick:k,noPanClassName:M,rfId:O}=Wt(DK,$n),{connectingFrom:H,connectingTo:z,clickConnecting:F,isPossibleEndHandle:$,connectionInProcess:j,clickConnectionInProcess:I,valid:Y}=Wt(zK(w,S,t),$n);w||(B=(J=T.getState()).onError)==null||B.call(J,"010",fo.error010());const X=V=>{const{defaultEdgeOptions:Z,onConnect:Q,hasDefaultEdges:G}=T.getState(),K={...Z,...V};if(G){const{edges:te,setEdges:U}=T.getState();U(JV(K,te))}Q==null||Q(K),c==null||c(K)},ne=V=>{if(!w)return;const Z=kN(V.nativeEvent);if(r&&(Z&&V.button===0||!Z)){const Q=T.getState();A_.onPointerDown(V.nativeEvent,{handleDomNode:V.currentTarget,autoPanOnConnect:Q.autoPanOnConnect,connectionMode:Q.connectionMode,connectionRadius:Q.connectionRadius,domNode:Q.domNode,nodeLookup:Q.nodeLookup,lib:Q.lib,isTarget:C,handleId:S,nodeId:w,flowId:Q.rfId,panBy:Q.panBy,cancelConnection:Q.cancelConnection,onConnectStart:Q.onConnectStart,onConnectEnd:(...G)=>{var K,te;return(te=(K=T.getState()).onConnectEnd)==null?void 0:te.call(K,...G)},updateConnection:Q.updateConnection,onConnect:X,isValidConnection:n||((...G)=>{var K,te;return((te=(K=T.getState()).isValidConnection)==null?void 0:te.call(K,...G))??!0}),getTransform:()=>T.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:Q.autoPanSpeed,dragThreshold:Q.connectionDragThreshold})}Z?m==null||m(V):g==null||g(V)},q=V=>{const{onClickConnectStart:Z,onClickConnectEnd:Q,connectionClickStartHandle:G,connectionMode:K,isValidConnection:te,lib:U,rfId:le,nodeLookup:de,connection:ge}=T.getState();if(!w||!G&&!r)return;if(!G){Z==null||Z(V.nativeEvent,{nodeId:w,handleId:S,handleType:t}),T.setState({connectionClickStartHandle:{nodeId:w,type:t,id:S}});return}const se=RN(V.target),pe=n||te,{connection:Ae,isValid:Le}=A_.isValid(V.nativeEvent,{handle:{nodeId:w,id:S,type:t},connectionMode:K,fromNodeId:G.nodeId,fromHandleId:G.id||null,fromType:G.type,isValidConnection:pe,flowId:le,doc:se,lib:U,nodeLookup:de});Le&&Ae&&X(Ae);const Ge=structuredClone(ge);delete Ge.inProgress,Ge.toPosition=Ge.toHandle?Ge.toHandle.position:null,Q==null||Q(V,Ge),T.setState({connectionClickStartHandle:null})};return N.jsx("div",{"data-handleid":S,"data-nodeid":w,"data-handlepos":e,"data-id":`${O}-${w}-${S}-${t}`,className:Oi(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",M,p,{source:!C,target:C,connectable:i,connectablestart:r,connectableend:s,clickconnecting:F,connectingfrom:H,connectingto:z,valid:Y,connectionindicator:i&&(!j||$)&&(j||I?s:r)}]),onMouseDown:ne,onTouchStart:ne,onClick:k?q:void 0,ref:v,...b,children:d})}const su=P.memo(JN(BK));function LK({data:t,isConnectable:e,sourcePosition:n=Qe.Bottom}){return N.jsxs(N.Fragment,{children:[t==null?void 0:t.label,N.jsx(su,{type:"source",position:n,isConnectable:e})]})}function UK({data:t,isConnectable:e,targetPosition:n=Qe.Top,sourcePosition:i=Qe.Bottom}){return N.jsxs(N.Fragment,{children:[N.jsx(su,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label,N.jsx(su,{type:"source",position:i,isConnectable:e})]})}function IK(){return null}function HK({data:t,isConnectable:e,targetPosition:n=Qe.Top}){return N.jsxs(N.Fragment,{children:[N.jsx(su,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label]})}const P0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},YT={input:LK,default:UK,output:HK,group:IK};function jK(t){var e,n,i,r;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((e=t.style)==null?void 0:e.width),height:t.height??t.initialHeight??((n=t.style)==null?void 0:n.height)}:{width:t.width??((i=t.style)==null?void 0:i.width),height:t.height??((r=t.style)==null?void 0:r.height)}}const PK=t=>{const{width:e,height:n,x:i,y:r}=Jm(t.nodeLookup,{filter:s=>!!s.selected});return{width:pl(e)?e:null,height:pl(n)?n:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${i}px,${r}px)`}};function GK({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:n}){const i=Zn(),{width:r,height:s,transformString:l,userSelectionActive:c}=Wt(PK,$n),d=nk(),p=P.useRef(null);P.useEffect(()=>{var v;n||(v=p.current)==null||v.focus({preventScroll:!0})},[n]);const m=!c&&r!==null&&s!==null;if(tk({nodeRef:p,disabled:!m}),!m)return null;const g=t?v=>{const S=i.getState().nodes.filter(C=>C.selected);t(v,S)}:void 0,b=v=>{Object.prototype.hasOwnProperty.call(P0,v.key)&&(v.preventDefault(),d({direction:P0[v.key],factor:v.shiftKey?4:1}))};return N.jsx("div",{className:Oi(["react-flow__nodesselection","react-flow__container",e]),style:{transform:l},children:N.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:n?void 0:-1,onKeyDown:n?void 0:b,style:{width:r,height:s}})})}const VT=typeof window<"u"?window:void 0,FK=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function rk({children:t,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:d,selectionKeyCode:p,selectionOnDrag:m,selectionMode:g,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:T,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:M,panOnScroll:O,panOnScrollSpeed:H,panOnScrollMode:z,zoomOnDoubleClick:F,panOnDrag:$,defaultViewport:j,translateExtent:I,minZoom:Y,maxZoom:X,preventScrolling:ne,onSelectionContextMenu:q,noWheelClassName:J,noPanClassName:B,disableKeyboardA11y:V,onViewportChange:Z,isControlledViewport:Q}){const{nodesSelectionActive:G,userSelectionActive:K}=Wt(FK,$n),te=jm(p,{target:VT}),U=jm(C,{target:VT}),le=U||$,de=U||O,ge=m&&le!==!0,se=te||K||ge;return EK({deleteKeyCode:d,multiSelectionKeyCode:S}),N.jsx(CK,{onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:k,zoomOnPinch:M,panOnScroll:de,panOnScrollSpeed:H,panOnScrollMode:z,zoomOnDoubleClick:F,panOnDrag:!te&&le,defaultViewport:j,translateExtent:I,minZoom:Y,maxZoom:X,zoomActivationKeyCode:T,preventScrolling:ne,noWheelClassName:J,noPanClassName:B,onViewportChange:Z,isControlledViewport:Q,paneClickDistance:c,selectionOnDrag:ge,children:N.jsxs(NK,{onSelectionStart:b,onSelectionEnd:v,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:l,panOnDrag:le,isSelecting:!!se,selectionMode:g,selectionKeyPressed:te,paneClickDistance:c,selectionOnDrag:ge,children:[t,G&&N.jsx(GK,{onSelectionContextMenu:q,noPanClassName:B,disableKeyboardA11y:V})]})})}rk.displayName="FlowRenderer";const qK=P.memo(rk),YK=t=>e=>t?N1(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(n=>n.id):Array.from(e.nodeLookup.keys());function VK(t){return Wt(P.useCallback(YK(t),[t]),$n)}const XK=t=>t.updateNodeInternals;function KK(){const t=Wt(XK),[e]=P.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(r=>{const s=r.target.getAttribute("data-id");i.set(s,{id:s,nodeElement:r.target,force:!0})}),t(i)}));return P.useEffect(()=>()=>{e==null||e.disconnect()},[e]),e}function WK({node:t,nodeType:e,hasDimensions:n,resizeObserver:i}){const r=Zn(),s=P.useRef(null),l=P.useRef(null),c=P.useRef(t.sourcePosition),d=P.useRef(t.targetPosition),p=P.useRef(e),m=n&&!!t.internals.handleBounds;return P.useEffect(()=>{s.current&&!t.hidden&&(!m||l.current!==s.current)&&(l.current&&(i==null||i.unobserve(l.current)),i==null||i.observe(s.current),l.current=s.current)},[m,t.hidden]),P.useEffect(()=>()=>{l.current&&(i==null||i.unobserve(l.current),l.current=null)},[]),P.useEffect(()=>{if(s.current){const g=p.current!==e,b=c.current!==t.sourcePosition,v=d.current!==t.targetPosition;(g||b||v)&&(p.current=e,c.current=t.sourcePosition,d.current=t.targetPosition,r.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:s.current,force:!0}]])))}},[t.id,e,t.sourcePosition,t.targetPosition]),s}function $K({id:t,onClick:e,onMouseEnter:n,onMouseMove:i,onMouseLeave:r,onContextMenu:s,onDoubleClick:l,nodesDraggable:c,elementsSelectable:d,nodesConnectable:p,nodesFocusable:m,resizeObserver:g,noDragClassName:b,noPanClassName:v,disableKeyboardA11y:S,rfId:C,nodeTypes:T,nodeClickDistance:w,onError:k}){const{node:M,internals:O,isParent:H}=Wt(pe=>{const Ae=pe.nodeLookup.get(t),Le=pe.parentLookup.has(t);return{node:Ae,internals:Ae.internals,isParent:Le}},$n);let z=M.type||"default",F=(T==null?void 0:T[z])||YT[z];F===void 0&&(k==null||k("003",fo.error003(z)),z="default",F=(T==null?void 0:T.default)||YT.default);const $=!!(M.draggable||c&&typeof M.draggable>"u"),j=!!(M.selectable||d&&typeof M.selectable>"u"),I=!!(M.connectable||p&&typeof M.connectable>"u"),Y=!!(M.focusable||m&&typeof M.focusable>"u"),X=Zn(),ne=AN(M),q=WK({node:M,nodeType:z,hasDimensions:ne,resizeObserver:g}),J=tk({nodeRef:q,disabled:M.hidden||!$,noDragClassName:b,handleSelector:M.dragHandle,nodeId:t,isSelectable:j,nodeClickDistance:w}),B=nk();if(M.hidden)return null;const V=lc(M),Z=jK(M),Q=j||$||e||n||i||r,G=n?pe=>n(pe,{...O.userNode}):void 0,K=i?pe=>i(pe,{...O.userNode}):void 0,te=r?pe=>r(pe,{...O.userNode}):void 0,U=s?pe=>s(pe,{...O.userNode}):void 0,le=l?pe=>l(pe,{...O.userNode}):void 0,de=pe=>{const{selectNodesOnDrag:Ae,nodeDragThreshold:Le}=X.getState();j&&(!Ae||!$||Le>0)&&M_({id:t,store:X,nodeRef:q}),e&&e(pe,{...O.userNode})},ge=pe=>{if(!(NN(pe.nativeEvent)||S)){if(bN.includes(pe.key)&&j){const Ae=pe.key==="Escape";M_({id:t,store:X,unselect:Ae,nodeRef:q})}else if($&&M.selected&&Object.prototype.hasOwnProperty.call(P0,pe.key)){pe.preventDefault();const{ariaLabelConfig:Ae}=X.getState();X.setState({ariaLiveMessage:Ae["node.a11yDescription.ariaLiveMessage"]({direction:pe.key.replace("Arrow","").toLowerCase(),x:~~O.positionAbsolute.x,y:~~O.positionAbsolute.y})}),B({direction:P0[pe.key],factor:pe.shiftKey?4:1})}}},se=()=>{var We;if(S||!((We=q.current)!=null&&We.matches(":focus-visible")))return;const{transform:pe,width:Ae,height:Le,autoPanOnNodeFocus:Ge,setCenter:Pe}=X.getState();if(!Ge)return;N1(new Map([[t,M]]),{x:0,y:0,width:Ae,height:Le},pe,!0).length>0||Pe(M.position.x+V.width/2,M.position.y+V.height/2,{zoom:pe[2]})};return N.jsx("div",{className:Oi(["react-flow__node",`react-flow__node-${z}`,{[v]:$},M.className,{selected:M.selected,selectable:j,parent:H,draggable:$,dragging:J}]),ref:q,style:{zIndex:O.z,transform:`translate(${O.positionAbsolute.x}px,${O.positionAbsolute.y}px)`,pointerEvents:Q?"all":"none",visibility:ne?"visible":"hidden",...M.style,...Z},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:G,onMouseMove:K,onMouseLeave:te,onContextMenu:U,onClick:de,onDoubleClick:le,onKeyDown:Y?ge:void 0,tabIndex:Y?0:void 0,onFocus:Y?se:void 0,role:M.ariaRole??(Y?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${WN}-${C}`,"aria-label":M.ariaLabel,...M.domAttributes,children:N.jsx(OK,{value:t,children:N.jsx(F,{id:t,data:M.data,type:z,positionAbsoluteX:O.positionAbsolute.x,positionAbsoluteY:O.positionAbsolute.y,selected:M.selected??!1,selectable:j,draggable:$,deletable:M.deletable??!0,isConnectable:I,sourcePosition:M.sourcePosition,targetPosition:M.targetPosition,dragging:J,dragHandle:M.dragHandle,zIndex:O.z,parentId:M.parentId,...V})})})}var ZK=P.memo($K);const QK=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function ak(t){const{nodesDraggable:e,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,onError:s}=Wt(QK,$n),l=VK(t.onlyRenderVisibleElements),c=KK();return N.jsx("div",{className:"react-flow__nodes",style:mb,children:l.map(d=>N.jsx(ZK,{id:d,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:c,nodesDraggable:e,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,nodeClickDistance:t.nodeClickDistance,onError:s},d))})}ak.displayName="NodeRenderer";const JK=P.memo(ak);function eW(t){return Wt(P.useCallback(n=>{if(!t)return n.edges.map(r=>r.id);const i=[];if(n.width&&n.height)for(const r of n.edges){const s=n.nodeLookup.get(r.source),l=n.nodeLookup.get(r.target);s&&l&&$V({sourceNode:s,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&i.push(r.id)}return i},[t]),$n)}const tW=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t}};return N.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},nW=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t,fill:t}};return N.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},XT={[I0.Arrow]:tW,[I0.ArrowClosed]:nW};function iW(t){const e=Zn();return P.useMemo(()=>{var r,s;return Object.prototype.hasOwnProperty.call(XT,t)?XT[t]:((s=(r=e.getState()).onError)==null||s.call(r,"009",fo.error009(t)),null)},[t])}const rW=({id:t,type:e,color:n,width:i=12.5,height:r=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const d=iW(e);return d?N.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${i}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0",children:N.jsx(d,{color:n,strokeWidth:l})}):null},sk=({defaultColor:t,rfId:e})=>{const n=Wt(s=>s.edges),i=Wt(s=>s.defaultEdgeOptions),r=P.useMemo(()=>rX(n,{id:e,defaultColor:t,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,e,t]);return r.length?N.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:N.jsx("defs",{children:r.map(s=>N.jsx(rW,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};sk.displayName="MarkerDefinitions";var aW=P.memo(sk);function lk({x:t,y:e,label:n,labelStyle:i,labelShowBg:r=!0,labelBgStyle:s,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:d,className:p,...m}){const[g,b]=P.useState({x:1,y:0,width:0,height:0}),v=Oi(["react-flow__edge-textwrapper",p]),S=P.useRef(null);return P.useEffect(()=>{if(S.current){const C=S.current.getBBox();b({x:C.x,y:C.y,width:C.width,height:C.height})}},[n]),n?N.jsxs("g",{transform:`translate(${t-g.width/2} ${e-g.height/2})`,className:v,visibility:g.width?"visible":"hidden",...m,children:[r&&N.jsx("rect",{width:g.width+2*l[0],x:-l[0],y:-l[1],height:g.height+2*l[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),N.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:S,style:i,children:n}),d]}):null}lk.displayName="EdgeText";const sW=P.memo(lk);function gb({path:t,labelX:e,labelY:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:d,interactionWidth:p=20,...m}){return N.jsxs(N.Fragment,{children:[N.jsx("path",{...m,d:t,fill:"none",className:Oi(["react-flow__edge-path",m.className])}),p?N.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,i&&pl(e)&&pl(n)?N.jsx(sW,{x:e,y:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:d}):null]})}function KT({pos:t,x1:e,y1:n,x2:i,y2:r}){return t===Qe.Left||t===Qe.Right?[.5*(e+i),n]:[e,.5*(n+r)]}function ok({sourceX:t,sourceY:e,sourcePosition:n=Qe.Bottom,targetX:i,targetY:r,targetPosition:s=Qe.Top}){const[l,c]=KT({pos:n,x1:t,y1:e,x2:i,y2:r}),[d,p]=KT({pos:s,x1:i,y1:r,x2:t,y2:e}),[m,g,b,v]=ON({sourceX:t,sourceY:e,targetX:i,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:p});return[`M${t},${e} C${l},${c} ${d},${p} ${i},${r}`,m,g,b,v]}function ck(t){return P.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:l,targetPosition:c,label:d,labelStyle:p,labelShowBg:m,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:v,style:S,markerEnd:C,markerStart:T,interactionWidth:w})=>{const[k,M,O]=ok({sourceX:n,sourceY:i,sourcePosition:l,targetX:r,targetY:s,targetPosition:c}),H=t.isInternal?void 0:e;return N.jsx(gb,{id:H,path:k,labelX:M,labelY:O,label:d,labelStyle:p,labelShowBg:m,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:v,style:S,markerEnd:C,markerStart:T,interactionWidth:w})})}const lW=ck({isInternal:!1}),uk=ck({isInternal:!0});lW.displayName="SimpleBezierEdge";uk.displayName="SimpleBezierEdgeInternal";function fk(t){return P.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:s,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,sourcePosition:v=Qe.Bottom,targetPosition:S=Qe.Top,markerEnd:C,markerStart:T,pathOptions:w,interactionWidth:k})=>{const[M,O,H]=w_({sourceX:n,sourceY:i,sourcePosition:v,targetX:r,targetY:s,targetPosition:S,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),z=t.isInternal?void 0:e;return N.jsx(gb,{id:z,path:M,labelX:O,labelY:H,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:C,markerStart:T,interactionWidth:k})})}const dk=fk({isInternal:!1}),hk=fk({isInternal:!0});dk.displayName="SmoothStepEdge";hk.displayName="SmoothStepEdgeInternal";function pk(t){return P.memo(({id:e,...n})=>{var r;const i=t.isInternal?void 0:e;return N.jsx(dk,{...n,id:i,pathOptions:P.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const oW=pk({isInternal:!1}),mk=pk({isInternal:!0});oW.displayName="StepEdge";mk.displayName="StepEdgeInternal";function gk(t){return P.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:s,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:v,markerStart:S,interactionWidth:C})=>{const[T,w,k]=BN({sourceX:n,sourceY:i,targetX:r,targetY:s}),M=t.isInternal?void 0:e;return N.jsx(gb,{id:M,path:T,labelX:w,labelY:k,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:v,markerStart:S,interactionWidth:C})})}const cW=gk({isInternal:!1}),yk=gk({isInternal:!0});cW.displayName="StraightEdge";yk.displayName="StraightEdgeInternal";function bk(t){return P.memo(({id:e,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:l=Qe.Bottom,targetPosition:c=Qe.Top,label:d,labelStyle:p,labelShowBg:m,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:v,style:S,markerEnd:C,markerStart:T,pathOptions:w,interactionWidth:k})=>{const[M,O,H]=DN({sourceX:n,sourceY:i,sourcePosition:l,targetX:r,targetY:s,targetPosition:c,curvature:w==null?void 0:w.curvature}),z=t.isInternal?void 0:e;return N.jsx(gb,{id:z,path:M,labelX:O,labelY:H,label:d,labelStyle:p,labelShowBg:m,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:v,style:S,markerEnd:C,markerStart:T,interactionWidth:k})})}const uW=bk({isInternal:!1}),xk=bk({isInternal:!0});uW.displayName="BezierEdge";xk.displayName="BezierEdgeInternal";const WT={default:xk,straight:yk,step:mk,smoothstep:hk,simplebezier:uk},$T={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},fW=(t,e,n)=>n===Qe.Left?t-e:n===Qe.Right?t+e:t,dW=(t,e,n)=>n===Qe.Top?t-e:n===Qe.Bottom?t+e:t,ZT="react-flow__edgeupdater";function QT({position:t,centerX:e,centerY:n,radius:i=10,onMouseDown:r,onMouseEnter:s,onMouseOut:l,type:c}){return N.jsx("circle",{onMouseDown:r,onMouseEnter:s,onMouseOut:l,className:Oi([ZT,`${ZT}-${c}`]),cx:fW(e,i,t),cy:dW(n,i,t),r:i,stroke:"transparent",fill:"transparent"})}function hW({isReconnectable:t,reconnectRadius:e,edge:n,sourceX:i,sourceY:r,targetX:s,targetY:l,sourcePosition:c,targetPosition:d,onReconnect:p,onReconnectStart:m,onReconnectEnd:g,setReconnecting:b,setUpdateHover:v}){const S=Zn(),C=(O,H)=>{if(O.button!==0)return;const{autoPanOnConnect:z,domNode:F,connectionMode:$,connectionRadius:j,lib:I,onConnectStart:Y,cancelConnection:X,nodeLookup:ne,rfId:q,panBy:J,updateConnection:B}=S.getState(),V=H.type==="target",Z=(K,te)=>{b(!1),g==null||g(K,n,H.type,te)},Q=K=>p==null?void 0:p(n,K),G=(K,te)=>{b(!0),m==null||m(O,n,H.type),Y==null||Y(K,te)};A_.onPointerDown(O.nativeEvent,{autoPanOnConnect:z,connectionMode:$,connectionRadius:j,domNode:F,handleId:H.id,nodeId:H.nodeId,nodeLookup:ne,isTarget:V,edgeUpdaterType:H.type,lib:I,flowId:q,cancelConnection:X,panBy:J,isValidConnection:(...K)=>{var te,U;return((U=(te=S.getState()).isValidConnection)==null?void 0:U.call(te,...K))??!0},onConnect:Q,onConnectStart:G,onConnectEnd:(...K)=>{var te,U;return(U=(te=S.getState()).onConnectEnd)==null?void 0:U.call(te,...K)},onReconnectEnd:Z,updateConnection:B,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:O.currentTarget})},T=O=>C(O,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=O=>C(O,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),k=()=>v(!0),M=()=>v(!1);return N.jsxs(N.Fragment,{children:[(t===!0||t==="source")&&N.jsx(QT,{position:c,centerX:i,centerY:r,radius:e,onMouseDown:T,onMouseEnter:k,onMouseOut:M,type:"source"}),(t===!0||t==="target")&&N.jsx(QT,{position:d,centerX:s,centerY:l,radius:e,onMouseDown:w,onMouseEnter:k,onMouseOut:M,type:"target"})]})}function pW({id:t,edgesFocusable:e,edgesReconnectable:n,elementsSelectable:i,onClick:r,onDoubleClick:s,onContextMenu:l,onMouseEnter:c,onMouseMove:d,onMouseLeave:p,reconnectRadius:m,onReconnect:g,onReconnectStart:b,onReconnectEnd:v,rfId:S,edgeTypes:C,noPanClassName:T,onError:w,disableKeyboardA11y:k}){let M=Wt(Pe=>Pe.edgeLookup.get(t));const O=Wt(Pe=>Pe.defaultEdgeOptions);M=O?{...O,...M}:M;let H=M.type||"default",z=(C==null?void 0:C[H])||WT[H];z===void 0&&(w==null||w("011",fo.error011(H)),H="default",z=(C==null?void 0:C.default)||WT.default);const F=!!(M.focusable||e&&typeof M.focusable>"u"),$=typeof g<"u"&&(M.reconnectable||n&&typeof M.reconnectable>"u"),j=!!(M.selectable||i&&typeof M.selectable>"u"),I=P.useRef(null),[Y,X]=P.useState(!1),[ne,q]=P.useState(!1),J=Zn(),{zIndex:B,sourceX:V,sourceY:Z,targetX:Q,targetY:G,sourcePosition:K,targetPosition:te}=Wt(P.useCallback(Pe=>{const Ie=Pe.nodeLookup.get(M.source),We=Pe.nodeLookup.get(M.target);if(!Ie||!We)return{zIndex:M.zIndex,...$T};const ut=iX({id:t,sourceNode:Ie,targetNode:We,sourceHandle:M.sourceHandle||null,targetHandle:M.targetHandle||null,connectionMode:Pe.connectionMode,onError:w});return{zIndex:WV({selected:M.selected,zIndex:M.zIndex,sourceNode:Ie,targetNode:We,elevateOnSelect:Pe.elevateEdgesOnSelect,zIndexMode:Pe.zIndexMode}),...ut||$T}},[M.source,M.target,M.sourceHandle,M.targetHandle,M.selected,M.zIndex]),$n),U=P.useMemo(()=>M.markerStart?`url('#${T_(M.markerStart,S)}')`:void 0,[M.markerStart,S]),le=P.useMemo(()=>M.markerEnd?`url('#${T_(M.markerEnd,S)}')`:void 0,[M.markerEnd,S]);if(M.hidden||V===null||Z===null||Q===null||G===null)return null;const de=Pe=>{var Ue;const{addSelectedEdges:Ie,unselectNodesAndEdges:We,multiSelectionActive:ut}=J.getState();j&&(J.setState({nodesSelectionActive:!1}),M.selected&&ut?(We({nodes:[],edges:[M]}),(Ue=I.current)==null||Ue.blur()):Ie([t])),r&&r(Pe,M)},ge=s?Pe=>{s(Pe,{...M})}:void 0,se=l?Pe=>{l(Pe,{...M})}:void 0,pe=c?Pe=>{c(Pe,{...M})}:void 0,Ae=d?Pe=>{d(Pe,{...M})}:void 0,Le=p?Pe=>{p(Pe,{...M})}:void 0,Ge=Pe=>{var Ie;if(!k&&bN.includes(Pe.key)&&j){const{unselectNodesAndEdges:We,addSelectedEdges:ut}=J.getState();Pe.key==="Escape"?((Ie=I.current)==null||Ie.blur(),We({edges:[M]})):ut([t])}};return N.jsx("svg",{style:{zIndex:B},children:N.jsxs("g",{className:Oi(["react-flow__edge",`react-flow__edge-${H}`,M.className,T,{selected:M.selected,animated:M.animated,inactive:!j&&!r,updating:Y,selectable:j}]),onClick:de,onDoubleClick:ge,onContextMenu:se,onMouseEnter:pe,onMouseMove:Ae,onMouseLeave:Le,onKeyDown:F?Ge:void 0,tabIndex:F?0:void 0,role:M.ariaRole??(F?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":M.ariaLabel===null?void 0:M.ariaLabel||`Edge from ${M.source} to ${M.target}`,"aria-describedby":F?`${$N}-${S}`:void 0,ref:I,...M.domAttributes,children:[!ne&&N.jsx(z,{id:t,source:M.source,target:M.target,type:M.type,selected:M.selected,animated:M.animated,selectable:j,deletable:M.deletable??!0,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,sourceX:V,sourceY:Z,targetX:Q,targetY:G,sourcePosition:K,targetPosition:te,data:M.data,style:M.style,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerStart:U,markerEnd:le,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth}),$&&N.jsx(hW,{edge:M,isReconnectable:$,reconnectRadius:m,onReconnect:g,onReconnectStart:b,onReconnectEnd:v,sourceX:V,sourceY:Z,targetX:Q,targetY:G,sourcePosition:K,targetPosition:te,setUpdateHover:X,setReconnecting:q})]})})}var mW=P.memo(pW);const gW=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function vk({defaultMarkerColor:t,onlyRenderVisibleElements:e,rfId:n,edgeTypes:i,noPanClassName:r,onReconnect:s,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:d,onEdgeMouseLeave:p,onEdgeClick:m,reconnectRadius:g,onEdgeDoubleClick:b,onReconnectStart:v,onReconnectEnd:S,disableKeyboardA11y:C}){const{edgesFocusable:T,edgesReconnectable:w,elementsSelectable:k,onError:M}=Wt(gW,$n),O=eW(e);return N.jsxs("div",{className:"react-flow__edges",children:[N.jsx(aW,{defaultColor:t,rfId:n}),O.map(H=>N.jsx(mW,{id:H,edgesFocusable:T,edgesReconnectable:w,elementsSelectable:k,noPanClassName:r,onReconnect:s,onContextMenu:l,onMouseEnter:c,onMouseMove:d,onMouseLeave:p,onClick:m,reconnectRadius:g,onDoubleClick:b,onReconnectStart:v,onReconnectEnd:S,rfId:n,onError:M,edgeTypes:i,disableKeyboardA11y:C},H))]})}vk.displayName="EdgeRenderer";const yW=P.memo(vk),bW=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function xW({children:t}){const e=Wt(bW);return N.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:e},children:t})}function vW(t){const e=pb(),n=P.useRef(!1);P.useEffect(()=>{!n.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),n.current=!0)},[t,e.viewportInitialized])}const _W=t=>{var e;return(e=t.panZoom)==null?void 0:e.syncViewport};function SW(t){const e=Wt(_W),n=Zn();return P.useEffect(()=>{t&&(e==null||e(t),n.setState({transform:[t.x,t.y,t.zoom]}))},[t,e]),null}function EW(t){return t.connection.inProgress?{...t.connection,to:tg(t.connection.to,t.transform)}:{...t.connection}}function wW(t){return EW}function TW(t){const e=wW();return Wt(e,$n)}const CW=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function AW({containerStyle:t,style:e,type:n,component:i}){const{nodesConnectable:r,width:s,height:l,isValid:c,inProgress:d}=Wt(CW,$n);return!(s&&r&&d)?null:N.jsx("svg",{style:t,width:s,height:l,className:"react-flow__connectionline react-flow__container",children:N.jsx("g",{className:Oi(["react-flow__connection",_N(c)]),children:N.jsx(_k,{style:e,type:n,CustomComponent:i,isValid:c})})})}const _k=({style:t,type:e=nu.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:r,from:s,fromNode:l,fromHandle:c,fromPosition:d,to:p,toNode:m,toHandle:g,toPosition:b,pointer:v}=TW();if(!r)return;if(n)return N.jsx(n,{connectionLineType:e,connectionLineStyle:t,fromNode:l,fromHandle:c,fromX:s.x,fromY:s.y,toX:p.x,toY:p.y,fromPosition:d,toPosition:b,connectionStatus:_N(i),toNode:m,toHandle:g,pointer:v});let S="";const C={sourceX:s.x,sourceY:s.y,sourcePosition:d,targetX:p.x,targetY:p.y,targetPosition:b};switch(e){case nu.Bezier:[S]=DN(C);break;case nu.SimpleBezier:[S]=ok(C);break;case nu.Step:[S]=w_({...C,borderRadius:0});break;case nu.SmoothStep:[S]=w_(C);break;default:[S]=BN(C)}return N.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};_k.displayName="ConnectionLine";const MW={};function JT(t=MW){P.useRef(t),Zn(),P.useEffect(()=>{},[t])}function RW(){Zn(),P.useRef(!1),P.useEffect(()=>{},[])}function Sk({nodeTypes:t,edgeTypes:e,onInit:n,onNodeClick:i,onEdgeClick:r,onNodeDoubleClick:s,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:p,onNodeContextMenu:m,onSelectionContextMenu:g,onSelectionStart:b,onSelectionEnd:v,connectionLineType:S,connectionLineStyle:C,connectionLineComponent:T,connectionLineContainerStyle:w,selectionKeyCode:k,selectionOnDrag:M,selectionMode:O,multiSelectionKeyCode:H,panActivationKeyCode:z,zoomActivationKeyCode:F,deleteKeyCode:$,onlyRenderVisibleElements:j,elementsSelectable:I,defaultViewport:Y,translateExtent:X,minZoom:ne,maxZoom:q,preventScrolling:J,defaultMarkerColor:B,zoomOnScroll:V,zoomOnPinch:Z,panOnScroll:Q,panOnScrollSpeed:G,panOnScrollMode:K,zoomOnDoubleClick:te,panOnDrag:U,onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:ge,onPaneMouseLeave:se,onPaneScroll:pe,onPaneContextMenu:Ae,paneClickDistance:Le,nodeClickDistance:Ge,onEdgeContextMenu:Pe,onEdgeMouseEnter:Ie,onEdgeMouseMove:We,onEdgeMouseLeave:ut,reconnectRadius:Ue,onReconnect:At,onReconnectStart:zn,onReconnectEnd:Bn,noDragClassName:bn,noWheelClassName:wi,noPanClassName:ka,disableKeyboardA11y:Lr,nodeExtent:hn,rfId:ua,viewport:_e,onViewportChange:Ne}){return JT(t),JT(e),RW(),vW(n),SW(_e),N.jsx(qK,{onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:ge,onPaneMouseLeave:se,onPaneContextMenu:Ae,onPaneScroll:pe,paneClickDistance:Le,deleteKeyCode:$,selectionKeyCode:k,selectionOnDrag:M,selectionMode:O,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:H,panActivationKeyCode:z,zoomActivationKeyCode:F,elementsSelectable:I,zoomOnScroll:V,zoomOnPinch:Z,zoomOnDoubleClick:te,panOnScroll:Q,panOnScrollSpeed:G,panOnScrollMode:K,panOnDrag:U,defaultViewport:Y,translateExtent:X,minZoom:ne,maxZoom:q,onSelectionContextMenu:g,preventScrolling:J,noDragClassName:bn,noWheelClassName:wi,noPanClassName:ka,disableKeyboardA11y:Lr,onViewportChange:Ne,isControlledViewport:!!_e,children:N.jsxs(xW,{children:[N.jsx(yW,{edgeTypes:e,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:At,onReconnectStart:zn,onReconnectEnd:Bn,onlyRenderVisibleElements:j,onEdgeContextMenu:Pe,onEdgeMouseEnter:Ie,onEdgeMouseMove:We,onEdgeMouseLeave:ut,reconnectRadius:Ue,defaultMarkerColor:B,noPanClassName:ka,disableKeyboardA11y:Lr,rfId:ua}),N.jsx(AW,{style:C,type:S,component:T,containerStyle:w}),N.jsx("div",{className:"react-flow__edgelabel-renderer"}),N.jsx(JK,{nodeTypes:t,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:p,onNodeContextMenu:m,nodeClickDistance:Ge,onlyRenderVisibleElements:j,noPanClassName:ka,noDragClassName:bn,disableKeyboardA11y:Lr,nodeExtent:hn,rfId:ua}),N.jsx("div",{className:"react-flow__viewport-portal"})]})})}Sk.displayName="GraphView";const NW=P.memo(Sk),eC=({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:l,fitViewOptions:c,minZoom:d=.5,maxZoom:p=2,nodeOrigin:m,nodeExtent:g,zIndexMode:b="basic"}={})=>{const v=new Map,S=new Map,C=new Map,T=new Map,w=i??e??[],k=n??t??[],M=m??[0,0],O=g??Lm;IN(C,T,w);const H=C_(k,v,S,{nodeOrigin:M,nodeExtent:O,zIndexMode:b});let z=[0,0,1];if(l&&r&&s){const F=Jm(v,{filter:Y=>!!((Y.width||Y.initialWidth)&&(Y.height||Y.initialHeight))}),{x:$,y:j,zoom:I}=k1(F,r,s,d,p,(c==null?void 0:c.padding)??.1);z=[$,j,I]}return{rfId:"1",width:r??0,height:s??0,transform:z,nodes:k,nodesInitialized:H,nodeLookup:v,parentLookup:S,edges:w,edgeLookup:T,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:d,maxZoom:p,translateExtent:Lm,nodeExtent:O,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ch.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:M,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:c,fitViewResolver:null,connection:{...vN},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:FV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:xN,zIndexMode:b,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},kW=({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:p,nodeOrigin:m,nodeExtent:g,zIndexMode:b})=>XX((v,S)=>{async function C(){const{nodeLookup:T,panZoom:w,fitViewOptions:k,fitViewResolver:M,width:O,height:H,minZoom:z,maxZoom:F}=S();w&&(await PV({nodes:T,width:O,height:H,panZoom:w,minZoom:z,maxZoom:F},k),M==null||M.resolve(!0),v({fitViewResolver:null}))}return{...eC({nodes:t,edges:e,width:r,height:s,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:p,nodeOrigin:m,nodeExtent:g,defaultNodes:n,defaultEdges:i,zIndexMode:b}),setNodes:T=>{const{nodeLookup:w,parentLookup:k,nodeOrigin:M,elevateNodesOnSelect:O,fitViewQueued:H,zIndexMode:z}=S(),F=C_(T,w,k,{nodeOrigin:M,nodeExtent:g,elevateNodesOnSelect:O,checkEquality:!0,zIndexMode:z});H&&F?(C(),v({nodes:T,nodesInitialized:F,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:T,nodesInitialized:F})},setEdges:T=>{const{connectionLookup:w,edgeLookup:k}=S();IN(w,k,T),v({edges:T})},setDefaultNodesAndEdges:(T,w)=>{if(T){const{setNodes:k}=S();k(T),v({hasDefaultNodes:!0})}if(w){const{setEdges:k}=S();k(w),v({hasDefaultEdges:!0})}},updateNodeInternals:T=>{const{triggerNodeChanges:w,nodeLookup:k,parentLookup:M,domNode:O,nodeOrigin:H,nodeExtent:z,debug:F,fitViewQueued:$,zIndexMode:j}=S(),{changes:I,updatedInternals:Y}=fX(T,k,M,O,H,z,j);Y&&(lX(k,M,{nodeOrigin:H,nodeExtent:z,zIndexMode:j}),$?(C(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(I==null?void 0:I.length)>0&&(F&&console.log("React Flow: trigger node changes",I),w==null||w(I)))},updateNodePositions:(T,w=!1)=>{const k=[];let M=[];const{nodeLookup:O,triggerNodeChanges:H,connection:z,updateConnection:F,onNodesChangeMiddlewareMap:$}=S();for(const[j,I]of T){const Y=O.get(j),X=!!(Y!=null&&Y.expandParent&&(Y!=null&&Y.parentId)&&(I!=null&&I.position)),ne={id:j,type:"position",position:X?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:w};if(Y&&z.inProgress&&z.fromNode.id===Y.id){const q=_f(Y,z.fromHandle,Qe.Left,!0);F({...z,from:q})}X&&Y.parentId&&k.push({id:j,parentId:Y.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),M.push(ne)}if(k.length>0){const{parentLookup:j,nodeOrigin:I}=S(),Y=U1(k,O,j,I);M.push(...Y)}for(const j of $.values())M=j(M);H(M)},triggerNodeChanges:T=>{const{onNodesChange:w,setNodes:k,nodes:M,hasDefaultNodes:O,debug:H}=S();if(T!=null&&T.length){if(O){const z=pK(T,M);k(z)}H&&console.log("React Flow: trigger node changes",T),w==null||w(T)}},triggerEdgeChanges:T=>{const{onEdgesChange:w,setEdges:k,edges:M,hasDefaultEdges:O,debug:H}=S();if(T!=null&&T.length){if(O){const z=mK(T,M);k(z)}H&&console.log("React Flow: trigger edge changes",T),w==null||w(T)}},addSelectedNodes:T=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:M,triggerNodeChanges:O,triggerEdgeChanges:H}=S();if(w){const z=T.map(F=>cf(F,!0));O(z);return}O(Xd(M,new Set([...T]),!0)),H(Xd(k))},addSelectedEdges:T=>{const{multiSelectionActive:w,edgeLookup:k,nodeLookup:M,triggerNodeChanges:O,triggerEdgeChanges:H}=S();if(w){const z=T.map(F=>cf(F,!0));H(z);return}H(Xd(k,new Set([...T]))),O(Xd(M,new Set,!0))},unselectNodesAndEdges:({nodes:T,edges:w}={})=>{const{edges:k,nodes:M,nodeLookup:O,triggerNodeChanges:H,triggerEdgeChanges:z}=S(),F=T||M,$=w||k,j=[];for(const Y of F){if(!Y.selected)continue;const X=O.get(Y.id);X&&(X.selected=!1),j.push(cf(Y.id,!1))}const I=[];for(const Y of $)Y.selected&&I.push(cf(Y.id,!1));H(j),z(I)},setMinZoom:T=>{const{panZoom:w,maxZoom:k}=S();w==null||w.setScaleExtent([T,k]),v({minZoom:T})},setMaxZoom:T=>{const{panZoom:w,minZoom:k}=S();w==null||w.setScaleExtent([k,T]),v({maxZoom:T})},setTranslateExtent:T=>{var w;(w=S().panZoom)==null||w.setTranslateExtent(T),v({translateExtent:T})},resetSelectedElements:()=>{const{edges:T,nodes:w,triggerNodeChanges:k,triggerEdgeChanges:M,elementsSelectable:O}=S();if(!O)return;const H=w.reduce((F,$)=>$.selected?[...F,cf($.id,!1)]:F,[]),z=T.reduce((F,$)=>$.selected?[...F,cf($.id,!1)]:F,[]);k(H),M(z)},setNodeExtent:T=>{const{nodes:w,nodeLookup:k,parentLookup:M,nodeOrigin:O,elevateNodesOnSelect:H,nodeExtent:z,zIndexMode:F}=S();T[0][0]===z[0][0]&&T[0][1]===z[0][1]&&T[1][0]===z[1][0]&&T[1][1]===z[1][1]||(C_(w,k,M,{nodeOrigin:O,nodeExtent:T,elevateNodesOnSelect:H,checkEquality:!1,zIndexMode:F}),v({nodeExtent:T}))},panBy:T=>{const{transform:w,width:k,height:M,panZoom:O,translateExtent:H}=S();return dX({delta:T,panZoom:O,transform:w,translateExtent:H,width:k,height:M})},setCenter:async(T,w,k)=>{const{width:M,height:O,maxZoom:H,panZoom:z}=S();if(!z)return Promise.resolve(!1);const F=typeof(k==null?void 0:k.zoom)<"u"?k.zoom:H;return await z.setViewport({x:M/2-T*F,y:O/2-w*F,zoom:F},{duration:k==null?void 0:k.duration,ease:k==null?void 0:k.ease,interpolate:k==null?void 0:k.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...vN}})},updateConnection:T=>{v({connection:T})},reset:()=>v({...eC()})}},Object.is);function Ek({initialNodes:t,initialEdges:e,defaultNodes:n,defaultEdges:i,initialWidth:r,initialHeight:s,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:d,fitView:p,nodeOrigin:m,nodeExtent:g,zIndexMode:b,children:v}){const[S]=P.useState(()=>kW({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:p,minZoom:l,maxZoom:c,fitViewOptions:d,nodeOrigin:m,nodeExtent:g,zIndexMode:b}));return N.jsx(KX,{value:S,children:N.jsx(xK,{children:v})})}function OW({children:t,nodes:e,edges:n,defaultNodes:i,defaultEdges:r,width:s,height:l,fitView:c,fitViewOptions:d,minZoom:p,maxZoom:m,nodeOrigin:g,nodeExtent:b,zIndexMode:v}){return P.useContext(db)?N.jsx(N.Fragment,{children:t}):N.jsx(Ek,{initialNodes:e,initialEdges:n,defaultNodes:i,defaultEdges:r,initialWidth:s,initialHeight:l,fitView:c,initialFitViewOptions:d,initialMinZoom:p,initialMaxZoom:m,nodeOrigin:g,nodeExtent:b,zIndexMode:v,children:t})}const DW={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function zW({nodes:t,edges:e,defaultNodes:n,defaultEdges:i,className:r,nodeTypes:s,edgeTypes:l,onNodeClick:c,onEdgeClick:d,onInit:p,onMove:m,onMoveStart:g,onMoveEnd:b,onConnect:v,onConnectStart:S,onConnectEnd:C,onClickConnectStart:T,onClickConnectEnd:w,onNodeMouseEnter:k,onNodeMouseMove:M,onNodeMouseLeave:O,onNodeContextMenu:H,onNodeDoubleClick:z,onNodeDragStart:F,onNodeDrag:$,onNodeDragStop:j,onNodesDelete:I,onEdgesDelete:Y,onDelete:X,onSelectionChange:ne,onSelectionDragStart:q,onSelectionDrag:J,onSelectionDragStop:B,onSelectionContextMenu:V,onSelectionStart:Z,onSelectionEnd:Q,onBeforeDelete:G,connectionMode:K,connectionLineType:te=nu.Bezier,connectionLineStyle:U,connectionLineComponent:le,connectionLineContainerStyle:de,deleteKeyCode:ge="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:pe=!1,selectionMode:Ae=Um.Full,panActivationKeyCode:Le="Space",multiSelectionKeyCode:Ge=Hm()?"Meta":"Control",zoomActivationKeyCode:Pe=Hm()?"Meta":"Control",snapToGrid:Ie,snapGrid:We,onlyRenderVisibleElements:ut=!1,selectNodesOnDrag:Ue,nodesDraggable:At,autoPanOnNodeFocus:zn,nodesConnectable:Bn,nodesFocusable:bn,nodeOrigin:wi=ZN,edgesFocusable:ka,edgesReconnectable:Lr,elementsSelectable:hn=!0,defaultViewport:ua=lK,minZoom:_e=.5,maxZoom:Ne=2,translateExtent:Je=Lm,preventScrolling:bt=!0,nodeExtent:kt,defaultMarkerColor:yi="#b1b1b7",zoomOnScroll:rr=!0,zoomOnPinch:xn=!0,panOnScroll:$t=!1,panOnScrollSpeed:Gn=.5,panOnScrollMode:Pt=pf.Free,zoomOnDoubleClick:Fi=!0,panOnDrag:Qn=!0,onPaneClick:go,onPaneMouseEnter:rs,onPaneMouseMove:Oa,onPaneMouseLeave:as,onPaneScroll:bi,onPaneContextMenu:ae,paneClickDistance:Ee=1,nodeClickDistance:ze=0,children:et,onReconnect:Jt,onReconnectStart:en,onReconnectEnd:Fe,onEdgeContextMenu:He,onEdgeDoubleClick:tt,onEdgeMouseEnter:Cn,onEdgeMouseMove:Gt,onEdgeMouseLeave:fa,reconnectRadius:ar=10,onNodesChange:qi,onEdgesChange:sr,noDragClassName:yt="nodrag",noWheelClassName:li="nowheel",noPanClassName:Ur="nopan",fitView:Bs,fitViewOptions:_l,connectOnClick:Sl,attributionPosition:El,proOptions:Da,defaultEdgeOptions:Ls,elevateNodesOnSelect:tn=!0,elevateEdgesOnSelect:nn=!1,disableKeyboardA11y:lr=!1,autoPanOnConnect:Ir,autoPanOnNodeDrag:Ln,autoPanSpeed:xr,connectionRadius:da,isValidConnection:Hr,onError:Me,style:Ve,id:xt,nodeDragThreshold:Xt,connectionDragThreshold:Un,viewport:xi,onViewportChange:Yi,width:Ti,height:un,colorMode:or="light",debug:yo,onScroll:ha,ariaLabelConfig:wl,zIndexMode:za="basic",...oc},Di){const ss=xt||"1",ls=fK(or),Us=P.useCallback(oi=>{oi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ha==null||ha(oi)},[ha]);return N.jsx("div",{"data-testid":"rf__wrapper",...oc,onScroll:Us,style:{...Ve,...DW},ref:Di,className:Oi(["react-flow",r,ls]),id:xt,role:"application",children:N.jsxs(OW,{nodes:t,edges:e,width:Ti,height:un,fitView:Bs,fitViewOptions:_l,minZoom:_e,maxZoom:Ne,nodeOrigin:wi,nodeExtent:kt,zIndexMode:za,children:[N.jsx(NW,{onInit:p,onNodeClick:c,onEdgeClick:d,onNodeMouseEnter:k,onNodeMouseMove:M,onNodeMouseLeave:O,onNodeContextMenu:H,onNodeDoubleClick:z,nodeTypes:s,edgeTypes:l,connectionLineType:te,connectionLineStyle:U,connectionLineComponent:le,connectionLineContainerStyle:de,selectionKeyCode:se,selectionOnDrag:pe,selectionMode:Ae,deleteKeyCode:ge,multiSelectionKeyCode:Ge,panActivationKeyCode:Le,zoomActivationKeyCode:Pe,onlyRenderVisibleElements:ut,defaultViewport:ua,translateExtent:Je,minZoom:_e,maxZoom:Ne,preventScrolling:bt,zoomOnScroll:rr,zoomOnPinch:xn,zoomOnDoubleClick:Fi,panOnScroll:$t,panOnScrollSpeed:Gn,panOnScrollMode:Pt,panOnDrag:Qn,onPaneClick:go,onPaneMouseEnter:rs,onPaneMouseMove:Oa,onPaneMouseLeave:as,onPaneScroll:bi,onPaneContextMenu:ae,paneClickDistance:Ee,nodeClickDistance:ze,onSelectionContextMenu:V,onSelectionStart:Z,onSelectionEnd:Q,onReconnect:Jt,onReconnectStart:en,onReconnectEnd:Fe,onEdgeContextMenu:He,onEdgeDoubleClick:tt,onEdgeMouseEnter:Cn,onEdgeMouseMove:Gt,onEdgeMouseLeave:fa,reconnectRadius:ar,defaultMarkerColor:yi,noDragClassName:yt,noWheelClassName:li,noPanClassName:Ur,rfId:ss,disableKeyboardA11y:lr,nodeExtent:kt,viewport:xi,onViewportChange:Yi}),N.jsx(uK,{nodes:t,edges:e,defaultNodes:n,defaultEdges:i,onConnect:v,onConnectStart:S,onConnectEnd:C,onClickConnectStart:T,onClickConnectEnd:w,nodesDraggable:At,autoPanOnNodeFocus:zn,nodesConnectable:Bn,nodesFocusable:bn,edgesFocusable:ka,edgesReconnectable:Lr,elementsSelectable:hn,elevateNodesOnSelect:tn,elevateEdgesOnSelect:nn,minZoom:_e,maxZoom:Ne,nodeExtent:kt,onNodesChange:qi,onEdgesChange:sr,snapToGrid:Ie,snapGrid:We,connectionMode:K,translateExtent:Je,connectOnClick:Sl,defaultEdgeOptions:Ls,fitView:Bs,fitViewOptions:_l,onNodesDelete:I,onEdgesDelete:Y,onDelete:X,onNodeDragStart:F,onNodeDrag:$,onNodeDragStop:j,onSelectionDrag:J,onSelectionDragStart:q,onSelectionDragStop:B,onMove:m,onMoveStart:g,onMoveEnd:b,noPanClassName:Ur,nodeOrigin:wi,rfId:ss,autoPanOnConnect:Ir,autoPanOnNodeDrag:Ln,autoPanSpeed:xr,onError:Me,connectionRadius:da,isValidConnection:Hr,selectNodesOnDrag:Ue,nodeDragThreshold:Xt,connectionDragThreshold:Un,onBeforeDelete:G,debug:yo,ariaLabelConfig:wl,zIndexMode:za}),N.jsx(sK,{onSelectionChange:ne}),et,N.jsx(tK,{proOptions:Da,position:El}),N.jsx(eK,{rfId:ss,disableKeyboardA11y:lr})]})})}var BW=JN(zW);function LW({dimensions:t,lineWidth:e,variant:n,className:i}){return N.jsx("path",{strokeWidth:e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:Oi(["react-flow__background-pattern",n,i])})}function UW({radius:t,className:e}){return N.jsx("circle",{cx:t,cy:t,r:t,className:Oi(["react-flow__background-pattern","dots",e])})}var ru;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(ru||(ru={}));const IW={[ru.Dots]:1,[ru.Lines]:1,[ru.Cross]:6},HW=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function wk({id:t,variant:e=ru.Dots,gap:n=20,size:i,lineWidth:r=1,offset:s=0,color:l,bgColor:c,style:d,className:p,patternClassName:m}){const g=P.useRef(null),{transform:b,patternId:v}=Wt(HW,$n),S=i||IW[e],C=e===ru.Dots,T=e===ru.Cross,w=Array.isArray(n)?n:[n,n],k=[w[0]*b[2]||1,w[1]*b[2]||1],M=S*b[2],O=Array.isArray(s)?s:[s,s],H=T?[M,M]:k,z=[O[0]*b[2]||1+H[0]/2,O[1]*b[2]||1+H[1]/2],F=`${v}${t||""}`;return N.jsxs("svg",{className:Oi(["react-flow__background",p]),style:{...d,...mb,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:g,"data-testid":"rf__background",children:[N.jsx("pattern",{id:F,x:b[0]%k[0],y:b[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:C?N.jsx(UW,{radius:M/2,className:m}):N.jsx(LW,{dimensions:H,lineWidth:r,variant:e,className:m})}),N.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${F})`})]})}wk.displayName="Background";const jW=P.memo(wk);function PW(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:N.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function GW(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:N.jsx("path",{d:"M0 0h32v4.2H0z"})})}function FW(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:N.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function qW(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function YW(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function r0({children:t,className:e,...n}){return N.jsx("button",{type:"button",className:Oi(["react-flow__controls-button",e]),...n,children:t})}const VW=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Tk({style:t,showZoom:e=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:r,onZoomIn:s,onZoomOut:l,onFitView:c,onInteractiveChange:d,className:p,children:m,position:g="bottom-left",orientation:b="vertical","aria-label":v}){const S=Zn(),{isInteractive:C,minZoomReached:T,maxZoomReached:w,ariaLabelConfig:k}=Wt(VW,$n),{zoomIn:M,zoomOut:O,fitView:H}=pb(),z=()=>{M(),s==null||s()},F=()=>{O(),l==null||l()},$=()=>{H(r),c==null||c()},j=()=>{S.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),d==null||d(!C)},I=b==="horizontal"?"horizontal":"vertical";return N.jsxs(hb,{className:Oi(["react-flow__controls",I,p]),position:g,style:t,"data-testid":"rf__controls","aria-label":v??k["controls.ariaLabel"],children:[e&&N.jsxs(N.Fragment,{children:[N.jsx(r0,{onClick:z,className:"react-flow__controls-zoomin",title:k["controls.zoomIn.ariaLabel"],"aria-label":k["controls.zoomIn.ariaLabel"],disabled:w,children:N.jsx(PW,{})}),N.jsx(r0,{onClick:F,className:"react-flow__controls-zoomout",title:k["controls.zoomOut.ariaLabel"],"aria-label":k["controls.zoomOut.ariaLabel"],disabled:T,children:N.jsx(GW,{})})]}),n&&N.jsx(r0,{className:"react-flow__controls-fitview",onClick:$,title:k["controls.fitView.ariaLabel"],"aria-label":k["controls.fitView.ariaLabel"],children:N.jsx(FW,{})}),i&&N.jsx(r0,{className:"react-flow__controls-interactive",onClick:j,title:k["controls.interactive.ariaLabel"],"aria-label":k["controls.interactive.ariaLabel"],children:C?N.jsx(YW,{}):N.jsx(qW,{})}),m]})}Tk.displayName="Controls";const XW=P.memo(Tk);function KW({id:t,x:e,y:n,width:i,height:r,style:s,color:l,strokeColor:c,strokeWidth:d,className:p,borderRadius:m,shapeRendering:g,selected:b,onClick:v}){const{background:S,backgroundColor:C}=s||{},T=l||S||C;return N.jsx("rect",{className:Oi(["react-flow__minimap-node",{selected:b},p]),x:e,y:n,rx:m,ry:m,width:i,height:r,style:{fill:T,stroke:c,strokeWidth:d},shapeRendering:g,onClick:v?w=>v(w,t):void 0})}const WW=P.memo(KW),$W=t=>t.nodes.map(e=>e.id),wv=t=>t instanceof Function?t:()=>t;function ZW({nodeStrokeColor:t,nodeColor:e,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:r,nodeComponent:s=WW,onClick:l}){const c=Wt($W,$n),d=wv(e),p=wv(t),m=wv(n),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return N.jsx(N.Fragment,{children:c.map(b=>N.jsx(JW,{id:b,nodeColorFunc:d,nodeStrokeColorFunc:p,nodeClassNameFunc:m,nodeBorderRadius:i,nodeStrokeWidth:r,NodeComponent:s,onClick:l,shapeRendering:g},b))})}function QW({id:t,nodeColorFunc:e,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:r,nodeStrokeWidth:s,shapeRendering:l,NodeComponent:c,onClick:d}){const{node:p,x:m,y:g,width:b,height:v}=Wt(S=>{const C=S.nodeLookup.get(t);if(!C)return{node:void 0,x:0,y:0,width:0,height:0};const T=C.internals.userNode,{x:w,y:k}=C.internals.positionAbsolute,{width:M,height:O}=lc(T);return{node:T,x:w,y:k,width:M,height:O}},$n);return!p||p.hidden||!AN(p)?null:N.jsx(c,{x:m,y:g,width:b,height:v,style:p.style,selected:!!p.selected,className:i(p),color:e(p),borderRadius:r,strokeColor:n(p),strokeWidth:s,shapeRendering:l,onClick:d,id:p.id})}const JW=P.memo(QW);var e$=P.memo(ZW);const t$=200,n$=150,i$=t=>!t.hidden,r$=t=>{const e={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:e,boundingRect:t.nodeLookup.size>0?CN(Jm(t.nodeLookup,{filter:i$}),e):e,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},a$="react-flow__minimap-desc";function Ck({style:t,className:e,nodeStrokeColor:n,nodeColor:i,nodeClassName:r="",nodeBorderRadius:s=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:d,maskColor:p,maskStrokeColor:m,maskStrokeWidth:g,position:b="bottom-right",onClick:v,onNodeClick:S,pannable:C=!1,zoomable:T=!1,ariaLabel:w,inversePan:k,zoomStep:M=1,offsetScale:O=5}){const H=Zn(),z=P.useRef(null),{boundingRect:F,viewBB:$,rfId:j,panZoom:I,translateExtent:Y,flowWidth:X,flowHeight:ne,ariaLabelConfig:q}=Wt(r$,$n),J=(t==null?void 0:t.width)??t$,B=(t==null?void 0:t.height)??n$,V=F.width/J,Z=F.height/B,Q=Math.max(V,Z),G=Q*J,K=Q*B,te=O*Q,U=F.x-(G-F.width)/2-te,le=F.y-(K-F.height)/2-te,de=G+te*2,ge=K+te*2,se=`${a$}-${j}`,pe=P.useRef(0),Ae=P.useRef();pe.current=Q,P.useEffect(()=>{if(z.current&&I)return Ae.current=_X({domNode:z.current,panZoom:I,getTransform:()=>H.getState().transform,getViewScale:()=>pe.current}),()=>{var Ie;(Ie=Ae.current)==null||Ie.destroy()}},[I]),P.useEffect(()=>{var Ie;(Ie=Ae.current)==null||Ie.update({translateExtent:Y,width:X,height:ne,inversePan:k,pannable:C,zoomStep:M,zoomable:T})},[C,T,k,M,Y,X,ne]);const Le=v?Ie=>{var Ue;const[We,ut]=((Ue=Ae.current)==null?void 0:Ue.pointer(Ie))||[0,0];v(Ie,{x:We,y:ut})}:void 0,Ge=S?P.useCallback((Ie,We)=>{const ut=H.getState().nodeLookup.get(We).internals.userNode;S(Ie,ut)},[]):void 0,Pe=w??q["minimap.ariaLabel"];return N.jsx(hb,{position:b,style:{...t,"--xy-minimap-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof g=="number"?g*Q:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Oi(["react-flow__minimap",e]),"data-testid":"rf__minimap",children:N.jsxs("svg",{width:J,height:B,viewBox:`${U} ${le} ${de} ${ge}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:z,onClick:Le,children:[Pe&&N.jsx("title",{id:se,children:Pe}),N.jsx(e$,{onClick:Ge,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:c}),N.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-te},${le-te}h${de+te*2}v${ge+te*2}h${-de-te*2}z
|
|
400
|
+
M${$.x},${$.y}h${$.width}v${$.height}h${-$.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Ck.displayName="MiniMap";const s$=P.memo(Ck),l$=t=>e=>t?`${Math.max(1/e.transform[2],1)}`:void 0,o$={[hh.Line]:"right",[hh.Handle]:"bottom-right"};function c$({nodeId:t,position:e,variant:n=hh.Handle,className:i,style:r=void 0,children:s,color:l,minWidth:c=10,minHeight:d=10,maxWidth:p=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:g=!1,resizeDirection:b,autoScale:v=!0,shouldResize:S,onResizeStart:C,onResize:T,onResizeEnd:w}){const k=ik(),M=typeof t=="string"?t:k,O=Zn(),H=P.useRef(null),z=n===hh.Handle,F=Wt(P.useCallback(l$(z&&v),[z,v]),$n),$=P.useRef(null),j=e??o$[n];P.useEffect(()=>{if(!(!H.current||!M))return $.current||($.current=BX({domNode:H.current,nodeId:M,getStoreItems:()=>{const{nodeLookup:Y,transform:X,snapGrid:ne,snapToGrid:q,nodeOrigin:J,domNode:B}=O.getState();return{nodeLookup:Y,transform:X,snapGrid:ne,snapToGrid:q,nodeOrigin:J,paneDomNode:B}},onChange:(Y,X)=>{const{triggerNodeChanges:ne,nodeLookup:q,parentLookup:J,nodeOrigin:B}=O.getState(),V=[],Z={x:Y.x,y:Y.y},Q=q.get(M);if(Q&&Q.expandParent&&Q.parentId){const G=Q.origin??B,K=Y.width??Q.measured.width??0,te=Y.height??Q.measured.height??0,U={id:Q.id,parentId:Q.parentId,rect:{width:K,height:te,...MN({x:Y.x??Q.position.x,y:Y.y??Q.position.y},{width:K,height:te},Q.parentId,q,G)}},le=U1([U],q,J,B);V.push(...le),Z.x=Y.x?Math.max(G[0]*K,Y.x):void 0,Z.y=Y.y?Math.max(G[1]*te,Y.y):void 0}if(Z.x!==void 0&&Z.y!==void 0){const G={id:M,type:"position",position:{...Z}};V.push(G)}if(Y.width!==void 0&&Y.height!==void 0){const K={id:M,type:"dimensions",resizing:!0,setAttributes:b?b==="horizontal"?"width":"height":!0,dimensions:{width:Y.width,height:Y.height}};V.push(K)}for(const G of X){const K={...G,type:"position"};V.push(K)}ne(V)},onEnd:({width:Y,height:X})=>{const ne={id:M,type:"dimensions",resizing:!1,dimensions:{width:Y,height:X}};O.getState().triggerNodeChanges([ne])}})),$.current.update({controlPosition:j,boundaries:{minWidth:c,minHeight:d,maxWidth:p,maxHeight:m},keepAspectRatio:g,resizeDirection:b,onResizeStart:C,onResize:T,onResizeEnd:w,shouldResize:S}),()=>{var Y;(Y=$.current)==null||Y.destroy()}},[j,c,d,p,m,g,C,T,w,S]);const I=j.split("-");return N.jsx("div",{className:Oi(["react-flow__resize-control","nodrag",...I,n,i]),ref:H,style:{...r,scale:F,...l&&{[z?"backgroundColor":"borderColor"]:l}},children:s})}P.memo(c$);const Ak={background:"rgba(0, 200, 255, 0.4)",width:6,height:6,border:"none"},tC={background:"rgba(0, 230, 138, 0.4)",width:6,height:6,border:"none"};function u$({data:t}){return N.jsxs("div",{style:{padding:"16px 32px",border:"2px solid rgba(0, 200, 255, 0.4)",borderRadius:12,background:"linear-gradient(135deg, #121425, #1a1d35)",boxShadow:"0 0 30px rgba(0, 200, 255, 0.15), 0 4px 16px rgba(0,0,0,0.5)",textAlign:"center",minWidth:200},children:[N.jsx(su,{type:"source",position:Qe.Bottom,style:Ak}),N.jsx("div",{style:{width:44,height:44,borderRadius:8,background:"linear-gradient(135deg, #00c8ff, #0090b8)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem",fontWeight:700,color:"#07080e",margin:"0 auto 8px",boxShadow:"0 0 16px rgba(0, 200, 255, 0.35)"},children:t.label.slice(0,2).toUpperCase()}),N.jsx("div",{style:{fontFamily:"'Outfit', sans-serif",fontWeight:700,fontSize:"1rem",color:"#e8ecf4"},children:t.label}),N.jsx("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.6rem",color:"#555d73",marginTop:3},children:"CEO"})]})}function f$({data:t}){const e=t.agents;return N.jsxs("div",{style:{padding:"14px 20px",border:"1px solid rgba(0, 230, 138, 0.25)",borderRadius:10,background:"linear-gradient(135deg, #0d1a14, #121425)",boxShadow:"0 0 16px rgba(0, 230, 138, 0.08), 0 2px 8px rgba(0,0,0,0.3)",textAlign:"center",minWidth:160},children:[N.jsx(su,{type:"target",position:Qe.Top,style:tC}),N.jsx(su,{type:"source",position:Qe.Bottom,style:tC}),N.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,marginBottom:4},children:[N.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:5,background:"rgba(0, 230, 138, 0.15)",border:"1px solid rgba(0, 230, 138, 0.25)",fontSize:"0.6rem",color:"#00e68a",fontWeight:700},children:t.label.slice(0,1).toUpperCase()}),N.jsx("span",{style:{fontFamily:"'Outfit', sans-serif",fontWeight:600,fontSize:"0.82rem",color:"#00e68a"},children:t.label})]}),t.description?N.jsx("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.55rem",color:"#555d73",marginBottom:4,maxWidth:180},children:String(t.description)}):null,N.jsxs("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.55rem",color:"#555d73"},children:[e.length," agent",e.length!==1?"s":""]})]})}function d$({data:t}){return N.jsxs("div",{style:{padding:"8px 16px",border:"1px solid rgba(100, 120, 200, 0.12)",borderRadius:6,background:"#0c0e18",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",textAlign:"center",minWidth:110},children:[N.jsx(su,{type:"target",position:Qe.Top,style:Ak}),N.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6},children:[N.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#00e68a",boxShadow:"0 0 6px rgba(0,230,138,0.4)",flexShrink:0}}),N.jsx("span",{style:{fontFamily:"'Outfit', sans-serif",fontWeight:500,fontSize:"0.72rem",color:"#8b93a8"},children:t.label})]})]})}const h$={company:u$,squad:f$,agent:d$},nC=280,p$=52,m$=170;function g$(t){const{tree:e,squads:n}=t,i=[],r=[];if(n.length===0)return i.push({id:"company",type:"company",position:{x:0,y:0},data:{label:e.name},draggable:!0}),{nodes:i,edges:r};const l=n.length*nC/2-100;return i.push({id:"company",type:"company",position:{x:l,y:0},data:{label:e.name},draggable:!0}),n.forEach((c,d)=>{const p=`squad-${c.code}`,m=d*nC;i.push({id:p,type:"squad",position:{x:m,y:200},data:{label:c.name,description:c.description,agents:c.agents},draggable:!0}),r.push({id:`company-${p}`,source:"company",target:p,style:{stroke:"rgba(0, 230, 138, 0.3)",strokeWidth:2},animated:!1});const g=c.agents.length,b=Math.min(g,2),v=m+80;c.agents.forEach((S,C)=>{const T=C%b,w=Math.floor(C/b),k=v+(T-(b-1)/2)*m$-55,M=400+w*p$,O=`agent-${c.code}-${S.id}`;i.push({id:O,type:"agent",position:{x:k,y:M},data:{label:S.name},draggable:!0}),r.push({id:`${p}-${O}`,source:p,target:O,style:{stroke:"rgba(100, 120, 200, 0.15)",strokeWidth:1},animated:!1})})}),{nodes:i,edges:r}}function y$({data:t}){const{fitView:e}=pb(),{nodes:n,edges:i}=P.useMemo(()=>g$(t),[t]);P.useEffect(()=>{const s=setTimeout(()=>e({padding:.12,duration:400}),50);return()=>clearTimeout(s)},[n.length,e]);const r=t.squads.reduce((s,l)=>s+l.agents.length,0);return N.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",animation:"fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both"},children:[N.jsxs("div",{style:{padding:"16px 20px 12px",flexShrink:0},children:[N.jsxs("h2",{style:{fontFamily:"'Outfit', sans-serif",fontWeight:700,fontSize:"1.1rem",color:"#e8ecf4",marginBottom:2},children:[t.tree.name," — Org Chart"]}),N.jsxs("p",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.65rem",color:"#555d73"},children:[t.squads.length," active squad",t.squads.length!==1?"s":""," / ",r," agents"]})]}),N.jsx("div",{style:{flex:1,minHeight:0},children:N.jsxs(BW,{nodes:n,edges:i,nodeTypes:h$,fitView:!0,fitViewOptions:{padding:.12},minZoom:.1,maxZoom:2,proOptions:{hideAttribution:!0},style:{background:"#07080e"},nodesDraggable:!0,nodesConnectable:!1,children:[N.jsx(jW,{color:"rgba(100, 120, 200, 0.04)",gap:24,size:1}),N.jsx(XW,{showInteractive:!1,style:{background:"#121425",border:"1px solid rgba(100, 120, 200, 0.15)",borderRadius:8}}),N.jsx(s$,{nodeColor:s=>s.type==="company"?"#00c8ff":s.type==="squad"?"#00e68a":"#555d73",maskColor:"rgba(7, 8, 14, 0.85)",style:{background:"#0c0e18",border:"1px solid rgba(100, 120, 200, 0.1)",borderRadius:8}})]})})]})}function b$(){const[t,e]=P.useState(null),[n,i]=P.useState(!0),[r,s]=P.useState(null);return P.useEffect(()=>{fetch("/api/orgchart",{credentials:"include"}).then(l=>{if(!l.ok)throw new Error(`HTTP ${l.status}`);return l.json()}).then(l=>{e(l),i(!1)}).catch(l=>{s(l.message),i(!1)})},[]),n?N.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.75rem",color:"#555d73"},children:"Loading org chart..."}):r||!t?N.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.75rem",color:"#ff4070"},children:r||"Failed to load org chart"}):N.jsx(Ek,{children:N.jsx(y$,{data:t})})}const Mk={squad:"#00c8ff",agent:"#00e68a",memory:"#b388ff",skill:"#ffab40"},R_={squad:18,agent:12,memory:8,skill:8},iC={contains:"rgba(255,255,255,0.08)",pipeline:"rgba(0,200,255,0.4)",delivers:"rgba(0,230,138,0.5)",uses_skill:"rgba(255,171,64,0.15)",has_memory:"rgba(179,136,255,0.15)",shared_skill:"rgba(255,171,64,0.3)",shared_memory:"rgba(179,136,255,0.3)"};function x$(t,e,n,i){const r=n/2,s=i/2,l=3e3,c=.008,d=.01,p=.85;for(let m=0;m<t.length;m++){let g=0,b=0;for(let v=0;v<t.length;v++){if(m===v)continue;const S=t[m].x-t[v].x,C=t[m].y-t[v].y,T=S*S+C*C+1,w=l/T,k=Math.sqrt(T);g+=S/k*w,b+=C/k*w}g+=(r-t[m].x)*d,b+=(s-t[m].y)*d,t[m].vx=(t[m].vx+g)*p,t[m].vy=(t[m].vy+b)*p}for(const m of e){const g=t.findIndex(M=>M.id===m.source),b=t.findIndex(M=>M.id===m.target);if(g===-1||b===-1)continue;const v=t[b].x-t[g].x,S=t[b].y-t[g].y,C=Math.sqrt(v*v+S*S)+1,T=(C-100)*c,w=v/C*T,k=S/C*T;t[g].vx+=w,t[g].vy+=k,t[b].vx-=w,t[b].vy-=k}for(const m of t)m.x+=m.vx,m.y+=m.vy}function v$(t,e,n,i,r,s,l,c,d){t.clearRect(0,0,i,r),t.save(),t.translate(l,c),t.scale(d,d);const p=new Map(e.map(m=>[m.id,m]));for(const m of n){const g=p.get(m.source),b=p.get(m.target);if(!g||!b)continue;const v=s&&(m.source===s.id||m.target===s.id);if(t.beginPath(),t.moveTo(g.x,g.y),t.lineTo(b.x,b.y),t.strokeStyle=v?"rgba(255,255,255,0.5)":iC[m.type]||"rgba(255,255,255,0.06)",t.lineWidth=v?1.5:m.type==="delivers"||m.type==="pipeline"?1.2:.5,t.stroke(),m.type==="delivers"||m.type==="pipeline"){const S=Math.atan2(b.y-g.y,b.x-g.x),C=R_[b.type]||10,T=b.x-Math.cos(S)*(C+4),w=b.y-Math.sin(S)*(C+4);t.beginPath(),t.moveTo(T,w),t.lineTo(T-Math.cos(S-.4)*6,w-Math.sin(S-.4)*6),t.lineTo(T-Math.cos(S+.4)*6,w-Math.sin(S+.4)*6),t.closePath(),t.fillStyle=iC[m.type],t.fill()}}for(const m of e){const g=R_[m.type]||10,b=Mk[m.type]||"#888",v=(s==null?void 0:s.id)===m.id,S=s&&n.some(w=>w.source===s.id&&w.target===m.id||w.target===s.id&&w.source===m.id),C=s&&!v&&!S;t.beginPath(),t.arc(m.x,m.y,g,0,Math.PI*2),v&&(t.shadowColor=b,t.shadowBlur=20),t.fillStyle=C?`${b}33`:b,t.globalAlpha=C?.3:1,t.fill(),t.shadowBlur=0;const T=m.type==="squad"?11:9;t.font=`${m.type==="squad"?"600":"400"} ${T}px "JetBrains Mono", monospace`,t.textAlign="center",t.textBaseline="top",t.fillStyle=C?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.85)",t.fillText(m.label,m.x,m.y+g+4),t.globalAlpha=1}t.restore()}function _$(){const t=P.useRef(null),[e,n]=P.useState([]),[i,r]=P.useState([]),[s,l]=P.useState(!0),[c,d]=P.useState(null),p=P.useRef(null),m=P.useRef(null),g=P.useRef({x:0,y:0}),b=P.useRef(1),v=P.useRef(!1),S=P.useRef({x:0,y:0}),C=P.useRef([]),T=P.useRef([]),w=P.useRef(0);P.useEffect(()=>{fetch("/api/graph",{credentials:"include"}).then(M=>M.json()).then(M=>{const O=window.innerWidth,H=window.innerHeight,z=M.nodes.map((F,$)=>({...F,x:O/2+(Math.random()-.5)*400,y:H/2+(Math.random()-.5)*400,vx:0,vy:0}));C.current=z,T.current=M.edges,n(z),r(M.edges),l(!1)}).catch(()=>{d("Failed to load graph data"),l(!1)})},[]);const k=P.useCallback((M,O)=>{const H=g.current,z=b.current,F=(M-H.x)/z,$=(O-H.y)/z;for(let j=C.current.length-1;j>=0;j--){const I=C.current[j],Y=R_[I.type]||10,X=F-I.x,ne=$-I.y;if(X*X+ne*ne<(Y+4)*(Y+4))return I}return null},[]);return P.useEffect(()=>{const M=t.current;if(!M)return;const O=$=>{const j=M.getBoundingClientRect(),I=$.clientX-j.left,Y=$.clientY-j.top;if(m.current){const ne=b.current,q=g.current;m.current.x=(I-q.x)/ne,m.current.y=(Y-q.y)/ne,m.current.vx=0,m.current.vy=0;return}if(v.current){g.current.x+=I-S.current.x,g.current.y+=Y-S.current.y,S.current={x:I,y:Y};return}const X=k(I,Y);p.current=X,M.style.cursor=X?"grab":"default"},H=$=>{const j=M.getBoundingClientRect(),I=$.clientX-j.left,Y=$.clientY-j.top,X=k(I,Y);X?(m.current=X,M.style.cursor="grabbing"):(v.current=!0,S.current={x:I,y:Y},M.style.cursor="move")},z=()=>{m.current=null,v.current=!1,M.style.cursor="default"},F=$=>{$.preventDefault();const j=M.getBoundingClientRect(),I=$.clientX-j.left,Y=$.clientY-j.top,X=$.deltaY>0?.92:1.08,ne=Math.max(.2,Math.min(5,b.current*X)),q=ne/b.current;g.current.x=I-(I-g.current.x)*q,g.current.y=Y-(Y-g.current.y)*q,b.current=ne};return M.addEventListener("mousemove",O),M.addEventListener("mousedown",H),M.addEventListener("mouseup",z),M.addEventListener("mouseleave",z),M.addEventListener("wheel",F,{passive:!1}),()=>{M.removeEventListener("mousemove",O),M.removeEventListener("mousedown",H),M.removeEventListener("mouseup",z),M.removeEventListener("mouseleave",z),M.removeEventListener("wheel",F)}},[k]),P.useEffect(()=>{if(s||C.current.length===0)return;const M=t.current;if(!M)return;const O=()=>{const $=M.parentElement;$&&(M.width=$.clientWidth*window.devicePixelRatio,M.height=$.clientHeight*window.devicePixelRatio,M.style.width=$.clientWidth+"px",M.style.height=$.clientHeight+"px")};O(),window.addEventListener("resize",O);const H=M.getContext("2d");let z=!0;const F=()=>{if(!z)return;const $=M.width/window.devicePixelRatio,j=M.height/window.devicePixelRatio;H.setTransform(window.devicePixelRatio,0,0,window.devicePixelRatio,0,0),x$(C.current,T.current,$,j),v$(H,C.current,T.current,$,j,p.current,g.current.x,g.current.y,b.current),w.current=requestAnimationFrame(F)};return w.current=requestAnimationFrame(F),()=>{z=!1,cancelAnimationFrame(w.current),window.removeEventListener("resize",O)}},[s]),s?N.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.8rem"},children:"Loading graph..."}):c?N.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.8rem"},children:c}):N.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[N.jsx("canvas",{ref:t,style:{display:"block"}}),N.jsx("div",{style:{position:"absolute",bottom:16,left:16,background:"rgba(10, 12, 16, 0.85)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-subtle)",padding:"10px 14px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",flexDirection:"column",gap:6},children:Object.entries(Mk).map(([M,O])=>N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[N.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:O,display:"inline-block"}}),N.jsx("span",{style:{textTransform:"capitalize"},children:M})]},M))}),N.jsxs("div",{style:{position:"absolute",top:16,right:16,background:"rgba(10, 12, 16, 0.85)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-subtle)",padding:"10px 14px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",gap:16},children:[N.jsxs("span",{children:[e.length," nodes"]}),N.jsxs("span",{children:[i.length," edges"]})]})]})}const S$=P.lazy(()=>Kd(()=>import("./JarvisView-CRecMJxY.js"),[]).then(t=>({default:t.JarvisView})));RO.createRoot(document.getElementById("root")).render(N.jsx(P.StrictMode,{children:N.jsx(J3,{children:N.jsxs(R3,{children:[N.jsx(Wa,{path:"/login",element:N.jsx(qD,{})}),N.jsxs(Wa,{path:"/",element:N.jsx(FD,{}),children:[N.jsx(Wa,{index:!0,element:N.jsx(A3,{to:"/office",replace:!0})}),N.jsx(Wa,{path:"office",element:N.jsx(g8,{})}),N.jsx(Wa,{path:"chat",element:N.jsx(LG,{})}),N.jsx(Wa,{path:"kanban",element:N.jsx(GG,{})}),N.jsx(Wa,{path:"settings",element:N.jsx(QG,{})}),N.jsx(Wa,{path:"scheduler",element:N.jsx(JG,{})}),N.jsx(Wa,{path:"email",element:N.jsx(iF,{})}),N.jsx(Wa,{path:"orgchart",element:N.jsx(b$,{})}),N.jsx(Wa,{path:"graph",element:N.jsx(_$,{})}),N.jsx(Wa,{path:"jarvis",element:N.jsx(P.Suspense,{fallback:null,children:N.jsx(S$,{})})})]})]})})}));export{K0 as $,TA as A,Mm as B,Gi as C,es as D,ho as E,ic as F,Aa as G,F_ as H,Ym as I,jD as J,jE as K,c0 as L,jt as M,P_ as N,SA as O,Dr as P,zs as Q,Iv as R,t5 as S,Tn as T,x0 as U,mA as V,$v as W,R5 as X,k5 as Y,I5 as Z,B5 as _,E$ as a,Ef as a0,o4 as a1,qm as a2,G_ as a3,P5 as a4,Ra as a5,FC as a6,Ds as a7,V0 as a8,EE as a9,ih as aa,_B as ab,H4 as ac,TE as ad,bx as ae,CE as af,P4 as ag,th as ah,Ei as ai,VC as aj,q6 as ak,CA as al,Qt as am,Fm as an,mi as ao,qz as ap,Hz as aq,f5 as ar,r5 as as,N5 as at,O5 as au,H5 as av,U5 as aw,j5 as ax,dl as b,Ta as c,_z as d,Ca as e,gi as f,uz as g,On as h,o0 as i,N as j,Rt as k,i6 as l,YC as m,W0 as n,K5 as o,$0 as p,tA as q,P as r,SD as s,si as t,ox as u,Fd as v,ca as w,S4 as x,br as y,Qz as z};
|