@kafca/agentdock 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,487 @@
1
+ var tC=Object.defineProperty;var nC=(e,t,r)=>t in e?tC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ls=(e,t,r)=>nC(e,typeof t!="symbol"?t+"":t,r);function rC(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function tl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ah={exports:{}},no={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Y0;function aC(){if(Y0)return no;Y0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:o}}return no.Fragment=t,no.jsx=r,no.jsxs=r,no}var W0;function iC(){return W0||(W0=1,Ah.exports=aC()),Ah.exports}var p=iC(),Rh={exports:{}},et={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var X0;function sC(){if(X0)return et;X0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),x=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function N(z,V,R){this.props=z,this.context=V,this.refs=_,this.updater=R||E}N.prototype.isReactComponent={},N.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,V,"setState")},N.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=N.prototype;function C(z,V,R){this.props=z,this.context=V,this.refs=_,this.updater=R||E}var j=C.prototype=new T;j.constructor=C,S(j,N.prototype),j.isPureReactComponent=!0;var D=Array.isArray;function A(){}var P={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function X(z,V,R){var ee=R.ref;return{$$typeof:e,type:z,key:V,ref:ee!==void 0?ee:null,props:R}}function O(z,V){return X(z.type,V,z.props)}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function J(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(R){return V[R]})}var ce=/\/+/g;function q(z,V){return typeof z=="object"&&z!==null&&z.key!=null?J(""+z.key):V.toString(36)}function $(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function I(z,V,R,ee,ge){var oe=typeof z;(oe==="undefined"||oe==="boolean")&&(z=null);var re=!1;if(z===null)re=!0;else switch(oe){case"bigint":case"string":case"number":re=!0;break;case"object":switch(z.$$typeof){case e:case t:re=!0;break;case g:return re=z._init,I(re(z._payload),V,R,ee,ge)}}if(re)return ge=ge(z),re=ee===""?"."+q(z,0):ee,D(ge)?(R="",re!=null&&(R=re.replace(ce,"$&/")+"/"),I(ge,V,R,"",function(ke){return ke})):ge!=null&&(U(ge)&&(ge=O(ge,R+(ge.key==null||z&&z.key===ge.key?"":(""+ge.key).replace(ce,"$&/")+"/")+re)),V.push(ge)),1;re=0;var be=ee===""?".":ee+":";if(D(z))for(var Ce=0;Ce<z.length;Ce++)ee=z[Ce],oe=be+q(ee,Ce),re+=I(ee,V,R,oe,ge);else if(Ce=v(z),typeof Ce=="function")for(z=Ce.call(z),Ce=0;!(ee=z.next()).done;)ee=ee.value,oe=be+q(ee,Ce++),re+=I(ee,V,R,oe,ge);else if(oe==="object"){if(typeof z.then=="function")return I($(z),V,R,ee,ge);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return re}function W(z,V,R){if(z==null)return z;var ee=[],ge=0;return I(z,ee,"","",function(oe){return V.call(R,oe,ge++)}),ee}function Q(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(R){(z._status===0||z._status===-1)&&(z._status=1,z._result=R)},function(R){(z._status===0||z._status===-1)&&(z._status=2,z._result=R)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var Y=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},L={map:W,forEach:function(z,V,R){W(z,function(){V.apply(this,arguments)},R)},count:function(z){var V=0;return W(z,function(){V++}),V},toArray:function(z){return W(z,function(V){return V})||[]},only:function(z){if(!U(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return et.Activity=m,et.Children=L,et.Component=N,et.Fragment=r,et.Profiler=s,et.PureComponent=C,et.StrictMode=i,et.Suspense=h,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,et.__COMPILER_RUNTIME={__proto__:null,c:function(z){return P.H.useMemoCache(z)}},et.cache=function(z){return function(){return z.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(z,V,R){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=S({},z.props),ge=z.key;if(V!=null)for(oe in V.key!==void 0&&(ge=""+V.key),V)!K.call(V,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&V.ref===void 0||(ee[oe]=V[oe]);var oe=arguments.length-2;if(oe===1)ee.children=R;else if(1<oe){for(var re=Array(oe),be=0;be<oe;be++)re[be]=arguments[be+2];ee.children=re}return X(z.type,ge,ee)},et.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},et.createElement=function(z,V,R){var ee,ge={},oe=null;if(V!=null)for(ee in V.key!==void 0&&(oe=""+V.key),V)K.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ge[ee]=V[ee]);var re=arguments.length-2;if(re===1)ge.children=R;else if(1<re){for(var be=Array(re),Ce=0;Ce<re;Ce++)be[Ce]=arguments[Ce+2];ge.children=be}if(z&&z.defaultProps)for(ee in re=z.defaultProps,re)ge[ee]===void 0&&(ge[ee]=re[ee]);return X(z,oe,ge)},et.createRef=function(){return{current:null}},et.forwardRef=function(z){return{$$typeof:d,render:z}},et.isValidElement=U,et.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:Q}},et.memo=function(z,V){return{$$typeof:f,type:z,compare:V===void 0?null:V}},et.startTransition=function(z){var V=P.T,R={};P.T=R;try{var ee=z(),ge=P.S;ge!==null&&ge(R,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(A,Y)}catch(oe){Y(oe)}finally{V!==null&&R.types!==null&&(V.types=R.types),P.T=V}},et.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},et.use=function(z){return P.H.use(z)},et.useActionState=function(z,V,R){return P.H.useActionState(z,V,R)},et.useCallback=function(z,V){return P.H.useCallback(z,V)},et.useContext=function(z){return P.H.useContext(z)},et.useDebugValue=function(){},et.useDeferredValue=function(z,V){return P.H.useDeferredValue(z,V)},et.useEffect=function(z,V){return P.H.useEffect(z,V)},et.useEffectEvent=function(z){return P.H.useEffectEvent(z)},et.useId=function(){return P.H.useId()},et.useImperativeHandle=function(z,V,R){return P.H.useImperativeHandle(z,V,R)},et.useInsertionEffect=function(z,V){return P.H.useInsertionEffect(z,V)},et.useLayoutEffect=function(z,V){return P.H.useLayoutEffect(z,V)},et.useMemo=function(z,V){return P.H.useMemo(z,V)},et.useOptimistic=function(z,V){return P.H.useOptimistic(z,V)},et.useReducer=function(z,V,R){return P.H.useReducer(z,V,R)},et.useRef=function(z){return P.H.useRef(z)},et.useState=function(z){return P.H.useState(z)},et.useSyncExternalStore=function(z,V,R){return P.H.useSyncExternalStore(z,V,R)},et.useTransition=function(){return P.H.useTransition()},et.version="19.2.5",et}var Q0;function fm(){return Q0||(Q0=1,Rh.exports=sC()),Rh.exports}var w=fm();const kt=tl(w),hm=rC({__proto__:null,default:kt},[w]);/**
18
+ * @license lucide-react v0.487.0 - ISC
19
+ *
20
+ * This source code is licensed under the ISC license.
21
+ * See the LICENSE file in the root directory of this source tree.
22
+ */const lC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),Z0=e=>{const t=oC(e);return t.charAt(0).toUpperCase()+t.slice(1)},N1=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();/**
23
+ * @license lucide-react v0.487.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */var cC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
28
+ * @license lucide-react v0.487.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const uC=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:c,...d},h)=>w.createElement("svg",{ref:h,...cC,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:N1("lucide",s),...d},[...c.map(([f,g])=>w.createElement(f,g)),...Array.isArray(o)?o:[o]]));/**
33
+ * @license lucide-react v0.487.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const De=(e,t)=>{const r=w.forwardRef(({className:i,...s},o)=>w.createElement(uC,{ref:o,iconNode:t,className:N1(`lucide-${lC(Z0(e))}`,`lucide-${e}`,i),...s}));return r.displayName=Z0(e),r};/**
38
+ * @license lucide-react v0.487.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const dC=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],fC=De("activity",dC);/**
43
+ * @license lucide-react v0.487.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const hC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Xu=De("arrow-left",hC);/**
48
+ * @license lucide-react v0.487.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const pC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],pm=De("arrow-right",pC);/**
53
+ * @license lucide-react v0.487.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const mC=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],C1=De("book-open",mC);/**
58
+ * @license lucide-react v0.487.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const gC=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Qu=De("bot",gC);/**
63
+ * @license lucide-react v0.487.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const bC=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],yC=De("calendar-clock",bC);/**
68
+ * @license lucide-react v0.487.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const xC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vo=De("check",xC);/**
73
+ * @license lucide-react v0.487.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const vC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],J0=De("chevron-down",vC);/**
78
+ * @license lucide-react v0.487.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const wC=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],EC=De("chevron-left",wC);/**
83
+ * @license lucide-react v0.487.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const SC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],T1=De("chevron-right",SC);/**
88
+ * @license lucide-react v0.487.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const _C=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kC=De("chevron-up",_C);/**
93
+ * @license lucide-react v0.487.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const NC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],CC=De("circle-alert",NC);/**
98
+ * @license lucide-react v0.487.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const TC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qs=De("circle",TC);/**
103
+ * @license lucide-react v0.487.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const AC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],mm=De("clock",AC);/**
108
+ * @license lucide-react v0.487.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const RC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],OC=De("copy",RC);/**
113
+ * @license lucide-react v0.487.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const MC=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],DC=De("database",MC);/**
118
+ * @license lucide-react v0.487.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const jC=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],LC=De("file-code",jC);/**
123
+ * @license lucide-react v0.487.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const IC=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],zC=De("file-search",IC);/**
128
+ * @license lucide-react v0.487.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const PC=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],Tu=De("folder-kanban",PC);/**
133
+ * @license lucide-react v0.487.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const BC=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],UC=De("folder-plus",BC);/**
138
+ * @license lucide-react v0.487.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const FC=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],$C=De("folder-tree",FC);/**
143
+ * @license lucide-react v0.487.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const HC=[["path",{d:"M20 17a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3.9a2 2 0 0 1-1.69-.9l-.81-1.2a2 2 0 0 0-1.67-.9H8a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2Z",key:"4u7rpt"}],["path",{d:"M2 8v11a2 2 0 0 0 2 2h14",key:"1eicx1"}]],Oh=De("folders",HC);/**
148
+ * @license lucide-react v0.487.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const KC=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],A1=De("funnel",KC);/**
153
+ * @license lucide-react v0.487.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const qC=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Np=De("heart",qC);/**
158
+ * @license lucide-react v0.487.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const GC=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],VC=De("inbox",GC);/**
163
+ * @license lucide-react v0.487.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const YC=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],WC=De("languages",YC);/**
168
+ * @license lucide-react v0.487.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const XC=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],QC=De("layers",XC);/**
173
+ * @license lucide-react v0.487.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const ZC=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],JC=De("layout-dashboard",ZC);/**
178
+ * @license lucide-react v0.487.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const e2=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],R1=De("library",e2);/**
183
+ * @license lucide-react v0.487.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const t2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fs=De("loader-circle",t2);/**
188
+ * @license lucide-react v0.487.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const n2=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],r2=De("log-out",n2);/**
193
+ * @license lucide-react v0.487.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const a2=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],ex=De("message-square-plus",a2);/**
198
+ * @license lucide-react v0.487.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const i2=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],_a=De("message-square",i2);/**
203
+ * @license lucide-react v0.487.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const s2=[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]],l2=De("messages-square",s2);/**
208
+ * @license lucide-react v0.487.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const o2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],O1=De("monitor",o2);/**
213
+ * @license lucide-react v0.487.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const c2=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],M1=De("moon",c2);/**
218
+ * @license lucide-react v0.487.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const u2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],d2=De("panel-left",u2);/**
223
+ * @license lucide-react v0.487.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const f2=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],h2=De("pause",f2);/**
228
+ * @license lucide-react v0.487.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const p2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],wo=De("pencil",p2);/**
233
+ * @license lucide-react v0.487.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const m2=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],D1=De("play",m2);/**
238
+ * @license lucide-react v0.487.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const g2=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],j1=De("plug",g2);/**
243
+ * @license lucide-react v0.487.0 - ISC
244
+ *
245
+ * This source code is licensed under the ISC license.
246
+ * See the LICENSE file in the root directory of this source tree.
247
+ */const b2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],di=De("plus",b2);/**
248
+ * @license lucide-react v0.487.0 - ISC
249
+ *
250
+ * This source code is licensed under the ISC license.
251
+ * See the LICENSE file in the root directory of this source tree.
252
+ */const y2=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],x2=De("qr-code",y2);/**
253
+ * @license lucide-react v0.487.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */const v2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Zu=De("refresh-cw",v2);/**
258
+ * @license lucide-react v0.487.0 - ISC
259
+ *
260
+ * This source code is licensed under the ISC license.
261
+ * See the LICENSE file in the root directory of this source tree.
262
+ */const w2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],E2=De("rotate-ccw",w2);/**
263
+ * @license lucide-react v0.487.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ */const S2=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],L1=De("rotate-cw",S2);/**
268
+ * @license lucide-react v0.487.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */const _2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Cp=De("save",_2);/**
273
+ * @license lucide-react v0.487.0 - ISC
274
+ *
275
+ * This source code is licensed under the ISC license.
276
+ * See the LICENSE file in the root directory of this source tree.
277
+ */const k2=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],N2=De("scroll-text",k2);/**
278
+ * @license lucide-react v0.487.0 - ISC
279
+ *
280
+ * This source code is licensed under the ISC license.
281
+ * See the LICENSE file in the root directory of this source tree.
282
+ */const C2=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ju=De("search",C2);/**
283
+ * @license lucide-react v0.487.0 - ISC
284
+ *
285
+ * This source code is licensed under the ISC license.
286
+ * See the LICENSE file in the root directory of this source tree.
287
+ */const T2=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],gm=De("send",T2);/**
288
+ * @license lucide-react v0.487.0 - ISC
289
+ *
290
+ * This source code is licensed under the ISC license.
291
+ * See the LICENSE file in the root directory of this source tree.
292
+ */const A2=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],I1=De("server",A2);/**
293
+ * @license lucide-react v0.487.0 - ISC
294
+ *
295
+ * This source code is licensed under the ISC license.
296
+ * See the LICENSE file in the root directory of this source tree.
297
+ */const R2=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Oo=De("settings",R2);/**
298
+ * @license lucide-react v0.487.0 - ISC
299
+ *
300
+ * This source code is licensed under the ISC license.
301
+ * See the LICENSE file in the root directory of this source tree.
302
+ */const O2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],M2=De("shield-check",O2);/**
303
+ * @license lucide-react v0.487.0 - ISC
304
+ *
305
+ * This source code is licensed under the ISC license.
306
+ * See the LICENSE file in the root directory of this source tree.
307
+ */const D2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],z1=De("sun",D2);/**
308
+ * @license lucide-react v0.487.0 - ISC
309
+ *
310
+ * This source code is licensed under the ISC license.
311
+ * See the LICENSE file in the root directory of this source tree.
312
+ */const j2=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],L2=De("terminal",j2);/**
313
+ * @license lucide-react v0.487.0 - ISC
314
+ *
315
+ * This source code is licensed under the ISC license.
316
+ * See the LICENSE file in the root directory of this source tree.
317
+ */const I2=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Jr=De("trash-2",I2);/**
318
+ * @license lucide-react v0.487.0 - ISC
319
+ *
320
+ * This source code is licensed under the ISC license.
321
+ * See the LICENSE file in the root directory of this source tree.
322
+ */const z2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],P2=De("triangle-alert",z2);/**
323
+ * @license lucide-react v0.487.0 - ISC
324
+ *
325
+ * This source code is licensed under the ISC license.
326
+ * See the LICENSE file in the root directory of this source tree.
327
+ */const B2=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],tx=De("upload",B2);/**
328
+ * @license lucide-react v0.487.0 - ISC
329
+ *
330
+ * This source code is licensed under the ISC license.
331
+ * See the LICENSE file in the root directory of this source tree.
332
+ */const U2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ed=De("user",U2);/**
333
+ * @license lucide-react v0.487.0 - ISC
334
+ *
335
+ * This source code is licensed under the ISC license.
336
+ * See the LICENSE file in the root directory of this source tree.
337
+ */const F2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Tp=De("wifi-off",F2);/**
338
+ * @license lucide-react v0.487.0 - ISC
339
+ *
340
+ * This source code is licensed under the ISC license.
341
+ * See the LICENSE file in the root directory of this source tree.
342
+ */const $2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],bm=De("wrench",$2);/**
343
+ * @license lucide-react v0.487.0 - ISC
344
+ *
345
+ * This source code is licensed under the ISC license.
346
+ * See the LICENSE file in the root directory of this source tree.
347
+ */const H2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ap=De("x",H2);/**
348
+ * @license lucide-react v0.487.0 - ISC
349
+ *
350
+ * This source code is licensed under the ISC license.
351
+ * See the LICENSE file in the root directory of this source tree.
352
+ */const K2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],P1=De("zap",K2);var Mh={exports:{}},ro={},Dh={exports:{}},jh={};/**
353
+ * @license React
354
+ * scheduler.production.js
355
+ *
356
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
357
+ *
358
+ * This source code is licensed under the MIT license found in the
359
+ * LICENSE file in the root directory of this source tree.
360
+ */var nx;function q2(){return nx||(nx=1,(function(e){function t(I,W){var Q=I.length;I.push(W);e:for(;0<Q;){var Y=Q-1>>>1,L=I[Y];if(0<s(L,W))I[Y]=W,I[Q]=L,Q=Y;else break e}}function r(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var W=I[0],Q=I.pop();if(Q!==W){I[0]=Q;e:for(var Y=0,L=I.length,z=L>>>1;Y<z;){var V=2*(Y+1)-1,R=I[V],ee=V+1,ge=I[ee];if(0>s(R,Q))ee<L&&0>s(ge,R)?(I[Y]=ge,I[ee]=Q,Y=ee):(I[Y]=R,I[V]=Q,Y=V);else if(ee<L&&0>s(ge,Q))I[Y]=ge,I[ee]=Q,Y=ee;else break e}}return W}function s(I,W){var Q=I.sortIndex-W.sortIndex;return Q!==0?Q:I.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var h=[],f=[],g=1,m=null,x=3,v=!1,E=!1,S=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function j(I){for(var W=r(f);W!==null;){if(W.callback===null)i(f);else if(W.startTime<=I)i(f),W.sortIndex=W.expirationTime,t(h,W);else break;W=r(f)}}function D(I){if(S=!1,j(I),!E)if(r(h)!==null)E=!0,A||(A=!0,J());else{var W=r(f);W!==null&&$(D,W.startTime-I)}}var A=!1,P=-1,K=5,X=-1;function O(){return _?!0:!(e.unstable_now()-X<K)}function U(){if(_=!1,A){var I=e.unstable_now();X=I;var W=!0;try{e:{E=!1,S&&(S=!1,T(P),P=-1),v=!0;var Q=x;try{t:{for(j(I),m=r(h);m!==null&&!(m.expirationTime>I&&O());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,x=m.priorityLevel;var L=Y(m.expirationTime<=I);if(I=e.unstable_now(),typeof L=="function"){m.callback=L,j(I),W=!0;break t}m===r(h)&&i(h),j(I)}else i(h);m=r(h)}if(m!==null)W=!0;else{var z=r(f);z!==null&&$(D,z.startTime-I),W=!1}}break e}finally{m=null,x=Q,v=!1}W=void 0}}finally{W?J():A=!1}}}var J;if(typeof C=="function")J=function(){C(U)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,q=ce.port2;ce.port1.onmessage=U,J=function(){q.postMessage(null)}}else J=function(){N(U,0)};function $(I,W){P=N(function(){I(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var Q=x;x=W;try{return I()}finally{x=Q}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(I,W){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Q=x;x=I;try{return W()}finally{x=Q}},e.unstable_scheduleCallback=function(I,W,Q){var Y=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?Y+Q:Y):Q=Y,I){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=Q+L,I={id:g++,callback:W,priorityLevel:I,startTime:Q,expirationTime:L,sortIndex:-1},Q>Y?(I.sortIndex=Q,t(f,I),r(h)===null&&I===r(f)&&(S?(T(P),P=-1):S=!0,$(D,Q-Y))):(I.sortIndex=L,t(h,I),E||v||(E=!0,A||(A=!0,J()))),I},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(I){var W=x;return function(){var Q=x;x=W;try{return I.apply(this,arguments)}finally{x=Q}}}})(jh)),jh}var rx;function G2(){return rx||(rx=1,Dh.exports=q2()),Dh.exports}var Lh={exports:{}},An={};/**
361
+ * @license React
362
+ * react-dom.production.js
363
+ *
364
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
365
+ *
366
+ * This source code is licensed under the MIT license found in the
367
+ * LICENSE file in the root directory of this source tree.
368
+ */var ax;function V2(){if(ax)return An;ax=1;var e=fm();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(h,f,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:h,containerInfo:f,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,An.createPortal=function(h,f){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(h,f,null,g)},An.flushSync=function(h){var f=c.T,g=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=f,i.p=g,i.d.f()}},An.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(h,f))},An.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},An.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var g=f.as,m=d(g,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?i.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:x,fetchPriority:v}):g==="script"&&i.d.X(h,{crossOrigin:m,integrity:x,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},An.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var g=d(f.as,f.crossOrigin);i.d.M(h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(h)},An.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var g=f.as,m=d(g,f.crossOrigin);i.d.L(h,g,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},An.preloadModule=function(h,f){if(typeof h=="string")if(f){var g=d(f.as,f.crossOrigin);i.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(h)},An.requestFormReset=function(h){i.d.r(h)},An.unstable_batchedUpdates=function(h,f){return h(f)},An.useFormState=function(h,f,g){return c.H.useFormState(h,f,g)},An.useFormStatus=function(){return c.H.useHostTransitionStatus()},An.version="19.2.5",An}var ix;function B1(){if(ix)return Lh.exports;ix=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Lh.exports=V2(),Lh.exports}/**
369
+ * @license React
370
+ * react-dom-client.production.js
371
+ *
372
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
373
+ *
374
+ * This source code is licensed under the MIT license found in the
375
+ * LICENSE file in the root directory of this source tree.
376
+ */var sx;function Y2(){if(sx)return ro;sx=1;var e=G2(),t=fm(),r=B1();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var a=n,l=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(l=a.return),n=a.return;while(n)}return a.tag===3?l:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(i(188))}function f(n){var a=n.alternate;if(!a){if(a=o(n),a===null)throw Error(i(188));return a!==n?null:n}for(var l=n,u=a;;){var b=l.return;if(b===null)break;var y=b.alternate;if(y===null){if(u=b.return,u!==null){l=u;continue}break}if(b.child===y.child){for(y=b.child;y;){if(y===l)return h(b),n;if(y===u)return h(b),a;y=y.sibling}throw Error(i(188))}if(l.return!==u.return)l=b,u=y;else{for(var k=!1,M=b.child;M;){if(M===l){k=!0,l=b,u=y;break}if(M===u){k=!0,u=b,l=y;break}M=M.sibling}if(!k){for(M=y.child;M;){if(M===l){k=!0,l=y,u=b;break}if(M===u){k=!0,u=y,l=b;break}M=M.sibling}if(!k)throw Error(i(189))}}if(l.alternate!==u)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?n:a}function g(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=g(n),a!==null)return a;n=n.sibling}return null}var m=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),C=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function J(n){return n===null||typeof n!="object"?null:(n=U&&n[U]||n["@@iterator"],typeof n=="function"?n:null)}var ce=Symbol.for("react.client.reference");function q(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case N:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case A:return"SuspenseList";case X:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case C:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case j:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return a=n.displayName||null,a!==null?a:q(n.type)||"Memo";case K:a=n._payload,n=n._init;try{return q(n(a))}catch{}}return null}var $=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},Y=[],L=-1;function z(n){return{current:n}}function V(n){0>L||(n.current=Y[L],Y[L]=null,L--)}function R(n,a){L++,Y[L]=n.current,n.current=a}var ee=z(null),ge=z(null),oe=z(null),re=z(null);function be(n,a){switch(R(oe,a),R(ge,n),R(ee,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?b0(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=b0(a),n=y0(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(ee),R(ee,n)}function Ce(){V(ee),V(ge),V(oe)}function ke(n){n.memoizedState!==null&&R(re,n);var a=ee.current,l=y0(a,n.type);a!==l&&(R(ge,n),R(ee,l))}function Ne(n){ge.current===n&&(V(ee),V(ge)),re.current===n&&(V(re),Zl._currentValue=Q)}var $e,Je;function Pe(n){if($e===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);$e=a&&a[1]||"",Je=-1<l.stack.indexOf(`
377
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
378
+ `+$e+n+Je}var Tt=!1;function Be(n,a){if(!n||Tt)return"";Tt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ue){var le=ue}Reflect.construct(n,[],me)}else{try{me.call()}catch(ue){le=ue}n.call(me.prototype)}}else{try{throw Error()}catch(ue){le=ue}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ue){if(ue&&le&&typeof ue.stack=="string")return[ue.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),k=y[0],M=y[1];if(k&&M){var F=k.split(`
379
+ `),ae=M.split(`
380
+ `);for(b=u=0;u<F.length&&!F[u].includes("DetermineComponentFrameRoot");)u++;for(;b<ae.length&&!ae[b].includes("DetermineComponentFrameRoot");)b++;if(u===F.length||b===ae.length)for(u=F.length-1,b=ae.length-1;1<=u&&0<=b&&F[u]!==ae[b];)b--;for(;1<=u&&0<=b;u--,b--)if(F[u]!==ae[b]){if(u!==1||b!==1)do if(u--,b--,0>b||F[u]!==ae[b]){var de=`
381
+ `+F[u].replace(" at new "," at ");return n.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",n.displayName)),de}while(1<=u&&0<=b);break}}}finally{Tt=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?Pe(l):""}function Qe(n,a){switch(n.tag){case 26:case 27:case 5:return Pe(n.type);case 16:return Pe("Lazy");case 13:return n.child!==a&&a!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Be(n.type,!1);case 11:return Be(n.type.render,!1);case 1:return Be(n.type,!0);case 31:return Pe("Activity");default:return""}}function bt(n){try{var a="",l=null;do a+=Qe(n,l),l=n,n=n.return;while(n);return a}catch(u){return`
382
+ Error generating stack: `+u.message+`
383
+ `+u.stack}}var te=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,Te=e.unstable_cancelCallback,Ie=e.unstable_shouldYield,wt=e.unstable_requestPaint,lt=e.unstable_now,Wt=e.unstable_getCurrentPriorityLevel,B=e.unstable_ImmediatePriority,ie=e.unstable_UserBlockingPriority,Ee=e.unstable_NormalPriority,se=e.unstable_LowPriority,ye=e.unstable_IdlePriority,Re=e.log,ze=e.unstable_setDisableYieldValue,tt=null,rt=null;function Ft(n){if(typeof Re=="function"&&ze(n),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(tt,n)}catch{}}var We=Math.clz32?Math.clz32:yi,Dn=Math.log,en=Math.LN2;function yi(n){return n>>>=0,n===0?32:31-(Dn(n)/en|0)|0}var ra=256,Ma=262144,aa=4194304;function vn(n){var a=n&42;if(a!==0)return a;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function H(n,a,l){var u=n.pendingLanes;if(u===0)return 0;var b=0,y=n.suspendedLanes,k=n.pingedLanes;n=n.warmLanes;var M=u&134217727;return M!==0?(u=M&~y,u!==0?b=vn(u):(k&=M,k!==0?b=vn(k):l||(l=M&~n,l!==0&&(b=vn(l))))):(M=u&~y,M!==0?b=vn(M):k!==0?b=vn(k):l||(l=u&~n,l!==0&&(b=vn(l)))),b===0?0:a!==0&&a!==b&&(a&y)===0&&(y=b&-b,l=a&-a,y>=l||y===32&&(l&4194048)!==0)?a:b}function fe(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function Se(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Xe(){var n=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),n}function Pt(n){for(var a=[],l=0;31>l;l++)a.push(n);return a}function At(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,a,l,u,b,y){var k=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var M=n.entanglements,F=n.expirationTimes,ae=n.hiddenUpdates;for(l=k&~l;0<l;){var de=31-We(l),me=1<<de;M[de]=0,F[de]=-1;var le=ae[de];if(le!==null)for(ae[de]=null,de=0;de<le.length;de++){var ue=le[de];ue!==null&&(ue.lane&=-536870913)}l&=~me}u!==0&&Ae(n,u,0),y!==0&&b===0&&n.tag!==0&&(n.suspendedLanes|=y&~(k&~a))}function Ae(n,a,l){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-We(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function qe(n,a){var l=n.entangledLanes|=a;for(n=n.entanglements;l;){var u=31-We(l),b=1<<u;b&a|n[u]&a&&(n[u]|=a),l&=~b}}function Zt(n,a){var l=a&-a;return l=(l&42)!==0?1:Nt(l),(l&(n.suspendedLanes|a))!==0?0:l}function Nt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Xn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ur(){var n=W.p;return n!==0?n:(n=window.event,n===void 0?32:F0(n.type))}function Qn(n,a){var l=W.p;try{return W.p=n,a()}finally{W.p=l}}var Fr=Math.random().toString(36).slice(2),an="__reactFiber$"+Fr,Cn="__reactProps$"+Fr,Da="__reactContainer$"+Fr,cl="__reactEvents$"+Fr,Fo="__reactListeners$"+Fr,ts="__reactHandles$"+Fr,$o="__reactResources$"+Fr,xi="__reactMarker$"+Fr;function ul(n){delete n[an],delete n[Cn],delete n[cl],delete n[Fo],delete n[ts]}function jn(n){var a=n[an];if(a)return a;for(var l=n.parentNode;l;){if(a=l[Da]||l[an]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(n=k0(n);n!==null;){if(l=n[an])return l;n=k0(n)}return a}n=l,l=n.parentNode}return null}function ia(n){if(n=n[an]||n[Da]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function ja(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function La(n){var a=n[$o];return a||(a=n[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function un(n){n[xi]=!0}var Ho=new Set,vi={};function sa(n,a){xe(n,a),xe(n+"Capture",a)}function xe(n,a){for(vi[n]=a,n=0;n<a.length;n++)Ho.add(a[n])}var Ue=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]*$"),ct={},Rt={};function sn(n){return te.call(Rt,n)?!0:te.call(ct,n)?!1:Ue.test(n)?Rt[n]=!0:(ct[n]=!0,!1)}function Tn(n,a,l){if(sn(a))if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+l)}}function Zn(n,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+l)}}function Un(n,a,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(a,l,""+u)}}function $t(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Jn(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ko(n,a,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var b=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return b.call(this)},set:function(k){l=""+k,y.call(this,k)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function ns(n){if(!n._valueTracker){var a=Jn(n)?"checked":"value";n._valueTracker=Ko(n,a,""+n[a])}}function dl(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var l=a.getValue(),u="";return n&&(u=Jn(n)?n.checked?"true":"false":n.value),n=u,n!==l?(a.setValue(n),!0):!1}function rs(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Cd=/[\n"\\]/g;function Fn(n){return n.replace(Cd,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function fl(n,a,l,u,b,y,k,M){n.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.type=k:n.removeAttribute("type"),a!=null?k==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+$t(a)):n.value!==""+$t(a)&&(n.value=""+$t(a)):k!=="submit"&&k!=="reset"||n.removeAttribute("value"),a!=null?as(n,k,$t(a)):l!=null?as(n,k,$t(l)):u!=null&&n.removeAttribute("value"),b==null&&y!=null&&(n.defaultChecked=!!y),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?n.name=""+$t(M):n.removeAttribute("name")}function wi(n,a,l,u,b,y,k,M){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||l!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){ns(n);return}l=l!=null?""+$t(l):"",a=a!=null?""+$t(a):l,M||a===n.value||(n.value=a),n.defaultValue=a}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=M?n.checked:!!u,n.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(n.name=k),ns(n)}function as(n,a,l){a==="number"&&rs(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function wn(n,a,l,u){if(n=n.options,a){a={};for(var b=0;b<l.length;b++)a["$"+l[b]]=!0;for(l=0;l<n.length;l++)b=a.hasOwnProperty("$"+n[l].value),n[l].selected!==b&&(n[l].selected=b),b&&u&&(n[l].defaultSelected=!0)}else{for(l=""+$t(l),a=null,b=0;b<n.length;b++){if(n[b].value===l){n[b].selected=!0,u&&(n[b].defaultSelected=!0);return}a!==null||n[b].disabled||(a=n[b])}a!==null&&(a.selected=!0)}}function qo(n,a,l){if(a!=null&&(a=""+$t(a),a!==n.value&&(n.value=a),l==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=l!=null?""+$t(l):""}function is(n,a,l,u){if(a==null){if(u!=null){if(l!=null)throw Error(i(92));if($(u)){if(1<u.length)throw Error(i(93));u=u[0]}l=u}l==null&&(l=""),a=l}l=$t(a),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),ns(n)}function Ye(n,a){if(a){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=a;return}}n.textContent=a}var Go=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 dn(n,a,l){var u=a.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,l):typeof l!="number"||l===0||Go.has(a)?a==="float"?n.cssFloat=l:n[a]=(""+l).trim():n[a]=l+"px"}function Ot(n,a,l){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var b in a)u=a[b],a.hasOwnProperty(b)&&l[b]!==u&&dn(n,b,u)}else for(var y in a)a.hasOwnProperty(y)&&dn(n,y,a[y])}function Ia(n){if(n.indexOf("-")===-1)return!1;switch(n){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 la=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"]]),hl=/^[\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 za(n){return hl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function we(){}var je=null;function nt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var pt=null,Jt=null;function gr(n){var a=ia(n);if(a&&(n=a.stateNode)){var l=n[Cn]||null;e:switch(n=a.stateNode,a.type){case"input":if(fl(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),a=l.name,l.type==="radio"&&a!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Fn(""+a)+'"][type="radio"]'),a=0;a<l.length;a++){var u=l[a];if(u!==n&&u.form===n.form){var b=u[Cn]||null;if(!b)throw Error(i(90));fl(u,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(a=0;a<l.length;a++)u=l[a],u.form===n.form&&dl(u)}break e;case"textarea":qo(n,l.value,l.defaultValue);break e;case"select":a=l.value,a!=null&&wn(n,!!l.multiple,a,!1)}}}var pl=!1;function Vo(n,a,l){if(pl)return n(a,l);pl=!0;try{var u=n(a);return u}finally{if(pl=!1,(pt!==null||Jt!==null)&&(jc(),pt&&(a=pt,n=Jt,Jt=pt=null,gr(a),n)))for(a=0;a<n.length;a++)gr(n[a])}}function ml(n,a){var l=n.stateNode;if(l===null)return null;var u=l[Cn]||null;if(u===null)return null;l=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(i(231,a,typeof l));return l}var oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Td=!1;if(oa)try{var gl={};Object.defineProperty(gl,"passive",{get:function(){Td=!0}}),window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch{Td=!1}var Pa=null,Ad=null,Yo=null;function yg(){if(Yo)return Yo;var n,a=Ad,l=a.length,u,b="value"in Pa?Pa.value:Pa.textContent,y=b.length;for(n=0;n<l&&a[n]===b[n];n++);var k=l-n;for(u=1;u<=k&&a[l-u]===b[y-u];u++);return Yo=b.slice(n,1<u?1-u:void 0)}function Wo(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function Xo(){return!0}function xg(){return!1}function $n(n){function a(l,u,b,y,k){this._reactName=l,this._targetInst=b,this.type=u,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var M in n)n.hasOwnProperty(M)&&(l=n[M],this[M]=l?l(y):y[M]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Xo:xg,this.isPropagationStopped=xg,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Xo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),a}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qo=$n(Ei),bl=m({},Ei,{view:0,detail:0}),J_=$n(bl),Rd,Od,yl,Zo=m({},bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dd,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==yl&&(yl&&n.type==="mousemove"?(Rd=n.screenX-yl.screenX,Od=n.screenY-yl.screenY):Od=Rd=0,yl=n),Rd)},movementY:function(n){return"movementY"in n?n.movementY:Od}}),vg=$n(Zo),ek=m({},Zo,{dataTransfer:0}),tk=$n(ek),nk=m({},bl,{relatedTarget:0}),Md=$n(nk),rk=m({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),ak=$n(rk),ik=m({},Ei,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),sk=$n(ik),lk=m({},Ei,{data:0}),wg=$n(lk),ok={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ck={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"},uk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dk(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=uk[n])?!!a[n]:!1}function Dd(){return dk}var fk=m({},bl,{key:function(n){if(n.key){var a=ok[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Wo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ck[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dd,charCode:function(n){return n.type==="keypress"?Wo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Wo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),hk=$n(fk),pk=m({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eg=$n(pk),mk=m({},bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dd}),gk=$n(mk),bk=m({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),yk=$n(bk),xk=m({},Zo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),vk=$n(xk),wk=m({},Ei,{newState:0,oldState:0}),Ek=$n(wk),Sk=[9,13,27,32],jd=oa&&"CompositionEvent"in window,xl=null;oa&&"documentMode"in document&&(xl=document.documentMode);var _k=oa&&"TextEvent"in window&&!xl,Sg=oa&&(!jd||xl&&8<xl&&11>=xl),_g=" ",kg=!1;function Ng(n,a){switch(n){case"keyup":return Sk.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ss=!1;function kk(n,a){switch(n){case"compositionend":return Cg(a);case"keypress":return a.which!==32?null:(kg=!0,_g);case"textInput":return n=a.data,n===_g&&kg?null:n;default:return null}}function Nk(n,a){if(ss)return n==="compositionend"||!jd&&Ng(n,a)?(n=yg(),Yo=Ad=Pa=null,ss=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Sg&&a.locale!=="ko"?null:a.data;default:return null}}var Ck={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 Tg(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!Ck[n.type]:a==="textarea"}function Ag(n,a,l,u){pt?Jt?Jt.push(u):Jt=[u]:pt=u,a=Fc(a,"onChange"),0<a.length&&(l=new Qo("onChange","change",null,l,u),n.push({event:l,listeners:a}))}var vl=null,wl=null;function Tk(n){d0(n,0)}function Jo(n){var a=ja(n);if(dl(a))return n}function Rg(n,a){if(n==="change")return a}var Og=!1;if(oa){var Ld;if(oa){var Id="oninput"in document;if(!Id){var Mg=document.createElement("div");Mg.setAttribute("oninput","return;"),Id=typeof Mg.oninput=="function"}Ld=Id}else Ld=!1;Og=Ld&&(!document.documentMode||9<document.documentMode)}function Dg(){vl&&(vl.detachEvent("onpropertychange",jg),wl=vl=null)}function jg(n){if(n.propertyName==="value"&&Jo(wl)){var a=[];Ag(a,wl,n,nt(n)),Vo(Tk,a)}}function Ak(n,a,l){n==="focusin"?(Dg(),vl=a,wl=l,vl.attachEvent("onpropertychange",jg)):n==="focusout"&&Dg()}function Rk(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Jo(wl)}function Ok(n,a){if(n==="click")return Jo(a)}function Mk(n,a){if(n==="input"||n==="change")return Jo(a)}function Dk(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var er=typeof Object.is=="function"?Object.is:Dk;function El(n,a){if(er(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var l=Object.keys(n),u=Object.keys(a);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var b=l[u];if(!te.call(a,b)||!er(n[b],a[b]))return!1}return!0}function Lg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ig(n,a){var l=Lg(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=a&&u>=a)return{node:l,offset:a-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Lg(l)}}function zg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?zg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function Pg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=rs(n.document);a instanceof n.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)n=a.contentWindow;else break;a=rs(n.document)}return a}function zd(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var jk=oa&&"documentMode"in document&&11>=document.documentMode,ls=null,Pd=null,Sl=null,Bd=!1;function Bg(n,a,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Bd||ls==null||ls!==rs(u)||(u=ls,"selectionStart"in u&&zd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Sl&&El(Sl,u)||(Sl=u,u=Fc(Pd,"onSelect"),0<u.length&&(a=new Qo("onSelect","select",null,a,l),n.push({event:a,listeners:u}),a.target=ls)))}function Si(n,a){var l={};return l[n.toLowerCase()]=a.toLowerCase(),l["Webkit"+n]="webkit"+a,l["Moz"+n]="moz"+a,l}var os={animationend:Si("Animation","AnimationEnd"),animationiteration:Si("Animation","AnimationIteration"),animationstart:Si("Animation","AnimationStart"),transitionrun:Si("Transition","TransitionRun"),transitionstart:Si("Transition","TransitionStart"),transitioncancel:Si("Transition","TransitionCancel"),transitionend:Si("Transition","TransitionEnd")},Ud={},Ug={};oa&&(Ug=document.createElement("div").style,"AnimationEvent"in window||(delete os.animationend.animation,delete os.animationiteration.animation,delete os.animationstart.animation),"TransitionEvent"in window||delete os.transitionend.transition);function _i(n){if(Ud[n])return Ud[n];if(!os[n])return n;var a=os[n],l;for(l in a)if(a.hasOwnProperty(l)&&l in Ug)return Ud[n]=a[l];return n}var Fg=_i("animationend"),$g=_i("animationiteration"),Hg=_i("animationstart"),Lk=_i("transitionrun"),Ik=_i("transitionstart"),zk=_i("transitioncancel"),Kg=_i("transitionend"),qg=new Map,Fd="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(" ");Fd.push("scrollEnd");function Tr(n,a){qg.set(n,a),sa(a,[n])}var ec=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},br=[],cs=0,$d=0;function tc(){for(var n=cs,a=$d=cs=0;a<n;){var l=br[a];br[a++]=null;var u=br[a];br[a++]=null;var b=br[a];br[a++]=null;var y=br[a];if(br[a++]=null,u!==null&&b!==null){var k=u.pending;k===null?b.next=b:(b.next=k.next,k.next=b),u.pending=b}y!==0&&Gg(l,b,y)}}function nc(n,a,l,u){br[cs++]=n,br[cs++]=a,br[cs++]=l,br[cs++]=u,$d|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Hd(n,a,l,u){return nc(n,a,l,u),rc(n)}function ki(n,a){return nc(n,null,null,a),rc(n)}function Gg(n,a,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var b=!1,y=n.return;y!==null;)y.childLanes|=l,u=y.alternate,u!==null&&(u.childLanes|=l),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(b=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,b&&a!==null&&(b=31-We(l),n=y.hiddenUpdates,u=n[b],u===null?n[b]=[a]:u.push(a),a.lane=l|536870912),y):null}function rc(n){if(50<ql)throw ql=0,Jf=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var us={};function Pk(n,a,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(n,a,l,u){return new Pk(n,a,l,u)}function Kd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ca(n,a){var l=n.alternate;return l===null?(l=tr(n.tag,a,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=a,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,a=n.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function Vg(n,a){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,a=l.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function ac(n,a,l,u,b,y){var k=0;if(u=n,typeof n=="function")Kd(n)&&(k=1);else if(typeof n=="string")k=HN(n,l,ee.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case X:return n=tr(31,l,a,b),n.elementType=X,n.lanes=y,n;case S:return Ni(l.children,b,y,a);case _:k=8,b|=24;break;case N:return n=tr(12,l,a,b|2),n.elementType=N,n.lanes=y,n;case D:return n=tr(13,l,a,b),n.elementType=D,n.lanes=y,n;case A:return n=tr(19,l,a,b),n.elementType=A,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:k=10;break e;case T:k=9;break e;case j:k=11;break e;case P:k=14;break e;case K:k=16,u=null;break e}k=29,l=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=tr(k,l,a,b),a.elementType=n,a.type=u,a.lanes=y,a}function Ni(n,a,l,u){return n=tr(7,n,u,a),n.lanes=l,n}function qd(n,a,l){return n=tr(6,n,null,a),n.lanes=l,n}function Yg(n){var a=tr(18,null,null,0);return a.stateNode=n,a}function Gd(n,a,l){return a=tr(4,n.children!==null?n.children:[],n.key,a),a.lanes=l,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var Wg=new WeakMap;function yr(n,a){if(typeof n=="object"&&n!==null){var l=Wg.get(n);return l!==void 0?l:(a={value:n,source:a,stack:bt(a)},Wg.set(n,a),a)}return{value:n,source:a,stack:bt(a)}}var ds=[],fs=0,ic=null,_l=0,xr=[],vr=0,Ba=null,$r=1,Hr="";function ua(n,a){ds[fs++]=_l,ds[fs++]=ic,ic=n,_l=a}function Xg(n,a,l){xr[vr++]=$r,xr[vr++]=Hr,xr[vr++]=Ba,Ba=n;var u=$r;n=Hr;var b=32-We(u)-1;u&=~(1<<b),l+=1;var y=32-We(a)+b;if(30<y){var k=b-b%5;y=(u&(1<<k)-1).toString(32),u>>=k,b-=k,$r=1<<32-We(a)+b|l<<b|u,Hr=y+n}else $r=1<<y|l<<b|u,Hr=n}function Vd(n){n.return!==null&&(ua(n,1),Xg(n,1,0))}function Yd(n){for(;n===ic;)ic=ds[--fs],ds[fs]=null,_l=ds[--fs],ds[fs]=null;for(;n===Ba;)Ba=xr[--vr],xr[vr]=null,Hr=xr[--vr],xr[vr]=null,$r=xr[--vr],xr[vr]=null}function Qg(n,a){xr[vr++]=$r,xr[vr++]=Hr,xr[vr++]=Ba,$r=a.id,Hr=a.overflow,Ba=n}var En=null,Gt=null,yt=!1,Ua=null,wr=!1,Wd=Error(i(519));function Fa(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw kl(yr(a,n)),Wd}function Zg(n){var a=n.stateNode,l=n.type,u=n.memoizedProps;switch(a[an]=n,a[Cn]=u,l){case"dialog":dt("cancel",a),dt("close",a);break;case"iframe":case"object":case"embed":dt("load",a);break;case"video":case"audio":for(l=0;l<Vl.length;l++)dt(Vl[l],a);break;case"source":dt("error",a);break;case"img":case"image":case"link":dt("error",a),dt("load",a);break;case"details":dt("toggle",a);break;case"input":dt("invalid",a),wi(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":dt("invalid",a);break;case"textarea":dt("invalid",a),is(a,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||a.textContent===""+l||u.suppressHydrationWarning===!0||m0(a.textContent,l)?(u.popover!=null&&(dt("beforetoggle",a),dt("toggle",a)),u.onScroll!=null&&dt("scroll",a),u.onScrollEnd!=null&&dt("scrollend",a),u.onClick!=null&&(a.onclick=we),a=!0):a=!1,a||Fa(n,!0)}function Jg(n){for(En=n.return;En;)switch(En.tag){case 5:case 31:case 13:wr=!1;return;case 27:case 3:wr=!0;return;default:En=En.return}}function hs(n){if(n!==En)return!1;if(!yt)return Jg(n),yt=!0,!1;var a=n.tag,l;if((l=a!==3&&a!==27)&&((l=a===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||ph(n.type,n.memoizedProps)),l=!l),l&&Gt&&Fa(n),Jg(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Gt=_0(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Gt=_0(n)}else a===27?(a=Gt,ti(n.type)?(n=xh,xh=null,Gt=n):Gt=a):Gt=En?Sr(n.stateNode.nextSibling):null;return!0}function Ci(){Gt=En=null,yt=!1}function Xd(){var n=Ua;return n!==null&&(Gn===null?Gn=n:Gn.push.apply(Gn,n),Ua=null),n}function kl(n){Ua===null?Ua=[n]:Ua.push(n)}var Qd=z(null),Ti=null,da=null;function $a(n,a,l){R(Qd,a._currentValue),a._currentValue=l}function fa(n){n._currentValue=Qd.current,V(Qd)}function Zd(n,a,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===l)break;n=n.return}}function Jd(n,a,l,u){var b=n.child;for(b!==null&&(b.return=n);b!==null;){var y=b.dependencies;if(y!==null){var k=b.child;y=y.firstContext;e:for(;y!==null;){var M=y;y=b;for(var F=0;F<a.length;F++)if(M.context===a[F]){y.lanes|=l,M=y.alternate,M!==null&&(M.lanes|=l),Zd(y.return,l,n),u||(k=null);break e}y=M.next}}else if(b.tag===18){if(k=b.return,k===null)throw Error(i(341));k.lanes|=l,y=k.alternate,y!==null&&(y.lanes|=l),Zd(k,l,n),k=null}else k=b.child;if(k!==null)k.return=b;else for(k=b;k!==null;){if(k===n){k=null;break}if(b=k.sibling,b!==null){b.return=k.return,k=b;break}k=k.return}b=k}}function ps(n,a,l,u){n=null;for(var b=a,y=!1;b!==null;){if(!y){if((b.flags&524288)!==0)y=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var k=b.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var M=b.type;er(b.pendingProps.value,k.value)||(n!==null?n.push(M):n=[M])}}else if(b===re.current){if(k=b.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(n!==null?n.push(Zl):n=[Zl])}b=b.return}n!==null&&Jd(a,n,l,u),a.flags|=262144}function sc(n){for(n=n.firstContext;n!==null;){if(!er(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ai(n){Ti=n,da=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Sn(n){return eb(Ti,n)}function lc(n,a){return Ti===null&&Ai(n),eb(n,a)}function eb(n,a){var l=a._currentValue;if(a={context:a,memoizedValue:l,next:null},da===null){if(n===null)throw Error(i(308));da=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else da=da.next=a;return l}var Bk=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(l){return l()})}},Uk=e.unstable_scheduleCallback,Fk=e.unstable_NormalPriority,fn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ef(){return{controller:new Bk,data:new Map,refCount:0}}function Nl(n){n.refCount--,n.refCount===0&&Uk(Fk,function(){n.controller.abort()})}var Cl=null,tf=0,ms=0,gs=null;function $k(n,a){if(Cl===null){var l=Cl=[];tf=0,ms=ih(),gs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return tf++,a.then(tb,tb),a}function tb(){if(--tf===0&&Cl!==null){gs!==null&&(gs.status="fulfilled");var n=Cl;Cl=null,ms=0,gs=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Hk(n,a){var l=[],u={status:"pending",value:null,reason:null,then:function(b){l.push(b)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var b=0;b<l.length;b++)(0,l[b])(a)},function(b){for(u.status="rejected",u.reason=b,b=0;b<l.length;b++)(0,l[b])(void 0)}),u}var nb=I.S;I.S=function(n,a){By=lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&$k(n,a),nb!==null&&nb(n,a)};var Ri=z(null);function nf(){var n=Ri.current;return n!==null?n:Bt.pooledCache}function oc(n,a){a===null?R(Ri,Ri.current):R(Ri,a.pool)}function rb(){var n=nf();return n===null?null:{parent:fn._currentValue,pool:n}}var bs=Error(i(460)),rf=Error(i(474)),cc=Error(i(542)),uc={then:function(){}};function ab(n){return n=n.status,n==="fulfilled"||n==="rejected"}function ib(n,a,l){switch(l=n[l],l===void 0?n.push(a):l!==a&&(a.then(we,we),a=l),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,lb(n),n;default:if(typeof a.status=="string")a.then(we,we);else{if(n=Bt,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var b=a;b.status="fulfilled",b.value=u}},function(u){if(a.status==="pending"){var b=a;b.status="rejected",b.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,lb(n),n}throw Mi=a,bs}}function Oi(n){try{var a=n._init;return a(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Mi=l,bs):l}}var Mi=null;function sb(){if(Mi===null)throw Error(i(459));var n=Mi;return Mi=null,n}function lb(n){if(n===bs||n===cc)throw Error(i(483))}var ys=null,Tl=0;function dc(n){var a=Tl;return Tl+=1,ys===null&&(ys=[]),ib(ys,n,a)}function Al(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function fc(n,a){throw a.$$typeof===x?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function ob(n){function a(Z,G){if(n){var ne=Z.deletions;ne===null?(Z.deletions=[G],Z.flags|=16):ne.push(G)}}function l(Z,G){if(!n)return null;for(;G!==null;)a(Z,G),G=G.sibling;return null}function u(Z){for(var G=new Map;Z!==null;)Z.key!==null?G.set(Z.key,Z):G.set(Z.index,Z),Z=Z.sibling;return G}function b(Z,G){return Z=ca(Z,G),Z.index=0,Z.sibling=null,Z}function y(Z,G,ne){return Z.index=ne,n?(ne=Z.alternate,ne!==null?(ne=ne.index,ne<G?(Z.flags|=67108866,G):ne):(Z.flags|=67108866,G)):(Z.flags|=1048576,G)}function k(Z){return n&&Z.alternate===null&&(Z.flags|=67108866),Z}function M(Z,G,ne,pe){return G===null||G.tag!==6?(G=qd(ne,Z.mode,pe),G.return=Z,G):(G=b(G,ne),G.return=Z,G)}function F(Z,G,ne,pe){var Fe=ne.type;return Fe===S?de(Z,G,ne.props.children,pe,ne.key):G!==null&&(G.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===K&&Oi(Fe)===G.type)?(G=b(G,ne.props),Al(G,ne),G.return=Z,G):(G=ac(ne.type,ne.key,ne.props,null,Z.mode,pe),Al(G,ne),G.return=Z,G)}function ae(Z,G,ne,pe){return G===null||G.tag!==4||G.stateNode.containerInfo!==ne.containerInfo||G.stateNode.implementation!==ne.implementation?(G=Gd(ne,Z.mode,pe),G.return=Z,G):(G=b(G,ne.children||[]),G.return=Z,G)}function de(Z,G,ne,pe,Fe){return G===null||G.tag!==7?(G=Ni(ne,Z.mode,pe,Fe),G.return=Z,G):(G=b(G,ne),G.return=Z,G)}function me(Z,G,ne){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=qd(""+G,Z.mode,ne),G.return=Z,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case v:return ne=ac(G.type,G.key,G.props,null,Z.mode,ne),Al(ne,G),ne.return=Z,ne;case E:return G=Gd(G,Z.mode,ne),G.return=Z,G;case K:return G=Oi(G),me(Z,G,ne)}if($(G)||J(G))return G=Ni(G,Z.mode,ne,null),G.return=Z,G;if(typeof G.then=="function")return me(Z,dc(G),ne);if(G.$$typeof===C)return me(Z,lc(Z,G),ne);fc(Z,G)}return null}function le(Z,G,ne,pe){var Fe=G!==null?G.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Fe!==null?null:M(Z,G,""+ne,pe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case v:return ne.key===Fe?F(Z,G,ne,pe):null;case E:return ne.key===Fe?ae(Z,G,ne,pe):null;case K:return ne=Oi(ne),le(Z,G,ne,pe)}if($(ne)||J(ne))return Fe!==null?null:de(Z,G,ne,pe,null);if(typeof ne.then=="function")return le(Z,G,dc(ne),pe);if(ne.$$typeof===C)return le(Z,G,lc(Z,ne),pe);fc(Z,ne)}return null}function ue(Z,G,ne,pe,Fe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return Z=Z.get(ne)||null,M(G,Z,""+pe,Fe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case v:return Z=Z.get(pe.key===null?ne:pe.key)||null,F(G,Z,pe,Fe);case E:return Z=Z.get(pe.key===null?ne:pe.key)||null,ae(G,Z,pe,Fe);case K:return pe=Oi(pe),ue(Z,G,ne,pe,Fe)}if($(pe)||J(pe))return Z=Z.get(ne)||null,de(G,Z,pe,Fe,null);if(typeof pe.then=="function")return ue(Z,G,ne,dc(pe),Fe);if(pe.$$typeof===C)return ue(Z,G,ne,lc(G,pe),Fe);fc(G,pe)}return null}function Oe(Z,G,ne,pe){for(var Fe=null,Et=null,Le=G,it=G=0,gt=null;Le!==null&&it<ne.length;it++){Le.index>it?(gt=Le,Le=null):gt=Le.sibling;var St=le(Z,Le,ne[it],pe);if(St===null){Le===null&&(Le=gt);break}n&&Le&&St.alternate===null&&a(Z,Le),G=y(St,G,it),Et===null?Fe=St:Et.sibling=St,Et=St,Le=gt}if(it===ne.length)return l(Z,Le),yt&&ua(Z,it),Fe;if(Le===null){for(;it<ne.length;it++)Le=me(Z,ne[it],pe),Le!==null&&(G=y(Le,G,it),Et===null?Fe=Le:Et.sibling=Le,Et=Le);return yt&&ua(Z,it),Fe}for(Le=u(Le);it<ne.length;it++)gt=ue(Le,Z,it,ne[it],pe),gt!==null&&(n&&gt.alternate!==null&&Le.delete(gt.key===null?it:gt.key),G=y(gt,G,it),Et===null?Fe=gt:Et.sibling=gt,Et=gt);return n&&Le.forEach(function(si){return a(Z,si)}),yt&&ua(Z,it),Fe}function Ge(Z,G,ne,pe){if(ne==null)throw Error(i(151));for(var Fe=null,Et=null,Le=G,it=G=0,gt=null,St=ne.next();Le!==null&&!St.done;it++,St=ne.next()){Le.index>it?(gt=Le,Le=null):gt=Le.sibling;var si=le(Z,Le,St.value,pe);if(si===null){Le===null&&(Le=gt);break}n&&Le&&si.alternate===null&&a(Z,Le),G=y(si,G,it),Et===null?Fe=si:Et.sibling=si,Et=si,Le=gt}if(St.done)return l(Z,Le),yt&&ua(Z,it),Fe;if(Le===null){for(;!St.done;it++,St=ne.next())St=me(Z,St.value,pe),St!==null&&(G=y(St,G,it),Et===null?Fe=St:Et.sibling=St,Et=St);return yt&&ua(Z,it),Fe}for(Le=u(Le);!St.done;it++,St=ne.next())St=ue(Le,Z,it,St.value,pe),St!==null&&(n&&St.alternate!==null&&Le.delete(St.key===null?it:St.key),G=y(St,G,it),Et===null?Fe=St:Et.sibling=St,Et=St);return n&&Le.forEach(function(eC){return a(Z,eC)}),yt&&ua(Z,it),Fe}function It(Z,G,ne,pe){if(typeof ne=="object"&&ne!==null&&ne.type===S&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case v:e:{for(var Fe=ne.key;G!==null;){if(G.key===Fe){if(Fe=ne.type,Fe===S){if(G.tag===7){l(Z,G.sibling),pe=b(G,ne.props.children),pe.return=Z,Z=pe;break e}}else if(G.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===K&&Oi(Fe)===G.type){l(Z,G.sibling),pe=b(G,ne.props),Al(pe,ne),pe.return=Z,Z=pe;break e}l(Z,G);break}else a(Z,G);G=G.sibling}ne.type===S?(pe=Ni(ne.props.children,Z.mode,pe,ne.key),pe.return=Z,Z=pe):(pe=ac(ne.type,ne.key,ne.props,null,Z.mode,pe),Al(pe,ne),pe.return=Z,Z=pe)}return k(Z);case E:e:{for(Fe=ne.key;G!==null;){if(G.key===Fe)if(G.tag===4&&G.stateNode.containerInfo===ne.containerInfo&&G.stateNode.implementation===ne.implementation){l(Z,G.sibling),pe=b(G,ne.children||[]),pe.return=Z,Z=pe;break e}else{l(Z,G);break}else a(Z,G);G=G.sibling}pe=Gd(ne,Z.mode,pe),pe.return=Z,Z=pe}return k(Z);case K:return ne=Oi(ne),It(Z,G,ne,pe)}if($(ne))return Oe(Z,G,ne,pe);if(J(ne)){if(Fe=J(ne),typeof Fe!="function")throw Error(i(150));return ne=Fe.call(ne),Ge(Z,G,ne,pe)}if(typeof ne.then=="function")return It(Z,G,dc(ne),pe);if(ne.$$typeof===C)return It(Z,G,lc(Z,ne),pe);fc(Z,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,G!==null&&G.tag===6?(l(Z,G.sibling),pe=b(G,ne),pe.return=Z,Z=pe):(l(Z,G),pe=qd(ne,Z.mode,pe),pe.return=Z,Z=pe),k(Z)):l(Z,G)}return function(Z,G,ne,pe){try{Tl=0;var Fe=It(Z,G,ne,pe);return ys=null,Fe}catch(Le){if(Le===bs||Le===cc)throw Le;var Et=tr(29,Le,null,Z.mode);return Et.lanes=pe,Et.return=Z,Et}finally{}}}var Di=ob(!0),cb=ob(!1),Ha=!1;function af(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ka(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function qa(n,a,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Ct&2)!==0){var b=u.pending;return b===null?a.next=a:(a.next=b.next,b.next=a),u.pending=a,a=rc(n),Gg(n,null,l),a}return nc(n,u,a,l),rc(n)}function Rl(n,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,l|=u,a.lanes=l,qe(n,l)}}function lf(n,a){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var b=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?b=y=k:y=y.next=k,l=l.next}while(l!==null);y===null?b=y=a:y=y.next=a}else b=y=a;l={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=a:n.next=a,l.lastBaseUpdate=a}var of=!1;function Ol(){if(of){var n=gs;if(n!==null)throw n}}function Ml(n,a,l,u){of=!1;var b=n.updateQueue;Ha=!1;var y=b.firstBaseUpdate,k=b.lastBaseUpdate,M=b.shared.pending;if(M!==null){b.shared.pending=null;var F=M,ae=F.next;F.next=null,k===null?y=ae:k.next=ae,k=F;var de=n.alternate;de!==null&&(de=de.updateQueue,M=de.lastBaseUpdate,M!==k&&(M===null?de.firstBaseUpdate=ae:M.next=ae,de.lastBaseUpdate=F))}if(y!==null){var me=b.baseState;k=0,de=ae=F=null,M=y;do{var le=M.lane&-536870913,ue=le!==M.lane;if(ue?(mt&le)===le:(u&le)===le){le!==0&&le===ms&&(of=!0),de!==null&&(de=de.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Oe=n,Ge=M;le=a;var It=l;switch(Ge.tag){case 1:if(Oe=Ge.payload,typeof Oe=="function"){me=Oe.call(It,me,le);break e}me=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ge.payload,le=typeof Oe=="function"?Oe.call(It,me,le):Oe,le==null)break e;me=m({},me,le);break e;case 2:Ha=!0}}le=M.callback,le!==null&&(n.flags|=64,ue&&(n.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:M.tag,payload:M.payload,callback:M.callback,next:null},de===null?(ae=de=ue,F=me):de=de.next=ue,k|=le;if(M=M.next,M===null){if(M=b.shared.pending,M===null)break;ue=M,M=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);de===null&&(F=me),b.baseState=F,b.firstBaseUpdate=ae,b.lastBaseUpdate=de,y===null&&(b.shared.lanes=0),Xa|=k,n.lanes=k,n.memoizedState=me}}function ub(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function db(n,a){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)ub(l[n],a)}var xs=z(null),hc=z(0);function fb(n,a){n=wa,R(hc,n),R(xs,a),wa=n|a.baseLanes}function cf(){R(hc,wa),R(xs,xs.current)}function uf(){wa=hc.current,V(xs),V(hc)}var nr=z(null),Er=null;function Ga(n){var a=n.alternate;R(ln,ln.current&1),R(nr,n),Er===null&&(a===null||xs.current!==null||a.memoizedState!==null)&&(Er=n)}function df(n){R(ln,ln.current),R(nr,n),Er===null&&(Er=n)}function hb(n){n.tag===22?(R(ln,ln.current),R(nr,n),Er===null&&(Er=n)):Va()}function Va(){R(ln,ln.current),R(nr,nr.current)}function rr(n){V(nr),Er===n&&(Er=null),V(ln)}var ln=z(0);function pc(n){for(var a=n;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||bh(l)||yh(l)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ha=0,at=null,jt=null,hn=null,mc=!1,vs=!1,ji=!1,gc=0,Dl=0,ws=null,Kk=0;function tn(){throw Error(i(321))}function ff(n,a){if(a===null)return!1;for(var l=0;l<a.length&&l<n.length;l++)if(!er(n[l],a[l]))return!1;return!0}function hf(n,a,l,u,b,y){return ha=y,at=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=n===null||n.memoizedState===null?Xb:Tf,ji=!1,y=l(u,b),ji=!1,vs&&(y=mb(a,l,u,b)),pb(n),y}function pb(n){I.H=Il;var a=jt!==null&&jt.next!==null;if(ha=0,hn=jt=at=null,mc=!1,Dl=0,ws=null,a)throw Error(i(300));n===null||pn||(n=n.dependencies,n!==null&&sc(n)&&(pn=!0))}function mb(n,a,l,u){at=n;var b=0;do{if(vs&&(ws=null),Dl=0,vs=!1,25<=b)throw Error(i(301));if(b+=1,hn=jt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}I.H=Qb,y=a(l,u)}while(vs);return y}function qk(){var n=I.H,a=n.useState()[0];return a=typeof a.then=="function"?jl(a):a,n=n.useState()[0],(jt!==null?jt.memoizedState:null)!==n&&(at.flags|=1024),a}function pf(){var n=gc!==0;return gc=0,n}function mf(n,a,l){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~l}function gf(n){if(mc){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}mc=!1}ha=0,hn=jt=at=null,vs=!1,Dl=gc=0,ws=null}function Ln(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?at.memoizedState=hn=n:hn=hn.next=n,hn}function on(){if(jt===null){var n=at.alternate;n=n!==null?n.memoizedState:null}else n=jt.next;var a=hn===null?at.memoizedState:hn.next;if(a!==null)hn=a,jt=n;else{if(n===null)throw at.alternate===null?Error(i(467)):Error(i(310));jt=n,n={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},hn===null?at.memoizedState=hn=n:hn=hn.next=n}return hn}function bc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jl(n){var a=Dl;return Dl+=1,ws===null&&(ws=[]),n=ib(ws,n,a),a=at,(hn===null?a.memoizedState:hn.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Xb:Tf),n}function yc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return jl(n);if(n.$$typeof===C)return Sn(n)}throw Error(i(438,String(n)))}function bf(n){var a=null,l=at.updateQueue;if(l!==null&&(a=l.memoCache),a==null){var u=at.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(b){return b.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),l===null&&(l=bc(),at.updateQueue=l),l.memoCache=a,l=a.data[a.index],l===void 0)for(l=a.data[a.index]=Array(n),u=0;u<n;u++)l[u]=O;return a.index++,l}function pa(n,a){return typeof a=="function"?a(n):a}function xc(n){var a=on();return yf(a,jt,n)}function yf(n,a,l){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=l;var b=n.baseQueue,y=u.pending;if(y!==null){if(b!==null){var k=b.next;b.next=y.next,y.next=k}a.baseQueue=b=y,u.pending=null}if(y=n.baseState,b===null)n.memoizedState=y;else{a=b.next;var M=k=null,F=null,ae=a,de=!1;do{var me=ae.lane&-536870913;if(me!==ae.lane?(mt&me)===me:(ha&me)===me){var le=ae.revertLane;if(le===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),me===ms&&(de=!0);else if((ha&le)===le){ae=ae.next,le===ms&&(de=!0);continue}else me={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},F===null?(M=F=me,k=y):F=F.next=me,at.lanes|=le,Xa|=le;me=ae.action,ji&&l(y,me),y=ae.hasEagerState?ae.eagerState:l(y,me)}else le={lane:me,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},F===null?(M=F=le,k=y):F=F.next=le,at.lanes|=me,Xa|=me;ae=ae.next}while(ae!==null&&ae!==a);if(F===null?k=y:F.next=M,!er(y,n.memoizedState)&&(pn=!0,de&&(l=gs,l!==null)))throw l;n.memoizedState=y,n.baseState=k,n.baseQueue=F,u.lastRenderedState=y}return b===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function xf(n){var a=on(),l=a.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=n;var u=l.dispatch,b=l.pending,y=a.memoizedState;if(b!==null){l.pending=null;var k=b=b.next;do y=n(y,k.action),k=k.next;while(k!==b);er(y,a.memoizedState)||(pn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),l.lastRenderedState=y}return[y,u]}function gb(n,a,l){var u=at,b=on(),y=yt;if(y){if(l===void 0)throw Error(i(407));l=l()}else l=a();var k=!er((jt||b).memoizedState,l);if(k&&(b.memoizedState=l,pn=!0),b=b.queue,Ef(xb.bind(null,u,b,n),[n]),b.getSnapshot!==a||k||hn!==null&&hn.memoizedState.tag&1){if(u.flags|=2048,Es(9,{destroy:void 0},yb.bind(null,u,b,l,a),null),Bt===null)throw Error(i(349));y||(ha&127)!==0||bb(u,a,l)}return l}function bb(n,a,l){n.flags|=16384,n={getSnapshot:a,value:l},a=at.updateQueue,a===null?(a=bc(),at.updateQueue=a,a.stores=[n]):(l=a.stores,l===null?a.stores=[n]:l.push(n))}function yb(n,a,l,u){a.value=l,a.getSnapshot=u,vb(a)&&wb(n)}function xb(n,a,l){return l(function(){vb(a)&&wb(n)})}function vb(n){var a=n.getSnapshot;n=n.value;try{var l=a();return!er(n,l)}catch{return!0}}function wb(n){var a=ki(n,2);a!==null&&Vn(a,n,2)}function vf(n){var a=Ln();if(typeof n=="function"){var l=n;if(n=l(),ji){Ft(!0);try{l()}finally{Ft(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:n},a}function Eb(n,a,l,u){return n.baseState=l,yf(n,jt,typeof u=="function"?u:pa)}function Gk(n,a,l,u,b){if(Ec(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:b,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};I.T!==null?l(!0):y.isTransition=!1,u(y),l=a.pending,l===null?(y.next=a.pending=y,Sb(a,y)):(y.next=l.next,a.pending=l.next=y)}}function Sb(n,a){var l=a.action,u=a.payload,b=n.state;if(a.isTransition){var y=I.T,k={};I.T=k;try{var M=l(b,u),F=I.S;F!==null&&F(k,M),_b(n,a,M)}catch(ae){wf(n,a,ae)}finally{y!==null&&k.types!==null&&(y.types=k.types),I.T=y}}else try{y=l(b,u),_b(n,a,y)}catch(ae){wf(n,a,ae)}}function _b(n,a,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){kb(n,a,u)},function(u){return wf(n,a,u)}):kb(n,a,l)}function kb(n,a,l){a.status="fulfilled",a.value=l,Nb(a),n.state=l,a=n.pending,a!==null&&(l=a.next,l===a?n.pending=null:(l=l.next,a.next=l,Sb(n,l)))}function wf(n,a,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=l,Nb(a),a=a.next;while(a!==u)}n.action=null}function Nb(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Cb(n,a){return a}function Tb(n,a){if(yt){var l=Bt.formState;if(l!==null){e:{var u=at;if(yt){if(Gt){t:{for(var b=Gt,y=wr;b.nodeType!==8;){if(!y){b=null;break t}if(b=Sr(b.nextSibling),b===null){b=null;break t}}y=b.data,b=y==="F!"||y==="F"?b:null}if(b){Gt=Sr(b.nextSibling),u=b.data==="F!";break e}}Fa(u)}u=!1}u&&(a=l[0])}}return l=Ln(),l.memoizedState=l.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cb,lastRenderedState:a},l.queue=u,l=Vb.bind(null,at,u),u.dispatch=l,u=vf(!1),y=Cf.bind(null,at,!1,u.queue),u=Ln(),b={state:a,dispatch:null,action:n,pending:null},u.queue=b,l=Gk.bind(null,at,b,y,l),b.dispatch=l,u.memoizedState=n,[a,l,!1]}function Ab(n){var a=on();return Rb(a,jt,n)}function Rb(n,a,l){if(a=yf(n,a,Cb)[0],n=xc(pa)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=jl(a)}catch(k){throw k===bs?cc:k}else u=a;a=on();var b=a.queue,y=b.dispatch;return l!==a.memoizedState&&(at.flags|=2048,Es(9,{destroy:void 0},Vk.bind(null,b,l),null)),[u,y,n]}function Vk(n,a){n.action=a}function Ob(n){var a=on(),l=jt;if(l!==null)return Rb(a,l,n);on(),a=a.memoizedState,l=on();var u=l.queue.dispatch;return l.memoizedState=n,[a,u,!1]}function Es(n,a,l,u){return n={tag:n,create:l,deps:u,inst:a,next:null},a=at.updateQueue,a===null&&(a=bc(),at.updateQueue=a),l=a.lastEffect,l===null?a.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,a.lastEffect=n),n}function Mb(){return on().memoizedState}function vc(n,a,l,u){var b=Ln();at.flags|=n,b.memoizedState=Es(1|a,{destroy:void 0},l,u===void 0?null:u)}function wc(n,a,l,u){var b=on();u=u===void 0?null:u;var y=b.memoizedState.inst;jt!==null&&u!==null&&ff(u,jt.memoizedState.deps)?b.memoizedState=Es(a,y,l,u):(at.flags|=n,b.memoizedState=Es(1|a,y,l,u))}function Db(n,a){vc(8390656,8,n,a)}function Ef(n,a){wc(2048,8,n,a)}function Yk(n){at.flags|=4;var a=at.updateQueue;if(a===null)a=bc(),at.updateQueue=a,a.events=[n];else{var l=a.events;l===null?a.events=[n]:l.push(n)}}function jb(n){var a=on().memoizedState;return Yk({ref:a,nextImpl:n}),function(){if((Ct&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Lb(n,a){return wc(4,2,n,a)}function Ib(n,a){return wc(4,4,n,a)}function zb(n,a){if(typeof a=="function"){n=n();var l=a(n);return function(){typeof l=="function"?l():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Pb(n,a,l){l=l!=null?l.concat([n]):null,wc(4,4,zb.bind(null,a,n),l)}function Sf(){}function Bb(n,a){var l=on();a=a===void 0?null:a;var u=l.memoizedState;return a!==null&&ff(a,u[1])?u[0]:(l.memoizedState=[n,a],n)}function Ub(n,a){var l=on();a=a===void 0?null:a;var u=l.memoizedState;if(a!==null&&ff(a,u[1]))return u[0];if(u=n(),ji){Ft(!0);try{n()}finally{Ft(!1)}}return l.memoizedState=[u,a],u}function _f(n,a,l){return l===void 0||(ha&1073741824)!==0&&(mt&261930)===0?n.memoizedState=a:(n.memoizedState=l,n=Fy(),at.lanes|=n,Xa|=n,l)}function Fb(n,a,l,u){return er(l,a)?l:xs.current!==null?(n=_f(n,l,u),er(n,a)||(pn=!0),n):(ha&42)===0||(ha&1073741824)!==0&&(mt&261930)===0?(pn=!0,n.memoizedState=l):(n=Fy(),at.lanes|=n,Xa|=n,a)}function $b(n,a,l,u,b){var y=W.p;W.p=y!==0&&8>y?y:8;var k=I.T,M={};I.T=M,Cf(n,!1,a,l);try{var F=b(),ae=I.S;if(ae!==null&&ae(M,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var de=Hk(F,u);Ll(n,a,de,sr(n))}else Ll(n,a,u,sr(n))}catch(me){Ll(n,a,{then:function(){},status:"rejected",reason:me},sr())}finally{W.p=y,k!==null&&M.types!==null&&(k.types=M.types),I.T=k}}function Wk(){}function kf(n,a,l,u){if(n.tag!==5)throw Error(i(476));var b=Hb(n).queue;$b(n,b,a,Q,l===null?Wk:function(){return Kb(n),l(u)})}function Hb(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:Q},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:l},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Kb(n){var a=Hb(n);a.next===null&&(a=n.alternate.memoizedState),Ll(n,a.next.queue,{},sr())}function Nf(){return Sn(Zl)}function qb(){return on().memoizedState}function Gb(){return on().memoizedState}function Xk(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var l=sr();n=Ka(l);var u=qa(a,n,l);u!==null&&(Vn(u,a,l),Rl(u,a,l)),a={cache:ef()},n.payload=a;return}a=a.return}}function Qk(n,a,l){var u=sr();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ec(n)?Yb(a,l):(l=Hd(n,a,l,u),l!==null&&(Vn(l,n,u),Wb(l,a,u)))}function Vb(n,a,l){var u=sr();Ll(n,a,l,u)}function Ll(n,a,l,u){var b={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ec(n))Yb(a,b);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var k=a.lastRenderedState,M=y(k,l);if(b.hasEagerState=!0,b.eagerState=M,er(M,k))return nc(n,a,b,0),Bt===null&&tc(),!1}catch{}finally{}if(l=Hd(n,a,b,u),l!==null)return Vn(l,n,u),Wb(l,a,u),!0}return!1}function Cf(n,a,l,u){if(u={lane:2,revertLane:ih(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ec(n)){if(a)throw Error(i(479))}else a=Hd(n,l,u,2),a!==null&&Vn(a,n,2)}function Ec(n){var a=n.alternate;return n===at||a!==null&&a===at}function Yb(n,a){vs=mc=!0;var l=n.pending;l===null?a.next=a:(a.next=l.next,l.next=a),n.pending=a}function Wb(n,a,l){if((l&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,l|=u,a.lanes=l,qe(n,l)}}var Il={readContext:Sn,use:yc,useCallback:tn,useContext:tn,useEffect:tn,useImperativeHandle:tn,useLayoutEffect:tn,useInsertionEffect:tn,useMemo:tn,useReducer:tn,useRef:tn,useState:tn,useDebugValue:tn,useDeferredValue:tn,useTransition:tn,useSyncExternalStore:tn,useId:tn,useHostTransitionStatus:tn,useFormState:tn,useActionState:tn,useOptimistic:tn,useMemoCache:tn,useCacheRefresh:tn};Il.useEffectEvent=tn;var Xb={readContext:Sn,use:yc,useCallback:function(n,a){return Ln().memoizedState=[n,a===void 0?null:a],n},useContext:Sn,useEffect:Db,useImperativeHandle:function(n,a,l){l=l!=null?l.concat([n]):null,vc(4194308,4,zb.bind(null,a,n),l)},useLayoutEffect:function(n,a){return vc(4194308,4,n,a)},useInsertionEffect:function(n,a){vc(4,2,n,a)},useMemo:function(n,a){var l=Ln();a=a===void 0?null:a;var u=n();if(ji){Ft(!0);try{n()}finally{Ft(!1)}}return l.memoizedState=[u,a],u},useReducer:function(n,a,l){var u=Ln();if(l!==void 0){var b=l(a);if(ji){Ft(!0);try{l(a)}finally{Ft(!1)}}}else b=a;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=Qk.bind(null,at,n),[u.memoizedState,n]},useRef:function(n){var a=Ln();return n={current:n},a.memoizedState=n},useState:function(n){n=vf(n);var a=n.queue,l=Vb.bind(null,at,a);return a.dispatch=l,[n.memoizedState,l]},useDebugValue:Sf,useDeferredValue:function(n,a){var l=Ln();return _f(l,n,a)},useTransition:function(){var n=vf(!1);return n=$b.bind(null,at,n.queue,!0,!1),Ln().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,l){var u=at,b=Ln();if(yt){if(l===void 0)throw Error(i(407));l=l()}else{if(l=a(),Bt===null)throw Error(i(349));(mt&127)!==0||bb(u,a,l)}b.memoizedState=l;var y={value:l,getSnapshot:a};return b.queue=y,Db(xb.bind(null,u,y,n),[n]),u.flags|=2048,Es(9,{destroy:void 0},yb.bind(null,u,y,l,a),null),l},useId:function(){var n=Ln(),a=Bt.identifierPrefix;if(yt){var l=Hr,u=$r;l=(u&~(1<<32-We(u)-1)).toString(32)+l,a="_"+a+"R_"+l,l=gc++,0<l&&(a+="H"+l.toString(32)),a+="_"}else l=Kk++,a="_"+a+"r_"+l.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Nf,useFormState:Tb,useActionState:Tb,useOptimistic:function(n){var a=Ln();a.memoizedState=a.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=l,a=Cf.bind(null,at,!0,l),l.dispatch=a,[n,a]},useMemoCache:bf,useCacheRefresh:function(){return Ln().memoizedState=Xk.bind(null,at)},useEffectEvent:function(n){var a=Ln(),l={impl:n};return a.memoizedState=l,function(){if((Ct&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},Tf={readContext:Sn,use:yc,useCallback:Bb,useContext:Sn,useEffect:Ef,useImperativeHandle:Pb,useInsertionEffect:Lb,useLayoutEffect:Ib,useMemo:Ub,useReducer:xc,useRef:Mb,useState:function(){return xc(pa)},useDebugValue:Sf,useDeferredValue:function(n,a){var l=on();return Fb(l,jt.memoizedState,n,a)},useTransition:function(){var n=xc(pa)[0],a=on().memoizedState;return[typeof n=="boolean"?n:jl(n),a]},useSyncExternalStore:gb,useId:qb,useHostTransitionStatus:Nf,useFormState:Ab,useActionState:Ab,useOptimistic:function(n,a){var l=on();return Eb(l,jt,n,a)},useMemoCache:bf,useCacheRefresh:Gb};Tf.useEffectEvent=jb;var Qb={readContext:Sn,use:yc,useCallback:Bb,useContext:Sn,useEffect:Ef,useImperativeHandle:Pb,useInsertionEffect:Lb,useLayoutEffect:Ib,useMemo:Ub,useReducer:xf,useRef:Mb,useState:function(){return xf(pa)},useDebugValue:Sf,useDeferredValue:function(n,a){var l=on();return jt===null?_f(l,n,a):Fb(l,jt.memoizedState,n,a)},useTransition:function(){var n=xf(pa)[0],a=on().memoizedState;return[typeof n=="boolean"?n:jl(n),a]},useSyncExternalStore:gb,useId:qb,useHostTransitionStatus:Nf,useFormState:Ob,useActionState:Ob,useOptimistic:function(n,a){var l=on();return jt!==null?Eb(l,jt,n,a):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:bf,useCacheRefresh:Gb};Qb.useEffectEvent=jb;function Af(n,a,l,u){a=n.memoizedState,l=l(u,a),l=l==null?a:m({},a,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var Rf={enqueueSetState:function(n,a,l){n=n._reactInternals;var u=sr(),b=Ka(u);b.payload=a,l!=null&&(b.callback=l),a=qa(n,b,u),a!==null&&(Vn(a,n,u),Rl(a,n,u))},enqueueReplaceState:function(n,a,l){n=n._reactInternals;var u=sr(),b=Ka(u);b.tag=1,b.payload=a,l!=null&&(b.callback=l),a=qa(n,b,u),a!==null&&(Vn(a,n,u),Rl(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var l=sr(),u=Ka(l);u.tag=2,a!=null&&(u.callback=a),a=qa(n,u,l),a!==null&&(Vn(a,n,l),Rl(a,n,l))}};function Zb(n,a,l,u,b,y,k){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,k):a.prototype&&a.prototype.isPureReactComponent?!El(l,u)||!El(b,y):!0}function Jb(n,a,l,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,u),a.state!==n&&Rf.enqueueReplaceState(a,a.state,null)}function Li(n,a){var l=a;if("ref"in a){l={};for(var u in a)u!=="ref"&&(l[u]=a[u])}if(n=n.defaultProps){l===a&&(l=m({},l));for(var b in n)l[b]===void 0&&(l[b]=n[b])}return l}function ey(n){ec(n)}function ty(n){console.error(n)}function ny(n){ec(n)}function Sc(n,a){try{var l=n.onUncaughtError;l(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function ry(n,a,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Of(n,a,l){return l=Ka(l),l.tag=3,l.payload={element:null},l.callback=function(){Sc(n,a)},l}function ay(n){return n=Ka(n),n.tag=3,n}function iy(n,a,l,u){var b=l.type.getDerivedStateFromError;if(typeof b=="function"){var y=u.value;n.payload=function(){return b(y)},n.callback=function(){ry(a,l,u)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(n.callback=function(){ry(a,l,u),typeof b!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})})}function Zk(n,a,l,u,b){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=l.alternate,a!==null&&ps(a,l,b,!0),l=nr.current,l!==null){switch(l.tag){case 31:case 13:return Er===null?Lc():l.alternate===null&&nn===0&&(nn=3),l.flags&=-257,l.flags|=65536,l.lanes=b,u===uc?l.flags|=16384:(a=l.updateQueue,a===null?l.updateQueue=new Set([u]):a.add(u),nh(n,u,b)),!1;case 22:return l.flags|=65536,u===uc?l.flags|=16384:(a=l.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=a):(l=a.retryQueue,l===null?a.retryQueue=new Set([u]):l.add(u)),nh(n,u,b)),!1}throw Error(i(435,l.tag))}return nh(n,u,b),Lc(),!1}if(yt)return a=nr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=b,u!==Wd&&(n=Error(i(422),{cause:u}),kl(yr(n,l)))):(u!==Wd&&(a=Error(i(423),{cause:u}),kl(yr(a,l))),n=n.current.alternate,n.flags|=65536,b&=-b,n.lanes|=b,u=yr(u,l),b=Of(n.stateNode,u,b),lf(n,b),nn!==4&&(nn=2)),!1;var y=Error(i(520),{cause:u});if(y=yr(y,l),Kl===null?Kl=[y]:Kl.push(y),nn!==4&&(nn=2),a===null)return!0;u=yr(u,l),l=a;do{switch(l.tag){case 3:return l.flags|=65536,n=b&-b,l.lanes|=n,n=Of(l.stateNode,u,n),lf(l,n),!1;case 1:if(a=l.type,y=l.stateNode,(l.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Qa===null||!Qa.has(y))))return l.flags|=65536,b&=-b,l.lanes|=b,b=ay(b),iy(b,n,l,u),lf(l,b),!1}l=l.return}while(l!==null);return!1}var Mf=Error(i(461)),pn=!1;function _n(n,a,l,u){a.child=n===null?cb(a,null,l,u):Di(a,n.child,l,u)}function sy(n,a,l,u,b){l=l.render;var y=a.ref;if("ref"in u){var k={};for(var M in u)M!=="ref"&&(k[M]=u[M])}else k=u;return Ai(a),u=hf(n,a,l,k,y,b),M=pf(),n!==null&&!pn?(mf(n,a,b),ma(n,a,b)):(yt&&M&&Vd(a),a.flags|=1,_n(n,a,u,b),a.child)}function ly(n,a,l,u,b){if(n===null){var y=l.type;return typeof y=="function"&&!Kd(y)&&y.defaultProps===void 0&&l.compare===null?(a.tag=15,a.type=y,oy(n,a,y,u,b)):(n=ac(l.type,null,u,a,a.mode,b),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!Uf(n,b)){var k=y.memoizedProps;if(l=l.compare,l=l!==null?l:El,l(k,u)&&n.ref===a.ref)return ma(n,a,b)}return a.flags|=1,n=ca(y,u),n.ref=a.ref,n.return=a,a.child=n}function oy(n,a,l,u,b){if(n!==null){var y=n.memoizedProps;if(El(y,u)&&n.ref===a.ref)if(pn=!1,a.pendingProps=u=y,Uf(n,b))(n.flags&131072)!==0&&(pn=!0);else return a.lanes=n.lanes,ma(n,a,b)}return Df(n,a,l,u,b)}function cy(n,a,l,u){var b=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|l:l,n!==null){for(u=a.child=n.child,b=0;u!==null;)b=b|u.lanes|u.childLanes,u=u.sibling;u=b&~y}else u=0,a.child=null;return uy(n,a,y,l,u)}if((l&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&oc(a,y!==null?y.cachePool:null),y!==null?fb(a,y):cf(),hb(a);else return u=a.lanes=536870912,uy(n,a,y!==null?y.baseLanes|l:l,l,u)}else y!==null?(oc(a,y.cachePool),fb(a,y),Va(),a.memoizedState=null):(n!==null&&oc(a,null),cf(),Va());return _n(n,a,b,l),a.child}function zl(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function uy(n,a,l,u,b){var y=nf();return y=y===null?null:{parent:fn._currentValue,pool:y},a.memoizedState={baseLanes:l,cachePool:y},n!==null&&oc(a,null),cf(),hb(a),n!==null&&ps(n,a,u,!0),a.childLanes=b,null}function _c(n,a){return a=Nc({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function dy(n,a,l){return Di(a,n.child,null,l),n=_c(a,a.pendingProps),n.flags|=2,rr(a),a.memoizedState=null,n}function Jk(n,a,l){var u=a.pendingProps,b=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(yt){if(u.mode==="hidden")return n=_c(a,u),a.lanes=536870912,zl(null,n);if(df(a),(n=Gt)?(n=S0(n,wr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ba!==null?{id:$r,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},l=Yg(n),l.return=a,a.child=l,En=a,Gt=null)):n=null,n===null)throw Fa(a);return a.lanes=536870912,null}return _c(a,u)}var y=n.memoizedState;if(y!==null){var k=y.dehydrated;if(df(a),b)if(a.flags&256)a.flags&=-257,a=dy(n,a,l);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(pn||ps(n,a,l,!1),b=(l&n.childLanes)!==0,pn||b){if(u=Bt,u!==null&&(k=Zt(u,l),k!==0&&k!==y.retryLane))throw y.retryLane=k,ki(n,k),Vn(u,n,k),Mf;Lc(),a=dy(n,a,l)}else n=y.treeContext,Gt=Sr(k.nextSibling),En=a,yt=!0,Ua=null,wr=!1,n!==null&&Qg(a,n),a=_c(a,u),a.flags|=4096;return a}return n=ca(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function kc(n,a){var l=a.ref;if(l===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(n===null||n.ref!==l)&&(a.flags|=4194816)}}function Df(n,a,l,u,b){return Ai(a),l=hf(n,a,l,u,void 0,b),u=pf(),n!==null&&!pn?(mf(n,a,b),ma(n,a,b)):(yt&&u&&Vd(a),a.flags|=1,_n(n,a,l,b),a.child)}function fy(n,a,l,u,b,y){return Ai(a),a.updateQueue=null,l=mb(a,u,l,b),pb(n),u=pf(),n!==null&&!pn?(mf(n,a,y),ma(n,a,y)):(yt&&u&&Vd(a),a.flags|=1,_n(n,a,l,y),a.child)}function hy(n,a,l,u,b){if(Ai(a),a.stateNode===null){var y=us,k=l.contextType;typeof k=="object"&&k!==null&&(y=Sn(k)),y=new l(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Rf,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},af(a),k=l.contextType,y.context=typeof k=="object"&&k!==null?Sn(k):us,y.state=a.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(Af(a,l,k,u),y.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&Rf.enqueueReplaceState(y,y.state,null),Ml(a,u,y,b),Ol(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var M=a.memoizedProps,F=Li(l,M);y.props=F;var ae=y.context,de=l.contextType;k=us,typeof de=="object"&&de!==null&&(k=Sn(de));var me=l.getDerivedStateFromProps;de=typeof me=="function"||typeof y.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,de||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(M||ae!==k)&&Jb(a,y,u,k),Ha=!1;var le=a.memoizedState;y.state=le,Ml(a,u,y,b),Ol(),ae=a.memoizedState,M||le!==ae||Ha?(typeof me=="function"&&(Af(a,l,me,u),ae=a.memoizedState),(F=Ha||Zb(a,l,F,u,le,ae,k))?(de||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=ae),y.props=u,y.state=ae,y.context=k,u=F):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,sf(n,a),k=a.memoizedProps,de=Li(l,k),y.props=de,me=a.pendingProps,le=y.context,ae=l.contextType,F=us,typeof ae=="object"&&ae!==null&&(F=Sn(ae)),M=l.getDerivedStateFromProps,(ae=typeof M=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==me||le!==F)&&Jb(a,y,u,F),Ha=!1,le=a.memoizedState,y.state=le,Ml(a,u,y,b),Ol();var ue=a.memoizedState;k!==me||le!==ue||Ha||n!==null&&n.dependencies!==null&&sc(n.dependencies)?(typeof M=="function"&&(Af(a,l,M,u),ue=a.memoizedState),(de=Ha||Zb(a,l,de,u,le,ue,F)||n!==null&&n.dependencies!==null&&sc(n.dependencies))?(ae||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ue,F),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ue,F)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ue),y.props=u,y.state=ue,y.context=F,u=de):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,kc(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Di(a,n.child,null,b),a.child=Di(a,null,l,b)):_n(n,a,l,b),a.memoizedState=y.state,n=a.child):n=ma(n,a,b),n}function py(n,a,l,u){return Ci(),a.flags|=256,_n(n,a,l,u),a.child}var jf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lf(n){return{baseLanes:n,cachePool:rb()}}function If(n,a,l){return n=n!==null?n.childLanes&~l:0,a&&(n|=ir),n}function my(n,a,l){var u=a.pendingProps,b=!1,y=(a.flags&128)!==0,k;if((k=y)||(k=n!==null&&n.memoizedState===null?!1:(ln.current&2)!==0),k&&(b=!0,a.flags&=-129),k=(a.flags&32)!==0,a.flags&=-33,n===null){if(yt){if(b?Ga(a):Va(),(n=Gt)?(n=S0(n,wr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ba!==null?{id:$r,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},l=Yg(n),l.return=a,a.child=l,En=a,Gt=null)):n=null,n===null)throw Fa(a);return yh(n)?a.lanes=32:a.lanes=536870912,null}var M=u.children;return u=u.fallback,b?(Va(),b=a.mode,M=Nc({mode:"hidden",children:M},b),u=Ni(u,b,l,null),M.return=a,u.return=a,M.sibling=u,a.child=M,u=a.child,u.memoizedState=Lf(l),u.childLanes=If(n,k,l),a.memoizedState=jf,zl(null,u)):(Ga(a),zf(a,M))}var F=n.memoizedState;if(F!==null&&(M=F.dehydrated,M!==null)){if(y)a.flags&256?(Ga(a),a.flags&=-257,a=Pf(n,a,l)):a.memoizedState!==null?(Va(),a.child=n.child,a.flags|=128,a=null):(Va(),M=u.fallback,b=a.mode,u=Nc({mode:"visible",children:u.children},b),M=Ni(M,b,l,null),M.flags|=2,u.return=a,M.return=a,u.sibling=M,a.child=u,Di(a,n.child,null,l),u=a.child,u.memoizedState=Lf(l),u.childLanes=If(n,k,l),a.memoizedState=jf,a=zl(null,u));else if(Ga(a),yh(M)){if(k=M.nextSibling&&M.nextSibling.dataset,k)var ae=k.dgst;k=ae,u=Error(i(419)),u.stack="",u.digest=k,kl({value:u,source:null,stack:null}),a=Pf(n,a,l)}else if(pn||ps(n,a,l,!1),k=(l&n.childLanes)!==0,pn||k){if(k=Bt,k!==null&&(u=Zt(k,l),u!==0&&u!==F.retryLane))throw F.retryLane=u,ki(n,u),Vn(k,n,u),Mf;bh(M)||Lc(),a=Pf(n,a,l)}else bh(M)?(a.flags|=192,a.child=n.child,a=null):(n=F.treeContext,Gt=Sr(M.nextSibling),En=a,yt=!0,Ua=null,wr=!1,n!==null&&Qg(a,n),a=zf(a,u.children),a.flags|=4096);return a}return b?(Va(),M=u.fallback,b=a.mode,F=n.child,ae=F.sibling,u=ca(F,{mode:"hidden",children:u.children}),u.subtreeFlags=F.subtreeFlags&65011712,ae!==null?M=ca(ae,M):(M=Ni(M,b,l,null),M.flags|=2),M.return=a,u.return=a,u.sibling=M,a.child=u,zl(null,u),u=a.child,M=n.child.memoizedState,M===null?M=Lf(l):(b=M.cachePool,b!==null?(F=fn._currentValue,b=b.parent!==F?{parent:F,pool:F}:b):b=rb(),M={baseLanes:M.baseLanes|l,cachePool:b}),u.memoizedState=M,u.childLanes=If(n,k,l),a.memoizedState=jf,zl(n.child,u)):(Ga(a),l=n.child,n=l.sibling,l=ca(l,{mode:"visible",children:u.children}),l.return=a,l.sibling=null,n!==null&&(k=a.deletions,k===null?(a.deletions=[n],a.flags|=16):k.push(n)),a.child=l,a.memoizedState=null,l)}function zf(n,a){return a=Nc({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Nc(n,a){return n=tr(22,n,null,a),n.lanes=0,n}function Pf(n,a,l){return Di(a,n.child,null,l),n=zf(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function gy(n,a,l){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),Zd(n.return,a,l)}function Bf(n,a,l,u,b,y){var k=n.memoizedState;k===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:b,treeForkCount:y}:(k.isBackwards=a,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=l,k.tailMode=b,k.treeForkCount=y)}function by(n,a,l){var u=a.pendingProps,b=u.revealOrder,y=u.tail;u=u.children;var k=ln.current,M=(k&2)!==0;if(M?(k=k&1|2,a.flags|=128):k&=1,R(ln,k),_n(n,a,u,l),u=yt?_l:0,!M&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&gy(n,l,a);else if(n.tag===19)gy(n,l,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(b){case"forwards":for(l=a.child,b=null;l!==null;)n=l.alternate,n!==null&&pc(n)===null&&(b=l),l=l.sibling;l=b,l===null?(b=a.child,a.child=null):(b=l.sibling,l.sibling=null),Bf(a,!1,b,l,y,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,b=a.child,a.child=null;b!==null;){if(n=b.alternate,n!==null&&pc(n)===null){a.child=b;break}n=b.sibling,b.sibling=l,l=b,b=n}Bf(a,!0,l,null,y,u);break;case"together":Bf(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function ma(n,a,l){if(n!==null&&(a.dependencies=n.dependencies),Xa|=a.lanes,(l&a.childLanes)===0)if(n!==null){if(ps(n,a,l,!1),(l&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,l=ca(n,n.pendingProps),a.child=l,l.return=a;n.sibling!==null;)n=n.sibling,l=l.sibling=ca(n,n.pendingProps),l.return=a;l.sibling=null}return a.child}function Uf(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&sc(n)))}function eN(n,a,l){switch(a.tag){case 3:be(a,a.stateNode.containerInfo),$a(a,fn,n.memoizedState.cache),Ci();break;case 27:case 5:ke(a);break;case 4:be(a,a.stateNode.containerInfo);break;case 10:$a(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,df(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Ga(a),a.flags|=128,null):(l&a.child.childLanes)!==0?my(n,a,l):(Ga(a),n=ma(n,a,l),n!==null?n.sibling:null);Ga(a);break;case 19:var b=(n.flags&128)!==0;if(u=(l&a.childLanes)!==0,u||(ps(n,a,l,!1),u=(l&a.childLanes)!==0),b){if(u)return by(n,a,l);a.flags|=128}if(b=a.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),R(ln,ln.current),u)break;return null;case 22:return a.lanes=0,cy(n,a,l,a.pendingProps);case 24:$a(a,fn,n.memoizedState.cache)}return ma(n,a,l)}function yy(n,a,l){if(n!==null)if(n.memoizedProps!==a.pendingProps)pn=!0;else{if(!Uf(n,l)&&(a.flags&128)===0)return pn=!1,eN(n,a,l);pn=(n.flags&131072)!==0}else pn=!1,yt&&(a.flags&1048576)!==0&&Xg(a,_l,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Oi(a.elementType),a.type=n,typeof n=="function")Kd(n)?(u=Li(n,u),a.tag=1,a=hy(null,a,n,u,l)):(a.tag=0,a=Df(null,a,n,u,l));else{if(n!=null){var b=n.$$typeof;if(b===j){a.tag=11,a=sy(null,a,n,u,l);break e}else if(b===P){a.tag=14,a=ly(null,a,n,u,l);break e}}throw a=q(n)||n,Error(i(306,a,""))}}return a;case 0:return Df(n,a,a.type,a.pendingProps,l);case 1:return u=a.type,b=Li(u,a.pendingProps),hy(n,a,u,b,l);case 3:e:{if(be(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;b=y.element,sf(n,a),Ml(a,u,null,l);var k=a.memoizedState;if(u=k.cache,$a(a,fn,u),u!==y.cache&&Jd(a,[fn],l,!0),Ol(),u=k.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:k.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=py(n,a,u,l);break e}else if(u!==b){b=yr(Error(i(424)),a),kl(b),a=py(n,a,u,l);break e}else{switch(n=a.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Gt=Sr(n.firstChild),En=a,yt=!0,Ua=null,wr=!0,l=cb(a,null,u,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ci(),u===b){a=ma(n,a,l);break e}_n(n,a,u,l)}a=a.child}return a;case 26:return kc(n,a),n===null?(l=A0(a.type,null,a.pendingProps,null))?a.memoizedState=l:yt||(l=a.type,n=a.pendingProps,u=$c(oe.current).createElement(l),u[an]=a,u[Cn]=n,kn(u,l,n),un(u),a.stateNode=u):a.memoizedState=A0(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return ke(a),n===null&&yt&&(u=a.stateNode=N0(a.type,a.pendingProps,oe.current),En=a,wr=!0,b=Gt,ti(a.type)?(xh=b,Gt=Sr(u.firstChild)):Gt=b),_n(n,a,a.pendingProps.children,l),kc(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&yt&&((b=u=Gt)&&(u=RN(u,a.type,a.pendingProps,wr),u!==null?(a.stateNode=u,En=a,Gt=Sr(u.firstChild),wr=!1,b=!0):b=!1),b||Fa(a)),ke(a),b=a.type,y=a.pendingProps,k=n!==null?n.memoizedProps:null,u=y.children,ph(b,y)?u=null:k!==null&&ph(b,k)&&(a.flags|=32),a.memoizedState!==null&&(b=hf(n,a,qk,null,null,l),Zl._currentValue=b),kc(n,a),_n(n,a,u,l),a.child;case 6:return n===null&&yt&&((n=l=Gt)&&(l=ON(l,a.pendingProps,wr),l!==null?(a.stateNode=l,En=a,Gt=null,n=!0):n=!1),n||Fa(a)),null;case 13:return my(n,a,l);case 4:return be(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Di(a,null,u,l):_n(n,a,u,l),a.child;case 11:return sy(n,a,a.type,a.pendingProps,l);case 7:return _n(n,a,a.pendingProps,l),a.child;case 8:return _n(n,a,a.pendingProps.children,l),a.child;case 12:return _n(n,a,a.pendingProps.children,l),a.child;case 10:return u=a.pendingProps,$a(a,a.type,u.value),_n(n,a,u.children,l),a.child;case 9:return b=a.type._context,u=a.pendingProps.children,Ai(a),b=Sn(b),u=u(b),a.flags|=1,_n(n,a,u,l),a.child;case 14:return ly(n,a,a.type,a.pendingProps,l);case 15:return oy(n,a,a.type,a.pendingProps,l);case 19:return by(n,a,l);case 31:return Jk(n,a,l);case 22:return cy(n,a,l,a.pendingProps);case 24:return Ai(a),u=Sn(fn),n===null?(b=nf(),b===null&&(b=Bt,y=ef(),b.pooledCache=y,y.refCount++,y!==null&&(b.pooledCacheLanes|=l),b=y),a.memoizedState={parent:u,cache:b},af(a),$a(a,fn,b)):((n.lanes&l)!==0&&(sf(n,a),Ml(a,null,null,l),Ol()),b=n.memoizedState,y=a.memoizedState,b.parent!==u?(b={parent:u,cache:u},a.memoizedState=b,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=b),$a(a,fn,u)):(u=y.cache,$a(a,fn,u),u!==b.cache&&Jd(a,[fn],l,!0))),_n(n,a,a.pendingProps.children,l),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function ga(n){n.flags|=4}function Ff(n,a,l,u,b){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(b&335544128)===b)if(n.stateNode.complete)n.flags|=8192;else if(qy())n.flags|=8192;else throw Mi=uc,rf}else n.flags&=-16777217}function xy(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!j0(a))if(qy())n.flags|=8192;else throw Mi=uc,rf}function Cc(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Xe():536870912,n.lanes|=a,Ns|=a)}function Pl(n,a){if(!yt)switch(n.tailMode){case"hidden":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Vt(n){var a=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(a)for(var b=n.child;b!==null;)l|=b.lanes|b.childLanes,u|=b.subtreeFlags&65011712,u|=b.flags&65011712,b.return=n,b=b.sibling;else for(b=n.child;b!==null;)l|=b.lanes|b.childLanes,u|=b.subtreeFlags,u|=b.flags,b.return=n,b=b.sibling;return n.subtreeFlags|=u,n.childLanes=l,a}function tN(n,a,l){var u=a.pendingProps;switch(Yd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vt(a),null;case 1:return Vt(a),null;case 3:return l=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),fa(fn),Ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(hs(a)?ga(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Xd())),Vt(a),null;case 26:var b=a.type,y=a.memoizedState;return n===null?(ga(a),y!==null?(Vt(a),xy(a,y)):(Vt(a),Ff(a,b,null,u,l))):y?y!==n.memoizedState?(ga(a),Vt(a),xy(a,y)):(Vt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&ga(a),Vt(a),Ff(a,b,n,u,l)),null;case 27:if(Ne(a),l=oe.current,b=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&ga(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Vt(a),null}n=ee.current,hs(a)?Zg(a):(n=N0(b,u,l),a.stateNode=n,ga(a))}return Vt(a),null;case 5:if(Ne(a),b=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&ga(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Vt(a),null}if(y=ee.current,hs(a))Zg(a);else{var k=$c(oe.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?k.createElement(b,{is:u.is}):k.createElement(b)}}y[an]=a,y[Cn]=u;e:for(k=a.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===a)break e;for(;k.sibling===null;){if(k.return===null||k.return===a)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}a.stateNode=y;e:switch(kn(y,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ga(a)}}return Vt(a),Ff(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,l),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&ga(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=oe.current,hs(a)){if(n=a.stateNode,l=a.memoizedProps,u=null,b=En,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[an]=a,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||m0(n.nodeValue,l)),n||Fa(a,!0)}else n=$c(n).createTextNode(u),n[an]=a,a.stateNode=n}return Vt(a),null;case 31:if(l=a.memoizedState,n===null||n.memoizedState!==null){if(u=hs(a),l!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[an]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Vt(a),n=!1}else l=Xd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return a.flags&256?(rr(a),a):(rr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Vt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=hs(a),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(i(318));if(b=a.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(i(317));b[an]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Vt(a),b=!1}else b=Xd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return a.flags&256?(rr(a),a):(rr(a),null)}return rr(a),(a.flags&128)!==0?(a.lanes=l,a):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=a.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==b&&(u.flags|=2048)),l!==n&&l&&(a.child.flags|=8192),Cc(a,a.updateQueue),Vt(a),null);case 4:return Ce(),n===null&&ch(a.stateNode.containerInfo),Vt(a),null;case 10:return fa(a.type),Vt(a),null;case 19:if(V(ln),u=a.memoizedState,u===null)return Vt(a),null;if(b=(a.flags&128)!==0,y=u.rendering,y===null)if(b)Pl(u,!1);else{if(nn!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=pc(n),y!==null){for(a.flags|=128,Pl(u,!1),n=y.updateQueue,a.updateQueue=n,Cc(a,n),a.subtreeFlags=0,n=l,l=a.child;l!==null;)Vg(l,n),l=l.sibling;return R(ln,ln.current&1|2),yt&&ua(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&lt()>Mc&&(a.flags|=128,b=!0,Pl(u,!1),a.lanes=4194304)}else{if(!b)if(n=pc(y),n!==null){if(a.flags|=128,b=!0,n=n.updateQueue,a.updateQueue=n,Cc(a,n),Pl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!yt)return Vt(a),null}else 2*lt()-u.renderingStartTime>Mc&&l!==536870912&&(a.flags|=128,b=!0,Pl(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=lt(),n.sibling=null,l=ln.current,R(ln,b?l&1|2:l&1),yt&&ua(a,u.treeForkCount),n):(Vt(a),null);case 22:case 23:return rr(a),uf(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(l&536870912)!==0&&(a.flags&128)===0&&(Vt(a),a.subtreeFlags&6&&(a.flags|=8192)):Vt(a),l=a.updateQueue,l!==null&&Cc(a,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==l&&(a.flags|=2048),n!==null&&V(Ri),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),fa(fn),Vt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function nN(n,a){switch(Yd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return fa(fn),Ce(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return Ne(a),null;case 31:if(a.memoizedState!==null){if(rr(a),a.alternate===null)throw Error(i(340));Ci()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(rr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ci()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return V(ln),null;case 4:return Ce(),null;case 10:return fa(a.type),null;case 22:case 23:return rr(a),uf(),n!==null&&V(Ri),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return fa(fn),null;case 25:return null;default:return null}}function vy(n,a){switch(Yd(a),a.tag){case 3:fa(fn),Ce();break;case 26:case 27:case 5:Ne(a);break;case 4:Ce();break;case 31:a.memoizedState!==null&&rr(a);break;case 13:rr(a);break;case 19:V(ln);break;case 10:fa(a.type);break;case 22:case 23:rr(a),uf(),n!==null&&V(Ri);break;case 24:fa(fn)}}function Bl(n,a){try{var l=a.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var b=u.next;l=b;do{if((l.tag&n)===n){u=void 0;var y=l.create,k=l.inst;u=y(),k.destroy=u}l=l.next}while(l!==b)}}catch(M){Dt(a,a.return,M)}}function Ya(n,a,l){try{var u=a.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var y=b.next;u=y;do{if((u.tag&n)===n){var k=u.inst,M=k.destroy;if(M!==void 0){k.destroy=void 0,b=a;var F=l,ae=M;try{ae()}catch(de){Dt(b,F,de)}}}u=u.next}while(u!==y)}}catch(de){Dt(a,a.return,de)}}function wy(n){var a=n.updateQueue;if(a!==null){var l=n.stateNode;try{db(a,l)}catch(u){Dt(n,n.return,u)}}}function Ey(n,a,l){l.props=Li(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Dt(n,a,u)}}function Ul(n,a){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(b){Dt(n,a,b)}}function Kr(n,a){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(b){Dt(n,a,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(b){Dt(n,a,b)}else l.current=null}function Sy(n){var a=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(b){Dt(n,n.return,b)}}function $f(n,a,l){try{var u=n.stateNode;_N(u,n.type,l,a),u[Cn]=a}catch(b){Dt(n,n.return,b)}}function _y(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ti(n.type)||n.tag===4}function Hf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||_y(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ti(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Kf(n,a,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(n),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=we));else if(u!==4&&(u===27&&ti(n.type)&&(l=n.stateNode,a=null),n=n.child,n!==null))for(Kf(n,a,l),n=n.sibling;n!==null;)Kf(n,a,l),n=n.sibling}function Tc(n,a,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?l.insertBefore(n,a):l.appendChild(n);else if(u!==4&&(u===27&&ti(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Tc(n,a,l),n=n.sibling;n!==null;)Tc(n,a,l),n=n.sibling}function ky(n){var a=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,b=a.attributes;b.length;)a.removeAttributeNode(b[0]);kn(a,u,l),a[an]=n,a[Cn]=l}catch(y){Dt(n,n.return,y)}}var ba=!1,mn=!1,qf=!1,Ny=typeof WeakSet=="function"?WeakSet:Set,yn=null;function rN(n,a){if(n=n.containerInfo,fh=Wc,n=Pg(n),zd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var b=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var k=0,M=-1,F=-1,ae=0,de=0,me=n,le=null;t:for(;;){for(var ue;me!==l||b!==0&&me.nodeType!==3||(M=k+b),me!==y||u!==0&&me.nodeType!==3||(F=k+u),me.nodeType===3&&(k+=me.nodeValue.length),(ue=me.firstChild)!==null;)le=me,me=ue;for(;;){if(me===n)break t;if(le===l&&++ae===b&&(M=k),le===y&&++de===u&&(F=k),(ue=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ue}l=M===-1||F===-1?null:{start:M,end:F}}else l=null}l=l||{start:0,end:0}}else l=null;for(hh={focusedElem:n,selectionRange:l},Wc=!1,yn=a;yn!==null;)if(a=yn,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,yn=n;else for(;yn!==null;){switch(a=yn,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)b=n[l],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,l=a,b=y.memoizedProps,y=y.memoizedState,u=l.stateNode;try{var Oe=Li(l.type,b);n=u.getSnapshotBeforeUpdate(Oe,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ge){Dt(l,l.return,Ge)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,l=n.nodeType,l===9)gh(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":gh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,yn=n;break}yn=a.return}}function Cy(n,a,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:xa(n,l),u&4&&Bl(5,l);break;case 1:if(xa(n,l),u&4)if(n=l.stateNode,a===null)try{n.componentDidMount()}catch(k){Dt(l,l.return,k)}else{var b=Li(l.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(b,a,n.__reactInternalSnapshotBeforeUpdate)}catch(k){Dt(l,l.return,k)}}u&64&&wy(l),u&512&&Ul(l,l.return);break;case 3:if(xa(n,l),u&64&&(n=l.updateQueue,n!==null)){if(a=null,l.child!==null)switch(l.child.tag){case 27:case 5:a=l.child.stateNode;break;case 1:a=l.child.stateNode}try{db(n,a)}catch(k){Dt(l,l.return,k)}}break;case 27:a===null&&u&4&&ky(l);case 26:case 5:xa(n,l),a===null&&u&4&&Sy(l),u&512&&Ul(l,l.return);break;case 12:xa(n,l);break;case 31:xa(n,l),u&4&&Ry(n,l);break;case 13:xa(n,l),u&4&&Oy(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=fN.bind(null,l),MN(n,l))));break;case 22:if(u=l.memoizedState!==null||ba,!u){a=a!==null&&a.memoizedState!==null||mn,b=ba;var y=mn;ba=u,(mn=a)&&!y?va(n,l,(l.subtreeFlags&8772)!==0):xa(n,l),ba=b,mn=y}break;case 30:break;default:xa(n,l)}}function Ty(n){var a=n.alternate;a!==null&&(n.alternate=null,Ty(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&ul(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Xt=null,Hn=!1;function ya(n,a,l){for(l=l.child;l!==null;)Ay(n,a,l),l=l.sibling}function Ay(n,a,l){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(tt,l)}catch{}switch(l.tag){case 26:mn||Kr(l,a),ya(n,a,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:mn||Kr(l,a);var u=Xt,b=Hn;ti(l.type)&&(Xt=l.stateNode,Hn=!1),ya(n,a,l),Wl(l.stateNode),Xt=u,Hn=b;break;case 5:mn||Kr(l,a);case 6:if(u=Xt,b=Hn,Xt=null,ya(n,a,l),Xt=u,Hn=b,Xt!==null)if(Hn)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(l.stateNode)}catch(y){Dt(l,a,y)}else try{Xt.removeChild(l.stateNode)}catch(y){Dt(l,a,y)}break;case 18:Xt!==null&&(Hn?(n=Xt,w0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),js(n)):w0(Xt,l.stateNode));break;case 4:u=Xt,b=Hn,Xt=l.stateNode.containerInfo,Hn=!0,ya(n,a,l),Xt=u,Hn=b;break;case 0:case 11:case 14:case 15:Ya(2,l,a),mn||Ya(4,l,a),ya(n,a,l);break;case 1:mn||(Kr(l,a),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Ey(l,a,u)),ya(n,a,l);break;case 21:ya(n,a,l);break;case 22:mn=(u=mn)||l.memoizedState!==null,ya(n,a,l),mn=u;break;default:ya(n,a,l)}}function Ry(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{js(n)}catch(l){Dt(a,a.return,l)}}}function Oy(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{js(n)}catch(l){Dt(a,a.return,l)}}function aN(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Ny),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Ny),a;default:throw Error(i(435,n.tag))}}function Ac(n,a){var l=aN(n);a.forEach(function(u){if(!l.has(u)){l.add(u);var b=hN.bind(null,n,u);u.then(b,b)}})}function Kn(n,a){var l=a.deletions;if(l!==null)for(var u=0;u<l.length;u++){var b=l[u],y=n,k=a,M=k;e:for(;M!==null;){switch(M.tag){case 27:if(ti(M.type)){Xt=M.stateNode,Hn=!1;break e}break;case 5:Xt=M.stateNode,Hn=!1;break e;case 3:case 4:Xt=M.stateNode.containerInfo,Hn=!0;break e}M=M.return}if(Xt===null)throw Error(i(160));Ay(y,k,b),Xt=null,Hn=!1,y=b.alternate,y!==null&&(y.return=null),b.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)My(a,n),a=a.sibling}var Ar=null;function My(n,a){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Kn(a,n),qn(n),u&4&&(Ya(3,n,n.return),Bl(3,n),Ya(5,n,n.return));break;case 1:Kn(a,n),qn(n),u&512&&(mn||l===null||Kr(l,l.return)),u&64&&ba&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var b=Ar;if(Kn(a,n),qn(n),u&512&&(mn||l===null||Kr(l,l.return)),u&4){var y=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,b=b.ownerDocument||b;t:switch(u){case"title":y=b.getElementsByTagName("title")[0],(!y||y[xi]||y[an]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=b.createElement(u),b.head.insertBefore(y,b.querySelector("head > title"))),kn(y,u,l),y[an]=n,un(y),u=y;break e;case"link":var k=M0("link","href",b).get(u+(l.href||""));if(k){for(var M=0;M<k.length;M++)if(y=k[M],y.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&y.getAttribute("rel")===(l.rel==null?null:l.rel)&&y.getAttribute("title")===(l.title==null?null:l.title)&&y.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){k.splice(M,1);break t}}y=b.createElement(u),kn(y,u,l),b.head.appendChild(y);break;case"meta":if(k=M0("meta","content",b).get(u+(l.content||""))){for(M=0;M<k.length;M++)if(y=k[M],y.getAttribute("content")===(l.content==null?null:""+l.content)&&y.getAttribute("name")===(l.name==null?null:l.name)&&y.getAttribute("property")===(l.property==null?null:l.property)&&y.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&y.getAttribute("charset")===(l.charSet==null?null:l.charSet)){k.splice(M,1);break t}}y=b.createElement(u),kn(y,u,l),b.head.appendChild(y);break;default:throw Error(i(468,u))}y[an]=n,un(y),u=y}n.stateNode=u}else D0(b,n.type,n.stateNode);else n.stateNode=O0(b,u,n.memoizedProps);else y!==u?(y===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):y.count--,u===null?D0(b,n.type,n.stateNode):O0(b,u,n.memoizedProps)):u===null&&n.stateNode!==null&&$f(n,n.memoizedProps,l.memoizedProps)}break;case 27:Kn(a,n),qn(n),u&512&&(mn||l===null||Kr(l,l.return)),l!==null&&u&4&&$f(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Kn(a,n),qn(n),u&512&&(mn||l===null||Kr(l,l.return)),n.flags&32){b=n.stateNode;try{Ye(b,"")}catch(Oe){Dt(n,n.return,Oe)}}u&4&&n.stateNode!=null&&(b=n.memoizedProps,$f(n,b,l!==null?l.memoizedProps:b)),u&1024&&(qf=!0);break;case 6:if(Kn(a,n),qn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(Oe){Dt(n,n.return,Oe)}}break;case 3:if(qc=null,b=Ar,Ar=Hc(a.containerInfo),Kn(a,n),Ar=b,qn(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{js(a.containerInfo)}catch(Oe){Dt(n,n.return,Oe)}qf&&(qf=!1,Dy(n));break;case 4:u=Ar,Ar=Hc(n.stateNode.containerInfo),Kn(a,n),qn(n),Ar=u;break;case 12:Kn(a,n),qn(n);break;case 31:Kn(a,n),qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ac(n,u)));break;case 13:Kn(a,n),qn(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Oc=lt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ac(n,u)));break;case 22:b=n.memoizedState!==null;var F=l!==null&&l.memoizedState!==null,ae=ba,de=mn;if(ba=ae||b,mn=de||F,Kn(a,n),mn=de,ba=ae,qn(n),u&8192)e:for(a=n.stateNode,a._visibility=b?a._visibility&-2:a._visibility|1,b&&(l===null||F||ba||mn||Ii(n)),l=null,a=n;;){if(a.tag===5||a.tag===26){if(l===null){F=l=a;try{if(y=F.stateNode,b)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{M=F.stateNode;var me=F.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;M.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Oe){Dt(F,F.return,Oe)}}}else if(a.tag===6){if(l===null){F=a;try{F.stateNode.nodeValue=b?"":F.memoizedProps}catch(Oe){Dt(F,F.return,Oe)}}}else if(a.tag===18){if(l===null){F=a;try{var ue=F.stateNode;b?E0(ue,!0):E0(F.stateNode,!1)}catch(Oe){Dt(F,F.return,Oe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;l===a&&(l=null),a=a.return}l===a&&(l=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Ac(n,l))));break;case 19:Kn(a,n),qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ac(n,u)));break;case 30:break;case 21:break;default:Kn(a,n),qn(n)}}function qn(n){var a=n.flags;if(a&2){try{for(var l,u=n.return;u!==null;){if(_y(u)){l=u;break}u=u.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var b=l.stateNode,y=Hf(n);Tc(n,y,b);break;case 5:var k=l.stateNode;l.flags&32&&(Ye(k,""),l.flags&=-33);var M=Hf(n);Tc(n,M,k);break;case 3:case 4:var F=l.stateNode.containerInfo,ae=Hf(n);Kf(n,ae,F);break;default:throw Error(i(161))}}catch(de){Dt(n,n.return,de)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function Dy(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;Dy(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function xa(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Cy(n,a.alternate,a),a=a.sibling}function Ii(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Ya(4,a,a.return),Ii(a);break;case 1:Kr(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&Ey(a,a.return,l),Ii(a);break;case 27:Wl(a.stateNode);case 26:case 5:Kr(a,a.return),Ii(a);break;case 22:a.memoizedState===null&&Ii(a);break;case 30:Ii(a);break;default:Ii(a)}n=n.sibling}}function va(n,a,l){for(l=l&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,b=n,y=a,k=y.flags;switch(y.tag){case 0:case 11:case 15:va(b,y,l),Bl(4,y);break;case 1:if(va(b,y,l),u=y,b=u.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ae){Dt(u,u.return,ae)}if(u=y,b=u.updateQueue,b!==null){var M=u.stateNode;try{var F=b.shared.hiddenCallbacks;if(F!==null)for(b.shared.hiddenCallbacks=null,b=0;b<F.length;b++)ub(F[b],M)}catch(ae){Dt(u,u.return,ae)}}l&&k&64&&wy(y),Ul(y,y.return);break;case 27:ky(y);case 26:case 5:va(b,y,l),l&&u===null&&k&4&&Sy(y),Ul(y,y.return);break;case 12:va(b,y,l);break;case 31:va(b,y,l),l&&k&4&&Ry(b,y);break;case 13:va(b,y,l),l&&k&4&&Oy(b,y);break;case 22:y.memoizedState===null&&va(b,y,l),Ul(y,y.return);break;case 30:break;default:va(b,y,l)}a=a.sibling}}function Gf(n,a){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Nl(l))}function Vf(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Nl(n))}function Rr(n,a,l,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)jy(n,a,l,u),a=a.sibling}function jy(n,a,l,u){var b=a.flags;switch(a.tag){case 0:case 11:case 15:Rr(n,a,l,u),b&2048&&Bl(9,a);break;case 1:Rr(n,a,l,u);break;case 3:Rr(n,a,l,u),b&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Nl(n)));break;case 12:if(b&2048){Rr(n,a,l,u),n=a.stateNode;try{var y=a.memoizedProps,k=y.id,M=y.onPostCommit;typeof M=="function"&&M(k,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(F){Dt(a,a.return,F)}}else Rr(n,a,l,u);break;case 31:Rr(n,a,l,u);break;case 13:Rr(n,a,l,u);break;case 23:break;case 22:y=a.stateNode,k=a.alternate,a.memoizedState!==null?y._visibility&2?Rr(n,a,l,u):Fl(n,a):y._visibility&2?Rr(n,a,l,u):(y._visibility|=2,Ss(n,a,l,u,(a.subtreeFlags&10256)!==0||!1)),b&2048&&Gf(k,a);break;case 24:Rr(n,a,l,u),b&2048&&Vf(a.alternate,a);break;default:Rr(n,a,l,u)}}function Ss(n,a,l,u,b){for(b=b&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,k=a,M=l,F=u,ae=k.flags;switch(k.tag){case 0:case 11:case 15:Ss(y,k,M,F,b),Bl(8,k);break;case 23:break;case 22:var de=k.stateNode;k.memoizedState!==null?de._visibility&2?Ss(y,k,M,F,b):Fl(y,k):(de._visibility|=2,Ss(y,k,M,F,b)),b&&ae&2048&&Gf(k.alternate,k);break;case 24:Ss(y,k,M,F,b),b&&ae&2048&&Vf(k.alternate,k);break;default:Ss(y,k,M,F,b)}a=a.sibling}}function Fl(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var l=n,u=a,b=u.flags;switch(u.tag){case 22:Fl(l,u),b&2048&&Gf(u.alternate,u);break;case 24:Fl(l,u),b&2048&&Vf(u.alternate,u);break;default:Fl(l,u)}a=a.sibling}}var $l=8192;function _s(n,a,l){if(n.subtreeFlags&$l)for(n=n.child;n!==null;)Ly(n,a,l),n=n.sibling}function Ly(n,a,l){switch(n.tag){case 26:_s(n,a,l),n.flags&$l&&n.memoizedState!==null&&KN(l,Ar,n.memoizedState,n.memoizedProps);break;case 5:_s(n,a,l);break;case 3:case 4:var u=Ar;Ar=Hc(n.stateNode.containerInfo),_s(n,a,l),Ar=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=$l,$l=16777216,_s(n,a,l),$l=u):_s(n,a,l));break;default:_s(n,a,l)}}function Iy(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Hl(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var u=a[l];yn=u,Py(u,n)}Iy(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)zy(n),n=n.sibling}function zy(n){switch(n.tag){case 0:case 11:case 15:Hl(n),n.flags&2048&&Ya(9,n,n.return);break;case 3:Hl(n);break;case 12:Hl(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Rc(n)):Hl(n);break;default:Hl(n)}}function Rc(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var u=a[l];yn=u,Py(u,n)}Iy(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Ya(8,a,a.return),Rc(a);break;case 22:l=a.stateNode,l._visibility&2&&(l._visibility&=-3,Rc(a));break;default:Rc(a)}n=n.sibling}}function Py(n,a){for(;yn!==null;){var l=yn;switch(l.tag){case 0:case 11:case 15:Ya(8,l,a);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Nl(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,yn=u;else e:for(l=n;yn!==null;){u=yn;var b=u.sibling,y=u.return;if(Ty(u),u===l){yn=null;break e}if(b!==null){b.return=y,yn=b;break e}yn=y}}}var iN={getCacheForType:function(n){var a=Sn(fn),l=a.data.get(n);return l===void 0&&(l=n(),a.data.set(n,l)),l},cacheSignal:function(){return Sn(fn).controller.signal}},sN=typeof WeakMap=="function"?WeakMap:Map,Ct=0,Bt=null,ut=null,mt=0,Mt=0,ar=null,Wa=!1,ks=!1,Yf=!1,wa=0,nn=0,Xa=0,zi=0,Wf=0,ir=0,Ns=0,Kl=null,Gn=null,Xf=!1,Oc=0,By=0,Mc=1/0,Dc=null,Qa=null,bn=0,Za=null,Cs=null,Ea=0,Qf=0,Zf=null,Uy=null,ql=0,Jf=null;function sr(){return(Ct&2)!==0&&mt!==0?mt&-mt:I.T!==null?ih():Ur()}function Fy(){if(ir===0)if((mt&536870912)===0||yt){var n=Ma;Ma<<=1,(Ma&3932160)===0&&(Ma=262144),ir=n}else ir=536870912;return n=nr.current,n!==null&&(n.flags|=32),ir}function Vn(n,a,l){(n===Bt&&(Mt===2||Mt===9)||n.cancelPendingCommit!==null)&&(Ts(n,0),Ja(n,mt,ir,!1)),At(n,l),((Ct&2)===0||n!==Bt)&&(n===Bt&&((Ct&2)===0&&(zi|=l),nn===4&&Ja(n,mt,ir,!1)),qr(n))}function $y(n,a,l){if((Ct&6)!==0)throw Error(i(327));var u=!l&&(a&127)===0&&(a&n.expiredLanes)===0||fe(n,a),b=u?cN(n,a):th(n,a,!0),y=u;do{if(b===0){ks&&!u&&Ja(n,a,0,!1);break}else{if(l=n.current.alternate,y&&!lN(l)){b=th(n,a,!1),y=!1;continue}if(b===2){if(y=a,n.errorRecoveryDisabledLanes&y)var k=0;else k=n.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){a=k;e:{var M=n;b=Kl;var F=M.current.memoizedState.isDehydrated;if(F&&(Ts(M,k).flags|=256),k=th(M,k,!1),k!==2){if(Yf&&!F){M.errorRecoveryDisabledLanes|=y,zi|=y,b=4;break e}y=Gn,Gn=b,y!==null&&(Gn===null?Gn=y:Gn.push.apply(Gn,y))}b=k}if(y=!1,b!==2)continue}}if(b===1){Ts(n,0),Ja(n,a,0,!0);break}e:{switch(u=n,y=b,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ja(u,a,ir,!Wa);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(b=Oc+300-lt(),10<b)){if(Ja(u,a,ir,!Wa),H(u,0,!0)!==0)break e;Ea=a,u.timeoutHandle=x0(Hy.bind(null,u,l,Gn,Dc,Xf,a,ir,zi,Ns,Wa,y,"Throttled",-0,0),b);break e}Hy(u,l,Gn,Dc,Xf,a,ir,zi,Ns,Wa,y,null,-0,0)}}break}while(!0);qr(n)}function Hy(n,a,l,u,b,y,k,M,F,ae,de,me,le,ue){if(n.timeoutHandle=-1,me=a.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:we},Ly(a,y,me);var Oe=(y&62914560)===y?Oc-lt():(y&4194048)===y?By-lt():0;if(Oe=qN(me,Oe),Oe!==null){Ea=y,n.cancelPendingCommit=Oe(Qy.bind(null,n,a,y,l,u,b,k,M,F,de,me,null,le,ue)),Ja(n,y,k,!ae);return}}Qy(n,a,y,l,u,b,k,M,F)}function lN(n){for(var a=n;;){var l=a.tag;if((l===0||l===11||l===15)&&a.flags&16384&&(l=a.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var b=l[u],y=b.getSnapshot;b=b.value;try{if(!er(y(),b))return!1}catch{return!1}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ja(n,a,l,u){a&=~Wf,a&=~zi,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var b=a;0<b;){var y=31-We(b),k=1<<y;u[y]=-1,b&=~k}l!==0&&Ae(n,l,a)}function jc(){return(Ct&6)===0?(Gl(0),!1):!0}function eh(){if(ut!==null){if(Mt===0)var n=ut.return;else n=ut,da=Ti=null,gf(n),ys=null,Tl=0,n=ut;for(;n!==null;)vy(n.alternate,n),n=n.return;ut=null}}function Ts(n,a){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,CN(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),Ea=0,eh(),Bt=n,ut=l=ca(n.current,null),mt=a,Mt=0,ar=null,Wa=!1,ks=fe(n,a),Yf=!1,Ns=ir=Wf=zi=Xa=nn=0,Gn=Kl=null,Xf=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var b=31-We(u),y=1<<b;a|=n[b],u&=~y}return wa=a,tc(),l}function Ky(n,a){at=null,I.H=Il,a===bs||a===cc?(a=sb(),Mt=3):a===rf?(a=sb(),Mt=4):Mt=a===Mf?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ar=a,ut===null&&(nn=1,Sc(n,yr(a,n.current)))}function qy(){var n=nr.current;return n===null?!0:(mt&4194048)===mt?Er===null:(mt&62914560)===mt||(mt&536870912)!==0?n===Er:!1}function Gy(){var n=I.H;return I.H=Il,n===null?Il:n}function Vy(){var n=I.A;return I.A=iN,n}function Lc(){nn=4,Wa||(mt&4194048)!==mt&&nr.current!==null||(ks=!0),(Xa&134217727)===0&&(zi&134217727)===0||Bt===null||Ja(Bt,mt,ir,!1)}function th(n,a,l){var u=Ct;Ct|=2;var b=Gy(),y=Vy();(Bt!==n||mt!==a)&&(Dc=null,Ts(n,a)),a=!1;var k=nn;e:do try{if(Mt!==0&&ut!==null){var M=ut,F=ar;switch(Mt){case 8:eh(),k=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(a=!0);var ae=Mt;if(Mt=0,ar=null,As(n,M,F,ae),l&&ks){k=0;break e}break;default:ae=Mt,Mt=0,ar=null,As(n,M,F,ae)}}oN(),k=nn;break}catch(de){Ky(n,de)}while(!0);return a&&n.shellSuspendCounter++,da=Ti=null,Ct=u,I.H=b,I.A=y,ut===null&&(Bt=null,mt=0,tc()),k}function oN(){for(;ut!==null;)Yy(ut)}function cN(n,a){var l=Ct;Ct|=2;var u=Gy(),b=Vy();Bt!==n||mt!==a?(Dc=null,Mc=lt()+500,Ts(n,a)):ks=fe(n,a);e:do try{if(Mt!==0&&ut!==null){a=ut;var y=ar;t:switch(Mt){case 1:Mt=0,ar=null,As(n,a,y,1);break;case 2:case 9:if(ab(y)){Mt=0,ar=null,Wy(a);break}a=function(){Mt!==2&&Mt!==9||Bt!==n||(Mt=7),qr(n)},y.then(a,a);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:ab(y)?(Mt=0,ar=null,Wy(a)):(Mt=0,ar=null,As(n,a,y,7));break;case 5:var k=null;switch(ut.tag){case 26:k=ut.memoizedState;case 5:case 27:var M=ut;if(k?j0(k):M.stateNode.complete){Mt=0,ar=null;var F=M.sibling;if(F!==null)ut=F;else{var ae=M.return;ae!==null?(ut=ae,Ic(ae)):ut=null}break t}}Mt=0,ar=null,As(n,a,y,5);break;case 6:Mt=0,ar=null,As(n,a,y,6);break;case 8:eh(),nn=6;break e;default:throw Error(i(462))}}uN();break}catch(de){Ky(n,de)}while(!0);return da=Ti=null,I.H=u,I.A=b,Ct=l,ut!==null?0:(Bt=null,mt=0,tc(),nn)}function uN(){for(;ut!==null&&!Ie();)Yy(ut)}function Yy(n){var a=yy(n.alternate,n,wa);n.memoizedProps=n.pendingProps,a===null?Ic(n):ut=a}function Wy(n){var a=n,l=a.alternate;switch(a.tag){case 15:case 0:a=fy(l,a,a.pendingProps,a.type,void 0,mt);break;case 11:a=fy(l,a,a.pendingProps,a.type.render,a.ref,mt);break;case 5:gf(a);default:vy(l,a),a=ut=Vg(a,wa),a=yy(l,a,wa)}n.memoizedProps=n.pendingProps,a===null?Ic(n):ut=a}function As(n,a,l,u){da=Ti=null,gf(a),ys=null,Tl=0;var b=a.return;try{if(Zk(n,b,a,l,mt)){nn=1,Sc(n,yr(l,n.current)),ut=null;return}}catch(y){if(b!==null)throw ut=b,y;nn=1,Sc(n,yr(l,n.current)),ut=null;return}a.flags&32768?(yt||u===1?n=!0:ks||(mt&536870912)!==0?n=!1:(Wa=n=!0,(u===2||u===9||u===3||u===6)&&(u=nr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Xy(a,n)):Ic(a)}function Ic(n){var a=n;do{if((a.flags&32768)!==0){Xy(a,Wa);return}n=a.return;var l=tN(a.alternate,a,wa);if(l!==null){ut=l;return}if(a=a.sibling,a!==null){ut=a;return}ut=a=n}while(a!==null);nn===0&&(nn=5)}function Xy(n,a){do{var l=nN(n.alternate,n);if(l!==null){l.flags&=32767,ut=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!a&&(n=n.sibling,n!==null)){ut=n;return}ut=n=l}while(n!==null);nn=6,ut=null}function Qy(n,a,l,u,b,y,k,M,F){n.cancelPendingCommit=null;do zc();while(bn!==0);if((Ct&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=$d,Me(n,l,y,k,M,F),n===Bt&&(ut=Bt=null,mt=0),Cs=a,Za=n,Ea=l,Qf=y,Zf=b,Uy=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,pN(Ee,function(){return n0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=I.T,I.T=null,b=W.p,W.p=2,k=Ct,Ct|=4;try{rN(n,a,l)}finally{Ct=k,W.p=b,I.T=u}}bn=1,Zy(),Jy(),e0()}}function Zy(){if(bn===1){bn=0;var n=Za,a=Cs,l=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||l){l=I.T,I.T=null;var u=W.p;W.p=2;var b=Ct;Ct|=4;try{My(a,n);var y=hh,k=Pg(n.containerInfo),M=y.focusedElem,F=y.selectionRange;if(k!==M&&M&&M.ownerDocument&&zg(M.ownerDocument.documentElement,M)){if(F!==null&&zd(M)){var ae=F.start,de=F.end;if(de===void 0&&(de=ae),"selectionStart"in M)M.selectionStart=ae,M.selectionEnd=Math.min(de,M.value.length);else{var me=M.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ue=le.getSelection(),Oe=M.textContent.length,Ge=Math.min(F.start,Oe),It=F.end===void 0?Ge:Math.min(F.end,Oe);!ue.extend&&Ge>It&&(k=It,It=Ge,Ge=k);var Z=Ig(M,Ge),G=Ig(M,It);if(Z&&G&&(ue.rangeCount!==1||ue.anchorNode!==Z.node||ue.anchorOffset!==Z.offset||ue.focusNode!==G.node||ue.focusOffset!==G.offset)){var ne=me.createRange();ne.setStart(Z.node,Z.offset),ue.removeAllRanges(),Ge>It?(ue.addRange(ne),ue.extend(G.node,G.offset)):(ne.setEnd(G.node,G.offset),ue.addRange(ne))}}}}for(me=[],ue=M;ue=ue.parentNode;)ue.nodeType===1&&me.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<me.length;M++){var pe=me[M];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Wc=!!fh,hh=fh=null}finally{Ct=b,W.p=u,I.T=l}}n.current=a,bn=2}}function Jy(){if(bn===2){bn=0;var n=Za,a=Cs,l=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||l){l=I.T,I.T=null;var u=W.p;W.p=2;var b=Ct;Ct|=4;try{Cy(n,a.alternate,a)}finally{Ct=b,W.p=u,I.T=l}}bn=3}}function e0(){if(bn===4||bn===3){bn=0,wt();var n=Za,a=Cs,l=Ea,u=Uy;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?bn=5:(bn=0,Cs=Za=null,t0(n,n.pendingLanes));var b=n.pendingLanes;if(b===0&&(Qa=null),Xn(l),a=a.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(tt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=I.T,b=W.p,W.p=2,I.T=null;try{for(var y=n.onRecoverableError,k=0;k<u.length;k++){var M=u[k];y(M.value,{componentStack:M.stack})}}finally{I.T=a,W.p=b}}(Ea&3)!==0&&zc(),qr(n),b=n.pendingLanes,(l&261930)!==0&&(b&42)!==0?n===Jf?ql++:(ql=0,Jf=n):ql=0,Gl(0)}}function t0(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Nl(a)))}function zc(){return Zy(),Jy(),e0(),n0()}function n0(){if(bn!==5)return!1;var n=Za,a=Qf;Qf=0;var l=Xn(Ea),u=I.T,b=W.p;try{W.p=32>l?32:l,I.T=null,l=Zf,Zf=null;var y=Za,k=Ea;if(bn=0,Cs=Za=null,Ea=0,(Ct&6)!==0)throw Error(i(331));var M=Ct;if(Ct|=4,zy(y.current),jy(y,y.current,k,l),Ct=M,Gl(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(tt,y)}catch{}return!0}finally{W.p=b,I.T=u,t0(n,a)}}function r0(n,a,l){a=yr(l,a),a=Of(n.stateNode,a,2),n=qa(n,a,2),n!==null&&(At(n,2),qr(n))}function Dt(n,a,l){if(n.tag===3)r0(n,n,l);else for(;a!==null;){if(a.tag===3){r0(a,n,l);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Qa===null||!Qa.has(u))){n=yr(l,n),l=ay(2),u=qa(a,l,2),u!==null&&(iy(l,u,a,n),At(u,2),qr(u));break}}a=a.return}}function nh(n,a,l){var u=n.pingCache;if(u===null){u=n.pingCache=new sN;var b=new Set;u.set(a,b)}else b=u.get(a),b===void 0&&(b=new Set,u.set(a,b));b.has(l)||(Yf=!0,b.add(l),n=dN.bind(null,n,a,l),a.then(n,n))}function dN(n,a,l){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Bt===n&&(mt&l)===l&&(nn===4||nn===3&&(mt&62914560)===mt&&300>lt()-Oc?(Ct&2)===0&&Ts(n,0):Wf|=l,Ns===mt&&(Ns=0)),qr(n)}function a0(n,a){a===0&&(a=Xe()),n=ki(n,a),n!==null&&(At(n,a),qr(n))}function fN(n){var a=n.memoizedState,l=0;a!==null&&(l=a.retryLane),a0(n,l)}function hN(n,a){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(l=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),a0(n,l)}function pN(n,a){return he(n,a)}var Pc=null,Rs=null,rh=!1,Bc=!1,ah=!1,ei=0;function qr(n){n!==Rs&&n.next===null&&(Rs===null?Pc=Rs=n:Rs=Rs.next=n),Bc=!0,rh||(rh=!0,gN())}function Gl(n,a){if(!ah&&Bc){ah=!0;do for(var l=!1,u=Pc;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var y=0;else{var k=u.suspendedLanes,M=u.pingedLanes;y=(1<<31-We(42|n)+1)-1,y&=b&~(k&~M),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,o0(u,y))}else y=mt,y=H(u,u===Bt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||fe(u,y)||(l=!0,o0(u,y));u=u.next}while(l);ah=!1}}function mN(){i0()}function i0(){Bc=rh=!1;var n=0;ei!==0&&NN()&&(n=ei);for(var a=lt(),l=null,u=Pc;u!==null;){var b=u.next,y=s0(u,a);y===0?(u.next=null,l===null?Pc=b:l.next=b,b===null&&(Rs=l)):(l=u,(n!==0||(y&3)!==0)&&(Bc=!0)),u=b}bn!==0&&bn!==5||Gl(n),ei!==0&&(ei=0)}function s0(n,a){for(var l=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var k=31-We(y),M=1<<k,F=b[k];F===-1?((M&l)===0||(M&u)!==0)&&(b[k]=Se(M,a)):F<=a&&(n.expiredLanes|=M),y&=~M}if(a=Bt,l=mt,l=H(n,n===a?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===a&&(Mt===2||Mt===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Te(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||fe(n,l)){if(a=l&-l,a===n.callbackPriority)return a;switch(u!==null&&Te(u),Xn(l)){case 2:case 8:l=ie;break;case 32:l=Ee;break;case 268435456:l=ye;break;default:l=Ee}return u=l0.bind(null,n),l=he(l,u),n.callbackPriority=a,n.callbackNode=l,a}return u!==null&&u!==null&&Te(u),n.callbackPriority=2,n.callbackNode=null,2}function l0(n,a){if(bn!==0&&bn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(zc()&&n.callbackNode!==l)return null;var u=mt;return u=H(n,n===Bt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:($y(n,u,a),s0(n,lt()),n.callbackNode!=null&&n.callbackNode===l?l0.bind(null,n):null)}function o0(n,a){if(zc())return null;$y(n,a,!0)}function gN(){TN(function(){(Ct&6)!==0?he(B,mN):i0()})}function ih(){if(ei===0){var n=ms;n===0&&(n=ra,ra<<=1,(ra&261888)===0&&(ra=256)),ei=n}return ei}function c0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:za(""+n)}function u0(n,a){var l=a.ownerDocument.createElement("input");return l.name=a.name,l.value=a.value,n.id&&l.setAttribute("form",n.id),a.parentNode.insertBefore(l,a),n=new FormData(n),l.parentNode.removeChild(l),n}function bN(n,a,l,u,b){if(a==="submit"&&l&&l.stateNode===b){var y=c0((b[Cn]||null).action),k=u.submitter;k&&(a=(a=k[Cn]||null)?c0(a.formAction):k.getAttribute("formAction"),a!==null&&(y=a,k=null));var M=new Qo("action","action",null,u,b);n.push({event:M,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ei!==0){var F=k?u0(b,k):new FormData(b);kf(l,{pending:!0,data:F,method:b.method,action:y},null,F)}}else typeof y=="function"&&(M.preventDefault(),F=k?u0(b,k):new FormData(b),kf(l,{pending:!0,data:F,method:b.method,action:y},y,F))},currentTarget:b}]})}}for(var sh=0;sh<Fd.length;sh++){var lh=Fd[sh],yN=lh.toLowerCase(),xN=lh[0].toUpperCase()+lh.slice(1);Tr(yN,"on"+xN)}Tr(Fg,"onAnimationEnd"),Tr($g,"onAnimationIteration"),Tr(Hg,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(Lk,"onTransitionRun"),Tr(Ik,"onTransitionStart"),Tr(zk,"onTransitionCancel"),Tr(Kg,"onTransitionEnd"),xe("onMouseEnter",["mouseout","mouseover"]),xe("onMouseLeave",["mouseout","mouseover"]),xe("onPointerEnter",["pointerout","pointerover"]),xe("onPointerLeave",["pointerout","pointerover"]),sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vl="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(" "),vN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vl));function d0(n,a){a=(a&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],b=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var k=u.length-1;0<=k;k--){var M=u[k],F=M.instance,ae=M.currentTarget;if(M=M.listener,F!==y&&b.isPropagationStopped())break e;y=M,b.currentTarget=ae;try{y(b)}catch(de){ec(de)}b.currentTarget=null,y=F}else for(k=0;k<u.length;k++){if(M=u[k],F=M.instance,ae=M.currentTarget,M=M.listener,F!==y&&b.isPropagationStopped())break e;y=M,b.currentTarget=ae;try{y(b)}catch(de){ec(de)}b.currentTarget=null,y=F}}}}function dt(n,a){var l=a[cl];l===void 0&&(l=a[cl]=new Set);var u=n+"__bubble";l.has(u)||(f0(a,n,2,!1),l.add(u))}function oh(n,a,l){var u=0;a&&(u|=4),f0(l,n,u,a)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function ch(n){if(!n[Uc]){n[Uc]=!0,Ho.forEach(function(l){l!=="selectionchange"&&(vN.has(l)||oh(l,!1,n),oh(l,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Uc]||(a[Uc]=!0,oh("selectionchange",!1,a))}}function f0(n,a,l,u){switch(F0(a)){case 2:var b=YN;break;case 8:b=WN;break;default:b=_h}l=b.bind(null,a,l,n),b=void 0,!Td||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(b=!0),u?b!==void 0?n.addEventListener(a,l,{capture:!0,passive:b}):n.addEventListener(a,l,!0):b!==void 0?n.addEventListener(a,l,{passive:b}):n.addEventListener(a,l,!1)}function uh(n,a,l,u,b){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var M=u.stateNode.containerInfo;if(M===b)break;if(k===4)for(k=u.return;k!==null;){var F=k.tag;if((F===3||F===4)&&k.stateNode.containerInfo===b)return;k=k.return}for(;M!==null;){if(k=jn(M),k===null)return;if(F=k.tag,F===5||F===6||F===26||F===27){u=y=k;continue e}M=M.parentNode}}u=u.return}Vo(function(){var ae=y,de=nt(l),me=[];e:{var le=qg.get(n);if(le!==void 0){var ue=Qo,Oe=n;switch(n){case"keypress":if(Wo(l)===0)break e;case"keydown":case"keyup":ue=hk;break;case"focusin":Oe="focus",ue=Md;break;case"focusout":Oe="blur",ue=Md;break;case"beforeblur":case"afterblur":ue=Md;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=tk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=gk;break;case Fg:case $g:case Hg:ue=ak;break;case Kg:ue=yk;break;case"scroll":case"scrollend":ue=J_;break;case"wheel":ue=vk;break;case"copy":case"cut":case"paste":ue=sk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Eg;break;case"toggle":case"beforetoggle":ue=Ek}var Ge=(a&4)!==0,It=!Ge&&(n==="scroll"||n==="scrollend"),Z=Ge?le!==null?le+"Capture":null:le;Ge=[];for(var G=ae,ne;G!==null;){var pe=G;if(ne=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ne===null||Z===null||(pe=ml(G,Z),pe!=null&&Ge.push(Yl(G,pe,ne))),It)break;G=G.return}0<Ge.length&&(le=new ue(le,Oe,null,l,de),me.push({event:le,listeners:Ge}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ue=n==="mouseout"||n==="pointerout",le&&l!==je&&(Oe=l.relatedTarget||l.fromElement)&&(jn(Oe)||Oe[Da]))break e;if((ue||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(Oe=l.relatedTarget||l.toElement,ue=ae,Oe=Oe?jn(Oe):null,Oe!==null&&(It=o(Oe),Ge=Oe.tag,Oe!==It||Ge!==5&&Ge!==27&&Ge!==6)&&(Oe=null)):(ue=null,Oe=ae),ue!==Oe)){if(Ge=vg,pe="onMouseLeave",Z="onMouseEnter",G="mouse",(n==="pointerout"||n==="pointerover")&&(Ge=Eg,pe="onPointerLeave",Z="onPointerEnter",G="pointer"),It=ue==null?le:ja(ue),ne=Oe==null?le:ja(Oe),le=new Ge(pe,G+"leave",ue,l,de),le.target=It,le.relatedTarget=ne,pe=null,jn(de)===ae&&(Ge=new Ge(Z,G+"enter",Oe,l,de),Ge.target=ne,Ge.relatedTarget=It,pe=Ge),It=pe,ue&&Oe)t:{for(Ge=wN,Z=ue,G=Oe,ne=0,pe=Z;pe;pe=Ge(pe))ne++;pe=0;for(var Fe=G;Fe;Fe=Ge(Fe))pe++;for(;0<ne-pe;)Z=Ge(Z),ne--;for(;0<pe-ne;)G=Ge(G),pe--;for(;ne--;){if(Z===G||G!==null&&Z===G.alternate){Ge=Z;break t}Z=Ge(Z),G=Ge(G)}Ge=null}else Ge=null;ue!==null&&h0(me,le,ue,Ge,!1),Oe!==null&&It!==null&&h0(me,It,Oe,Ge,!0)}}e:{if(le=ae?ja(ae):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var Et=Rg;else if(Tg(le))if(Og)Et=Mk;else{Et=Rk;var Le=Ak}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ae&&Ia(ae.elementType)&&(Et=Rg):Et=Ok;if(Et&&(Et=Et(n,ae))){Ag(me,Et,l,de);break e}Le&&Le(n,le,ae),n==="focusout"&&ae&&le.type==="number"&&ae.memoizedProps.value!=null&&as(le,"number",le.value)}switch(Le=ae?ja(ae):window,n){case"focusin":(Tg(Le)||Le.contentEditable==="true")&&(ls=Le,Pd=ae,Sl=null);break;case"focusout":Sl=Pd=ls=null;break;case"mousedown":Bd=!0;break;case"contextmenu":case"mouseup":case"dragend":Bd=!1,Bg(me,l,de);break;case"selectionchange":if(jk)break;case"keydown":case"keyup":Bg(me,l,de)}var it;if(jd)e:{switch(n){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else ss?Ng(n,l)&&(gt="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(gt="onCompositionStart");gt&&(Sg&&l.locale!=="ko"&&(ss||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&ss&&(it=yg()):(Pa=de,Ad="value"in Pa?Pa.value:Pa.textContent,ss=!0)),Le=Fc(ae,gt),0<Le.length&&(gt=new wg(gt,n,null,l,de),me.push({event:gt,listeners:Le}),it?gt.data=it:(it=Cg(l),it!==null&&(gt.data=it)))),(it=_k?kk(n,l):Nk(n,l))&&(gt=Fc(ae,"onBeforeInput"),0<gt.length&&(Le=new wg("onBeforeInput","beforeinput",null,l,de),me.push({event:Le,listeners:gt}),Le.data=it)),bN(me,n,ae,l,de)}d0(me,a)})}function Yl(n,a,l){return{instance:n,listener:a,currentTarget:l}}function Fc(n,a){for(var l=a+"Capture",u=[];n!==null;){var b=n,y=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||y===null||(b=ml(n,l),b!=null&&u.unshift(Yl(n,b,y)),b=ml(n,a),b!=null&&u.push(Yl(n,b,y))),n.tag===3)return u;n=n.return}return[]}function wN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function h0(n,a,l,u,b){for(var y=a._reactName,k=[];l!==null&&l!==u;){var M=l,F=M.alternate,ae=M.stateNode;if(M=M.tag,F!==null&&F===u)break;M!==5&&M!==26&&M!==27||ae===null||(F=ae,b?(ae=ml(l,y),ae!=null&&k.unshift(Yl(l,ae,F))):b||(ae=ml(l,y),ae!=null&&k.push(Yl(l,ae,F)))),l=l.return}k.length!==0&&n.push({event:a,listeners:k})}var EN=/\r\n?/g,SN=/\u0000|\uFFFD/g;function p0(n){return(typeof n=="string"?n:""+n).replace(EN,`
384
+ `).replace(SN,"")}function m0(n,a){return a=p0(a),p0(n)===a}function Lt(n,a,l,u,b,y){switch(l){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Ye(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Ye(n,""+u);break;case"className":Zn(n,"class",u);break;case"tabIndex":Zn(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Zn(n,l,u);break;case"style":Ot(n,u,y);break;case"data":if(a!=="object"){Zn(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=za(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"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 y=="function"&&(l==="formAction"?(a!=="input"&&Lt(n,a,"name",b.name,b,null),Lt(n,a,"formEncType",b.formEncType,b,null),Lt(n,a,"formMethod",b.formMethod,b,null),Lt(n,a,"formTarget",b.formTarget,b,null)):(Lt(n,a,"encType",b.encType,b,null),Lt(n,a,"method",b.method,b,null),Lt(n,a,"target",b.target,b,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=za(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=we);break;case"onScroll":u!=null&&dt("scroll",n);break;case"onScrollEnd":u!=null&&dt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(l=u.__html,l!=null){if(b.children!=null)throw Error(i(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=za(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":dt("beforetoggle",n),dt("toggle",n),Tn(n,"popover",u);break;case"xlinkActuate":Un(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Un(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Un(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Un(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Un(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Un(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Un(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Un(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Un(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tn(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=la.get(l)||l,Tn(n,l,u))}}function dh(n,a,l,u,b,y){switch(l){case"style":Ot(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(l=u.__html,l!=null){if(b.children!=null)throw Error(i(60));n.innerHTML=l}}break;case"children":typeof u=="string"?Ye(n,u):(typeof u=="number"||typeof u=="bigint")&&Ye(n,""+u);break;case"onScroll":u!=null&&dt("scroll",n);break;case"onScrollEnd":u!=null&&dt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=we);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vi.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(b=l.endsWith("Capture"),a=l.slice(2,b?l.length-7:void 0),y=n[Cn]||null,y=y!=null?y[l]:null,typeof y=="function"&&n.removeEventListener(a,y,b),typeof u=="function")){typeof y!="function"&&y!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(a,u,b);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Tn(n,l,u)}}}function kn(n,a,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",n),dt("load",n);var u=!1,b=!1,y;for(y in l)if(l.hasOwnProperty(y)){var k=l[y];if(k!=null)switch(y){case"src":u=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Lt(n,a,y,k,l,null)}}b&&Lt(n,a,"srcSet",l.srcSet,l,null),u&&Lt(n,a,"src",l.src,l,null);return;case"input":dt("invalid",n);var M=y=k=b=null,F=null,ae=null;for(u in l)if(l.hasOwnProperty(u)){var de=l[u];if(de!=null)switch(u){case"name":b=de;break;case"type":k=de;break;case"checked":F=de;break;case"defaultChecked":ae=de;break;case"value":y=de;break;case"defaultValue":M=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,a));break;default:Lt(n,a,u,de,l,null)}}wi(n,y,M,F,ae,k,b,!1);return;case"select":dt("invalid",n),u=k=y=null;for(b in l)if(l.hasOwnProperty(b)&&(M=l[b],M!=null))switch(b){case"value":y=M;break;case"defaultValue":k=M;break;case"multiple":u=M;default:Lt(n,a,b,M,l,null)}a=y,l=k,n.multiple=!!u,a!=null?wn(n,!!u,a,!1):l!=null&&wn(n,!!u,l,!0);return;case"textarea":dt("invalid",n),y=b=u=null;for(k in l)if(l.hasOwnProperty(k)&&(M=l[k],M!=null))switch(k){case"value":u=M;break;case"defaultValue":b=M;break;case"children":y=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(i(91));break;default:Lt(n,a,k,M,l,null)}is(n,u,b,y);return;case"option":for(F in l)if(l.hasOwnProperty(F)&&(u=l[F],u!=null))switch(F){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Lt(n,a,F,u,l,null)}return;case"dialog":dt("beforetoggle",n),dt("toggle",n),dt("cancel",n),dt("close",n);break;case"iframe":case"object":dt("load",n);break;case"video":case"audio":for(u=0;u<Vl.length;u++)dt(Vl[u],n);break;case"image":dt("error",n),dt("load",n);break;case"details":dt("toggle",n);break;case"embed":case"source":case"link":dt("error",n),dt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in l)if(l.hasOwnProperty(ae)&&(u=l[ae],u!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Lt(n,a,ae,u,l,null)}return;default:if(Ia(a)){for(de in l)l.hasOwnProperty(de)&&(u=l[de],u!==void 0&&dh(n,a,de,u,l,void 0));return}}for(M in l)l.hasOwnProperty(M)&&(u=l[M],u!=null&&Lt(n,a,M,u,l,null))}function _N(n,a,l,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,y=null,k=null,M=null,F=null,ae=null,de=null;for(ue in l){var me=l[ue];if(l.hasOwnProperty(ue)&&me!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":F=me;default:u.hasOwnProperty(ue)||Lt(n,a,ue,null,u,me)}}for(var le in u){var ue=u[le];if(me=l[le],u.hasOwnProperty(le)&&(ue!=null||me!=null))switch(le){case"type":y=ue;break;case"name":b=ue;break;case"checked":ae=ue;break;case"defaultChecked":de=ue;break;case"value":k=ue;break;case"defaultValue":M=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,a));break;default:ue!==me&&Lt(n,a,le,ue,u,me)}}fl(n,k,M,F,ae,de,y,b);return;case"select":ue=k=M=le=null;for(y in l)if(F=l[y],l.hasOwnProperty(y)&&F!=null)switch(y){case"value":break;case"multiple":ue=F;default:u.hasOwnProperty(y)||Lt(n,a,y,null,u,F)}for(b in u)if(y=u[b],F=l[b],u.hasOwnProperty(b)&&(y!=null||F!=null))switch(b){case"value":le=y;break;case"defaultValue":M=y;break;case"multiple":k=y;default:y!==F&&Lt(n,a,b,y,u,F)}a=M,l=k,u=ue,le!=null?wn(n,!!l,le,!1):!!u!=!!l&&(a!=null?wn(n,!!l,a,!0):wn(n,!!l,l?[]:"",!1));return;case"textarea":ue=le=null;for(M in l)if(b=l[M],l.hasOwnProperty(M)&&b!=null&&!u.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Lt(n,a,M,null,u,b)}for(k in u)if(b=u[k],y=l[k],u.hasOwnProperty(k)&&(b!=null||y!=null))switch(k){case"value":le=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:b!==y&&Lt(n,a,k,b,u,y)}qo(n,le,ue);return;case"option":for(var Oe in l)if(le=l[Oe],l.hasOwnProperty(Oe)&&le!=null&&!u.hasOwnProperty(Oe))switch(Oe){case"selected":n.selected=!1;break;default:Lt(n,a,Oe,null,u,le)}for(F in u)if(le=u[F],ue=l[F],u.hasOwnProperty(F)&&le!==ue&&(le!=null||ue!=null))switch(F){case"selected":n.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:Lt(n,a,F,le,u,ue)}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 Ge in l)le=l[Ge],l.hasOwnProperty(Ge)&&le!=null&&!u.hasOwnProperty(Ge)&&Lt(n,a,Ge,null,u,le);for(ae in u)if(le=u[ae],ue=l[ae],u.hasOwnProperty(ae)&&le!==ue&&(le!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:Lt(n,a,ae,le,u,ue)}return;default:if(Ia(a)){for(var It in l)le=l[It],l.hasOwnProperty(It)&&le!==void 0&&!u.hasOwnProperty(It)&&dh(n,a,It,void 0,u,le);for(de in u)le=u[de],ue=l[de],!u.hasOwnProperty(de)||le===ue||le===void 0&&ue===void 0||dh(n,a,de,le,u,ue);return}}for(var Z in l)le=l[Z],l.hasOwnProperty(Z)&&le!=null&&!u.hasOwnProperty(Z)&&Lt(n,a,Z,null,u,le);for(me in u)le=u[me],ue=l[me],!u.hasOwnProperty(me)||le===ue||le==null&&ue==null||Lt(n,a,me,le,u,ue)}function g0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var b=l[u],y=b.transferSize,k=b.initiatorType,M=b.duration;if(y&&M&&g0(k)){for(k=0,M=b.responseEnd,u+=1;u<l.length;u++){var F=l[u],ae=F.startTime;if(ae>M)break;var de=F.transferSize,me=F.initiatorType;de&&g0(me)&&(F=F.responseEnd,k+=de*(F<M?1:(M-ae)/(F-ae)))}if(--u,a+=8*(y+k)/(b.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var fh=null,hh=null;function $c(n){return n.nodeType===9?n:n.ownerDocument}function b0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function y0(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function ph(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var mh=null;function NN(){var n=window.event;return n&&n.type==="popstate"?n===mh?!1:(mh=n,!0):(mh=null,!1)}var x0=typeof setTimeout=="function"?setTimeout:void 0,CN=typeof clearTimeout=="function"?clearTimeout:void 0,v0=typeof Promise=="function"?Promise:void 0,TN=typeof queueMicrotask=="function"?queueMicrotask:typeof v0<"u"?function(n){return v0.resolve(null).then(n).catch(AN)}:x0;function AN(n){setTimeout(function(){throw n})}function ti(n){return n==="head"}function w0(n,a){var l=a,u=0;do{var b=l.nextSibling;if(n.removeChild(l),b&&b.nodeType===8)if(l=b.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(b),js(a);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Wl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,Wl(l);for(var y=l.firstChild;y;){var k=y.nextSibling,M=y.nodeName;y[xi]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=k}}else l==="body"&&Wl(n.ownerDocument.body);l=b}while(l);js(a)}function E0(n,a){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?a?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(a?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function gh(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var l=a;switch(a=a.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":gh(l),ul(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function RN(n,a,l,u){for(;n.nodeType===1;){var b=l;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[xi])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==b.rel||n.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||n.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||n.getAttribute("title")!==(b.title==null?null:b.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(b.src==null?null:b.src)||n.getAttribute("type")!==(b.type==null?null:b.type)||n.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=b.name==null?null:""+b.name;if(b.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Sr(n.nextSibling),n===null)break}return null}function ON(n,a,l){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=Sr(n.nextSibling),n===null))return null;return n}function S0(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Sr(n.nextSibling),n===null))return null;return n}function bh(n){return n.data==="$?"||n.data==="$~"}function yh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function MN(n,a){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||l.readyState!=="loading")a();else{var u=function(){a(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sr(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var xh=null;function _0(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(a===0)return Sr(n.nextSibling);a--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||a++}n=n.nextSibling}return null}function k0(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(a===0)return n;a--}else l!=="/$"&&l!=="/&"||a++}n=n.previousSibling}return null}function N0(n,a,l){switch(a=$c(l),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Wl(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);ul(n)}var _r=new Map,C0=new Set;function Hc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Sa=W.d;W.d={f:DN,r:jN,D:LN,C:IN,L:zN,m:PN,X:UN,S:BN,M:FN};function DN(){var n=Sa.f(),a=jc();return n||a}function jN(n){var a=ia(n);a!==null&&a.tag===5&&a.type==="form"?Kb(a):Sa.r(n)}var Os=typeof document>"u"?null:document;function T0(n,a,l){var u=Os;if(u&&typeof a=="string"&&a){var b=Fn(a);b='link[rel="'+n+'"][href="'+b+'"]',typeof l=="string"&&(b+='[crossorigin="'+l+'"]'),C0.has(b)||(C0.add(b),n={rel:n,crossOrigin:l,href:a},u.querySelector(b)===null&&(a=u.createElement("link"),kn(a,"link",n),un(a),u.head.appendChild(a)))}}function LN(n){Sa.D(n),T0("dns-prefetch",n,null)}function IN(n,a){Sa.C(n,a),T0("preconnect",n,a)}function zN(n,a,l){Sa.L(n,a,l);var u=Os;if(u&&n&&a){var b='link[rel="preload"][as="'+Fn(a)+'"]';a==="image"&&l&&l.imageSrcSet?(b+='[imagesrcset="'+Fn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(b+='[imagesizes="'+Fn(l.imageSizes)+'"]')):b+='[href="'+Fn(n)+'"]';var y=b;switch(a){case"style":y=Ms(n);break;case"script":y=Ds(n)}_r.has(y)||(n=m({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:n,as:a},l),_r.set(y,n),u.querySelector(b)!==null||a==="style"&&u.querySelector(Xl(y))||a==="script"&&u.querySelector(Ql(y))||(a=u.createElement("link"),kn(a,"link",n),un(a),u.head.appendChild(a)))}}function PN(n,a){Sa.m(n,a);var l=Os;if(l&&n){var u=a&&typeof a.as=="string"?a.as:"script",b='link[rel="modulepreload"][as="'+Fn(u)+'"][href="'+Fn(n)+'"]',y=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ds(n)}if(!_r.has(y)&&(n=m({rel:"modulepreload",href:n},a),_r.set(y,n),l.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ql(y)))return}u=l.createElement("link"),kn(u,"link",n),un(u),l.head.appendChild(u)}}}function BN(n,a,l){Sa.S(n,a,l);var u=Os;if(u&&n){var b=La(u).hoistableStyles,y=Ms(n);a=a||"default";var k=b.get(y);if(!k){var M={loading:0,preload:null};if(k=u.querySelector(Xl(y)))M.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":a},l),(l=_r.get(y))&&vh(n,l);var F=k=u.createElement("link");un(F),kn(F,"link",n),F._p=new Promise(function(ae,de){F.onload=ae,F.onerror=de}),F.addEventListener("load",function(){M.loading|=1}),F.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Kc(k,a,u)}k={type:"stylesheet",instance:k,count:1,state:M},b.set(y,k)}}}function UN(n,a){Sa.X(n,a);var l=Os;if(l&&n){var u=La(l).hoistableScripts,b=Ds(n),y=u.get(b);y||(y=l.querySelector(Ql(b)),y||(n=m({src:n,async:!0},a),(a=_r.get(b))&&wh(n,a),y=l.createElement("script"),un(y),kn(y,"link",n),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(b,y))}}function FN(n,a){Sa.M(n,a);var l=Os;if(l&&n){var u=La(l).hoistableScripts,b=Ds(n),y=u.get(b);y||(y=l.querySelector(Ql(b)),y||(n=m({src:n,async:!0,type:"module"},a),(a=_r.get(b))&&wh(n,a),y=l.createElement("script"),un(y),kn(y,"link",n),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(b,y))}}function A0(n,a,l,u){var b=(b=oe.current)?Hc(b):null;if(!b)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=Ms(l.href),l=La(b).hoistableStyles,u=l.get(a),u||(u={type:"style",instance:null,count:0,state:null},l.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Ms(l.href);var y=La(b).hoistableStyles,k=y.get(n);if(k||(b=b.ownerDocument||b,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,k),(y=b.querySelector(Xl(n)))&&!y._p&&(k.instance=y,k.state.loading=5),_r.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},_r.set(n,l),y||$N(b,n,l,k.state))),a&&u===null)throw Error(i(528,""));return k}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ds(l),l=La(b).hoistableScripts,u=l.get(a),u||(u={type:"script",instance:null,count:0,state:null},l.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Ms(n){return'href="'+Fn(n)+'"'}function Xl(n){return'link[rel="stylesheet"]['+n+"]"}function R0(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function $N(n,a,l,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),kn(a,"link",l),un(a),n.head.appendChild(a))}function Ds(n){return'[src="'+Fn(n)+'"]'}function Ql(n){return"script[async]"+n}function O0(n,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Fn(l.href)+'"]');if(u)return a.instance=u,un(u),u;var b=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),un(u),kn(u,"style",b),Kc(u,l.precedence,n),a.instance=u;case"stylesheet":b=Ms(l.href);var y=n.querySelector(Xl(b));if(y)return a.state.loading|=4,a.instance=y,un(y),y;u=R0(l),(b=_r.get(b))&&vh(u,b),y=(n.ownerDocument||n).createElement("link"),un(y);var k=y;return k._p=new Promise(function(M,F){k.onload=M,k.onerror=F}),kn(y,"link",u),a.state.loading|=4,Kc(y,l.precedence,n),a.instance=y;case"script":return y=Ds(l.src),(b=n.querySelector(Ql(y)))?(a.instance=b,un(b),b):(u=l,(b=_r.get(y))&&(u=m({},l),wh(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),un(b),kn(b,"link",u),n.head.appendChild(b),a.instance=b);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Kc(u,l.precedence,n));return a.instance}function Kc(n,a,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,y=b,k=0;k<u.length;k++){var M=u[k];if(M.dataset.precedence===a)y=M;else if(y!==b)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=l.nodeType===9?l.head:l,a.insertBefore(n,a.firstChild))}function vh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function wh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var qc=null;function M0(n,a,l){if(qc===null){var u=new Map,b=qc=new Map;b.set(l,u)}else b=qc,u=b.get(l),u||(u=new Map,b.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),b=0;b<l.length;b++){var y=l[b];if(!(y[xi]||y[an]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(a)||"";k=n+k;var M=u.get(k);M?M.push(y):u.set(k,[y])}}return u}function D0(n,a,l){n=n.ownerDocument||n,n.head.insertBefore(l,a==="title"?n.querySelector("head > title"):null)}function HN(n,a,l){if(l===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return n=a.disabled,typeof a.precedence=="string"&&n==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function j0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function KN(n,a,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=Ms(u.href),y=a.querySelector(Xl(b));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Gc.bind(n),a.then(n,n)),l.state.loading|=4,l.instance=y,un(y);return}y=a.ownerDocument||a,u=R0(u),(b=_r.get(b))&&vh(u,b),y=y.createElement("link"),un(y);var k=y;k._p=new Promise(function(M,F){k.onload=M,k.onerror=F}),kn(y,"link",u),l.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Gc.bind(n),a.addEventListener("load",l),a.addEventListener("error",l))}}var Eh=0;function qN(n,a){return n.stylesheets&&n.count===0&&Yc(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&Yc(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&Eh===0&&(Eh=62500*kN());var b=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Yc(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Eh?50:800)+a);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function Gc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Vc=null;function Yc(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Vc=new Map,a.forEach(GN,n),Vc=null,Gc.call(n))}function GN(n,a){if(!(a.state.loading&4)){var l=Vc.get(n);if(l)var u=l.get(null);else{l=new Map,Vc.set(n,l);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<b.length;y++){var k=b[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),u=k)}u&&l.set(null,u)}b=a.instance,k=b.getAttribute("data-precedence"),y=l.get(k)||u,y===u&&l.set(null,b),l.set(k,b),this.count++,u=Gc.bind(this),b.addEventListener("load",u),b.addEventListener("error",u),y?y.parentNode.insertBefore(b,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(b,n.firstChild)),a.state.loading|=4}}var Zl={$$typeof:C,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function VN(n,a,l,u,b,y,k,M,F){this.tag=1,this.containerInfo=n,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=Pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pt(0),this.hiddenUpdates=Pt(null),this.identifierPrefix=u,this.onUncaughtError=b,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function L0(n,a,l,u,b,y,k,M,F,ae,de,me){return n=new VN(n,a,l,k,F,ae,de,me,M),a=1,y===!0&&(a|=24),y=tr(3,null,null,a),n.current=y,y.stateNode=n,a=ef(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:l,cache:a},af(y),n}function I0(n){return n?(n=us,n):us}function z0(n,a,l,u,b,y){b=I0(b),u.context===null?u.context=b:u.pendingContext=b,u=Ka(a),u.payload={element:l},y=y===void 0?null:y,y!==null&&(u.callback=y),l=qa(n,u,a),l!==null&&(Vn(l,n,a),Rl(l,n,a))}function P0(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<a?l:a}}function Sh(n,a){P0(n,a),(n=n.alternate)&&P0(n,a)}function B0(n){if(n.tag===13||n.tag===31){var a=ki(n,67108864);a!==null&&Vn(a,n,67108864),Sh(n,67108864)}}function U0(n){if(n.tag===13||n.tag===31){var a=sr();a=Nt(a);var l=ki(n,a);l!==null&&Vn(l,n,a),Sh(n,a)}}var Wc=!0;function YN(n,a,l,u){var b=I.T;I.T=null;var y=W.p;try{W.p=2,_h(n,a,l,u)}finally{W.p=y,I.T=b}}function WN(n,a,l,u){var b=I.T;I.T=null;var y=W.p;try{W.p=8,_h(n,a,l,u)}finally{W.p=y,I.T=b}}function _h(n,a,l,u){if(Wc){var b=kh(u);if(b===null)uh(n,a,u,Xc,l),$0(n,u);else if(QN(b,n,a,l,u))u.stopPropagation();else if($0(n,u),a&4&&-1<XN.indexOf(n)){for(;b!==null;){var y=ia(b);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=vn(y.pendingLanes);if(k!==0){var M=y;for(M.pendingLanes|=2,M.entangledLanes|=2;k;){var F=1<<31-We(k);M.entanglements[1]|=F,k&=~F}qr(y),(Ct&6)===0&&(Mc=lt()+500,Gl(0))}}break;case 31:case 13:M=ki(y,2),M!==null&&Vn(M,y,2),jc(),Sh(y,2)}if(y=kh(u),y===null&&uh(n,a,u,Xc,l),y===b)break;b=y}b!==null&&u.stopPropagation()}else uh(n,a,u,null,l)}}function kh(n){return n=nt(n),Nh(n)}var Xc=null;function Nh(n){if(Xc=null,n=jn(n),n!==null){var a=o(n);if(a===null)n=null;else{var l=a.tag;if(l===13){if(n=c(a),n!==null)return n;n=null}else if(l===31){if(n=d(a),n!==null)return n;n=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Xc=n,null}function F0(n){switch(n){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(Wt()){case B:return 2;case ie:return 8;case Ee:case se:return 32;case ye:return 268435456;default:return 32}default:return 32}}var Ch=!1,ni=null,ri=null,ai=null,Jl=new Map,eo=new Map,ii=[],XN="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 $0(n,a){switch(n){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Jl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":eo.delete(a.pointerId)}}function to(n,a,l,u,b,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[b]},a!==null&&(a=ia(a),a!==null&&B0(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,b!==null&&a.indexOf(b)===-1&&a.push(b),n)}function QN(n,a,l,u,b){switch(a){case"focusin":return ni=to(ni,n,a,l,u,b),!0;case"dragenter":return ri=to(ri,n,a,l,u,b),!0;case"mouseover":return ai=to(ai,n,a,l,u,b),!0;case"pointerover":var y=b.pointerId;return Jl.set(y,to(Jl.get(y)||null,n,a,l,u,b)),!0;case"gotpointercapture":return y=b.pointerId,eo.set(y,to(eo.get(y)||null,n,a,l,u,b)),!0}return!1}function H0(n){var a=jn(n.target);if(a!==null){var l=o(a);if(l!==null){if(a=l.tag,a===13){if(a=c(l),a!==null){n.blockedOn=a,Qn(n.priority,function(){U0(l)});return}}else if(a===31){if(a=d(l),a!==null){n.blockedOn=a,Qn(n.priority,function(){U0(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Qc(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var l=kh(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);je=u,l.target.dispatchEvent(u),je=null}else return a=ia(l),a!==null&&B0(a),n.blockedOn=l,!1;a.shift()}return!0}function K0(n,a,l){Qc(n)&&l.delete(a)}function ZN(){Ch=!1,ni!==null&&Qc(ni)&&(ni=null),ri!==null&&Qc(ri)&&(ri=null),ai!==null&&Qc(ai)&&(ai=null),Jl.forEach(K0),eo.forEach(K0)}function Zc(n,a){n.blockedOn===a&&(n.blockedOn=null,Ch||(Ch=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZN)))}var Jc=null;function q0(n){Jc!==n&&(Jc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Jc===n&&(Jc=null);for(var a=0;a<n.length;a+=3){var l=n[a],u=n[a+1],b=n[a+2];if(typeof u!="function"){if(Nh(u||l)===null)continue;break}var y=ia(l);y!==null&&(n.splice(a,3),a-=3,kf(y,{pending:!0,data:b,method:l.method,action:u},u,b))}}))}function js(n){function a(F){return Zc(F,n)}ni!==null&&Zc(ni,n),ri!==null&&Zc(ri,n),ai!==null&&Zc(ai,n),Jl.forEach(a),eo.forEach(a);for(var l=0;l<ii.length;l++){var u=ii[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<ii.length&&(l=ii[0],l.blockedOn===null);)H0(l),l.blockedOn===null&&ii.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var b=l[u],y=l[u+1],k=b[Cn]||null;if(typeof y=="function")k||q0(l);else if(k){var M=null;if(y&&y.hasAttribute("formAction")){if(b=y,k=y[Cn]||null)M=k.formAction;else if(Nh(b)!==null)continue}else M=k.action;typeof M=="function"?l[u+1]=M:(l.splice(u,3),u-=3),q0(l)}}}function G0(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return b=k})},focusReset:"manual",scroll:"manual"})}function a(){b!==null&&(b(),b=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,b=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),b!==null&&(b(),b=null)}}}function Th(n){this._internalRoot=n}eu.prototype.render=Th.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var l=a.current,u=sr();z0(l,u,n,a,null,null)},eu.prototype.unmount=Th.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;z0(n.current,2,null,n,null,null),jc(),a[Da]=null}};function eu(n){this._internalRoot=n}eu.prototype.unstable_scheduleHydration=function(n){if(n){var a=Ur();n={blockedOn:null,target:n,priority:a};for(var l=0;l<ii.length&&a!==0&&a<ii[l].priority;l++);ii.splice(l,0,n),l===0&&H0(n)}};var V0=t.version;if(V0!=="19.2.5")throw Error(i(527,V0,"19.2.5"));W.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=f(a),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var JN={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{tt=tu.inject(JN),rt=tu}catch{}}return ro.createRoot=function(n,a){if(!s(n))throw Error(i(299));var l=!1,u="",b=ey,y=ty,k=ny;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(b=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(k=a.onRecoverableError)),a=L0(n,1,!1,null,null,l,u,null,b,y,k,G0),n[Da]=a.current,ch(n),new Th(a)},ro.hydrateRoot=function(n,a,l){if(!s(n))throw Error(i(299));var u=!1,b="",y=ey,k=ty,M=ny,F=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError),l.formState!==void 0&&(F=l.formState)),a=L0(n,1,!0,a,l??null,u,b,F,y,k,M,G0),a.context=I0(null),l=a.current,u=sr(),u=Nt(u),b=Ka(u),b.callback=null,qa(l,b,u),l=u,a.current.lanes=l,At(a,l),qr(a),n[Da]=a.current,ch(n),new eu(a)},ro.version="19.2.5",ro}var lx;function W2(){if(lx)return Mh.exports;lx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Mh.exports=Y2(),Mh.exports}var X2=W2();const Q2=tl(X2);/**
385
+ * react-router v7.14.2
386
+ *
387
+ * Copyright (c) Remix Software Inc.
388
+ *
389
+ * This source code is licensed under the MIT license found in the
390
+ * LICENSE.md file in the root directory of this source tree.
391
+ *
392
+ * @license MIT
393
+ */var ox="popstate";function cx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Z2(e={}){function t(s,o){let{pathname:c="/",search:d="",hash:h=""}=Qi(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),Rp("",{pathname:c,search:d,hash:h},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(s,o){let c=s.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let h=s.location.href,f=h.indexOf("#");d=f===-1?h:h.slice(0,f)}return d+"#"+(typeof o=="string"?o:Eo(o))}function i(s,o){fr(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return eT(t,r,i,e)}function Qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function J2(){return Math.random().toString(36).substring(2,10)}function ux(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Rp(e,t,r=null,i,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Qi(t):t,state:r,key:t&&t.key||i||J2(),unstable_mask:s}}function Eo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Qi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function eT(e,t,r,i={}){let{window:s=document.defaultView,v5Compat:o=!1}=i,c=s.history,d="POP",h=null,f=g();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function g(){return(c.state||{idx:null}).idx}function m(){d="POP";let _=g(),N=_==null?null:_-f;f=_,h&&h({action:d,location:S.location,delta:N})}function x(_,N){d="PUSH";let T=cx(_)?_:Rp(S.location,_,N);r&&r(T,_),f=g()+1;let C=ux(T,f),j=S.createHref(T.unstable_mask||T);try{c.pushState(C,"",j)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;s.location.assign(j)}o&&h&&h({action:d,location:S.location,delta:1})}function v(_,N){d="REPLACE";let T=cx(_)?_:Rp(S.location,_,N);r&&r(T,_),f=g();let C=ux(T,f),j=S.createHref(T.unstable_mask||T);c.replaceState(C,"",j),o&&h&&h({action:d,location:S.location,delta:0})}function E(_){return tT(_)}let S={get action(){return d},get location(){return e(s,c)},listen(_){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(ox,m),h=_,()=>{s.removeEventListener(ox,m),h=null}},createHref(_){return t(s,_)},createURL:E,encodeLocation(_){let N=E(_);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:v,go(_){return c.go(_)}};return S}function tT(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Qt(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Eo(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function U1(e,t,r="/"){return nT(e,t,r,!1)}function nT(e,t,r,i){let s=typeof t=="string"?Qi(t):t,o=Ca(s.pathname||"/",r);if(o==null)return null;let c=F1(e);rT(c);let d=null;for(let h=0;d==null&&h<c.length;++h){let f=pT(o);d=fT(c[h],f,i)}return d}function F1(e,t=[],r=[],i="",s=!1){let o=(c,d,h=s,f)=>{let g={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&h)return;Qt(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let m=Dr([i,g.relativePath]),x=r.concat(g);c.children&&c.children.length>0&&(Qt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),F1(c.children,t,x,m,h)),!(c.path==null&&!c.index)&&t.push({path:m,score:uT(m,c.index),routesMeta:x})};return e.forEach((c,d)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,d);else for(let f of $1(c.path))o(c,d,!0,f)}),t}function $1(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(i.length===0)return s?[o,""]:[o];let c=$1(i.join("/")),d=[];return d.push(...c.map(h=>h===""?o:[o,h].join("/"))),s&&d.push(...c),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function rT(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:dT(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var aT=/^:[\w-]+$/,iT=3,sT=2,lT=1,oT=10,cT=-2,dx=e=>e==="*";function uT(e,t){let r=e.split("/"),i=r.length;return r.some(dx)&&(i+=cT),t&&(i+=sT),r.filter(s=>!dx(s)).reduce((s,o)=>s+(aT.test(o)?iT:o===""?lT:oT),i)}function dT(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function fT(e,t,r=!1){let{routesMeta:i}=e,s={},o="/",c=[];for(let d=0;d<i.length;++d){let h=i[d],f=d===i.length-1,g=o==="/"?t:t.slice(o.length)||"/",m=Au({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},g),x=h.route;if(!m&&f&&r&&!i[i.length-1].route.index&&(m=Au({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!m)return null;Object.assign(s,m.params),c.push({params:s,pathname:Dr([o,m.pathname]),pathnameBase:yT(Dr([o,m.pathnameBase])),route:x}),m.pathnameBase!=="/"&&(o=Dr([o,m.pathnameBase]))}return c}function Au(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=hT(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:i.reduce((f,{paramName:g,isOptional:m},x)=>{if(g==="*"){let E=d[x]||"";c=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const v=d[x];return m&&!v?f[g]=void 0:f[g]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:c,pattern:e}}function hT(e,t=!1,r=!0){fr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,h,f,g)=>{if(i.push({paramName:d,isOptional:h!=null}),h){let m=g.charAt(f+c.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function pT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ca(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}var mT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gT(e,t="/"){let{pathname:r,search:i="",hash:s=""}=typeof e=="string"?Qi(e):e,o;return r?(r=H1(r),r.startsWith("/")?o=fx(r.substring(1),"/"):o=fx(r,t)):o=t,{pathname:o,search:xT(i),hash:vT(s)}}function fx(e,t){let r=Ru(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Ih(e,t,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bT(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ym(e){let t=bT(e);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function td(e,t,r,i=!1){let s;typeof e=="string"?s=Qi(e):(s={...e},Qt(!s.pathname||!s.pathname.includes("?"),Ih("?","pathname","search",s)),Qt(!s.pathname||!s.pathname.includes("#"),Ih("#","pathname","hash",s)),Qt(!s.search||!s.search.includes("#"),Ih("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=r;else{let m=t.length-1;if(!i&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),m-=1;s.pathname=x.join("/")}d=m>=0?t[m]:"/"}let h=gT(s,d),f=c&&c!=="/"&&c.endsWith("/"),g=(o||c===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(f||g)&&(h.pathname+="/"),h}var H1=e=>e.replace(/\/\/+/g,"/"),Dr=e=>H1(e.join("/")),Ru=e=>e.replace(/\/+$/,""),yT=e=>Ru(e).replace(/^\/*/,"/"),xT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,wT=class{constructor(e,t,r,i=!1){this.status=e,this.statusText=t||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function ET(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ST(e){let t=e.map(r=>r.route.path).filter(Boolean);return Dr(t)||"/"}var K1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function q1(e,t){let r=e;if(typeof r!="string"||!mT.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let i=r,s=!1;if(K1)try{let o=new URL(window.location.href),c=r.startsWith("//")?new URL(o.protocol+r):new URL(r),d=Ca(c.pathname,t);c.origin===o.origin&&d!=null?r=d+c.search+c.hash:s=!0}catch{fr(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var G1=["POST","PUT","PATCH","DELETE"];new Set(G1);var _T=["GET",...G1];new Set(_T);var nl=w.createContext(null);nl.displayName="DataRouter";var nd=w.createContext(null);nd.displayName="DataRouterState";var V1=w.createContext(!1);function kT(){return w.useContext(V1)}var Y1=w.createContext({isTransitioning:!1});Y1.displayName="ViewTransition";var NT=w.createContext(new Map);NT.displayName="Fetchers";var CT=w.createContext(null);CT.displayName="Await";var pr=w.createContext(null);pr.displayName="Navigation";var Mo=w.createContext(null);Mo.displayName="Location";var Nr=w.createContext({outlet:null,matches:[],isDataRoute:!1});Nr.displayName="Route";var xm=w.createContext(null);xm.displayName="RouteError";var W1="REACT_ROUTER_ERROR",TT="REDIRECT",AT="ROUTE_ERROR_RESPONSE";function RT(e){if(e.startsWith(`${W1}:${TT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function OT(e){if(e.startsWith(`${W1}:${AT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new wT(t.status,t.statusText,t.data)}catch{}}function MT(e,{relative:t}={}){Qt(rl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=w.useContext(pr),{hash:s,pathname:o,search:c}=jo(e,{relative:t}),d=o;return r!=="/"&&(d=o==="/"?r:Dr([r,o])),i.createHref({pathname:d,search:c,hash:s})}function rl(){return w.useContext(Mo)!=null}function Cr(){return Qt(rl(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Mo).location}var X1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Q1(e){w.useContext(pr).static||w.useLayoutEffect(e)}function rd(){let{isDataRoute:e}=w.useContext(Nr);return e?VT():DT()}function DT(){Qt(rl(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(nl),{basename:t,navigator:r}=w.useContext(pr),{matches:i}=w.useContext(Nr),{pathname:s}=Cr(),o=JSON.stringify(ym(i)),c=w.useRef(!1);return Q1(()=>{c.current=!0}),w.useCallback((h,f={})=>{if(fr(c.current,X1),!c.current)return;if(typeof h=="number"){r.go(h);return}let g=td(h,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Dr([t,g.pathname])),(f.replace?r.replace:r.push)(g,f.state,f)},[t,r,o,s,e])}var jT=w.createContext(null);function LT(e){let t=w.useContext(Nr).outlet;return w.useMemo(()=>t&&w.createElement(jT.Provider,{value:e},t),[t,e])}function Do(){let{matches:e}=w.useContext(Nr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function jo(e,{relative:t}={}){let{matches:r}=w.useContext(Nr),{pathname:i}=Cr(),s=JSON.stringify(ym(r));return w.useMemo(()=>td(e,JSON.parse(s),i,t==="path"),[e,s,i,t])}function IT(e,t){return Z1(e,t)}function Z1(e,t,r){var _;Qt(rl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(pr),{matches:s}=w.useContext(Nr),o=s[s.length-1],c=o?o.params:{},d=o?o.pathname:"/",h=o?o.pathnameBase:"/",f=o&&o.route;{let N=f&&f.path||"";ew(d,!f||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${N}">) 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.
394
+
395
+ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=Cr(),m;if(t){let N=typeof t=="string"?Qi(t):t;Qt(h==="/"||((_=N.pathname)==null?void 0:_.startsWith(h)),`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 "${h}" but pathname "${N.pathname}" was given in the \`location\` prop.`),m=N}else m=g;let x=m.pathname||"/",v=x;if(h!=="/"){let N=h.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=U1(e,{pathname:v});fr(f||E!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),fr(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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 S=FT(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Dr([h,i.encodeLocation?i.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?h:Dr([h,i.encodeLocation?i.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,r);return t&&S?w.createElement(Mo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},S):S}function zT(){let e=GT(),t=ET(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:s},r):null,c)}var PT=w.createElement(zT,null),J1=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=OT(e.digest);r&&(e=r)}let t=e!==void 0?w.createElement(Nr.Provider,{value:this.props.routeContext},w.createElement(xm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(BT,{error:e},t):t}};J1.contextType=V1;var zh=new WeakMap;function BT({children:e,error:t}){let{basename:r}=w.useContext(pr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=RT(t.digest);if(i){let s=zh.get(t);if(s)throw s;let o=q1(i.location,r);if(K1&&!zh.get(t))if(o.isExternal||i.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:i.replace}));throw zh.set(t,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function UT({routeContext:e,match:t,children:r}){let i=w.useContext(nl);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Nr.Provider,{value:e},r)}function FT(e,t=[],r){let i=r==null?void 0:r.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let s=e,o=i==null?void 0:i.errors;if(o!=null){let g=s.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);Qt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let c=!1,d=-1;if(r&&i){c=i.renderFallback;for(let g=0;g<s.length;g++){let m=s[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=g),m.route.id){let{loaderData:x,errors:v}=i,E=m.route.loader&&!x.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||E){r.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let h=r==null?void 0:r.onError,f=i&&h?(g,m)=>{var x,v;h(g,{location:i.location,params:((v=(x=i.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:ST(i.matches),errorInfo:m})}:void 0;return s.reduceRight((g,m,x)=>{let v,E=!1,S=null,_=null;i&&(v=o&&m.route.id?o[m.route.id]:void 0,S=m.route.errorElement||PT,c&&(d<0&&x===0?(ew("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,_=null):d===x&&(E=!0,_=m.route.hydrateFallbackElement||null)));let N=t.concat(s.slice(0,x+1)),T=()=>{let C;return v?C=S:E?C=_:m.route.Component?C=w.createElement(m.route.Component,null):m.route.element?C=m.route.element:C=g,w.createElement(UT,{match:m,routeContext:{outlet:g,matches:N,isDataRoute:i!=null},children:C})};return i&&(m.route.ErrorBoundary||m.route.errorElement||x===0)?w.createElement(J1,{location:i.location,revalidation:i.revalidation,component:S,error:v,children:T(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:f}):T()},null)}function vm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $T(e){let t=w.useContext(nl);return Qt(t,vm(e)),t}function HT(e){let t=w.useContext(nd);return Qt(t,vm(e)),t}function KT(e){let t=w.useContext(Nr);return Qt(t,vm(e)),t}function wm(e){let t=KT(e),r=t.matches[t.matches.length-1];return Qt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function qT(){return wm("useRouteId")}function GT(){var i;let e=w.useContext(xm),t=HT("useRouteError"),r=wm("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[r]}function VT(){let{router:e}=$T("useNavigate"),t=wm("useNavigate"),r=w.useRef(!1);return Q1(()=>{r.current=!0}),w.useCallback(async(s,o={})=>{fr(r.current,X1),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var hx={};function ew(e,t,r){!t&&!hx[e]&&(hx[e]=!0,fr(!1,r))}w.memo(YT);function YT({routes:e,future:t,state:r,isStatic:i,onError:s}){return Z1(e,void 0,{state:r,isStatic:i,onError:s})}function fi({to:e,replace:t,state:r,relative:i}){Qt(rl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=w.useContext(pr);fr(!s,"<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:o}=w.useContext(Nr),{pathname:c}=Cr(),d=rd(),h=td(e,ym(o),c,i==="path"),f=JSON.stringify(h);return w.useEffect(()=>{d(JSON.parse(f),{replace:t,state:r,relative:i})},[d,f,i,t,r]),null}function WT(e){return LT(e.context)}function Fi(e){Qt(!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 XT({basename:e="/",children:t=null,location:r,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Qt(!rl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=w.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof r=="string"&&(r=Qi(r));let{pathname:f="/",search:g="",hash:m="",state:x=null,key:v="default",unstable_mask:E}=r,S=w.useMemo(()=>{let _=Ca(f,d);return _==null?null:{location:{pathname:_,search:g,hash:m,state:x,key:v,unstable_mask:E},navigationType:i}},[d,f,g,m,x,v,i,E]);return fr(S!=null,`<Router basename="${d}"> is not able to match the URL "${f}${g}${m}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:w.createElement(pr.Provider,{value:h},w.createElement(Mo.Provider,{children:t,value:S}))}function QT({children:e,location:t}){return IT(Op(e),t)}function Op(e,t=[]){let r=[];return w.Children.forEach(e,(i,s)=>{if(!w.isValidElement(i))return;let o=[...t,s];if(i.type===w.Fragment){r.push.apply(r,Op(i.props.children,o));return}Qt(i.type===Fi,`[${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>`),Qt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||o.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&&(c.children=Op(i.props.children,o)),r.push(c)}),r}var wu="get",Eu="application/x-www-form-urlencoded";function ad(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ZT(e){return ad(e)&&e.tagName.toLowerCase()==="button"}function JT(e){return ad(e)&&e.tagName.toLowerCase()==="form"}function eA(e){return ad(e)&&e.tagName.toLowerCase()==="input"}function tA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nA(e,t){return e.button===0&&(!t||t==="_self")&&!tA(e)}function Mp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(s=>[r,s]):[[r,i]])},[]))}function rA(e,t){let r=Mp(e);return t&&t.forEach((i,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}var nu=null;function aA(){if(nu===null)try{new FormData(document.createElement("form"),0),nu=!1}catch{nu=!0}return nu}var iA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ph(e){return e!=null&&!iA.has(e)?(fr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Eu}"`),null):e}function sA(e,t){let r,i,s,o,c;if(JT(e)){let d=e.getAttribute("action");i=d?Ca(d,t):null,r=e.getAttribute("method")||wu,s=Ph(e.getAttribute("enctype"))||Eu,o=new FormData(e)}else if(ZT(e)||eA(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(i=h?Ca(h,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||wu,s=Ph(e.getAttribute("formenctype"))||Ph(d.getAttribute("enctype"))||Eu,o=new FormData(d,e),!aA()){let{name:f,type:g,value:m}=e;if(g==="image"){let x=f?`${f}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else f&&o.append(f,m)}}else{if(ad(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=wu,i=null,s=Eu,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:i,method:r.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Em(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function tw(e,t,r,i){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:t&&Ca(s.pathname,t)==="/"?s.pathname=`${Ru(t)}/_root.${i}`:s.pathname=`${Ru(s.pathname)}.${i}`,s}async function lA(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function oA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function cA(e,t,r){let i=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await lA(o,r);return c.links?c.links():[]}return[]}));return hA(i.flat(1).filter(oA).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function px(e,t,r,i,s,o){let c=(h,f)=>r[f]?h.route.id!==r[f].route.id:!0,d=(h,f)=>{var g;return r[f].pathname!==h.pathname||((g=r[f].route.path)==null?void 0:g.endsWith("*"))&&r[f].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,f)=>c(h,f)||d(h,f)):o==="data"?t.filter((h,f)=>{var m;let g=i.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(c(h,f)||d(h,f))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((m=r[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function uA(e,t,{includeHydrateFallback:r}={}){return dA(e.map(i=>{let s=t.routes[i.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function dA(e){return[...new Set(e)]}function fA(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function hA(e,t){let r=new Set;return new Set(t),e.reduce((i,s)=>{let o=JSON.stringify(fA(s));return r.has(o)||(r.add(o),i.push({key:o,link:s})),i},[])}function Sm(){let e=w.useContext(nl);return Em(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pA(){let e=w.useContext(nd);return Em(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _m=w.createContext(void 0);_m.displayName="FrameworkContext";function km(){let e=w.useContext(_m);return Em(e,"You must render this element inside a <HydratedRouter> element"),e}function mA(e,t){let r=w.useContext(_m),[i,s]=w.useState(!1),[o,c]=w.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:f,onMouseLeave:g,onTouchStart:m}=t,x=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=N=>{N.forEach(T=>{c(T.isIntersecting)})},_=new IntersectionObserver(S,{threshold:.5});return x.current&&_.observe(x.current),()=>{_.disconnect()}}},[e]),w.useEffect(()=>{if(i){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[i]);let v=()=>{s(!0)},E=()=>{s(!1),c(!1)};return r?e!=="intent"?[o,x,{}]:[o,x,{onFocus:ao(d,v),onBlur:ao(h,E),onMouseEnter:ao(f,v),onMouseLeave:ao(g,E),onTouchStart:ao(m,v)}]:[!1,x,{}]}function ao(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function gA({page:e,...t}){let r=kT(),{router:i}=Sm(),s=w.useMemo(()=>U1(i.routes,e,i.basename),[i.routes,e,i.basename]);return s?r?w.createElement(yA,{page:e,matches:s,...t}):w.createElement(xA,{page:e,matches:s,...t}):null}function bA(e){let{manifest:t,routeModules:r}=km(),[i,s]=w.useState([]);return w.useEffect(()=>{let o=!1;return cA(e,t,r).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,r]),i}function yA({page:e,matches:t,...r}){let i=Cr(),{future:s}=km(),{basename:o}=Sm(),c=w.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let d=tw(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,f=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?h=!0:f.push(g.route.id);return h&&f.length>0&&d.searchParams.set("_routes",f.join(",")),[d.pathname+d.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,i,t]);return w.createElement(w.Fragment,null,c.map(d=>w.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...r})))}function xA({page:e,matches:t,...r}){let i=Cr(),{future:s,manifest:o,routeModules:c}=km(),{basename:d}=Sm(),{loaderData:h,matches:f}=pA(),g=w.useMemo(()=>px(e,t,f,o,i,"data"),[e,t,f,o,i]),m=w.useMemo(()=>px(e,t,f,o,i,"assets"),[e,t,f,o,i]),x=w.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let S=new Set,_=!1;if(t.forEach(T=>{var j;let C=o.routes[T.route.id];!C||!C.hasLoader||(!g.some(D=>D.route.id===T.route.id)&&T.route.id in h&&((j=c[T.route.id])!=null&&j.shouldRevalidate)||C.hasClientLoader?_=!0:S.add(T.route.id))}),S.size===0)return[];let N=tw(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return _&&S.size>0&&N.searchParams.set("_routes",t.filter(T=>S.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[d,s.unstable_trailingSlashAwareDataRequests,h,i,o,g,t,e,c]),v=w.useMemo(()=>uA(m,o),[m,o]),E=bA(m);return w.createElement(w.Fragment,null,x.map(S=>w.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),v.map(S=>w.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),E.map(({key:S,link:_})=>w.createElement("link",{key:S,nonce:r.nonce,..._,crossOrigin:_.crossOrigin??r.crossOrigin})))}function vA(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var wA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wA&&(window.__reactRouterVersion="7.14.2")}catch{}function EA({basename:e,children:t,unstable_useTransitions:r,window:i}){let s=w.useRef();s.current==null&&(s.current=Z2({window:i,v5Compat:!0}));let o=s.current,[c,d]=w.useState({action:o.action,location:o.location}),h=w.useCallback(f=>{r===!1?d(f):w.startTransition(()=>d(f))},[r]);return w.useLayoutEffect(()=>o.listen(h),[o,h]),w.createElement(XT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:r})}var nw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pn=w.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:s,reloadDocument:o,replace:c,unstable_mask:d,state:h,target:f,to:g,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v,...E},S){let{basename:_,navigator:N,unstable_useTransitions:T}=w.useContext(pr),C=typeof g=="string"&&nw.test(g),j=q1(g,_);g=j.to;let D=MT(g,{relative:s}),A=Cr(),P=null;if(d){let $=td(d,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);_!=="/"&&($.pathname=$.pathname==="/"?_:Dr([_,$.pathname])),P=N.createHref($)}let[K,X,O]=mA(i,E),U=kA(g,{replace:c,unstable_mask:d,state:h,target:f,preventScrollReset:m,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:T});function J($){t&&t($),$.defaultPrevented||U($)}let ce=!(j.isExternal||o),q=w.createElement("a",{...E,...O,href:(ce?P:void 0)||j.absoluteURL||D,onClick:ce?J:t,ref:vA(S,X),target:f,"data-discover":!C&&r==="render"?"true":void 0});return K&&!C?w.createElement(w.Fragment,null,q,w.createElement(gA,{page:D})):q});Pn.displayName="Link";var Dp=w.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:s=!1,style:o,to:c,viewTransition:d,children:h,...f},g){let m=jo(c,{relative:f.relative}),x=Cr(),v=w.useContext(nd),{navigator:E,basename:S}=w.useContext(pr),_=v!=null&&RA(m)&&d===!0,N=E.encodeLocation?E.encodeLocation(m).pathname:m.pathname,T=x.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(T=T.toLowerCase(),C=C?C.toLowerCase():null,N=N.toLowerCase()),C&&S&&(C=Ca(C,S)||C);const j=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let D=T===N||!s&&T.startsWith(N)&&T.charAt(j)==="/",A=C!=null&&(C===N||!s&&C.startsWith(N)&&C.charAt(N.length)==="/"),P={isActive:D,isPending:A,isTransitioning:_},K=D?t:void 0,X;typeof i=="function"?X=i(P):X=[i,D?"active":null,A?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(P):o;return w.createElement(Pn,{...f,"aria-current":K,className:X,ref:g,style:O,to:c,viewTransition:d},typeof h=="function"?h(P):h)});Dp.displayName="NavLink";var SA=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:s,state:o,method:c=wu,action:d,onSubmit:h,relative:f,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:x,...v},E)=>{let{unstable_useTransitions:S}=w.useContext(pr),_=TA(),N=AA(d,{relative:f}),T=c.toLowerCase()==="get"?"get":"post",C=typeof d=="string"&&nw.test(d),j=D=>{if(h&&h(D),D.defaultPrevented)return;D.preventDefault();let A=D.nativeEvent.submitter,P=(A==null?void 0:A.getAttribute("formmethod"))||c,K=()=>_(A||D.currentTarget,{fetcherKey:t,method:P,navigate:r,replace:s,state:o,relative:f,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:x});S&&r!==!1?w.startTransition(()=>K()):K()};return w.createElement("form",{ref:E,method:T,action:N,onSubmit:i?h:j,...v,"data-discover":!C&&e==="render"?"true":void 0})});SA.displayName="Form";function _A(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rw(e){let t=w.useContext(nl);return Qt(t,_A(e)),t}function kA(e,{target:t,replace:r,unstable_mask:i,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:f}={}){let g=rd(),m=Cr(),x=jo(e,{relative:c});return w.useCallback(v=>{if(nA(v,t)){v.preventDefault();let E=r!==void 0?r:Eo(m)===Eo(x),S=()=>g(e,{replace:E,unstable_mask:i,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:h});f?w.startTransition(()=>S()):S()}},[m,g,x,r,i,s,t,e,o,c,d,h,f])}function Nm(e){fr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=w.useRef(Mp(e)),r=w.useRef(!1),i=Cr(),s=w.useMemo(()=>rA(i.search,r.current?null:t.current),[i.search]),o=rd(),c=w.useCallback((d,h)=>{const f=Mp(typeof d=="function"?d(new URLSearchParams(s)):d);r.current=!0,o("?"+f,h)},[o,s]);return[s,c]}var NA=0,CA=()=>`__${String(++NA)}__`;function TA(){let{router:e}=rw("useSubmit"),{basename:t}=w.useContext(pr),r=qT(),i=e.fetch,s=e.navigate;return w.useCallback(async(o,c={})=>{let{action:d,method:h,encType:f,formData:g,body:m}=sA(o,t);if(c.navigate===!1){let x=c.fetcherKey||CA();await i(x,r,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:m,formMethod:c.method||h,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:m,formMethod:c.method||h,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,s,t,r])}function AA(e,{relative:t}={}){let{basename:r}=w.useContext(pr),i=w.useContext(Nr);Qt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),o={...jo(e||".",{relative:t})},c=Cr();if(e==null){o.search=c.search;let d=new URLSearchParams(o.search),h=d.getAll("index");if(h.some(g=>g==="")){d.delete("index"),h.filter(m=>m).forEach(m=>d.append("index",m));let g=d.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Dr([r,o.pathname])),Eo(o)}function RA(e,{relative:t}={}){let r=w.useContext(Y1);Qt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=rw("useViewTransitionState"),s=jo(e,{relative:t});if(!r.isTransitioning)return!1;let o=Ca(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=Ca(r.nextLocation.pathname,i)||r.nextLocation.pathname;return Au(s.pathname,c)!=null||Au(s.pathname,o)!=null}var Lo=B1();const OA=tl(Lo),mx=e=>{let t;const r=new Set,i=(f,g)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const x=t;t=g??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(v=>v(t,x))}},s=()=>t,d={setState:i,getState:s,getInitialState:()=>h,subscribe:f=>(r.add(f),()=>r.delete(f))},h=t=e(i,s,d);return d},MA=(e=>e?mx(e):mx),DA=e=>e;function jA(e,t=DA){const r=kt.useSyncExternalStore(e.subscribe,kt.useCallback(()=>t(e.getState()),[e,t]),kt.useCallback(()=>t(e.getInitialState()),[e,t]));return kt.useDebugValue(r),r}const gx=e=>{const t=MA(e),r=i=>jA(t,i);return Object.assign(r,t),r},Cm=(e=>e?gx(e):gx),bx="/api/v1";class LA{constructor(){Ls(this,"token","");Ls(this,"baseUrl",bx)}setToken(t){this.token=t}setBaseUrl(t){const r=t.trim();if(!r){this.baseUrl=bx;return}this.baseUrl=r.endsWith("/api/v1")?r:`${r.replace(/\/+$/,"")}/api/v1`}getToken(){return this.token}getBaseUrl(){return this.baseUrl}headers(){const t={"Content-Type":"application/json"};return this.token&&(t.Authorization=`Bearer ${this.token}`),t}async request(t,r,i,s){let o=this.resolveUrl(r);if(s){const h=new URLSearchParams(s).toString();h&&(o+=`?${h}`)}const c=await fetch(o,{method:t,headers:this.headers(),body:i?JSON.stringify(i):void 0}),d=await c.json();if(!d.ok)throw new IA(d.error||"Unknown error",c.status);return d.data}get(t,r){return this.request("GET",t,void 0,r)}post(t,r){return this.request("POST",t,r)}patch(t,r){return this.request("PATCH",t,r)}delete(t){return this.request("DELETE",t)}resolveUrl(t){const r=t.replace(/^\/+/,"");return this.baseUrl.startsWith("http://")||this.baseUrl.startsWith("https://")?new URL(r,`${this.baseUrl}/`).toString():`${this.baseUrl}/${r}`.replace(/([^:]\/)\/+/g,"$1")}}class IA extends Error{constructor(t,r){super(t),this.status=r,this.name="ApiError"}}const ot=new LA,hr=Cm(e=>({token:"",serverUrl:"",isAuthenticated:!1,desktopManaged:!1,managedBy:"none",login:(t,r)=>{ot.setToken(t),r&&ot.setBaseUrl(r),localStorage.setItem("cc_token",t),r&&localStorage.setItem("cc_server_url",r),e({token:t,serverUrl:r||"",isAuthenticated:!0,desktopManaged:!1,managedBy:"remote"})},setManagedSession:(t,r,i)=>{ot.setToken(t),ot.setBaseUrl(r),e({token:t,serverUrl:r,isAuthenticated:!0,desktopManaged:!0,managedBy:i})},setDesktopSession:(t,r)=>{hr.getState().setManagedSession(t,r,"electron")},logout:()=>{hr.getState().desktopManaged||(ot.setToken(""),ot.setBaseUrl(""),localStorage.removeItem("cc_token"),localStorage.removeItem("cc_server_url"),e({token:"",serverUrl:"",isAuthenticated:!1,desktopManaged:!1,managedBy:"none"}))},init:()=>{const t=localStorage.getItem("cc_token")||"",r=localStorage.getItem("cc_server_url")||"";t&&(ot.setToken(t),r&&ot.setBaseUrl(r),e({token:t,serverUrl:r,isAuthenticated:!0,desktopManaged:!1,managedBy:"remote"}))}})),zA=(e,t,r,i)=>{var o,c,d,h;const s=[r,{code:t,...i||{}}];if((c=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&c.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);$i(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(h=(d=e==null?void 0:e.services)==null?void 0:d.logger)!=null&&h.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},yx={},jp=(e,t,r,i)=>{$i(r)&&yx[r]||($i(r)&&(yx[r]=new Date),zA(e,t,r,i))},aw=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},Lp=(e,t,r)=>{e.loadNamespaces(t,aw(e,r))},xx=(e,t,r,i)=>{if($i(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Lp(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,aw(e,i))},PA=(e,t,r={})=>!t.languages||!t.languages.length?(jp(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),$i=e=>typeof e=="string",BA=e=>typeof e=="object"&&e!==null,UA=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,FA={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},$A=e=>FA[e],HA=e=>e.replace(UA,$A);let Ip={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:HA};const KA=(e={})=>{Ip={...Ip,...e}},qA=()=>Ip;let iw;const GA=e=>{iw=e},VA=()=>iw,YA={type:"3rdParty",init(e){KA(e.options.react),GA(e)}},WA=w.createContext();class XA{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const QA=(e,t)=>{const r=w.useRef();return w.useEffect(()=>{r.current=e},[e,t]),r.current},sw=(e,t,r,i)=>e.getFixedT(t,r,i),ZA=(e,t,r,i)=>w.useCallback(sw(e,t,r,i),[e,t,r,i]),Pr=(e,t={})=>{var j,D,A,P;const{i18n:r}=t,{i18n:i,defaultNS:s}=w.useContext(WA)||{},o=r||i||VA();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new XA),!o){jp(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const K=(O,U)=>$i(U)?U:BA(U)&&$i(U.defaultValue)?U.defaultValue:Array.isArray(O)?O[O.length-1]:O,X=[K,{},!1];return X.t=K,X.i18n={},X.ready=!1,X}(j=o.options.react)!=null&&j.wait&&jp(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...qA(),...o.options.react,...t},{useSuspense:d,keyPrefix:h}=c;let f=s||((D=o.options)==null?void 0:D.defaultNS);f=$i(f)?[f]:f||["translation"],(P=(A=o.reportNamespaces).addUsedNamespaces)==null||P.call(A,f);const g=(o.isInitialized||o.initializedStoreOnce)&&f.every(K=>PA(K,o,c)),m=ZA(o,t.lng||null,c.nsMode==="fallback"?f:f[0],h),x=()=>m,v=()=>sw(o,t.lng||null,c.nsMode==="fallback"?f:f[0],h),[E,S]=w.useState(x);let _=f.join();t.lng&&(_=`${t.lng}${_}`);const N=QA(_),T=w.useRef(!0);w.useEffect(()=>{const{bindI18n:K,bindI18nStore:X}=c;T.current=!0,!g&&!d&&(t.lng?xx(o,t.lng,f,()=>{T.current&&S(v)}):Lp(o,f,()=>{T.current&&S(v)})),g&&N&&N!==_&&T.current&&S(v);const O=()=>{T.current&&S(v)};return K&&(o==null||o.on(K,O)),X&&(o==null||o.store.on(X,O)),()=>{T.current=!1,o&&K&&(K==null||K.split(" ").forEach(U=>o.off(U,O))),X&&o&&X.split(" ").forEach(U=>o.store.off(U,O))}},[o,_]),w.useEffect(()=>{T.current&&g&&S(x)},[o,h,g]);const C=[E,o,g];if(C.t=E,C.i18n=o,C.ready=g,g||!g&&!d)return C;throw new Promise(K=>{t.lng?xx(o,t.lng,f,()=>K()):Lp(o,f,()=>K())})};function lw(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=lw(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function JA(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=lw(e))&&(i&&(i+=" "),i+=t);return i}function He(...e){return JA(e)}function Zs(e){return e?new Date(e).toLocaleString():"-"}let So=typeof window<"u"&&window.desktop?"electron":"local_core";const Tm=Cm(e=>({snapshot:null,setSnapshot:t=>e({snapshot:t})}));function Hi(){return So}function Bh(e){So=e}function eR(){return So==="electron"}function tR(){return!1}function Uh(e){Tm.getState().setSnapshot(e)}function nR(){return Tm.getState().snapshot}function rR(e){return!!(e!=null&&e.knowledge.some(t=>t.enabled!==!1))}function aR(e){return!!(e!=null&&e.schedulers.some(t=>t.enabled!==!1))}function iR(e,t){return!!(e!=null&&e.agents.some(r=>r.agentType===t))}function sR(e){return!!(e!=null&&e.agents.some(t=>t.agentType))}function lR(e=nR()){const t=!!e,r=iR(e,"localcore-acp");return{desktopRuntime:t||So==="electron"||So==="local_core",desktopChat:r,chatRoute:t?r:!0,desktopWorkspace:t?sR(e):!0,knowledgeModule:t?rR(e):!0,schedulerModule:t?aR(e):!0}}function id(){const e=Tm(t=>t.snapshot);return lR(e)}function vx(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function wx(e){document.documentElement.classList.toggle("dark",e==="dark")}const Am=Cm(e=>({theme:"dark",resolved:"dark",setTheme:t=>{const r=vx(t);localStorage.setItem("cc_theme",t),wx(r),e({theme:t,resolved:r})},init:()=>{const t=localStorage.getItem("cc_theme")||"dark",r=vx(t);wx(r),e({theme:t,resolved:r})}}));function Kt({children:e,className:t,hover:r}){return p.jsx("div",{className:He("rounded-lg p-5 text-card-foreground transition-colors duration-200 animate-float-in","border border-black/[0.08] bg-white/62 shadow-[0_1px_1px_rgba(0,0,0,0.04)] backdrop-blur-2xl","dark:border-white/[0.07] dark:bg-white/[0.06] dark:shadow-none",r&&"cursor-pointer hover:border-black/[0.12] hover:bg-white/76 hover:shadow-[0_10px_26px_rgba(0,0,0,0.07)] dark:hover:border-white/[0.10] dark:hover:bg-white/[0.09] dark:hover:shadow-none",t),children:e})}function Ex(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rm(...e){return t=>{let r=!1;const i=e.map(s=>{const o=Ex(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():Ex(e[s],null)}}}}function cn(...e){return w.useCallback(Rm(...e),e)}var oR=Symbol.for("react.lazy"),Ou=hm[" use ".trim().toString()];function cR(e){return typeof e=="object"&&e!==null&&"then"in e}function ow(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===oR&&"_payload"in e&&cR(e._payload)}function uR(e){const t=fR(e),r=w.forwardRef((i,s)=>{let{children:o,...c}=i;ow(o)&&typeof Ou=="function"&&(o=Ou(o._payload));const d=w.Children.toArray(o),h=d.find(pR);if(h){const f=h.props.children,g=d.map(m=>m===h?w.Children.count(f)>1?w.Children.only(null):w.isValidElement(f)?f.props.children:null:m);return p.jsx(t,{...c,ref:s,children:w.isValidElement(f)?w.cloneElement(f,void 0,g):null})}return p.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var dR=uR("Slot");function fR(e){const t=w.forwardRef((r,i)=>{let{children:s,...o}=r;if(ow(s)&&typeof Ou=="function"&&(s=Ou(s._payload)),w.isValidElement(s)){const c=gR(s),d=mR(o,s.props);return s.type!==w.Fragment&&(d.ref=i?Rm(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hR=Symbol("radix.slottable");function pR(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hR}function mR(e,t){const r={...t};for(const i in t){const s=e[i],o=t[i];/^on[A-Z]/.test(i)?s&&o?r[i]=(...d)=>{const h=o(...d);return s(...d),h}:s&&(r[i]=s):i==="style"?r[i]={...s,...o}:i==="className"&&(r[i]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function gR(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const bR={default:"bg-primary text-primary-foreground hover:bg-accent-dim",primary:"bg-primary text-primary-foreground hover:bg-accent-dim",secondary:"bg-black/[0.05] text-secondary-foreground hover:bg-black/[0.08] dark:bg-white/[0.08] dark:hover:bg-white/[0.12]",outline:"border border-input bg-background hover:bg-black/[0.04] hover:text-foreground dark:hover:bg-white/[0.06]",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",danger:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]",link:"text-primary underline-offset-4 hover:underline"},yR={default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",md:"h-9 rounded-md px-4 py-2 text-sm",lg:"h-10 rounded-md px-6 text-sm",icon:"h-9 w-9"};function _e({variant:e="primary",size:t="md",className:r,children:i,loading:s,asChild:o,disabled:c,type:d="button",...h}){const f=t==="default"?"md":t,g=o?dR:"button";return p.jsxs(g,{...o?{}:{type:d},className:He("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors duration-200","cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50",bR[e],yR[f],r),disabled:c||s,...h,children:[s&&p.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24","aria-hidden":!0,children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),i]})}const xR={default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-primary/10 text-primary dark:bg-primary/15 dark:text-primary",warning:"border-transparent bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-200",danger:"border-transparent bg-destructive/10 text-destructive dark:bg-destructive/20 dark:text-red-200",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",info:"border-transparent bg-blue-100 text-blue-700 dark:bg-blue-500/15 dark:text-blue-200"};function Nn({children:e,variant:t="default"}){return p.jsx("span",{className:He("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",xR[t]),children:e})}function Yt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function vR(e,t){const r=w.createContext(t),i=o=>{const{children:c,...d}=o,h=w.useMemo(()=>d,Object.values(d));return p.jsx(r.Provider,{value:h,children:c})};i.displayName=e+"Provider";function s(o){const c=w.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[i,s]}function sd(e,t=[]){let r=[];function i(o,c){const d=w.createContext(c),h=r.length;r=[...r,c];const f=m=>{var N;const{scope:x,children:v,...E}=m,S=((N=x==null?void 0:x[e])==null?void 0:N[h])||d,_=w.useMemo(()=>E,Object.values(E));return p.jsx(S.Provider,{value:_,children:v})};f.displayName=o+"Provider";function g(m,x){var S;const v=((S=x==null?void 0:x[e])==null?void 0:S[h])||d,E=w.useContext(v);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,g]}const s=()=>{const o=r.map(c=>w.createContext(c));return function(d){const h=(d==null?void 0:d[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...d,[e]:h}}),[d,h])}};return s.scopeName=e,[i,wR(s,...t)]}function wR(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const c=i.reduce((d,{useScope:h,scopeName:f})=>{const m=h(o)[`__scope${f}`];return{...d,...m}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var On=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},ER=hm[" useId ".trim().toString()]||(()=>{}),SR=0;function Vs(e){const[t,r]=w.useState(ER());return On(()=>{r(i=>i??String(SR++))},[e]),e||(t?`radix-${t}`:"")}var _R=hm[" useInsertionEffect ".trim().toString()]||On;function zp({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[s,o,c]=kR({defaultProp:t,onChange:r}),d=e!==void 0,h=d?e:s;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const m=g.current;m!==d&&console.warn(`${i} is changing from ${m?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,i])}const f=w.useCallback(g=>{var m;if(d){const x=NR(g)?g(e):g;x!==e&&((m=c.current)==null||m.call(c,x))}else o(g)},[d,e,o,c]);return[h,f]}function kR({defaultProp:e,onChange:t}){const[r,i]=w.useState(e),s=w.useRef(r),o=w.useRef(t);return _R(()=>{o.current=t},[t]),w.useEffect(()=>{var c;s.current!==r&&((c=o.current)==null||c.call(o,r),s.current=r)},[r,s]),[r,i,o]}function NR(e){return typeof e=="function"}function _o(e){const t=CR(e),r=w.forwardRef((i,s)=>{const{children:o,...c}=i,d=w.Children.toArray(o),h=d.find(AR);if(h){const f=h.props.children,g=d.map(m=>m===h?w.Children.count(f)>1?w.Children.only(null):w.isValidElement(f)?f.props.children:null:m);return p.jsx(t,{...c,ref:s,children:w.isValidElement(f)?w.cloneElement(f,void 0,g):null})}return p.jsx(t,{...c,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function CR(e){const t=w.forwardRef((r,i)=>{const{children:s,...o}=r;if(w.isValidElement(s)){const c=OR(s),d=RR(o,s.props);return s.type!==w.Fragment&&(d.ref=i?Rm(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TR=Symbol("radix.slottable");function AR(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TR}function RR(e,t){const r={...t};for(const i in t){const s=e[i],o=t[i];/^on[A-Z]/.test(i)?s&&o?r[i]=(...d)=>{const h=o(...d);return s(...d),h}:s&&(r[i]=s):i==="style"?r[i]={...s,...o}:i==="className"&&(r[i]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function OR(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var MR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qt=MR.reduce((e,t)=>{const r=_o(`Primitive.${t}`),i=w.forwardRef((s,o)=>{const{asChild:c,...d}=s,h=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(h,{...d,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function DR(e,t){e&&Lo.flushSync(()=>e.dispatchEvent(t))}function Ki(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var i;return(i=t.current)==null?void 0:i.call(t,...r)},[])}function jR(e,t=globalThis==null?void 0:globalThis.document){const r=Ki(e);w.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[r,t])}var LR="DismissableLayer",Pp="dismissableLayer.update",IR="dismissableLayer.pointerDownOutside",zR="dismissableLayer.focusOutside",Sx,cw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Om=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:c,onDismiss:d,...h}=e,f=w.useContext(cw),[g,m]=w.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=w.useState({}),E=cn(t,P=>m(P)),S=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=S.indexOf(_),T=g?S.indexOf(g):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,j=T>=N,D=UR(P=>{const K=P.target,X=[...f.branches].some(O=>O.contains(K));!j||X||(s==null||s(P),c==null||c(P),P.defaultPrevented||d==null||d())},x),A=FR(P=>{const K=P.target;[...f.branches].some(O=>O.contains(K))||(o==null||o(P),c==null||c(P),P.defaultPrevented||d==null||d())},x);return jR(P=>{T===f.layers.size-1&&(i==null||i(P),!P.defaultPrevented&&d&&(P.preventDefault(),d()))},x),w.useEffect(()=>{if(g)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Sx=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(g)),f.layers.add(g),_x(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Sx)}},[g,x,r,f]),w.useEffect(()=>()=>{g&&(f.layers.delete(g),f.layersWithOutsidePointerEventsDisabled.delete(g),_x())},[g,f]),w.useEffect(()=>{const P=()=>v({});return document.addEventListener(Pp,P),()=>document.removeEventListener(Pp,P)},[]),p.jsx(qt.div,{...h,ref:E,style:{pointerEvents:C?j?"auto":"none":void 0,...e.style},onFocusCapture:Yt(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Yt(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Yt(e.onPointerDownCapture,D.onPointerDownCapture)})});Om.displayName=LR;var PR="DismissableLayerBranch",BR=w.forwardRef((e,t)=>{const r=w.useContext(cw),i=w.useRef(null),s=cn(t,i);return w.useEffect(()=>{const o=i.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),p.jsx(qt.div,{...e,ref:s})});BR.displayName=PR;function UR(e,t=globalThis==null?void 0:globalThis.document){const r=Ki(e),i=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=d=>{if(d.target&&!i.current){let h=function(){uw(IR,r,f,{discrete:!0})};const f={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=h,t.addEventListener("click",s.current,{once:!0})):h()}else t.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function FR(e,t=globalThis==null?void 0:globalThis.document){const r=Ki(e),i=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!i.current&&uw(zR,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function _x(){const e=new CustomEvent(Pp);document.dispatchEvent(e)}function uw(e,t,r,{discrete:i}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?DR(s,o):s.dispatchEvent(o)}var Fh="focusScope.autoFocusOnMount",$h="focusScope.autoFocusOnUnmount",kx={bubbles:!1,cancelable:!0},$R="FocusScope",Mm=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...c}=e,[d,h]=w.useState(null),f=Ki(s),g=Ki(o),m=w.useRef(null),x=cn(t,S=>h(S)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let S=function(C){if(v.paused||!d)return;const j=C.target;d.contains(j)?m.current=j:oi(m.current,{select:!0})},_=function(C){if(v.paused||!d)return;const j=C.relatedTarget;j!==null&&(d.contains(j)||oi(m.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const D of C)D.removedNodes.length>0&&oi(d)};document.addEventListener("focusin",S),document.addEventListener("focusout",_);const T=new MutationObserver(N);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",_),T.disconnect()}}},[i,d,v.paused]),w.useEffect(()=>{if(d){Cx.add(v);const S=document.activeElement;if(!d.contains(S)){const N=new CustomEvent(Fh,kx);d.addEventListener(Fh,f),d.dispatchEvent(N),N.defaultPrevented||(HR(YR(dw(d)),{select:!0}),document.activeElement===S&&oi(d))}return()=>{d.removeEventListener(Fh,f),setTimeout(()=>{const N=new CustomEvent($h,kx);d.addEventListener($h,g),d.dispatchEvent(N),N.defaultPrevented||oi(S??document.body,{select:!0}),d.removeEventListener($h,g),Cx.remove(v)},0)}}},[d,f,g,v]);const E=w.useCallback(S=>{if(!r&&!i||v.paused)return;const _=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,N=document.activeElement;if(_&&N){const T=S.currentTarget,[C,j]=KR(T);C&&j?!S.shiftKey&&N===j?(S.preventDefault(),r&&oi(C,{select:!0})):S.shiftKey&&N===C&&(S.preventDefault(),r&&oi(j,{select:!0})):N===T&&S.preventDefault()}},[r,i,v.paused]);return p.jsx(qt.div,{tabIndex:-1,...c,ref:x,onKeyDown:E})});Mm.displayName=$R;function HR(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(oi(i,{select:t}),document.activeElement!==r)return}function KR(e){const t=dw(e),r=Nx(t,e),i=Nx(t.reverse(),e);return[r,i]}function dw(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Nx(e,t){for(const r of e)if(!qR(r,{upTo:t}))return r}function qR(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GR(e){return e instanceof HTMLInputElement&&"select"in e}function oi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&GR(e)&&t&&e.select()}}var Cx=VR();function VR(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Tx(e,t),e.unshift(t)},remove(t){var r;e=Tx(e,t),(r=e[0])==null||r.resume()}}}function Tx(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function YR(e){return e.filter(t=>t.tagName!=="A")}var WR="Portal",Dm=w.forwardRef((e,t)=>{var d;const{container:r,...i}=e,[s,o]=w.useState(!1);On(()=>o(!0),[]);const c=r||s&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?OA.createPortal(p.jsx(qt.div,{...i,ref:t}),c):null});Dm.displayName=WR;function XR(e,t){return w.useReducer((r,i)=>t[r][i]??r,e)}var ld=e=>{const{present:t,children:r}=e,i=QR(t),s=typeof r=="function"?r({present:i.isPresent}):w.Children.only(r),o=cn(i.ref,ZR(s));return typeof r=="function"||i.isPresent?w.cloneElement(s,{ref:o}):null};ld.displayName="Presence";function QR(e){const[t,r]=w.useState(),i=w.useRef(null),s=w.useRef(e),o=w.useRef("none"),c=e?"mounted":"unmounted",[d,h]=XR(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const f=ru(i.current);o.current=d==="mounted"?f:"none"},[d]),On(()=>{const f=i.current,g=s.current;if(g!==e){const x=o.current,v=ru(f);e?h("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?h("UNMOUNT"):h(g&&x!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),On(()=>{if(t){let f;const g=t.ownerDocument.defaultView??window,m=v=>{const S=ru(i.current).includes(CSS.escape(v.animationName));if(v.target===t&&S&&(h("ANIMATION_END"),!s.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",f=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},x=v=>{v.target===t&&(o.current=ru(i.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:w.useCallback(f=>{i.current=f?getComputedStyle(f):null,r(f)},[])}}function ru(e){return(e==null?void 0:e.animationName)||"none"}function ZR(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hh=0;function fw(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ax()),document.body.insertAdjacentElement("beforeend",e[1]??Ax()),Hh++,()=>{Hh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hh--}},[])}function Ax(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wr=function(){return Wr=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Wr.apply(this,arguments)};function hw(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function JR(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var Su="right-scroll-bar-position",_u="width-before-scroll-bar",eO="with-scroll-bars-hidden",tO="--removed-body-scroll-bar-size";function Kh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nO(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var rO=typeof window<"u"?w.useLayoutEffect:w.useEffect,Rx=new WeakMap;function aO(e,t){var r=nO(null,function(i){return e.forEach(function(s){return Kh(s,i)})});return rO(function(){var i=Rx.get(r);if(i){var s=new Set(i),o=new Set(e),c=r.current;s.forEach(function(d){o.has(d)||Kh(d,null)}),o.forEach(function(d){s.has(d)||Kh(d,c)})}Rx.set(r,e)},[e]),r}function iO(e){return e}function sO(e,t){t===void 0&&(t=iO);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var c=t(o,i);return r.push(c),function(){r=r.filter(function(d){return d!==c})}},assignSyncMedium:function(o){for(i=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(d){return o(d)},filter:function(){return r}}},assignMedium:function(o){i=!0;var c=[];if(r.length){var d=r;r=[],d.forEach(o),c=r}var h=function(){var g=c;c=[],g.forEach(o)},f=function(){return Promise.resolve().then(h)};f(),r={push:function(g){c.push(g),f()},filter:function(g){return c=c.filter(g),r}}}};return s}function lO(e){e===void 0&&(e={});var t=sO(null);return t.options=Wr({async:!0,ssr:!1},e),t}var pw=function(e){var t=e.sideCar,r=hw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,Wr({},r))};pw.isSideCarExport=!0;function oO(e,t){return e.useMedium(t),pw}var mw=lO(),qh=function(){},od=w.forwardRef(function(e,t){var r=w.useRef(null),i=w.useState({onScrollCapture:qh,onWheelCapture:qh,onTouchMoveCapture:qh}),s=i[0],o=i[1],c=e.forwardProps,d=e.children,h=e.className,f=e.removeScrollBar,g=e.enabled,m=e.shards,x=e.sideCar,v=e.noRelative,E=e.noIsolation,S=e.inert,_=e.allowPinchZoom,N=e.as,T=N===void 0?"div":N,C=e.gapMode,j=hw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=x,A=aO([r,t]),P=Wr(Wr({},j),s);return w.createElement(w.Fragment,null,g&&w.createElement(D,{sideCar:mw,removeScrollBar:f,shards:m,noRelative:v,noIsolation:E,inert:S,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:C}),c?w.cloneElement(w.Children.only(d),Wr(Wr({},P),{ref:A})):w.createElement(T,Wr({},P,{className:h,ref:A}),d))});od.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};od.classNames={fullWidth:_u,zeroRight:Su};var cO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cO();return t&&e.setAttribute("nonce",t),e}function dO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=uO())&&(dO(t,r),fO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pO=function(){var e=hO();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},gw=function(){var e=pO(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},mO={left:0,top:0,right:0,gap:0},Gh=function(e){return parseInt(e||"",10)||0},gO=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Gh(r),Gh(i),Gh(s)]},bO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mO;var t=gO(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},yO=gw(),Ys="data-scroll-locked",xO=function(e,t,r,i){var s=e.left,o=e.top,c=e.right,d=e.gap;return r===void 0&&(r="margin"),`
396
+ .`.concat(eO,` {
397
+ overflow: hidden `).concat(i,`;
398
+ padding-right: `).concat(d,"px ").concat(i,`;
399
+ }
400
+ body[`).concat(Ys,`] {
401
+ overflow: hidden `).concat(i,`;
402
+ overscroll-behavior: contain;
403
+ `).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
404
+ padding-left: `.concat(s,`px;
405
+ padding-top: `).concat(o,`px;
406
+ padding-right: `).concat(c,`px;
407
+ margin-left:0;
408
+ margin-top:0;
409
+ margin-right: `).concat(d,"px ").concat(i,`;
410
+ `),r==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
411
+ }
412
+
413
+ .`).concat(Su,` {
414
+ right: `).concat(d,"px ").concat(i,`;
415
+ }
416
+
417
+ .`).concat(_u,` {
418
+ margin-right: `).concat(d,"px ").concat(i,`;
419
+ }
420
+
421
+ .`).concat(Su," .").concat(Su,` {
422
+ right: 0 `).concat(i,`;
423
+ }
424
+
425
+ .`).concat(_u," .").concat(_u,` {
426
+ margin-right: 0 `).concat(i,`;
427
+ }
428
+
429
+ body[`).concat(Ys,`] {
430
+ `).concat(tO,": ").concat(d,`px;
431
+ }
432
+ `)},Ox=function(){var e=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(e)?e:0},vO=function(){w.useEffect(function(){return document.body.setAttribute(Ys,(Ox()+1).toString()),function(){var e=Ox()-1;e<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,e.toString())}},[])},wO=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;vO();var o=w.useMemo(function(){return bO(s)},[s]);return w.createElement(yO,{styles:xO(o,!t,s,r?"":"!important")})},Bp=!1;if(typeof window<"u")try{var au=Object.defineProperty({},"passive",{get:function(){return Bp=!0,!0}});window.addEventListener("test",au,au),window.removeEventListener("test",au,au)}catch{Bp=!1}var Is=Bp?{passive:!1}:!1,EO=function(e){return e.tagName==="TEXTAREA"},bw=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!EO(e)&&r[t]==="visible")},SO=function(e){return bw(e,"overflowY")},_O=function(e){return bw(e,"overflowX")},Mx=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=yw(e,i);if(s){var o=xw(e,i),c=o[1],d=o[2];if(c>d)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},kO=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},NO=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},yw=function(e,t){return e==="v"?SO(t):_O(t)},xw=function(e,t){return e==="v"?kO(t):NO(t)},CO=function(e,t){return e==="h"&&t==="rtl"?-1:1},TO=function(e,t,r,i,s){var o=CO(e,window.getComputedStyle(t).direction),c=o*i,d=r.target,h=t.contains(d),f=!1,g=c>0,m=0,x=0;do{if(!d)break;var v=xw(e,d),E=v[0],S=v[1],_=v[2],N=S-_-o*E;(E||N)&&yw(e,d)&&(m+=N,x+=E);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&d!==document.body||h&&(t.contains(d)||t===d));return(g&&Math.abs(m)<1||!g&&Math.abs(x)<1)&&(f=!0),f},iu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dx=function(e){return[e.deltaX,e.deltaY]},jx=function(e){return e&&"current"in e?e.current:e},AO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},RO=function(e){return`
433
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
434
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
435
+ `)},OO=0,zs=[];function MO(e){var t=w.useRef([]),r=w.useRef([0,0]),i=w.useRef(),s=w.useState(OO++)[0],o=w.useState(gw)[0],c=w.useRef(e);w.useEffect(function(){c.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var S=JR([e.lockRef.current],(e.shards||[]).map(jx),!0).filter(Boolean);return S.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var d=w.useCallback(function(S,_){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var N=iu(S),T=r.current,C="deltaX"in S?S.deltaX:T[0]-N[0],j="deltaY"in S?S.deltaY:T[1]-N[1],D,A=S.target,P=Math.abs(C)>Math.abs(j)?"h":"v";if("touches"in S&&P==="h"&&A.type==="range")return!1;var K=window.getSelection(),X=K&&K.anchorNode,O=X?X===A||X.contains(A):!1;if(O)return!1;var U=Mx(P,A);if(!U)return!0;if(U?D=P:(D=P==="v"?"h":"v",U=Mx(P,A)),!U)return!1;if(!i.current&&"changedTouches"in S&&(C||j)&&(i.current=D),!D)return!0;var J=i.current||D;return TO(J,_,S,J==="h"?C:j)},[]),h=w.useCallback(function(S){var _=S;if(!(!zs.length||zs[zs.length-1]!==o)){var N="deltaY"in _?Dx(_):iu(_),T=t.current.filter(function(D){return D.name===_.type&&(D.target===_.target||_.target===D.shadowParent)&&AO(D.delta,N)})[0];if(T&&T.should){_.cancelable&&_.preventDefault();return}if(!T){var C=(c.current.shards||[]).map(jx).filter(Boolean).filter(function(D){return D.contains(_.target)}),j=C.length>0?d(_,C[0]):!c.current.noIsolation;j&&_.cancelable&&_.preventDefault()}}},[]),f=w.useCallback(function(S,_,N,T){var C={name:S,delta:_,target:N,should:T,shadowParent:DO(N)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(j){return j!==C})},1)},[]),g=w.useCallback(function(S){r.current=iu(S),i.current=void 0},[]),m=w.useCallback(function(S){f(S.type,Dx(S),S.target,d(S,e.lockRef.current))},[]),x=w.useCallback(function(S){f(S.type,iu(S),S.target,d(S,e.lockRef.current))},[]);w.useEffect(function(){return zs.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:x}),document.addEventListener("wheel",h,Is),document.addEventListener("touchmove",h,Is),document.addEventListener("touchstart",g,Is),function(){zs=zs.filter(function(S){return S!==o}),document.removeEventListener("wheel",h,Is),document.removeEventListener("touchmove",h,Is),document.removeEventListener("touchstart",g,Is)}},[]);var v=e.removeScrollBar,E=e.inert;return w.createElement(w.Fragment,null,E?w.createElement(o,{styles:RO(s)}):null,v?w.createElement(wO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function DO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jO=oO(mw,MO);var jm=w.forwardRef(function(e,t){return w.createElement(od,Wr({},e,{ref:t,sideCar:jO}))});jm.classNames=od.classNames;var LO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ps=new WeakMap,su=new WeakMap,lu={},Vh=0,vw=function(e){return e&&(e.host||vw(e.parentNode))},IO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=vw(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},zO=function(e,t,r,i){var s=IO(t,Array.isArray(e)?e:[e]);lu[r]||(lu[r]=new WeakMap);var o=lu[r],c=[],d=new Set,h=new Set(s),f=function(m){!m||d.has(m)||(d.add(m),f(m.parentNode))};s.forEach(f);var g=function(m){!m||h.has(m)||Array.prototype.forEach.call(m.children,function(x){if(d.has(x))g(x);else try{var v=x.getAttribute(i),E=v!==null&&v!=="false",S=(Ps.get(x)||0)+1,_=(o.get(x)||0)+1;Ps.set(x,S),o.set(x,_),c.push(x),S===1&&E&&su.set(x,!0),_===1&&x.setAttribute(r,"true"),E||x.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return g(t),d.clear(),Vh++,function(){c.forEach(function(m){var x=Ps.get(m)-1,v=o.get(m)-1;Ps.set(m,x),o.set(m,v),x||(su.has(m)||m.removeAttribute(i),su.delete(m)),v||m.removeAttribute(r)}),Vh--,Vh||(Ps=new WeakMap,Ps=new WeakMap,su=new WeakMap,lu={})}},ww=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=LO(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),zO(i,s,r,"aria-hidden")):function(){return null}},cd="Dialog",[Ew]=sd(cd),[PO,Br]=Ew(cd),Sw=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:s,onOpenChange:o,modal:c=!0}=e,d=w.useRef(null),h=w.useRef(null),[f,g]=zp({prop:i,defaultProp:s??!1,onChange:o,caller:cd});return p.jsx(PO,{scope:t,triggerRef:d,contentRef:h,contentId:Vs(),titleId:Vs(),descriptionId:Vs(),open:f,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(m=>!m),[g]),modal:c,children:r})};Sw.displayName=cd;var _w="DialogTrigger",BO=w.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Br(_w,r),o=cn(t,s.triggerRef);return p.jsx(qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":zm(s.open),...i,ref:o,onClick:Yt(e.onClick,s.onOpenToggle)})});BO.displayName=_w;var Lm="DialogPortal",[UO,kw]=Ew(Lm,{forceMount:void 0}),Nw=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:s}=e,o=Br(Lm,t);return p.jsx(UO,{scope:t,forceMount:r,children:w.Children.map(i,c=>p.jsx(ld,{present:r||o.open,children:p.jsx(Dm,{asChild:!0,container:s,children:c})}))})};Nw.displayName=Lm;var Mu="DialogOverlay",Cw=w.forwardRef((e,t)=>{const r=kw(Mu,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,o=Br(Mu,e.__scopeDialog);return o.modal?p.jsx(ld,{present:i||o.open,children:p.jsx($O,{...s,ref:t})}):null});Cw.displayName=Mu;var FO=_o("DialogOverlay.RemoveScroll"),$O=w.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Br(Mu,r);return p.jsx(jm,{as:FO,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx(qt.div,{"data-state":zm(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),qi="DialogContent",Tw=w.forwardRef((e,t)=>{const r=kw(qi,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,o=Br(qi,e.__scopeDialog);return p.jsx(ld,{present:i||o.open,children:o.modal?p.jsx(HO,{...s,ref:t}):p.jsx(KO,{...s,ref:t})})});Tw.displayName=qi;var HO=w.forwardRef((e,t)=>{const r=Br(qi,e.__scopeDialog),i=w.useRef(null),s=cn(t,r.contentRef,i);return w.useEffect(()=>{const o=i.current;if(o)return ww(o)},[]),p.jsx(Aw,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yt(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Yt(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&o.preventDefault()}),onFocusOutside:Yt(e.onFocusOutside,o=>o.preventDefault())})}),KO=w.forwardRef((e,t)=>{const r=Br(qi,e.__scopeDialog),i=w.useRef(!1),s=w.useRef(!1);return p.jsx(Aw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(i.current||(d=r.triggerRef.current)==null||d.focus(),o.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:o=>{var h,f;(h=e.onInteractOutside)==null||h.call(e,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=o.target;((f=r.triggerRef.current)==null?void 0:f.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Aw=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,...c}=e,d=Br(qi,r),h=w.useRef(null),f=cn(t,h);return fw(),p.jsxs(p.Fragment,{children:[p.jsx(Mm,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:o,children:p.jsx(Om,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":zm(d.open),...c,ref:f,onDismiss:()=>d.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(GO,{titleId:d.titleId}),p.jsx(YO,{contentRef:h,descriptionId:d.descriptionId})]})]})}),Im="DialogTitle",Rw=w.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Br(Im,r);return p.jsx(qt.h2,{id:s.titleId,...i,ref:t})});Rw.displayName=Im;var Ow="DialogDescription",qO=w.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Br(Ow,r);return p.jsx(qt.p,{id:s.descriptionId,...i,ref:t})});qO.displayName=Ow;var Mw="DialogClose",Dw=w.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=Br(Mw,r);return p.jsx(qt.button,{type:"button",...i,ref:t,onClick:Yt(e.onClick,()=>s.onOpenChange(!1))})});Dw.displayName=Mw;function zm(e){return e?"open":"closed"}var jw="DialogTitleWarning",[jF,Lw]=vR(jw,{contentName:qi,titleName:Im,docsSlug:"dialog"}),GO=({titleId:e})=>{const t=Lw(jw),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
436
+
437
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
438
+
439
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},VO="DialogDescriptionWarning",YO=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lw(VO).contentName}}.`;return w.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},WO=Sw,XO=Nw,QO=Cw,ZO=Tw,JO=Rw,eM=Dw;function Lr({open:e,onClose:t,title:r,children:i,className:s}){return p.jsx(WO,{open:e,onOpenChange:o=>{o||t()},children:p.jsxs(XO,{children:[p.jsx(QO,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-fade-in"}),p.jsxs(ZO,{className:He("fixed inset-x-4 top-1/2 z-50 grid max-h-[calc(100dvh-2rem)] max-w-lg -translate-y-1/2 gap-4 overflow-y-auto","rounded-lg border bg-popover p-5 text-popover-foreground shadow-lg outline-none sm:left-1/2 sm:right-auto sm:w-[calc(100%-2rem)] sm:-translate-x-1/2 sm:p-6",s),children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(JO,{className:"text-lg font-semibold leading-none tracking-tight",children:r}),p.jsx(eM,{className:He("rounded-sm p-1 opacity-70 transition-opacity hover:opacity-100","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-label":"Close",children:p.jsx(Ap,{size:18})})]}),i]})]})})}function Lx(e,[t,r]){return Math.min(r,Math.max(t,e))}function tM(e){const t=e+"CollectionProvider",[r,i]=sd(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:_,children:N}=S,T=kt.useRef(null),C=kt.useRef(new Map).current;return p.jsx(s,{scope:_,itemMap:C,collectionRef:T,children:N})};c.displayName=t;const d=e+"CollectionSlot",h=_o(d),f=kt.forwardRef((S,_)=>{const{scope:N,children:T}=S,C=o(d,N),j=cn(_,C.collectionRef);return p.jsx(h,{ref:j,children:T})});f.displayName=d;const g=e+"CollectionItemSlot",m="data-radix-collection-item",x=_o(g),v=kt.forwardRef((S,_)=>{const{scope:N,children:T,...C}=S,j=kt.useRef(null),D=cn(_,j),A=o(g,N);return kt.useEffect(()=>(A.itemMap.set(j,{ref:j,...C}),()=>void A.itemMap.delete(j))),p.jsx(x,{[m]:"",ref:D,children:T})});v.displayName=g;function E(S){const _=o(e+"CollectionConsumer",S);return kt.useCallback(()=>{const T=_.collectionRef.current;if(!T)return[];const C=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((A,P)=>C.indexOf(A.ref.current)-C.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:c,Slot:f,ItemSlot:v},E,i]}var nM=w.createContext(void 0);function rM(e){const t=w.useContext(nM);return e||t||"ltr"}const aM=["top","right","bottom","left"],hi=Math.min,cr=Math.max,Du=Math.round,ou=Math.floor,ea=e=>({x:e,y:e}),iM={left:"right",right:"left",bottom:"top",top:"bottom"};function Up(e,t,r){return cr(e,hi(t,r))}function Ta(e,t){return typeof e=="function"?e(t):e}function Aa(e){return e.split("-")[0]}function al(e){return e.split("-")[1]}function Pm(e){return e==="x"?"y":"x"}function Bm(e){return e==="y"?"height":"width"}function Xr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Um(e){return Pm(Xr(e))}function sM(e,t,r){r===void 0&&(r=!1);const i=al(e),s=Um(e),o=Bm(s);let c=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=ju(c)),[c,ju(c)]}function lM(e){const t=ju(e);return[Fp(e),t,Fp(t)]}function Fp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ix=["left","right"],zx=["right","left"],oM=["top","bottom"],cM=["bottom","top"];function uM(e,t,r){switch(e){case"top":case"bottom":return r?t?zx:Ix:t?Ix:zx;case"left":case"right":return t?oM:cM;default:return[]}}function dM(e,t,r,i){const s=al(e);let o=uM(Aa(e),r==="start",i);return s&&(o=o.map(c=>c+"-"+s),t&&(o=o.concat(o.map(Fp)))),o}function ju(e){const t=Aa(e);return iM[t]+e.slice(t.length)}function fM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Iw(e){return typeof e!="number"?fM(e):{top:e,right:e,bottom:e,left:e}}function Lu(e){const{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function Px(e,t,r){let{reference:i,floating:s}=e;const o=Xr(t),c=Um(t),d=Bm(c),h=Aa(t),f=o==="y",g=i.x+i.width/2-s.width/2,m=i.y+i.height/2-s.height/2,x=i[d]/2-s[d]/2;let v;switch(h){case"top":v={x:g,y:i.y-s.height};break;case"bottom":v={x:g,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-s.width,y:m};break;default:v={x:i.x,y:i.y}}switch(al(t)){case"start":v[c]-=x*(r&&f?-1:1);break;case"end":v[c]+=x*(r&&f?-1:1);break}return v}async function hM(e,t){var r;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:h}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:x=!1,padding:v=0}=Ta(t,e),E=Iw(v),_=d[x?m==="floating"?"reference":"floating":m],N=Lu(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(_)))==null||r?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:g,strategy:h})),T=m==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),j=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},D=Lu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:C,strategy:h}):T);return{top:(N.top-D.top+E.top)/j.y,bottom:(D.bottom-N.bottom+E.bottom)/j.y,left:(N.left-D.left+E.left)/j.x,right:(D.right-N.right+E.right)/j.x}}const pM=50,mM=async(e,t,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=r,d=c.detectOverflow?c:{...c,detectOverflow:hM},h=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:m}=Px(f,i,h),x=i,v=0;const E={};for(let S=0;S<o.length;S++){const _=o[S];if(!_)continue;const{name:N,fn:T}=_,{x:C,y:j,data:D,reset:A}=await T({x:g,y:m,initialPlacement:i,placement:x,strategy:s,middlewareData:E,rects:f,platform:d,elements:{reference:e,floating:t}});g=C??g,m=j??m,E[N]={...E[N],...D},A&&v<pM&&(v++,typeof A=="object"&&(A.placement&&(x=A.placement),A.rects&&(f=A.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:g,y:m}=Px(f,x,h)),S=-1)}return{x:g,y:m,placement:x,strategy:s,middlewareData:E}},gM=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:s,rects:o,platform:c,elements:d,middlewareData:h}=t,{element:f,padding:g=0}=Ta(e,t)||{};if(f==null)return{};const m=Iw(g),x={x:r,y:i},v=Um(s),E=Bm(v),S=await c.getDimensions(f),_=v==="y",N=_?"top":"left",T=_?"bottom":"right",C=_?"clientHeight":"clientWidth",j=o.reference[E]+o.reference[v]-x[v]-o.floating[E],D=x[v]-o.reference[v],A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let P=A?A[C]:0;(!P||!await(c.isElement==null?void 0:c.isElement(A)))&&(P=d.floating[C]||o.floating[E]);const K=j/2-D/2,X=P/2-S[E]/2-1,O=hi(m[N],X),U=hi(m[T],X),J=O,ce=P-S[E]-U,q=P/2-S[E]/2+K,$=Up(J,q,ce),I=!h.arrow&&al(s)!=null&&q!==$&&o.reference[E]/2-(q<J?O:U)-S[E]/2<0,W=I?q<J?q-J:q-ce:0;return{[v]:x[v]+W,data:{[v]:$,centerOffset:q-$-W,...I&&{alignmentOffset:W}},reset:I}}}),bM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:s,middlewareData:o,rects:c,initialPlacement:d,platform:h,elements:f}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,..._}=Ta(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const N=Aa(s),T=Xr(d),C=Aa(d)===d,j=await(h.isRTL==null?void 0:h.isRTL(f.floating)),D=x||(C||!S?[ju(d)]:lM(d)),A=E!=="none";!x&&A&&D.push(...dM(d,S,E,j));const P=[d,...D],K=await h.detectOverflow(t,_),X=[];let O=((i=o.flip)==null?void 0:i.overflows)||[];if(g&&X.push(K[N]),m){const q=sM(s,c,j);X.push(K[q[0]],K[q[1]])}if(O=[...O,{placement:s,overflows:X}],!X.every(q=>q<=0)){var U,J;const q=(((U=o.flip)==null?void 0:U.index)||0)+1,$=P[q];if($&&(!(m==="alignment"?T!==Xr($):!1)||O.every(Q=>Xr(Q.placement)===T?Q.overflows[0]>0:!0)))return{data:{index:q,overflows:O},reset:{placement:$}};let I=(J=O.filter(W=>W.overflows[0]<=0).sort((W,Q)=>W.overflows[1]-Q.overflows[1])[0])==null?void 0:J.placement;if(!I)switch(v){case"bestFit":{var ce;const W=(ce=O.filter(Q=>{if(A){const Y=Xr(Q.placement);return Y===T||Y==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(Y=>Y>0).reduce((Y,L)=>Y+L,0)]).sort((Q,Y)=>Q[1]-Y[1])[0])==null?void 0:ce[0];W&&(I=W);break}case"initialPlacement":I=d;break}if(s!==I)return{reset:{placement:I}}}return{}}}};function Bx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ux(e){return aM.some(t=>e[t]>=0)}const yM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:i}=t,{strategy:s="referenceHidden",...o}=Ta(e,t);switch(s){case"referenceHidden":{const c=await i.detectOverflow(t,{...o,elementContext:"reference"}),d=Bx(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Ux(d)}}}case"escaped":{const c=await i.detectOverflow(t,{...o,altBoundary:!0}),d=Bx(c,r.floating);return{data:{escapedOffsets:d,escaped:Ux(d)}}}default:return{}}}}},zw=new Set(["left","top"]);async function xM(e,t){const{placement:r,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=Aa(r),d=al(r),h=Xr(r)==="y",f=zw.has(c)?-1:1,g=o&&h?-1:1,m=Ta(t,e);let{mainAxis:x,crossAxis:v,alignmentAxis:E}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof E=="number"&&(v=d==="end"?E*-1:E),h?{x:v*g,y:x*f}:{x:x*f,y:v*g}}const vM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:s,y:o,placement:c,middlewareData:d}=t,h=await xM(t,e);return c===((r=d.offset)==null?void 0:r.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:o+h.y,data:{...h,placement:c}}}}},wM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:s,platform:o}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:h={fn:N=>{let{x:T,y:C}=N;return{x:T,y:C}}},...f}=Ta(e,t),g={x:r,y:i},m=await o.detectOverflow(t,f),x=Xr(Aa(s)),v=Pm(x);let E=g[v],S=g[x];if(c){const N=v==="y"?"top":"left",T=v==="y"?"bottom":"right",C=E+m[N],j=E-m[T];E=Up(C,E,j)}if(d){const N=x==="y"?"top":"left",T=x==="y"?"bottom":"right",C=S+m[N],j=S-m[T];S=Up(C,S,j)}const _=h.fn({...t,[v]:E,[x]:S});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[v]:c,[x]:d}}}}}},EM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:s,rects:o,middlewareData:c}=t,{offset:d=0,mainAxis:h=!0,crossAxis:f=!0}=Ta(e,t),g={x:r,y:i},m=Xr(s),x=Pm(m);let v=g[x],E=g[m];const S=Ta(d,t),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const C=x==="y"?"height":"width",j=o.reference[x]-o.floating[C]+_.mainAxis,D=o.reference[x]+o.reference[C]-_.mainAxis;v<j?v=j:v>D&&(v=D)}if(f){var N,T;const C=x==="y"?"width":"height",j=zw.has(Aa(s)),D=o.reference[m]-o.floating[C]+(j&&((N=c.offset)==null?void 0:N[m])||0)+(j?0:_.crossAxis),A=o.reference[m]+o.reference[C]+(j?0:((T=c.offset)==null?void 0:T[m])||0)-(j?_.crossAxis:0);E<D?E=D:E>A&&(E=A)}return{[x]:v,[m]:E}}}},SM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:s,rects:o,platform:c,elements:d}=t,{apply:h=()=>{},...f}=Ta(e,t),g=await c.detectOverflow(t,f),m=Aa(s),x=al(s),v=Xr(s)==="y",{width:E,height:S}=o.floating;let _,N;m==="top"||m==="bottom"?(_=m,N=x===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(N=m,_=x==="end"?"top":"bottom");const T=S-g.top-g.bottom,C=E-g.left-g.right,j=hi(S-g[_],T),D=hi(E-g[N],C),A=!t.middlewareData.shift;let P=j,K=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(K=C),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(P=T),A&&!x){const O=cr(g.left,0),U=cr(g.right,0),J=cr(g.top,0),ce=cr(g.bottom,0);v?K=E-2*(O!==0||U!==0?O+U:cr(g.left,g.right)):P=S-2*(J!==0||ce!==0?J+ce:cr(g.top,g.bottom))}await h({...t,availableWidth:K,availableHeight:P});const X=await c.getDimensions(d.floating);return E!==X.width||S!==X.height?{reset:{rects:!0}}:{}}}};function ud(){return typeof window<"u"}function il(e){return Pw(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ta(e){var t;return(t=(Pw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pw(e){return ud()?e instanceof Node||e instanceof ur(e).Node:!1}function Ir(e){return ud()?e instanceof Element||e instanceof ur(e).Element:!1}function Ra(e){return ud()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Fx(e){return!ud()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}function Io(e){const{overflow:t,overflowX:r,overflowY:i,display:s}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&s!=="inline"&&s!=="contents"}function _M(e){return/^(table|td|th)$/.test(il(e))}function dd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kM=/transform|translate|scale|rotate|perspective|filter/,NM=/paint|layout|strict|content/,Pi=e=>!!e&&e!=="none";let Yh;function Fm(e){const t=Ir(e)?zr(e):e;return Pi(t.transform)||Pi(t.translate)||Pi(t.scale)||Pi(t.rotate)||Pi(t.perspective)||!$m()&&(Pi(t.backdropFilter)||Pi(t.filter))||kM.test(t.willChange||"")||NM.test(t.contain||"")}function CM(e){let t=pi(e);for(;Ra(t)&&!Js(t);){if(Fm(t))return t;if(dd(t))return null;t=pi(t)}return null}function $m(){return Yh==null&&(Yh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yh}function Js(e){return/^(html|body|#document)$/.test(il(e))}function zr(e){return ur(e).getComputedStyle(e)}function fd(e){return Ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pi(e){if(il(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fx(e)&&e.host||ta(e);return Fx(t)?t.host:t}function Bw(e){const t=pi(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ra(t)&&Io(t)?t:Bw(t)}function ko(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Bw(e),o=s===((i=e.ownerDocument)==null?void 0:i.body),c=ur(s);if(o){const d=$p(c);return t.concat(c,c.visualViewport||[],Io(s)?s:[],d&&r?ko(d):[])}else return t.concat(s,ko(s,[],r))}function $p(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uw(e){const t=zr(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Ra(e),o=s?e.offsetWidth:r,c=s?e.offsetHeight:i,d=Du(r)!==o||Du(i)!==c;return d&&(r=o,i=c),{width:r,height:i,$:d}}function Hm(e){return Ir(e)?e:e.contextElement}function Ws(e){const t=Hm(e);if(!Ra(t))return ea(1);const r=t.getBoundingClientRect(),{width:i,height:s,$:o}=Uw(t);let c=(o?Du(r.width):r.width)/i,d=(o?Du(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const TM=ea(0);function Fw(e){const t=ur(e);return!$m()||!t.visualViewport?TM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AM(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function Gi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Hm(e);let c=ea(1);t&&(i?Ir(i)&&(c=Ws(i)):c=Ws(e));const d=AM(o,r,i)?Fw(o):ea(0);let h=(s.left+d.x)/c.x,f=(s.top+d.y)/c.y,g=s.width/c.x,m=s.height/c.y;if(o){const x=ur(o),v=i&&Ir(i)?ur(i):i;let E=x,S=$p(E);for(;S&&i&&v!==E;){const _=Ws(S),N=S.getBoundingClientRect(),T=zr(S),C=N.left+(S.clientLeft+parseFloat(T.paddingLeft))*_.x,j=N.top+(S.clientTop+parseFloat(T.paddingTop))*_.y;h*=_.x,f*=_.y,g*=_.x,m*=_.y,h+=C,f+=j,E=ur(S),S=$p(E)}}return Lu({width:g,height:m,x:h,y:f})}function hd(e,t){const r=fd(e).scrollLeft;return t?t.left+r:Gi(ta(e)).left+r}function $w(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-hd(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function RM(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e;const o=s==="fixed",c=ta(i),d=t?dd(t.floating):!1;if(i===c||d&&o)return r;let h={scrollLeft:0,scrollTop:0},f=ea(1);const g=ea(0),m=Ra(i);if((m||!m&&!o)&&((il(i)!=="body"||Io(c))&&(h=fd(i)),m)){const v=Gi(i);f=Ws(i),g.x=v.x+i.clientLeft,g.y=v.y+i.clientTop}const x=c&&!m&&!o?$w(c,h):ea(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-h.scrollLeft*f.x+g.x+x.x,y:r.y*f.y-h.scrollTop*f.y+g.y+x.y}}function OM(e){return Array.from(e.getClientRects())}function MM(e){const t=ta(e),r=fd(e),i=e.ownerDocument.body,s=cr(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=cr(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+hd(e);const d=-r.scrollTop;return zr(i).direction==="rtl"&&(c+=cr(t.clientWidth,i.clientWidth)-s),{width:s,height:o,x:c,y:d}}const $x=25;function DM(e,t){const r=ur(e),i=ta(e),s=r.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,h=0;if(s){o=s.width,c=s.height;const g=$m();(!g||g&&t==="fixed")&&(d=s.offsetLeft,h=s.offsetTop)}const f=hd(i);if(f<=0){const g=i.ownerDocument,m=g.body,x=getComputedStyle(m),v=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,E=Math.abs(i.clientWidth-m.clientWidth-v);E<=$x&&(o-=E)}else f<=$x&&(o+=f);return{width:o,height:c,x:d,y:h}}function jM(e,t){const r=Gi(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,o=Ra(e)?Ws(e):ea(1),c=e.clientWidth*o.x,d=e.clientHeight*o.y,h=s*o.x,f=i*o.y;return{width:c,height:d,x:h,y:f}}function Hx(e,t,r){let i;if(t==="viewport")i=DM(e,r);else if(t==="document")i=MM(ta(e));else if(Ir(t))i=jM(t,r);else{const s=Fw(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Lu(i)}function Hw(e,t){const r=pi(e);return r===t||!Ir(r)||Js(r)?!1:zr(r).position==="fixed"||Hw(r,t)}function LM(e,t){const r=t.get(e);if(r)return r;let i=ko(e,[],!1).filter(d=>Ir(d)&&il(d)!=="body"),s=null;const o=zr(e).position==="fixed";let c=o?pi(e):e;for(;Ir(c)&&!Js(c);){const d=zr(c),h=Fm(c);!h&&d.position==="fixed"&&(s=null),(o?!h&&!s:!h&&d.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Io(c)&&!h&&Hw(e,c))?i=i.filter(g=>g!==c):s=d,c=pi(c)}return t.set(e,i),i}function IM(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e;const c=[...r==="clippingAncestors"?dd(t)?[]:LM(t,this._c):[].concat(r),i],d=Hx(t,c[0],s);let h=d.top,f=d.right,g=d.bottom,m=d.left;for(let x=1;x<c.length;x++){const v=Hx(t,c[x],s);h=cr(v.top,h),f=hi(v.right,f),g=hi(v.bottom,g),m=cr(v.left,m)}return{width:f-m,height:g-h,x:m,y:h}}function zM(e){const{width:t,height:r}=Uw(e);return{width:t,height:r}}function PM(e,t,r){const i=Ra(t),s=ta(t),o=r==="fixed",c=Gi(e,!0,o,t);let d={scrollLeft:0,scrollTop:0};const h=ea(0);function f(){h.x=hd(s)}if(i||!i&&!o)if((il(t)!=="body"||Io(s))&&(d=fd(t)),i){const v=Gi(t,!0,o,t);h.x=v.x+t.clientLeft,h.y=v.y+t.clientTop}else s&&f();o&&!i&&s&&f();const g=s&&!i&&!o?$w(s,d):ea(0),m=c.left+d.scrollLeft-h.x-g.x,x=c.top+d.scrollTop-h.y-g.y;return{x:m,y:x,width:c.width,height:c.height}}function Wh(e){return zr(e).position==="static"}function Kx(e,t){if(!Ra(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ta(e)===r&&(r=r.ownerDocument.body),r}function Kw(e,t){const r=ur(e);if(dd(e))return r;if(!Ra(e)){let s=pi(e);for(;s&&!Js(s);){if(Ir(s)&&!Wh(s))return s;s=pi(s)}return r}let i=Kx(e,t);for(;i&&_M(i)&&Wh(i);)i=Kx(i,t);return i&&Js(i)&&Wh(i)&&!Fm(i)?r:i||CM(e)||r}const BM=async function(e){const t=this.getOffsetParent||Kw,r=this.getDimensions,i=await r(e.floating);return{reference:PM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function UM(e){return zr(e).direction==="rtl"}const FM={convertOffsetParentRelativeRectToViewportRelativeRect:RM,getDocumentElement:ta,getClippingRect:IM,getOffsetParent:Kw,getElementRects:BM,getClientRects:OM,getDimensions:zM,getScale:Ws,isElement:Ir,isRTL:UM};function qw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $M(e,t){let r=null,i;const s=ta(e);function o(){var d;clearTimeout(i),(d=r)==null||d.disconnect(),r=null}function c(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),o();const f=e.getBoundingClientRect(),{left:g,top:m,width:x,height:v}=f;if(d||t(),!x||!v)return;const E=ou(m),S=ou(s.clientWidth-(g+x)),_=ou(s.clientHeight-(m+v)),N=ou(g),C={rootMargin:-E+"px "+-S+"px "+-_+"px "+-N+"px",threshold:cr(0,hi(1,h))||1};let j=!0;function D(A){const P=A[0].intersectionRatio;if(P!==h){if(!j)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!qw(f,e.getBoundingClientRect())&&c(),j=!1}try{r=new IntersectionObserver(D,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(D,C)}r.observe(e)}return c(!0),o}function HM(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,f=Hm(e),g=s||o?[...f?ko(f):[],...t?ko(t):[]]:[];g.forEach(N=>{s&&N.addEventListener("scroll",r,{passive:!0}),o&&N.addEventListener("resize",r)});const m=f&&d?$M(f,r):null;let x=-1,v=null;c&&(v=new ResizeObserver(N=>{let[T]=N;T&&T.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),f&&!h&&v.observe(f),t&&v.observe(t));let E,S=h?Gi(e):null;h&&_();function _(){const N=Gi(e);S&&!qw(S,N)&&r(),S=N,E=requestAnimationFrame(_)}return r(),()=>{var N;g.forEach(T=>{s&&T.removeEventListener("scroll",r),o&&T.removeEventListener("resize",r)}),m==null||m(),(N=v)==null||N.disconnect(),v=null,h&&cancelAnimationFrame(E)}}const KM=vM,qM=wM,GM=bM,VM=SM,YM=yM,qx=gM,WM=EM,XM=(e,t,r)=>{const i=new Map,s={platform:FM,...r},o={...s.platform,_c:i};return mM(e,t,{...s,platform:o})};var QM=typeof document<"u",ZM=function(){},ku=QM?w.useLayoutEffect:ZM;function Iu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!Iu(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){const o=s[i];if(!(o==="_owner"&&e.$$typeof)&&!Iu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Gw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gx(e,t){const r=Gw(e);return Math.round(t*r)/r}function Xh(e){const t=w.useRef(e);return ku(()=>{t.current=e}),t}function JM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:o,floating:c}={},transform:d=!0,whileElementsMounted:h,open:f}=e,[g,m]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[x,v]=w.useState(i);Iu(x,i)||v(i);const[E,S]=w.useState(null),[_,N]=w.useState(null),T=w.useCallback(Q=>{Q!==A.current&&(A.current=Q,S(Q))},[]),C=w.useCallback(Q=>{Q!==P.current&&(P.current=Q,N(Q))},[]),j=o||E,D=c||_,A=w.useRef(null),P=w.useRef(null),K=w.useRef(g),X=h!=null,O=Xh(h),U=Xh(s),J=Xh(f),ce=w.useCallback(()=>{if(!A.current||!P.current)return;const Q={placement:t,strategy:r,middleware:x};U.current&&(Q.platform=U.current),XM(A.current,P.current,Q).then(Y=>{const L={...Y,isPositioned:J.current!==!1};q.current&&!Iu(K.current,L)&&(K.current=L,Lo.flushSync(()=>{m(L)}))})},[x,t,r,U,J]);ku(()=>{f===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,m(Q=>({...Q,isPositioned:!1})))},[f]);const q=w.useRef(!1);ku(()=>(q.current=!0,()=>{q.current=!1}),[]),ku(()=>{if(j&&(A.current=j),D&&(P.current=D),j&&D){if(O.current)return O.current(j,D,ce);ce()}},[j,D,ce,O,X]);const $=w.useMemo(()=>({reference:A,floating:P,setReference:T,setFloating:C}),[T,C]),I=w.useMemo(()=>({reference:j,floating:D}),[j,D]),W=w.useMemo(()=>{const Q={position:r,left:0,top:0};if(!I.floating)return Q;const Y=Gx(I.floating,g.x),L=Gx(I.floating,g.y);return d?{...Q,transform:"translate("+Y+"px, "+L+"px)",...Gw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Y,top:L}},[r,d,I.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:ce,refs:$,elements:I,floatingStyles:W}),[g,ce,$,I,W])}const eD=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:s}=typeof e=="function"?e(r):e;return i&&t(i)?i.current!=null?qx({element:i.current,padding:s}).fn(r):{}:i?qx({element:i,padding:s}).fn(r):{}}}},tD=(e,t)=>{const r=KM(e);return{name:r.name,fn:r.fn,options:[e,t]}},nD=(e,t)=>{const r=qM(e);return{name:r.name,fn:r.fn,options:[e,t]}},rD=(e,t)=>({fn:WM(e).fn,options:[e,t]}),aD=(e,t)=>{const r=GM(e);return{name:r.name,fn:r.fn,options:[e,t]}},iD=(e,t)=>{const r=VM(e);return{name:r.name,fn:r.fn,options:[e,t]}},sD=(e,t)=>{const r=YM(e);return{name:r.name,fn:r.fn,options:[e,t]}},lD=(e,t)=>{const r=eD(e);return{name:r.name,fn:r.fn,options:[e,t]}};var oD="Arrow",Vw=w.forwardRef((e,t)=>{const{children:r,width:i=10,height:s=5,...o}=e;return p.jsx(qt.svg,{...o,ref:t,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vw.displayName=oD;var cD=Vw;function uD(e){const[t,r]=w.useState(void 0);return On(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let c,d;if("borderBoxSize"in o){const h=o.borderBoxSize,f=Array.isArray(h)?h[0]:h;c=f.inlineSize,d=f.blockSize}else c=e.offsetWidth,d=e.offsetHeight;r({width:c,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}var Km="Popper",[Yw,Ww]=sd(Km),[dD,Xw]=Yw(Km),Qw=e=>{const{__scopePopper:t,children:r}=e,[i,s]=w.useState(null);return p.jsx(dD,{scope:t,anchor:i,onAnchorChange:s,children:r})};Qw.displayName=Km;var Zw="PopperAnchor",Jw=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:i,...s}=e,o=Xw(Zw,r),c=w.useRef(null),d=cn(t,c),h=w.useRef(null);return w.useEffect(()=>{const f=h.current;h.current=(i==null?void 0:i.current)||c.current,f!==h.current&&o.onAnchorChange(h.current)}),i?null:p.jsx(qt.div,{...s,ref:d})});Jw.displayName=Zw;var qm="PopperContent",[fD,hD]=Yw(qm),eE=w.forwardRef((e,t)=>{var re,be,Ce,ke,Ne,$e;const{__scopePopper:r,side:i="bottom",sideOffset:s=0,align:o="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:f=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:v="optimized",onPlaced:E,...S}=e,_=Xw(qm,r),[N,T]=w.useState(null),C=cn(t,Je=>T(Je)),[j,D]=w.useState(null),A=uD(j),P=(A==null?void 0:A.width)??0,K=(A==null?void 0:A.height)??0,X=i+(o!=="center"?"-"+o:""),O=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},U=Array.isArray(f)?f:[f],J=U.length>0,ce={padding:O,boundary:U.filter(mD),altBoundary:J},{refs:q,floatingStyles:$,placement:I,isPositioned:W,middlewareData:Q}=JM({strategy:"fixed",placement:X,whileElementsMounted:(...Je)=>HM(...Je,{animationFrame:v==="always"}),elements:{reference:_.anchor},middleware:[tD({mainAxis:s+K,alignmentAxis:c}),h&&nD({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rD():void 0,...ce}),h&&aD({...ce}),iD({...ce,apply:({elements:Je,rects:Pe,availableWidth:Tt,availableHeight:Be})=>{const{width:Qe,height:bt}=Pe.reference,te=Je.floating.style;te.setProperty("--radix-popper-available-width",`${Tt}px`),te.setProperty("--radix-popper-available-height",`${Be}px`),te.setProperty("--radix-popper-anchor-width",`${Qe}px`),te.setProperty("--radix-popper-anchor-height",`${bt}px`)}}),j&&lD({element:j,padding:d}),gD({arrowWidth:P,arrowHeight:K}),x&&sD({strategy:"referenceHidden",...ce})]}),[Y,L]=rE(I),z=Ki(E);On(()=>{W&&(z==null||z())},[W,z]);const V=(re=Q.arrow)==null?void 0:re.x,R=(be=Q.arrow)==null?void 0:be.y,ee=((Ce=Q.arrow)==null?void 0:Ce.centerOffset)!==0,[ge,oe]=w.useState();return On(()=>{N&&oe(window.getComputedStyle(N).zIndex)},[N]),p.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:W?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(ke=Q.transformOrigin)==null?void 0:ke.x,(Ne=Q.transformOrigin)==null?void 0:Ne.y].join(" "),...(($e=Q.hide)==null?void 0:$e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(fD,{scope:r,placedSide:Y,onArrowChange:D,arrowX:V,arrowY:R,shouldHideArrow:ee,children:p.jsx(qt.div,{"data-side":Y,"data-align":L,...S,ref:C,style:{...S.style,animation:W?void 0:"none"}})})})});eE.displayName=qm;var tE="PopperArrow",pD={top:"bottom",right:"left",bottom:"top",left:"right"},nE=w.forwardRef(function(t,r){const{__scopePopper:i,...s}=t,o=hD(tE,i),c=pD[o.placedSide];return p.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:p.jsx(cD,{...s,ref:r,style:{...s.style,display:"block"}})})});nE.displayName=tE;function mD(e){return e!==null}var gD=e=>({name:"transformOrigin",options:e,fn(t){var _,N,T;const{placement:r,rects:i,middlewareData:s}=t,c=((_=s.arrow)==null?void 0:_.centerOffset)!==0,d=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[f,g]=rE(r),m={start:"0%",center:"50%",end:"100%"}[g],x=(((N=s.arrow)==null?void 0:N.x)??0)+d/2,v=(((T=s.arrow)==null?void 0:T.y)??0)+h/2;let E="",S="";return f==="bottom"?(E=c?m:`${x}px`,S=`${-h}px`):f==="top"?(E=c?m:`${x}px`,S=`${i.floating.height+h}px`):f==="right"?(E=`${-h}px`,S=c?m:`${v}px`):f==="left"&&(E=`${i.floating.width+h}px`,S=c?m:`${v}px`),{data:{x:E,y:S}}}});function rE(e){const[t,r="center"]=e.split("-");return[t,r]}var bD=Qw,yD=Jw,xD=eE,vD=nE;function wD(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var aE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ED="VisuallyHidden",SD=w.forwardRef((e,t)=>p.jsx(qt.span,{...e,ref:t,style:{...aE,...e.style}}));SD.displayName=ED;var _D=[" ","Enter","ArrowUp","ArrowDown"],kD=[" ","Enter"],Vi="Select",[pd,md,ND]=tM(Vi),[sl]=sd(Vi,[ND,Ww]),gd=Ww(),[CD,mi]=sl(Vi),[TD,AD]=sl(Vi),iE=e=>{const{__scopeSelect:t,children:r,open:i,defaultOpen:s,onOpenChange:o,value:c,defaultValue:d,onValueChange:h,dir:f,name:g,autoComplete:m,disabled:x,required:v,form:E}=e,S=gd(t),[_,N]=w.useState(null),[T,C]=w.useState(null),[j,D]=w.useState(!1),A=rM(f),[P,K]=zp({prop:i,defaultProp:s??!1,onChange:o,caller:Vi}),[X,O]=zp({prop:c,defaultProp:d,onChange:h,caller:Vi}),U=w.useRef(null),J=_?E||!!_.closest("form"):!0,[ce,q]=w.useState(new Set),$=Array.from(ce).map(I=>I.props.value).join(";");return p.jsx(bD,{...S,children:p.jsxs(CD,{required:v,scope:t,trigger:_,onTriggerChange:N,valueNode:T,onValueNodeChange:C,valueNodeHasChildren:j,onValueNodeHasChildrenChange:D,contentId:Vs(),value:X,onValueChange:O,open:P,onOpenChange:K,dir:A,triggerPointerDownPosRef:U,disabled:x,children:[p.jsx(pd.Provider,{scope:t,children:p.jsx(TD,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(I=>{q(W=>new Set(W).add(I))},[]),onNativeOptionRemove:w.useCallback(I=>{q(W=>{const Q=new Set(W);return Q.delete(I),Q})},[]),children:r})}),J?p.jsxs(CE,{"aria-hidden":!0,required:v,tabIndex:-1,name:g,autoComplete:m,value:X,onChange:I=>O(I.target.value),disabled:x,form:E,children:[X===void 0?p.jsx("option",{value:""}):null,Array.from(ce)]},$):null]})})};iE.displayName=Vi;var sE="SelectTrigger",lE=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:i=!1,...s}=e,o=gd(r),c=mi(sE,r),d=c.disabled||i,h=cn(t,c.onTriggerChange),f=md(r),g=w.useRef("touch"),[m,x,v]=AE(S=>{const _=f().filter(C=>!C.disabled),N=_.find(C=>C.value===c.value),T=RE(_,S,N);T!==void 0&&c.onValueChange(T.value)}),E=S=>{d||(c.onOpenChange(!0),v()),S&&(c.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return p.jsx(yD,{asChild:!0,...o,children:p.jsx(qt.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":TE(c.value)?"":void 0,...s,ref:h,onClick:Yt(s.onClick,S=>{S.currentTarget.focus(),g.current!=="mouse"&&E(S)}),onPointerDown:Yt(s.onPointerDown,S=>{g.current=S.pointerType;const _=S.target;_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(E(S),S.preventDefault())}),onKeyDown:Yt(s.onKeyDown,S=>{const _=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(_&&S.key===" ")&&_D.includes(S.key)&&(E(),S.preventDefault())})})})});lE.displayName=sE;var oE="SelectValue",cE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:i,style:s,children:o,placeholder:c="",...d}=e,h=mi(oE,r),{onValueNodeHasChildrenChange:f}=h,g=o!==void 0,m=cn(t,h.onValueNodeChange);return On(()=>{f(g)},[f,g]),p.jsx(qt.span,{...d,ref:m,style:{pointerEvents:"none"},children:TE(h.value)?p.jsx(p.Fragment,{children:c}):o})});cE.displayName=oE;var RD="SelectIcon",uE=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:i,...s}=e;return p.jsx(qt.span,{"aria-hidden":!0,...s,ref:t,children:i||"▼"})});uE.displayName=RD;var OD="SelectPortal",dE=e=>p.jsx(Dm,{asChild:!0,...e});dE.displayName=OD;var Yi="SelectContent",fE=w.forwardRef((e,t)=>{const r=mi(Yi,e.__scopeSelect),[i,s]=w.useState();if(On(()=>{s(new DocumentFragment)},[]),!r.open){const o=i;return o?Lo.createPortal(p.jsx(hE,{scope:e.__scopeSelect,children:p.jsx(pd.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),o):null}return p.jsx(pE,{...e,ref:t})});fE.displayName=Yi;var Mr=10,[hE,gi]=sl(Yi),MD="SelectContentImpl",DD=_o("SelectContent.RemoveScroll"),pE=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:c,side:d,sideOffset:h,align:f,alignOffset:g,arrowPadding:m,collisionBoundary:x,collisionPadding:v,sticky:E,hideWhenDetached:S,avoidCollisions:_,...N}=e,T=mi(Yi,r),[C,j]=w.useState(null),[D,A]=w.useState(null),P=cn(t,re=>j(re)),[K,X]=w.useState(null),[O,U]=w.useState(null),J=md(r),[ce,q]=w.useState(!1),$=w.useRef(!1);w.useEffect(()=>{if(C)return ww(C)},[C]),fw();const I=w.useCallback(re=>{const[be,...Ce]=J().map($e=>$e.ref.current),[ke]=Ce.slice(-1),Ne=document.activeElement;for(const $e of re)if($e===Ne||($e==null||$e.scrollIntoView({block:"nearest"}),$e===be&&D&&(D.scrollTop=0),$e===ke&&D&&(D.scrollTop=D.scrollHeight),$e==null||$e.focus(),document.activeElement!==Ne))return},[J,D]),W=w.useCallback(()=>I([K,C]),[I,K,C]);w.useEffect(()=>{ce&&W()},[ce,W]);const{onOpenChange:Q,triggerPointerDownPosRef:Y}=T;w.useEffect(()=>{if(C){let re={x:0,y:0};const be=ke=>{var Ne,$e;re={x:Math.abs(Math.round(ke.pageX)-(((Ne=Y.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(ke.pageY)-((($e=Y.current)==null?void 0:$e.y)??0))}},Ce=ke=>{re.x<=10&&re.y<=10?ke.preventDefault():C.contains(ke.target)||Q(!1),document.removeEventListener("pointermove",be),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[C,Q,Y]),w.useEffect(()=>{const re=()=>Q(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[Q]);const[L,z]=AE(re=>{const be=J().filter(Ne=>!Ne.disabled),Ce=be.find(Ne=>Ne.ref.current===document.activeElement),ke=RE(be,re,Ce);ke&&setTimeout(()=>ke.ref.current.focus())}),V=w.useCallback((re,be,Ce)=>{const ke=!$.current&&!Ce;(T.value!==void 0&&T.value===be||ke)&&(X(re),ke&&($.current=!0))},[T.value]),R=w.useCallback(()=>C==null?void 0:C.focus(),[C]),ee=w.useCallback((re,be,Ce)=>{const ke=!$.current&&!Ce;(T.value!==void 0&&T.value===be||ke)&&U(re)},[T.value]),ge=i==="popper"?Hp:mE,oe=ge===Hp?{side:d,sideOffset:h,align:f,alignOffset:g,arrowPadding:m,collisionBoundary:x,collisionPadding:v,sticky:E,hideWhenDetached:S,avoidCollisions:_}:{};return p.jsx(hE,{scope:r,content:C,viewport:D,onViewportChange:A,itemRefCallback:V,selectedItem:K,onItemLeave:R,itemTextRefCallback:ee,focusSelectedItem:W,selectedItemText:O,position:i,isPositioned:ce,searchRef:L,children:p.jsx(jm,{as:DD,allowPinchZoom:!0,children:p.jsx(Mm,{asChild:!0,trapped:T.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:Yt(s,re=>{var be;(be=T.trigger)==null||be.focus({preventScroll:!0}),re.preventDefault()}),children:p.jsx(Om,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:p.jsx(ge,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:re=>re.preventDefault(),...N,...oe,onPlaced:()=>q(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Yt(N.onKeyDown,re=>{const be=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!be&&re.key.length===1&&z(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let ke=J().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(re.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const Ne=re.target,$e=ke.indexOf(Ne);ke=ke.slice($e+1)}setTimeout(()=>I(ke)),re.preventDefault()}})})})})})})});pE.displayName=MD;var jD="SelectItemAlignedPosition",mE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:i,...s}=e,o=mi(Yi,r),c=gi(Yi,r),[d,h]=w.useState(null),[f,g]=w.useState(null),m=cn(t,P=>g(P)),x=md(r),v=w.useRef(!1),E=w.useRef(!0),{viewport:S,selectedItem:_,selectedItemText:N,focusSelectedItem:T}=c,C=w.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&f&&S&&_&&N){const P=o.trigger.getBoundingClientRect(),K=f.getBoundingClientRect(),X=o.valueNode.getBoundingClientRect(),O=N.getBoundingClientRect();if(o.dir!=="rtl"){const Ne=O.left-K.left,$e=X.left-Ne,Je=P.left-$e,Pe=P.width+Je,Tt=Math.max(Pe,K.width),Be=window.innerWidth-Mr,Qe=Lx($e,[Mr,Math.max(Mr,Be-Tt)]);d.style.minWidth=Pe+"px",d.style.left=Qe+"px"}else{const Ne=K.right-O.right,$e=window.innerWidth-X.right-Ne,Je=window.innerWidth-P.right-$e,Pe=P.width+Je,Tt=Math.max(Pe,K.width),Be=window.innerWidth-Mr,Qe=Lx($e,[Mr,Math.max(Mr,Be-Tt)]);d.style.minWidth=Pe+"px",d.style.right=Qe+"px"}const U=x(),J=window.innerHeight-Mr*2,ce=S.scrollHeight,q=window.getComputedStyle(f),$=parseInt(q.borderTopWidth,10),I=parseInt(q.paddingTop,10),W=parseInt(q.borderBottomWidth,10),Q=parseInt(q.paddingBottom,10),Y=$+I+ce+Q+W,L=Math.min(_.offsetHeight*5,Y),z=window.getComputedStyle(S),V=parseInt(z.paddingTop,10),R=parseInt(z.paddingBottom,10),ee=P.top+P.height/2-Mr,ge=J-ee,oe=_.offsetHeight/2,re=_.offsetTop+oe,be=$+I+re,Ce=Y-be;if(be<=ee){const Ne=U.length>0&&_===U[U.length-1].ref.current;d.style.bottom="0px";const $e=f.clientHeight-S.offsetTop-S.offsetHeight,Je=Math.max(ge,oe+(Ne?R:0)+$e+W),Pe=be+Je;d.style.height=Pe+"px"}else{const Ne=U.length>0&&_===U[0].ref.current;d.style.top="0px";const Je=Math.max(ee,$+S.offsetTop+(Ne?V:0)+oe)+Ce;d.style.height=Je+"px",S.scrollTop=be-ee+S.offsetTop}d.style.margin=`${Mr}px 0`,d.style.minHeight=L+"px",d.style.maxHeight=J+"px",i==null||i(),requestAnimationFrame(()=>v.current=!0)}},[x,o.trigger,o.valueNode,d,f,S,_,N,o.dir,i]);On(()=>C(),[C]);const[j,D]=w.useState();On(()=>{f&&D(window.getComputedStyle(f).zIndex)},[f]);const A=w.useCallback(P=>{P&&E.current===!0&&(C(),T==null||T(),E.current=!1)},[C,T]);return p.jsx(ID,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:p.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:p.jsx(qt.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});mE.displayName=jD;var LD="SelectPopperPosition",Hp=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:i="start",collisionPadding:s=Mr,...o}=e,c=gd(r);return p.jsx(xD,{...c,...o,ref:t,align:i,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hp.displayName=LD;var[ID,Gm]=sl(Yi,{}),Kp="SelectViewport",gE=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:i,...s}=e,o=gi(Kp,r),c=Gm(Kp,r),d=cn(t,o.onViewportChange),h=w.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(pd.Slot,{scope:r,children:p.jsx(qt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Yt(s.onScroll,f=>{const g=f.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=c;if(x!=null&&x.current&&m){const v=Math.abs(h.current-g.scrollTop);if(v>0){const E=window.innerHeight-Mr*2,S=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),N=Math.max(S,_);if(N<E){const T=N+v,C=Math.min(E,T),j=T-C;m.style.height=C+"px",m.style.bottom==="0px"&&(g.scrollTop=j>0?j:0,m.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});gE.displayName=Kp;var bE="SelectGroup",[zD,PD]=sl(bE),BD=w.forwardRef((e,t)=>{const{__scopeSelect:r,...i}=e,s=Vs();return p.jsx(zD,{scope:r,id:s,children:p.jsx(qt.div,{role:"group","aria-labelledby":s,...i,ref:t})})});BD.displayName=bE;var yE="SelectLabel",UD=w.forwardRef((e,t)=>{const{__scopeSelect:r,...i}=e,s=PD(yE,r);return p.jsx(qt.div,{id:s.id,...i,ref:t})});UD.displayName=yE;var zu="SelectItem",[FD,xE]=sl(zu),vE=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:i,disabled:s=!1,textValue:o,...c}=e,d=mi(zu,r),h=gi(zu,r),f=d.value===i,[g,m]=w.useState(o??""),[x,v]=w.useState(!1),E=cn(t,T=>{var C;return(C=h.itemRefCallback)==null?void 0:C.call(h,T,i,s)}),S=Vs(),_=w.useRef("touch"),N=()=>{s||(d.onValueChange(i),d.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(FD,{scope:r,value:i,disabled:s,textId:S,isSelected:f,onItemTextChange:w.useCallback(T=>{m(C=>C||((T==null?void 0:T.textContent)??"").trim())},[]),children:p.jsx(pd.ItemSlot,{scope:r,value:i,disabled:s,textValue:g,children:p.jsx(qt.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:E,onFocus:Yt(c.onFocus,()=>v(!0)),onBlur:Yt(c.onBlur,()=>v(!1)),onClick:Yt(c.onClick,()=>{_.current!=="mouse"&&N()}),onPointerUp:Yt(c.onPointerUp,()=>{_.current==="mouse"&&N()}),onPointerDown:Yt(c.onPointerDown,T=>{_.current=T.pointerType}),onPointerMove:Yt(c.onPointerMove,T=>{var C;_.current=T.pointerType,s?(C=h.onItemLeave)==null||C.call(h):_.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Yt(c.onPointerLeave,T=>{var C;T.currentTarget===document.activeElement&&((C=h.onItemLeave)==null||C.call(h))}),onKeyDown:Yt(c.onKeyDown,T=>{var j;((j=h.searchRef)==null?void 0:j.current)!==""&&T.key===" "||(kD.includes(T.key)&&N(),T.key===" "&&T.preventDefault())})})})})});vE.displayName=zu;var po="SelectItemText",wE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:i,style:s,...o}=e,c=mi(po,r),d=gi(po,r),h=xE(po,r),f=AD(po,r),[g,m]=w.useState(null),x=cn(t,N=>m(N),h.onItemTextChange,N=>{var T;return(T=d.itemTextRefCallback)==null?void 0:T.call(d,N,h.value,h.disabled)}),v=g==null?void 0:g.textContent,E=w.useMemo(()=>p.jsx("option",{value:h.value,disabled:h.disabled,children:v},h.value),[h.disabled,h.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:_}=f;return On(()=>(S(E),()=>_(E)),[S,_,E]),p.jsxs(p.Fragment,{children:[p.jsx(qt.span,{id:h.textId,...o,ref:x}),h.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Lo.createPortal(o.children,c.valueNode):null]})});wE.displayName=po;var EE="SelectItemIndicator",SE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...i}=e;return xE(EE,r).isSelected?p.jsx(qt.span,{"aria-hidden":!0,...i,ref:t}):null});SE.displayName=EE;var qp="SelectScrollUpButton",_E=w.forwardRef((e,t)=>{const r=gi(qp,e.__scopeSelect),i=Gm(qp,e.__scopeSelect),[s,o]=w.useState(!1),c=cn(t,i.onScrollButtonChange);return On(()=>{if(r.viewport&&r.isPositioned){let d=function(){const f=h.scrollTop>0;o(f)};const h=r.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),s?p.jsx(NE,{...e,ref:c,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop-h.offsetHeight)}}):null});_E.displayName=qp;var Gp="SelectScrollDownButton",kE=w.forwardRef((e,t)=>{const r=gi(Gp,e.__scopeSelect),i=Gm(Gp,e.__scopeSelect),[s,o]=w.useState(!1),c=cn(t,i.onScrollButtonChange);return On(()=>{if(r.viewport&&r.isPositioned){let d=function(){const f=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)<f;o(g)};const h=r.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),s?p.jsx(NE,{...e,ref:c,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop+h.offsetHeight)}}):null});kE.displayName=Gp;var NE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:i,...s}=e,o=gi("SelectScrollButton",r),c=w.useRef(null),d=md(r),h=w.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return w.useEffect(()=>()=>h(),[h]),On(()=>{var g;const f=d().find(m=>m.ref.current===document.activeElement);(g=f==null?void 0:f.ref.current)==null||g.scrollIntoView({block:"nearest"})},[d]),p.jsx(qt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Yt(s.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(i,50))}),onPointerMove:Yt(s.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),c.current===null&&(c.current=window.setInterval(i,50))}),onPointerLeave:Yt(s.onPointerLeave,()=>{h()})})}),$D="SelectSeparator",HD=w.forwardRef((e,t)=>{const{__scopeSelect:r,...i}=e;return p.jsx(qt.div,{"aria-hidden":!0,...i,ref:t})});HD.displayName=$D;var Vp="SelectArrow",KD=w.forwardRef((e,t)=>{const{__scopeSelect:r,...i}=e,s=gd(r),o=mi(Vp,r),c=gi(Vp,r);return o.open&&c.position==="popper"?p.jsx(vD,{...s,...i,ref:t}):null});KD.displayName=Vp;var qD="SelectBubbleInput",CE=w.forwardRef(({__scopeSelect:e,value:t,...r},i)=>{const s=w.useRef(null),o=cn(i,s),c=wD(t);return w.useEffect(()=>{const d=s.current;if(!d)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(c!==t&&g){const m=new Event("change",{bubbles:!0});g.call(d,t),d.dispatchEvent(m)}},[c,t]),p.jsx(qt.select,{...r,style:{...aE,...r.style},ref:o,defaultValue:t})});CE.displayName=qD;function TE(e){return e===""||e===void 0}function AE(e){const t=Ki(e),r=w.useRef(""),i=w.useRef(0),s=w.useCallback(c=>{const d=r.current+c;t(d),(function h(f){r.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(d)},[t]),o=w.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,s,o]}function RE(e,t,r){const s=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let c=GD(e,Math.max(o,0));s.length===1&&(c=c.filter(f=>f!==r));const h=c.find(f=>f.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==r?h:void 0}function GD(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var VD=iE,YD=lE,WD=cE,XD=uE,QD=dE,ZD=fE,JD=gE,ej=vE,tj=wE,nj=SE,rj=_E,aj=kE;function xt({label:e,className:t,...r}){return p.jsxs("div",{className:"space-y-1.5",children:[e&&p.jsx("label",{className:"block text-sm font-medium text-foreground",children:e}),p.jsx("input",{className:He("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})}function bd({label:e,className:t,...r}){return p.jsxs("div",{className:"space-y-1.5",children:[e&&p.jsx("label",{className:"block text-sm font-medium text-foreground",children:e}),p.jsx("textarea",{className:He("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors resize-none","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})}const OE="__radix_empty_value__";function Vx(e){return typeof e=="string"||typeof e=="number"?String(e):w.Children.toArray(e).map(t=>typeof t=="string"||typeof t=="number"?String(t):"").join("")}function ij(e){return w.Children.toArray(e).flatMap(t=>{if(!w.isValidElement(t))return[];const r=t;if(r.type!=="option")return[];const i=r.props.value??Vx(r.props.children);return[{value:String(i),label:Vx(r.props.children),disabled:r.props.disabled}]})}function Yx(e){return e===""||e===void 0||e===null?OE:String(e)}function Wx(e){return e===OE?"":e}function Na({label:e,className:t,children:r,...i}){var f;const s=ij(r),o=Yx(i.value??i.defaultValue??""),c=s.find(g=>g.value===Wx(o)),d=(f=s.find(g=>g.value===""))==null?void 0:f.label,h=g=>{var x;const m=Wx(g);(x=i.onChange)==null||x.call(i,{target:{value:m},currentTarget:{value:m}})};return p.jsxs("div",{className:"space-y-1.5",children:[e&&p.jsx("label",{className:"block text-sm font-medium text-foreground",children:e}),p.jsxs(VD,{value:o,onValueChange:h,disabled:i.disabled,name:i.name,children:[p.jsxs(YD,{id:i.id,className:He("flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors","placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),children:[p.jsx(WD,{placeholder:d,children:c==null?void 0:c.label}),p.jsx(XD,{asChild:!0,children:p.jsx(J0,{className:"h-4 w-4 opacity-50"})})]}),p.jsx(QD,{children:p.jsxs(ZD,{className:"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-fade-in",children:[p.jsx(rj,{className:"flex cursor-default items-center justify-center py-1",children:p.jsx(kC,{className:"h-4 w-4"})}),p.jsx(JD,{className:"p-1",children:s.map(g=>p.jsxs(ej,{value:Yx(g.value),disabled:g.disabled,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-accent/10 focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(nj,{children:p.jsx(vo,{className:"h-4 w-4"})})}),p.jsx(tj,{children:g.label})]},`${g.value}-${g.label}`))}),p.jsx(aj,{className:"flex cursor-default items-center justify-center py-1",children:p.jsx(J0,{className:"h-4 w-4"})})]})})]})]})}function xn({message:e,icon:t=VC}){return p.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed bg-card/70 py-12 text-muted-foreground",children:[p.jsx(t,{size:36,strokeWidth:1.5,className:"mb-3 opacity-80"}),p.jsx("p",{className:"text-sm",children:e})]})}const Yp="http://127.0.0.1:9831",sj=`${Yp}/api/local/v1`;function lj(e){const t=e.trim();return t?t.replace(/\/+$/,""):sj}const Qr=lj("/api/local/v1");Qr.endsWith("/api/local/v1")&&Qr.slice(0,-13);const No=new Set;let or=null;async function Ve(e,t,r){const i=await fetch(`${Qr}${t}`,{method:e,headers:{"Content-Type":"application/json"},body:r?JSON.stringify(r):void 0}),s=await i.json();if(!i.ok||!s.ok)throw new Error(s.error||`Local AI Core request failed: ${i.status}`);return s.data}function ME(){if(or||typeof window>"u")return;or=new EventSource(`${Qr}/events`);const e=t=>{try{const r=JSON.parse(t.data);No.forEach(i=>i(r))}catch{}};["runtime.updated","thread.updated","message.created","message.updated","run.updated","scheduler.job.updated","scheduler.run.updated","presence.updated","stream.updated"].forEach(t=>{or==null||or.addEventListener(t,e)}),or.onerror=()=>{or==null||or.close(),or=null,No.size>0&&window.setTimeout(()=>ME(),1e3)}}function oj(){No.size===0&&or&&(or.close(),or=null)}async function cj(e=350){var i;const t=new AbortController,r=window.setTimeout(()=>t.abort(),e);try{const s=await fetch(`${Qr}/health`,{signal:t.signal}),o=await s.json();return s.ok&&o.ok&&((i=o.data)==null?void 0:i.name)==="local-ai-core"}catch{return!1}finally{window.clearTimeout(r)}}function Vm(e){return No.add(e),ME(),()=>{No.delete(e),oj()}}async function uj(){return Ve("GET","/runtime")}async function dj(){return Ve("POST","/runtime/service/start")}async function fj(){return Ve("POST","/runtime/service/stop")}async function hj(){return Ve("POST","/runtime/service/restart")}async function pj(e){const t=typeof e=="number"?`?limit=${encodeURIComponent(String(e))}`:"";return Ve("GET",`/runtime/logs${t}`)}async function mj(){return Ve("GET","/runtime/config")}async function gj(e){return Ve("POST","/runtime/config/raw",{raw:e})}async function bj(e){return Ve("POST","/runtime/config/structured",{config:e})}async function yj(e){return Ve("POST","/runtime/settings",e)}async function DE(e){return Ve("GET",`/platforms/${encodeURIComponent(e)}`)}async function jE(e,t){return Ve("GET",`/platforms/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)}async function LE(e,t){return Ve("POST",`/platforms/${encodeURIComponent(e)}/${encodeURIComponent(t)}/test`)}async function IE(e,t){return Ve("POST",`/platforms/${encodeURIComponent(e)}/${encodeURIComponent(t)}/enable`)}async function zE(e,t){return Ve("POST",`/platforms/${encodeURIComponent(e)}/${encodeURIComponent(t)}/disable`)}async function PE(e,t){const r=t?`?workspace_id=${encodeURIComponent(t)}`:"";return Ve("GET",`/platforms/${encodeURIComponent(e)}/pairings${r}`)}async function BE(e,t){return Ve("POST",`/platforms/${encodeURIComponent(e)}/pairings/approve`,{code:t})}async function UE(e,t){return Ve("POST",`/platforms/${encodeURIComponent(e)}/pairings/reject`,{code:t})}async function FE(e,t){const r=t?`?workspace_id=${encodeURIComponent(t)}`:"";return Ve("GET",`/platforms/${encodeURIComponent(e)}/users${r}`)}async function xj(){return DE("lark")}async function vj(e){return jE("lark",e)}async function wj(e){return LE("lark",e)}async function Ej(e){return IE("lark",e)}async function Sj(e){return zE("lark",e)}async function _j(e){return PE("lark",e)}async function kj(e){return BE("lark",e)}async function Nj(e){return UE("lark",e)}async function Cj(e){return FE("lark",e)}async function $E(e){return Ve("POST",`/platforms/weixin/${encodeURIComponent(e)}/qrcode`)}async function HE(e,t){return Ve("GET",`/platforms/weixin/${encodeURIComponent(e)}/qrcode/status?ticket=${encodeURIComponent(t)}`)}async function Ym(){return Ve("GET","/workspaces")}async function Tj(e){return Ve("GET","/scheduler/jobs")}async function Aj(e){return Ve("POST","/scheduler/jobs",e)}async function Rj(e,t){return Ve("PATCH",`/scheduler/jobs/${encodeURIComponent(e)}`,t)}async function Oj(e){return Ve("DELETE",`/scheduler/jobs/${encodeURIComponent(e)}`)}async function Mj(e){return Ve("POST",`/scheduler/jobs/${encodeURIComponent(e)}/run`)}async function Dj(e){return Ve("GET",`/threads?workspace_id=${encodeURIComponent(e)}`)}async function KE(e,t){return Ve("POST","/threads",{workspaceId:e,title:t})}async function qE(e){return Ve("GET",`/threads/${encodeURIComponent(e)}`)}async function jj(e,t){return Ve("PATCH",`/threads/${encodeURIComponent(e)}`,{title:t})}async function Co(e,t){return Ve("PATCH",`/threads/${encodeURIComponent(e)}/knowledge-bases`,{knowledgeBaseIds:t})}async function Lj(e){return Ve("DELETE",`/threads/${encodeURIComponent(e)}`)}async function Ij(e,t){return Ve("POST",`/threads/${encodeURIComponent(e)}/messages`,{content:t})}async function GE(e,t){return Ve("POST",`/threads/${encodeURIComponent(e)}/actions`,{content:t})}async function zj(e){return Ve("POST",`/runs/${encodeURIComponent(e)}/interrupt`)}async function Wp(){return Ve("GET","/knowledge/config")}async function VE(){return Ve("GET","/knowledge/folders")}async function Pj(e){return Ve("POST","/knowledge/folders",e)}async function Bj(e,t){return Ve("PATCH",`/knowledge/folders/${encodeURIComponent(e)}`,t)}async function Uj(e){return Ve("DELETE",`/knowledge/folders/${encodeURIComponent(e)}`)}async function YE(){return Ve("GET","/knowledge/bases")}async function Fj(e){return Ve("POST","/knowledge/bases",e)}async function $j(e){return Ve("GET",`/knowledge/bases/${encodeURIComponent(e)}`)}async function Hj(e,t){return Ve("PATCH",`/knowledge/bases/${encodeURIComponent(e)}`,t)}async function Kj(e){return Ve("DELETE",`/knowledge/bases/${encodeURIComponent(e)}`)}async function qj(e){return Ve("GET",`/knowledge/bases/${encodeURIComponent(e)}/files`)}async function Gj(e,t){const r=new FormData;r.append("collection",t.collection),r.append("knowledgebase_id",e),t.folder&&r.append("folder",t.folder),t.files.forEach(o=>{r.append("files",o,o.name)});const i=await fetch(`${Qr}/knowledge/bases/${encodeURIComponent(e)}/files`,{method:"POST",body:r}),s=await i.json();if(!i.ok||!s.ok)throw new Error(s.error||`Local AI Core upload failed: ${i.status}`);return s.data}async function Vj(e,t){return Ve("DELETE",`/knowledge/bases/${encodeURIComponent(e)}/files/${encodeURIComponent(t)}`)}async function Yj(e,t){return Ve("POST",`/knowledge/bases/${encodeURIComponent(e)}/search`,t)}async function WE(){return Ve("GET","/capabilities/snapshot")}async function XE(){return Ve("GET","/plugins/diagnostics")}async function Wj(e){return Ve("POST",`/workspaces/${encodeURIComponent(e)}/streaming-probe`)}function Xj(e){return Vm(t=>{t.type==="runtime.updated"&&e(t.runtime)})}function QE(e){return Vm(t=>{t.type==="stream.updated"&&e(t.stream),(t.type==="message.created"||t.type==="message.updated"||t.type==="run.updated")&&"stream"in t&&t.stream&&e(t.stream)})}function _t(){if(!window.desktop)throw new Error("Desktop APIs are unavailable in the browser build");return window.desktop}const ZE={getRuntimeStatus:()=>_t().getRuntimeStatus(),startService:()=>_t().startService(),stopService:()=>_t().stopService(),restartService:()=>_t().restartService(),getLogs:e=>_t().getLogs(e),readConfigFile:()=>_t().readConfigFile(),saveRawConfigFile:e=>_t().saveRawConfigFile(e),saveStructuredConfigFile:e=>_t().saveStructuredConfigFile(e),getThreadKnowledgeBases:(e,t)=>_t().getThreadKnowledgeBases(e,t),updateThreadKnowledgeBases:(e,t,r)=>_t().updateThreadKnowledgeBases(e,t,r),deleteThreadKnowledgeBases:(e,t)=>_t().deleteThreadKnowledgeBases(e,t),saveSettings:e=>_t().saveSettings(e),getCapabilitySnapshot:()=>WE(),getPluginDiagnostics:()=>XE(),listChannelGateways:e=>_t().listChannelGateways(e),getChannelGatewayStatus:(e,t)=>_t().getChannelGatewayStatus(e,t),testChannelConnection:(e,t)=>_t().testChannelConnection(e,t),enableChannelGateway:(e,t)=>_t().enableChannelGateway(e,t),disableChannelGateway:(e,t)=>_t().disableChannelGateway(e,t),listChannelPendingPairings:(e,t)=>_t().listChannelPendingPairings(e,t),approveChannelPairing:(e,t)=>_t().approveChannelPairing(e,t),rejectChannelPairing:(e,t)=>_t().rejectChannelPairing(e,t),listChannelAuthorizedUsers:(e,t)=>_t().listChannelAuthorizedUsers(e,t),getWeixinQrCode:e=>$E(e),checkWeixinQrCodeStatus:(e,t)=>HE(e,t),listLarkGateways:()=>_t().listLarkGateways(),getLarkGatewayStatus:e=>_t().getLarkGatewayStatus(e),testLarkConnection:e=>_t().testLarkConnection(e),enableLarkGateway:e=>_t().enableLarkGateway(e),disableLarkGateway:e=>_t().disableLarkGateway(e),listLarkPendingPairings:e=>_t().listLarkPendingPairings(e),approveLarkPairing:e=>_t().approveLarkPairing(e),rejectLarkPairing:e=>_t().rejectLarkPairing(e),listLarkAuthorizedUsers:e=>_t().listLarkAuthorizedUsers(e),probeWorkspaceStreaming:e=>_t().probeWorkspaceStreaming(e),onRuntimeEvent:e=>_t().onRuntimeEvent(e),onBridgeEvent:e=>QE(e)},Pu={getRuntimeStatus:()=>uj(),startService:()=>dj(),stopService:()=>fj(),restartService:()=>hj(),getLogs:e=>pj(e),readConfigFile:()=>mj(),saveRawConfigFile:e=>gj(e),saveStructuredConfigFile:e=>bj(e),getThreadKnowledgeBases:(e,t)=>qE(t).then(r=>r.selectedKnowledgeBaseIds||[]),updateThreadKnowledgeBases:(e,t,r)=>Co(t,r).then(i=>i.knowledgeBaseIds),deleteThreadKnowledgeBases:(e,t)=>Co(t,[]).then(()=>({deleted:!0})),saveSettings:e=>yj(e),getCapabilitySnapshot:()=>WE(),getPluginDiagnostics:()=>XE(),listChannelGateways:e=>DE(e).then(t=>t.gateways),getChannelGatewayStatus:(e,t)=>jE(e,t),testChannelConnection:(e,t)=>LE(e,t),enableChannelGateway:(e,t)=>IE(e,t),disableChannelGateway:(e,t)=>zE(e,t),listChannelPendingPairings:(e,t)=>PE(e,t).then(r=>r.pairings),approveChannelPairing:(e,t)=>BE(e,t),rejectChannelPairing:(e,t)=>UE(e,t),listChannelAuthorizedUsers:(e,t)=>FE(e,t).then(r=>r.users),getWeixinQrCode:e=>$E(e),checkWeixinQrCodeStatus:(e,t)=>HE(e,t),listLarkGateways:()=>xj().then(e=>e.gateways),getLarkGatewayStatus:e=>vj(e),testLarkConnection:e=>wj(e),enableLarkGateway:e=>Ej(e),disableLarkGateway:e=>Sj(e),listLarkPendingPairings:e=>_j(e).then(t=>t.pairings),approveLarkPairing:e=>kj(e),rejectLarkPairing:e=>Nj(e),listLarkAuthorizedUsers:e=>Cj(e).then(t=>t.users),probeWorkspaceStreaming:e=>Wj(e),onRuntimeEvent:e=>Xj(e),onBridgeEvent:e=>QE(e)};let ci=null;function Qj(e){return e==="electron"&&window.desktop?ZE:Pu}async function Zj(){return window.desktop?(Bh("electron"),ci=ZE,ci):(await cj(),Bh("local_core"),ci=Pu,ci)}function mr(){const e=ci||Qj(Hi());if(!e)throw new Error("Managed desktop APIs are unavailable in this build");return ci=e,e}async function Jj(){return Zj()}const Wm=()=>mr().getRuntimeStatus(),eL=()=>mr().startService(),tL=e=>mr().getLogs(e),nL=()=>mr().readConfigFile(),Xx=e=>mr().saveStructuredConfigFile(e),rL=(e,t,r)=>mr().updateThreadKnowledgeBases(e,t,r),aL=e=>mr().saveSettings(e),Qx=()=>mr().getCapabilitySnapshot(),iL=()=>mr().getPluginDiagnostics(),sL=e=>mr().getWeixinQrCode(e),lL=(e,t)=>mr().checkWeixinQrCodeStatus(e,t),Xm=e=>mr().onRuntimeEvent(e),oL=e=>mr().onBridgeEvent(e);function Zi({title:e,description:t,actions:r}){return p.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:e}),t?p.jsx("p",{className:"mt-1 max-w-3xl text-sm leading-6 text-muted-foreground",children:t}):null]}),r?p.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:r}):null]})}function ka({title:e,description:t,actions:r,children:i,className:s,bodyClassName:o}){return p.jsxs(Kt,{className:He("p-0",s),children:[(e||t||r)&&p.jsxs("div",{className:"flex flex-col gap-3 border-b px-5 py-4 sm:flex-row sm:items-start sm:justify-between",children:[p.jsxs("div",{className:"min-w-0",children:[e?p.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}):null,t?p.jsx("p",{className:"mt-1 text-sm leading-5 text-muted-foreground",children:t}):null]}),r?p.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:r}):null]}),p.jsx("div",{className:He("p-5",o),children:i})]})}const cL={neutral:"border-border bg-muted text-muted-foreground",success:"border-primary/20 bg-primary/10 text-primary",warning:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",danger:"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-200",info:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-400/20 dark:bg-blue-500/10 dark:text-blue-200"};function JE({children:e,tone:t="neutral"}){return p.jsx("span",{className:He("inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium",cL[t]),children:e})}const yd=()=>ot.get("/projects"),uL=e=>ot.get(`/projects/${e}`);function dL({title:e,description:t,to:r,icon:i,primary:s}){return p.jsxs(Pn,{to:r,className:["group flex min-h-[118px] flex-col justify-between rounded-2xl p-5 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring",s?"bg-black/[0.07] text-foreground hover:bg-black/[0.09] dark:bg-white/[0.10] dark:hover:bg-white/[0.13]":"bg-white/54 text-foreground hover:bg-white/72 dark:bg-white/[0.055] dark:hover:bg-white/[0.085]"].join(" "),children:[p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-white/70 text-primary shadow-[0_1px_1px_rgba(0,0,0,0.04)] dark:bg-white/[0.08]",children:p.jsx(i,{size:20})}),p.jsx(pm,{size:17,className:"mt-1 text-muted-foreground/45 transition-colors group-hover:text-foreground"})]}),p.jsxs("div",{children:[p.jsx("h2",{className:"text-base font-semibold text-foreground",children:e}),p.jsx("p",{className:"mt-2 max-w-sm text-sm leading-5 text-muted-foreground",children:t})]})]})}function fL(){const{t:e}=Pr(),[t,r]=w.useState([]),[i,s]=w.useState(!0),[o,c]=w.useState(""),{desktopRuntime:d,desktopWorkspace:h,knowledgeModule:f,schedulerModule:g}=id(),m=[{title:"继续聊天",description:"打开本地对话,继续当前项目里的 agent 线程。",to:"/chat",icon:_a,primary:!0},{title:"工作区",description:"管理项目、平台、模型和本地运行配置。",to:h?"/workspace":"/projects",icon:h?bm:Tu}];f&&m.push({title:"知识库",description:"上传文档,维护可被检索的项目资料。",to:"/knowledge",icon:C1}),g&&m.push({title:"定时任务",description:"查看和管理自动执行的计划任务。",to:"/cron",icon:yC}),(!f||!g)&&m.push({title:"系统设置",description:"查看配置、日志和桌面应用偏好。",to:"/system",icon:Oo});const x=w.useCallback(async()=>{s(!0),c("");try{if(d){const E=await Ym();r((E.workspaces||[]).map(S=>({name:S.name,agent_type:S.agentType,platforms:S.platforms,sessions_count:S.sessionsCount,heartbeat_enabled:S.heartbeatEnabled})));return}const v=await yd();r(v.projects||[])}catch(v){c(v.message||String(v))}finally{s(!1)}},[d]);return w.useEffect(()=>{x();const v=()=>x();window.addEventListener("cc:refresh",v);const E=d?Xm(()=>{x()}):()=>{};return()=>{window.removeEventListener("cc:refresh",v),E()}},[d,x]),i&&t.length===0?p.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:p.jsx(fC,{className:"animate-pulse",size:24})}):p.jsxs("div",{className:"animate-fade-in space-y-8",children:[p.jsx(Zi,{title:"概览",description:"继续最近的工作,或进入项目、知识和自动化配置。"}),o?p.jsx("div",{role:"alert",className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",children:o}):null,p.jsxs("section",{className:"space-y-3",children:[p.jsx("div",{className:"flex items-end justify-between gap-4",children:p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold tracking-tight text-foreground",children:"快速开始"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"常用入口会保留在最前面。"})]})}),p.jsx("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:m.map(v=>p.jsx(dL,{...v},v.to))})]}),p.jsxs(Kt,{className:"p-0",children:[p.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-black/[0.08] px-5 py-4 dark:border-white/[0.07]",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-base font-semibold text-foreground",children:e("nav.projects")}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"最近配置和会话概览。"})]}),p.jsx(Pn,{to:d?"/workspace":"/projects",className:"text-sm font-medium text-primary transition-colors hover:text-primary/80",children:e("common.viewAll")})]}),t.length===0?p.jsx("div",{className:"p-5",children:p.jsx(xn,{message:e("projects.noProjects"),icon:Tu})}):p.jsx("div",{className:"divide-y divide-black/[0.08] dark:divide-white/[0.07]",children:t.slice(0,6).map(v=>{var E;return p.jsxs(Pn,{to:d?`/workspace?project=${encodeURIComponent(v.name)}`:`/projects/${v.name}`,className:"group flex items-center justify-between gap-3 px-5 py-4 transition-colors duration-200 hover:bg-black/[0.04] dark:hover:bg-white/[0.06]",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[p.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:p.jsx(I1,{size:17})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:v.name}),p.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[v.agent_type," · ",((E=v.platforms)==null?void 0:E.join(", "))||"no platform"," · ",v.sessions_count," sessions"]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[v.heartbeat_enabled?p.jsx(Nn,{variant:"success",children:"heartbeat"}):null,p.jsx(pm,{size:16,className:"text-muted-foreground/45 transition-colors group-hover:text-foreground"})]})]},v.name)})})]})]})}function hL(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const pL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gL={};function Zx(e,t){return(gL.jsx?mL:pL).test(e)}const bL=/[ \t\n\f\r]/g;function yL(e){return typeof e=="object"?e.type==="text"?Jx(e.value):!1:Jx(e)}function Jx(e){return e.replace(bL,"")===""}class zo{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}}zo.prototype.normal={};zo.prototype.property={};zo.prototype.space=void 0;function eS(e,t){const r={},i={};for(const s of e)Object.assign(r,s.property),Object.assign(i,s.normal);return new zo(r,i,t)}function Xp(e){return e.toLowerCase()}class Wn{constructor(t,r){this.attribute=r,this.property=t}}Wn.prototype.attribute="";Wn.prototype.booleanish=!1;Wn.prototype.boolean=!1;Wn.prototype.commaOrSpaceSeparated=!1;Wn.prototype.commaSeparated=!1;Wn.prototype.defined=!1;Wn.prototype.mustUseProperty=!1;Wn.prototype.number=!1;Wn.prototype.overloadedBoolean=!1;Wn.prototype.property="";Wn.prototype.spaceSeparated=!1;Wn.prototype.space=void 0;let xL=0;const st=Ji(),gn=Ji(),Qp=Ji(),ve=Ji(),Ht=Ji(),Xs=Ji(),lr=Ji();function Ji(){return 2**++xL}const Zp=Object.freeze(Object.defineProperty({__proto__:null,boolean:st,booleanish:gn,commaOrSpaceSeparated:lr,commaSeparated:Xs,number:ve,overloadedBoolean:Qp,spaceSeparated:Ht},Symbol.toStringTag,{value:"Module"})),Qh=Object.keys(Zp);class Qm extends Wn{constructor(t,r,i,s){let o=-1;if(super(t,r),ev(this,"space",s),typeof i=="number")for(;++o<Qh.length;){const c=Qh[o];ev(this,Qh[o],(i&Zp[c])===Zp[c])}}}Qm.prototype.defined=!0;function ev(e,t,r){r&&(e[t]=r)}function ll(e){const t={},r={};for(const[i,s]of Object.entries(e.properties)){const o=new Qm(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,r[Xp(i)]=i,r[Xp(o.attribute)]=i}return new zo(t,r,e.space)}const tS=ll({properties:{ariaActiveDescendant:null,ariaAtomic:gn,ariaAutoComplete:null,ariaBusy:gn,ariaChecked:gn,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:Ht,ariaCurrent:null,ariaDescribedBy:Ht,ariaDetails:null,ariaDisabled:gn,ariaDropEffect:Ht,ariaErrorMessage:null,ariaExpanded:gn,ariaFlowTo:Ht,ariaGrabbed:gn,ariaHasPopup:null,ariaHidden:gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ht,ariaLevel:ve,ariaLive:null,ariaModal:gn,ariaMultiLine:gn,ariaMultiSelectable:gn,ariaOrientation:null,ariaOwns:Ht,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:gn,ariaReadOnly:gn,ariaRelevant:null,ariaRequired:gn,ariaRoleDescription:Ht,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:gn,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nS(e,t){return t in e?e[t]:t}function rS(e,t){return nS(e,t.toLowerCase())}const vL=ll({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xs,acceptCharset:Ht,accessKey:Ht,action:null,allow:null,allowFullScreen:st,allowPaymentRequest:st,allowUserMedia:st,alt:null,as:null,async:st,autoCapitalize:null,autoComplete:Ht,autoFocus:st,autoPlay:st,blocking:Ht,capture:null,charSet:null,checked:st,cite:null,className:Ht,cols:ve,colSpan:null,content:null,contentEditable:gn,controls:st,controlsList:Ht,coords:ve|Xs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:st,defer:st,dir:null,dirName:null,disabled:st,download:Qp,draggable:gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:st,formTarget:null,headers:Ht,height:ve,hidden:Qp,high:ve,href:null,hrefLang:null,htmlFor:Ht,httpEquiv:Ht,id:null,imageSizes:null,imageSrcSet:null,inert:st,inputMode:null,integrity:null,is:null,isMap:st,itemId:null,itemProp:Ht,itemRef:Ht,itemScope:st,itemType:Ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:st,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:st,muted:st,name:null,nonce:null,noModule:st,noValidate:st,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:st,optimum:ve,pattern:null,ping:Ht,placeholder:null,playsInline:st,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:st,referrerPolicy:null,rel:Ht,required:st,reversed:st,rows:ve,rowSpan:ve,sandbox:Ht,scope:null,scoped:st,seamless:st,selected:st,shadowRootClonable:st,shadowRootDelegatesFocus:st,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:st,useMap:null,value:gn,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ht,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:st,declare:st,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:st,noHref:st,noShade:st,noWrap:st,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:gn,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:st,disableRemotePlayback:st,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:rS}),wL=ll({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:lr,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:Ht,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:st,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:Xs,g2:Xs,glyphName:Xs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:lr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,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:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lr,rev:lr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lr,requiredFeatures:lr,requiredFonts:lr,requiredFormats:lr,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:lr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lr,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nS}),aS=ll({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),iS=ll({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rS}),sS=ll({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EL={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"},SL=/[A-Z]/g,tv=/-[a-z]/g,_L=/^data[-\w.:]+$/i;function kL(e,t){const r=Xp(t);let i=t,s=Wn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&_L.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(tv,CL);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!tv.test(o)){let c=o.replace(SL,NL);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Qm}return new s(i,t)}function NL(e){return"-"+e.toLowerCase()}function CL(e){return e.charAt(1).toUpperCase()}const TL=eS([tS,vL,aS,iS,sS],"html"),Zm=eS([tS,wL,aS,iS,sS],"svg");function AL(e){return e.join(" ").trim()}var Bs={},Zh,nv;function RL(){if(nv)return Zh;nv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
440
+ `,f="/",g="*",m="",x="comment",v="declaration";function E(_,N){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];N=N||{};var T=1,C=1;function j(q){var $=q.match(t);$&&(T+=$.length);var I=q.lastIndexOf(h);C=~I?q.length-I:C+q.length}function D(){var q={line:T,column:C};return function($){return $.position=new A(q),X(),$}}function A(q){this.start=q,this.end={line:T,column:C},this.source=N.source}A.prototype.content=_;function P(q){var $=new Error(N.source+":"+T+":"+C+": "+q);if($.reason=q,$.filename=N.source,$.line=T,$.column=C,$.source=_,!N.silent)throw $}function K(q){var $=q.exec(_);if($){var I=$[0];return j(I),_=_.slice(I.length),$}}function X(){K(r)}function O(q){var $;for(q=q||[];$=U();)$!==!1&&q.push($);return q}function U(){var q=D();if(!(f!=_.charAt(0)||g!=_.charAt(1))){for(var $=2;m!=_.charAt($)&&(g!=_.charAt($)||f!=_.charAt($+1));)++$;if($+=2,m===_.charAt($-1))return P("End of comment missing");var I=_.slice(2,$-2);return C+=2,j(I),_=_.slice($),C+=2,q({type:x,comment:I})}}function J(){var q=D(),$=K(i);if($){if(U(),!K(s))return P("property missing ':'");var I=K(o),W=q({type:v,property:S($[0].replace(e,m)),value:I?S(I[0].replace(e,m)):m});return K(c),W}}function ce(){var q=[];O(q);for(var $;$=J();)$!==!1&&(q.push($),O(q));return q}return X(),ce()}function S(_){return _?_.replace(d,m):m}return Zh=E,Zh}var rv;function OL(){if(rv)return Bs;rv=1;var e=Bs&&Bs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=r;const t=e(RL());function r(i,s){let o=null;if(!i||typeof i!="string")return o;const c=(0,t.default)(i),d=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:f,value:g}=h;d?s(f,g,h):g&&(o=o||{},o[f]=g)}),o}return Bs}var io={},av;function ML(){if(av)return io;av=1,Object.defineProperty(io,"__esModule",{value:!0}),io.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(f){return!f||r.test(f)||e.test(f)},c=function(f,g){return g.toUpperCase()},d=function(f,g){return"".concat(g,"-")},h=function(f,g){return g===void 0&&(g={}),o(f)?f:(f=f.toLowerCase(),g.reactCompat?f=f.replace(s,d):f=f.replace(i,d),f.replace(t,c))};return io.camelCase=h,io}var so,iv;function DL(){if(iv)return so;iv=1;var e=so&&so.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(OL()),r=ML();function i(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,h){d&&h&&(c[(0,r.camelCase)(d,o)]=h)}),c}return i.default=i,so=i,so}var jL=DL();const LL=tl(jL),lS=oS("end"),Jm=oS("start");function oS(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};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 IL(e){const t=Jm(e),r=lS(e);if(t&&r)return{start:t,end:r}}function mo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sv(e.position):"start"in e||"end"in e?sv(e):"line"in e||"column"in e?Jp(e):""}function Jp(e){return lv(e&&e.line)+":"+lv(e&&e.column)}function sv(e){return Jp(e&&e.start)+"-"+Jp(e&&e.end)}function lv(e){return e&&typeof e=="number"?e:1}class Mn extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?o.ruleId=i:(o.source=i.slice(0,h),o.ruleId=i.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=mo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mn.prototype.file="";Mn.prototype.name="";Mn.prototype.reason="";Mn.prototype.message="";Mn.prototype.stack="";Mn.prototype.column=void 0;Mn.prototype.line=void 0;Mn.prototype.ancestors=void 0;Mn.prototype.cause=void 0;Mn.prototype.fatal=void 0;Mn.prototype.place=void 0;Mn.prototype.ruleId=void 0;Mn.prototype.source=void 0;const eg={}.hasOwnProperty,zL=new Map,PL=/[A-Z]/g,BL=new Set(["table","tbody","thead","tfoot","tr"]),UL=new Set(["td","th"]),cS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=WL(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=YL(r,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Zm:TL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=uS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function uS(e,t,r){if(t.type==="element")return $L(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return HL(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qL(e,t,r);if(t.type==="mdxjsEsm")return KL(e,t);if(t.type==="root")return GL(e,t,r);if(t.type==="text")return VL(e,t)}function $L(e,t,r){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=Zm,e.schema=s),e.ancestors.push(t);const o=fS(e,t.tagName,!1),c=XL(e,t);let d=ng(e,t);return BL.has(t.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!yL(h):!0})),dS(e,c,o,t),tg(c,d),e.ancestors.pop(),e.schema=i,e.create(t,o,c,r)}function HL(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}To(e,t.position)}function KL(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);To(e,t.position)}function qL(e,t,r){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=Zm,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:fS(e,t.name,!0),c=QL(e,t),d=ng(e,t);return dS(e,c,o,t),tg(c,d),e.ancestors.pop(),e.schema=i,e.create(t,o,c,r)}function GL(e,t,r){const i={};return tg(i,ng(e,t)),e.create(t,e.Fragment,i,r)}function VL(e,t){return t.value}function dS(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function tg(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function YL(e,t,r){return i;function i(s,o,c,d){const f=Array.isArray(c.children)?r:t;return d?f(o,c,d):f(o,c)}}function WL(e,t){return r;function r(i,s,o,c){const d=Array.isArray(o.children),h=Jm(i);return t(s,o,c,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function XL(e,t){const r={};let i,s;for(s in t.properties)if(s!=="children"&&eg.call(t.properties,s)){const o=ZL(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&UL.has(t.tagName)?i=d:r[c]=d}}if(i){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function QL(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const o=i.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else To(e,t.position);else{const s=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else To(e,t.position);else o=i.value===null?!0:i.value;r[s]=o}return r}function ng(e,t){const r=[];let i=-1;const s=e.passKeys?new Map:zL;for(;++i<t.children.length;){const o=t.children[i];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const f=s.get(h)||0;c=h+"-"+f,s.set(h,f+1)}}const d=uS(e,o,c);d!==void 0&&r.push(d)}return r}function ZL(e,t,r){const i=kL(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?hL(r):AL(r)),i.property==="style"){let s=typeof r=="object"?r:JL(e,String(r));return e.stylePropertyNameCase==="css"&&(s=eI(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?EL[i.property]||i.property:i.attribute,r]}}function JL(e,t){try{return LL(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,s=new Mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=cS+"#cannot-parse-style-attribute",s}}function fS(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const d=Zx(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}i=c}else i=Zx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return eg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);To(e)}function To(e,t){const r=new Mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=cS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function eI(e){const t={};let r;for(r in e)eg.call(e,r)&&(t[tI(r)]=e[r]);return t}function tI(e){let t=e.replace(PL,nI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function nI(e){return"-"+e.toLowerCase()}const Jh={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"]},rI={};function rg(e,t){const r=rI,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return hS(e,i,s)}function hS(e,t,r){if(aI(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ov(e.children,t,r)}return Array.isArray(e)?ov(e,t,r):""}function ov(e,t,r){const i=[];let s=-1;for(;++s<e.length;)i[s]=hS(e[s],t,r);return i.join("")}function aI(e){return!!(e&&typeof e=="object")}const cv=document.createElement("i");function ag(e){const t="&"+e+";";cv.innerHTML=t;const r=cv.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function dr(e,t,r,i){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);o<i.length;)c=i.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function kr(e,t){return e.length>0?(dr(e,e.length,0,t),e):t}const uv={}.hasOwnProperty;function pS(e){const t={};let r=-1;for(;++r<e.length;)iI(t,e[r]);return t}function iI(e,t){let r;for(r in t){const s=(uv.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let c;if(o)for(c in o){uv.call(s,c)||(s[c]=[]);const d=o[c];sI(s[c],Array.isArray(d)?d:d?[d]:[])}}}function sI(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);dr(e,0,0,i)}function mS(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function jr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zn=bi(/[A-Za-z]/),Rn=bi(/[\dA-Za-z]/),lI=bi(/[#-'*+\--9=?A-Z^-~]/);function Bu(e){return e!==null&&(e<32||e===127)}const em=bi(/\d/),oI=bi(/[\dA-Fa-f]/),cI=bi(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function Ut(e){return e!==null&&(e<0||e===32)}function ht(e){return e===-2||e===-1||e===32}const xd=bi(new RegExp("\\p{P}|\\p{S}","u")),Wi=bi(/\s/);function bi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ol(e){const t=[];let r=-1,i=0,s=0;for(;++r<e.length;){const o=e.charCodeAt(r);let c="";if(o===37&&Rn(e.charCodeAt(r+1))&&Rn(e.charCodeAt(r+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(i,r),encodeURIComponent(c)),i=r+s+1,c=""),s&&(r+=s,s=0)}return t.join("")+e.slice(i)}function vt(e,t,r,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return ht(h)?(e.enter(r),d(h)):t(h)}function d(h){return ht(h)&&o++<s?(e.consume(h),d):(e.exit(r),t(h))}}const uI={tokenize:dI};function dI(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let r;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),vt(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ke(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const fI={tokenize:hI},dv={tokenize:pI};function hI(e){const t=this,r=[];let i=0,s,o,c;return d;function d(C){if(i<r.length){const j=r[i];return t.containerState=j[1],e.attempt(j[0].continuation,h,f)(C)}return f(C)}function h(C){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&T();const j=t.events.length;let D=j,A;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){A=t.events[D][1].end;break}N(i);let P=j;for(;P<t.events.length;)t.events[P][1].end={...A},P++;return dr(t.events,D+1,0,t.events.slice(j)),t.events.length=P,f(C)}return d(C)}function f(C){if(i===r.length){if(!s)return x(C);if(s.currentConstruct&&s.currentConstruct.concrete)return E(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(dv,g,m)(C)}function g(C){return s&&T(),N(i),x(C)}function m(C){return t.parser.lazy[t.now().line]=i!==r.length,c=t.now().offset,E(C)}function x(C){return t.containerState={},e.attempt(dv,v,E)(C)}function v(C){return i++,r.push([t.currentConstruct,t.containerState]),x(C)}function E(C){if(C===null){s&&T(),N(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),S(C)}function S(C){if(C===null){_(e.exit("chunkFlow"),!0),N(0),e.consume(C);return}return Ke(C)?(e.consume(C),_(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(C),S)}function _(C,j){const D=t.sliceStream(C);if(j&&D.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(D),t.parser.lazy[C.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<c&&(!s.events[A][1].end||s.events[A][1].end.offset>c))return;const P=t.events.length;let K=P,X,O;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(X){O=t.events[K][1].end;break}X=!0}for(N(i),A=P;A<t.events.length;)t.events[A][1].end={...O},A++;dr(t.events,K+1,0,t.events.slice(P)),t.events.length=A}}function N(C){let j=r.length;for(;j-- >C;){const D=r[j];t.containerState=D[1],D[0].exit.call(t,e)}r.length=C}function T(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function pI(e,t,r){return vt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function el(e){if(e===null||Ut(e)||Wi(e))return 1;if(xd(e))return 2}function vd(e,t,r){const i=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!i.includes(o)&&(t=o(t,r),i.push(o))}return t}const tm={name:"attention",resolveAll:mI,tokenize:gI};function mI(e,t){let r=-1,i,s,o,c,d,h,f,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const m={...e[i][1].end},x={...e[r][1].start};fv(m,-h),fv(x,h),c={type:h>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},o={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[i][1].end={...c.start},e[r][1].start={...d.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=kr(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=kr(f,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),f=kr(f,vd(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),f=kr(f,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,f=kr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,dr(e,i-1,r-i+3,f),r=i+f.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function gI(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,s=el(i);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===o)return e.consume(h),d;const f=e.exit("attentionSequence"),g=el(h),m=!g||g===2&&s||r.includes(h),x=!s||s===2&&g||r.includes(i);return f._open=!!(o===42?m:m&&(s||!x)),f._close=!!(o===42?x:x&&(g||!m)),t(h)}}function fv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const bI={name:"autolink",tokenize:yI};function yI(e,t,r){let i=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return zn(v)?(e.consume(v),c):v===64?r(v):f(v)}function c(v){return v===43||v===45||v===46||Rn(v)?(i=1,d(v)):f(v)}function d(v){return v===58?(e.consume(v),i=0,h):(v===43||v===45||v===46||Rn(v))&&i++<32?(e.consume(v),d):(i=0,f(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Bu(v)?r(v):(e.consume(v),h)}function f(v){return v===64?(e.consume(v),g):lI(v)?(e.consume(v),f):r(v)}function g(v){return Rn(v)?m(v):r(v)}function m(v){return v===46?(e.consume(v),i=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||Rn(v))&&i++<63){const E=v===45?x:m;return e.consume(v),E}return r(v)}}const Po={partial:!0,tokenize:xI};function xI(e,t,r){return i;function i(o){return ht(o)?vt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Ke(o)?t(o):r(o)}}const gS={continuation:{tokenize:wI},exit:EI,name:"blockQuote",tokenize:vI};function vI(e,t,r){const i=this;return s;function s(c){if(c===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return r(c)}function o(c){return ht(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function wI(e,t,r){const i=this;return s;function s(c){return ht(c)?vt(e,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(gS,t,r)(c)}}function EI(e){e.exit("blockQuote")}const bS={name:"characterEscape",tokenize:SI};function SI(e,t,r){return i;function i(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return cI(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const yS={name:"characterReference",tokenize:_I};function _I(e,t,r){const i=this;let s=0,o,c;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),h}function h(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,c=Rn,g(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=oI,g):(e.enter("characterReferenceValue"),o=7,c=em,g(m))}function g(m){if(m===59&&s){const x=e.exit("characterReferenceValue");return c===Rn&&!ag(i.sliceSerialize(x))?r(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(m)&&s++<o?(e.consume(m),g):r(m)}}const hv={partial:!0,tokenize:NI},pv={concrete:!0,name:"codeFenced",tokenize:kI};function kI(e,t,r){const i=this,s={partial:!0,tokenize:D};let o=0,c=0,d;return h;function h(A){return f(A)}function f(A){const P=i.events[i.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,d=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===d?(c++,e.consume(A),g):c<3?r(A):(e.exit("codeFencedFenceSequence"),ht(A)?vt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||Ke(A)?(e.exit("codeFencedFence"),i.interrupt?t(A):e.check(hv,S,j)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===null||Ke(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):ht(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),vt(e,v,"whitespace")(A)):A===96&&A===d?r(A):(e.consume(A),x)}function v(A){return A===null||Ke(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Ke(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===d?r(A):(e.consume(A),E)}function S(A){return e.attempt(s,j,_)(A)}function _(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),N}function N(A){return o>0&&ht(A)?vt(e,T,"linePrefix",o+1)(A):T(A)}function T(A){return A===null||Ke(A)?e.check(hv,S,j)(A):(e.enter("codeFlowValue"),C(A))}function C(A){return A===null||Ke(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),C)}function j(A){return e.exit("codeFenced"),t(A)}function D(A,P,K){let X=0;return O;function O($){return A.enter("lineEnding"),A.consume($),A.exit("lineEnding"),U}function U($){return A.enter("codeFencedFence"),ht($)?vt(A,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):J($)}function J($){return $===d?(A.enter("codeFencedFenceSequence"),ce($)):K($)}function ce($){return $===d?(X++,A.consume($),ce):X>=c?(A.exit("codeFencedFenceSequence"),ht($)?vt(A,q,"whitespace")($):q($)):K($)}function q($){return $===null||Ke($)?(A.exit("codeFencedFence"),P($)):K($)}}}function NI(e,t,r){const i=this;return s;function s(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return i.parser.lazy[i.now().line]?r(c):t(c)}}const ep={name:"codeIndented",tokenize:TI},CI={partial:!0,tokenize:AI};function TI(e,t,r){const i=this;return s;function s(f){return e.enter("codeIndented"),vt(e,o,"linePrefix",5)(f)}function o(f){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(f):r(f)}function c(f){return f===null?h(f):Ke(f)?e.attempt(CI,c,h)(f):(e.enter("codeFlowValue"),d(f))}function d(f){return f===null||Ke(f)?(e.exit("codeFlowValue"),c(f)):(e.consume(f),d)}function h(f){return e.exit("codeIndented"),t(f)}}function AI(e,t,r){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?r(c):Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):vt(e,o,"linePrefix",5)(c)}function o(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Ke(c)?s(c):r(c)}}const RI={name:"codeText",previous:MI,resolve:OI,tokenize:DI};function OI(e){let t=e.length-4,r=3,i,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function MI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function DI(e,t,r){let i=0,s,o;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),i++,d):(e.exit("codeTextSequence"),h(m))}function h(m){return m===null?r(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),h):m===96?(o=e.enter("codeTextSequence"),s=0,g(m)):Ke(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ke(m)?(e.exit("codeTextData"),h(m)):(e.consume(m),f)}function g(m){return m===96?(e.consume(m),s++,g):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",f(m))}}class jI{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const s=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&lo(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),lo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),lo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);lo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);lo(this.left,r.reverse())}}}function lo(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function xS(e){const t={};let r=-1,i,s,o,c,d,h,f;const g=new jI(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(i=g.get(r),r&&i[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,LI(g,r)),r=t[r],f=!0);else if(i[1]._container){for(o=r,s=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...g.get(s)[1].start},d=g.slice(s,r),d.unshift(i),g.splice(s,r-s+1,d))}}return dr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!f}function LI(e,t){const r=e.get(t)[1],i=e.get(t)[2];let s=t-1;const o=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,h=[],f={};let g,m,x=-1,v=r,E=0,S=0;const _=[S];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(g=i.sliceStream(v),v.next||g.push(null),m&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=r;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(S=x+1,_.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),x=_.length;x--;){const N=d.slice(_[x],_[x+1]),T=o.pop();h.push([T,T+N.length-1]),e.splice(T,2,N)}for(h.reverse(),x=-1;++x<h.length;)f[E+h[x][0]]=E+h[x][1],E+=h[x][1]-h[x][0]-1;return f}const II={resolve:PI,tokenize:BI},zI={partial:!0,tokenize:UI};function PI(e){return xS(e),e}function BI(e,t){let r;return i;function i(d){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):Ke(d)?e.check(zI,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function UI(e,t,r){const i=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),vt(e,o,"linePrefix")}function o(c){if(c===null||Ke(c))return r(c);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(i.parser.constructs.flow,r,t)(c)}}function vS(e,t,r,i,s,o,c,d,h){const f=h||Number.POSITIVE_INFINITY;let g=0;return m;function m(N){return N===60?(e.enter(i),e.enter(s),e.enter(o),e.consume(N),e.exit(o),x):N===null||N===32||N===41||Bu(N)?r(N):(e.enter(i),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),S(N))}function x(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(s),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(d),x(N)):N===null||N===60||Ke(N)?r(N):(e.consume(N),N===92?E:v)}function E(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function S(N){return!g&&(N===null||N===41||Ut(N))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(i),t(N)):g<f&&N===40?(e.consume(N),g++,S):N===41?(e.consume(N),g--,S):N===null||N===32||N===40||Bu(N)?r(N):(e.consume(N),N===92?_:S)}function _(N){return N===40||N===41||N===92?(e.consume(N),S):S(N)}}function wS(e,t,r,i,s,o){const c=this;let d=0,h;return f;function f(v){return e.enter(i),e.enter(s),e.consume(v),e.exit(s),e.enter(o),g}function g(v){return d>999||v===null||v===91||v===93&&!h||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(i),t):Ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||Ke(v)||d++>999?(e.exit("chunkString"),g(v)):(e.consume(v),h||(h=!ht(v)),v===92?x:m)}function x(v){return v===91||v===92||v===93?(e.consume(v),d++,m):m(v)}}function ES(e,t,r,i,s,o){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(i),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,h):r(x)}function h(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(i),t):(e.enter(o),f(x))}function f(x){return x===c?(e.exit(o),h(c)):x===null?r(x):Ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),vt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||Ke(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?m:g)}function m(x){return x===c||x===92?(e.consume(x),g):g(x)}}function go(e,t){let r;return i;function i(s){return Ke(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,i):ht(s)?vt(e,i,r?"linePrefix":"lineSuffix")(s):t(s)}}const FI={name:"definition",tokenize:HI},$I={partial:!0,tokenize:KI};function HI(e,t,r){const i=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return wS.call(i,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return s=jr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):r(v)}function h(v){return Ut(v)?go(e,f)(v):f(v)}function f(v){return vS(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt($I,m,m)(v)}function m(v){return ht(v)?vt(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Ke(v)?(e.exit("definition"),i.parser.defined.push(s),t(v)):r(v)}}function KI(e,t,r){return i;function i(d){return Ut(d)?go(e,s)(d):r(d)}function s(d){return ES(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return ht(d)?vt(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Ke(d)?t(d):r(d)}}const qI={name:"hardBreakEscape",tokenize:GI};function GI(e,t,r){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Ke(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const VI={name:"headingAtx",resolve:YI,tokenize:WI};function YI(e,t){let r=e.length-2,i=3,s,o;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},o={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},dr(e,i,r-i+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function WI(e,t,r){let i=0;return s;function s(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&i++<6?(e.consume(g),c):g===null||Ut(g)?(e.exit("atxHeadingSequence"),d(g)):r(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||Ke(g)?(e.exit("atxHeading"),t(g)):ht(g)?vt(e,d,"whitespace")(g):(e.enter("atxHeadingText"),f(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),d(g))}function f(g){return g===null||g===35||Ut(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),f)}}const XI=["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"],mv=["pre","script","style","textarea"],QI={concrete:!0,name:"htmlFlow",resolveTo:e3,tokenize:t3},ZI={partial:!0,tokenize:r3},JI={partial:!0,tokenize:n3};function e3(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function t3(e,t,r){const i=this;let s,o,c,d,h;return f;function f(R){return g(R)}function g(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),x):R===47?(e.consume(R),o=!0,S):R===63?(e.consume(R),s=3,i.interrupt?t:L):zn(R)?(e.consume(R),c=String.fromCharCode(R),_):r(R)}function x(R){return R===45?(e.consume(R),s=2,v):R===91?(e.consume(R),s=5,d=0,E):zn(R)?(e.consume(R),s=4,i.interrupt?t:L):r(R)}function v(R){return R===45?(e.consume(R),i.interrupt?t:L):r(R)}function E(R){const ee="CDATA[";return R===ee.charCodeAt(d++)?(e.consume(R),d===ee.length?i.interrupt?t:J:E):r(R)}function S(R){return zn(R)?(e.consume(R),c=String.fromCharCode(R),_):r(R)}function _(R){if(R===null||R===47||R===62||Ut(R)){const ee=R===47,ge=c.toLowerCase();return!ee&&!o&&mv.includes(ge)?(s=1,i.interrupt?t(R):J(R)):XI.includes(c.toLowerCase())?(s=6,ee?(e.consume(R),N):i.interrupt?t(R):J(R)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(R):o?T(R):C(R))}return R===45||Rn(R)?(e.consume(R),c+=String.fromCharCode(R),_):r(R)}function N(R){return R===62?(e.consume(R),i.interrupt?t:J):r(R)}function T(R){return ht(R)?(e.consume(R),T):O(R)}function C(R){return R===47?(e.consume(R),O):R===58||R===95||zn(R)?(e.consume(R),j):ht(R)?(e.consume(R),C):O(R)}function j(R){return R===45||R===46||R===58||R===95||Rn(R)?(e.consume(R),j):D(R)}function D(R){return R===61?(e.consume(R),A):ht(R)?(e.consume(R),D):C(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),h=R,P):ht(R)?(e.consume(R),A):K(R)}function P(R){return R===h?(e.consume(R),h=null,X):R===null||Ke(R)?r(R):(e.consume(R),P)}function K(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ut(R)?D(R):(e.consume(R),K)}function X(R){return R===47||R===62||ht(R)?C(R):r(R)}function O(R){return R===62?(e.consume(R),U):r(R)}function U(R){return R===null||Ke(R)?J(R):ht(R)?(e.consume(R),U):r(R)}function J(R){return R===45&&s===2?(e.consume(R),I):R===60&&s===1?(e.consume(R),W):R===62&&s===4?(e.consume(R),z):R===63&&s===3?(e.consume(R),L):R===93&&s===5?(e.consume(R),Y):Ke(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ZI,V,ce)(R)):R===null||Ke(R)?(e.exit("htmlFlowData"),ce(R)):(e.consume(R),J)}function ce(R){return e.check(JI,q,V)(R)}function q(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),$}function $(R){return R===null||Ke(R)?ce(R):(e.enter("htmlFlowData"),J(R))}function I(R){return R===45?(e.consume(R),L):J(R)}function W(R){return R===47?(e.consume(R),c="",Q):J(R)}function Q(R){if(R===62){const ee=c.toLowerCase();return mv.includes(ee)?(e.consume(R),z):J(R)}return zn(R)&&c.length<8?(e.consume(R),c+=String.fromCharCode(R),Q):J(R)}function Y(R){return R===93?(e.consume(R),L):J(R)}function L(R){return R===62?(e.consume(R),z):R===45&&s===2?(e.consume(R),L):J(R)}function z(R){return R===null||Ke(R)?(e.exit("htmlFlowData"),V(R)):(e.consume(R),z)}function V(R){return e.exit("htmlFlow"),t(R)}}function n3(e,t,r){const i=this;return s;function s(c){return Ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):r(c)}function o(c){return i.parser.lazy[i.now().line]?r(c):t(c)}}function r3(e,t,r){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Po,t,r)}}const a3={name:"htmlText",tokenize:i3};function i3(e,t,r){const i=this;let s,o,c;return d;function d(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),h}function h(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),D):L===63?(e.consume(L),C):zn(L)?(e.consume(L),K):r(L)}function f(L){return L===45?(e.consume(L),g):L===91?(e.consume(L),o=0,E):zn(L)?(e.consume(L),T):r(L)}function g(L){return L===45?(e.consume(L),v):r(L)}function m(L){return L===null?r(L):L===45?(e.consume(L),x):Ke(L)?(c=m,W(L)):(e.consume(L),m)}function x(L){return L===45?(e.consume(L),v):m(L)}function v(L){return L===62?I(L):L===45?x(L):m(L)}function E(L){const z="CDATA[";return L===z.charCodeAt(o++)?(e.consume(L),o===z.length?S:E):r(L)}function S(L){return L===null?r(L):L===93?(e.consume(L),_):Ke(L)?(c=S,W(L)):(e.consume(L),S)}function _(L){return L===93?(e.consume(L),N):S(L)}function N(L){return L===62?I(L):L===93?(e.consume(L),N):S(L)}function T(L){return L===null||L===62?I(L):Ke(L)?(c=T,W(L)):(e.consume(L),T)}function C(L){return L===null?r(L):L===63?(e.consume(L),j):Ke(L)?(c=C,W(L)):(e.consume(L),C)}function j(L){return L===62?I(L):C(L)}function D(L){return zn(L)?(e.consume(L),A):r(L)}function A(L){return L===45||Rn(L)?(e.consume(L),A):P(L)}function P(L){return Ke(L)?(c=P,W(L)):ht(L)?(e.consume(L),P):I(L)}function K(L){return L===45||Rn(L)?(e.consume(L),K):L===47||L===62||Ut(L)?X(L):r(L)}function X(L){return L===47?(e.consume(L),I):L===58||L===95||zn(L)?(e.consume(L),O):Ke(L)?(c=X,W(L)):ht(L)?(e.consume(L),X):I(L)}function O(L){return L===45||L===46||L===58||L===95||Rn(L)?(e.consume(L),O):U(L)}function U(L){return L===61?(e.consume(L),J):Ke(L)?(c=U,W(L)):ht(L)?(e.consume(L),U):X(L)}function J(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),s=L,ce):Ke(L)?(c=J,W(L)):ht(L)?(e.consume(L),J):(e.consume(L),q)}function ce(L){return L===s?(e.consume(L),s=void 0,$):L===null?r(L):Ke(L)?(c=ce,W(L)):(e.consume(L),ce)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||Ut(L)?X(L):(e.consume(L),q)}function $(L){return L===47||L===62||Ut(L)?X(L):r(L)}function I(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function W(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Q}function Q(L){return ht(L)?vt(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):Y(L)}function Y(L){return e.enter("htmlTextData"),c(L)}}const ig={name:"labelEnd",resolveAll:c3,resolveTo:u3,tokenize:d3},s3={tokenize:f3},l3={tokenize:h3},o3={tokenize:p3};function c3(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==r.length&&dr(e,0,e.length,r),e}function u3(e,t){let r=e.length,i=0,s,o,c,d;for(;r--;)if(s=e[r][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=r,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=r);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[o+i+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",h,t],["enter",f,t]],d=kr(d,e.slice(o+1,o+i+3)),d=kr(d,[["enter",g,t]]),d=kr(d,vd(t.parser.constructs.insideSpan.null,e.slice(o+i+4,c-3),t)),d=kr(d,[["exit",g,t],e[c-2],e[c-1],["exit",f,t]]),d=kr(d,e.slice(c+1)),d=kr(d,[["exit",h,t]]),dr(e,o,e.length,d),e}function d3(e,t,r){const i=this;let s=i.events.length,o,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return d;function d(x){return o?o._inactive?m(x):(c=i.parser.defined.includes(jr(i.sliceSerialize({start:o.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),h):r(x)}function h(x){return x===40?e.attempt(s3,g,c?g:m)(x):x===91?e.attempt(l3,g,c?f:m)(x):c?g(x):m(x)}function f(x){return e.attempt(o3,g,m)(x)}function g(x){return t(x)}function m(x){return o._balanced=!0,r(x)}}function f3(e,t,r){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return Ut(m)?go(e,o)(m):o(m)}function o(m){return m===41?g(m):vS(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return Ut(m)?go(e,h)(m):g(m)}function d(m){return r(m)}function h(m){return m===34||m===39||m===40?ES(e,f,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function f(m){return Ut(m)?go(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):r(m)}}function h3(e,t,r){const i=this;return s;function s(d){return wS.call(i,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return i.parser.defined.includes(jr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):r(d)}function c(d){return r(d)}}function p3(e,t,r){return i;function i(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const m3={name:"labelStartImage",resolveAll:ig.resolveAll,tokenize:g3};function g3(e,t,r){const i=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):r(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):t(d)}}const b3={name:"labelStartLink",resolveAll:ig.resolveAll,tokenize:y3};function y3(e,t,r){const i=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):t(c)}}const tp={name:"lineEnding",tokenize:x3};function x3(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),vt(e,t,"linePrefix")}}const Nu={name:"thematicBreak",tokenize:v3};function v3(e,t,r){let i=0,s;return o;function o(f){return e.enter("thematicBreak"),c(f)}function c(f){return s=f,d(f)}function d(f){return f===s?(e.enter("thematicBreakSequence"),h(f)):i>=3&&(f===null||Ke(f))?(e.exit("thematicBreak"),t(f)):r(f)}function h(f){return f===s?(e.consume(f),i++,h):(e.exit("thematicBreakSequence"),ht(f)?vt(e,d,"whitespace")(f):d(f))}}const Yn={continuation:{tokenize:_3},exit:N3,name:"list",tokenize:S3},w3={partial:!0,tokenize:C3},E3={partial:!0,tokenize:k3};function S3(e,t,r){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(v){const E=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:em(v)){if(i.containerState.type||(i.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Nu,r,f)(v):f(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return r(v)}function h(v){return em(v)&&++c<10?(e.consume(v),h):(!i.interrupt||c<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):r(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Po,i.interrupt?r:g,e.attempt(w3,x,m))}function g(v){return i.containerState.initialBlankLine=!0,o++,x(v)}function m(v){return ht(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):r(v)}function x(v){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function _3(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(Po,s,o);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,vt(e,t,"listItemIndent",i.containerState.size+1)(d)}function o(d){return i.containerState.furtherBlankLines||!ht(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(E3,t,c)(d))}function c(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,vt(e,e.attempt(Yn,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function k3(e,t,r){const i=this;return vt(e,s,"listItemIndent",i.containerState.size+1);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?t(o):r(o)}}function N3(e){e.exit(this.containerState.type)}function C3(e,t,r){const i=this;return vt(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=i.events[i.events.length-1];return!ht(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const gv={name:"setextUnderline",resolveTo:T3,tokenize:A3};function T3(e,t){let r=e.length,i,s,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=c,e.push(["exit",c,t]),e}function A3(e,t,r){const i=this;let s;return o;function o(f){let g=i.events.length,m;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){m=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),s=f,c(f)):r(f)}function c(f){return e.enter("setextHeadingLineSequence"),d(f)}function d(f){return f===s?(e.consume(f),d):(e.exit("setextHeadingLineSequence"),ht(f)?vt(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||Ke(f)?(e.exit("setextHeadingLine"),t(f)):r(f)}}const R3={tokenize:O3};function O3(e){const t=this,r=e.attempt(Po,i,e.attempt(this.parser.constructs.flowInitial,s,vt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(II,s)),"linePrefix")));return r;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const M3={resolveAll:_S()},D3=SS("string"),j3=SS("text");function SS(e){return{resolveAll:_S(e==="text"?L3:void 0),tokenize:t};function t(r){const i=this,s=this.parser.constructs[e],o=r.attempt(s,c,d);return c;function c(g){return f(g)?o(g):d(g)}function d(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),h}function h(g){return f(g)?(r.exit("data"),o(g)):(r.consume(g),h)}function f(g){if(g===null)return!0;const m=s[g];let x=-1;if(m)for(;++x<m.length;){const v=m[x];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function _S(e){return t;function t(r,i){let s=-1,o;for(;++s<=r.length;)o===void 0?r[s]&&r[s][1].type==="data"&&(o=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==o+2&&(r[o][1].end=r[s-1][1].end,r.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(r,i):r}}function L3(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],s=t.sliceStream(i);let o=s.length,c=-1,d=0,h;for(;o--;){const f=s[o];if(typeof f=="string"){for(c=f.length;f.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(f===-2)h=!0,d++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(d=0),d){const f={type:r===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:i.start._bufferIndex+c,_index:i.start._index+o,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(r,0,["enter",f,t],["exit",f,t]),r+=2)}r++}return e}const I3={42:Yn,43:Yn,45:Yn,48:Yn,49:Yn,50:Yn,51:Yn,52:Yn,53:Yn,54:Yn,55:Yn,56:Yn,57:Yn,62:gS},z3={91:FI},P3={[-2]:ep,[-1]:ep,32:ep},B3={35:VI,42:Nu,45:[gv,Nu],60:QI,61:gv,95:Nu,96:pv,126:pv},U3={38:yS,92:bS},F3={[-5]:tp,[-4]:tp,[-3]:tp,33:m3,38:yS,42:tm,60:[bI,a3],91:b3,92:[qI,bS],93:ig,95:tm,96:RI},$3={null:[tm,M3]},H3={null:[42,95]},K3={null:[]},q3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:H3,contentInitial:z3,disable:K3,document:I3,flow:B3,flowInitial:P3,insideSpan:$3,string:U3,text:F3},Symbol.toStringTag,{value:"Module"}));function G3(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},o=[];let c=[],d=[];const h={attempt:P(D),check:P(A),consume:T,enter:C,exit:j,interrupt:P(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:m};let g=t.tokenize.call(f,h);return t.resolveAll&&o.push(t),f;function m(U){return c=kr(c,U),_(),c[c.length-1]!==null?[]:(K(t,0),f.events=vd(o,f.events,f),f.events)}function x(U,J){return Y3(v(U),J)}function v(U){return V3(c,U)}function E(){const{_bufferIndex:U,_index:J,line:ce,column:q,offset:$}=i;return{_bufferIndex:U,_index:J,line:ce,column:q,offset:$}}function S(U){s[U.line]=U.column,O()}function _(){let U;for(;i._index<c.length;){const J=c[i._index];if(typeof J=="string")for(U=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===U&&i._bufferIndex<J.length;)N(J.charCodeAt(i._bufferIndex));else N(J)}}function N(U){g=g(U)}function T(U){Ke(U)?(i.line++,i.column=1,i.offset+=U===-3?2:1,O()):U!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=U}function C(U,J){const ce=J||{};return ce.type=U,ce.start=E(),f.events.push(["enter",ce,f]),d.push(ce),ce}function j(U){const J=d.pop();return J.end=E(),f.events.push(["exit",J,f]),J}function D(U,J){K(U,J.from)}function A(U,J){J.restore()}function P(U,J){return ce;function ce(q,$,I){let W,Q,Y,L;return Array.isArray(q)?V(q):"tokenize"in q?V([q]):z(q);function z(oe){return re;function re(be){const Ce=be!==null&&oe[be],ke=be!==null&&oe.null,Ne=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return V(Ne)(be)}}function V(oe){return W=oe,Q=0,oe.length===0?I:R(oe[Q])}function R(oe){return re;function re(be){return L=X(),Y=oe,oe.partial||(f.currentConstruct=oe),oe.name&&f.parser.constructs.disable.null.includes(oe.name)?ge():oe.tokenize.call(J?Object.assign(Object.create(f),J):f,h,ee,ge)(be)}}function ee(oe){return U(Y,L),$}function ge(oe){return L.restore(),++Q<W.length?R(W[Q]):I}}}function K(U,J){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&dr(f.events,J,f.events.length-J,U.resolve(f.events.slice(J),f)),U.resolveTo&&(f.events=U.resolveTo(f.events,f))}function X(){const U=E(),J=f.previous,ce=f.currentConstruct,q=f.events.length,$=Array.from(d);return{from:q,restore:I};function I(){i=U,f.previous=J,f.currentConstruct=ce,f.events.length=q,d=$,O()}}function O(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function V3(e,t){const r=t.start._index,i=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(r===s)c=[e[r].slice(i,o)];else{if(c=e.slice(r,s),i>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(i):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function Y3(e,t){let r=-1;const i=[];let s;for(;++r<e.length;){const o=e[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
441
+ `;break}case-3:{c=`\r
442
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,i.push(c)}return i.join("")}function W3(e){const i={constructs:pS([q3,...(e||{}).extensions||[]]),content:s(uI),defined:[],document:s(fI),flow:s(R3),lazy:{},string:s(D3),text:s(j3)};return i;function s(o){return c;function c(d){return G3(i,o,d)}}}function X3(e){for(;!xS(e););return e}const bv=/[\0\t\n\r]/g;function Q3(){let e=1,t="",r=!0,i;return s;function s(o,c,d){const h=[];let f,g,m,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),m=0,t="",r&&(o.charCodeAt(0)===65279&&m++,r=void 0);m<o.length;){if(bv.lastIndex=m,f=bv.exec(o),x=f&&f.index!==void 0?f.index:o.length,v=o.charCodeAt(x),!f){t=o.slice(m);break}if(v===10&&m===x&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),m<x&&(h.push(o.slice(m,x)),e+=x-m),v){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}m=x+1}return d&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const Z3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function J3(e){return e.replace(Z3,e4)}function e4(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),o=s===120||s===88;return mS(r.slice(o?2:1),o?16:10)}return ag(r)||e}const kS={}.hasOwnProperty;function t4(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),n4(r)(X3(W3(r).document().write(Q3()(e,t,!0))))}function n4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:X,autolinkEmail:X,atxHeading:o(Tt),blockQuote:o(ke),characterEscape:X,characterReference:X,codeFenced:o(Ne),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Ne,c),codeText:o($e,c),codeTextData:X,data:X,codeFlowValue:X,definition:o(Je),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Pe),hardBreakEscape:o(Be),hardBreakTrailing:o(Be),htmlFlow:o(Qe,c),htmlFlowData:X,htmlText:o(Qe,c),htmlTextData:X,image:o(bt),label:c,link:o(te),listItem:o(Te),listItemValue:x,listOrdered:o(he,m),listUnordered:o(he),paragraph:o(Ie),reference:R,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Tt),strong:o(wt),thematicBreak:o(Wt)},exit:{atxHeading:h(),atxHeadingSequence:D,autolink:h(),autolinkEmail:Ce,autolinkProtocol:be,blockQuote:h(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:oe,characterReference:re,codeFenced:h(_),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:O,codeIndented:h(N),codeText:h($),codeTextData:O,data:O,definition:h(),definitionDestinationString:j,definitionLabelString:T,definitionTitleString:C,emphasis:h(),hardBreakEscape:h(J),hardBreakTrailing:h(J),htmlFlow:h(ce),htmlFlowData:O,htmlText:h(q),htmlTextData:O,image:h(W),label:Y,labelText:Q,lineEnding:U,link:h(I),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ee,resourceDestinationString:L,resourceTitleString:z,resource:V,setextHeading:h(K),setextHeadingLineSequence:P,setextHeadingText:A,strong:h(),thematicBreak:h()}};NS(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(B){let ie={type:"root",children:[]};const Ee={stack:[ie],tokenStack:[],config:t,enter:d,exit:f,buffer:c,resume:g,data:r},se=[];let ye=-1;for(;++ye<B.length;)if(B[ye][1].type==="listOrdered"||B[ye][1].type==="listUnordered")if(B[ye][0]==="enter")se.push(ye);else{const Re=se.pop();ye=s(B,Re,ye)}for(ye=-1;++ye<B.length;){const Re=t[B[ye][0]];kS.call(Re,B[ye][1].type)&&Re[B[ye][1].type].call(Object.assign({sliceSerialize:B[ye][2].sliceSerialize},Ee),B[ye][1])}if(Ee.tokenStack.length>0){const Re=Ee.tokenStack[Ee.tokenStack.length-1];(Re[1]||yv).call(Ee,void 0,Re[0])}for(ie.position={start:li(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:li(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)ie=t.transforms[ye](ie)||ie;return ie}function s(B,ie,Ee){let se=ie-1,ye=-1,Re=!1,ze,tt,rt,Ft;for(;++se<=Ee;){const We=B[se];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?ye++:ye--,Ft=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(ze&&!Ft&&!ye&&!rt&&(rt=se),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!ye&&We[0]==="enter"&&We[1].type==="listItemPrefix"||ye===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(ze){let Dn=se;for(tt=void 0;Dn--;){const en=B[Dn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;tt&&(B[tt][1].type="lineEndingBlank",Re=!0),en[1].type="lineEnding",tt=Dn}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}rt&&(!tt||rt<tt)&&(ze._spread=!0),ze.end=Object.assign({},tt?B[tt][1].start:We[1].end),B.splice(tt||se,0,["exit",ze,We[2]]),se++,Ee++}if(We[1].type==="listItemPrefix"){const Dn={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};ze=Dn,B.splice(se,0,["enter",Dn,We[2]]),se++,Ee++,rt=void 0,Ft=!0}}}return B[ie][1]._spread=Re,Ee}function o(B,ie){return Ee;function Ee(se){d.call(this,B(se),se),ie&&ie.call(this,se)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(B,ie,Ee){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([ie,Ee||void 0]),B.position={start:li(ie.start),end:void 0}}function h(B){return ie;function ie(Ee){B&&B.call(this,Ee),f.call(this,Ee)}}function f(B,ie){const Ee=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==B.type&&(ie?ie.call(this,B,se[0]):(se[1]||yv).call(this,B,se[0]));else throw new Error("Cannot close `"+B.type+"` ("+mo({start:B.start,end:B.end})+"): it’s not open");Ee.position.end=li(B.end)}function g(){return rg(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function x(B){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function v(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=B}function E(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=B}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.value=B.replace(/(\r?\n|\r)$/g,"")}function T(B){const ie=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ie,Ee.identifier=jr(this.sliceSerialize(B)).toLowerCase()}function C(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.title=B}function j(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.url=B}function D(B){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Ee=this.sliceSerialize(B).length;ie.depth=Ee}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function P(B){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function X(B){const Ee=this.stack[this.stack.length-1].children;let se=Ee[Ee.length-1];(!se||se.type!=="text")&&(se=lt(),se.position={start:li(B.start),end:void 0},Ee.push(se)),this.stack.push(se)}function O(B){const ie=this.stack.pop();ie.value+=this.sliceSerialize(B),ie.position.end=li(B.end)}function U(B){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ie.children[ie.children.length-1];Ee.position.end=li(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(X.call(this,B),O.call(this,B))}function J(){this.data.atHardBreak=!0}function ce(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.value=B}function q(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.value=B}function $(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.value=B}function I(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ie,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function W(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ie,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function Q(B){const ie=this.sliceSerialize(B),Ee=this.stack[this.stack.length-2];Ee.label=J3(ie),Ee.identifier=jr(ie).toLowerCase()}function Y(){const B=this.stack[this.stack.length-1],ie=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const se=B.children;Ee.children=se}else Ee.alt=ie}function L(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.url=B}function z(){const B=this.resume(),ie=this.stack[this.stack.length-1];ie.title=B}function V(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ee(B){const ie=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ie,Ee.identifier=jr(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ge(B){this.data.characterReferenceType=B.type}function oe(B){const ie=this.sliceSerialize(B),Ee=this.data.characterReferenceType;let se;Ee?(se=mS(ie,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=ag(ie);const ye=this.stack[this.stack.length-1];ye.value+=se}function re(B){const ie=this.stack.pop();ie.position.end=li(B.end)}function be(B){O.call(this,B);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(B)}function Ce(B){O.call(this,B);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(B)}function ke(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function Je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Tt(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function bt(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function he(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function Te(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function Wt(){return{type:"thematicBreak"}}}function li(e){return{line:e.line,column:e.column,offset:e.offset}}function NS(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?NS(e,i):r4(e,i)}}function r4(e,t){let r;for(r in t)if(kS.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function yv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mo({start:t.start,end:t.end})+") is still open")}function a4(e){const t=this;t.parser=r;function r(i){return t4(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function i4(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function s4(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
443
+ `}]}function l4(e,t){const r=t.value?t.value+`
444
+ `:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function o4(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function c4(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function u4(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=ol(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let c,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(i,d);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function d4(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function f4(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function CS(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function h4(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return CS(e,t);const s={src:ol(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function p4(e,t){const r={src:ol(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function m4(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function g4(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return CS(e,t);const s={href:ol(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function b4(e,t){const r={href:ol(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function y4(e,t,r){const i=e.all(t),s=r?x4(r):TS(t),o={},c=[];if(typeof t.checked=="boolean"){const g=i[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const g=i[d];(s||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
445
+ `}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const h=i[i.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
446
+ `});const f={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,f),e.applyData(t,f)}function x4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=TS(r[i])}return t}function TS(e){const t=e.spread;return t??e.children.length>1}function v4(e,t){const r={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function w4(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function E4(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function S4(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _4(e,t){const r=e.all(t),i=r.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],c),s.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=Jm(t.children[1]),h=lS(t.children[t.children.length-1]);d&&h&&(c.position={start:d,end:h}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function k4(e,t,r){const i=r?r.children:void 0,o=(i?i.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,d=c?c.length:t.children.length;let h=-1;const f=[];for(;++h<d;){const m=t.children[h],x={},v=c?c[h]:void 0;v&&(x.align=v);let E={type:"element",tagName:o,properties:x,children:[]};m&&(E.children=e.all(m),e.patch(m,E),E=e.applyData(m,E)),f.push(E)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,g),e.applyData(t,g)}function N4(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const xv=9,vv=32;function C4(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),s=0;const o=[];for(;i;)o.push(wv(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=r.exec(t);return o.push(wv(t.slice(s),s>0,!1)),o.join("")}function wv(e,t,r){let i=0,s=e.length;if(t){let o=e.codePointAt(i);for(;o===xv||o===vv;)i++,o=e.codePointAt(i)}if(r){let o=e.codePointAt(s-1);for(;o===xv||o===vv;)s--,o=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function T4(e,t){const r={type:"text",value:C4(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function A4(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const R4={blockquote:i4,break:s4,code:l4,delete:o4,emphasis:c4,footnoteReference:u4,heading:d4,html:f4,imageReference:h4,image:p4,inlineCode:m4,linkReference:g4,link:b4,listItem:y4,list:v4,paragraph:w4,root:E4,strong:S4,table:_4,tableCell:N4,tableRow:k4,text:T4,thematicBreak:A4,toml:cu,yaml:cu,definition:cu,footnoteDefinition:cu};function cu(){}const AS=-1,wd=0,bo=1,Uu=2,sg=3,lg=4,og=5,cg=6,RS=7,OS=8,Ev=typeof self=="object"?self:globalThis,O4=(e,t)=>{const r=(s,o)=>(e.set(o,s),s),i=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case wd:case AS:return r(c,s);case bo:{const d=r([],s);for(const h of c)d.push(i(h));return d}case Uu:{const d=r({},s);for(const[h,f]of c)d[i(h)]=i(f);return d}case sg:return r(new Date(c),s);case lg:{const{source:d,flags:h}=c;return r(new RegExp(d,h),s)}case og:{const d=r(new Map,s);for(const[h,f]of c)d.set(i(h),i(f));return d}case cg:{const d=r(new Set,s);for(const h of c)d.add(i(h));return d}case RS:{const{name:d,message:h}=c;return r(new Ev[d](h),s)}case OS:return r(BigInt(c),s);case"BigInt":return r(Object(BigInt(c)),s);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return r(new DataView(d),c)}}return r(new Ev[o](c),s)};return i},Sv=e=>O4(new Map,e)(0),Us="",{toString:M4}={},{keys:D4}=Object,oo=e=>{const t=typeof e;if(t!=="object"||!e)return[wd,t];const r=M4.call(e).slice(8,-1);switch(r){case"Array":return[bo,Us];case"Object":return[Uu,Us];case"Date":return[sg,Us];case"RegExp":return[lg,Us];case"Map":return[og,Us];case"Set":return[cg,Us];case"DataView":return[bo,r]}return r.includes("Array")?[bo,r]:r.includes("Error")?[RS,r]:[Uu,r]},uu=([e,t])=>e===wd&&(t==="function"||t==="symbol"),j4=(e,t,r,i)=>{const s=(c,d)=>{const h=i.push(c)-1;return r.set(d,h),h},o=c=>{if(r.has(c))return r.get(c);let[d,h]=oo(c);switch(d){case wd:{let g=c;switch(h){case"bigint":d=OS,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return s([AS],c)}return s([d,g],c)}case bo:{if(h){let x=c;return h==="DataView"?x=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(c)),s([h,[...x]],c)}const g=[],m=s([d,g],c);for(const x of c)g.push(o(x));return m}case Uu:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const g=[],m=s([d,g],c);for(const x of D4(c))(e||!uu(oo(c[x])))&&g.push([o(x),o(c[x])]);return m}case sg:return s([d,c.toISOString()],c);case lg:{const{source:g,flags:m}=c;return s([d,{source:g,flags:m}],c)}case og:{const g=[],m=s([d,g],c);for(const[x,v]of c)(e||!(uu(oo(x))||uu(oo(v))))&&g.push([o(x),o(v)]);return m}case cg:{const g=[],m=s([d,g],c);for(const x of c)(e||!uu(oo(x)))&&g.push(o(x));return m}}const{message:f}=c;return s([d,{name:h,message:f}],c)};return o},_v=(e,{json:t,lossy:r}={})=>{const i=[];return j4(!(t||r),!!t,new Map,i)(e),i},Fu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Sv(_v(e,t)):structuredClone(e):(e,t)=>Sv(_v(e,t));function L4(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function I4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function z4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||L4,i=e.options.footnoteBackLabel||I4,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const g=e.all(f),m=String(f.identifier).toUpperCase(),x=ol(m.toLowerCase());let v=0;const E=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++v<=S;){E.length>0&&E.push({type:"text",value:" "});let T=typeof r=="string"?r:r(h,v);typeof T=="string"&&(T={type:"text",value:T}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,v),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const _=g[g.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const T=_.children[_.children.length-1];T&&T.type==="text"?T.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...E)}else g.push(...E);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(f,N),d.push(N)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Fu(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
447
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
448
+ `}]}}const Bo=(function(e){if(e==null)return F4;if(typeof e=="function")return Ed(e);if(typeof e=="object")return Array.isArray(e)?P4(e):B4(e);if(typeof e=="string")return U4(e);throw new Error("Expected function, string, or object as test")});function P4(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Bo(e[r]);return Ed(i);function i(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function B4(e){const t=e;return Ed(r);function r(i){const s=i;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function U4(e){return Ed(t);function t(r){return r&&r.type===e}}function Ed(e){return t;function t(r,i,s){return!!($4(r)&&e.call(this,r,typeof i=="number"?i:void 0,s||void 0))}}function F4(){return!0}function $4(e){return e!==null&&typeof e=="object"&&"type"in e}const MS=[],H4=!0,nm=!1,K4="skip";function DS(e,t,r,i){let s;typeof t=="function"&&typeof r!="function"?(i=r,r=t):s=t;const o=Bo(s),c=i?-1:1;d(e,void 0,[])();function d(h,f,g){const m=h&&typeof h=="object"?h:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=MS,E,S,_;if((!t||o(h,f,g[g.length-1]||void 0))&&(v=q4(r(h,g)),v[0]===nm))return v;if("children"in h&&h.children){const N=h;if(N.children&&v[0]!==K4)for(S=(i?N.children.length:-1)+c,_=g.concat(N);S>-1&&S<N.children.length;){const T=N.children[S];if(E=d(T,S,_)(),E[0]===nm)return E;S=typeof E[1]=="number"?E[1]:S+c}}return v}}}function q4(e){return Array.isArray(e)?e:typeof e=="number"?[H4,e]:e==null?MS:[e]}function Sd(e,t,r,i){let s,o,c;typeof t=="function"&&typeof r!="function"?(o=void 0,c=t,s=r):(o=t,c=r,s=i),DS(e,o,d,s);function d(h,f){const g=f[f.length-1],m=g?g.children.indexOf(h):void 0;return c(h,m,g)}}const rm={}.hasOwnProperty,G4={};function V4(e,t){const r=t||G4,i=new Map,s=new Map,o=new Map,c={...R4,...r.handlers},d={all:f,applyData:W4,definitionById:i,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:r,patch:Y4,wrap:Q4};return Sd(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?i:s,x=String(g.identifier).toUpperCase();m.has(x)||m.set(x,g)}}),d;function h(g,m){const x=g.type,v=d.handlers[x];if(rm.call(d.handlers,x)&&v)return v(d,g,m);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in g){const{children:S,..._}=g,N=Fu(_);return N.children=d.all(g),N}return Fu(g)}return(d.options.unknownHandler||X4)(d,g,m)}function f(g){const m=[];if("children"in g){const x=g.children;let v=-1;for(;++v<x.length;){const E=d.one(x[v],g);if(E){if(v&&x[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=kv(E.value)),!Array.isArray(E)&&E.type==="element")){const S=E.children[0];S&&S.type==="text"&&(S.value=kv(S.value))}Array.isArray(E)?m.push(...E):m.push(E)}}}return m}}function Y4(e,t){e.position&&(t.position=IL(e))}function W4(e,t){let r=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const c="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,Fu(o)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function X4(e,t){const r=t.data||{},i="value"in t&&!(rm.call(r,"hProperties")||rm.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Q4(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
449
+ `});++i<e.length;)i&&r.push({type:"text",value:`
450
+ `}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
451
+ `}),r}function kv(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Nv(e,t){const r=V4(e,t),i=r.one(e,void 0),s=z4(r),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
452
+ `},s),o}function Z4(e,t){return e&&"run"in e?async function(r,i){const s=Nv(r,{file:i,...t});await e.run(s,i)}:function(r,i){return Nv(r,{file:i,...e||t})}}function Cv(e){if(e)throw e}var np,Tv;function J4(){if(Tv)return np;Tv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var g=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!g&&!m)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},c=function(f,g){r&&g.name==="__proto__"?r(f,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):f[g.name]=g.newValue},d=function(f,g){if(g==="__proto__")if(e.call(f,g)){if(i)return i(f,g).value}else return;return f[g]};return np=function h(){var f,g,m,x,v,E,S=arguments[0],_=1,N=arguments.length,T=!1;for(typeof S=="boolean"&&(T=S,S=arguments[1]||{},_=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});_<N;++_)if(f=arguments[_],f!=null)for(g in f)m=d(S,g),x=d(f,g),S!==x&&(T&&x&&(o(x)||(v=s(x)))?(v?(v=!1,E=m&&s(m)?m:[]):E=m&&o(m)?m:{},c(S,{name:g,newValue:h(T,E,x)})):typeof x<"u"&&c(S,{name:g,newValue:x}));return S},np}var ez=J4();const rp=tl(ez);function am(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tz(){const e=[],t={run:r,use:i};return t;function r(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(h,...f){const g=e[++o];let m=-1;if(h){c(h);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,g?nz(g,d)(...f):c(null,...f)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function nz(e,t){let r;return i;function i(...c){const d=e.length>c.length;let h;d&&c.push(s);try{h=e.apply(this,c)}catch(f){const g=f;if(d&&r)throw g;return s(g)}d||(h&&h.then&&typeof h.then=="function"?h.then(o,s):h instanceof Error?s(h):o(h))}function s(c,...d){r||(r=!0,t(c,...d))}function o(c){s(null,c)}}const Yr={basename:rz,dirname:az,extname:iz,join:sz,sep:"/"};function rz(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Uo(e);let r=0,i=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){r=s+1;break}}else i<0&&(o=!0,i=s+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){r=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(i=s):(d=-1,i=c));return r===i?i=c:i<0&&(i=e.length),e.slice(r,i)}function az(e){if(Uo(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function iz(e){Uo(e);let t=e.length,r=-1,i=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){i=t+1;break}continue}r<0&&(c=!0,r=t+1),d===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||r<0||o===0||o===1&&s===r-1&&s===i+1?"":e.slice(s,r)}function sz(...e){let t=-1,r;for(;++t<e.length;)Uo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":lz(r)}function lz(e){Uo(e);const t=e.codePointAt(0)===47;let r=oz(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function oz(e,t){let r="",i=0,s=-1,o=0,c=-1,d,h;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",i=0):(r=r.slice(0,h),i=r.length-1-r.lastIndexOf("/")),s=c,o=0;continue}}else if(r.length>0){r="",i=0,s=c,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(s+1,c):r=e.slice(s+1,c),i=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return r}function Uo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cz={cwd:uz};function uz(){return"/"}function im(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dz(e){if(typeof e=="string")e=new URL(e);else if(!im(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fz(e)}function fz(e){if(e.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 t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ap=["history","path","basename","stem","extname","dirname"];class jS{constructor(t){let r;t?im(t)?r={path:t}:typeof t=="string"||hz(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":cz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<ap.length;){const o=ap[i];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let s;for(s in r)ap.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Yr.basename(this.path):void 0}set basename(t){sp(t,"basename"),ip(t,"basename"),this.path=Yr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yr.dirname(this.path):void 0}set dirname(t){Av(this.basename,"dirname"),this.path=Yr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yr.extname(this.path):void 0}set extname(t){if(ip(t,"extname"),Av(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){im(t)&&(t=dz(t)),sp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yr.basename(this.path,this.extname):void 0}set stem(t){sp(t,"stem"),ip(t,"stem"),this.path=Yr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const s=this.message(t,r,i);throw s.fatal=!0,s}info(t,r,i){const s=this.message(t,r,i);return s.fatal=void 0,s}message(t,r,i){const s=new Mn(t,r,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ip(e,t){if(e&&e.includes(Yr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yr.sep+"`")}function sp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Av(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function hz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pz=(function(e){const i=this.constructor.prototype,s=i[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o}),mz={}.hasOwnProperty;class ug extends pz{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=tz()}copy(){const t=new ug;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(rp(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(cp("data",this.frozen),this.namespace[t]=r,this):mz.call(this.namespace,t)&&this.namespace[t]||void 0:t?(cp("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=r.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=du(t),i=this.parser||this.Parser;return lp("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),lp("process",this.parser||this.Parser),op("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(o,c){const d=du(t),h=i.parse(d);i.run(h,d,function(g,m,x){if(g||!m||!x)return f(g);const v=m,E=i.stringify(v,x);yz(E)?x.value=E:x.result=E,f(g,x)});function f(g,m){g||!m?c(g):o?o(m):r(void 0,m)}}}processSync(t){let r=!1,i;return this.freeze(),lp("processSync",this.parser||this.Parser),op("processSync",this.compiler||this.Compiler),this.process(t,s),Ov("processSync","process",r),i;function s(o,c){r=!0,Cv(o),i=c}}run(t,r,i){Rv(t),this.freeze();const s=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?o(void 0,i):new Promise(o);function o(c,d){const h=du(r);s.run(t,h,f);function f(g,m,x){const v=m||t;g?d(g):c?c(v):i(void 0,v,x)}}}runSync(t,r){let i=!1,s;return this.run(t,r,o),Ov("runSync","run",i),s;function o(c,d){Cv(c),s=d,i=!0}}stringify(t,r){this.freeze();const i=du(r),s=this.compiler||this.Compiler;return op("stringify",s),Rv(t),s(t,i)}use(t,...r){const i=this.attachers,s=this.namespace;if(cp("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[g,...m]=f;h(g,m)}else c(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function c(f){if(!("plugins"in f)&&!("settings"in f))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");d(f.plugins),f.settings&&(s.settings=rp(!0,s.settings,f.settings))}function d(f){let g=-1;if(f!=null)if(Array.isArray(f))for(;++g<f.length;){const m=f[g];o(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,g){let m=-1,x=-1;for(;++m<i.length;)if(i[m][0]===f){x=m;break}if(x===-1)i.push([f,...g]);else if(g.length>0){let[v,...E]=g;const S=i[x][1];am(S)&&am(v)&&(v=rp(!0,S,v)),i[x]=[f,v,...E]}}}}const gz=new ug().freeze();function lp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function op(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function cp(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rv(e){if(!am(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ov(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function du(e){return bz(e)?e:new jS(e)}function bz(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yz(e){return typeof e=="string"||xz(e)}function xz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vz="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Mv=[],Dv={allowDangerousHtml:!0},wz=/^(https?|ircs?|mailto|xmpp)$/i,Ez=[{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 jv(e){const t=Sz(e),r=_z(e);return kz(t.runSync(t.parse(r),r),e)}function Sz(e){const t=e.rehypePlugins||Mv,r=e.remarkPlugins||Mv,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Dv}:Dv;return gz().use(a4).use(r).use(Z4,i).use(t)}function _z(e){const t=e.children||"",r=new jS;return typeof t=="string"&&(r.value=t),r}function kz(e,t){const r=t.allowedElements,i=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||Nz;for(const g of Ez)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+vz+g.id,void 0);return Sd(e,f),FL(e,{Fragment:p.Fragment,components:s,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function f(g,m,x){if(g.type==="raw"&&x&&typeof m=="number")return c?x.children.splice(m,1):x.children[m]={type:"text",value:g.value},m;if(g.type==="element"){let v;for(v in Jh)if(Object.hasOwn(Jh,v)&&Object.hasOwn(g.properties,v)){const E=g.properties[v],S=Jh[v];(S===null||S.includes(g.tagName))&&(g.properties[v]=h(String(E||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(g,m,x)),v&&x&&typeof m=="number")return d&&g.children?x.children.splice(m,1,...g.children):x.children.splice(m,1),m}}}function Nz(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||r!==-1&&t>r||i!==-1&&t>i||wz.test(e.slice(0,t))?e:""}function Lv(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=r.indexOf(t);for(;s!==-1;)i++,s=r.indexOf(t,s+t.length);return i}function Cz(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Tz(e,t,r){const s=Bo((r||{}).ignore||[]),o=Az(t);let c=-1;for(;++c<o.length;)DS(e,"text",d);function d(f,g){let m=-1,x;for(;++m<g.length;){const v=g[m],E=x?x.children:void 0;if(s(v,E?E.indexOf(v):void 0,x))return;x=v}if(x)return h(f,g)}function h(f,g){const m=g[g.length-1],x=o[c][0],v=o[c][1];let E=0;const _=m.children.indexOf(f);let N=!1,T=[];x.lastIndex=0;let C=x.exec(f.value);for(;C;){const j=C.index,D={index:C.index,input:C.input,stack:[...g,f]};let A=v(...C,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?x.lastIndex=j+1:(E!==j&&T.push({type:"text",value:f.value.slice(E,j)}),Array.isArray(A)?T.push(...A):A&&T.push(A),E=j+C[0].length,N=!0),!x.global)break;C=x.exec(f.value)}return N?(E<f.value.length&&T.push({type:"text",value:f.value.slice(E)}),m.children.splice(_,1,...T)):T=[f],_+T.length}}function Az(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const s=r[i];t.push([Rz(s[0]),Oz(s[1])])}return t}function Rz(e){return typeof e=="string"?new RegExp(Cz(e),"g"):e}function Oz(e){return typeof e=="function"?e:function(){return e}}const up="phrasing",dp=["autolink","link","image","label"];function Mz(){return{transforms:[Bz],enter:{literalAutolink:jz,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:Pz,literalAutolinkEmail:zz,literalAutolinkHttp:Lz,literalAutolinkWww:Iz}}}function Dz(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:up,notInConstruct:dp}]}}function jz(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function Lz(e){this.config.exit.autolinkProtocol.call(this,e)}function Iz(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function zz(e){this.config.exit.autolinkEmail.call(this,e)}function Pz(e){this.exit(e)}function Bz(e){Tz(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uz],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Fz]],{ignore:["link","linkReference"]})}function Uz(e,t,r,i,s){let o="";if(!LS(s)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!$z(r)))return!1;const c=Hz(r+i);if(!c[0])return!1;const d={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function Fz(e,t,r,i){return!LS(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function $z(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Hz(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const s=Lv(e,"(");let o=Lv(e,")");for(;i!==-1&&s>o;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),o++;return[e,r]}function LS(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(r)||xd(r))&&(!t||r!==47)}IS.peek=Zz;function Kz(){this.buffer()}function qz(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Gz(){this.buffer()}function Vz(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Yz(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Wz(e){this.exit(e)}function Xz(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Qz(e){this.exit(e)}function Zz(){return"["}function IS(e,t,r,i){const s=r.createTracker(i);let o=s.move("[^");const c=r.enter("footnoteReference"),d=r.enter("reference");return o+=s.move(r.safe(r.associationId(e),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function Jz(){return{enter:{gfmFootnoteCallString:Kz,gfmFootnoteCall:qz,gfmFootnoteDefinitionLabelString:Gz,gfmFootnoteDefinition:Vz},exit:{gfmFootnoteCallString:Yz,gfmFootnoteCall:Wz,gfmFootnoteDefinitionLabelString:Xz,gfmFootnoteDefinition:Qz}}}function e5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:IS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,s,o,c){const d=o.createTracker(c);let h=d.move("[^");const f=o.enter("footnoteDefinition"),g=o.enter("label");return h+=d.move(o.safe(o.associationId(i),{before:h,after:"]"})),g(),h+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),h+=d.move((t?`
453
+ `:" ")+o.indentLines(o.containerFlow(i,d.current()),t?zS:t5))),f(),h}}function t5(e,t,r){return t===0?e:zS(e,t,r)}function zS(e,t,r){return(r?"":" ")+e}const n5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];PS.peek=l5;function r5(){return{canContainEols:["delete"],enter:{strikethrough:i5},exit:{strikethrough:s5}}}function a5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:n5}],handlers:{delete:PS}}}function i5(e){this.enter({type:"delete",children:[]},e)}function s5(e){this.exit(e)}function PS(e,t,r,i){const s=r.createTracker(i),o=r.enter("strikethrough");let c=s.move("~~");return c+=r.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function l5(){return"~"}function o5(e){return e.length}function c5(e,t){const r=t||{},i=(r.align||[]).concat(),s=r.stringLength||o5,o=[],c=[],d=[],h=[];let f=0,g=-1;for(;++g<e.length;){const S=[],_=[];let N=-1;for(e[g].length>f&&(f=e[g].length);++N<e[g].length;){const T=u5(e[g][N]);if(r.alignDelimiters!==!1){const C=s(T);_[N]=C,(h[N]===void 0||C>h[N])&&(h[N]=C)}S.push(T)}c[g]=S,d[g]=_}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<f;)o[m]=Iv(i[m]);else{const S=Iv(i);for(;++m<f;)o[m]=S}m=-1;const x=[],v=[];for(;++m<f;){const S=o[m];let _="",N="";S===99?(_=":",N=":"):S===108?_=":":S===114&&(N=":");let T=r.alignDelimiters===!1?1:Math.max(1,h[m]-_.length-N.length);const C=_+"-".repeat(T)+N;r.alignDelimiters!==!1&&(T=_.length+T+N.length,T>h[m]&&(h[m]=T),v[m]=T),x[m]=C}c.splice(1,0,x),d.splice(1,0,v),g=-1;const E=[];for(;++g<c.length;){const S=c[g],_=d[g];m=-1;const N=[];for(;++m<f;){const T=S[m]||"";let C="",j="";if(r.alignDelimiters!==!1){const D=h[m]-(_[m]||0),A=o[m];A===114?C=" ".repeat(D):A===99?D%2?(C=" ".repeat(D/2+.5),j=" ".repeat(D/2-.5)):(C=" ".repeat(D/2),j=C):j=" ".repeat(D)}r.delimiterStart!==!1&&!m&&N.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||m)&&N.push(" "),r.alignDelimiters!==!1&&N.push(C),N.push(T),r.alignDelimiters!==!1&&N.push(j),r.padding!==!1&&N.push(" "),(r.delimiterEnd!==!1||m!==f-1)&&N.push("|")}E.push(r.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return E.join(`
454
+ `)}function u5(e){return e==null?"":String(e)}function Iv(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function d5(e,t,r,i){const s=r.enter("blockquote"),o=r.createTracker(i);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(e,o.current()),f5);return s(),c}function f5(e,t,r){return">"+(r?"":" ")+e}function h5(e,t){return zv(e,t.inConstruct,!0)&&!zv(e,t.notInConstruct,!1)}function zv(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Pv(e,t,r,i){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
455
+ `&&h5(r.stack,r.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
456
+ `}function p5(e,t){const r=String(e);let i=r.indexOf(t),s=i,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++o>c&&(c=o):o=1,s=i+t.length,i=r.indexOf(t,s);return c}function m5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function g5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function b5(e,t,r,i){const s=g5(r),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(m5(e,r)){const m=r.enter("codeIndented"),x=r.indentLines(o,y5);return m(),x}const d=r.createTracker(i),h=s.repeat(Math.max(p5(o,s)+1,3)),f=r.enter("codeFenced");let g=d.move(h);if(e.lang){const m=r.enter(`codeFencedLang${c}`);g+=d.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=r.enter(`codeFencedMeta${c}`);g+=d.move(" "),g+=d.move(r.safe(e.meta,{before:g,after:`
457
+ `,encode:["`"],...d.current()})),m()}return g+=d.move(`
458
+ `),o&&(g+=d.move(o+`
459
+ `)),g+=d.move(h),f(),g}function y5(e,t,r){return(r?"":" ")+e}function dg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function x5(e,t,r,i){const s=dg(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("definition");let d=r.enter("label");const h=r.createTracker(i);let f=h.move("[");return f+=h.move(r.safe(r.associationId(e),{before:f,after:"]",...h.current()})),f+=h.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(r.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=r.enter("destinationRaw"),f+=h.move(r.safe(e.url,{before:f,after:e.title?" ":`
460
+ `,...h.current()}))),d(),e.title&&(d=r.enter(`title${o}`),f+=h.move(" "+s),f+=h.move(r.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),c(),f}function v5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ao(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $u(e,t,r){const i=el(e),s=el(t);return i===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}BS.peek=w5;function BS(e,t,r,i){const s=v5(r),o=r.enter("emphasis"),c=r.createTracker(i),d=c.move(s);let h=c.move(r.containerPhrasing(e,{after:s,before:d,...c.current()}));const f=h.charCodeAt(0),g=$u(i.before.charCodeAt(i.before.length-1),f,s);g.inside&&(h=Ao(f)+h.slice(1));const m=h.charCodeAt(h.length-1),x=$u(i.after.charCodeAt(0),m,s);x.inside&&(h=h.slice(0,-1)+Ao(m));const v=c.move(s);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},d+h+v}function w5(e,t,r){return r.options.emphasis||"*"}function E5(e,t){let r=!1;return Sd(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,nm}),!!((!e.depth||e.depth<3)&&rg(e)&&(t.options.setext||r))}function S5(e,t,r,i){const s=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(i);if(E5(e,r)){const g=r.enter("headingSetext"),m=r.enter("phrasing"),x=r.containerPhrasing(e,{...o.current(),before:`
461
+ `,after:`
462
+ `});return m(),g(),x+`
463
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
464
+ `))+1))}const c="#".repeat(s),d=r.enter("headingAtx"),h=r.enter("phrasing");o.move(c+" ");let f=r.containerPhrasing(e,{before:"# ",after:`
465
+ `,...o.current()});return/^[\t ]/.test(f)&&(f=Ao(f.charCodeAt(0))+f.slice(1)),f=f?c+" "+f:c,r.options.closeAtx&&(f+=" "+c),h(),d(),f}US.peek=_5;function US(e){return e.value||""}function _5(){return"<"}FS.peek=k5;function FS(e,t,r,i){const s=dg(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("image");let d=r.enter("label");const h=r.createTracker(i);let f=h.move("![");return f+=h.move(r.safe(e.alt,{before:f,after:"]",...h.current()})),f+=h.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(r.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=r.enter("destinationRaw"),f+=h.move(r.safe(e.url,{before:f,after:e.title?" ":")",...h.current()}))),d(),e.title&&(d=r.enter(`title${o}`),f+=h.move(" "+s),f+=h.move(r.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),f+=h.move(")"),c(),f}function k5(){return"!"}$S.peek=N5;function $S(e,t,r,i){const s=e.referenceType,o=r.enter("imageReference");let c=r.enter("label");const d=r.createTracker(i);let h=d.move("![");const f=r.safe(e.alt,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const m=r.safe(r.associationId(e),{before:h,after:"]",...d.current()});return c(),r.stack=g,o(),s==="full"||!f||f!==m?h+=d.move(m+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function N5(){return"!"}HS.peek=C5;function HS(e,t,r){let i=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<r.unsafe.length;){const c=r.unsafe[o],d=r.compilePattern(c);let h;if(c.atBreak)for(;h=d.exec(i);){let f=h.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(h.index+1)}}return s+i+s}function C5(){return"`"}function KS(e,t){const r=rg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}qS.peek=T5;function qS(e,t,r,i){const s=dg(r),o=s==='"'?"Quote":"Apostrophe",c=r.createTracker(i);let d,h;if(KS(e,r)){const g=r.stack;r.stack=[],d=r.enter("autolink");let m=c.move("<");return m+=c.move(r.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),d(),r.stack=g,m}d=r.enter("link"),h=r.enter("label");let f=c.move("[");return f+=c.move(r.containerPhrasing(e,{before:f,after:"](",...c.current()})),f+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(r.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(h=r.enter("destinationRaw"),f+=c.move(r.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=r.enter(`title${o}`),f+=c.move(" "+s),f+=c.move(r.safe(e.title,{before:f,after:s,...c.current()})),f+=c.move(s),h()),f+=c.move(")"),d(),f}function T5(e,t,r){return KS(e,r)?"<":"["}GS.peek=A5;function GS(e,t,r,i){const s=e.referenceType,o=r.enter("linkReference");let c=r.enter("label");const d=r.createTracker(i);let h=d.move("[");const f=r.containerPhrasing(e,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const m=r.safe(r.associationId(e),{before:h,after:"]",...d.current()});return c(),r.stack=g,o(),s==="full"||!f||f!==m?h+=d.move(m+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function A5(){return"["}function fg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function R5(e){const t=fg(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function O5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function VS(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function M5(e,t,r,i){const s=r.enter("list"),o=r.bulletCurrent;let c=e.ordered?O5(r):fg(r);const d=e.ordered?c==="."?")":".":R5(r);let h=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),VS(r)===c&&g){let m=-1;for(;++m<e.children.length;){const x=e.children[m];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=d),r.bulletCurrent=c;const f=r.containerFlow(e,i);return r.bulletLastUsed=c,r.bulletCurrent=o,s(),f}function D5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function j5(e,t,r,i){const s=D5(r);let o=r.bulletCurrent||fg(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const d=r.createTracker(i);d.move(o+" ".repeat(c-o.length)),d.shift(c);const h=r.enter("listItem"),f=r.indentLines(r.containerFlow(e,d.current()),g);return h(),f;function g(m,x,v){return x?(v?"":" ".repeat(c))+m:(v?o:o+" ".repeat(c-o.length))+m}}function L5(e,t,r,i){const s=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(e,i);return o(),s(),c}const I5=Bo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function z5(e,t,r,i){return(e.children.some(function(c){return I5(c)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function P5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YS.peek=B5;function YS(e,t,r,i){const s=P5(r),o=r.enter("strong"),c=r.createTracker(i),d=c.move(s+s);let h=c.move(r.containerPhrasing(e,{after:s,before:d,...c.current()}));const f=h.charCodeAt(0),g=$u(i.before.charCodeAt(i.before.length-1),f,s);g.inside&&(h=Ao(f)+h.slice(1));const m=h.charCodeAt(h.length-1),x=$u(i.after.charCodeAt(0),m,s);x.inside&&(h=h.slice(0,-1)+Ao(m));const v=c.move(s+s);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},d+h+v}function B5(e,t,r){return r.options.strong||"*"}function U5(e,t,r,i){return r.safe(e.value,i)}function F5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $5(e,t,r){const i=(VS(r)+(r.options.ruleSpaces?" ":"")).repeat(F5(r));return r.options.ruleSpaces?i.slice(0,-1):i}const WS={blockquote:d5,break:Pv,code:b5,definition:x5,emphasis:BS,hardBreak:Pv,heading:S5,html:US,image:FS,imageReference:$S,inlineCode:HS,link:qS,linkReference:GS,list:M5,listItem:j5,paragraph:L5,root:z5,strong:YS,text:U5,thematicBreak:$5};function H5(){return{enter:{table:K5,tableData:Bv,tableHeader:Bv,tableRow:G5},exit:{codeText:V5,table:q5,tableData:hp,tableHeader:hp,tableRow:hp}}}function K5(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function q5(e){this.exit(e),this.data.inTable=void 0}function G5(e){this.enter({type:"tableRow",children:[]},e)}function hp(e){this.exit(e)}function Bv(e){this.enter({type:"tableCell",children:[]},e)}function V5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Y5));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Y5(e,t){return t==="|"?t:e}function W5(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
466
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:h,tableRow:d}};function c(v,E,S,_){return f(g(v,S,_),v.align)}function d(v,E,S,_){const N=m(v,S,_),T=f([N]);return T.slice(0,T.indexOf(`
467
+ `))}function h(v,E,S,_){const N=S.enter("tableCell"),T=S.enter("phrasing"),C=S.containerPhrasing(v,{..._,before:o,after:o});return T(),N(),C}function f(v,E){return c5(v,{align:E,alignDelimiters:i,padding:r,stringLength:s})}function g(v,E,S){const _=v.children;let N=-1;const T=[],C=E.enter("table");for(;++N<_.length;)T[N]=m(_[N],E,S);return C(),T}function m(v,E,S){const _=v.children;let N=-1;const T=[],C=E.enter("tableRow");for(;++N<_.length;)T[N]=h(_[N],v,E,S);return C(),T}function x(v,E,S){let _=WS.inlineCode(v,E,S);return S.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function X5(){return{exit:{taskListCheckValueChecked:Uv,taskListCheckValueUnchecked:Uv,paragraph:Z5}}}function Q5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:J5}}}function Uv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Z5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;break}}c===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function J5(e,t,r,i){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=r.createTracker(i);o&&d.move(c);let h=WS.listItem(e,t,r,{...i,...d.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),h;function f(g){return g+c}}function eP(){return[Mz(),Jz(),r5(),H5(),X5()]}function tP(e){return{extensions:[Dz(),e5(e),a5(),W5(e),Q5()]}}const nP={tokenize:oP,partial:!0},XS={tokenize:cP,partial:!0},QS={tokenize:uP,partial:!0},ZS={tokenize:dP,partial:!0},rP={tokenize:fP,partial:!0},JS={name:"wwwAutolink",tokenize:sP,previous:t_},e_={name:"protocolAutolink",tokenize:lP,previous:n_},Oa={name:"emailAutolink",tokenize:iP,previous:r_},na={};function aP(){return{text:na}}let Bi=48;for(;Bi<123;)na[Bi]=Oa,Bi++,Bi===58?Bi=65:Bi===91&&(Bi=97);na[43]=Oa;na[45]=Oa;na[46]=Oa;na[95]=Oa;na[72]=[Oa,e_];na[104]=[Oa,e_];na[87]=[Oa,JS];na[119]=[Oa,JS];function iP(e,t,r){const i=this;let s,o;return c;function c(m){return!sm(m)||!r_.call(i,i.previous)||hg(i.events)?r(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return sm(m)?(e.consume(m),d):m===64?(e.consume(m),h):r(m)}function h(m){return m===46?e.check(rP,g,f)(m):m===45||m===95||Rn(m)?(o=!0,e.consume(m),h):g(m)}function f(m){return e.consume(m),s=!0,h}function g(m){return o&&s&&zn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):r(m)}}function sP(e,t,r){const i=this;return s;function s(c){return c!==87&&c!==119||!t_.call(i,i.previous)||hg(i.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nP,e.attempt(XS,e.attempt(QS,o),r),r)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function lP(e,t,r){const i=this;let s="",o=!1;return c;function c(m){return(m===72||m===104)&&n_.call(i,i.previous)&&!hg(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),d):r(m)}function d(m){if(zn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(m),h}return r(m)}function h(m){return m===47?(e.consume(m),o?f:(o=!0,h)):r(m)}function f(m){return m===null||Bu(m)||Ut(m)||Wi(m)||xd(m)?r(m):e.attempt(XS,e.attempt(QS,g),r)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function oP(e,t,r){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),s):c===46&&i===3?(e.consume(c),o):r(c)}function o(c){return c===null?r(c):t(c)}}function cP(e,t,r){let i,s,o;return c;function c(f){return f===46||f===95?e.check(ZS,h,d)(f):f===null||Ut(f)||Wi(f)||f!==45&&xd(f)?h(f):(o=!0,e.consume(f),c)}function d(f){return f===95?i=!0:(s=i,i=void 0),e.consume(f),c}function h(f){return s||i||!o?r(f):t(f)}}function uP(e,t){let r=0,i=0;return s;function s(c){return c===40?(r++,e.consume(c),s):c===41&&i<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(ZS,t,o)(c):c===null||Ut(c)||Wi(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&i++,e.consume(c),s}}function dP(e,t,r){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),o):d===93?(e.consume(d),s):d===60||d===null||Ut(d)||Wi(d)?t(d):r(d)}function s(d){return d===null||d===40||d===91||Ut(d)||Wi(d)?t(d):i(d)}function o(d){return zn(d)?c(d):r(d)}function c(d){return d===59?(e.consume(d),i):zn(d)?(e.consume(d),c):r(d)}}function fP(e,t,r){return i;function i(o){return e.consume(o),s}function s(o){return Rn(o)?r(o):t(o)}}function t_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ut(e)}function n_(e){return!zn(e)}function r_(e){return!(e===47||sm(e))}function sm(e){return e===43||e===45||e===46||e===95||Rn(e)}function hg(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const hP={tokenize:wP,partial:!0};function pP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yP,continuation:{tokenize:xP},exit:vP}},text:{91:{name:"gfmFootnoteCall",tokenize:bP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mP,resolveTo:gP}}}}function mP(e,t,r){const i=this;let s=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const h=i.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return d;function d(h){if(!c||!c._balanced)return r(h);const f=jr(i.sliceSerialize({start:c.end,end:i.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function gP(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...d),e}function bP(e,t,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,c;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),h}function h(m){return m!==94?r(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(o>999||m===93&&!c||m===null||m===91||Ut(m))return r(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(jr(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(m)}return Ut(m)||(c=!0),o++,e.consume(m),m===92?g:f}function g(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function yP(e,t,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,c=0,d;return h;function h(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(E)}function g(E){if(c>999||E===93&&!d||E===null||E===91||Ut(E))return r(E);if(E===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=jr(i.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ut(E)||(d=!0),c++,e.consume(E),E===92?m:g}function m(E){return E===91||E===92||E===93?(e.consume(E),c++,g):g(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),vt(e,v,"gfmFootnoteDefinitionWhitespace")):r(E)}function v(E){return t(E)}}function xP(e,t,r){return e.check(Po,t,e.attempt(hP,t,r))}function vP(e){e.exit("gfmFootnoteDefinition")}function wP(e,t,r){const i=this;return vt(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):r(o)}}function EP(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,d){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let f=h;for(;f--;)if(c[f][0]==="exit"&&c[f][1].type==="strikethroughSequenceTemporary"&&c[f][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[f][1].end.offset-c[f][1].start.offset){c[h][1].type="strikethroughSequence",c[f][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[f][1].start),end:Object.assign({},c[h][1].end)},m={type:"strikethroughText",start:Object.assign({},c[f][1].end),end:Object.assign({},c[h][1].start)},x=[["enter",g,d],["enter",c[f][1],d],["exit",c[f][1],d],["enter",m,d]],v=d.parser.constructs.insideSpan.null;v&&dr(x,x.length,0,vd(v,c.slice(f+1,h),d)),dr(x,x.length,0,[["exit",m,d],["enter",c[h][1],d],["exit",c[h][1],d],["exit",g,d]]),dr(c,f-1,h-f+3,x),h=f+x.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,d,h){const f=this.previous,g=this.events;let m=0;return x;function x(E){return f===126&&g[g.length-1][1].type!=="characterEscape"?h(E):(c.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const S=el(f);if(E===126)return m>1?h(E):(c.consume(E),m++,v);if(m<2&&!r)return h(E);const _=c.exit("strikethroughSequenceTemporary"),N=el(E);return _._open=!N||N===2&&!!S,_._close=!S||S===2&&!!N,d(E)}}}class SP{constructor(){this.map=[]}add(t,r,i){_P(this,t,r,i)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const o of s)t.push(o);s=i.pop()}this.map.length=0}}function _P(e,t,r,i){let s=0;if(!(r===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=r,e.map[s][2].push(...i);return}s+=1}e.map.push([t,r,i])}}function kP(e,t){let r=!1;const i=[];for(;t<e.length;){const s=e[t];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function NP(){return{flow:{null:{name:"table",tokenize:CP,resolveAll:TP}}}}function CP(e,t,r){const i=this;let s=0,o=0,c;return d;function d(O){let U=i.events.length-1;for(;U>-1;){const q=i.events[U][1].type;if(q==="lineEnding"||q==="linePrefix")U--;else break}const J=U>-1?i.events[U][1].type:null,ce=J==="tableHead"||J==="tableRow"?A:h;return ce===A&&i.parser.lazy[i.now().line]?r(O):ce(O)}function h(O){return e.enter("tableHead"),e.enter("tableRow"),f(O)}function f(O){return O===124||(c=!0,o+=1),g(O)}function g(O){return O===null?r(O):Ke(O)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),v):r(O):ht(O)?vt(e,g,"whitespace")(O):(o+=1,c&&(c=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),m(O)))}function m(O){return O===null||O===124||Ut(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?x:m)}function x(O){return O===92||O===124?(e.consume(O),m):m(O)}function v(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(e.enter("tableDelimiterRow"),c=!1,ht(O)?vt(e,E,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):E(O))}function E(O){return O===45||O===58?_(O):O===124?(c=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):D(O)}function S(O){return ht(O)?vt(e,_,"whitespace")(O):_(O)}function _(O){return O===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),N):O===45?(o+=1,N(O)):O===null||Ke(O)?j(O):D(O)}function N(O){return O===45?(e.enter("tableDelimiterFiller"),T(O)):D(O)}function T(O){return O===45?(e.consume(O),T):O===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(O))}function C(O){return ht(O)?vt(e,j,"whitespace")(O):j(O)}function j(O){return O===124?E(O):O===null||Ke(O)?!c||s!==o?D(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):D(O)}function D(O){return r(O)}function A(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||Ke(O)?(e.exit("tableRow"),t(O)):ht(O)?vt(e,P,"whitespace")(O):(e.enter("data"),K(O))}function K(O){return O===null||O===124||Ut(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?X:K)}function X(O){return O===92||O===124?(e.consume(O),K):K(O)}}function TP(e,t){let r=-1,i=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,h=0,f,g,m;const x=new SP;for(;++r<e.length;){const v=e[r],E=v[1];v[0]==="enter"?E.type==="tableHead"?(d=!1,h!==0&&(Fv(x,t,h,f,g),g=void 0,h=0),f={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(r,0,[["enter",f,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(i=!0,m=void 0,o=[0,0,0,0],c=[0,r+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(r,0,[["enter",g,t]])),s=E.type==="tableDelimiterRow"?2:g?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],m=fu(x,t,o,s,void 0,m),o=[0,0,0,0]),c[2]=r)):E.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(c[0]=c[1],m=fu(x,t,o,s,void 0,m)),o=c,c=[o[1],r,0,0])):E.type==="tableHead"?(d=!0,h=r):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=r,o[1]!==0?(c[0]=c[1],m=fu(x,t,o,s,r,m)):c[1]!==0&&(m=fu(x,t,c,s,r,m)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=r)}for(h!==0&&Fv(x,t,h,f,g),x.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=kP(t.events,r))}return e}function fu(e,t,r,i,s,o){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},$s(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const h=$s(t.events,r[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const f=$s(t.events,r[2]),g=$s(t.events,r[3]),m={type:d,start:Object.assign({},f),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",m,t]]),i!==2){const x=t.events[r[2]],v=t.events[r[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const E=r[2]+1,S=r[3]-r[2]-1;e.add(E,S,[])}}e.add(r[3]+1,0,[["exit",m,t]])}return s!==void 0&&(o.end=Object.assign({},$s(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function Fv(e,t,r,i,s){const o=[],c=$s(t.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),i.end=Object.assign({},c),o.push(["exit",i,t]),e.add(r+1,0,o)}function $s(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const AP={name:"tasklistCheck",tokenize:OP};function RP(){return{text:{91:AP}}}function OP(e,t,r){const i=this;return s;function s(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Ut(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):r(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(h)}function d(h){return Ke(h)?t(h):ht(h)?e.check({tokenize:MP},t,r)(h):r(h)}}function MP(e,t,r){return vt(e,i,"whitespace");function i(s){return s===null?r(s):t(s)}}function DP(e){return pS([aP(),pP(),EP(e),NP(),RP()])}const jP={};function $v(e){const t=this,r=e||jP,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(DP(r)),o.push(eP()),c.push(tP(r))}const Hv=(function(e,t,r){const i=Bo(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(i(e.children[t],t,e))return e.children[t]}),es=(function(e){if(e==null)return zP;if(typeof e=="string")return IP(e);if(typeof e=="object")return LP(e);if(typeof e=="function")return pg(e);throw new Error("Expected function, string, or array as `test`")});function LP(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=es(e[r]);return pg(i);function i(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function IP(e){return pg(t);function t(r){return r.tagName===e}}function pg(e){return t;function t(r,i,s){return!!(PP(r)&&e.call(this,r,typeof i=="number"?i:void 0,s||void 0))}}function zP(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function PP(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Kv=/\n/g,qv=/[\t ]+/g,lm=es("br"),Gv=es(GP),BP=es("p"),Vv=es("tr"),UP=es(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",qP,VP]),a_=es(["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 FP(e,t){const r=t||{},i="children"in e?e.children:[],s=a_(e),o=l_(e,{whitespace:r.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...s_(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<i.length;)c.push(...i_(i[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<i.length-1?lm(i[d+1]):s}));const h=[];let f;for(d=-1;++d<c.length;){const g=c[d];typeof g=="number"?f!==void 0&&g>f&&(f=g):g&&(f!==void 0&&f>-1&&h.push(`
468
+ `.repeat(f)||" "),f=-1,h.push(g))}return h.join("")}function i_(e,t,r){return e.type==="element"?$P(e,t,r):e.type==="text"?r.whitespace==="normal"?s_(e,r):HP(e):[]}function $P(e,t,r){const i=l_(e,r),s=e.children||[];let o=-1,c=[];if(UP(e))return c;let d,h;for(lm(e)||Vv(e)&&Hv(t,e,Vv)?h=`
469
+ `:BP(e)?(d=2,h=2):a_(e)&&(d=1,h=1);++o<s.length;)c=c.concat(i_(s[o],e,{whitespace:i,breakBefore:o?void 0:d,breakAfter:o<s.length-1?lm(s[o+1]):h}));return Gv(e)&&Hv(t,e,Gv)&&c.push(" "),d&&c.unshift(d),h&&c.push(h),c}function s_(e,t){const r=String(e.value),i=[],s=[];let o=0;for(;o<=r.length;){Kv.lastIndex=o;const h=Kv.exec(r),f=h&&"index"in h?h.index:r.length;i.push(KP(r.slice(o,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,f===r.length?t.breakAfter:!0)),o=f+1}let c=-1,d;for(;++c<i.length;)i[c].charCodeAt(i[c].length-1)===8203||c<i.length-1&&i[c+1].charCodeAt(0)===8203?(s.push(i[c]),d=void 0):i[c]?(typeof d=="number"&&s.push(d),s.push(i[c]),d=0):(c===0||c===i.length-1)&&s.push(0);return s}function HP(e){return[String(e.value)]}function KP(e,t,r){const i=[];let s=0,o;for(;s<e.length;){qv.lastIndex=s;const c=qv.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&i.push(""),s!==o&&i.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!r&&i.push(""),i.join(" ")}function l_(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function qP(e){return!!(e.properties||{}).hidden}function GP(e){return e.tagName==="td"||e.tagName==="th"}function VP(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function YP(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+i+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},m={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},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["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"],N=["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"],j={type:S,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},D={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,d,r,e.C_BLOCK_COMMENT_MODE,g,f],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:A.concat([{begin:/\(/,end:/\)/,keywords:j,contains:A.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,f,g,d,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,f,g,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,K,D,A,[m,{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:j,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function WP(e){const t={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"]},r=YP(e),i=r.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function XP(e){const t=e.regex,r={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,s]};s.contains.push(d);const h={match:/\\"/},f={className:"string",begin:/'/,end:/'/},g={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],_=["true","false"],N={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["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"],D=["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:S,literal:_,built_in:[...T,...C,"set","shopt",...j,...D]},contains:[v,e.SHEBANG(),E,m,o,c,N,d,h,f,g,r]}}function QP(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+i+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},m={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},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",_={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"},N=[m,d,r,e.C_BLOCK_COMMENT_MODE,g,f],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:_,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,f,g,d,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,f,g,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:_,disableAutodetect:!0,illegal:"</",contains:[].concat(T,C,N,[m,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:_}}}function ZP(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+i+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.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:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={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},m={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},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["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"],N=["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"],j={type:S,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},D={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,d,r,e.C_BLOCK_COMMENT_MODE,g,f],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:A.concat([{begin:/\(/,end:/\)/,keywords:j,contains:A.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,f,g,d,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,f,g,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,K,D,A,[m,{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:j,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function JP(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],i=["default","false","null","true"],s=["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"],o=["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"],c={keyword:s.concat(o),built_in:t,literal:i},d=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={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},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(g,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},_=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[_,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const N={variants:[f,S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},T={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},C=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},N,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,T,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,T,e.C_LINE_COMMENT_MODE,e.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:"("+C+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,T],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[N,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const eB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.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:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),tB=["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"],nB=["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"],rB=[...tB,...nB],aB=["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(),iB=["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(),sB=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),lB=["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 oB(e){const t=e.regex,r=eB(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,i,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+iB.join("|")+")"},{begin:":(:)?("+sB.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+lB.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:aB.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+rB.join("|")+")\\b"}]}}function cB(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.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 uB(e){const o={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:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.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:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function dB(e){const t=e.regex,r=/[_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:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.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:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function fB(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},d={begin:/\[/,end:/\]/,contains:[i,o,s,c,r,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,g=/'[^']*'/,m=t.either(h,f,g),x=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[i,d,o,s,c,r]}}]}}var Hs="[0-9](_*[0-9])*",hu=`\\.(${Hs})`,pu="[0-9a-fA-F](_*[0-9a-fA-F])*",Yv={className:"number",variants:[{begin:`(\\b(${Hs})((${hu})|\\.)?|(${hu}))[eE][+-]?(${Hs})[fFdD]?\\b`},{begin:`\\b(${Hs})((${hu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${hu})[fFdD]?\\b`},{begin:`\\b(${Hs})[fFdD]\\b`},{begin:`\\b0[xX]((${pu})\\.?|(${pu})?\\.(${pu}))[pP][+-]?(${Hs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${pu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o_(e,t,r){return r===-1?"":e.replace(t,i=>o_(e,t,r-1))}function hB(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=r+o_("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),h={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"]},f={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Yv,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Yv,f]}}const Wv="[A-Za-z$_][0-9A-Za-z$_]*",pB=["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"],mB=["true","false","null","undefined","NaN","Infinity"],c_=["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"],u_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],d_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],gB=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],bB=[].concat(d_,c_,u_);function yB(e){const t=e.regex,r=(Q,{after:Y})=>{const L="</"+Q[0].slice(1);return Q.input.indexOf(L,Y)!==-1},i=Wv,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,Y)=>{const L=Q[0].length+Q.index,z=Q.input[L];if(z==="<"||z===","){Y.ignoreMatch();return}z===">"&&(r(Q,{after:L})||Y.ignoreMatch());let V;const R=Q.input.substring(L);if(V=R.match(/^\s*=/)){Y.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){Y.ignoreMatch();return}}},d={$pattern:Wv,keyword:pB,literal:mB,built_in:bB,"variable.language":gB},h="[0-9](_?[0-9])*",f=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${f})|\\.)?|(${f}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${f})\\b|\\.)?|(${f})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},T={className:"comment",variants:[e.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}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,_,{match:/\$\d+/},m];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(C)});const j=[].concat(T,x.contains),D=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(j)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:D},P={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.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:{_:[...c_,...u_]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(Q){return t.concat("(?!",Q.join("|"),")")}const ce={match:t.concat(/\b/,J([...d_,"super","import"].map(Q=>`${Q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},$={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,_,T,{match:/\$\d+/},m,K,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},ce,U,P,$,{match:/\$[(.]/}]}}function xB(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],s={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,r,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ks="[0-9](_*[0-9])*",mu=`\\.(${Ks})`,gu="[0-9a-fA-F](_*[0-9a-fA-F])*",vB={className:"number",variants:[{begin:`(\\b(${Ks})((${mu})|\\.)?|(${mu}))[eE][+-]?(${Ks})[fFdD]?\\b`},{begin:`\\b(${Ks})((${mu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${mu})[fFdD]?\\b`},{begin:`\\b(${Ks})[fFdD]\\b`},{begin:`\\b0[xX]((${gu})\\.?|(${gu})?\\.(${gu}))[pP][+-]?(${Ks})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${gu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function wB(e){const t={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"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const d={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},f=vB,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=m;return x.variants[1].contains=[m],m.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,r,i,d,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,d,h,c,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},d,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
470
+ `},f]}}const EB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.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:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),SB=["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"],_B=["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"],kB=[...SB,..._B],NB=["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(),f_=["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(),h_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),CB=["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(),TB=f_.concat(h_).sort().reverse();function AB(e){const t=EB(e),r=TB,i="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],d=[],h=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},f=function(C,j,D){return{className:C,begin:j,relevance:D}},g={$pattern:/[a-z-]+/,keyword:i,attribute:NB.join(" ")},m={begin:"\\(",end:"\\)",contains:d,keywords:g,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,f("variable","@@?"+s,10),f("variable","@\\{"+s+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=d.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+CB.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:d,relevance:0}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},N={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+kB.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",o,0),f("selector-id","#"+o),f("selector-class","\\."+o,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+f_.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+h_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},T={begin:s+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[N]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,_,T,E,N,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function RB(e){const t="\\[=*\\[",r="\\]=*\\]",i={begin:t,end:r,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.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:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[i],relevance:5}])}}function OB(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},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:[t,r]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};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:[e.HASH_COMMENT_MODE,t,r,i,s,o,c]}}function MB(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={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}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),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}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(f,{contains:[]}),x=e.inherit(g,{contains:[]});f.contains.push(x),g.contains.push(m);let v=[r,h];return[f,g,m,x].forEach(N=>{N.contains=N.contains.concat(v)}),v=v.concat(f,g),{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}]}]},r,o,f,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,i,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function DB(e){const t={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+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,d={"variable.language":["this","super"],$pattern:r,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"]},h={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:d,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.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},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function jB(e){const t=e.regex,r=["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}/,s={$pattern:/[\w.]+/,keyword:r.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},f={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},g=[e.BACKSLASH_ESCAPE,o,h],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(S,_,N="\\1")=>{const T=N==="\\1"?N:t.concat(N,_);return t.concat(t.concat("(?:",S,")"),_,/(?:\\.|[^\\\/])*?/,T,/(?:\\.|[^\\\/])*?/,N,i)},v=(S,_,N)=>t.concat(t.concat("(?:",S,")"),_,/(?:\\.|[^\\\/])*?/,N,i),E=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:g,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:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",t.either(...m,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...m,{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:[e.TITLE_MODE,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function LB(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=t.concat(/[A-Z]+/,r),c={scope:"variable",match:"\\$+"+i},d={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(q,$)=>{$.data._beginMatch=q[1]||q[2]},"on:end":(q,$)=>{$.data._beginMatch!==q[1]&&$.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
471
+ ]`,E={scope:"string",variants:[g,f,m,x]},S={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},_=["false","null","true"],N=["__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"],T=["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"],j={keyword:N,literal:(q=>{const $=[];return q.forEach(I=>{$.push(I),I.toLowerCase()===I?$.push(I.toUpperCase()):$.push(I.toLowerCase())}),$})(_),built_in:T},D=q=>q.map($=>$.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",D(T).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(i,"\\b(?!\\()"),K={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},X={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[X,c,K,e.C_BLOCK_COMMENT_MODE,E,S,A]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(N).join("\\b|"),"|",D(T).join("\\b|"),"\\b)"),i,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(U);const J=[X,K,e.C_BLOCK_COMMENT_MODE,E,S,A],ce={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:j,contains:[ce,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},d,{scope:"variable.language",match:/\$this\b/},c,U,K,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",ce,c,K,e.C_BLOCK_COMMENT_MODE,E,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,S]}}function IB(e){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},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function zB(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function PB(e){const t=e.regex,r=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"],d={$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"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},g={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,g,f]},{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:[e.BACKSLASH_ESCAPE,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,E=`\\b|${i.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${E})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${x})[jJ](?=${E})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",h,S,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,S,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[h,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,N,m]}]}}function BB(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function UB(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.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]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,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:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[o,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function FB(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(i,/(::\w+)*/),c={"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"]},d={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:c},m={className:"string",contains:[e.BACKSLASH_ESCAPE,g],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:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${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"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},A=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.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+/,r],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:r}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],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(h,f),relevance:0}].concat(h,f);g.contains=A,S.contains=A;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:A}}];return f.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(f).concat(A)}}function $B(e){const t=e.regex,r=/(r#)?/,i=t.concat(r,e.UNDERSCORE_IDENT_RE),s=t.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",d=["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"],h=["true","false","Some","None","Ok","Err"],f=["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!"],g=["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:e.IDENT_RE+"!?",type:g,keyword:d,literal:h,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.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_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.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:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:g}},{className:"punctuation",begin:"->"},o]}}const HB=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.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:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),KB=["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"],qB=["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"],GB=[...KB,...qB],VB=["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(),YB=["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(),WB=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),XB=["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 QB(e){const t=HB(e),r=WB,i=YB,s="@[a-z-]+",o="and or not only",d={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+GB.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+XB.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:[t.BLOCK_COMMENT,d,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:VB.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function ZB(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function JB(e){const t=e.regex,r=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],d=["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"],h=["add","asc","collation","desc","final","first","last","view"],f=["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"],g=["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"],m=["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"],x=["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=g,E=[...f,...h].filter(D=>!g.includes(D)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function T(D){return t.concat(/\b/,t.either(...D.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:T(x),relevance:0};function j(D,{exceptions:A,when:P}={}){const K=P;return A=A||[],D.map(X=>X.match(/\|\d+$/)||A.includes(X)?X:K(X)?`${X}|0`:X)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(E,{when:D=>D.length<3}),literal:o,type:d,built_in:m},contains:[{scope:"type",match:T(c)},C,N,S,i,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,_]}}function p_(e){return e?typeof e=="string"?e:e.source:null}function co(e){return zt("(?=",e,")")}function zt(...e){return e.map(r=>p_(r)).join("")}function eU(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function In(...e){return"("+(eU(e).capture?"":"?:")+e.map(i=>p_(i)).join("|")+")"}const mg=e=>zt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),tU=["Protocol","Type"].map(mg),Xv=["init","self"].map(mg),nU=["Any","Self"],pp=["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"],Qv=["false","nil","true"],rU=["assignment","associativity","higherThan","left","lowerThan","none","right"],aU=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Zv=["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"],m_=In(/[/=\-+!*%<>&|^~?]/,/[\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]/),g_=In(m_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),mp=zt(m_,g_,"*"),b_=In(/[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]/),Hu=In(b_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Gr=zt(b_,Hu,"*"),bu=zt(/[A-Z]/,Hu,"*"),iU=["attached","autoclosure",zt(/convention\(/,In("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",zt(/objc\(/,Gr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],sU=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function lU(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,r],s={match:[/\./,In(...tU,...Xv)],className:{2:"keyword"}},o={match:zt(/\./,In(...pp)),relevance:0},c=pp.filter(Be=>typeof Be=="string").concat(["_|0"]),d=pp.filter(Be=>typeof Be!="string").concat(nU).map(mg),h={variants:[{className:"keyword",match:In(...d,...Xv)}]},f={$pattern:In(/\b\w+/,/#\w+/),keyword:c.concat(aU),literal:Qv},g=[s,o,h],m={match:zt(/\./,In(...Zv)),relevance:0},x={className:"built_in",match:zt(/\b/,In(...Zv),/(?=\()/)},v=[m,x],E={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:mp},{match:`\\.(\\.|${g_})+`}]},_=[E,S],N="([0-9]_*)+",T="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${N})(\\.(${N}))?([eE][+-]?(${N}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${N}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(Be="")=>({className:"subst",variants:[{match:zt(/\\/,Be,/[0\\tnr"']/)},{match:zt(/\\/,Be,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(Be="")=>({className:"subst",match:zt(/\\/,Be,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(Be="")=>({className:"subst",label:"interpol",begin:zt(/\\/,Be,/\(/),end:/\)/}),P=(Be="")=>({begin:zt(Be,/"""/),end:zt(/"""/,Be),contains:[j(Be),D(Be),A(Be)]}),K=(Be="")=>({begin:zt(Be,/"/),end:zt(/"/,Be),contains:[j(Be),A(Be)]}),X={className:"string",variants:[P(),P("#"),P("##"),P("###"),K(),K("#"),K("##"),K("###")]},O=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:O},J=Be=>{const Qe=zt(Be,/\//),bt=zt(/\//,Be);return{begin:Qe,end:bt,contains:[...O,{scope:"comment",begin:`#(?!.*${bt})`,end:/$/}]}},ce={scope:"regexp",variants:[J("###"),J("##"),J("#"),U]},q={match:zt(/`/,Gr,/`/)},$={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Hu}+`},W=[q,$,I],Q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:sU,contains:[..._,C,X]}]}},Y={scope:"keyword",match:zt(/@/,In(...iU),co(In(/\(/,/\s+/)))},L={scope:"meta",match:zt(/@/,Gr)},z=[Q,Y,L],V={match:co(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:zt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Hu,"+")},{className:"type",match:bu,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:zt(/\s+&\s+/,co(bu)),relevance:0}]},R={begin:/</,end:/>/,keywords:f,contains:[...i,...g,...z,E,V]};V.contains.push(R);const ee={match:zt(Gr,/\s*:/),keywords:"_|0",relevance:0},ge={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",ee,...i,ce,...g,...v,..._,C,X,...W,...z,V]},oe={begin:/</,end:/>/,keywords:"repeat each",contains:[...i,V]},re={begin:In(co(zt(Gr,/\s*:/)),co(zt(Gr,/\s+/,Gr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Gr}]},be={begin:/\(/,end:/\)/,keywords:f,contains:[re,...i,...g,..._,C,X,...z,V,ge],endsParent:!0,illegal:/["']/},Ce={match:[/(func|macro)/,/\s+/,In(q.match,Gr,mp)],className:{1:"keyword",3:"title.function"},contains:[oe,be,t],illegal:[/\[/,/%/]},ke={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[oe,be,t],illegal:/\[|%/},Ne={match:[/operator/,/\s+/,mp],className:{1:"keyword",3:"title"}},$e={begin:[/precedencegroup/,/\s+/,bu],className:{1:"keyword",3:"title"},contains:[V],keywords:[...rU,...Qv],end:/}/},Je={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Pe={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Tt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Gr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[oe,...g,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:bu},...g],relevance:0}]};for(const Be of X.variants){const Qe=Be.contains.find(te=>te.label==="interpol");Qe.keywords=f;const bt=[...g,...v,..._,C,X,...W];Qe.contains=[...bt,{begin:/\(/,end:/\)/,contains:["self",...bt]}]}return{name:"Swift",keywords:f,contains:[...i,Ce,ke,Je,Pe,Tt,Ne,$e,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},ce,...g,...v,..._,C,X,...W,...z,V,ge]}}const Ku="[A-Za-z$_][0-9A-Za-z$_]*",y_=["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"],x_=["true","false","null","undefined","NaN","Infinity"],v_=["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"],w_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],E_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],S_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],__=[].concat(E_,v_,w_);function oU(e){const t=e.regex,r=(Q,{after:Y})=>{const L="</"+Q[0].slice(1);return Q.input.indexOf(L,Y)!==-1},i=Ku,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,Y)=>{const L=Q[0].length+Q.index,z=Q.input[L];if(z==="<"||z===","){Y.ignoreMatch();return}z===">"&&(r(Q,{after:L})||Y.ignoreMatch());let V;const R=Q.input.substring(L);if(V=R.match(/^\s*=/)){Y.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){Y.ignoreMatch();return}}},d={$pattern:Ku,keyword:y_,literal:x_,built_in:__,"variable.language":S_},h="[0-9](_?[0-9])*",f=`\\.(${h})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${f})|\\.)?|(${f}))[eE][+-]?(${h})\\b`},{begin:`\\b(${g})\\b((${f})\\b|\\.)?|(${f})\\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},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},T={className:"comment",variants:[e.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}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,_,{match:/\$\d+/},m];x.contains=C.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(C)});const j=[].concat(T,x.contains),D=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(j)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:D},P={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.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:{_:[...v_,...w_]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(Q){return t.concat("(?!",Q.join("|"),")")}const ce={match:t.concat(/\b/,J([...E_,"super","import"].map(Q=>`${Q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},$={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,_,T,{match:/\$\d+/},m,K,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},ce,U,P,$,{match:/\$[(.]/}]}}function cU(e){const t=e.regex,r=oU(e),i=Ku,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[r.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:Ku,keyword:y_.concat(h),literal:x_,built_in:__.concat(s),"variable.language":S_},g={className:"meta",begin:"@"+i},m=(S,_,N)=>{const T=S.contains.findIndex(C=>C.label===_);if(T===-1)throw new Error("can not find mode to replace");S.contains.splice(T,1,N)};Object.assign(r.keywords,f),r.exports.PARAMS_CONTAINS.push(g);const x=r.contains.find(S=>S.scope==="attr"),v=Object.assign({},x,{match:t.concat(i,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,x,v]),r.contains=r.contains.concat([g,o,c,v]),m(r,"shebang",e.SHEBANG()),m(r,"use_strict",d);const E=r.contains.find(S=>S.label==="func.def");return E.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function uU(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,d=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,d),/ *#/)}]},f={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])|[%&])?/}]},g={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=e.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:[r,i,h,f,g,m,x,{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:[x]}]}}function dU(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.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"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},d={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/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={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:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,h,f,d]}}function fU(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={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:[s]},{begin:/'/,end:/'/,contains:[s]},{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:[o,h,d,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function hU(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},d=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={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:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},_=[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+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,S,o,c],N=[..._];return N.pop(),N.push(d),v.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}const pU={arduino:WP,bash:XP,c:QP,cpp:ZP,csharp:JP,css:oB,diff:cB,go:uB,graphql:dB,ini:fB,java:hB,javascript:yB,json:xB,kotlin:wB,less:AB,lua:RB,makefile:OB,markdown:MB,objectivec:DB,perl:jB,php:LB,"php-template":IB,plaintext:zB,python:PB,"python-repl":BB,r:UB,ruby:FB,rust:$B,scss:QB,shell:ZB,sql:JB,swift:lU,typescript:cU,vbnet:uU,wasm:dU,xml:fU,yaml:hU};var gp,Jv;function mU(){if(Jv)return gp;Jv=1;function e(H){return H instanceof Map?H.clear=H.delete=H.set=function(){throw new Error("map is read-only")}:H instanceof Set&&(H.add=H.clear=H.delete=function(){throw new Error("set is read-only")}),Object.freeze(H),Object.getOwnPropertyNames(H).forEach(fe=>{const Se=H[fe],Xe=typeof Se;(Xe==="object"||Xe==="function")&&!Object.isFrozen(Se)&&e(Se)}),H}class t{constructor(fe){fe.data===void 0&&(fe.data={}),this.data=fe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(H){return H.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(H,...fe){const Se=Object.create(null);for(const Xe in H)Se[Xe]=H[Xe];return fe.forEach(function(Xe){for(const Pt in Xe)Se[Pt]=Xe[Pt]}),Se}const s="</span>",o=H=>!!H.scope,c=(H,{prefix:fe})=>{if(H.startsWith("language:"))return H.replace("language:","language-");if(H.includes(".")){const Se=H.split(".");return[`${fe}${Se.shift()}`,...Se.map((Xe,Pt)=>`${Xe}${"_".repeat(Pt+1)}`)].join(" ")}return`${fe}${H}`};class d{constructor(fe,Se){this.buffer="",this.classPrefix=Se.classPrefix,fe.walk(this)}addText(fe){this.buffer+=r(fe)}openNode(fe){if(!o(fe))return;const Se=c(fe.scope,{prefix:this.classPrefix});this.span(Se)}closeNode(fe){o(fe)&&(this.buffer+=s)}value(){return this.buffer}span(fe){this.buffer+=`<span class="${fe}">`}}const h=(H={})=>{const fe={children:[]};return Object.assign(fe,H),fe};class f{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(fe){this.top.children.push(fe)}openNode(fe){const Se=h({scope:fe});this.add(Se),this.stack.push(Se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(fe){return this.constructor._walk(fe,this.rootNode)}static _walk(fe,Se){return typeof Se=="string"?fe.addText(Se):Se.children&&(fe.openNode(Se),Se.children.forEach(Xe=>this._walk(fe,Xe)),fe.closeNode(Se)),fe}static _collapse(fe){typeof fe!="string"&&fe.children&&(fe.children.every(Se=>typeof Se=="string")?fe.children=[fe.children.join("")]:fe.children.forEach(Se=>{f._collapse(Se)}))}}class g extends f{constructor(fe){super(),this.options=fe}addText(fe){fe!==""&&this.add(fe)}startScope(fe){this.openNode(fe)}endScope(){this.closeNode()}__addSublanguage(fe,Se){const Xe=fe.root;Se&&(Xe.scope=`language:${Se}`),this.add(Xe)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(H){return H?typeof H=="string"?H:H.source:null}function x(H){return S("(?=",H,")")}function v(H){return S("(?:",H,")*")}function E(H){return S("(?:",H,")?")}function S(...H){return H.map(Se=>m(Se)).join("")}function _(H){const fe=H[H.length-1];return typeof fe=="object"&&fe.constructor===Object?(H.splice(H.length-1,1),fe):{}}function N(...H){return"("+(_(H).capture?"":"?:")+H.map(Xe=>m(Xe)).join("|")+")"}function T(H){return new RegExp(H.toString()+"|").exec("").length-1}function C(H,fe){const Se=H&&H.exec(fe);return Se&&Se.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(H,{joinWith:fe}){let Se=0;return H.map(Xe=>{Se+=1;const Pt=Se;let At=m(Xe),Me="";for(;At.length>0;){const Ae=j.exec(At);if(!Ae){Me+=At;break}Me+=At.substring(0,Ae.index),At=At.substring(Ae.index+Ae[0].length),Ae[0][0]==="\\"&&Ae[1]?Me+="\\"+String(Number(Ae[1])+Pt):(Me+=Ae[0],Ae[0]==="("&&Se++)}return Me}).map(Xe=>`(${Xe})`).join(fe)}const A=/\b\B/,P="[a-zA-Z]\\w*",K="[a-zA-Z_]\\w*",X="\\b\\d+(\\.\\d+)?",O="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ce=(H={})=>{const fe=/^#![ ]*\//;return H.binary&&(H.begin=S(fe,/.*\b/,H.binary,/\b.*/)),i({scope:"meta",begin:fe,end:/$/,relevance:0,"on:begin":(Se,Xe)=>{Se.index!==0&&Xe.ignoreMatch()}},H)},q={begin:"\\\\[\\s\\S]",relevance:0},$={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[q]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[q]},W={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/},Q=function(H,fe,Se={}){const Xe=i({scope:"comment",begin:H,end:fe,contains:[]},Se);Xe.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 Pt=N("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 Xe.contains.push({begin:S(/[ ]+/,"(",Pt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Xe},Y=Q("//","$"),L=Q("/\\*","\\*/"),z=Q("#","$"),V={scope:"number",begin:X,relevance:0},R={scope:"number",begin:O,relevance:0},ee={scope:"number",begin:U,relevance:0},ge={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[q,{begin:/\[/,end:/\]/,relevance:0,contains:[q]}]},oe={scope:"title",begin:P,relevance:0},re={scope:"title",begin:K,relevance:0},be={begin:"\\.\\s*"+K,relevance:0};var ke=Object.freeze({__proto__:null,APOS_STRING_MODE:$,BACKSLASH_ESCAPE:q,BINARY_NUMBER_MODE:ee,BINARY_NUMBER_RE:U,COMMENT:Q,C_BLOCK_COMMENT_MODE:L,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:R,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(H){return Object.assign(H,{"on:begin":(fe,Se)=>{Se.data._beginMatch=fe[1]},"on:end":(fe,Se)=>{Se.data._beginMatch!==fe[1]&&Se.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:P,MATCH_NOTHING_RE:A,METHOD_GUARD:be,NUMBER_MODE:V,NUMBER_RE:X,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:I,REGEXP_MODE:ge,RE_STARTERS_RE:J,SHEBANG:ce,TITLE_MODE:oe,UNDERSCORE_IDENT_RE:K,UNDERSCORE_TITLE_MODE:re});function Ne(H,fe){H.input[H.index-1]==="."&&fe.ignoreMatch()}function $e(H,fe){H.className!==void 0&&(H.scope=H.className,delete H.className)}function Je(H,fe){fe&&H.beginKeywords&&(H.begin="\\b("+H.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",H.__beforeBegin=Ne,H.keywords=H.keywords||H.beginKeywords,delete H.beginKeywords,H.relevance===void 0&&(H.relevance=0))}function Pe(H,fe){Array.isArray(H.illegal)&&(H.illegal=N(...H.illegal))}function Tt(H,fe){if(H.match){if(H.begin||H.end)throw new Error("begin & end are not supported with match");H.begin=H.match,delete H.match}}function Be(H,fe){H.relevance===void 0&&(H.relevance=1)}const Qe=(H,fe)=>{if(!H.beforeMatch)return;if(H.starts)throw new Error("beforeMatch cannot be used with starts");const Se=Object.assign({},H);Object.keys(H).forEach(Xe=>{delete H[Xe]}),H.keywords=Se.keywords,H.begin=S(Se.beforeMatch,x(Se.begin)),H.starts={relevance:0,contains:[Object.assign(Se,{endsParent:!0})]},H.relevance=0,delete Se.beforeMatch},bt=["of","and","for","in","not","or","if","then","parent","list","value"],te="keyword";function he(H,fe,Se=te){const Xe=Object.create(null);return typeof H=="string"?Pt(Se,H.split(" ")):Array.isArray(H)?Pt(Se,H):Object.keys(H).forEach(function(At){Object.assign(Xe,he(H[At],fe,At))}),Xe;function Pt(At,Me){fe&&(Me=Me.map(Ae=>Ae.toLowerCase())),Me.forEach(function(Ae){const qe=Ae.split("|");Xe[qe[0]]=[At,Te(qe[0],qe[1])]})}}function Te(H,fe){return fe?Number(fe):Ie(H)?0:1}function Ie(H){return bt.includes(H.toLowerCase())}const wt={},lt=H=>{console.error(H)},Wt=(H,...fe)=>{console.log(`WARN: ${H}`,...fe)},B=(H,fe)=>{wt[`${H}/${fe}`]||(console.log(`Deprecated as of ${H}. ${fe}`),wt[`${H}/${fe}`]=!0)},ie=new Error;function Ee(H,fe,{key:Se}){let Xe=0;const Pt=H[Se],At={},Me={};for(let Ae=1;Ae<=fe.length;Ae++)Me[Ae+Xe]=Pt[Ae],At[Ae+Xe]=!0,Xe+=T(fe[Ae-1]);H[Se]=Me,H[Se]._emit=At,H[Se]._multi=!0}function se(H){if(Array.isArray(H.begin)){if(H.skip||H.excludeBegin||H.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ie;if(typeof H.beginScope!="object"||H.beginScope===null)throw lt("beginScope must be object"),ie;Ee(H,H.begin,{key:"beginScope"}),H.begin=D(H.begin,{joinWith:""})}}function ye(H){if(Array.isArray(H.end)){if(H.skip||H.excludeEnd||H.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ie;if(typeof H.endScope!="object"||H.endScope===null)throw lt("endScope must be object"),ie;Ee(H,H.end,{key:"endScope"}),H.end=D(H.end,{joinWith:""})}}function Re(H){H.scope&&typeof H.scope=="object"&&H.scope!==null&&(H.beginScope=H.scope,delete H.scope)}function ze(H){Re(H),typeof H.beginScope=="string"&&(H.beginScope={_wrap:H.beginScope}),typeof H.endScope=="string"&&(H.endScope={_wrap:H.endScope}),se(H),ye(H)}function tt(H){function fe(Me,Ae){return new RegExp(m(Me),"m"+(H.case_insensitive?"i":"")+(H.unicodeRegex?"u":"")+(Ae?"g":""))}class Se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ae,qe){qe.position=this.position++,this.matchIndexes[this.matchAt]=qe,this.regexes.push([qe,Ae]),this.matchAt+=T(Ae)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ae=this.regexes.map(qe=>qe[1]);this.matcherRe=fe(D(Ae,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ae){this.matcherRe.lastIndex=this.lastIndex;const qe=this.matcherRe.exec(Ae);if(!qe)return null;const Zt=qe.findIndex((Xn,Ur)=>Ur>0&&Xn!==void 0),Nt=this.matchIndexes[Zt];return qe.splice(0,Zt),Object.assign(qe,Nt)}}class Xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ae){if(this.multiRegexes[Ae])return this.multiRegexes[Ae];const qe=new Se;return this.rules.slice(Ae).forEach(([Zt,Nt])=>qe.addRule(Zt,Nt)),qe.compile(),this.multiRegexes[Ae]=qe,qe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ae,qe){this.rules.push([Ae,qe]),qe.type==="begin"&&this.count++}exec(Ae){const qe=this.getMatcher(this.regexIndex);qe.lastIndex=this.lastIndex;let Zt=qe.exec(Ae);if(this.resumingScanAtSamePosition()&&!(Zt&&Zt.index===this.lastIndex)){const Nt=this.getMatcher(0);Nt.lastIndex=this.lastIndex+1,Zt=Nt.exec(Ae)}return Zt&&(this.regexIndex+=Zt.position+1,this.regexIndex===this.count&&this.considerAll()),Zt}}function Pt(Me){const Ae=new Xe;return Me.contains.forEach(qe=>Ae.addRule(qe.begin,{rule:qe,type:"begin"})),Me.terminatorEnd&&Ae.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&Ae.addRule(Me.illegal,{type:"illegal"}),Ae}function At(Me,Ae){const qe=Me;if(Me.isCompiled)return qe;[$e,Tt,ze,Qe].forEach(Nt=>Nt(Me,Ae)),H.compilerExtensions.forEach(Nt=>Nt(Me,Ae)),Me.__beforeBegin=null,[Je,Pe,Be].forEach(Nt=>Nt(Me,Ae)),Me.isCompiled=!0;let Zt=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),Zt=Me.keywords.$pattern,delete Me.keywords.$pattern),Zt=Zt||/\w+/,Me.keywords&&(Me.keywords=he(Me.keywords,H.case_insensitive)),qe.keywordPatternRe=fe(Zt,!0),Ae&&(Me.begin||(Me.begin=/\B|\b/),qe.beginRe=fe(qe.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(qe.endRe=fe(qe.end)),qe.terminatorEnd=m(qe.end)||"",Me.endsWithParent&&Ae.terminatorEnd&&(qe.terminatorEnd+=(Me.end?"|":"")+Ae.terminatorEnd)),Me.illegal&&(qe.illegalRe=fe(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(Nt){return Ft(Nt==="self"?Me:Nt)})),Me.contains.forEach(function(Nt){At(Nt,qe)}),Me.starts&&At(Me.starts,Ae),qe.matcher=Pt(qe),qe}if(H.compilerExtensions||(H.compilerExtensions=[]),H.contains&&H.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return H.classNameAliases=i(H.classNameAliases||{}),At(H)}function rt(H){return H?H.endsWithParent||rt(H.starts):!1}function Ft(H){return H.variants&&!H.cachedVariants&&(H.cachedVariants=H.variants.map(function(fe){return i(H,{variants:null},fe)})),H.cachedVariants?H.cachedVariants:rt(H)?i(H,{starts:H.starts?i(H.starts):null}):Object.isFrozen(H)?i(H):H}var We="11.11.1";class Dn extends Error{constructor(fe,Se){super(fe),this.name="HTMLInjectionError",this.html=Se}}const en=r,yi=i,ra=Symbol("nomatch"),Ma=7,aa=function(H){const fe=Object.create(null),Se=Object.create(null),Xe=[];let Pt=!0;const At="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let Ae={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function qe(xe){return Ae.noHighlightRe.test(xe)}function Zt(xe){let Ue=xe.className+" ";Ue+=xe.parentNode?xe.parentNode.className:"";const ct=Ae.languageDetectRe.exec(Ue);if(ct){const Rt=jn(ct[1]);return Rt||(Wt(At.replace("{}",ct[1])),Wt("Falling back to no-highlight mode for this block.",xe)),Rt?ct[1]:"no-highlight"}return Ue.split(/\s+/).find(Rt=>qe(Rt)||jn(Rt))}function Nt(xe,Ue,ct){let Rt="",sn="";typeof Ue=="object"?(Rt=xe,ct=Ue.ignoreIllegals,sn=Ue.language):(B("10.7.0","highlight(lang, code, ...args) has been deprecated."),B("10.7.0",`Please use highlight(code, options) instead.
472
+ https://github.com/highlightjs/highlight.js/issues/2277`),sn=xe,Rt=Ue),ct===void 0&&(ct=!0);const Tn={code:Rt,language:sn};vi("before:highlight",Tn);const Zn=Tn.result?Tn.result:Xn(Tn.language,Tn.code,ct);return Zn.code=Tn.code,vi("after:highlight",Zn),Zn}function Xn(xe,Ue,ct,Rt){const sn=Object.create(null);function Tn(we,je){return we.keywords[je]}function Zn(){if(!Ye.keywords){dn.addText(Ot);return}let we=0;Ye.keywordPatternRe.lastIndex=0;let je=Ye.keywordPatternRe.exec(Ot),nt="";for(;je;){nt+=Ot.substring(we,je.index);const pt=wn.case_insensitive?je[0].toLowerCase():je[0],Jt=Tn(Ye,pt);if(Jt){const[gr,pl]=Jt;if(dn.addText(nt),nt="",sn[pt]=(sn[pt]||0)+1,sn[pt]<=Ma&&(Ia+=pl),gr.startsWith("_"))nt+=je[0];else{const Vo=wn.classNameAliases[gr]||gr;Jn(je[0],Vo)}}else nt+=je[0];we=Ye.keywordPatternRe.lastIndex,je=Ye.keywordPatternRe.exec(Ot)}nt+=Ot.substring(we),dn.addText(nt)}function Un(){if(Ot==="")return;let we=null;if(typeof Ye.subLanguage=="string"){if(!fe[Ye.subLanguage]){dn.addText(Ot);return}we=Xn(Ye.subLanguage,Ot,!0,Go[Ye.subLanguage]),Go[Ye.subLanguage]=we._top}else we=Qn(Ot,Ye.subLanguage.length?Ye.subLanguage:null);Ye.relevance>0&&(Ia+=we.relevance),dn.__addSublanguage(we._emitter,we.language)}function $t(){Ye.subLanguage!=null?Un():Zn(),Ot=""}function Jn(we,je){we!==""&&(dn.startScope(je),dn.addText(we),dn.endScope())}function Ko(we,je){let nt=1;const pt=je.length-1;for(;nt<=pt;){if(!we._emit[nt]){nt++;continue}const Jt=wn.classNameAliases[we[nt]]||we[nt],gr=je[nt];Jt?Jn(gr,Jt):(Ot=gr,Zn(),Ot=""),nt++}}function ns(we,je){return we.scope&&typeof we.scope=="string"&&dn.openNode(wn.classNameAliases[we.scope]||we.scope),we.beginScope&&(we.beginScope._wrap?(Jn(Ot,wn.classNameAliases[we.beginScope._wrap]||we.beginScope._wrap),Ot=""):we.beginScope._multi&&(Ko(we.beginScope,je),Ot="")),Ye=Object.create(we,{parent:{value:Ye}}),Ye}function dl(we,je,nt){let pt=C(we.endRe,nt);if(pt){if(we["on:end"]){const Jt=new t(we);we["on:end"](je,Jt),Jt.isMatchIgnored&&(pt=!1)}if(pt){for(;we.endsParent&&we.parent;)we=we.parent;return we}}if(we.endsWithParent)return dl(we.parent,je,nt)}function rs(we){return Ye.matcher.regexIndex===0?(Ot+=we[0],1):(za=!0,0)}function Cd(we){const je=we[0],nt=we.rule,pt=new t(nt),Jt=[nt.__beforeBegin,nt["on:begin"]];for(const gr of Jt)if(gr&&(gr(we,pt),pt.isMatchIgnored))return rs(je);return nt.skip?Ot+=je:(nt.excludeBegin&&(Ot+=je),$t(),!nt.returnBegin&&!nt.excludeBegin&&(Ot=je)),ns(nt,we),nt.returnBegin?0:je.length}function Fn(we){const je=we[0],nt=Ue.substring(we.index),pt=dl(Ye,we,nt);if(!pt)return ra;const Jt=Ye;Ye.endScope&&Ye.endScope._wrap?($t(),Jn(je,Ye.endScope._wrap)):Ye.endScope&&Ye.endScope._multi?($t(),Ko(Ye.endScope,we)):Jt.skip?Ot+=je:(Jt.returnEnd||Jt.excludeEnd||(Ot+=je),$t(),Jt.excludeEnd&&(Ot=je));do Ye.scope&&dn.closeNode(),!Ye.skip&&!Ye.subLanguage&&(Ia+=Ye.relevance),Ye=Ye.parent;while(Ye!==pt.parent);return pt.starts&&ns(pt.starts,we),Jt.returnEnd?0:je.length}function fl(){const we=[];for(let je=Ye;je!==wn;je=je.parent)je.scope&&we.unshift(je.scope);we.forEach(je=>dn.openNode(je))}let wi={};function as(we,je){const nt=je&&je[0];if(Ot+=we,nt==null)return $t(),0;if(wi.type==="begin"&&je.type==="end"&&wi.index===je.index&&nt===""){if(Ot+=Ue.slice(je.index,je.index+1),!Pt){const pt=new Error(`0 width match regex (${xe})`);throw pt.languageName=xe,pt.badRule=wi.rule,pt}return 1}if(wi=je,je.type==="begin")return Cd(je);if(je.type==="illegal"&&!ct){const pt=new Error('Illegal lexeme "'+nt+'" for mode "'+(Ye.scope||"<unnamed>")+'"');throw pt.mode=Ye,pt}else if(je.type==="end"){const pt=Fn(je);if(pt!==ra)return pt}if(je.type==="illegal"&&nt==="")return Ot+=`
473
+ `,1;if(hl>1e5&&hl>je.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ot+=nt,nt.length}const wn=jn(xe);if(!wn)throw lt(At.replace("{}",xe)),new Error('Unknown language: "'+xe+'"');const qo=tt(wn);let is="",Ye=Rt||qo;const Go={},dn=new Ae.__emitter(Ae);fl();let Ot="",Ia=0,la=0,hl=0,za=!1;try{if(wn.__emitTokens)wn.__emitTokens(Ue,dn);else{for(Ye.matcher.considerAll();;){hl++,za?za=!1:Ye.matcher.considerAll(),Ye.matcher.lastIndex=la;const we=Ye.matcher.exec(Ue);if(!we)break;const je=Ue.substring(la,we.index),nt=as(je,we);la=we.index+nt}as(Ue.substring(la))}return dn.finalize(),is=dn.toHTML(),{language:xe,value:is,relevance:Ia,illegal:!1,_emitter:dn,_top:Ye}}catch(we){if(we.message&&we.message.includes("Illegal"))return{language:xe,value:en(Ue),illegal:!0,relevance:0,_illegalBy:{message:we.message,index:la,context:Ue.slice(la-100,la+100),mode:we.mode,resultSoFar:is},_emitter:dn};if(Pt)return{language:xe,value:en(Ue),illegal:!1,relevance:0,errorRaised:we,_emitter:dn,_top:Ye};throw we}}function Ur(xe){const Ue={value:en(xe),illegal:!1,relevance:0,_top:Me,_emitter:new Ae.__emitter(Ae)};return Ue._emitter.addText(xe),Ue}function Qn(xe,Ue){Ue=Ue||Ae.languages||Object.keys(fe);const ct=Ur(xe),Rt=Ue.filter(jn).filter(ja).map($t=>Xn($t,xe,!1));Rt.unshift(ct);const sn=Rt.sort(($t,Jn)=>{if($t.relevance!==Jn.relevance)return Jn.relevance-$t.relevance;if($t.language&&Jn.language){if(jn($t.language).supersetOf===Jn.language)return 1;if(jn(Jn.language).supersetOf===$t.language)return-1}return 0}),[Tn,Zn]=sn,Un=Tn;return Un.secondBest=Zn,Un}function Fr(xe,Ue,ct){const Rt=Ue&&Se[Ue]||ct;xe.classList.add("hljs"),xe.classList.add(`language-${Rt}`)}function an(xe){let Ue=null;const ct=Zt(xe);if(qe(ct))return;if(vi("before:highlightElement",{el:xe,language:ct}),xe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",xe);return}if(xe.children.length>0&&(Ae.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(xe)),Ae.throwUnescapedHTML))throw new Dn("One of your code blocks includes unescaped HTML.",xe.innerHTML);Ue=xe;const Rt=Ue.textContent,sn=ct?Nt(Rt,{language:ct,ignoreIllegals:!0}):Qn(Rt);xe.innerHTML=sn.value,xe.dataset.highlighted="yes",Fr(xe,ct,sn.language),xe.result={language:sn.language,re:sn.relevance,relevance:sn.relevance},sn.secondBest&&(xe.secondBest={language:sn.secondBest.language,relevance:sn.secondBest.relevance}),vi("after:highlightElement",{el:xe,result:sn,text:Rt})}function Cn(xe){Ae=yi(Ae,xe)}const Da=()=>{ts(),B("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function cl(){ts(),B("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Fo=!1;function ts(){function xe(){ts()}if(document.readyState==="loading"){Fo||window.addEventListener("DOMContentLoaded",xe,!1),Fo=!0;return}document.querySelectorAll(Ae.cssSelector).forEach(an)}function $o(xe,Ue){let ct=null;try{ct=Ue(H)}catch(Rt){if(lt("Language definition for '{}' could not be registered.".replace("{}",xe)),Pt)lt(Rt);else throw Rt;ct=Me}ct.name||(ct.name=xe),fe[xe]=ct,ct.rawDefinition=Ue.bind(null,H),ct.aliases&&ia(ct.aliases,{languageName:xe})}function xi(xe){delete fe[xe];for(const Ue of Object.keys(Se))Se[Ue]===xe&&delete Se[Ue]}function ul(){return Object.keys(fe)}function jn(xe){return xe=(xe||"").toLowerCase(),fe[xe]||fe[Se[xe]]}function ia(xe,{languageName:Ue}){typeof xe=="string"&&(xe=[xe]),xe.forEach(ct=>{Se[ct.toLowerCase()]=Ue})}function ja(xe){const Ue=jn(xe);return Ue&&!Ue.disableAutodetect}function La(xe){xe["before:highlightBlock"]&&!xe["before:highlightElement"]&&(xe["before:highlightElement"]=Ue=>{xe["before:highlightBlock"](Object.assign({block:Ue.el},Ue))}),xe["after:highlightBlock"]&&!xe["after:highlightElement"]&&(xe["after:highlightElement"]=Ue=>{xe["after:highlightBlock"](Object.assign({block:Ue.el},Ue))})}function un(xe){La(xe),Xe.push(xe)}function Ho(xe){const Ue=Xe.indexOf(xe);Ue!==-1&&Xe.splice(Ue,1)}function vi(xe,Ue){const ct=xe;Xe.forEach(function(Rt){Rt[ct]&&Rt[ct](Ue)})}function sa(xe){return B("10.7.0","highlightBlock will be removed entirely in v12.0"),B("10.7.0","Please use highlightElement now."),an(xe)}Object.assign(H,{highlight:Nt,highlightAuto:Qn,highlightAll:ts,highlightElement:an,highlightBlock:sa,configure:Cn,initHighlighting:Da,initHighlightingOnLoad:cl,registerLanguage:$o,unregisterLanguage:xi,listLanguages:ul,getLanguage:jn,registerAliases:ia,autoDetection:ja,inherit:yi,addPlugin:un,removePlugin:Ho}),H.debugMode=function(){Pt=!1},H.safeMode=function(){Pt=!0},H.versionString=We,H.regex={concat:S,lookahead:x,either:N,optional:E,anyNumberOfTimes:v};for(const xe in ke)typeof ke[xe]=="object"&&e(ke[xe]);return Object.assign(H,ke),H},vn=aa({});return vn.newInstance=()=>aa({}),gp=vn,vn.HighlightJS=vn,vn.default=vn,gp}var gU=mU();const bU=tl(gU),e1={},yU="hljs-";function xU(e){const t=bU.newInstance();return e&&o(e),{highlight:r,highlightAuto:i,listLanguages:s,register:o,registerAlias:c,registered:d};function r(h,f,g){const m=g||e1,x=typeof m.prefix=="string"?m.prefix:yU;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:vU,classPrefix:x});const v=t.highlight(f,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const E=v._emitter.root,S=E.data;return S.language=v.language,S.relevance=v.relevance,E}function i(h,f){const m=(f||e1).subset||s();let x=-1,v=0,E;for(;++x<m.length;){const S=m[x];if(!t.getLanguage(S))continue;const _=r(S,h,f);_.data&&_.data.relevance!==void 0&&_.data.relevance>v&&(v=_.data.relevance,E=_)}return E||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function o(h,f){if(typeof h=="string")t.registerLanguage(h,f);else{let g;for(g in h)Object.hasOwn(h,g)&&t.registerLanguage(g,h[g])}}function c(h,f){if(typeof h=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:h});else{let g;for(g in h)if(Object.hasOwn(h,g)){const m=h[g];t.registerAliases(typeof m=="string"?m:[...m],{languageName:g})}}}function d(h){return!!t.getLanguage(h)}}class vU{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],i=r.children[r.children.length-1];i&&i.type==="text"?i.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const i=this.stack[this.stack.length-1],s=t.root.children;r?i.children.push({type:"element",tagName:"span",properties:{className:[r]},children:s}):i.children.push(...s)}openNode(t){const r=this,i=t.split(".").map(function(c,d){return d?c+"_".repeat(d):r.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:i},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const wU={};function EU(e){const t=e||wU,r=t.aliases,i=t.detect||!1,s=t.languages||pU,o=t.plainText,c=t.prefix,d=t.subset;let h="hljs";const f=xU(s);if(r&&f.registerAlias(r),c){const g=c.indexOf("-");h=g===-1?c:c.slice(0,g)}return function(g,m){Sd(g,"element",function(x,v,E){if(x.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const S=SU(x);if(S===!1||!S&&!i||S&&o&&o.includes(S))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(h)||x.properties.className.unshift(h);const _=FP(x,{whitespace:"pre"});let N;try{N=S?f.highlight(S,_,{prefix:c}):f.highlightAuto(_,{prefix:c,subset:d})}catch(T){const C=T;if(S&&/Unknown language/.test(C.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[E,x],cause:C,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!S&&N.data&&N.data.language&&x.properties.className.push("language-"+N.data.language),N.children.length>0&&(x.children=N.children)})}}function SU(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let i;for(;++r<t.length;){const s=String(t[r]);if(s==="no-highlight"||s==="nohighlight")return!1;!i&&s.slice(0,5)==="lang-"&&(i=s.slice(5)),!i&&s.slice(0,9)==="language-"&&(i=s.slice(9))}return i}function _U({code:e}){const[t,r]=w.useState(!1),i=()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return p.jsx("button",{onClick:i,className:"absolute top-2 right-2 p-1.5 rounded-md bg-gray-200/80 dark:bg-gray-700/80 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity z-10",children:t?p.jsx(vo,{size:12}):p.jsx(OC,{size:12})})}function kU({children:e,...t}){var o;const r=e==null?void 0:e.props,i=((o=r==null?void 0:r.className)==null?void 0:o.replace(/^language-/,""))||"",s=typeof(r==null?void 0:r.children)=="string"?r.children.replace(/\n$/,""):"";return p.jsxs("div",{className:"not-prose relative group my-4",children:[i&&p.jsx("div",{className:"absolute top-0 left-0 px-2.5 py-1 text-[10px] font-medium uppercase tracking-wider text-gray-400 dark:text-gray-500 bg-gray-100 dark:bg-gray-800 rounded-tl-lg rounded-br-lg border-b border-r border-gray-200 dark:border-gray-700 font-mono",children:i}),p.jsx(_U,{code:s}),p.jsx("pre",{className:"overflow-x-auto rounded-lg bg-[#fafafa] dark:bg-[#0d1117] border border-gray-200 dark:border-gray-700/60 p-4 pt-8 text-[13px] leading-[1.6] font-mono",...t,children:e})]})}function NU({children:e,className:t,...r}){return t?p.jsx("code",{className:t,...r,children:e}):p.jsx("code",{className:"px-1.5 py-0.5 rounded-md bg-gray-100 dark:bg-gray-800 text-pink-600 dark:text-pink-400 text-[0.875em] font-mono border border-gray-200/60 dark:border-gray-700/40",...r,children:e})}function gg({content:e,isUser:t}){return t?p.jsx("div",{className:"prose prose-sm max-w-none text-inherit [&_*]:text-inherit [&_a]:underline [&_code]:border [&_code]:border-black/10 [&_code]:bg-black/10 [&_code]:text-inherit dark:[&_code]:border-white/10 dark:[&_code]:bg-white/12 [&>p]:my-0.5 [&_li]:my-0",children:p.jsx(jv,{remarkPlugins:[$v],children:e})}):p.jsx("div",{className:He("prose max-w-none dark:prose-invert","prose-headings:font-semibold prose-headings:tracking-tight","prose-h1:text-xl prose-h1:mt-5 prose-h1:mb-3 prose-h1:pb-1.5 prose-h1:border-b prose-h1:border-gray-200 dark:prose-h1:border-gray-700","prose-h2:text-lg prose-h2:mt-5 prose-h2:mb-2","prose-h3:text-base prose-h3:mt-4 prose-h3:mb-2","prose-p:my-2.5 prose-p:leading-relaxed","prose-li:my-0.5","prose-ul:my-2 prose-ol:my-2","prose-a:text-accent prose-a:no-underline hover:prose-a:underline","prose-strong:text-gray-900 dark:prose-strong:text-white prose-strong:font-semibold","prose-blockquote:border-l-[3px] prose-blockquote:border-accent/40 prose-blockquote:bg-accent/[0.03] prose-blockquote:rounded-r-lg prose-blockquote:py-0.5 prose-blockquote:px-4 prose-blockquote:my-3 prose-blockquote:not-italic prose-blockquote:text-gray-600 dark:prose-blockquote:text-gray-300","prose-hr:my-5 prose-hr:border-gray-200 dark:prose-hr:border-gray-700","prose-table:text-sm prose-th:bg-gray-50 dark:prose-th:bg-gray-800 prose-th:px-3 prose-th:py-2 prose-td:px-3 prose-td:py-2 prose-th:border-gray-200 dark:prose-th:border-gray-700 prose-td:border-gray-200 dark:prose-td:border-gray-700","prose-img:rounded-lg prose-img:shadow-sm"),children:p.jsx(jv,{remarkPlugins:[$v],rehypePlugins:[EU],components:{pre:kU,code:NU},children:e})})}function Vr(e){return e.name||e.user_name||e.chat_name||`Session ${e.id.slice(0,8)}`}function CU(e,t){var i;return t?[Vr(e),e.session_key,((i=e.last_message)==null?void 0:i.content)||"",e.user_name||"",e.chat_name||""].join(" ").toLowerCase().includes(t):!0}function t1(e){return[...e].sort((t,r)=>t.live!==r.live?t.live?-1:1:(r.updated_at||r.created_at||"").localeCompare(t.updated_at||t.created_at||""))}function k_(e,t="just now"){if(!e)return"";const r=Date.now()-new Date(e).getTime(),i=Math.floor(r/6e4);if(i<1)return t;if(i<60)return`${i}m`;const s=Math.floor(i/60);return s<24?`${s}h`:`${Math.floor(s/24)}d`}const TU="opencode",N_="opencode/minimax-m2.5-free",AU="",bp=["opencode","codex","claudecode","cursor","gemini","qoder","iflow","localcore-acp"],RU=["telegram","feishu","lark","discord","slack","dingtalk","wecom","weixin","qq","qqbot","line"],OU=["opencode","claudecode","acp","localcore-acp"],MU="localcore-acp",DU=["[Scheduler Tools]","If the user asks to create, view, edit, delete, or manually run a scheduled task for this conversation, use the Bash tool to run the local scheduler CLI.","Use these commands:",'lac scheduler add --cron "<5-field cron>" --message "<exact message to send>" --desc "<short label>" [--execution-mode same-thread|side-thread]',"lac scheduler list","lac scheduler list --thread","lac scheduler info <job-id>",'lac scheduler edit <job-id> [--cron "<5-field cron>"] [--message "<exact message>"] [--desc "<short label>"] [--enabled true|false] [--execution-mode same-thread|side-thread]',"lac scheduler del <job-id>","lac scheduler run <job-id>","Environment variables LOCAL_AI_WORKSPACE_ID, LOCAL_AI_THREAD_ID, LOCAL_AI_PLATFORM, LOCAL_AI_CHAT_ID, and LOCAL_AI_PLATFORM_USER_ID are already set when available.","Prefer relying on those variables instead of inventing your own route or creating session-only cron jobs.","By default, `lac scheduler list` shows all scheduled tasks in the current workspace. Use `lac scheduler list --thread` to show only the current conversation thread.","Use `--execution-mode same-thread` to reuse the current thread, or `--execution-mode side-thread` to run in a dedicated scheduled thread.","Only use the scheduler CLI when the user explicitly asks for scheduled automation.","[/Scheduler Tools]"].join(`
474
+ `),jU={allow:"allow",deny:"deny","allow all":"allow all",allowall:"allow all","perm:allow":"allow","perm:deny":"deny","perm:allow_all":"allow all"};function yp(e,t=[]){return[DU,...t.flatMap(r=>r?["",r]:[]),"","[User Message]",e,"[/User Message]"].join(`
475
+ `)}function xp(e){switch(String(e||"").trim().toLowerCase()){case"opencode":return N_;case"claudecode":return AU;default:return""}}function C_(e,t){const r=String(e||"").trim().toLowerCase(),i=String(t||"").trim();return r?r==="opencode"?i||N_:r==="claudecode"&&i.startsWith("opencode/")?"":i:i}function qu(e){return e&&jU[String(e).trim().toLowerCase()]||null}function LU(e){return!!qu(e==null?void 0:e.data)}function IU(e){if(!e||typeof e!="object")return null;const t=e,r=typeof t.text=="string"?t.text:typeof t.Text=="string"?t.Text:"",i=typeof t.data=="string"?t.data:typeof t.Data=="string"?t.Data:"";if(!r||!i)return null;const s=qu(i);return s?{text:s,data:s}:{text:r,data:i}}function zU(e){return e?OU.includes(String(e).trim().toLowerCase()):!1}function PU(e){const t=String(e||"").trim().toLowerCase();return t==="acp"||t==="opencode"||t==="claudecode"||t===MU}const BU=9e4;function _d(e){return e?e.startsWith("💭 ")||e.startsWith("🔧 ")||e.startsWith("📤 ")||e.startsWith("⏳ "):!1}function vp(e){if(!e)return!1;const t=e.replace(/\s+/g," ").trim();return/^Agent 提问(?:\s*\(\d+\/\d+\))?/i.test(t)||t.includes("请回复选项编号")||t.includes("直接输入你的回答")||t.includes("等待你的回复")||t.includes("请直接回复")||t.includes("请输入你的回答")}function yu(e,t,r){if(t)return e.find(i=>i.id===t);if(r)return e.find(i=>i.preview&&i.turnKey===r)}function UU(e,t,r){if(!e.preview||!r||e.turnKey!==r)return!1;const i=e.streamTargetContent??e.content;return!!(t&&i===t&&!_d(i))}function T_(e){if(!e)return"";const t=e.match(/\[User Message\]\s*([\s\S]*?)\s*\[\/User Message\]/);return t?t[1]||"":e}function FU(e){return e.map((t,r)=>({id:t.id||`${r}-${t.timestamp||t.role}`,role:t.role==="user"?"user":t.role==="system"?"system":"assistant",content:t.role==="user"?T_(t.content):t.content,kind:t.kind==="progress"||t.kind==="system"?"progress":"final",order:r,timestamp:t.timestamp}))}function A_(e){return{id:e.id,project:e.workspaceId,name:e.title,live:e.live,createdAt:e.createdAt,updatedAt:e.updatedAt,excerpt:T_(e.excerpt),agentType:e.agentType,bridgeSessionKey:e.bridgeSessionKey}}function R_(e){return[...e].sort((t,r)=>t.live!==r.live?t.live?-1:1:(r.updatedAt||r.createdAt||"").localeCompare(t.updatedAt||t.createdAt||""))}function $U(e,t){return t?[e.name,e.excerpt,e.bridgeSessionKey||""].join(" ").toLowerCase().includes(t):!0}function n1(e){return[...e].sort((t,r)=>{const i=t.timestamp?new Date(t.timestamp).getTime():Number.NaN,s=r.timestamp?new Date(r.timestamp).getTime():Number.NaN,o=Number.isFinite(i),c=Number.isFinite(s);return o&&c&&i!==s?i-s:t.order!==r.order?t.order-r.order:t.id.localeCompare(r.id)})}function r1(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(t)}function HU(e){switch(e){case"starting":return"启动中";case"api_ready":return"服务就绪";case"error":return"运行异常";default:return"未启动"}}function KU(e){if(!(e!=null&&e.startsWith("desktop:")))return"";const[,t=""]=e.split(":");return t}function qU(e){return Array.isArray(e)?e.map(t=>Array.isArray(t)?t.map(r=>IU(r)).filter(r=>!!r):[]).filter(t=>t.length>0):[]}function O_(e,t,r){const i=e.filter(s=>s.project!==t);return i.push({project:t,sessions:r}),i.sort((s,o)=>s.project.localeCompare(o.project))}function GU(e,t,r){var o;const i=((o=e.find(c=>c.project===t))==null?void 0:o.sessions)||[],s=R_([r,...i.filter(c=>c.id!==r.id)]);return O_(e,t,s)}function VU(e){return e.some(t=>t.some(r=>LU(r)))}function YU(e,t){return e==="stopping"?"Stopping current task…":e==="error"?"":e==="awaiting_input"?"Agent is waiting for your reply.":e==="permission_submitted"?"Permission sent. Waiting for the agent to continue…":e==="awaiting_permission"?"Waiting for your permission response.":t?"Agent is typing…":e==="running"?"Task is running…":""}function WU(e){return e==="running"||e==="awaiting_permission"||e==="permission_submitted"||e==="stopping"}function XU(e){return e!=="idle"&&e!=="awaiting_input"&&e!=="error"}function QU(e){return e!=="awaiting_input"&&e!=="awaiting_permission"&&e!=="permission_submitted"&&e!=="stopping"}function M_(){return Hi()==="local_core"?{chatTitle:"本地对话",chatHeading:"本地对话",chatDescription:"浏览线程、切换工作区,并与本地 AI Core 保持同步。",scopeLabel:"当前工作区",scopeSelectPlaceholder:"选择工作区",searchPlaceholder:"搜索线程、联系人或消息摘要",startRuntimeLabel:"启动运行时",startingRuntimeLabel:"启动中…",newThreadLabel:"新建线程",pendingRestartLabel:"最新配置已经保存,但当前对话仍在使用旧运行时状态。请重启运行时以应用配置。",emptySelectionLabel:"选择工作区后即可开始对话。",emptyThreadsLabel:"当前还没有线程。",emptySearchLabel:"没有匹配的线程。",collectionLabel:"线程",activeScopeLabel:"当前工作区",activeConversationFallback:"新对话",startConversationLabel:"选择工作区后即可开始聊天。",runtimeOnlineLabel:"运行时在线",runtimeOfflineLabel:"运行时离线",emptyConversationLabel:"发送一条消息,即可在当前工作区创建新线程。",startFirstPlaceholder:"请先启动运行时",waitingRuntimePlaceholder:"正在等待运行时通道连接",sendPlaceholder:"输入一条发给当前线程的消息",permissionUnsupportedLabel:"当前代理无法在此对话中继续交互式审批。请切换到支持的代理,或调整运行时权限后重试。",replyTimeoutLabel:"审批回复已发送,但代理没有继续执行。该请求可能暂不支持本地运行时继续处理。"}:{chatTitle:"桌面对话",chatHeading:"桌面对话",chatDescription:"",scopeLabel:"当前项目",scopeSelectPlaceholder:"选择项目",searchPlaceholder:"搜索会话、用户或消息摘要",startRuntimeLabel:"启动服务",startingRuntimeLabel:"启动中…",newThreadLabel:"新建会话",pendingRestartLabel:"最新配置已经保存,但当前对话仍在使用旧服务状态。请重启桌面服务以应用配置。",emptySelectionLabel:"选择项目后即可开始对话。",emptyThreadsLabel:"当前还没有桌面会话。",emptySearchLabel:"没有匹配的会话。",collectionLabel:"会话",activeScopeLabel:"当前项目",activeConversationFallback:"新桌面对话",startConversationLabel:"选择项目后即可开始聊天。",runtimeOnlineLabel:"桥接在线",runtimeOfflineLabel:"桥接离线",emptyConversationLabel:"发送一条消息,即可在当前项目中创建桌面会话。",startFirstPlaceholder:"请先启动服务",waitingRuntimePlaceholder:"正在等待桌面桥接连接",sendPlaceholder:"输入一条发给桌面通道的消息",permissionUnsupportedLabel:"当前代理无法在桌面对话中继续交互式审批。请切换到支持的代理,或调整代理权限与 work_dir 后重试。",replyTimeoutLabel:"审批回复已发送,但代理没有继续执行。当前代理或请求可能暂不支持桌面续接。"}}function ZU({requestedProject:e,selectedProject:t,setSelectedProject:r,clearReplyTimeout:i,updateTaskState:s,setTyping:o}){const[c,d]=w.useState(null),[h,f]=w.useState(!0),g=Hi(),m=g==="electron",x=(c==null?void 0:c.phase)==="api_ready",v=x,E=w.useCallback(async()=>{const S=await Wm();d(S),!S.roles.conversation.lastError&&!t&&!e&&S.settings.defaultProject&&r(S.settings.defaultProject)},[e,t,r]);return w.useEffect(()=>{E().finally(()=>f(!1));const S=Xm(_=>{d(_),(_.phase==="stopped"||_.phase==="error")&&(o(!1),i(),s("idle"))});return()=>{i(),S()}},[i,E,o,s]),w.useMemo(()=>({loading:h,refreshRuntime:E,runtime:c,runtimeProvider:g,serviceRunning:x,showSessionKey:m,transportReady:v}),[h,E,c,g,x,m,v])}const D_=e=>ot.get(`/projects/${e}/sessions`),j_=(e,t,r)=>ot.get(`/projects/${e}/sessions/${t}`,{history_limit:String(r)}),JU=(e,t,r)=>ot.patch(`/projects/${e}/sessions/${t}`,r),e6=(e,t)=>ot.delete(`/projects/${e}/sessions/${t}`),t6=(e,t)=>ot.post(`/projects/${e}/sessions/switch`,t),om=(e,t)=>ot.post(`/projects/${e}/send`,t);function n6({current:e,requested:t,runtimeDefault:r,workspaceIds:i}){return e&&i.includes(e)?e:t&&i.includes(t)?t:r&&i.includes(r)?r:i[0]||""}function r6({activeThreadId:e,requestedWorkspaceId:t,requestedThreadId:r,runtimeDefaultWorkspaceId:i,runtimeProvider:s,searchParams:o,serviceRunning:c,selectedWorkspaceId:d,workspaceIds:h,threadGroups:f,threadSearch:g,setSelectedKnowledgeBaseIds:m,setActiveRunId:x,setActiveSessionAgentType:v,setActiveSessionId:E,setActiveSessionKey:S,setActiveSessionName:_,setBridgeError:N,setMessages:T,setPendingPermissionRequest:C,setProjects:j,setSearchParams:D,setSelectedProject:A,setThreadGroups:P,setTyping:K,applyLocalCoreThreadDetail:X,clearReplyTimeout:O,updateTaskState:U,holdBlankComposerRef:J,lastSessionByProjectRef:ce,nextMessageOrderRef:q,pendingTurnRef:$,progressSequenceByTurnRef:I}){const Q=w.useMemo(()=>{var R;return((R=f.find(ee=>ee.project===d))==null?void 0:R.sessions)||[]},[d,f]),Y=w.useMemo(()=>{const R=g.trim().toLowerCase();return h.map(ee=>{var oe;const ge=(((oe=f.find(re=>re.project===ee))==null?void 0:oe.sessions)||[]).filter(re=>$U(re,R));return{project:ee,sessions:ge}}).filter(ee=>ee.sessions.length>0||!R&&ee.project===d)},[d,f,g,h]),L=w.useCallback(async R=>{if(!R||!c)return[];const ee=R_((await Dj(R)).threads.map(oe=>A_(oe))),ge=ee.find(oe=>oe.id===e);return ge!=null&&ge.agentType&&v(ge.agentType),P(oe=>O_(oe,R,ee)),ee},[e,c,v,P,!0]),z=w.useCallback(async(R,ee)=>{if(!(!R||!ee||!c)){J.current=!1,U("idle"),C(null),K(!1);{const ge=await qE(ee);X(ge);return}}},[X,J,ce,q,$,I,c,x,v,E,S,_,m,T,C,A,P,K,U,!0]),V=w.useCallback(async()=>{if(!c)return j([]),P([]),m([]),[];const R=(await Ym()).workspaces.map(oe=>oe.id);j(R);const ee=n6({current:d,requested:t,runtimeDefault:i,workspaceIds:R}),ge=(await Promise.all(R.map(async oe=>({project:oe,sessions:await L(oe)})))).sort((oe,re)=>oe.project.localeCompare(re.project));return P(ge),A(ee),ge},[L,t,i,d,c,j,m,A,P,!0]);return w.useEffect(()=>{if(!c){P([]),T([]),C(null),m([]),v(""),x(""),N(""),$.current=null,q.current=0,I.current={},U("idle"),K(!1),O();return}V()},[O,q,$,I,V,c,x,v,N,T,C,m,P,K,U]),w.useEffect(()=>{if(!d||!c||Q.find(re=>re.id===e))return;const ee=t===d?r:"",ge=ce.current[d];if(!e&&J.current)return;const oe=Q.find(re=>re.id===ee)||Q.find(re=>re.id===ge)||Q[0];if(oe){K(!1),U("idle"),N(""),O(),z(d,oe.id);return}K(!1),U("idle"),N(""),O(),E(""),S(""),_(""),v(""),x(""),T([]),$.current=null,q.current=0,I.current={}},[e,O,J,ce,z,q,$,I,r,t,d,c,x,v,E,S,_,N,T,K,Q,U]),w.useEffect(()=>{if(!d&&!e)return;const R=new URLSearchParams(o);d?R.set("project",d):R.delete("project"),e?R.set("session",e):R.delete("session"),R.toString()!==o.toString()&&D(R,{replace:!0})},[e,o,d,D]),{filteredThreadGroups:Y,loadActiveThread:z,refreshThreadsForWorkspace:L,refreshWorkspacesAndThreads:V}}function a6({activeAgentType:e,activeThreadId:t,armReplyTimeout:r,clearActionStatuses:i,clearReplyTimeout:s,reserveNextMessageOrder:o,runtimeProvider:c,selectedWorkspaceId:d,sendAction:h,settlePreviewMessages:f,setActiveRunId:g,setBridgeError:m,setMessages:x,setPendingPermissionRequest:v,setPendingBridgeActionId:E,setTyping:S,updateTaskState:_}){return{handleBridgeAction:w.useCallback(async(C,j)=>{if(!t)return;const D=qu(j.data)||j.data,A=qu(j.data)||j.text||j.data,P=o(),K=`${crypto.randomUUID()}-user-action`;let X=!1;E(C.id),x(O=>O.map(U=>U.id===C.id?{...U,actionPending:!0}:U)),v(O=>O&&O.id===C.id?{...O,actionPending:!0}:O);try{x(U=>[...U,{id:K,role:"user",content:A,order:P,timestamp:new Date().toISOString()}]);const O=await h(t,D);g(O.runId),X=!0,m(""),f(C.actionReplyCtx),S(!0),s(),i(),C.actionMode==="permission"&&C.actionInteractive?(_("permission_submitted","bridge-permission-submitted"),r("permission_continue"),v(null),x(U=>U.map(J=>J.id===C.id?{...J,actions:[],actionPending:!1,actionStatus:"Permission sent. Waiting for the agent to continue…"}:J))):(_("running","bridge-action-submitted"),r())}catch(O){m(O instanceof Error?O.message:"Failed to send permission response."),x(U=>U.filter(J=>J.id!==K)),_(C.actionMode==="permission"&&C.actionInteractive?"awaiting_permission":"error",C.actionMode==="permission"&&C.actionInteractive?"bridge-permission-submit-failed":"bridge-action-submit-failed"),S(!1),v(U=>U&&U.id===C.id?{...U,actionPending:!1}:U)}finally{E(null),x(O=>O.map(U=>U.id===C.id?{...U,actionPending:!1,actions:X?U.actions||[]:U.actions}:U))}},[t,r,i,s,o,h,f,g,m,x,v,E,S,_,!0])}}function i6(e){var r;if(!e.id||e.role!=="assistant"||e.actionMode!=="permission"||!e.content)return null;const t=((r=e.actions)==null?void 0:r.filter(i=>i.length>0))||[];return t.length===0?null:{id:e.id,content:e.content,actions:t,actionReplyCtx:e.actionReplyCtx,actionPending:e.actionPending,actionStatus:e.actionStatus,actionMode:"permission",actionInteractive:!0}}function s6(e){return e==="awaiting_permission"?"awaiting_permission":"idle"}function l6(e,t){return t?"awaiting_permission":e?"awaiting_input":"idle"}function o6(e,t){return t?"bridge-buttons-awaiting-permission":e?"bridge-buttons-awaiting-input":"bridge-buttons-idle"}function c6(e){const t=e||"This agent",r=M_();return r.permissionUnsupportedLabel.startsWith("This agent")?r.permissionUnsupportedLabel:`${t} ${r.permissionUnsupportedLabel.replace(/^This agent\s+/i,"")}`}function u6(e){return e.type==="typing_stop"||e.type==="buttons"||e.type==="card"?!0:e.type==="reply"&&!_d(e.content)}function d6({activeAgentType:e,activeBridgeSessionKey:t,armReplyTimeout:r,clearActionStatuses:i,clearReplyTimeout:s,finalizeTurnMessages:o,nextProgressMessageId:c,pendingTurnRef:d,progressSequenceByTurnRef:h,refreshThreadsForWorkspace:f,reserveAssistantMessageOrder:g,settlePreviewMessages:m,setBridgeError:x,setMessages:v,setPendingPermissionRequest:E,setTyping:S,taskStateRef:_,updateTaskState:N}){const T=PU(e),C=w.useCallback(D=>{QU(_.current)&&N("running",D)},[_,N]),j=w.useCallback(D=>{console.info("[desktop-chat] bridge_event",{type:D.type,sessionKey:D.sessionKey,replyCtx:D.replyCtx,taskState:_.current});const A=KU(D.sessionKey);if(A&&u6(D)&&f(A),!(!D.sessionKey||D.sessionKey!==t))switch(D.type){case"preview_start":if(vp(D.content)){s(),S(!1),d.current=null,i(),N("awaiting_input","bridge-preview-awaiting-input"),E(null),x(""),v(q=>{const $=yu(q,D.previewHandle,D.replyCtx),I=($==null?void 0:$.id)||D.previewHandle||`${D.replyCtx||crypto.randomUUID()}-preview`,W=q.filter(Q=>Q.id!==I);return W.push({id:I,role:"assistant",content:T?($==null?void 0:$.content)||"":D.content||"",streamTargetContent:T?D.content||"":void 0,kind:"progress",order:($==null?void 0:$.order)??g(D.sessionKey),timestamp:($==null?void 0:$.timestamp)||new Date().toISOString(),turnKey:D.replyCtx,preview:!0,previewPlainText:T}),W});break}i(),S(!0),C("bridge-preview-start"),E(null),r(),x(""),v(q=>{const $=yu(q,D.previewHandle,D.replyCtx),I=($==null?void 0:$.id)||D.previewHandle||`${D.replyCtx||crypto.randomUUID()}-preview`,W=q.filter(Q=>Q.id!==I);return W.push({id:I,role:"assistant",content:T?($==null?void 0:$.content)||"":D.content||"",streamTargetContent:T?D.content||"":void 0,kind:"progress",order:($==null?void 0:$.order)??g(D.sessionKey),timestamp:($==null?void 0:$.timestamp)||new Date().toISOString(),turnKey:D.replyCtx,preview:!0,previewPlainText:T}),W});break;case"update_message":if(vp(D.content)){s(),S(!1),d.current=null,i(),N("awaiting_input","bridge-update-awaiting-input"),E(null),x(""),v(q=>{const $=yu(q,D.previewHandle,D.replyCtx);return $?q.map(I=>I.id===$.id?{...I,content:T?I.content:D.content||"",streamTargetContent:T?D.content||"":void 0,preview:!0,previewPlainText:T}:I):[...q,{id:D.previewHandle||`${D.replyCtx||crypto.randomUUID()}-preview`,role:"assistant",content:T?"":D.content||"",streamTargetContent:T?D.content||"":void 0,kind:"progress",order:g(D.sessionKey),timestamp:new Date().toISOString(),turnKey:D.replyCtx,preview:!0,previewPlainText:T}]});break}i(),S(!0),C("bridge-update-message"),E(null),r(),x(""),v(q=>{const $=yu(q,D.previewHandle,D.replyCtx);return $?q.map(I=>I.id===$.id?{...I,content:T?I.content:D.content||"",streamTargetContent:T?D.content||"":void 0,preview:!0,previewPlainText:T}:I):[...q,{id:D.previewHandle||`${D.replyCtx||crypto.randomUUID()}-preview`,role:"assistant",content:T?"":D.content||"",streamTargetContent:T?D.content||"":void 0,kind:"progress",order:g(D.sessionKey),timestamp:new Date().toISOString(),turnKey:D.replyCtx,preview:!0,previewPlainText:T}]});break;case"delete_message":v(q=>q.filter($=>$.id!==D.previewHandle));break;case"typing_start":i(),S(!0),C("bridge-typing-start"),E(null),x(""),r();break;case"typing_stop":S(!1),s(),d.current=null,i(),N(s6(_.current),_.current==="awaiting_permission"?"bridge-typing-stop-preserve-permission":"bridge-typing-stop"),m(D.replyCtx),o(D.replyCtx);break;case"reply":{const q=vp(D.content);i(),S(!q),q?(s(),d.current=null,N("awaiting_input","bridge-reply-awaiting-input")):(C("bridge-reply"),r()),E(null),x("");const $=c(D.replyCtx);!_d(D.content)&&D.replyCtx&&delete h.current[D.replyCtx],x(""),v(I=>[...I.filter(W=>!UU(W,D.content,D.replyCtx)&&W.id!==$),{id:$,role:"assistant",content:D.content||"",kind:"progress",order:g(D.sessionKey),timestamp:new Date().toISOString(),turnKey:D.replyCtx}]);break}case"buttons":s(),S(!1),d.current=null,x(""),i(),m(D.replyCtx);const P=`${D.replyCtx||crypto.randomUUID()}-buttons`,K=qU(D.buttonRows||D.buttons),X=VU(K),O=X&&zU(e),U=X&&!O?[]:K,J=U,ce=X&&!O?c6(e):void 0;v(q=>q.find(I=>I.id===P)?q.map(I=>I.id===P?{...I,content:D.content||I.content,actions:J,actionReplyCtx:D.replyCtx,actionPending:!1,actionMode:X?"permission":"generic",actionInteractive:O,actionStatus:ce}:I):[...q,{id:P,role:"assistant",content:D.content||"Permission required before continuing.",kind:"progress",order:g(D.sessionKey),timestamp:new Date().toISOString(),turnKey:D.replyCtx,actions:J,actionReplyCtx:D.replyCtx,actionPending:!1,actionMode:X?"permission":"generic",actionInteractive:O,actionStatus:ce}]),E(q=>{if(!X||!O)return null;const $={id:P,role:"assistant",content:D.content||"Permission required before continuing.",actions:U,actionReplyCtx:D.replyCtx,actionPending:!1,actionMode:"permission",actionStatus:ce};return i6($)||q}),N(l6(K.length>0,O),o6(K.length>0,O));break;case"card":s(),S(!1),d.current=null,i(),N("idle","bridge-card"),E(null),m(D.replyCtx),o(D.replyCtx),x(""),v(q=>[...q,{id:`${D.replyCtx||crypto.randomUUID()}-card`,role:"assistant",content:"Interactive card received. Open the session in the standard Sessions view for full controls.",order:g(D.sessionKey),timestamp:new Date().toISOString()}]);break}},[T,e,t,r,i,s,o,c,d,h,f,g,m,x,v,E,S,C,N]);w.useEffect(()=>{const D=oL(A=>{j(A)});return()=>{s(),D()}},[s,j])}function f6(e){d6({activeAgentType:e.activeAgentType,activeBridgeSessionKey:e.activeBridgeSessionKey,armReplyTimeout:e.armReplyTimeout,clearActionStatuses:e.clearActionStatuses,clearReplyTimeout:e.clearReplyTimeout,finalizeTurnMessages:e.finalizeTurnMessages,nextProgressMessageId:e.nextProgressMessageId,pendingTurnRef:e.pendingTurnRef,progressSequenceByTurnRef:e.progressSequenceByTurnRef,refreshThreadsForWorkspace:e.refreshThreadsForWorkspace,reserveAssistantMessageOrder:e.reserveAssistantMessageOrder,settlePreviewMessages:e.settlePreviewMessages,setBridgeError:e.setBridgeError,setMessages:e.setMessages,setPendingPermissionRequest:e.setPendingPermissionRequest,setTyping:e.setTyping,taskStateRef:e.taskStateRef,updateTaskState:e.updateTaskState});const{handleBridgeAction:t}=a6({activeAgentType:e.activeAgentType,activeBridgeSessionKey:e.activeBridgeSessionKey,activeRunId:e.activeRunId,activeThreadId:e.activeThreadId,armReplyTimeout:e.armReplyTimeout,clearActionStatuses:e.clearActionStatuses,clearReplyTimeout:e.clearReplyTimeout,reserveNextMessageOrder:e.reserveNextMessageOrder,runtimeProvider:e.runtimeProvider,selectedWorkspaceId:e.selectedWorkspaceId,sendAction:e.sendAction,settlePreviewMessages:e.settlePreviewMessages,setActiveRunId:e.setActiveRunId,setBridgeError:e.setBridgeError,setMessages:e.setMessages,setPendingPermissionRequest:e.setPendingPermissionRequest,setPendingBridgeActionId:e.setPendingBridgeActionId,setTyping:e.setTyping,updateTaskState:e.updateTaskState,taskStateRef:e.taskStateRef});return{handleBridgeAction:t}}function h6({activeRunId:e,activeThreadId:t,activeBridgeSessionKey:r,availableKnowledgeBases:i,brandingNewThreadLabel:s,draft:o,loadActiveThread:c,selectedKnowledgeBaseIds:d,runtimeProvider:h,selectedProject:f,taskState:g,updateTaskState:m,applyLocalCoreThreadDetail:x,armReplyTimeout:v,clearReplyTimeout:E,refreshSessionsForProject:S,reserveNextMessageOrder:_,settlePreviewMessages:N,setActiveRunId:T,setActiveSessionId:C,setActiveSessionKey:j,setActiveSessionName:D,setBridgeError:A,setDraft:P,setMessages:K,setPendingPermissionRequest:X,setSending:O,setTyping:U,holdBlankComposerRef:J,lastSessionByProjectRef:ce,nextMessageOrderRef:q,pendingTurnRef:$,progressSequenceByTurnRef:I,taskStateRef:W}){const Y=w.useCallback(R=>{if(d.length===0)return yp(R);const ee=d.map(ge=>i.find(oe=>oe.id===ge)).filter(ge=>!!ge);return ee.length===0?yp(R):yp(R,[["[Selected Knowledge Bases]",...ee.map(ge=>`- id: ${ge.id} | name: ${ge.name}`),"[/Selected Knowledge Bases]"].join(`
476
+ `)])},[i,d]),L=w.useCallback(async()=>{if(!f)throw new Error("Choose a project first");if(t)return{id:t,sessionKey:r};const R=await KE(f,`${s} ${new Date().toLocaleTimeString()}`);return x(R),await S(f),{id:R.id,sessionKey:R.bridgeSessionKey||""}},[r,t,x,s,S,f,!0]),z=w.useCallback(async()=>{if(!o.trim()||!f)return;const R=o.trim(),ee=g==="awaiting_input",ge=ee?R:Y(R),oe=_();P(""),O(!0);try{const re=await L();if(console.info("[desktop-chat] send",{runtimeProvider:h,selectedProject:f,threadId:re.id,sessionKey:re.sessionKey,selectedKnowledgeBaseIds:d}),$.current={sessionKey:re.sessionKey,userOrder:oe},X(null),K(be=>[...be,{id:`${crypto.randomUUID()}-user`,role:"user",content:R,order:oe,timestamp:new Date().toISOString()}]),m("running","send-started"),U(!0),A(""),re.id&&await Co(re.id,d),v(),re.id){const be=ee?await GE(re.id,ge):await Ij(re.id,ge);T(be.runId)}else throw new Error("Managed desktop thread transport is unavailable.")}catch(re){E(),$.current=null,N(),X(null),U(!1),m("error","send-failed"),A(re instanceof Error?re.message:"Failed to send the message.")}finally{O(!1)}},[v,Y,E,o,L,g,$,_,d,f,T,A,P,K,X,O,N,U,m,!0]),V=w.useCallback(async()=>{if(!(!f||g==="stopping")){A(""),E(),N(),X(null),U(!1),m("stopping","stop-requested");try{if(e)await zj(e);else throw new Error("No active run to stop.");window.setTimeout(()=>{W.current==="stopping"&&m("idle","stop-timeout-complete")},1500)}catch(R){m("error","stop-failed"),A(R instanceof Error?R.message:"Failed to stop the current task.")}}},[e,E,A,X,N,U,f,g,W,m,!0]);return{handleSend:z,handleStopTask:V}}function p6({activeThreadId:e,brandingNewThreadLabel:t,deleteTarget:r,renameDraft:i,renameTarget:s,runtimeProvider:o,searchParams:c,selectedKnowledgeBaseIds:d,selectedProject:h,updateTaskState:f,applyLocalCoreThreadDetail:g,clearReplyTimeout:m,refreshSessionsForProject:x,setActiveRunId:v,setActiveSessionAgentType:E,setActiveSessionId:S,setActiveSessionKey:_,setActiveSessionName:N,setBridgeError:T,setDeleteTarget:C,setMessages:j,setPendingPermissionRequest:D,setPendingSessionAction:A,setRenameDraft:P,setRenameTarget:K,setSearchParams:X,setTyping:O,holdBlankComposerRef:U,nextMessageOrderRef:J,pendingTurnRef:ce,progressSequenceByTurnRef:q}){const I=o==="local_core",W=w.useCallback(()=>{U.current=!0,S(""),_(""),N(""),E(""),v(""),j([]),D(null),O(!1),f("idle"),T(""),ce.current=null,J.current=0,q.current={},m()},[m,U,J,ce,q,v,E,S,_,N,T,j,D,O,f]),Q=w.useCallback(async()=>{if(h){if(I){A("rename");try{const V=await KE(h,`${t} ${new Date().toLocaleTimeString()}`);if(d.length>0){const ee=(await Co(V.id,d)).knowledgeBaseIds;V.selectedKnowledgeBaseIds=ee}else V.selectedKnowledgeBaseIds=[];await x(h),g(V);const R=new URLSearchParams(c);R.set("project",h),R.set("session",V.id),X(R,{replace:!0})}finally{A(null)}return}W()}},[g,t,x,W,c,d,h,A,X,I,!0]),Y=w.useCallback((V,R)=>{K({project:V,id:R.id,name:R.name}),P(R.name)},[P,K]),L=w.useCallback(async()=>{if(s){A("rename");try{const V=i.trim();await jj(s.id,V),s.id===e&&N(V),await x(s.project),K(null),P("")}finally{A(null)}}},[e,x,i,s,N,A,P,K,!0]),z=w.useCallback(async()=>{if(r){A("delete");try{await Lj(r.id),r.id===e&&W(),await x(r.project),C(null)}finally{A(null)}}},[e,r,x,W,C,A,!0]);return{handleCreateNew:Q,handleDeleteSession:z,handleRenameSession:L,openRenameModal:Y}}function m6({activeRunId:e,activeThreadId:t,activeBridgeSessionKey:r,availableKnowledgeBases:i,brandingNewThreadLabel:s,deleteTarget:o,draft:c,loadActiveThread:d,renameDraft:h,renameTarget:f,runtimeProvider:g,searchParams:m,selectedKnowledgeBaseIds:x,selectedWorkspaceId:v,taskState:E,updateTaskState:S,applyLocalCoreThreadDetail:_,armReplyTimeout:N,clearReplyTimeout:T,refreshSessionsForProject:C,reserveNextMessageOrder:j,settlePreviewMessages:D,setActiveRunId:A,setActiveSessionAgentType:P,setActiveSessionId:K,setActiveSessionKey:X,setActiveSessionName:O,setBridgeError:U,setDeleteTarget:J,setDraft:ce,setMessages:q,setPendingPermissionRequest:$,setPendingSessionAction:I,setRenameDraft:W,setRenameTarget:Q,setSearchParams:Y,setSending:L,setTyping:z,holdBlankComposerRef:V,lastSessionByProjectRef:R,nextMessageOrderRef:ee,pendingTurnRef:ge,progressSequenceByTurnRef:oe,taskStateRef:re}){const be={runtimeProvider:g,selectedProject:v,updateTaskState:S,applyLocalCoreThreadDetail:_,clearReplyTimeout:T,refreshSessionsForProject:C,setBridgeError:U,setMessages:q,setPendingPermissionRequest:$,setTyping:z,holdBlankComposerRef:V,nextMessageOrderRef:ee,pendingTurnRef:ge,progressSequenceByTurnRef:oe,taskStateRef:re},Ce={setActiveRunId:A,setActiveSessionAgentType:P,setActiveSessionId:K,setActiveSessionKey:X,setActiveSessionName:O},ke={setDeleteTarget:J,setPendingSessionAction:I,setRenameDraft:W,setRenameTarget:Q},Ne={holdBlankComposerRef:V,lastSessionByProjectRef:R,nextMessageOrderRef:ee,pendingTurnRef:ge,progressSequenceByTurnRef:oe,taskStateRef:re},$e={setBridgeError:U,setMessages:q,setPendingPermissionRequest:$,setTyping:z},{handleSend:Je,handleStopTask:Pe}=h6({activeRunId:e,activeThreadId:t,activeBridgeSessionKey:r,availableKnowledgeBases:i,brandingNewThreadLabel:s,draft:c,loadActiveThread:d,selectedKnowledgeBaseIds:x,taskState:E,armReplyTimeout:N,reserveNextMessageOrder:j,settlePreviewMessages:D,setDraft:ce,setSending:L,...be,...Ce,...$e,...Ne}),{handleCreateNew:Tt,handleDeleteSession:Be,handleRenameSession:Qe,openRenameModal:bt}=p6({activeThreadId:t,brandingNewThreadLabel:s,deleteTarget:o,renameDraft:h,renameTarget:f,searchParams:m,selectedKnowledgeBaseIds:x,setSearchParams:Y,...be,...Ce,...ke,...$e});return{handleCreateNew:Tt,handleDeleteSession:Be,handleRenameSession:Qe,handleSend:Je,handleStopTask:Pe,openRenameModal:bt}}function g6(e,t){if(!t)return"";if(!e||!t.startsWith(e))return t.slice(0,Math.min(t.length,Math.max(1,Math.ceil(t.length/24))));if(e===t)return t;const r=t.length-e.length,i=r>160?14:r>80?8:r>24?4:2;return t.slice(0,Math.min(t.length,e.length+i))}function b6({activeThreadId:e,brandingReplyTimeoutLabel:t,setSelectedKnowledgeBaseIds:r,setActiveRunId:i,setActiveSessionAgentType:s,setActiveSessionId:o,setActiveSessionKey:c,setActiveSessionName:d,setBridgeError:h,setSelectedProject:f,setThreadGroups:g}){const[m,x]=w.useState([]),[v,E]=w.useState(null),[S,_]=w.useState(!1),[N,T]=w.useState("idle"),C=w.useRef(null),j=w.useRef("reply"),D=w.useRef({}),A=w.useRef(0),P=w.useRef(null),K=w.useRef(!1),X=w.useRef({}),O=w.useRef("idle"),U=w.useRef(""),J=w.useMemo(()=>n1(m),[m]),ce=WU(N),q=XU(N),$=YU(N,S);w.useEffect(()=>{U.current=e},[e]);const I=w.useCallback((oe,re="unspecified")=>{const be=O.current;O.current=oe,T(oe),be!==oe&&console.info("[desktop-chat] task_state",{from:be,to:oe,reason:re,threadId:U.current})},[]),W=w.useCallback(()=>{C.current&&(window.clearTimeout(C.current),C.current=null)},[]),Q=w.useCallback((oe="reply")=>{W(),j.current=oe,C.current=window.setTimeout(()=>{_(!1),P.current=null,E(null),I("idle","reply-timeout"),h(oe==="permission_continue"?t:"Agent did not respond in time. Check AgentDock runtime logs or adjust the model/provider.")},BU)},[t,W,h,I]),Y=w.useCallback(()=>{x(oe=>oe.map(re=>re.actionStatus||re.actionPending?{...re,actionPending:!1,actionStatus:void 0}:re))},[]),L=w.useCallback(oe=>{x(re=>{let be=!1;const Ce=re.map(ke=>!ke.preview||oe&&ke.turnKey!==oe?ke:(be=!0,{...ke,content:ke.streamTargetContent??ke.content,streamTargetContent:void 0,preview:!1,previewPlainText:!1}));return be?Ce:re})},[]),z=w.useCallback(()=>{const oe=A.current;return A.current+=1,oe},[]),V=w.useCallback(oe=>{const re=P.current;if(re&&oe&&re.sessionKey===oe){const be=re.userOrder+1;A.current<be&&(A.current=be)}return z()},[z]),R=w.useCallback(oe=>{const re=oe||crypto.randomUUID(),be=(X.current[re]||0)+1;return X.current[re]=be,`${re}-progress-${be}`},[]),ee=w.useCallback(oe=>{oe&&x(re=>{const be=re.filter(Ne=>Ne.turnKey===oe&&!Ne.preview);if(be.length===0)return re;const Ce=[...be].reverse().find(Ne=>!_d(Ne.content)),ke=Ce==null?void 0:Ce.id;return re.map(Ne=>Ne.turnKey!==oe||Ne.preview?Ne:{...Ne,kind:ke&&Ne.id===ke?"final":"progress"})})},[]),ge=w.useCallback(oe=>{D.current[oe.workspaceId]=oe.id,f(oe.workspaceId),o(oe.id),c(oe.bridgeSessionKey||""),d(oe.title),s(oe.agentType||""),i(oe.runId||""),r(oe.selectedKnowledgeBaseIds||[]),E(oe.pendingPermissionRequest||null),g(be=>GU(be,oe.workspaceId,A_(oe))),K.current=!1,X.current={};const re=FU(oe.messages||[]);P.current=null,A.current=re.reduce((be,Ce)=>Math.max(be,Ce.order+1),0),x(n1(re))},[i,s,o,c,d,r,f,g,E]);return w.useEffect(()=>{if(!m.some(be=>be.preview&&be.previewPlainText&&typeof be.streamTargetContent=="string"&&be.streamTargetContent!==be.content))return;const re=window.setInterval(()=>{x(be=>{let Ce=!1;const ke=be.map(Ne=>!Ne.preview||!Ne.previewPlainText||typeof Ne.streamTargetContent!="string"||Ne.streamTargetContent===Ne.content?Ne:(Ce=!0,{...Ne,content:g6(Ne.content,Ne.streamTargetContent)}));return Ce?ke:be})},32);return()=>{window.clearInterval(re)}},[m]),{applyLocalCoreThreadDetail:ge,armReplyTimeout:Q,clearActionStatuses:Y,clearReplyTimeout:W,holdBlankComposerRef:K,lastSessionByProjectRef:D,messages:m,nextMessageOrderRef:A,pendingPermissionRequest:v,finalizeTurnMessages:ee,nextProgressMessageId:R,pendingTurnRef:P,progressSequenceByTurnRef:X,renderedMessages:J,reserveAssistantMessageOrder:V,reserveNextMessageOrder:z,setMessages:x,setPendingPermissionRequest:E,settlePreviewMessages:L,setTyping:_,taskHint:$,taskInputLocked:q,taskRunning:ce,taskState:N,taskStateRef:O,typing:S,updateTaskState:I}}function y6(){const[e,t]=Nm(),[r,i]=w.useState([]),[s,o]=w.useState(""),[c,d]=w.useState([]),[h,f]=w.useState(""),[g,m]=w.useState(""),[x,v]=w.useState(""),[E,S]=w.useState(""),[_,N]=w.useState(""),[T,C]=w.useState(""),[j,D]=w.useState(""),[A,P]=w.useState([]),[K,X]=w.useState([]),[O,U]=w.useState(null),[J,ce]=w.useState(""),[q,$]=w.useState(null),[I,W]=w.useState(null),[Q,Y]=w.useState(null),[L,z]=w.useState(!1),[V,R]=w.useState(""),ee=w.useRef(0),ge=w.useRef(null),oe=e.get("project")||"",re=e.get("session")||"",be=M_(),{applyLocalCoreThreadDetail:Ce,armReplyTimeout:ke,clearActionStatuses:Ne,clearReplyTimeout:$e,finalizeTurnMessages:Je,holdBlankComposerRef:Pe,lastSessionByProjectRef:Tt,nextMessageOrderRef:Be,nextProgressMessageId:Qe,pendingPermissionRequest:bt,pendingTurnRef:te,progressSequenceByTurnRef:he,renderedMessages:Te,reserveAssistantMessageOrder:Ie,reserveNextMessageOrder:wt,setMessages:lt,setPendingPermissionRequest:Wt,settlePreviewMessages:B,setTyping:ie,taskHint:Ee,taskInputLocked:se,taskRunning:ye,taskState:Re,taskStateRef:ze,typing:tt,updateTaskState:rt}=b6({activeThreadId:h,brandingReplyTimeoutLabel:be.replyTimeoutLabel,setSelectedKnowledgeBaseIds:X,setActiveRunId:N,setActiveSessionAgentType:S,setActiveSessionId:f,setActiveSessionKey:m,setActiveSessionName:v,setBridgeError:R,setSelectedProject:o,setThreadGroups:d}),{loading:Ft,refreshRuntime:We,runtime:Dn,runtimeProvider:en,serviceRunning:yi,showSessionKey:ra,transportReady:Ma}=ZU({requestedProject:oe,selectedProject:s,setSelectedProject:o,clearReplyTimeout:$e,updateTaskState:rt,setTyping:ie}),{filteredThreadGroups:aa,loadActiveThread:vn,refreshThreadsForWorkspace:H}=r6({activeThreadId:h,requestedWorkspaceId:oe,requestedThreadId:re,runtimeDefaultWorkspaceId:Dn==null?void 0:Dn.settings.defaultProject,runtimeProvider:en,searchParams:e,selectedWorkspaceId:s,serviceRunning:yi,workspaceIds:r,threadGroups:c,threadSearch:j,setSelectedKnowledgeBaseIds:X,setActiveRunId:N,setActiveSessionAgentType:S,setActiveSessionId:f,setActiveSessionKey:m,setActiveSessionName:v,setBridgeError:R,setMessages:lt,setPendingPermissionRequest:Wt,setProjects:i,setSearchParams:t,setSelectedProject:o,setThreadGroups:d,setTyping:ie,applyLocalCoreThreadDetail:Ce,clearReplyTimeout:$e,updateTaskState:rt,holdBlankComposerRef:Pe,lastSessionByProjectRef:Tt,nextMessageOrderRef:Be,pendingTurnRef:te,progressSequenceByTurnRef:he});w.useEffect(()=>{var Nt;(Nt=ge.current)==null||Nt.scrollIntoView({behavior:"smooth"})},[Te,tt]);const fe=w.useCallback(async()=>{try{const Nt=await YE();P(Nt.bases||[])}catch{P([])}},[en]);w.useEffect(()=>{fe()},[fe]);const Se=w.useCallback(async Nt=>{const Xn=Array.from(new Set(Nt.map(Qn=>String(Qn||"").trim()).filter(Boolean))),Ur=ee.current+1;if(ee.current=Ur,X(Xn),!(!s||!h))try{const Qn=en==="local_core"?(await Co(h,Xn)).knowledgeBaseIds:await rL(s,h,Xn);ee.current===Ur&&X(Qn)}catch(Qn){ee.current===Ur&&R(Qn instanceof Error?Qn.message:"Failed to save selected knowledge bases.")}},[h,en,s,R]),{handleBridgeAction:Xe}=f6({activeAgentType:E,activeThreadId:h,activeRunId:_,activeBridgeSessionKey:g,runtimeProvider:en,selectedWorkspaceId:s,clearActionStatuses:Ne,clearReplyTimeout:$e,finalizeTurnMessages:Je,nextProgressMessageId:Qe,refreshThreadsForWorkspace:H,reserveAssistantMessageOrder:Ie,reserveNextMessageOrder:wt,settlePreviewMessages:B,setActiveRunId:N,setBridgeError:R,setMessages:lt,setPendingBridgeActionId:Y,setTyping:ie,setPendingPermissionRequest:Wt,updateTaskState:rt,armReplyTimeout:ke,pendingTurnRef:te,progressSequenceByTurnRef:he,sendAction:GE,taskStateRef:ze}),{handleCreateNew:Pt,handleDeleteSession:At,handleRenameSession:Me,handleSend:Ae,handleStopTask:qe,openRenameModal:Zt}=m6({activeRunId:_,activeThreadId:h,activeBridgeSessionKey:g,availableKnowledgeBases:A,brandingNewThreadLabel:be.newThreadLabel,deleteTarget:q,draft:T,loadActiveThread:vn,renameDraft:J,renameTarget:O,runtimeProvider:en,searchParams:e,selectedKnowledgeBaseIds:K,selectedWorkspaceId:s,taskState:Re,updateTaskState:rt,applyLocalCoreThreadDetail:Ce,armReplyTimeout:ke,clearReplyTimeout:$e,refreshSessionsForProject:H,reserveNextMessageOrder:wt,settlePreviewMessages:B,setActiveRunId:N,setActiveSessionAgentType:S,setActiveSessionId:f,setActiveSessionKey:m,setActiveSessionName:v,setBridgeError:R,setDeleteTarget:$,setDraft:C,setMessages:lt,setPendingPermissionRequest:Wt,setPendingSessionAction:W,setRenameDraft:ce,setRenameTarget:U,setSearchParams:t,setSending:z,setTyping:ie,holdBlankComposerRef:Pe,lastSessionByProjectRef:Tt,nextMessageOrderRef:Be,pendingTurnRef:te,progressSequenceByTurnRef:he,taskStateRef:ze});return{activeRunId:_,activeSessionId:h,activeSessionKey:g,activeSessionName:x,bridgeError:V,branding:be,deleteTarget:q,draft:T,endRef:ge,filteredSessionGroups:aa,handleBridgeAction:Xe,handleCreateNew:Pt,handleDeleteSession:At,handleRenameSession:Me,handleSend:Ae,handleStopTask:qe,availableKnowledgeBases:A,loadActiveSession:vn,loading:Ft,openRenameModal:Zt,pendingBridgeActionId:Q,pendingPermissionRequest:bt,pendingSessionAction:I,projects:r,refreshRuntime:We,renameDraft:J,renameTarget:O,renderedMessages:Te,runtime:Dn,sending:L,selectedKnowledgeBaseIds:K,serviceRunning:yi,sessionSearch:j,selectedProject:s,setDeleteTarget:$,setDraft:C,setSelectedKnowledgeBaseIds:Se,setRenameDraft:ce,setRenameTarget:U,setSelectedProject:o,setSessionSearch:D,showSessionKey:ra,taskHint:Ee,taskInputLocked:se,taskRunning:ye,taskState:Re,transportReady:Ma}}function x6(e){const t=e.match(/^\s*(?:🔧\s*)?(Tool update)\s*-\s*([^-]+?)\s*-\s*([\s\S]+?)\s*$/i);if(t){const[,i,s,o]=t,c=o.trim();if(v6(i,s.trim(),c))return null;try{const d=JSON.parse(c),h=typeof d.output=="string"?d.output:d.output??d.error??d;return{title:i,status:s.trim(),output:typeof h=="string"?h:JSON.stringify(h,null,2),label:"工具结果"}}catch{return{title:i,status:s.trim(),output:c,label:"工具结果"}}}const r=e.match(/^\s*🔧\s*(.+?)\s*$/);if(r){const i=r[1].trim();if(/^Tool update\s*-\s*running(?:\s*-\s*)?$/i.test(i))return null;const[s,...o]=i.split(":"),c=o.join(":").trim();return{title:s.trim()||"Tool call",status:"running",output:c,label:"工具调用"}}return null}function v6(e,t,r){return/^Tool update$/i.test(e.trim())&&/^running$/i.test(t.trim())&&!r.trim()}function w6(e){const t=e.trim();return/^🔧\s*Tool update\s*-\s*running(?:\s*-\s*)?$/i.test(t)}function E6({card:e}){const t=e.status.toLowerCase()==="completed";return p.jsxs("div",{className:"overflow-hidden rounded-[20px] border border-slate-200/80 bg-slate-50/95 shadow-[0_8px_22px_rgba(15,23,42,0.04)] dark:border-white/[0.07] dark:bg-[#111820] dark:shadow-none",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200/80 px-4 py-3 dark:border-white/[0.06]",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[p.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary dark:text-primary",children:p.jsx(bm,{size:14})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate text-sm font-semibold text-slate-800 dark:text-slate-100",children:e.title}),p.jsxs("p",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] text-slate-500 dark:text-slate-400",children:[p.jsx(L2,{size:12}),e.label]})]})]}),p.jsx("span",{className:He("shrink-0 rounded-full px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.12em]",t?"bg-primary/10 text-primary dark:text-primary":"bg-amber-500/10 text-amber-700 dark:text-amber-300"),children:e.status})]}),p.jsx("pre",{className:"max-h-72 overflow-auto whitespace-pre-wrap break-words px-4 py-3 font-mono text-[12px] leading-5 text-slate-700 [scrollbar-gutter:stable] dark:text-slate-200",children:e.output||"无输出"})]})}function S6(e){const t=e.split(`
477
+ `).map(c=>c.trim()).filter(Boolean),r=t.findIndex(c=>c.includes("若按钮没有显示")),i=r>=0?t.slice(0,r):t,s=i[0]||"等待工具确认",o=i.slice(1).filter(c=>!c.includes("请选择一个选项继续执行"));return{title:s,bodyLines:o}}function _6(e){return/等待工具确认/.test(e)&&/allow all\s*\/\s*allow\s*\/\s*deny/i.test(e)}function k6({card:e,loading:t,onAction:r}){const i=S6(e.content);return p.jsxs("div",{className:"overflow-hidden rounded-[20px] border border-amber-200 bg-amber-50/90 shadow-[0_10px_26px_rgba(180,83,9,0.08)] dark:border-amber-400/20 dark:bg-amber-500/10 dark:shadow-none",children:[p.jsx("div",{className:"flex items-center justify-between gap-3 border-b border-amber-200/80 px-4 py-3 dark:border-amber-400/15",children:p.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[p.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-xl bg-amber-100 text-amber-700 dark:bg-amber-400/15 dark:text-amber-200",children:p.jsx(M2,{size:14})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate text-sm font-semibold text-amber-950 dark:text-amber-50",children:i.title}),p.jsx("p",{className:"mt-0.5 text-[11px] text-amber-700/80 dark:text-amber-100/70",children:"权限响应"})]})]})}),i.bodyLines.length>0?p.jsx("div",{className:"space-y-2 px-4 py-3 text-sm leading-6 text-amber-950 dark:text-amber-50",children:i.bodyLines.map((s,o)=>p.jsx("p",{className:"break-words",children:s},`${e.id}-permission-line-${o}`))}):null,e.actionStatus?p.jsx("p",{className:"border-t border-amber-200/80 px-4 py-3 text-xs text-amber-700 dark:border-amber-400/15 dark:text-amber-100",children:e.actionStatus}):null,e.actions.length>0?p.jsx("div",{className:"flex flex-wrap gap-2 border-t border-amber-200/80 px-4 py-3 dark:border-amber-400/15",children:e.actions.flat().map(s=>p.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>r(s),disabled:!!(e.actionPending||t),loading:t,className:"rounded-full border border-amber-300 bg-white text-amber-900 hover:bg-amber-100 dark:border-amber-400/30 dark:bg-white/[0.08] dark:text-amber-50 dark:hover:bg-white/[0.12]",children:s.text||s.data},`${e.id}-${s.data||s.text}`))}):null]})}function N6(){const[e,t]=w.useState(!1),r=w.useRef(null),[i,s]=w.useState(""),[o,c]=w.useState(!1),{activeRunId:d,activeSessionId:h,activeSessionKey:f,activeSessionName:g,bridgeError:m,branding:x,deleteTarget:v,draft:E,endRef:S,filteredSessionGroups:_,handleBridgeAction:N,handleCreateNew:T,handleDeleteSession:C,handleRenameSession:j,handleSend:D,handleStopTask:A,availableKnowledgeBases:P,loadActiveSession:K,loading:X,openRenameModal:O,pendingBridgeActionId:U,pendingPermissionRequest:J,pendingSessionAction:ce,projects:q,refreshRuntime:$,renameDraft:I,renameTarget:W,renderedMessages:Q,runtime:Y,sending:L,selectedKnowledgeBaseIds:z,serviceRunning:V,sessionSearch:R,selectedProject:ee,setDeleteTarget:ge,setDraft:oe,setSelectedKnowledgeBaseIds:re,setRenameDraft:be,setRenameTarget:Ce,setSelectedProject:ke,setSessionSearch:Ne,showSessionKey:$e,taskHint:Je,taskInputLocked:Pe,taskRunning:Tt,taskState:Be,transportReady:Qe}=y6(),bt=w.useMemo(()=>z.map(B=>{const ie=P.find(Ee=>Ee.id===B);return{id:B,name:(ie==null?void 0:ie.name)||B,fileCount:(ie==null?void 0:ie.fileCount)||0}}),[P,z]),te=w.useMemo(()=>{const B=i.trim().toLowerCase();return B?P.filter(ie=>[ie.name,ie.description,ie.id].join(" ").toLowerCase().includes(B)):P},[P,i]),he=w.useMemo(()=>{const B=new Set(z);return[...te].sort((ie,Ee)=>{const se=B.has(ie.id),ye=B.has(Ee.id);return se!==ye?se?-1:1:ie.name.localeCompare(Ee.name,"zh-CN")})},[te,z]),Te=w.useMemo(()=>ee?_.filter(B=>B.project===ee):_,[_,ee]),Ie=w.useMemo(()=>ee&&!q.includes(ee)?[ee,...q]:q,[q,ee]),wt=w.useMemo(()=>Te.some(B=>B.sessions.length>0),[Te]),lt=(Y==null?void 0:Y.phase)==="starting",Wt=z.length;return w.useEffect(()=>{const B=ie=>{var Ee;(Ee=r.current)!=null&&Ee.contains(ie.target)||t(!1)};return e&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[e]),w.useEffect(()=>{if(!e)return;const B=window.requestAnimationFrame(()=>{var Ee;const ie=(Ee=r.current)==null?void 0:Ee.querySelector("input");ie instanceof HTMLInputElement&&ie.focus()});return()=>window.cancelAnimationFrame(B)},[e]),X?p.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-slate-500 animate-pulse",children:"正在加载桌面对话…"}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"relative h-full min-h-0 overflow-hidden border-slate-200/80 bg-white shadow-[0_16px_40px_rgba(15,23,42,0.06)] animate-fade-in dark:border-white/[0.06] dark:bg-[#0b0f14] dark:shadow-[0_20px_70px_rgba(0,0,0,0.28)] md:rounded-[28px] md:border",children:p.jsxs("div",{className:"grid h-full min-h-0 grid-cols-1 md:grid-cols-[288px_minmax(0,1fr)]",children:[p.jsxs("aside",{className:He("min-h-0 flex-col border-r border-slate-200/80 bg-[linear-gradient(180deg,#fbfcfe_0%,#f5f7fb_100%)] dark:border-white/[0.06] dark:bg-[linear-gradient(180deg,#10151c_0%,#0c1016_100%)]",o?"flex":"hidden md:flex","absolute inset-0 z-30 md:static md:z-auto"),children:[p.jsxs("div",{className:"border-b border-slate-200/80 px-4 py-4 dark:border-white/[0.06]",children:[p.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"text-[11px] font-medium tracking-[0.18em] text-slate-400 dark:text-slate-500",children:"会话导航"}),p.jsx("h2",{className:"mt-2 text-[1.7rem] font-semibold leading-tight text-slate-900 dark:text-white",children:x.chatHeading})]}),p.jsx(_e,{size:"sm",variant:"ghost",onClick:()=>void $(),className:"rounded-full border border-slate-200 bg-white text-slate-500 hover:bg-slate-100 dark:border-white/[0.08] dark:bg-white/[0.04] dark:text-slate-300 dark:hover:bg-white/[0.08]",children:p.jsx(L1,{size:14})}),p.jsx(_e,{size:"sm",variant:"ghost",onClick:()=>c(!1),className:"rounded-full border border-slate-200 bg-white text-slate-500 hover:bg-slate-100 dark:border-white/[0.08] dark:bg-white/[0.04] dark:text-slate-300 dark:hover:bg-white/[0.08] md:hidden",children:p.jsx(Ap,{size:14})})]}),p.jsxs("div",{className:"mt-4 space-y-3",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"block text-[11px] font-medium tracking-[0.18em] text-slate-400 dark:text-slate-500",children:x.scopeLabel}),p.jsxs("select",{value:ee,onChange:B=>ke(B.target.value),"data-testid":"desktop-chat-project-select",className:"w-full rounded-2xl border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-900 outline-none transition focus:border-primary/50 focus:ring-2 focus:ring-primary/15 dark:border-white/[0.08] dark:bg-[#0b1016] dark:text-white",children:[p.jsx("option",{value:"",children:x.scopeSelectPlaceholder}),Ie.map(B=>p.jsx("option",{value:B,children:B},B))]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(_e,{size:"md",variant:"secondary",onClick:()=>void T(),"data-testid":"desktop-chat-new-chat",className:"h-11 flex-1 rounded-2xl border border-slate-200 bg-white text-slate-700 hover:bg-slate-100 dark:border-white/[0.08] dark:bg-white/[0.05] dark:text-slate-100 dark:hover:bg-white/[0.09]",children:[p.jsx(ex,{size:15}),x.newThreadLabel]}),!V||lt?p.jsx(_e,{size:"md",onClick:()=>void eL().then($),disabled:lt||V,"data-testid":"desktop-chat-start-service",className:"h-11 shrink-0 rounded-2xl px-3.5",children:lt?x.startingRuntimeLabel:x.startRuntimeLabel}):null]}),p.jsxs("div",{className:"relative",children:[p.jsx(Ju,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 dark:text-slate-500"}),p.jsx(xt,{value:R,onChange:B=>Ne(B.target.value),placeholder:x.searchPlaceholder,"data-testid":"desktop-chat-session-search",className:"h-11 rounded-2xl border-slate-200 bg-white pl-9 text-slate-900 placeholder:text-slate-400 dark:border-white/[0.08] dark:bg-[#0b1016] dark:text-white dark:placeholder:text-slate-500"})]}),p.jsx("div",{className:"flex items-center justify-between gap-3 rounded-2xl border border-slate-200/80 bg-white/85 px-3 py-2 dark:border-white/[0.06] dark:bg-white/[0.03]",children:p.jsxs("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-slate-600 dark:text-slate-300",children:[p.jsx(qs,{size:7,className:He("fill-current",V?"text-primary":"text-slate-300 dark:text-slate-500")}),V?"服务在线":lt?"服务启动中":"服务未启动"]})})]}),Y!=null&&Y.service.lastError?p.jsx("div",{className:"mt-3 rounded-2xl border border-red-500/20 bg-red-50 px-3 py-2 text-xs text-red-600 dark:bg-red-500/10 dark:text-red-200",children:Y.service.lastError}):null,Y!=null&&Y.pendingRestart?p.jsx("div",{className:"mt-3 rounded-2xl border border-amber-500/20 bg-amber-50 px-3 py-2 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-200",children:x.pendingRestartLabel}):null]}),p.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 pb-24 pt-3 [scrollbar-gutter:stable] md:pb-3",children:!ee&&!wt?p.jsxs("div",{className:"rounded-2xl border border-dashed border-slate-200/80 bg-white/70 px-4 py-6 text-center dark:border-white/[0.07] dark:bg-white/[0.02]",children:[p.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"先选择一个项目"}),p.jsx("p",{className:"mt-2 text-xs leading-5 text-slate-500 dark:text-slate-400",children:"选择项目后展示对应会话列表。"})]}):wt?p.jsx("div",{className:"space-y-4",children:Te.map(B=>p.jsxs("section",{className:"space-y-2",children:[!ee&&B.sessions.length>0?p.jsxs("div",{"data-testid":"desktop-chat-session-group","data-project":B.project,className:"flex items-center justify-between px-2 pt-1",children:[p.jsx("p",{className:"text-[11px] font-medium tracking-[0.08em] text-slate-400 dark:text-slate-500",children:B.project}),p.jsxs("p",{className:"text-[10px] text-slate-400 dark:text-slate-500",children:[B.sessions.length," ",x.collectionLabel]})]}):null,B.sessions.map(ie=>p.jsx("div",{"data-testid":"desktop-chat-session-row","data-session-id":ie.id,"data-project":B.project,role:"button",tabIndex:0,onClick:()=>{K(B.project,ie.id),c(!1)},onKeyDown:Ee=>{(Ee.key==="Enter"||Ee.key===" ")&&(Ee.preventDefault(),K(B.project,ie.id),c(!1))},className:He("group relative overflow-hidden rounded-2xl border px-4 py-3 text-left transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary/20",ie.id===h?"border-primary/20 bg-primary/10 shadow-[inset_3px_0_0_0_rgba(0,122,255,0.9)] dark:border-primary/25 dark:bg-primary/10":"border-transparent bg-white/70 hover:border-slate-200 hover:bg-white dark:bg-white/[0.03] dark:hover:border-white/[0.08] dark:hover:bg-white/[0.05]"),children:p.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p.jsxs("div",{"data-testid":"desktop-chat-session-open","data-session-id":ie.id,"data-project":B.project,className:"min-w-0 flex-1",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("span",{className:"truncate text-sm font-medium text-slate-900 dark:text-white",children:ie.name})}),p.jsx("p",{className:"mt-1 text-[11px] text-slate-400 dark:text-slate-500",children:k_(ie.updatedAt||ie.createdAt)}),ie.excerpt?p.jsx("p",{className:"mt-2 line-clamp-2 text-[11px] leading-5 text-slate-500 dark:text-slate-400",children:ie.excerpt.replace(/\n/g," ")}):null,$e&&ie.bridgeSessionKey?p.jsx("p",{className:"mt-2 truncate text-[11px] text-slate-400 dark:text-slate-500",children:ie.bridgeSessionKey}):null]}),p.jsxs("div",{className:"flex items-center gap-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100 focus-within:opacity-100",children:[p.jsx(_e,{size:"sm",variant:"ghost",onClick:Ee=>{Ee.stopPropagation(),O(B.project,ie)},"data-testid":"desktop-chat-session-rename","data-session-id":ie.id,"data-project":B.project,className:"text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-white/[0.08] dark:hover:text-white",children:p.jsx(wo,{size:14})}),p.jsx(_e,{size:"sm",variant:"ghost",className:"text-red-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-500/10 dark:hover:text-red-200","data-testid":"desktop-chat-session-delete","data-session-id":ie.id,"data-project":B.project,onClick:Ee=>{Ee.stopPropagation(),ge({project:B.project,id:ie.id,name:ie.name})},children:p.jsx(Jr,{size:14})})]})]})},ie.id))]},B.project))}):p.jsxs("div",{className:"rounded-2xl border border-dashed border-slate-200/80 bg-white/70 px-4 py-6 text-center dark:border-white/[0.07] dark:bg-white/[0.02]",children:[p.jsx("p",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:R.trim()?"没有匹配的会话":"当前还没有桌面会话"}),p.jsx("p",{className:"mt-2 text-xs leading-5 text-slate-500 dark:text-slate-400",children:R.trim()?"换个关键词试试。":"发送第一条消息后,这里会出现新的会话记录。"})]})})]}),p.jsxs("section",{className:"flex min-h-0 flex-col bg-[linear-gradient(180deg,#ffffff_0%,#fbfcfe_100%)] dark:bg-[linear-gradient(180deg,#0d1218_0%,#0a0f15_100%)]",children:[p.jsxs("div",{className:"border-b border-slate-200/80 px-4 py-3 dark:border-white/[0.06] sm:px-6 sm:py-4",children:[p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>c(!0),className:"mt-0.5 h-9 w-9 shrink-0 rounded-xl px-0 md:hidden","aria-label":"Open sessions",children:p.jsx(d2,{size:16})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("p",{className:"text-[11px] font-medium tracking-[0.16em] text-slate-400 dark:text-slate-500",children:"当前会话"}),p.jsx("h2",{className:"mt-1 truncate text-2xl font-semibold leading-tight text-slate-900 dark:text-white sm:mt-2 sm:text-[2rem] sm:leading-none","data-testid":"desktop-chat-active-title",children:g||x.activeConversationFallback})]})]}),p.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400",children:[ee?p.jsx("span",{className:"inline-flex items-center rounded-full bg-slate-100 px-2.5 py-1 text-[11px] text-slate-600 dark:bg-white/[0.05] dark:text-slate-300",children:ee}):null,p.jsx("span",{className:"inline-flex items-center gap-1 rounded-full bg-slate-100 px-2.5 py-1 text-[10px] uppercase tracking-[0.18em] text-slate-500 dark:bg-white/[0.05] dark:text-slate-400",children:HU(Y==null?void 0:Y.phase)}),Qe?p.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 text-primary dark:text-primary",children:[p.jsx(qs,{size:6,className:"fill-current"})," ",x.runtimeOnlineLabel]}):p.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-slate-100 px-2.5 py-1 text-slate-500 dark:bg-white/[0.05] dark:text-slate-400",children:[p.jsx(Tp,{size:12})," ",x.runtimeOfflineLabel]}),$e&&f?p.jsx("span",{className:"truncate text-[11px] text-slate-400 dark:text-slate-500",children:f}):null]})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-4 [scrollbar-gutter:stable] sm:px-6 sm:py-5",children:[Q.length===0?p.jsx("div",{className:"flex h-full min-h-[18rem] items-center justify-center",children:p.jsxs("div",{className:"w-full max-w-2xl rounded-3xl border border-slate-200/80 bg-white px-5 py-8 text-center shadow-[0_10px_30px_rgba(15,23,42,0.04)] dark:border-white/[0.06] dark:bg-white/[0.03] dark:shadow-none sm:rounded-[28px] sm:px-8 sm:py-10",children:[p.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:p.jsx(ex,{size:22})}),p.jsx("h3",{className:"mt-4 text-lg font-semibold text-slate-900 dark:text-white sm:text-xl",children:"开始一段新的桌面对话"}),p.jsx("p",{className:"mx-auto mt-3 max-w-xl text-sm leading-6 text-slate-500 dark:text-slate-400",children:ee?`当前项目是 ${ee}。直接提问即可创建会话并开始对话。`:"先在左侧选择项目,然后直接输入你的问题。"}),p.jsx("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:bt.length>0?bt.map(B=>p.jsx("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-xs text-primary dark:bg-primary/10 dark:text-primary",children:B.name},B.id)):p.jsx("span",{className:"rounded-full bg-slate-100 px-3 py-1 text-xs text-slate-500 dark:bg-white/[0.05] dark:text-slate-400",children:"当前未限制知识库范围"})})]})}):p.jsx("div",{className:"space-y-5",children:Q.map(B=>{if(B.kind==="progress"&&w6(B.content))return null;const ie=B.role==="user",Ee=B.role==="system",se=!ie&&!Ee&&B.kind==="progress",ye=(J==null?void 0:J.id)===B.id?J:null,Re=!ie&&(ye||(B.actionMode==="permission"&&B.actionInteractive||_6(B.content)?{id:B.id,content:B.content,actions:B.actions||[],actionReplyCtx:B.actionReplyCtx,actionPending:B.actionPending,actionStatus:B.actionStatus,actionMode:"permission",actionInteractive:!0}:null)),ze=!ie&&!Re?x6(B.content):null,tt=!!ze;return p.jsxs("div",{className:He("flex gap-2 sm:gap-3",ie?"justify-end":"justify-start"),children:[ie?null:p.jsx("div",{className:He("mt-1 flex shrink-0 items-center justify-center rounded-full text-slate-400 dark:text-slate-500",Ee?"h-7 w-7 bg-amber-100 text-amber-600 dark:bg-amber-500/12 dark:text-amber-300":se?"h-6 w-6 bg-slate-100 dark:bg-white/[0.04]":"h-8 w-8 bg-slate-100 dark:bg-white/[0.06]"),children:Ee?p.jsx(vo,{size:14}):se?p.jsx(qs,{size:7,className:"fill-current"}):p.jsx(Qu,{size:14})}),p.jsx("div",{"data-testid":"desktop-chat-message","data-role":B.role,"data-kind":B.kind||"final","data-order":String(B.order),"data-timestamp":B.timestamp||"",className:He("transition-all",ie?"max-w-[calc(100%-2.25rem)] sm:max-w-[72%]":tt?"max-w-[calc(100%-2.25rem)] sm:max-w-[86%]":se?"max-w-[calc(100%-2.25rem)] sm:max-w-[76%]":"max-w-[calc(100%-2.25rem)] sm:max-w-[84%]"),children:p.jsxs("div",{className:He("rounded-[22px] px-4 py-3 text-sm",ie?"chat-user-glass rounded-br-md text-slate-950 dark:text-slate-50":Ee?"rounded-bl-md border border-amber-200/80 bg-amber-50 text-amber-900 shadow-[0_6px_18px_rgba(15,23,42,0.03)] dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-100 dark:shadow-none":se?"rounded-bl-lg bg-slate-100/80 text-[13px] leading-6 text-slate-500 dark:bg-white/[0.04] dark:text-slate-400":"rounded-bl-md border border-slate-200/80 bg-white text-slate-800 shadow-[0_6px_18px_rgba(15,23,42,0.04)] dark:border-white/[0.06] dark:bg-white/[0.04] dark:text-slate-100 dark:shadow-none",tt&&"bg-transparent p-0 shadow-none dark:bg-transparent"),children:[p.jsxs("div",{className:He("mb-2 flex items-center gap-2 text-[10px]",ie?"justify-end text-slate-600 dark:text-white/55":"text-slate-400 dark:text-slate-500"),children:[Ee?p.jsx("span",{className:"tracking-[0.16em] text-amber-600 dark:text-amber-300",children:"系统"}):null,se?p.jsx("span",{className:"tracking-[0.16em] text-amber-500 dark:text-amber-300",children:tt?"工具":"过程"}):null,r1(B.timestamp)?p.jsx("span",{"data-testid":"desktop-chat-message-timestamp",children:r1(B.timestamp)}):null]}),Re?p.jsx(k6,{card:Re,loading:U===Re.id,onAction:rt=>void N(Re,rt)}):!ie&&B.preview&&B.previewPlainText?p.jsx("div",{className:"whitespace-pre-wrap break-words text-[13px] leading-6 text-inherit",children:B.content}):ze?p.jsx(E6,{card:ze}):p.jsx(gg,{content:B.content,isUser:ie}),!Re&&!ie&&B.actions&&B.actions.length>0?p.jsx("div",{className:"mt-4 space-y-2",children:B.actions.map((rt,Ft)=>p.jsx("div",{className:"flex flex-wrap gap-2",children:rt.map(We=>p.jsx(_e,{size:"sm",variant:String(We.data||"").includes("deny")?"danger":"secondary",onClick:()=>void N(B,We),disabled:!!(B.actionPending||U),loading:U===B.id,"data-testid":"desktop-chat-action-button",className:"rounded-full",children:We.text||We.data},`${B.id}-${We.data||We.text}`))},`${B.id}-actions-${Ft}`))}):null,!ie&&B.actionStatus?p.jsx("p",{className:He("mt-3 text-xs",B.actionInteractive?"text-slate-500 dark:text-slate-400":"text-amber-700 dark:text-amber-200"),"data-testid":"desktop-chat-action-status",children:B.actionStatus}):null,B.preview?p.jsx("p",{className:"mt-2 text-[10px] uppercase tracking-[0.18em] text-primary dark:text-primary",children:"实时预览"}):null]})}),ie?p.jsx("div",{className:"mt-1 flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-slate-100 dark:bg-white/[0.08] sm:h-8 sm:w-8",children:p.jsx(ed,{size:14,className:"text-slate-500 dark:text-slate-300"})}):null]},B.id)})}),Je?p.jsxs("div",{className:"mt-5 flex items-center gap-2 text-sm text-slate-400","data-testid":"desktop-chat-task-hint",children:[p.jsx(qs,{size:8,className:"fill-current animate-pulse"})," ",Je]}):null,m?p.jsx("div",{className:"mt-4 rounded-2xl border border-amber-400/20 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-500/10 dark:text-amber-100","data-testid":"desktop-chat-bridge-error",children:m}):null,p.jsx("div",{ref:S})]}),p.jsx("div",{className:"border-t border-slate-200/80 px-3 py-3 dark:border-white/[0.06] sm:px-6",children:p.jsxs("div",{className:"rounded-3xl border border-slate-200/80 bg-white p-2 shadow-[0_8px_24px_rgba(15,23,42,0.05)] dark:border-white/[0.08] dark:bg-[#0f151c] dark:shadow-[0_12px_28px_rgba(0,0,0,0.20)] sm:rounded-[24px] sm:p-2.5",children:[p.jsxs("div",{className:"relative",ref:r,children:[p.jsx("div",{className:"rounded-2xl border border-slate-200 bg-slate-50/80 px-3 py-1.5 dark:border-white/[0.06] dark:bg-white/[0.03]",children:p.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:flex-nowrap",children:[p.jsx("p",{className:"shrink-0 text-[11px] font-medium text-slate-500 dark:text-slate-400",children:"知识库范围"}),p.jsxs(_e,{size:"sm",variant:"secondary",disabled:!ee,onClick:()=>t(B=>!B),"data-testid":"desktop-chat-knowledge-base-toggle",className:"shrink-0 rounded-full border border-slate-200 bg-white text-slate-700 hover:bg-slate-100 dark:border-white/[0.08] dark:bg-white/[0.06] dark:text-slate-100 dark:hover:bg-white/[0.1]",children:[p.jsx(DC,{size:13}),Wt>0?"调整知识库":"选择知识库"]}),p.jsx("div",{className:"order-3 flex min-w-full flex-1 items-center gap-2 overflow-x-auto whitespace-nowrap [scrollbar-gutter:stable] sm:order-none sm:min-w-0",children:bt.length===0?p.jsx("span",{className:"text-xs text-slate-400",children:ee?"当前未限制知识库范围":"选择项目后可设置知识库范围"}):bt.map(B=>p.jsxs("span",{className:"inline-flex shrink-0 items-center gap-2 rounded-full border border-slate-200 bg-white px-2.5 py-1 text-xs text-slate-700 dark:border-white/[0.08] dark:bg-white/[0.06] dark:text-slate-100",children:[p.jsx("span",{className:"max-w-[10rem] truncate",children:B.name}),B.fileCount>0?p.jsxs("span",{className:"text-[10px] text-slate-500",children:[B.fileCount," 文档"]}):null,p.jsx("button",{type:"button",onClick:()=>void re(z.filter(ie=>ie!==B.id)),className:"text-slate-500 transition-colors hover:text-slate-900 dark:hover:text-white","data-testid":"desktop-chat-knowledge-base-remove",children:p.jsx(Ap,{size:12})})]},B.id))}),p.jsx("p",{className:"ml-auto shrink-0 text-[11px] text-slate-400 sm:ml-0",children:ee?Wt>0?`已选 ${Wt} 个`:"未限制":"请先选项目"})]})}),e?p.jsxs("div",{className:"animate-float-in absolute bottom-full left-0 right-0 z-20 mb-3 max-h-[70dvh] overflow-hidden rounded-[24px] border border-slate-200 bg-white p-3 shadow-[0_22px_50px_rgba(15,23,42,0.12)] dark:border-white/[0.08] dark:bg-[#0c1117] dark:shadow-[0_28px_80px_rgba(0,0,0,0.40)]",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:"选择知识库"}),p.jsx("p",{className:"text-[11px] text-slate-400",children:"已选项排在前面,方便快速确认范围。"})]}),Wt>0?p.jsx("button",{type:"button",onClick:()=>void re([]),className:"text-xs text-slate-400 transition-colors hover:text-slate-900 dark:hover:text-white",children:"清空"}):null]}),p.jsx(xt,{value:i,onChange:B=>s(B.target.value),placeholder:"搜索知识库",className:"mt-3 rounded-2xl border-slate-200 bg-white text-slate-900 placeholder:text-slate-400 dark:border-white/[0.08] dark:bg-white/[0.04] dark:text-white dark:placeholder:text-slate-500"}),p.jsx("div",{className:"mt-3 max-h-64 space-y-2 overflow-y-auto pr-2 [scrollbar-gutter:stable]",children:he.length===0?p.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 px-3 py-4 text-center text-xs text-slate-500 dark:border-white/[0.08]",children:"没有匹配的知识库"}):he.map(B=>{const ie=z.includes(B.id);return p.jsxs("button",{type:"button",onClick:()=>void re(ie?z.filter(Ee=>Ee!==B.id):[...z,B.id]),"data-testid":"desktop-chat-knowledge-base-select",className:He("flex w-full items-start gap-3 rounded-xl border px-3 py-3 text-left transition-all duration-200",ie?"border-primary/25 bg-primary/10 dark:border-primary/30 dark:bg-primary/10":"border-slate-200 bg-white hover:border-slate-300 hover:bg-slate-50 dark:border-white/[0.06] dark:bg-white/[0.03] dark:hover:border-white/[0.12] dark:hover:bg-white/[0.05]"),children:[p.jsx("span",{className:He("mt-0.5 inline-flex h-5 w-5 items-center justify-center rounded-full border text-[10px]",ie?"border-primary bg-primary text-white":"border-slate-300 text-transparent dark:border-white/[0.12]"),children:p.jsx(vo,{size:12})}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block truncate text-sm font-medium text-slate-900 dark:text-white",children:B.name}),p.jsxs("span",{className:"mt-1 block text-[11px] text-slate-400",children:[B.fileCount," 文档",B.description?` · ${B.description}`:""]})]})]},B.id)})})]}):null]}),p.jsxs("div",{className:"mt-2.5",children:[p.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-end gap-2 sm:gap-3",children:[p.jsx(bd,{"data-testid":"desktop-chat-input",value:E,onChange:B=>oe(B.target.value),onKeyDown:B=>{B.key==="Enter"&&!B.shiftKey&&!Pe&&(B.preventDefault(),D())},rows:3,placeholder:V?Qe?Be==="awaiting_input"?"Agent 正在等待你的回复,可直接继续输入。":Pe?"任务正在运行,点击停止可中断当前执行。":x.sendPlaceholder:x.waitingRuntimePlaceholder:x.startFirstPlaceholder,disabled:!V||!Qe||L||!ee||Pe,className:"min-h-[76px] rounded-[20px] border-slate-200 bg-white px-3 py-2.5 text-[15px] leading-6 text-slate-900 placeholder:text-slate-400 dark:border-white/[0.08] dark:bg-[#090d12] dark:text-white dark:placeholder:text-slate-500 sm:min-h-[94px] sm:px-4 sm:py-3"}),Tt?p.jsxs(_e,{variant:"danger",onClick:()=>void A(),disabled:!f&&!d||Be==="stopping","data-testid":"desktop-chat-stop-task",className:"h-12 min-w-12 rounded-[20px] bg-red-50 px-3 text-red-600 hover:bg-red-100 dark:bg-red-500/12 dark:text-red-200 dark:hover:bg-red-500/18 sm:h-14 sm:min-w-[124px] sm:px-5",children:[p.jsx(Fs,{size:16,className:"animate-spin"}),p.jsx("span",{className:"hidden sm:inline",children:Be==="stopping"?"停止中":"停止任务"})]}):p.jsx(_e,{onClick:()=>void D(),disabled:!E.trim()||!V||!Qe||L||!ee,"data-testid":"desktop-chat-send",className:"h-12 w-12 rounded-full px-0 shadow-none sm:h-14 sm:w-14",children:p.jsx(gm,{size:18})})]}),p.jsxs("div",{className:"mt-1.5 hidden items-center justify-between px-1 pr-[4.5rem] text-[11px] text-slate-500 dark:text-slate-400 sm:flex",children:[p.jsx("span",{children:"Enter 发送,Shift + Enter 换行"}),p.jsx("span",{children:ee?"范围会随当前线程保存":"请先选择项目"})]})]})]})})]})]})}),p.jsx(Lr,{open:!!W,onClose:()=>Ce(null),title:"重命名会话",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(xt,{value:I,onChange:B=>be(B.target.value),onInput:B=>be(B.target.value),placeholder:"输入会话名称","data-testid":"desktop-chat-rename-input"}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>Ce(null),"data-testid":"desktop-chat-rename-cancel",children:"取消"}),p.jsx(_e,{onClick:()=>void j(),loading:ce==="rename",disabled:!I.trim(),"data-testid":"desktop-chat-rename-save",children:"保存名称"})]})]})}),p.jsx(Lr,{open:!!v,onClose:()=>ge(null),title:"删除会话",children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:["确定删除 ",p.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:v==null?void 0:v.name})," 吗?这会移除该会话的本地保存记录。"]}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>ge(null),"data-testid":"desktop-chat-delete-cancel",children:"取消"}),p.jsx(_e,{variant:"danger",onClick:()=>void C(),loading:ce==="delete","data-testid":"desktop-chat-delete-confirm",children:"删除会话"})]})]})})]})}const C6=1500,T6=9e4;function A6(e){return String(e||"").startsWith("web:")}function R6(e){return(e||[]).map((t,r)=>({id:`${t.timestamp||r}-${t.role}-${r}`,role:t.role==="user"?"user":"assistant",content:t.content,timestamp:t.timestamp,kind:t.kind}))}function O6(e){return e.map(t=>`${t.role}:${t.kind||"final"}:${t.timestamp||""}:${t.content}`).join(`
478
+ `)}function M6(e){return e.filter(t=>t.role!=="user").length}function D6(e,t){var r;return(r=e.last_message)!=null&&r.content?e.last_message.content.replace(/\n/g," "):t("sessions.noMessages")}function L_(e){return(e instanceof Error?e.message:String(e||"")).trim().toLowerCase().includes("no active session found")}function j6(e,t){return(e instanceof Error?e.message:String(e||"")).trim().toLowerCase()?L_(e)?t("sessions.sessionUnavailable"):e instanceof Error?e.message:t("sessions.sendFailed"):t("sessions.sendFailed")}function L6(){const{t:e}=Pr(),[t,r]=Nm(),[i,s]=w.useState([]),[o,c]=w.useState({}),[d,h]=w.useState(t.get("project")||""),[f,g]=w.useState([]),[m,x]=w.useState(null),[v,E]=w.useState([]),[S,_]=w.useState(""),[N,T]=w.useState(""),[C,j]=w.useState(!0),[D,A]=w.useState(!1),[P,K]=w.useState(!1),[X,O]=w.useState(!1),[U,J]=w.useState("idle"),[ce,q]=w.useState(""),[$,I]=w.useState(null),[W,Q]=w.useState(""),[Y,L]=w.useState(null),[z,V]=w.useState(null),R=w.useRef(null),ee=w.useRef({project:"",sessionId:""}),ge=w.useRef(null),oe=w.useRef(null),re=t.get("project")||"",be=t.get("session")||"",Ce=w.useMemo(()=>new Set(Object.values(o)),[o]),ke=w.useMemo(()=>{const se=S.trim().toLowerCase();return se?f.filter(ye=>CU(ye,se)):f},[S,f]),Ne=!!(m&&(m.live||Ce.has(m.id))),$e=!!(d&&Ne&&N.trim()&&!X&&U!=="sending"&&U!=="activating"&&U!=="polling"),Je=w.useCallback((se,ye)=>{const Re=new URLSearchParams;se&&Re.set("project",se),ye&&Re.set("session",ye),r(Re,{replace:!0})},[r]),Pe=w.useCallback((se="idle")=>{ge.current&&(window.clearTimeout(ge.current),ge.current=null),oe.current=null,J(se)},[]),Tt=w.useCallback(se=>{g(ye=>{const Re=ye.some(ze=>ze.id===se.id)?ye.map(ze=>ze.id===se.id?{...ze,...se}:ze):[...ye,se];return t1(Re)})},[]),Be=w.useCallback(async()=>{j(!0);try{const{projects:se}=await yd();s(se||[])}finally{j(!1)}},[]),Qe=w.useCallback(async se=>{if(!se)return g([]),c({}),[];A(!0);try{const{sessions:ye,active_keys:Re}=await D_(se),ze=t1((ye||[]).filter(tt=>!A6(tt.session_key)));return c(Re||{}),ee.current.project===se&&g(ze),ze}finally{A(!1)}},[]),bt=w.useCallback(async(se,ye,Re)=>{if(!se||!ye)return x(null),E([]),null;Re!=null&&Re.silent||K(!0);try{const ze=await j_(se,ye,200);return ee.current.project!==se||ee.current.sessionId!==ye||(Tt(ze),x({id:ze.id,project:se,sessionKey:ze.session_key,name:ze.name||Vr(ze),live:ze.live,isDraft:!1,detail:ze}),E(R6(ze.history)),q("")),ze}catch(ze){return ee.current.project===se&&ee.current.sessionId===ye&&q(ze instanceof Error?ze.message:e("sessions.loadFailed")),null}finally{Re!=null&&Re.silent||K(!1)}},[Tt,e]),te=w.useCallback(se=>{oe.current=se,ge.current=window.setTimeout(async()=>{const ye=oe.current;if(!ye)return;if(Date.now()-ye.startedAt>=T6){Pe("timed_out"),q(e("sessions.pollTimeout")),await Qe(ye.project);return}const Re=await bt(ye.project,ye.sessionId,{silent:!0});if(!Re||!oe.current){Pe(),await Qe(ye.project);return}if(ee.current.project!==ye.project||ee.current.sessionId!==ye.sessionId){Pe();return}const ze=O6(Re.history),tt=M6(Re.history)>ye.assistantCountBefore,rt=tt&&ze===ye.lastSignature?ye.stableCount+1:0,Ft={...ye,lastSignature:ze,stableCount:rt};if(tt&&rt>=2){Pe(),await Qe(ye.project);return}J("polling"),te(Ft)},C6)},[bt,Qe,Pe,e]),he=w.useCallback((se,ye,Re)=>{Pe(),J("polling"),te({project:se,sessionId:ye,assistantCountBefore:Re,stableCount:0,lastSignature:"",startedAt:Date.now()})},[te,Pe]),Te=w.useCallback(async se=>{if(Pe(),h(se),_(""),q(""),T(""),!se){ee.current={project:"",sessionId:""},x(null),E([]),g([]),Je("");return}ee.current={project:se,sessionId:""},x(null),E([]),Je(se),await Qe(se)},[Qe,Pe,Je]),Ie=w.useCallback(async se=>{if(se.isDraft||se.live||!se.id)return se;J("activating");try{await t6(se.project,{session_key:se.sessionKey,session_id:se.id}),await Qe(se.project);const ye=await bt(se.project,se.id,{silent:!0}),Re={...se,live:(ye==null?void 0:ye.live)??!0,isDraft:!1,detail:ye??se.detail,name:(ye==null?void 0:ye.name)||se.name};return x(Re),Re}finally{J("idle")}},[bt,Qe]),wt=w.useCallback(async(se,ye)=>{Pe(),q(""),ee.current={project:se,sessionId:ye.id},h(se),Je(se,ye.id),x({id:ye.id,project:se,sessionKey:ye.session_key,name:Vr(ye),live:ye.live,isDraft:!1,detail:null});const Re=await bt(se,ye.id);Re&&!Re.live&&await Ie({id:Re.id,project:se,sessionKey:Re.session_key,name:Re.name||Vr(Re),live:Re.live,isDraft:!1,detail:Re})},[Ie,bt,Pe,Je]),lt=w.useCallback(async()=>{Pe(),d&&(await Qe(d),m!=null&&m.id&&(ee.current={project:d,sessionId:m.id},await bt(d,m.id)))},[m==null?void 0:m.id,bt,Qe,d,Pe]),Wt=w.useCallback(async()=>{if(!N.trim()||!d)return;if(!Ne){q(e("sessions.sessionUnavailable"));return}const se=N.trim(),ye=`${crypto.randomUUID()}-user`,Re={id:ye,role:"user",content:se,timestamp:new Date().toISOString()};T(""),O(!0),J("sending"),q("");try{const ze=m||ke[0];if(!ze)throw new Error(e("sessions.noAvailableChatTarget"));let tt=m&&m.id===ze.id?m:{id:ze.id,project:d,sessionKey:"session_key"in ze?ze.session_key:ze.sessionKey,name:"session_key"in ze?Vr(ze):ze.name,live:ze.live,isDraft:!1,detail:null};(!m||m.id!==tt.id)&&(ee.current={project:d,sessionId:tt.id},Je(d,tt.id),x(tt)),tt=await Ie(tt),E(We=>[...We,Re]);try{await om(d,{session_key:tt.sessionKey,message:se})}catch(We){if(!L_(We)||!tt.id)throw We;tt=await Ie({...tt,live:!1}),await om(d,{session_key:tt.sessionKey,message:se})}const rt=tt.id;if(!rt)throw new Error(e("sessions.createFailed"));const Ft=v.filter(We=>We.role!=="user").length;ee.current={project:d,sessionId:rt},x(We=>We&&{...We,id:rt,isDraft:!1}),Je(d,rt),he(d,rt,Ft),await Qe(d)}catch(ze){Pe(),E(rt=>rt.filter(Ft=>Ft.id!==ye));const tt=j6(ze,e);q(tt)}finally{O(!1)}},[m,Ne,Ie,N,ke,v,Qe,d,he,Pe,e,Je]),B=w.useCallback(async()=>{if(!(!$||!d||!W.trim())){V("rename");try{await JU(d,$.id,{name:W.trim()});const ye=(await Qe(d)).find(Re=>Re.id===$.id);ye&&(m==null?void 0:m.id)===ye.id&&x(Re=>Re&&{...Re,name:Vr(ye)}),I(null),Q("")}finally{V(null)}}},[m==null?void 0:m.id,Qe,W,$,d]),ie=w.useCallback(async()=>{if(!(!Y||!d)){V("delete");try{await e6(d,Y.id);const se=await Qe(d);(m==null?void 0:m.id)===Y.id&&(Pe(),ee.current={project:d,sessionId:""},x(null),E([]),Je(d)),se.length===0&&E([]),L(null)}finally{V(null)}}},[m==null?void 0:m.id,Y,Qe,d,Pe,Je]);w.useEffect(()=>{Be()},[Be]),w.useEffect(()=>{re&&(d&&d===re||h(re))},[re,d]),w.useEffect(()=>{if(!d){g([]);return}ee.current.project=d,Qe(d)},[Qe,d]),w.useEffect(()=>{!d||be||m!=null&&m.id||ke.length===0||wt(d,ke[0])},[m==null?void 0:m.id,ke,wt,be,d]),w.useEffect(()=>{if(!re||!be||d!==re)return;const se=f.find(ye=>ye.id===be);if(!se){f.length>0&&Je(re,f[0].id);return}(m==null?void 0:m.id)!==se.id&&wt(re,se)},[m==null?void 0:m.id,wt,re,be,d,f,Je]),w.useEffect(()=>{var se;(se=R.current)==null||se.scrollIntoView({behavior:"smooth"})},[v]),w.useEffect(()=>()=>Pe(),[Pe]);const Ee=(m==null?void 0:m.name)||e("sessions.activeChat");return p.jsxs("div",{className:"grid min-h-[calc(100vh-8rem)] grid-cols-1 gap-4 xl:grid-cols-[22rem_minmax(0,1fr)] animate-fade-in",children:[p.jsxs(Kt,{className:"flex flex-col gap-4 p-4 xl:h-[calc(100vh-8rem)] xl:overflow-hidden",children:[p.jsx("div",{className:"flex items-center gap-3",children:p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.2em] text-gray-400",children:e("sessions.selectProject")}),p.jsxs("select",{value:d,onChange:se=>void Te(se.target.value),className:"mt-2 w-full rounded-xl border border-gray-300/90 bg-white/90 px-3 py-2 text-sm text-gray-900 transition-all focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/45 dark:border-white/[0.1] dark:bg-[rgba(0,0,0,0.45)] dark:text-white",children:[p.jsx("option",{value:"",children:e("sessions.allProjects")}),i.map(se=>p.jsx("option",{value:se.name,children:se.name},se.name))]})]})}),p.jsxs("div",{className:"relative",children:[p.jsx(xt,{value:S,onChange:se=>_(se.target.value),placeholder:e("common.search"),className:"pl-9","aria-label":e("common.search")}),p.jsx(Ju,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"})]}),p.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{className:"mb-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[p.jsx("span",{children:e("sessions.historyTitle")}),p.jsx("span",{children:ke.length})]}),p.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto space-y-2 pr-1",children:C?p.jsx("div",{className:"flex h-32 items-center justify-center text-gray-400",children:p.jsx(Fs,{className:"animate-spin",size:18})}):d?D&&f.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-gray-400",children:p.jsx(Fs,{className:"animate-spin",size:18})}):f.length===0?p.jsx(xn,{message:e("sessions.noSessions"),icon:_a}):ke.length===0?p.jsx(xn,{message:e("sessions.noSessions"),icon:_a}):ke.map(se=>{const ye=se.id===(m==null?void 0:m.id);return p.jsxs("div",{className:He("rounded-2xl border p-3 transition-all",ye?"border-accent/45 bg-accent/10 shadow-[0_0_20px_-12px_rgba(139,92,246,0.55)]":"border-gray-200/80 bg-white/70 hover:border-accent/30 dark:border-white/[0.08] dark:bg-white/[0.03]"),children:[p.jsxs("button",{type:"button",onClick:()=>void wt(d,se),className:"w-full text-left","data-testid":"web-chat-session-open",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"truncate text-sm font-medium text-gray-900 dark:text-white",children:Vr(se)}),se.live||Ce.has(se.id)?p.jsx("span",{className:"rounded-full bg-violet-50 px-2 py-0.5 text-[10px] text-violet-600 dark:bg-violet-950/20 dark:text-violet-300",children:"live"}):p.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-[10px] text-gray-400 dark:bg-white/[0.06] dark:text-gray-500",children:"history"})]}),p.jsx("p",{className:"mt-1 truncate text-xs text-gray-500 dark:text-gray-400",children:k_(se.updated_at||se.created_at,e("sessions.justNow"))})]}),p.jsx("span",{className:"shrink-0 text-[10px] text-gray-400",children:se.history_count})]}),p.jsx("p",{className:"mt-2 line-clamp-2 text-xs text-gray-500 dark:text-gray-400",children:D6(se,e)})]}),p.jsxs("div",{className:"mt-3 flex items-center justify-end gap-1",children:[p.jsx(_e,{size:"sm",variant:"ghost",onClick:()=>{I({id:se.id,name:Vr(se)}),Q(Vr(se))},"data-testid":"web-chat-session-rename",children:p.jsx(wo,{size:14})}),p.jsx(_e,{size:"sm",variant:"ghost",onClick:()=>L({id:se.id,name:Vr(se)}),"data-testid":"web-chat-session-delete",children:p.jsx(Jr,{size:14})})]})]},se.id)}):p.jsx(xn,{message:e("sessions.projectRequired"),icon:_a})})]})]}),p.jsxs(Kt,{className:"flex min-h-[32rem] flex-col p-0 xl:h-[calc(100vh-8rem)]",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-gray-200/80 px-5 py-4 dark:border-white/[0.08]",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("h2",{className:"truncate text-lg font-semibold text-gray-900 dark:text-white",children:Ee})}),p.jsx("p",{className:"mt-1 truncate text-sm text-gray-500 dark:text-gray-400",children:m?m.project:e("sessions.sendHint")})]}),p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>void lt(),"data-testid":"web-chat-refresh",children:[p.jsx(Zu,{size:14})," ",e("common.refresh")]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:d?P?p.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:p.jsx(Fs,{className:"animate-spin",size:22})}):v.length===0?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(xn,{message:e(m?"sessions.noMessages":"sessions.sendHint"),icon:_a})}):p.jsxs("div",{className:"space-y-5",children:[v.map(se=>{const ye=se.role==="user";return p.jsxs("div",{className:He("flex gap-3",ye?"justify-end":"justify-start"),children:[!ye&&p.jsx("div",{className:"mt-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-accent/10",children:p.jsx(Qu,{size:16,className:"text-accent"})}),p.jsx("div",{className:He("max-w-[85%] rounded-2xl px-5 py-3.5 text-sm",ye?"bg-accent text-white rounded-br-md":"border border-gray-200 bg-white text-gray-900 shadow-sm dark:border-white/[0.08] dark:bg-[rgba(0,0,0,0.42)] dark:text-gray-100 rounded-bl-md"),children:p.jsx(gg,{content:se.content,isUser:ye})}),ye&&p.jsx("div",{className:"mt-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gray-200 dark:bg-white/[0.08]",children:p.jsx(ed,{size:16,className:"text-gray-500 dark:text-gray-300"})})]},se.id)}),p.jsx("div",{ref:R})]}):p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(xn,{message:e("sessions.emptySelection"),icon:_a})})}),p.jsxs("div",{className:"border-t border-gray-200/80 px-5 py-4 dark:border-white/[0.08]",children:[ce&&p.jsx("div",{className:"mb-3 rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-600 dark:border-red-900/40 dark:bg-red-950/20 dark:text-red-300",children:ce}),U==="polling"&&p.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[p.jsx(Fs,{size:14,className:"animate-spin"}),p.jsx("span",{children:e("sessions.waitingForReply")})]}),U==="activating"&&p.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[p.jsx(Fs,{size:14,className:"animate-spin"}),p.jsx("span",{children:e("sessions.preparingChat")})]}),p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[p.jsx("div",{className:"flex-1",children:p.jsx(bd,{value:N,onChange:se=>T(se.target.value),onKeyDown:se=>{se.key==="Enter"&&!se.shiftKey&&(se.preventDefault(),Wt())},rows:3,placeholder:e(d?"sessions.messageInput":"sessions.projectRequired"),disabled:!d||!Ne||X||U==="polling"||U==="activating","data-testid":"web-chat-input"})}),p.jsxs(_e,{onClick:()=>void Wt(),disabled:!$e,loading:X,size:"lg",className:"sm:self-stretch","data-testid":"web-chat-send",children:[p.jsx(gm,{size:16})," ",e("sessions.send")]})]}),!Ne&&m&&p.jsx("div",{className:"mt-3 rounded-xl border border-gray-200 bg-gray-50 px-4 py-3 text-sm text-gray-500 dark:border-white/[0.08] dark:bg-white/[0.03] dark:text-gray-400",children:e("sessions.notLiveHint")})]})]}),p.jsx(Lr,{open:!!$,onClose:()=>I(null),title:e("sessions.renameTitle"),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(xt,{value:W,onChange:se=>Q(se.target.value),placeholder:e("sessions.renamePlaceholder"),"data-testid":"web-chat-rename-input"}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>I(null),children:e("common.cancel")}),p.jsx(_e,{onClick:()=>void B(),loading:z==="rename","data-testid":"web-chat-rename-save",children:e("common.save")})]})]})}),p.jsx(Lr,{open:!!Y,onClose:()=>L(null),title:e("sessions.deleteConfirmTitle"),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:e("sessions.deleteConfirmBody")}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>L(null),children:e("common.cancel")}),p.jsx(_e,{variant:"danger",onClick:()=>void ie(),loading:z==="delete","data-testid":"web-chat-delete-confirm",children:e("common.delete")})]})]})})]})}var I6=Object.defineProperty,Gu=Object.getOwnPropertySymbols,I_=Object.prototype.hasOwnProperty,z_=Object.prototype.propertyIsEnumerable,a1=(e,t,r)=>t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cm=(e,t)=>{for(var r in t||(t={}))I_.call(t,r)&&a1(e,r,t[r]);if(Gu)for(var r of Gu(t))z_.call(t,r)&&a1(e,r,t[r]);return e},um=(e,t)=>{var r={};for(var i in e)I_.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&Gu)for(var i of Gu(e))t.indexOf(i)<0&&z_.call(e,i)&&(r[i]=e[i]);return r};/**
479
+ * @license QR Code generator library (TypeScript)
480
+ * Copyright (c) Project Nayuki.
481
+ * SPDX-License-Identifier: MIT
482
+ */var Xi;(e=>{const t=class ft{constructor(h,f,g,m){if(this.version=h,this.errorCorrectionLevel=f,this.modules=[],this.isFunction=[],h<ft.MIN_VERSION||h>ft.MAX_VERSION)throw new RangeError("Version value out of range");if(m<-1||m>7)throw new RangeError("Mask value out of range");this.size=h*4+17;let x=[];for(let E=0;E<this.size;E++)x.push(!1);for(let E=0;E<this.size;E++)this.modules.push(x.slice()),this.isFunction.push(x.slice());this.drawFunctionPatterns();const v=this.addEccAndInterleave(g);if(this.drawCodewords(v),m==-1){let E=1e9;for(let S=0;S<8;S++){this.applyMask(S),this.drawFormatBits(S);const _=this.getPenaltyScore();_<E&&(m=S,E=_),this.applyMask(S)}}s(0<=m&&m<=7),this.mask=m,this.applyMask(m),this.drawFormatBits(m),this.isFunction=[]}static encodeText(h,f){const g=e.QrSegment.makeSegments(h);return ft.encodeSegments(g,f)}static encodeBinary(h,f){const g=e.QrSegment.makeBytes(h);return ft.encodeSegments([g],f)}static encodeSegments(h,f,g=1,m=40,x=-1,v=!0){if(!(ft.MIN_VERSION<=g&&g<=m&&m<=ft.MAX_VERSION)||x<-1||x>7)throw new RangeError("Invalid value");let E,S;for(E=g;;E++){const C=ft.getNumDataCodewords(E,f)*8,j=c.getTotalBits(h,E);if(j<=C){S=j;break}if(E>=m)throw new RangeError("Data too long")}for(const C of[ft.Ecc.MEDIUM,ft.Ecc.QUARTILE,ft.Ecc.HIGH])v&&S<=ft.getNumDataCodewords(E,C)*8&&(f=C);let _=[];for(const C of h){r(C.mode.modeBits,4,_),r(C.numChars,C.mode.numCharCountBits(E),_);for(const j of C.getData())_.push(j)}s(_.length==S);const N=ft.getNumDataCodewords(E,f)*8;s(_.length<=N),r(0,Math.min(4,N-_.length),_),r(0,(8-_.length%8)%8,_),s(_.length%8==0);for(let C=236;_.length<N;C^=253)r(C,8,_);let T=[];for(;T.length*8<_.length;)T.push(0);return _.forEach((C,j)=>T[j>>>3]|=C<<7-(j&7)),new ft(E,f,T,x)}getModule(h,f){return 0<=h&&h<this.size&&0<=f&&f<this.size&&this.modules[f][h]}getModules(){return this.modules}drawFunctionPatterns(){for(let g=0;g<this.size;g++)this.setFunctionModule(6,g,g%2==0),this.setFunctionModule(g,6,g%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const h=this.getAlignmentPatternPositions(),f=h.length;for(let g=0;g<f;g++)for(let m=0;m<f;m++)g==0&&m==0||g==0&&m==f-1||g==f-1&&m==0||this.drawAlignmentPattern(h[g],h[m]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(h){const f=this.errorCorrectionLevel.formatBits<<3|h;let g=f;for(let x=0;x<10;x++)g=g<<1^(g>>>9)*1335;const m=(f<<10|g)^21522;s(m>>>15==0);for(let x=0;x<=5;x++)this.setFunctionModule(8,x,i(m,x));this.setFunctionModule(8,7,i(m,6)),this.setFunctionModule(8,8,i(m,7)),this.setFunctionModule(7,8,i(m,8));for(let x=9;x<15;x++)this.setFunctionModule(14-x,8,i(m,x));for(let x=0;x<8;x++)this.setFunctionModule(this.size-1-x,8,i(m,x));for(let x=8;x<15;x++)this.setFunctionModule(8,this.size-15+x,i(m,x));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let h=this.version;for(let g=0;g<12;g++)h=h<<1^(h>>>11)*7973;const f=this.version<<12|h;s(f>>>18==0);for(let g=0;g<18;g++){const m=i(f,g),x=this.size-11+g%3,v=Math.floor(g/3);this.setFunctionModule(x,v,m),this.setFunctionModule(v,x,m)}}drawFinderPattern(h,f){for(let g=-4;g<=4;g++)for(let m=-4;m<=4;m++){const x=Math.max(Math.abs(m),Math.abs(g)),v=h+m,E=f+g;0<=v&&v<this.size&&0<=E&&E<this.size&&this.setFunctionModule(v,E,x!=2&&x!=4)}}drawAlignmentPattern(h,f){for(let g=-2;g<=2;g++)for(let m=-2;m<=2;m++)this.setFunctionModule(h+m,f+g,Math.max(Math.abs(m),Math.abs(g))!=1)}setFunctionModule(h,f,g){this.modules[f][h]=g,this.isFunction[f][h]=!0}addEccAndInterleave(h){const f=this.version,g=this.errorCorrectionLevel;if(h.length!=ft.getNumDataCodewords(f,g))throw new RangeError("Invalid argument");const m=ft.NUM_ERROR_CORRECTION_BLOCKS[g.ordinal][f],x=ft.ECC_CODEWORDS_PER_BLOCK[g.ordinal][f],v=Math.floor(ft.getNumRawDataModules(f)/8),E=m-v%m,S=Math.floor(v/m);let _=[];const N=ft.reedSolomonComputeDivisor(x);for(let C=0,j=0;C<m;C++){let D=h.slice(j,j+S-x+(C<E?0:1));j+=D.length;const A=ft.reedSolomonComputeRemainder(D,N);C<E&&D.push(0),_.push(D.concat(A))}let T=[];for(let C=0;C<_[0].length;C++)_.forEach((j,D)=>{(C!=S-x||D>=E)&&T.push(j[C])});return s(T.length==v),T}drawCodewords(h){if(h.length!=Math.floor(ft.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let f=0;for(let g=this.size-1;g>=1;g-=2){g==6&&(g=5);for(let m=0;m<this.size;m++)for(let x=0;x<2;x++){const v=g-x,S=(g+1&2)==0?this.size-1-m:m;!this.isFunction[S][v]&&f<h.length*8&&(this.modules[S][v]=i(h[f>>>3],7-(f&7)),f++)}}s(f==h.length*8)}applyMask(h){if(h<0||h>7)throw new RangeError("Mask value out of range");for(let f=0;f<this.size;f++)for(let g=0;g<this.size;g++){let m;switch(h){case 0:m=(g+f)%2==0;break;case 1:m=f%2==0;break;case 2:m=g%3==0;break;case 3:m=(g+f)%3==0;break;case 4:m=(Math.floor(g/3)+Math.floor(f/2))%2==0;break;case 5:m=g*f%2+g*f%3==0;break;case 6:m=(g*f%2+g*f%3)%2==0;break;case 7:m=((g+f)%2+g*f%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[f][g]&&m&&(this.modules[f][g]=!this.modules[f][g])}}getPenaltyScore(){let h=0;for(let x=0;x<this.size;x++){let v=!1,E=0,S=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[x][_]==v?(E++,E==5?h+=ft.PENALTY_N1:E>5&&h++):(this.finderPenaltyAddHistory(E,S),v||(h+=this.finderPenaltyCountPatterns(S)*ft.PENALTY_N3),v=this.modules[x][_],E=1);h+=this.finderPenaltyTerminateAndCount(v,E,S)*ft.PENALTY_N3}for(let x=0;x<this.size;x++){let v=!1,E=0,S=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[_][x]==v?(E++,E==5?h+=ft.PENALTY_N1:E>5&&h++):(this.finderPenaltyAddHistory(E,S),v||(h+=this.finderPenaltyCountPatterns(S)*ft.PENALTY_N3),v=this.modules[_][x],E=1);h+=this.finderPenaltyTerminateAndCount(v,E,S)*ft.PENALTY_N3}for(let x=0;x<this.size-1;x++)for(let v=0;v<this.size-1;v++){const E=this.modules[x][v];E==this.modules[x][v+1]&&E==this.modules[x+1][v]&&E==this.modules[x+1][v+1]&&(h+=ft.PENALTY_N2)}let f=0;for(const x of this.modules)f=x.reduce((v,E)=>v+(E?1:0),f);const g=this.size*this.size,m=Math.ceil(Math.abs(f*20-g*10)/g)-1;return s(0<=m&&m<=9),h+=m*ft.PENALTY_N4,s(0<=h&&h<=2568888),h}getAlignmentPatternPositions(){if(this.version==1)return[];{const h=Math.floor(this.version/7)+2,f=this.version==32?26:Math.ceil((this.version*4+4)/(h*2-2))*2;let g=[6];for(let m=this.size-7;g.length<h;m-=f)g.splice(1,0,m);return g}}static getNumRawDataModules(h){if(h<ft.MIN_VERSION||h>ft.MAX_VERSION)throw new RangeError("Version number out of range");let f=(16*h+128)*h+64;if(h>=2){const g=Math.floor(h/7)+2;f-=(25*g-10)*g-55,h>=7&&(f-=36)}return s(208<=f&&f<=29648),f}static getNumDataCodewords(h,f){return Math.floor(ft.getNumRawDataModules(h)/8)-ft.ECC_CODEWORDS_PER_BLOCK[f.ordinal][h]*ft.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][h]}static reedSolomonComputeDivisor(h){if(h<1||h>255)throw new RangeError("Degree out of range");let f=[];for(let m=0;m<h-1;m++)f.push(0);f.push(1);let g=1;for(let m=0;m<h;m++){for(let x=0;x<f.length;x++)f[x]=ft.reedSolomonMultiply(f[x],g),x+1<f.length&&(f[x]^=f[x+1]);g=ft.reedSolomonMultiply(g,2)}return f}static reedSolomonComputeRemainder(h,f){let g=f.map(m=>0);for(const m of h){const x=m^g.shift();g.push(0),f.forEach((v,E)=>g[E]^=ft.reedSolomonMultiply(v,x))}return g}static reedSolomonMultiply(h,f){if(h>>>8||f>>>8)throw new RangeError("Byte out of range");let g=0;for(let m=7;m>=0;m--)g=g<<1^(g>>>7)*285,g^=(f>>>m&1)*h;return s(g>>>8==0),g}finderPenaltyCountPatterns(h){const f=h[1];s(f<=this.size*3);const g=f>0&&h[2]==f&&h[3]==f*3&&h[4]==f&&h[5]==f;return(g&&h[0]>=f*4&&h[6]>=f?1:0)+(g&&h[6]>=f*4&&h[0]>=f?1:0)}finderPenaltyTerminateAndCount(h,f,g){return h&&(this.finderPenaltyAddHistory(f,g),f=0),f+=this.size,this.finderPenaltyAddHistory(f,g),this.finderPenaltyCountPatterns(g)}finderPenaltyAddHistory(h,f){f[0]==0&&(h+=this.size),f.pop(),f.unshift(h)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function r(d,h,f){if(h<0||h>31||d>>>h)throw new RangeError("Value out of range");for(let g=h-1;g>=0;g--)f.push(d>>>g&1)}function i(d,h){return(d>>>h&1)!=0}function s(d){if(!d)throw new Error("Assertion error")}const o=class rn{constructor(h,f,g){if(this.mode=h,this.numChars=f,this.bitData=g,f<0)throw new RangeError("Invalid argument");this.bitData=g.slice()}static makeBytes(h){let f=[];for(const g of h)r(g,8,f);return new rn(rn.Mode.BYTE,h.length,f)}static makeNumeric(h){if(!rn.isNumeric(h))throw new RangeError("String contains non-numeric characters");let f=[];for(let g=0;g<h.length;){const m=Math.min(h.length-g,3);r(parseInt(h.substring(g,g+m),10),m*3+1,f),g+=m}return new rn(rn.Mode.NUMERIC,h.length,f)}static makeAlphanumeric(h){if(!rn.isAlphanumeric(h))throw new RangeError("String contains unencodable characters in alphanumeric mode");let f=[],g;for(g=0;g+2<=h.length;g+=2){let m=rn.ALPHANUMERIC_CHARSET.indexOf(h.charAt(g))*45;m+=rn.ALPHANUMERIC_CHARSET.indexOf(h.charAt(g+1)),r(m,11,f)}return g<h.length&&r(rn.ALPHANUMERIC_CHARSET.indexOf(h.charAt(g)),6,f),new rn(rn.Mode.ALPHANUMERIC,h.length,f)}static makeSegments(h){return h==""?[]:rn.isNumeric(h)?[rn.makeNumeric(h)]:rn.isAlphanumeric(h)?[rn.makeAlphanumeric(h)]:[rn.makeBytes(rn.toUtf8ByteArray(h))]}static makeEci(h){let f=[];if(h<0)throw new RangeError("ECI assignment value out of range");if(h<128)r(h,8,f);else if(h<16384)r(2,2,f),r(h,14,f);else if(h<1e6)r(6,3,f),r(h,21,f);else throw new RangeError("ECI assignment value out of range");return new rn(rn.Mode.ECI,0,f)}static isNumeric(h){return rn.NUMERIC_REGEX.test(h)}static isAlphanumeric(h){return rn.ALPHANUMERIC_REGEX.test(h)}getData(){return this.bitData.slice()}static getTotalBits(h,f){let g=0;for(const m of h){const x=m.mode.numCharCountBits(f);if(m.numChars>=1<<x)return 1/0;g+=4+x+m.bitData.length}return g}static toUtf8ByteArray(h){h=encodeURI(h);let f=[];for(let g=0;g<h.length;g++)h.charAt(g)!="%"?f.push(h.charCodeAt(g)):(f.push(parseInt(h.substring(g+1,g+3),16)),g+=2);return f}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=o;e.QrSegment=o})(Xi||(Xi={}));(e=>{(t=>{const r=class{constructor(s,o){this.ordinal=s,this.formatBits=o}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),t.Ecc=r})(e.QrCode||(e.QrCode={}))})(Xi||(Xi={}));(e=>{(t=>{const r=class{constructor(s,o){this.modeBits=s,this.numBitsCharCount=o}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),t.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Xi||(Xi={}));var Gs=Xi;/**
483
+ * @license qrcode.react
484
+ * Copyright (c) Paul O'Shannessy
485
+ * SPDX-License-Identifier: ISC
486
+ */var z6={L:Gs.QrCode.Ecc.LOW,M:Gs.QrCode.Ecc.MEDIUM,Q:Gs.QrCode.Ecc.QUARTILE,H:Gs.QrCode.Ecc.HIGH},P_=128,B_="L",U_="#FFFFFF",F_="#000000",$_=!1,H_=1,P6=4,B6=0,U6=.1;function K_(e,t=0){const r=[];return e.forEach(function(i,s){let o=null;i.forEach(function(c,d){if(!c&&o!==null){r.push(`M${o+t} ${s+t}h${d-o}v1H${o+t}z`),o=null;return}if(d===i.length-1){if(!c)return;o===null?r.push(`M${d+t},${s+t} h1v1H${d+t}z`):r.push(`M${o+t},${s+t} h${d+1-o}v1H${o+t}z`);return}c&&o===null&&(o=d)})}),r.join("")}function q_(e,t){return e.slice().map((r,i)=>i<t.y||i>=t.y+t.h?r:r.map((s,o)=>o<t.x||o>=t.x+t.w?s:!1))}function F6(e,t,r,i){if(i==null)return null;const s=e.length+r*2,o=Math.floor(t*U6),c=s/t,d=(i.width||o)*c,h=(i.height||o)*c,f=i.x==null?e.length/2-d/2:i.x*c,g=i.y==null?e.length/2-h/2:i.y*c,m=i.opacity==null?1:i.opacity;let x=null;if(i.excavate){let E=Math.floor(f),S=Math.floor(g),_=Math.ceil(d+f-E),N=Math.ceil(h+g-S);x={x:E,y:S,w:_,h:N}}const v=i.crossOrigin;return{x:f,y:g,h,w:d,excavation:x,opacity:m,crossOrigin:v}}function $6(e,t){return t!=null?Math.max(Math.floor(t),0):e?P6:B6}function G_({value:e,level:t,minVersion:r,includeMargin:i,marginSize:s,imageSettings:o,size:c,boostLevel:d}){let h=kt.useMemo(()=>{const E=(Array.isArray(e)?e:[e]).reduce((S,_)=>(S.push(...Gs.QrSegment.makeSegments(_)),S),[]);return Gs.QrCode.encodeSegments(E,z6[t],r,void 0,void 0,d)},[e,t,r,d]);const{cells:f,margin:g,numCells:m,calculatedImageSettings:x}=kt.useMemo(()=>{let v=h.getModules();const E=$6(i,s),S=v.length+E*2,_=F6(v,c,E,o);return{cells:v,margin:E,numCells:S,calculatedImageSettings:_}},[h,c,o,i,s]);return{qrcode:h,margin:g,cells:f,numCells:m,calculatedImageSettings:x}}var H6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),K6=kt.forwardRef(function(t,r){const i=t,{value:s,size:o=P_,level:c=B_,bgColor:d=U_,fgColor:h=F_,includeMargin:f=$_,minVersion:g=H_,boostLevel:m,marginSize:x,imageSettings:v}=i,S=um(i,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:_}=S,N=um(S,["style"]),T=v==null?void 0:v.src,C=kt.useRef(null),j=kt.useRef(null),D=kt.useCallback(q=>{C.current=q,typeof r=="function"?r(q):r&&(r.current=q)},[r]),[A,P]=kt.useState(!1),{margin:K,cells:X,numCells:O,calculatedImageSettings:U}=G_({value:s,level:c,minVersion:g,boostLevel:m,includeMargin:f,marginSize:x,imageSettings:v,size:o});kt.useEffect(()=>{if(C.current!=null){const q=C.current,$=q.getContext("2d");if(!$)return;let I=X;const W=j.current,Q=U!=null&&W!==null&&W.complete&&W.naturalHeight!==0&&W.naturalWidth!==0;Q&&U.excavation!=null&&(I=q_(X,U.excavation));const Y=window.devicePixelRatio||1;q.height=q.width=o*Y;const L=o/O*Y;$.scale(L,L),$.fillStyle=d,$.fillRect(0,0,O,O),$.fillStyle=h,H6?$.fill(new Path2D(K_(I,K))):X.forEach(function(z,V){z.forEach(function(R,ee){R&&$.fillRect(ee+K,V+K,1,1)})}),U&&($.globalAlpha=U.opacity),Q&&$.drawImage(W,U.x+K,U.y+K,U.w,U.h)}}),kt.useEffect(()=>{P(!1)},[T]);const J=cm({height:o,width:o},_);let ce=null;return T!=null&&(ce=kt.createElement("img",{src:T,key:T,style:{display:"none"},onLoad:()=>{P(!0)},ref:j,crossOrigin:U==null?void 0:U.crossOrigin})),kt.createElement(kt.Fragment,null,kt.createElement("canvas",cm({style:J,height:o,width:o,ref:D,role:"img"},N)),ce)});K6.displayName="QRCodeCanvas";var V_=kt.forwardRef(function(t,r){const i=t,{value:s,size:o=P_,level:c=B_,bgColor:d=U_,fgColor:h=F_,includeMargin:f=$_,minVersion:g=H_,boostLevel:m,title:x,marginSize:v,imageSettings:E}=i,S=um(i,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:_,cells:N,numCells:T,calculatedImageSettings:C}=G_({value:s,level:c,minVersion:g,boostLevel:m,includeMargin:f,marginSize:v,imageSettings:E,size:o});let j=N,D=null;E!=null&&C!=null&&(C.excavation!=null&&(j=q_(N,C.excavation)),D=kt.createElement("image",{href:E.src,height:C.h,width:C.w,x:C.x+_,y:C.y+_,preserveAspectRatio:"none",opacity:C.opacity,crossOrigin:C.crossOrigin}));const A=K_(j,_);return kt.createElement("svg",cm({height:o,width:o,viewBox:`0 0 ${T} ${T}`,ref:r,role:"img"},S),!!x&&kt.createElement("title",null,x),kt.createElement("path",{fill:d,d:`M0,0 h${T}v${T}H0z`,shapeRendering:"crispEdges"}),kt.createElement("path",{fill:h,d:A,shapeRendering:"crispEdges"}),D)});V_.displayName="QRCodeSVG";const ui="__custom__",wp=["weixin","lark"],bg=[{id:"openai",label:"OpenAI",name:"openai",base_url:"https://api.openai.com/v1",model:"gpt-4.1-mini"},{id:"openrouter",label:"OpenRouter",name:"openrouter",base_url:"https://openrouter.ai/api/v1",model:"openai/gpt-4.1-mini"},{id:"anthropic",label:"Anthropic",name:"anthropic",base_url:"https://api.anthropic.com/v1",model:"claude-3-5-haiku-latest"},{id:"minimax",label:"Minimax",name:"minimax",base_url:"https://api.minimax.chat/v1",model:"MiniMax-M2.5"},{id:"ollama",label:"Ollama",name:"ollama",base_url:"http://127.0.0.1:11434/v1",model:"qwen2.5-coder:7b"}];function Or(e){return JSON.parse(JSON.stringify(e))}function uo(e){return Array.isArray(e.projects)||(e.projects=[]),e.projects}function q6(e){const t=new Set(e.map(i=>i.name).filter(Boolean));let r=e.length+1;for(;t.has(`project-${r}`);)r+=1;return{name:`project-${r}`,agentType:TU,workDir:"",model:""}}function xu(e){var t,r,i,s,o;return{...e,agent:{...e.agent,options:{...((t=e.agent)==null?void 0:t.options)||{},model:C_((r=e.agent)==null?void 0:r.type,String(((s=(i=e.agent)==null?void 0:i.options)==null?void 0:s.model)||""))},providers:((o=e.agent)==null?void 0:o.providers)||[]},platforms:e.platforms||[]}}function i1(e,t){return t.includes(e)?e:ui}function G6(e){var t;return((t=bg.find(r=>e.name===r.name||r.base_url&&e.base_url===r.base_url||r.model&&e.model===r.model&&e.name===r.name))==null?void 0:t.id)||ui}function V6(e,t){const r=bg.find(i=>i.id===t);return r?{...e,name:r.name,base_url:r.base_url,model:r.model}:e}function s1(e="weixin"){return{type:e,options:{}}}function l1(e){const t=e.type==="feishu"?"lark":e.type,r=e.options&&typeof e.options=="object"?{...e.options}:{};return t==="weixin"?{type:t,options:{...r}}:t==="lark"?{type:t,options:{...r,app_id:String(r.app_id||"").trim(),app_secret:String(r.app_secret||"").trim()}}:{type:t,options:r}}function Y6(e){var t;if(e.type==="weixin")return"WeChat QR login";if(e.type==="lark"){const r=String(((t=e.options)==null?void 0:t.app_id)||"").trim();return r?`App ID ${r}`:"App ID and secret required"}return"Custom platform"}function W6(e){var i,s;const t=String(((s=(i=e.agent)==null?void 0:i.options)==null?void 0:s.work_dir)||"").trim();return t?t.replace(/\/+$/,"").split("/").filter(Boolean).pop()||t:"No work directory"}function X6(e){return e==="success"?"border-primary/20 bg-primary/10 text-primary dark:border-primary/25 dark:bg-primary/10 dark:text-blue-200":e==="warning"?"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200":"border-red-200 bg-red-50 text-red-700 dark:border-red-400/20 dark:bg-red-500/10 dark:text-red-200"}function Q6(){var ge,oe,re,be,Ce,ke,Ne,$e,Je,Pe,Tt,Be,Qe,bt;const[e,t]=Nm(),r=e.get("project")||"",[i,s]=w.useState(null),[o,c]=w.useState(null),[d,h]=w.useState(0),[f,g]=w.useState("basic"),[m,x]=w.useState(null),[v,E]=w.useState(null),[S,_]=w.useState(null),[N,T]=w.useState(!1),[C,j]=w.useState(!0),[D,A]=w.useState(""),[P,K]=w.useState(null),X=w.useCallback(async(te="")=>{j(!0);try{const he=await nL(),Te=Or(he.parsed||{});if(Te.projects=uo(Te).map(Ie=>xu(Ie)),s(Te),c(Or(Te)),te){const Ie=(Te.projects||[]).findIndex(wt=>wt.name===te);h(Ie>=0?Ie:0)}}catch(he){K({tone:"error",message:he instanceof Error?he.message:String(he)})}finally{j(!1)}},[]);w.useEffect(()=>{X(r)},[X]);const O=(i==null?void 0:i.projects)||[],U=O[d]||null,J=JSON.stringify(i||{})!==JSON.stringify(o||{});w.useEffect(()=>{if(!i||!r)return;const te=O.findIndex(he=>he.name===r);te>=0&&te!==d&&h(te)},[i,O,r,d]);const ce=w.useCallback(te=>{s(he=>{if(!he)return he;const Te=Or(he),Ie=uo(Te),wt=Ie[d];return wt?(Ie[d]=xu(te(wt)),Te):he})},[d]),q=w.useCallback((te,he)=>{ce(Te=>{const Ie=[...Te.agent.providers||[]],wt=Ie[te];return wt?(Ie[te]=he(wt),{...Te,agent:{...Te.agent,providers:Ie}}):Te})},[ce]),$=()=>{x(q6(O))},I=te=>{x(he=>he&&{...he,...te})},W=()=>{if(!m)return;const te=m.name.trim(),he=m.agentType.trim(),Te=m.workDir.trim(),Ie=m.model.trim();if(!te||!he||!Te){K({tone:"warning",message:"Project name, agent type, and work directory are required."});return}if(O.some(Wt=>Wt.name===te)){K({tone:"warning",message:`Project "${te}" already exists.`});return}const wt=xu({name:te,agent:{type:he,options:{model:Ie||xp(he),work_dir:Te},providers:[]},platforms:[],admin_from:"",disabled_commands:[]}),lt=O.length;s(Wt=>{const B=Or(Wt||{});return uo(B).push(wt),B}),h(lt),t({project:te}),x(null),K(null)},Q=te=>{s(he=>{if(!he)return he;const Te=Or(he),Ie=uo(Te);return Ie.splice(te,1),h(Math.max(0,Math.min(te,Ie.length-1))),Te})},Y=te=>{var Te;if(_(null),te===null){E({index:te,draft:s1()});return}const he=(Te=U==null?void 0:U.platforms)==null?void 0:Te[te];he&&E({index:te,draft:Or(he)})},L=te=>{E(he=>he&&{...he,draft:te(he.draft)})},z=()=>{if(!v)return;const te=l1(v.draft);ce(he=>{const Te=[...he.platforms||[]];return v.index===null?Te.push(te):Te[v.index]=te,{...he,platforms:Te}}),E(null),_(null)},V=async()=>{if(!(!(U!=null&&U.name)||!i)){T(!0);try{if(v){const he=Or(i),Te=uo(he),Ie=Te[d];if(Ie){const wt=[...Ie.platforms||[]],lt=l1(v.draft);v.index===null?wt.push(lt):wt[v.index]=lt,Te[d]=xu({...Ie,platforms:wt});const Wt=await Xx(he),B=Or(Wt.parsed||he);c(B),s(Or(B)),E(ie=>ie&&{index:ie.index??wt.length-1,draft:lt})}}const te=await sL(U.name);_({...te,status:"wait"}),K(null)}catch(te){K({tone:"error",message:te instanceof Error?te.message:String(te)})}finally{T(!1)}}},R=async()=>{if(!(!(U!=null&&U.name)||!(S!=null&&S.ticket))){T(!0);try{const te=await lL(U.name,S.ticket);_(he=>he&&{...he,status:te.status}),te.status==="confirmed"&&K({tone:"success",message:"WeChat QR code confirmed."})}catch(te){K({tone:"error",message:te instanceof Error?te.message:String(te)})}finally{T(!1)}}},ee=async()=>{if(i){A("config");try{const te=await Xx(i);c(Or(te.parsed||i)),s(Or(te.parsed||i)),K({tone:"success",message:"Project changes saved."}),await X()}catch(te){K({tone:"error",message:te instanceof Error?te.message:String(te)})}finally{A("")}}};return C&&!i?p.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-slate-400 animate-pulse",children:"Loading workspace..."}):p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[p.jsx(Zi,{title:"工作区",description:"创建项目,配置 Agent、工作目录、Provider 和平台接入。"}),P?p.jsx("div",{role:"status",className:`rounded-xl border px-4 py-3 text-sm ${X6(P.tone)}`,children:P.message}):null,J?p.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-400/20 dark:bg-amber-500/10 dark:text-amber-200",children:"You have unsaved project changes."}):null,p.jsxs("div",{className:"grid min-w-0 grid-cols-1 gap-4 lg:grid-cols-[340px_minmax(0,1fr)]",children:[p.jsx(ka,{title:"项目",actions:p.jsxs(_e,{size:"sm",onClick:$,children:[p.jsx(di,{size:14})," 新建项目"]}),className:"lg:self-start",children:O.length===0?p.jsx(xn,{message:"还没有项目。"}):p.jsx("div",{className:"space-y-2",children:O.map((te,he)=>{var Te,Ie;return p.jsxs("div",{className:`flex items-center justify-between gap-2 rounded-xl border px-3 py-2 transition-colors ${he===d?"border-accent/30 bg-accent/10":"border-black/10 hover:bg-black/[0.04] dark:border-white/[0.08] dark:hover:bg-white/[0.06]"}`,children:[p.jsxs("button",{type:"button",onClick:()=>{h(he),t(te.name?{project:te.name}:{})},className:"min-w-0 flex-1 text-left",children:[p.jsx("p",{className:"truncate text-sm font-medium text-slate-950 dark:text-white",children:te.name||`Project ${he+1}`}),p.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[((Te=te.agent)==null?void 0:Te.type)||"unknown"," · ",W6(te)," · ",((Ie=te.platforms)==null?void 0:Ie.length)||0," platforms"]})]}),p.jsx(_e,{variant:"ghost",size:"sm",onClick:()=>Q(he),"aria-label":`Remove ${te.name}`,children:p.jsx(Jr,{size:14})})]},`${te.name}-${he}`)})})}),p.jsx(ka,{title:(U==null?void 0:U.name)||"Project details",description:U?p.jsxs("span",{className:"break-all",children:[((ge=U.agent)==null?void 0:ge.type)||"unknown"," · ",String(((re=(oe=U.agent)==null?void 0:oe.options)==null?void 0:re.work_dir)||"No work directory")]}):void 0,children:U?p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"flex gap-2 overflow-x-auto border-b border-black/10 pb-4 [scrollbar-width:none] dark:border-white/[0.08] [&::-webkit-scrollbar]:hidden sm:flex-wrap",children:[["basic","基本信息"],["providers","Provider"],["platforms","平台接入"]].map(([te,he])=>p.jsx("button",{type:"button",onClick:()=>g(te),className:`shrink-0 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors ${f===te?"bg-accent text-white":"bg-black/[0.04] text-muted-foreground hover:bg-black/[0.07] hover:text-foreground dark:bg-white/[0.05] dark:hover:bg-white/[0.08]"}`,children:he},te))}),f==="basic"?p.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[p.jsx(xt,{label:"Project name",value:U.name,onChange:te=>ce(he=>({...he,name:te.target.value}))}),p.jsxs(Na,{label:"Agent type",value:i1(((be=U.agent)==null?void 0:be.type)||"",bp),onChange:te=>ce(he=>{var Ie;const Te=te.target.value===ui?he.agent.type:te.target.value;return{...he,agent:{...he.agent,type:Te,options:{...he.agent.options||{},model:C_(Te,String(((Ie=he.agent.options)==null?void 0:Ie.model)||""))}}}}),children:[bp.map(te=>p.jsx("option",{value:te,children:te},te)),p.jsx("option",{value:ui,children:"custom"})]}),p.jsx(xt,{label:"Work directory",value:String(((ke=(Ce=U.agent)==null?void 0:Ce.options)==null?void 0:ke.work_dir)||""),onChange:te=>ce(he=>({...he,agent:{...he.agent,options:{...he.agent.options||{},work_dir:te.target.value}}}))}),p.jsx(xt,{label:"Default model",value:String((($e=(Ne=U.agent)==null?void 0:Ne.options)==null?void 0:$e.model)||""),onChange:te=>ce(he=>({...he,agent:{...he.agent,options:{...he.agent.options||{},model:te.target.value}}})),placeholder:xp((Je=U.agent)==null?void 0:Je.type)||"Use agent default model"})]}):null,f==="providers"?p.jsxs("section",{className:"space-y-3",children:[p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[p.jsxs("div",{children:[p.jsx("h3",{className:"text-sm font-semibold text-slate-950 dark:text-white",children:"Providers"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Basic endpoint and default model only."})]}),p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>ce(te=>({...te,agent:{...te.agent,providers:[...te.agent.providers||[],{name:`provider-${(te.agent.providers||[]).length+1}`}]}})),children:[p.jsx(di,{size:14})," Provider"]})]}),(U.agent.providers||[]).length===0?p.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-black/10 px-4 py-4 dark:border-white/[0.08] sm:flex-row sm:items-center sm:justify-between",children:[p.jsx("p",{className:"text-sm text-muted-foreground",children:"No providers configured."}),p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>ce(te=>({...te,agent:{...te.agent,providers:[...te.agent.providers||[],{name:`provider-${(te.agent.providers||[]).length+1}`}]}})),children:[p.jsx(di,{size:14})," Add provider"]})]}):p.jsx("div",{className:"space-y-3",children:(U.agent.providers||[]).map((te,he)=>p.jsx("div",{className:"rounded-xl border border-black/10 p-4 dark:border-white/[0.08]",children:p.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[p.jsxs(Na,{label:"Preset",value:G6(te),onChange:Te=>{Te.target.value!==ui&&q(he,Ie=>V6(Ie,Te.target.value))},children:[bg.map(Te=>p.jsx("option",{value:Te.id,children:Te.label},Te.id)),p.jsx("option",{value:ui,children:"custom"})]}),p.jsx(xt,{label:"Name",value:te.name||"",onChange:Te=>q(he,Ie=>({...Ie,name:Te.target.value}))}),p.jsx(xt,{label:"API key",type:"password",value:te.api_key||"",onChange:Te=>q(he,Ie=>({...Ie,api_key:Te.target.value}))}),p.jsx(xt,{label:"Base URL",value:te.base_url||"",onChange:Te=>q(he,Ie=>({...Ie,base_url:Te.target.value}))}),p.jsx(xt,{label:"Default model",value:te.model||"",onChange:Te=>q(he,Ie=>({...Ie,model:Te.target.value}))}),p.jsx("div",{className:"flex items-end",children:p.jsxs(_e,{variant:"danger",size:"sm",onClick:()=>ce(Te=>{const Ie=[...Te.agent.providers||[]];return Ie.splice(he,1),{...Te,agent:{...Te.agent,providers:Ie}}}),children:[p.jsx(Jr,{size:14})," Remove"]})})]})},`${te.name}-${he}`))})]}):null,f==="platforms"?p.jsxs("section",{className:"space-y-3",children:[p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[p.jsxs("div",{children:[p.jsx("h3",{className:"text-sm font-semibold text-slate-950 dark:text-white",children:"Platforms"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Configure each platform with its own required connection fields."})]}),p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>Y(null),children:[p.jsx(di,{size:14})," Platform"]})]}),(U.platforms||[]).length===0?p.jsx(xn,{message:"No platforms configured."}):p.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:(U.platforms||[]).map((te,he)=>p.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-black/10 p-3 dark:border-white/[0.08]",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate text-sm font-medium text-slate-950 dark:text-white",children:te.type}),p.jsx("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:Y6(te)})]}),p.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[p.jsx(_e,{variant:"secondary",size:"sm",onClick:()=>Y(he),"aria-label":`Configure ${te.type}`,children:p.jsx(Oo,{size:14})}),p.jsx(_e,{variant:"danger",size:"sm",onClick:()=>ce(Te=>{const Ie=[...Te.platforms||[]];return Ie.splice(he,1),{...Te,platforms:Ie}}),children:p.jsx(Jr,{size:14})})]})]},`${te.type}-${he}`))})]}):null,p.jsx("div",{className:"flex flex-wrap gap-2 border-t border-black/10 pt-5 dark:border-white/[0.08]",children:p.jsxs(_e,{className:"w-full sm:w-auto",onClick:()=>void ee(),loading:D==="config",disabled:!J&&D!=="config",children:[p.jsx(Cp,{size:14})," 保存更改"]})})]}):p.jsx(xn,{message:"选择或新建项目后开始配置。"})})]}),p.jsx(Lr,{open:!!m,onClose:()=>x(null),title:"新建项目",children:m?p.jsxs("div",{className:"space-y-4",children:[p.jsx(xt,{label:"Project name",value:m.name,onChange:te=>I({name:te.target.value}),autoFocus:!0}),p.jsx(Na,{label:"Agent type",value:m.agentType,onChange:te=>{const he=te.target.value;I({agentType:he})},children:bp.map(te=>p.jsx("option",{value:te,children:te},te))}),p.jsx(xt,{label:"Work directory",value:m.workDir,onChange:te=>I({workDir:te.target.value}),placeholder:"/Users/yinyin/code/my-project"}),p.jsx(xt,{label:"Default model",value:m.model,onChange:te=>I({model:te.target.value}),placeholder:xp(m.agentType)||"Use agent default model"}),p.jsxs("div",{className:"flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end",children:[p.jsx(_e,{className:"w-full sm:w-auto",variant:"secondary",onClick:()=>x(null),children:"Cancel"}),p.jsxs(_e,{className:"w-full sm:w-auto",onClick:W,children:[p.jsx(di,{size:14})," 新建项目"]})]})]}):null}),p.jsx(Lr,{open:!!v,onClose:()=>{E(null),_(null)},title:(v==null?void 0:v.index)===null?"Add platform":"Configure platform",children:v?p.jsxs("div",{className:"space-y-4",children:[p.jsxs(Na,{label:"Platform",value:i1(v.draft.type,[...wp]),onChange:te=>{const he=te.target.value===ui?v.draft.type:te.target.value;L(()=>s1(he)),_(null)},children:[wp.map(te=>p.jsx("option",{value:te,children:te},te)),RU.filter(te=>!wp.includes(te)).map(te=>p.jsx("option",{value:te,children:te},te)),p.jsx("option",{value:ui,children:"custom"})]}),v.draft.type==="lark"?p.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[p.jsx(xt,{label:"App ID",value:String(((Pe=v.draft.options)==null?void 0:Pe.app_id)||""),onChange:te=>L(he=>({...he,options:{...he.options||{},app_id:te.target.value}})),placeholder:"cli_xxx"}),p.jsx(xt,{label:"App Secret",type:"password",value:String(((Tt=v.draft.options)==null?void 0:Tt.app_secret)||""),onChange:te=>L(he=>({...he,options:{...he.options||{},app_secret:te.target.value}}))}),p.jsx(xt,{label:"Verification token",value:String(((Be=v.draft.options)==null?void 0:Be.verification_token)||""),onChange:te=>L(he=>({...he,options:{...he.options||{},verification_token:te.target.value}}))}),p.jsx(xt,{label:"Encrypt key",value:String(((Qe=v.draft.options)==null?void 0:Qe.encrypt_key)||""),onChange:te=>L(he=>({...he,options:{...he.options||{},encrypt_key:te.target.value}}))}),p.jsxs("label",{className:"flex items-center gap-3 text-sm text-foreground",children:[p.jsx("input",{type:"checkbox",checked:((bt=v.draft.options)==null?void 0:bt.auto_approve)===!0,onChange:te=>L(he=>({...he,options:{...he.options||{},auto_approve:te.target.checked}}))}),"Auto-approve Lark users"]})]}):null,v.draft.type==="weixin"?p.jsxs("div",{className:"space-y-3",children:[p.jsx("div",{className:"rounded-lg border border-black/10 bg-black/[0.03] px-3 py-3 text-sm text-muted-foreground dark:border-white/[0.08] dark:bg-white/[0.04]",children:"WeChat does not need an App ID or secret. Save this platform, then generate a QR code and scan it to finish login."}),S!=null&&S.qrCodeUrl?p.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-black/10 p-4 dark:border-white/[0.08]",children:[p.jsx("div",{className:"rounded-lg border border-black/10 bg-white p-3",children:p.jsx(V_,{value:S.qrCodeUrl,size:176,includeMargin:!0})}),p.jsx(JE,{tone:S.status==="confirmed"?"success":S.status==="expired"?"danger":"warning",children:S.status||"wait"})]}):null,p.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[p.jsxs(_e,{className:"w-full sm:w-auto",variant:"secondary",onClick:()=>void V(),loading:N,children:[p.jsx(x2,{size:14})," Generate QR"]}),p.jsx(_e,{className:"w-full sm:w-auto",variant:"secondary",onClick:()=>void R(),loading:N,disabled:!(S!=null&&S.ticket),children:"Check status"})]})]}):null,v.draft.type!=="lark"&&v.draft.type!=="weixin"?p.jsx("div",{className:"rounded-lg border border-black/10 bg-black/[0.03] px-3 py-3 text-sm text-muted-foreground dark:border-white/[0.08] dark:bg-white/[0.04]",children:"This platform has no daily UI fields yet. Existing advanced options are preserved in config."}):null,p.jsxs("div",{className:"flex flex-col-reverse gap-2 border-t border-black/10 pt-4 dark:border-white/[0.08] sm:flex-row sm:justify-end",children:[p.jsx(_e,{className:"w-full sm:w-auto",variant:"secondary",onClick:()=>E(null),children:"Cancel"}),p.jsxs(_e,{className:"w-full sm:w-auto",onClick:z,children:[p.jsx(Cp,{size:14})," Apply"]})]})]}):null})]})}function Z6(){const{t:e}=Pr(),[t,r]=w.useState([]),[i,s]=w.useState(!0),o=w.useCallback(async()=>{try{s(!0);const c=await yd();r(c.projects||[])}finally{s(!1)}},[]);return w.useEffect(()=>{o();const c=()=>o();return window.addEventListener("cc:refresh",c),()=>window.removeEventListener("cc:refresh",c)},[o]),i&&t.length===0?p.jsx("div",{className:"flex items-center justify-center h-64 text-muted-foreground animate-pulse",children:"Loading..."}):t.length===0?p.jsx(xn,{message:e("projects.noProjects"),icon:Tu}):p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[p.jsx(Zi,{title:e("nav.projects"),description:"Project summaries with provider, platform, and session status."}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:t.map(c=>{var d;return p.jsx(Pn,{to:`/projects/${c.name}`,children:p.jsxs(Kt,{hover:!0,className:"h-full",children:[p.jsxs("div",{className:"flex items-start justify-between mb-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(I1,{size:18,className:"text-primary"}),p.jsx("h3",{className:"font-semibold text-foreground",children:c.name})]}),p.jsx(pm,{size:16,className:"text-muted-foreground/45"})]}),p.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[p.jsx(Nn,{variant:"info",children:c.agent_type}),(d=c.platforms)==null?void 0:d.map(h=>p.jsx(Nn,{children:h},h))]}),p.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[p.jsxs("span",{children:[c.sessions_count," ",e("nav.sessions").toLowerCase()]}),c.heartbeat_enabled&&p.jsxs("span",{className:"flex items-center gap-1 text-primary",children:[p.jsx(Np,{size:12})," ",e("heartbeat.title")]})]})]})},c.name)})})]})}const J6=e=>ot.get(`/projects/${e}/providers`),e8=(e,t)=>ot.post(`/projects/${e}/providers`,t),t8=(e,t)=>ot.delete(`/projects/${e}/providers/${t}`),n8=(e,t)=>ot.post(`/projects/${e}/providers/${t}/activate`),r8=e=>ot.get(`/projects/${e}/models`),a8=(e,t)=>ot.post(`/projects/${e}/model`,{model:t}),i8=e=>ot.get(`/projects/${e}/heartbeat`),s8=e=>ot.post(`/projects/${e}/heartbeat/pause`),l8=e=>ot.post(`/projects/${e}/heartbeat/resume`),o8=e=>ot.post(`/projects/${e}/heartbeat/run`),c8=(e,t)=>ot.post(`/projects/${e}/heartbeat/interval`,{minutes:t});function u8(){var q,$;const{t:e}=Pr(),{name:t}=Do(),[r,i]=w.useState("overview"),[s,o]=w.useState(null),[c,d]=w.useState([]),[h,f]=w.useState(""),[g,m]=w.useState(null),[x,v]=w.useState([]),[E,S]=w.useState(""),[_,N]=w.useState(!0),[T,C]=w.useState(!1),[j,D]=w.useState({name:"",api_key:"",base_url:"",model:""}),[A,P]=w.useState(!1),[K,X]=w.useState("30"),O=w.useCallback(async()=>{if(t)try{N(!0);const[I,W,Q,Y]=await Promise.allSettled([uL(t),J6(t),i8(t),r8(t)]);I.status==="fulfilled"&&o(I.value),W.status==="fulfilled"&&(d(W.value.providers||[]),f(W.value.active_provider||"")),Q.status==="fulfilled"&&m(Q.value),Y.status==="fulfilled"&&(v(Y.value.models||[]),S(Y.value.current||""))}finally{N(!1)}},[t]);w.useEffect(()=>{O();const I=()=>O();return window.addEventListener("cc:refresh",I),()=>window.removeEventListener("cc:refresh",I)},[O]);const U=async()=>{!t||!j.name||(await e8(t,j),C(!1),D({name:"",api_key:"",base_url:"",model:""}),O())},J=async()=>{t&&(await c8(t,parseInt(K)),P(!1),O())},ce=[{key:"overview",icon:QC},{key:"providers",icon:P1},{key:"heartbeat",icon:Np}];return _&&!s?p.jsx("div",{className:"flex items-center justify-center h-64 text-muted-foreground animate-pulse",children:"Loading..."}):p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[p.jsx(Zi,{title:t,description:"Project overview, providers, and heartbeat status. Low-frequency settings are no longer editable in the daily UI.",actions:p.jsx(Pn,{to:"/projects",children:p.jsxs(_e,{variant:"secondary",size:"sm",children:[p.jsx(Xu,{size:14})," Back"]})})}),s&&p.jsx(Nn,{variant:"info",children:s.agent_type}),p.jsx("div",{className:"flex gap-2",children:ce.map(({key:I,icon:W})=>p.jsxs("button",{onClick:()=>i(I),className:He("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-all",r===I?"bg-primary text-primary-foreground shadow-md":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:[p.jsx(W,{size:16}),e(`projects.tabs.${I}`)]},I))}),r==="overview"&&s&&p.jsxs("div",{className:"space-y-4",children:[p.jsx(ka,{title:e("projects.platforms"),children:p.jsx("div",{className:"flex flex-wrap gap-2",children:(q=s.platforms)==null?void 0:q.map(I=>p.jsxs(Nn,{variant:I.connected?"success":"danger",children:[p.jsx(j1,{size:12,className:"mr-1"})," ",I.type," ",I.connected?"✓":"✗"]},I.type))})}),p.jsxs(ka,{title:e("sessions.title"),children:[p.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.sessions_count," ",e("nav.sessions").toLowerCase()]}),(($=s.active_session_keys)==null?void 0:$.length)>0&&p.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:s.active_session_keys.map(I=>p.jsx(Nn,{variant:"default",children:I},I))})]})]}),r==="providers"&&p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex justify-between items-center",children:[p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e("providers.title")}),p.jsxs(_e,{size:"sm",onClick:()=>C(!0),children:[p.jsx(di,{size:14})," ",e("providers.add")]})]}),c.length===0?p.jsx(xn,{message:e("common.noData")}):p.jsx("div",{className:"space-y-2",children:c.map(I=>p.jsx(Kt,{children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"font-medium text-foreground",children:I.name}),I.active&&p.jsx(Nn,{variant:"success",children:e("providers.active")})]}),p.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[I.model," ",I.base_url?`· ${I.base_url}`:""]})]}),p.jsxs("div",{className:"flex gap-2",children:[!I.active&&p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>{n8(t,I.name).then(O)},children:[p.jsx(vo,{size:14})," ",e("providers.activate")]}),!I.active&&p.jsx(_e,{size:"sm",variant:"danger",onClick:()=>{t8(t,I.name).then(O)},children:p.jsx(Jr,{size:14})})]})]})},I.name))}),x.length>0&&p.jsxs(Kt,{children:[p.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:e("providers.models")}),p.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(I=>p.jsx("button",{onClick:()=>{a8(t,I).then(O)},className:He("px-3 py-1.5 rounded-lg text-xs font-medium transition-all",I===E?"bg-primary/15 text-primary border border-primary/30":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:I},I))})]}),p.jsx(Lr,{open:T,onClose:()=>C(!1),title:e("providers.add"),children:p.jsxs("div",{className:"space-y-3",children:[p.jsx(xt,{label:e("providers.name"),value:j.name,onChange:I=>D({...j,name:I.target.value})}),p.jsx(xt,{label:"API Key",type:"password",value:j.api_key,onChange:I=>D({...j,api_key:I.target.value})}),p.jsx(xt,{label:e("providers.baseUrl"),value:j.base_url,onChange:I=>D({...j,base_url:I.target.value}),placeholder:"https://api.example.com"}),p.jsx(xt,{label:e("providers.model"),value:j.model,onChange:I=>D({...j,model:I.target.value})}),p.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>C(!1),children:e("common.cancel")}),p.jsx(_e,{onClick:U,children:e("providers.add")})]})]})})]}),r==="heartbeat"&&p.jsxs("div",{className:"space-y-4",children:[g?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[p.jsxs(Kt,{children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:e("heartbeat.status")}),p.jsx("p",{className:"text-lg font-bold text-foreground mt-1",children:g.paused?e("heartbeat.paused"):e("heartbeat.running")})]}),p.jsxs(Kt,{children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:e("heartbeat.interval")}),p.jsxs("p",{className:"text-lg font-bold text-foreground mt-1",children:[g.interval_mins,"m"]})]}),p.jsxs(Kt,{children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:e("heartbeat.runCount")}),p.jsx("p",{className:"text-lg font-bold text-foreground mt-1",children:g.run_count})]}),p.jsxs(Kt,{children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:e("heartbeat.errorCount")}),p.jsx("p",{className:"text-lg font-bold text-foreground mt-1",children:g.error_count})]})]}),p.jsx(Kt,{children:p.jsxs("div",{className:"space-y-2 text-sm",children:[p.jsxs("p",{className:"text-muted-foreground",children:[e("heartbeat.lastRun"),": ",p.jsx("span",{className:"text-foreground",children:Zs(g.last_run)})]}),p.jsxs("p",{className:"text-muted-foreground",children:[e("heartbeat.skippedBusy"),": ",p.jsx("span",{className:"text-foreground",children:g.skipped_busy})]}),g.last_error&&p.jsx("p",{className:"text-destructive",children:g.last_error})]})}),p.jsxs("div",{className:"flex gap-2",children:[g.paused?p.jsxs(_e,{onClick:()=>{l8(t).then(O)},children:[p.jsx(D1,{size:14})," ",e("heartbeat.resume")]}):p.jsxs(_e,{variant:"secondary",onClick:()=>{s8(t).then(O)},children:[p.jsx(h2,{size:14})," ",e("heartbeat.pause")]}),p.jsxs(_e,{variant:"secondary",onClick:()=>{o8(t).then(O)},children:[p.jsx(Np,{size:14})," ",e("heartbeat.trigger")]}),p.jsxs(_e,{variant:"secondary",onClick:()=>P(!0),children:[p.jsx(mm,{size:14})," ",e("heartbeat.setInterval")]})]})]}):p.jsx(xn,{message:e("common.noData")}),p.jsx(Lr,{open:A,onClose:()=>P(!1),title:e("heartbeat.setInterval"),children:p.jsxs("div",{className:"space-y-3",children:[p.jsx(xt,{label:`${e("heartbeat.interval")} (min)`,type:"number",value:K,onChange:I=>X(I.target.value)}),p.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>P(!1),children:e("common.cancel")}),p.jsx(_e,{onClick:J,children:e("common.save")})]})]})})]})]})}function d8(e,t){if(!e)return"";const r=Date.now()-new Date(e).getTime(),i=Math.floor(r/6e4);if(i<1)return t("sessions.justNow");if(i<60)return`${i}m`;const s=Math.floor(i/60);return s<24?`${s}h`:`${Math.floor(s/24)}d`}function f8(){const{t:e}=Pr(),[t,r]=w.useState([]),[i,s]=w.useState([]),[o,c]=w.useState(""),[d,h]=w.useState(!0),f=w.useCallback(async()=>{h(!0);try{const{projects:m}=await yd();s(m||[]);const x=await Promise.all((m||[]).map(async v=>{try{const{sessions:E}=await D_(v.name);return{project:v.name,sessions:E||[]}}catch{return{project:v.name,sessions:[]}}}));r(x)}finally{h(!1)}},[]);w.useEffect(()=>{f();const m=()=>f();return window.addEventListener("cc:refresh",m),()=>window.removeEventListener("cc:refresh",m)},[f]);const g=w.useMemo(()=>(o?t.filter(x=>x.project===o):t).flatMap(x=>x.sessions.map(v=>({...v,_project:x.project}))).sort((x,v)=>(v.updated_at||v.created_at||"").localeCompare(x.updated_at||x.created_at||"")),[t,o]);return d&&t.length===0?p.jsx("div",{className:"flex items-center justify-center h-64 text-muted-foreground animate-pulse",children:"Loading..."}):p.jsxs("div",{className:"space-y-4 animate-fade-in",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(A1,{size:16,className:"text-muted-foreground"}),p.jsxs(Na,{value:o,onChange:m=>c(m.target.value),className:"w-auto min-w-48",children:[p.jsx("option",{value:"",children:e("sessions.allProjects")}),i.map(m=>p.jsx("option",{value:m.name,children:m.name},m.name))]}),p.jsxs("span",{className:"text-xs text-muted-foreground",children:[g.length," ",e("nav.sessions").toLowerCase()]})]}),g.length===0?p.jsx(xn,{message:e("sessions.noSessions"),icon:_a}):p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3",children:g.map(m=>p.jsx(Pn,{to:`/sessions/${encodeURIComponent(m._project)}/${encodeURIComponent(m.id)}`,children:p.jsxs(Kt,{hover:!0,className:"group relative h-full p-4",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[p.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[p.jsx(_a,{size:14,className:m.live?"text-primary shrink-0":"text-muted-foreground shrink-0"}),p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:m.name||m.user_name||m.id.slice(0,8)}),m.live&&p.jsx(qs,{size:5,className:"fill-primary text-primary shrink-0"})]}),p.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0 mt-0.5",children:d8(m.updated_at||m.created_at,e)})]}),p.jsx("div",{className:"mb-2.5 min-h-[2.5rem]",children:m.last_message?p.jsxs("p",{className:"text-xs text-muted-foreground line-clamp-2 leading-relaxed",children:[m.last_message.role==="user"?p.jsx(ed,{size:10,className:"inline mr-1 -mt-0.5 opacity-60"}):p.jsx(Qu,{size:10,className:"inline mr-1 -mt-0.5 opacity-60"}),m.last_message.content.replace(/\n/g," ").slice(0,100)]}):p.jsx("p",{className:"text-xs text-muted-foreground italic",children:e("sessions.noMessages")})}),p.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[p.jsx(Nn,{children:m._project}),m.platform&&p.jsx(Nn,{variant:"info",children:m.platform}),p.jsxs("span",{className:"text-[10px] text-muted-foreground ml-auto",children:[m.history_count," msgs"]})]})]})},`${m._project}-${m.id}`))})]})}function h8(){var S;const{t:e}=Pr(),{project:t,id:r}=Do(),[i,s]=w.useState(null),[o,c]=w.useState(""),[d,h]=w.useState(!1),[f,g]=w.useState(!0),m=w.useRef(null),x=w.useCallback(async()=>{if(!(!t||!r))try{g(!0);const _=await j_(t,r,200);s(_)}finally{g(!1)}},[t,r]);w.useEffect(()=>{x()},[x]),w.useEffect(()=>{var _;(_=m.current)==null||_.scrollIntoView({behavior:"smooth"})},[i==null?void 0:i.history]);const v=async()=>{if(!o.trim()||!t||!i)return;const _=o.trim();c(""),h(!0);try{await om(t,{session_key:i.session_key,message:_}),setTimeout(x,1500)}finally{h(!1)}},E=_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),v())};return f&&!i?p.jsx("div",{className:"flex items-center justify-center h-64 text-muted-foreground animate-pulse",children:"Loading..."}):p.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)] animate-fade-in",children:[p.jsxs("div",{className:"flex items-center justify-between pb-4 border-b",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Pn,{to:"/sessions",className:"p-2 rounded-md hover:bg-accent/10 transition-colors",children:p.jsx(Xu,{size:18,className:"text-muted-foreground"})}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("h2",{className:"text-lg font-semibold text-foreground",children:(i==null?void 0:i.name)||r}),i!=null&&i.live?p.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-primary bg-primary/10 px-1.5 py-0.5 rounded-full",children:[p.jsx(qs,{size:5,className:"fill-current"})," live"]}):p.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded-full",children:[p.jsx(Tp,{size:9})," ",e("sessions.offline")]})]}),p.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[p.jsx(Nn,{children:t}),(i==null?void 0:i.platform)&&p.jsx(Nn,{variant:"info",children:i.platform}),p.jsx("span",{className:"text-xs text-muted-foreground",children:i==null?void 0:i.session_key})]})]})]}),p.jsxs(_e,{size:"sm",variant:"ghost",onClick:x,children:[p.jsx(L1,{size:14})," ",e("common.refresh")]})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto py-6 space-y-5",children:[(!(i!=null&&i.history)||i.history.length===0)&&p.jsx("p",{className:"text-center text-sm text-muted-foreground py-12",children:e("sessions.noMessages")}),(S=i==null?void 0:i.history)==null?void 0:S.map((_,N)=>{const T=_.role==="user";return p.jsxs("div",{className:He("flex gap-3",T?"justify-end":"justify-start"),children:[!T&&p.jsx("div",{className:"w-8 h-8 rounded-md bg-primary/10 flex items-center justify-center shrink-0 mt-1",children:p.jsx(Qu,{size:16,className:"text-primary"})}),p.jsx("div",{className:He("rounded-lg px-5 py-3.5 text-sm",T?"max-w-[70%] bg-primary text-primary-foreground rounded-br-md":"max-w-[85%] bg-card border text-card-foreground rounded-bl-md shadow-sm"),children:p.jsx(gg,{content:_.content,isUser:T})}),T&&p.jsx("div",{className:"w-8 h-8 rounded-md bg-muted flex items-center justify-center shrink-0 mt-1",children:p.jsx(ed,{size:16,className:"text-muted-foreground"})})]},N)}),p.jsx("div",{ref:m})]}),p.jsx("div",{className:"border-t pt-4",children:i!=null&&i.live?p.jsxs("div",{className:"flex gap-3",children:[p.jsx(xt,{value:o,onChange:_=>c(_.target.value),onKeyDown:E,placeholder:e("sessions.messageInput"),className:"flex-1",disabled:d}),p.jsx(_e,{onClick:v,disabled:d||!o.trim(),size:"icon","aria-label":e("sessions.messageInput"),children:d?p.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):p.jsx(gm,{size:18})})]}):p.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground bg-muted rounded-lg",children:[p.jsx(Tp,{size:14}),p.jsx("span",{children:e("sessions.notLiveHint")})]})})]})}const p8=e=>Tj(),m8=e=>Aj(e),g8=(e,t)=>Rj(e,t),b8=e=>Oj(e),y8=e=>Mj(e),x8=()=>Ym().then(e=>e.workspaces),Cu={workspaceId:"",executionMode:"same-thread",triggerType:"cron",cronExpr:"0 9 * * *",runAt:"",promptTemplate:"",description:"",chatId:"",platformUserId:"",threadId:"",enabled:!0};function v8(e){return e?{workspaceId:e.workspaceId,executionMode:e.executionMode,triggerType:e.triggerType,cronExpr:e.cronExpr||"0 9 * * *",runAt:e.runAt?String(e.runAt).slice(0,16):"",promptTemplate:e.promptTemplate,description:e.description,chatId:e.route.channelId,platformUserId:e.route.participantId||"",threadId:e.route.threadId||"",enabled:e.enabled}:Cu}function w8(e){return{workspaceId:e.workspaceId,platform:"lark",route:{type:"channel.chat",channelId:e.chatId||e.workspaceId||"default",participantId:e.platformUserId||"default",...e.threadId?{threadId:e.threadId}:{}},executionMode:e.executionMode||"same-thread",triggerType:e.triggerType,...e.triggerType==="cron"?{cronExpr:e.cronExpr,runAt:void 0}:{runAt:new Date(e.runAt).toISOString(),cronExpr:void 0},promptTemplate:e.promptTemplate,description:e.description,enabled:e.enabled}}function E8(){const{t:e}=Pr(),[t,r]=w.useState([]),[i,s]=w.useState([]),[o,c]=w.useState(!0),[d,h]=w.useState(!1),[f,g]=w.useState(!1),[m,x]=w.useState(null),[v,E]=w.useState(Cu),S=w.useMemo(()=>i.map(A=>p.jsx("option",{value:A.id,children:A.name},A.id)),[i]),_=w.useCallback(async()=>{c(!0);try{const[A,P]=await Promise.all([p8(),x8()]);r(A.jobs||[]),s(P),E(K=>K.workspaceId||P.length===0?K:{...K,workspaceId:P[0].id})}finally{c(!1)}},[]);w.useEffect(()=>{_();const A=Vm(P=>{(P.type==="scheduler.job.updated"||P.type==="scheduler.run.updated")&&_()});return()=>A()},[_]);const N=()=>{var A;x(null),E({...Cu,workspaceId:((A=i[0])==null?void 0:A.id)||""}),h(!0)},T=A=>{x(A),E(v8(A)),h(!0)},C=async()=>{if(!(!v.workspaceId||!v.promptTemplate.trim())&&!(v.triggerType==="once"&&!v.runAt)){g(!0);try{const A=w8(v);m?await g8(m.id,A):await m8(A),h(!1),x(null),E(Cu),await _()}finally{g(!1)}}},j=async A=>{confirm(e("common.confirmDelete"))&&(await b8(A),await _())},D=async A=>{await y8(A),await _()};return o&&t.length===0?p.jsx("div",{className:"flex items-center justify-center h-64 text-gray-400 animate-pulse",children:e("common.loading")}):p.jsxs("div",{className:"space-y-4 animate-fade-in",children:[p.jsx(Zi,{title:e("cron.title"),description:"Create simple scheduled prompts for a workspace.",actions:p.jsxs(_e,{onClick:N,children:[p.jsx(di,{size:16})," ",e("cron.add")]})}),t.length===0?p.jsx(xn,{message:e("cron.noJobs"),icon:mm}):p.jsx("div",{className:"space-y-3",children:t.map(A=>p.jsx(Kt,{children:p.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p.jsxs("div",{className:"flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[p.jsx("span",{className:"font-medium text-gray-900 dark:text-white text-sm",children:A.description||A.id}),p.jsx(Nn,{variant:A.enabled?"success":"default",children:A.enabled?e("cron.enabled"):"disabled"}),p.jsx(Nn,{variant:"default",children:A.triggerType}),p.jsx(Nn,{variant:"default",children:A.platform}),A.lastStatus&&p.jsx(Nn,{variant:A.lastStatus==="failed"?"danger":"default",children:A.lastStatus})]}),p.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-500 dark:text-gray-400 mt-2",children:[p.jsxs("span",{children:[p.jsx("strong",{children:"Workspace:"})," ",A.workspaceId]}),p.jsxs("span",{children:[p.jsx("strong",{children:"Execution:"})," ",A.executionMode]}),p.jsxs("span",{children:[p.jsx("strong",{children:"Route:"})," ",A.route.channelId," / ",A.route.participantId]}),p.jsxs("span",{children:[p.jsxs("strong",{children:[A.triggerType==="cron"?e("cron.expression"):"Run at",":"]})," ",A.triggerType==="cron"?A.cronExpr:Zs(A.runAt||"")]}),A.route.threadId&&p.jsxs("span",{children:[p.jsx("strong",{children:"Thread:"})," ",A.route.threadId]}),A.lastRunAt&&p.jsxs("span",{children:[p.jsxs("strong",{children:[e("cron.lastRun"),":"]})," ",Zs(A.lastRunAt)]})]}),p.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 mt-2 whitespace-pre-wrap",children:A.promptTemplate}),A.lastError&&p.jsx("p",{className:"text-xs text-red-500 mt-2",children:A.lastError})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>void D(A.id),children:p.jsx(D1,{size:14})}),p.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>T(A),children:p.jsx(wo,{size:14})}),p.jsx(_e,{size:"sm",variant:"danger",onClick:()=>void j(A.id),children:p.jsx(Jr,{size:14})})]})]})},A.id))}),p.jsx(Lr,{open:d,onClose:()=>h(!1),title:m?"Edit scheduler job":e("cron.add"),children:p.jsxs("div",{className:"space-y-3",children:[p.jsxs(Na,{label:"Workspace",value:v.workspaceId,onChange:A=>E({...v,workspaceId:A.target.value}),children:[p.jsx("option",{value:"",children:"Select workspace"}),S]}),p.jsxs(Na,{label:"Schedule type",value:v.triggerType,onChange:A=>E({...v,triggerType:A.target.value}),children:[p.jsx("option",{value:"cron",children:"Repeating"}),p.jsx("option",{value:"once",children:"One time"})]}),v.triggerType==="cron"?p.jsx(xt,{label:e("cron.expression"),value:v.cronExpr,onChange:A=>E({...v,cronExpr:A.target.value}),placeholder:"0 9 * * *"}):p.jsx(xt,{label:"Run at",type:"datetime-local",value:v.runAt,onChange:A=>E({...v,runAt:A.target.value})}),p.jsx(xt,{label:e("cron.description"),value:v.description,onChange:A=>E({...v,description:A.target.value})}),p.jsx(bd,{label:e("cron.prompt"),value:v.promptTemplate,onChange:A=>E({...v,promptTemplate:A.target.value}),rows:4,placeholder:"Summarize today's blockers and post a status update."}),p.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300",children:[p.jsx("input",{type:"checkbox",checked:v.enabled,onChange:A=>E({...v,enabled:A.target.checked})}),e("cron.enabled")]}),p.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>h(!1),children:e("common.cancel")}),p.jsx(_e,{onClick:()=>void C(),disabled:f,children:e(m?"common.save":"cron.add")})]})]})})]})}const S8=()=>ot.get("/status"),_8=e=>ot.post("/restart",e),k8=()=>ot.post("/reload"),N8=e=>ot.get("/logs",e);function C8(e){return e==="api_ready"?"success":e==="error"?"danger":e==="starting"?"warning":"neutral"}function T8(){const{t:e}=Pr(),[t,r]=w.useState(null),[i,s]=w.useState(null),[o,c]=w.useState(""),[d,h]=w.useState(""),[f,g]=w.useState(!0),[m,x]=w.useState(!1),[v,E]=w.useState(""),S=w.useCallback(async()=>{g(!0);try{const[j,D]=await Promise.allSettled([Wm(),iL()]);j.status==="fulfilled"&&(r(j.value),c(j.value.settings.knowledge.baseUrl||""),h(j.value.settings.knowledge.baseUrl||"")),D.status==="fulfilled"&&s(D.value)}finally{g(!1)}},[]);w.useEffect(()=>{S()},[S]);const _=async()=>{if(confirm(e("system.restartConfirm")))try{await _8(),E(e("common.success")),await S()}catch(j){E(j.message)}},N=async()=>{if(confirm(e("system.reloadConfirm")))try{await k8(),E(e("common.success")),await S()}catch(j){E(j.message)}},T=async()=>{x(!0);try{const j=await aL({knowledge:{baseUrl:o,authMode:(t==null?void 0:t.settings.knowledge.authMode)||"none",token:(t==null?void 0:t.settings.knowledge.token)||"",headerName:(t==null?void 0:t.settings.knowledge.headerName)||"X-API-Key",defaultCollection:(t==null?void 0:t.settings.knowledge.defaultCollection)||"personal_knowledge"}});r(D=>D&&{...D,settings:j}),h(j.knowledge.baseUrl||""),E(e("common.success"))}catch(j){E(j.message)}finally{x(!1)}},C=o!==d;return p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[p.jsx(Zi,{title:e("nav.system"),description:"Runtime health, logs, and plugin diagnostics. Advanced config is available read-only from the diagnostics drawer.",actions:p.jsxs(p.Fragment,{children:[p.jsxs(_e,{variant:"secondary",onClick:N,children:[p.jsx(Zu,{size:16})," ",e("system.reload")]}),p.jsxs(_e,{variant:"danger",onClick:_,children:[p.jsx(E2,{size:16})," ",e("system.restart")]}),p.jsx(Pn,{to:"/system/logs",children:p.jsxs(_e,{variant:"secondary",children:[p.jsx(N2,{size:16})," ",e("system.logs")]})})]})}),v?p.jsx("div",{role:"status",className:"rounded-lg border border-primary/20 bg-primary/10 px-4 py-3 text-sm text-primary",children:v}):null,p.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[p.jsxs(ka,{title:"Runtime",description:f?"Loading...":"Local service status.",children:[p.jsx(JE,{tone:C8(t==null?void 0:t.phase),children:(t==null?void 0:t.phase)||"unknown"}),p.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:t!=null&&t.pendingRestart?"Restart required to apply saved changes.":"No pending restart."})]}),p.jsx(ka,{title:"Config",description:"Active config file location.",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(LC,{size:18,className:"mt-0.5 text-primary"}),p.jsx("p",{className:"break-all font-mono text-xs leading-5 text-muted-foreground",children:(t==null?void 0:t.settings.configPath)||(t==null?void 0:t.configFile.path)||"-"})]})}),p.jsxs(ka,{title:"Plugins",description:"Health summary only.",children:[p.jsx("p",{className:"text-2xl font-semibold text-foreground",children:i?`${i.enabledPluginCount}/${i.pluginCount}`:"-"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"enabled plugins"})]})]}),p.jsx(ka,{title:"Knowledge",description:"System-wide knowledge API connection.",actions:p.jsxs(_e,{size:"sm",onClick:()=>void T(),loading:m,disabled:!C&&!m,children:[p.jsx(Cp,{size:14})," Save"]}),children:p.jsx(xt,{label:"Knowledge base URL",value:o,onChange:j=>c(j.target.value),placeholder:"http://127.0.0.1:16007"})}),p.jsx(ka,{title:e("system.plugins"),description:"Plugin state is read-only in the daily UI. Use backend config for advanced changes.",children:i?i.plugins.length===0?p.jsx("div",{className:"py-8 text-sm text-muted-foreground",children:"No plugins registered."}):p.jsx("div",{className:"divide-y divide-border",children:i.plugins.map(j=>p.jsxs("div",{className:"flex items-start justify-between gap-4 py-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(j1,{size:15,className:"text-muted-foreground"}),p.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:j.pluginId})]}),p.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:j.health.summary||j.manifest.provides.join(", ")||"No declared capabilities"})]}),p.jsx(Nn,{variant:j.health.status==="healthy"?"success":j.health.status==="failed"?"danger":"warning",children:j.health.status})]},j.pluginId))}):p.jsx("div",{className:"py-8 text-sm text-muted-foreground",children:"Loading..."})})]})}const A8={debug:"text-gray-400",info:"text-blue-400",warn:"text-amber-400",error:"text-red-400"},R8={debug:"default",info:"info",warn:"warning",error:"danger"};function O8(){const{t:e}=Pr(),[t,r]=w.useState([]),[i,s]=w.useState("info"),[o,c]=w.useState("100"),[d,h]=w.useState(!0),f=w.useCallback(async()=>{h(!0);try{const g=await N8({level:i,limit:o});r(g.entries||[])}finally{h(!1)}},[i,o]);return w.useEffect(()=>{f()},[f]),p.jsxs("div",{className:"space-y-4 animate-fade-in",children:[p.jsx(Zi,{title:e("system.logs"),description:"Filtered runtime logs for troubleshooting.",actions:p.jsx(Pn,{to:"/system",children:p.jsxs(_e,{variant:"secondary",size:"sm",children:[p.jsx(Xu,{size:14})," ",e("nav.system")]})})}),p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(A1,{size:14,className:"text-muted-foreground"}),p.jsxs(Na,{value:i,onChange:g=>s(g.target.value),className:"w-auto",children:[p.jsx("option",{value:"debug",children:"Debug"}),p.jsx("option",{value:"info",children:"Info"}),p.jsx("option",{value:"warn",children:"Warn"}),p.jsx("option",{value:"error",children:"Error"})]})]}),p.jsxs(Na,{value:o,onChange:g=>c(g.target.value),className:"w-auto",children:[p.jsx("option",{value:"50",children:"50"}),p.jsx("option",{value:"100",children:"100"}),p.jsx("option",{value:"500",children:"500"}),p.jsx("option",{value:"1000",children:"1000"})]}),p.jsx(_e,{size:"sm",variant:"secondary",onClick:f,children:e("common.refresh")})]}),p.jsx(Kt,{children:d?p.jsx("div",{className:"text-muted-foreground animate-pulse text-sm",children:"Loading..."}):t.length===0?p.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:e("common.noData")}):p.jsx("div",{className:"space-y-1 max-h-[65vh] overflow-y-auto font-mono text-xs",children:t.map((g,m)=>{var x;return p.jsxs("div",{className:"flex items-start gap-3 py-1.5 border-b last:border-0",children:[p.jsx("span",{className:"text-muted-foreground shrink-0 w-36",children:(x=g.time)==null?void 0:x.slice(0,19)}),p.jsx(Nn,{variant:R8[g.level]||"default",children:g.level}),p.jsx("span",{className:`${A8[g.level]||"text-gray-500"} flex-1`,children:g.message})]},m)})})})]})}function o1(e){return e==="success"?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-900/30 dark:bg-violet-950/20 dark:text-violet-300":e==="warning"?"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/30 dark:bg-amber-950/20 dark:text-amber-300":"border-red-200 bg-red-50 text-red-700 dark:border-red-900/30 dark:bg-red-950/20 dark:text-red-300"}function M8(e){switch(e){case"file":return"bg-blue-500";case"spark":return"bg-amber-500";case"screen":return"bg-fuchsia-500";default:return"bg-indigo-500"}}function D8(e){return e.split("/").length-1}function j8(){const[e,t]=w.useState(!0),[r,i]=w.useState([]),[s,o]=w.useState([]),[c,d]=w.useState(null),[h,f]=w.useState(""),[g,m]=w.useState(!1),[x,v]=w.useState(!1),[E,S]=w.useState(!1),[_,N]=w.useState(""),[T,C]=w.useState(""),[j,D]=w.useState(""),[A,P]=w.useState(null),[K,X]=w.useState(null),O=w.useCallback(async()=>{t(!0);try{const[Y,L,z]=await Promise.all([Wp(),VE(),YE()]);m(!!Y.baseUrl),i(L.folders||[]),o(z.bases||[])}catch(Y){P({tone:"error",message:Y instanceof Error?Y.message:String(Y)})}finally{t(!1)}},[]);w.useEffect(()=>{O()},[O]);const U=w.useMemo(()=>{if(!c)return null;const Y=r.find(z=>z.id===c);if(!Y)return null;const L=new Set([Y.id]);return r.forEach(z=>{z.path.startsWith(`${Y.path}/`)&&L.add(z.id)}),L},[r,c]),J=w.useMemo(()=>{const Y=h.trim().toLowerCase();return s.filter(L=>(U?U.has(L.folderId||""):!0)?Y?[L.name,L.description,L.creatorName].join(" ").toLowerCase().includes(Y):!0:!1)},[s,U,h]),ce=w.useCallback(async()=>{if(!_.trim()){P({tone:"warning",message:"Folder name is required."});return}X("folder");try{await Pj({name:_.trim(),parentId:c}),N(""),v(!1),P({tone:"success",message:"Folder created."}),await O()}catch(Y){P({tone:"error",message:Y instanceof Error?Y.message:String(Y)})}finally{X(null)}},[_,O,c]),q=w.useCallback(async()=>{if(!T.trim()){P({tone:"warning",message:"Knowledge base name is required."});return}X("base");try{await Fj({name:T.trim(),description:j.trim(),folderId:c}),C(""),D(""),S(!1),P({tone:"success",message:"Knowledge base created."}),await O()}catch(Y){P({tone:"error",message:Y instanceof Error?Y.message:String(Y)})}finally{X(null)}},[j,T,O,c]),$=w.useCallback(async Y=>{var z;const L=(z=window.prompt("Rename folder",Y.name))==null?void 0:z.trim();if(!(!L||L===Y.name))try{await Bj(Y.id,{name:L}),P({tone:"success",message:"Folder updated."}),await O()}catch(V){P({tone:"error",message:V instanceof Error?V.message:String(V)})}},[O]),I=w.useCallback(async Y=>{if(window.confirm(`Delete folder "${Y.name}"?`))try{await Uj(Y.id),c===Y.id&&d(null),P({tone:"success",message:"Folder deleted."}),await O()}catch(L){P({tone:"error",message:L instanceof Error?L.message:String(L)})}},[O,c]),W=w.useCallback(async Y=>{var V,R;const L=(V=window.prompt("Knowledge base name",Y.name))==null?void 0:V.trim();if(!L)return;const z=((R=window.prompt("Description",Y.description))==null?void 0:R.trim())??Y.description;try{await Hj(Y.id,{name:L,description:z}),P({tone:"success",message:"Knowledge base updated."}),await O()}catch(ee){P({tone:"error",message:ee instanceof Error?ee.message:String(ee)})}},[O]),Q=w.useCallback(async Y=>{if(window.confirm(`Delete knowledge base "${Y.name}"?`))try{await Kj(Y.id),P({tone:"success",message:"Knowledge base deleted."}),await O()}catch(L){P({tone:"error",message:L instanceof Error?L.message:String(L)})}},[O]);return p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[A&&p.jsx("div",{className:`rounded-xl border px-4 py-3 text-sm ${o1(A.tone)}`,children:A.message}),!g&&!e&&p.jsx("div",{className:`rounded-2xl border px-5 py-4 ${o1("warning")}`,children:p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:"Knowledge search is not configured yet."}),p.jsx("p",{className:"mt-1 text-sm opacity-90",children:"Add the ai_vector base URL in System settings before uploading files or running retrieval."})]}),p.jsx(Pn,{to:"/system",children:p.jsxs(_e,{variant:"secondary",children:[p.jsx(Oo,{size:14})," Open System Settings"]})})]})}),p.jsxs("div",{className:"grid grid-cols-1 gap-6 xl:grid-cols-[300px_minmax(0,1fr)]",children:[p.jsxs(Kt,{className:"p-0 overflow-hidden",children:[p.jsx("div",{className:"border-b border-gray-200/80 px-5 py-4 dark:border-white/[0.08]",children:p.jsxs("div",{className:"flex items-center justify-between gap-3",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"知识库"}),p.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"创建目录并管理知识库分类。"})]}),p.jsxs(_e,{size:"sm",variant:"secondary",onClick:()=>v(!0),children:[p.jsx(UC,{size:14})," 文件夹"]})]})}),p.jsx("div",{className:"px-5 py-4",children:p.jsxs("button",{type:"button",onClick:()=>d(null),className:He("flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",c?"hover:bg-gray-100/80 text-gray-600 dark:text-gray-300 dark:hover:bg-white/[0.06]":"bg-accent/10 text-gray-900 ring-1 ring-accent/30 dark:text-white"),children:[p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Oh,{size:16}),"全部知识库"]}),p.jsx("span",{className:"text-xs opacity-70",children:s.length})]})}),p.jsx("div",{className:"max-h-[70vh] overflow-y-auto px-3 pb-4",children:r.length===0?p.jsx(xn,{message:"还没有目录,先创建一个文件夹吧。",icon:Oh}):p.jsx("div",{className:"space-y-1",children:r.map(Y=>{const L=Y.id===c;return p.jsx("div",{className:He("group rounded-xl px-2 py-1",L?"bg-accent/10 ring-1 ring-accent/25":"hover:bg-gray-100/80 dark:hover:bg-white/[0.04]"),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("button",{type:"button",onClick:()=>d(Y.id),className:"flex min-w-0 flex-1 items-center gap-2 rounded-lg px-2 py-2 text-left",style:{paddingLeft:`${8+D8(Y.path)*18}px`},children:[p.jsx(T1,{size:14,className:"text-gray-400"}),p.jsx(Oh,{size:15,className:"text-amber-500"}),p.jsx("span",{className:"truncate text-sm text-gray-800 dark:text-gray-100",children:Y.name})]}),p.jsx("button",{type:"button",onClick:()=>void $(Y),className:"rounded-md p-1 text-gray-400 transition hover:bg-gray-200/70 hover:text-gray-700 dark:hover:bg-white/[0.08] dark:hover:text-white","aria-label":`Rename ${Y.name}`,children:p.jsx(wo,{size:14})}),p.jsx("button",{type:"button",onClick:()=>void I(Y),className:"rounded-md p-1 text-gray-400 transition hover:bg-red-500/10 hover:text-red-500","aria-label":`Delete ${Y.name}`,children:p.jsx(Jr,{size:14})})]})},Y.id)})})})]}),p.jsxs("div",{className:"space-y-5",children:[p.jsx(Kt,{children:p.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"知识库列表"}),p.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"目录筛选、本地搜索,以及知识库卡片概览都在这里。"})]}),p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row",children:[p.jsxs("div",{className:"relative min-w-[260px]",children:[p.jsx(Ju,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),p.jsx(xt,{value:h,onChange:Y=>f(Y.target.value),placeholder:"搜索名称、描述或创建者",className:"pl-9"})]}),p.jsxs(_e,{variant:"secondary",onClick:()=>S(!0),children:[p.jsx(di,{size:14})," 创建知识库"]})]})]})}),e?p.jsx(Kt,{children:p.jsx("div",{className:"py-16 text-center text-sm text-gray-400",children:"正在加载知识库…"})}):J.length===0?p.jsx(Kt,{children:p.jsx(xn,{message:h?"没有匹配的知识库。":"还没有知识库,先创建一个开始上传文档。",icon:R1})}):p.jsx("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2 2xl:grid-cols-3",children:J.map(Y=>p.jsxs(Kt,{className:"group relative overflow-hidden border border-gray-200/90 bg-white/90 p-6 shadow-sm hover:border-accent/30 hover:shadow-xl hover:shadow-black/5 dark:border-white/[0.08] dark:bg-[rgba(0,0,0,0.55)]",children:[p.jsxs("div",{className:"absolute right-4 top-4 flex gap-1",children:[p.jsx("button",{type:"button",onClick:()=>void W(Y),className:"rounded-lg p-2 text-gray-400 hover:bg-gray-100/90 hover:text-gray-700 dark:hover:bg-white/[0.08] dark:hover:text-white",children:p.jsx(wo,{size:15})}),p.jsx("button",{type:"button",onClick:()=>void Q(Y),className:"rounded-lg p-2 text-gray-400 hover:bg-red-500/10 hover:text-red-500",children:p.jsx(Jr,{size:15})})]}),p.jsxs(Pn,{to:`/knowledge/${encodeURIComponent(Y.id)}`,className:"block space-y-5",children:[p.jsxs("div",{className:"flex items-start gap-4",children:[p.jsx("div",{className:`mt-1 flex h-12 w-12 items-center justify-center rounded-2xl text-white shadow-lg ${M8(Y.icon)}`,children:p.jsx(C1,{size:22})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("h3",{className:"truncate pr-8 text-xl font-semibold text-gray-900 dark:text-white",children:Y.name}),p.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:["创建者: ",Y.creatorName||"系统管理员"]})]})]}),p.jsx("div",{className:"min-h-[72px] text-base leading-7 text-gray-600 dark:text-gray-300",children:Y.description||"这个知识库还没有描述,点击进入后可以上传文件并开始检索。"}),p.jsxs("div",{className:"flex items-center gap-6 text-sm font-medium text-gray-700 dark:text-gray-200",children:[p.jsxs("span",{children:[Y.fileCount," 文档数"]}),p.jsxs("span",{children:[(Y.wordCount/1e3).toFixed(Y.wordCount>0?1:0),"k 字符"]})]}),p.jsxs("div",{className:"text-xs text-gray-400 dark:text-gray-500",children:["更新于 ",Zs(Y.updatedAt)]})]})]},Y.id))})]})]}),p.jsx(Lr,{open:x,onClose:()=>v(!1),title:"创建文件夹",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(xt,{label:"文件夹名称",value:_,onChange:Y=>N(Y.target.value),placeholder:"例如:产品文档"}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>v(!1),children:"取消"}),p.jsx(_e,{onClick:()=>void ce(),loading:K==="folder",children:"创建"})]})]})}),p.jsx(Lr,{open:E,onClose:()=>S(!1),title:"创建知识库",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(xt,{label:"名称",value:T,onChange:Y=>C(Y.target.value),placeholder:"例如:运营文档库"}),p.jsx(bd,{label:"描述",rows:4,value:j,onChange:Y=>D(Y.target.value),placeholder:"一句话说明这个知识库主要收录什么内容"}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(_e,{variant:"secondary",onClick:()=>S(!1),children:"取消"}),p.jsx(_e,{onClick:()=>void q(),loading:K==="base",children:"创建"})]})]})})]})}function c1(e){return e==="success"?"border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-900/30 dark:bg-violet-950/20 dark:text-violet-300":e==="warning"?"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/30 dark:bg-amber-950/20 dark:text-amber-300":"border-red-200 bg-red-50 text-red-700 dark:border-red-900/30 dark:bg-red-950/20 dark:text-red-300"}function L8(){const{knowledgebaseId:e=""}=Do(),[t,r]=w.useState(!0),[i,s]=w.useState(!1),[o,c]=w.useState(!1),[d,h]=w.useState(!1),[f,g]=w.useState(null),[m,x]=w.useState([]),[v,E]=w.useState([]),[S,_]=w.useState([]),[N,T]=w.useState(""),[C,j]=w.useState(null),D=w.useCallback(async()=>{if(e){r(!0);try{const[O,U,J,ce]=await Promise.all([Wp(),$j(e),VE(),qj(e).catch(()=>({files:[]}))]);h(!!O.baseUrl),g(U),x(J.folders||[]),E(ce.files||[])}catch(O){j({tone:"error",message:O instanceof Error?O.message:String(O)})}finally{r(!1)}}},[e]);w.useEffect(()=>{D()},[D]);const A=w.useMemo(()=>m.find(O=>O.id===(f==null?void 0:f.folderId))||null,[f==null?void 0:f.folderId,m]),P=w.useCallback(async O=>{const U=Array.from(O.target.files||[]);if(!(!e||U.length===0)){s(!0);try{const J=await Wp();await Gj(e,{files:U,collection:J.defaultCollection,folder:A==null?void 0:A.path}),j({tone:"success",message:"Files uploaded and indexed."}),await D(),O.target.value=""}catch(J){j({tone:"error",message:J instanceof Error?J.message:String(J)})}finally{s(!1)}}},[A==null?void 0:A.path,e,D]),K=w.useCallback(async O=>{if(!(!e||!window.confirm(`Delete file "${O.fileName}"?`)))try{await Vj(e,O.fileId),j({tone:"success",message:"File deleted."}),await D()}catch(U){j({tone:"error",message:U instanceof Error?U.message:String(U)})}},[e,D]),X=w.useCallback(async()=>{if(!e||!N.trim()){_([]);return}c(!0);try{const O=await Yj(e,{query:N.trim(),limit:8});_(O.results||[])}catch(O){j({tone:"error",message:O instanceof Error?O.message:String(O)})}finally{c(!1)}},[e,N]);return p.jsxs("div",{className:"space-y-6 animate-fade-in",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsx(Pn,{to:"/knowledge",children:p.jsxs(_e,{variant:"secondary",children:[p.jsx(Xu,{size:14})," 返回知识库"]})}),f&&p.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[p.jsx("span",{className:"text-gray-900 dark:text-white",children:f.name}),A?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"mx-2",children:"/"}),p.jsx("span",{children:A.path})]}):null]})]}),C&&p.jsx("div",{className:`rounded-xl border px-4 py-3 text-sm ${c1(C.tone)}`,children:C.message}),!d&&!t&&p.jsx("div",{className:`rounded-2xl border px-5 py-4 ${c1("warning")}`,children:p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:"Knowledge retrieval is not configured."}),p.jsx("p",{className:"mt-1 text-sm opacity-90",children:"Add the ai_vector connection in System settings to upload files and search this knowledge base."})]}),p.jsx(Pn,{to:"/system",children:p.jsxs(_e,{variant:"secondary",children:[p.jsx(Oo,{size:14})," Open System Settings"]})})]})}),t?p.jsx(Kt,{children:p.jsx("div",{className:"py-16 text-center text-sm text-gray-400",children:"正在加载知识库详情…"})}):f?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1.05fr)_minmax(0,0.95fr)]",children:[p.jsxs(Kt,{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:f.name}),p.jsx("p",{className:"mt-2 text-sm text-gray-500 dark:text-gray-400",children:f.description||"上传文档后,这个知识库会变成你当前项目的专属 RAG 索引。"})]}),p.jsxs("label",{className:He("inline-flex cursor-pointer items-center gap-2 rounded-xl px-4 py-2 text-sm font-medium",d?"bg-accent text-white hover:bg-accent-dim":"bg-gray-200 text-gray-500 dark:bg-white/[0.08] dark:text-gray-500"),children:[p.jsx(tx,{size:14}),i?"上传中…":"上传文件",p.jsx("input",{type:"file",multiple:!0,className:"hidden",disabled:!d||i,onChange:O=>void P(O)})]})]}),p.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[p.jsxs("div",{className:"rounded-2xl border border-gray-200/80 px-4 py-4 dark:border-white/[0.08]",children:[p.jsx("p",{className:"text-xs uppercase tracking-wide text-gray-400",children:"文档数"}),p.jsx("p",{className:"mt-2 text-2xl font-semibold text-gray-900 dark:text-white",children:v.length})]}),p.jsxs("div",{className:"rounded-2xl border border-gray-200/80 px-4 py-4 dark:border-white/[0.08]",children:[p.jsx("p",{className:"text-xs uppercase tracking-wide text-gray-400",children:"字符统计"}),p.jsx("p",{className:"mt-2 text-2xl font-semibold text-gray-900 dark:text-white",children:v.reduce((O,U)=>O+Number(U.wordCount||0),0)})]}),p.jsxs("div",{className:"rounded-2xl border border-gray-200/80 px-4 py-4 dark:border-white/[0.08]",children:[p.jsx("p",{className:"text-xs uppercase tracking-wide text-gray-400",children:"最近更新"}),p.jsx("p",{className:"mt-2 text-sm font-medium text-gray-900 dark:text-white",children:Zs(f.updatedAt)})]})]})]}),p.jsxs(Kt,{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"内容搜索"}),p.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"在当前知识库内检索已解析内容,快速确认切块与召回效果。"})]}),p.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx(Ju,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),p.jsx(xt,{value:N,onChange:O=>T(O.target.value),placeholder:"例如:升级流程、性能测试结论",className:"pl-9",onKeyDown:O=>{O.key==="Enter"&&X()}})]}),p.jsxs(_e,{onClick:()=>void X(),disabled:!d||!N.trim(),loading:o,children:[p.jsx(zC,{size:14})," 搜索"]})]}),S.length===0?p.jsx("div",{className:"rounded-2xl border border-dashed border-gray-200/80 px-4 py-8 text-center text-sm text-gray-400 dark:border-white/[0.08]",children:N?"还没有搜索结果。":"输入关键词后可以查看召回片段。"}):p.jsx("div",{className:"space-y-3",children:S.map(O=>p.jsxs("div",{className:"rounded-2xl border border-gray-200/80 px-4 py-4 dark:border-white/[0.08]",children:[p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:O.title}),p.jsxs("p",{className:"mt-1 text-xs text-gray-400",children:["chunk #",O.chunkOffset," · score ",O.score.toFixed(4)]})]}),p.jsx("span",{className:"rounded-full bg-gray-100 px-2.5 py-1 text-xs text-gray-500 dark:bg-white/[0.06] dark:text-gray-400",children:O.fileName})]}),p.jsx("p",{className:"mt-3 whitespace-pre-wrap text-sm leading-7 text-gray-600 dark:text-gray-300",children:O.snippet})]},O.id))})]})]}),p.jsxs(Kt,{className:"space-y-4",children:[p.jsx("div",{className:"flex items-center justify-between gap-4",children:p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"文件列表"}),p.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"当前知识库内已完成解析并入库的文件。"})]})}),v.length===0?p.jsx(xn,{message:"还没有文件,上传文档后会出现在这里。",icon:tx}):p.jsxs("div",{className:"overflow-hidden rounded-2xl border border-gray-200/80 dark:border-white/[0.08]",children:[p.jsxs("div",{className:"grid grid-cols-[minmax(0,1.8fr)_120px_120px_160px_60px] gap-3 border-b border-gray-200/80 bg-gray-50/80 px-4 py-3 text-xs font-medium uppercase tracking-wide text-gray-500 dark:border-white/[0.08] dark:bg-white/[0.03]",children:[p.jsx("span",{children:"文件"}),p.jsx("span",{children:"类型"}),p.jsx("span",{children:"字符数"}),p.jsx("span",{children:"创建时间"}),p.jsx("span",{})]}),v.map(O=>p.jsxs("div",{className:"grid grid-cols-[minmax(0,1.8fr)_120px_120px_160px_60px] gap-3 border-b border-gray-200/70 px-4 py-3 text-sm last:border-b-0 dark:border-white/[0.06]",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate font-medium text-gray-900 dark:text-white",children:O.fileName}),p.jsx("p",{className:"mt-1 truncate text-xs text-gray-400",children:O.fileId})]}),p.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:O.fileType}),p.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:O.wordCount||0}),p.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:Zs(O.createTime)}),p.jsx("button",{type:"button",onClick:()=>void K(O),className:"rounded-lg p-2 text-gray-400 hover:bg-red-500/10 hover:text-red-500","aria-label":`Delete ${O.fileName}`,children:p.jsx(Jr,{size:15})})]},O.fileId))]})]})]}):p.jsx(Kt,{children:p.jsx(xn,{message:"没有找到这个知识库。",icon:$C})})]})}class I8{constructor(){Ls(this,"routes",new Map);Ls(this,"navItems",new Map)}registerRoute(t){this.routes.set(t.id,t)}registerNavItem(t){this.navItems.set(t.id,t)}listRoutes(){return[...this.routes.values()].sort((t,r)=>t.order-r.order)}listNavItems(){return[...this.navItems.values()].sort((t,r)=>t.order-r.order)}}function fo(e,t,r="/"){return e?t:p.jsx(fi,{to:r,replace:!0})}function z8(){const{name:e}=Do();return hr(r=>r.desktopManaged)?p.jsx(fi,{to:e?`/workspace?project=${encodeURIComponent(e)}`:"/workspace",replace:!0}):p.jsx(u8,{})}function u1(){const{project:e,id:t}=Do();if(!hr(s=>s.desktopManaged))return t&&e?p.jsx(h8,{}):p.jsx(f8,{});const i=new URLSearchParams;return e&&i.set("project",e),t&&i.set("session",t),p.jsx(fi,{to:`/chat${i.toString()?`?${i.toString()}`:""}`,replace:!0})}function P8(e){[{id:"dashboard",index:!0,titleKey:"nav.dashboard",order:10,element:()=>p.jsx(fL,{})},{id:"chat",path:"chat",titleKey:"nav.chat",order:20,element:({features:r})=>fo(r.chatRoute,r.desktopChat?p.jsx(N6,{}):p.jsx(L6,{}))},{id:"workspace",path:"workspace",titleKey:"nav.workspace",order:30,element:({features:r})=>fo(r.desktopWorkspace,p.jsx(Q6,{}))},{id:"knowledge",path:"knowledge",titleKey:"nav.knowledge",order:40,element:({features:r})=>fo(r.knowledgeModule,p.jsx(j8,{}))},{id:"knowledge-detail",path:"knowledge/:knowledgebaseId",titleKey:"nav.knowledge",order:41,element:({features:r})=>fo(r.knowledgeModule,p.jsx(L8,{}))},{id:"projects",path:"projects",titleKey:"nav.projects",order:50,element:({desktopManaged:r,features:i})=>r&&i.desktopWorkspace?p.jsx(fi,{to:"/workspace",replace:!0}):p.jsx(Z6,{})},{id:"project-detail",path:"projects/:name",titleKey:"nav.projects",order:51,element:()=>p.jsx(z8,{})},{id:"sessions",path:"sessions",titleKey:"nav.sessions",order:60,element:()=>p.jsx(u1,{})},{id:"session-detail",path:"sessions/:project/:id",titleKey:"nav.sessions",order:61,element:()=>p.jsx(u1,{})},{id:"cron",path:"cron",titleKey:"nav.cron",order:70,element:({features:r})=>fo(r.schedulerModule,p.jsx(E8,{}))},{id:"system",path:"system",titleKey:"nav.system",order:80,element:()=>p.jsx(T8,{})},{id:"system-logs",path:"system/logs",titleKey:"nav.system",order:81,element:()=>p.jsx(O8,{})}].forEach(r=>e.registerRoute(r))}function B8(e){[{id:"dashboard",path:"/",labelKey:"nav.dashboard",icon:JC,order:10,end:!0},{id:"chat",path:"/chat",labelKey:"nav.chat",icon:l2,order:20,visible:({features:r})=>r.chatRoute,resolveLabelKey:({features:r,runtimeProvider:i})=>r.desktopChat?i==="electron"?"nav.chatDesktop":"nav.chat":"nav.chatWeb"},{id:"workspace",path:"/workspace",labelKey:"nav.workspace",icon:bm,order:30,visible:({features:r})=>r.desktopWorkspace},{id:"knowledge",path:"/knowledge",labelKey:"nav.knowledge",icon:R1,order:40,visible:({features:r})=>r.knowledgeModule},{id:"projects",path:"/projects",labelKey:"nav.projects",icon:Tu,order:50,visible:({desktopManaged:r})=>!r},{id:"sessions",path:"/sessions",labelKey:"nav.sessions",icon:_a,order:60,visible:({desktopManaged:r})=>!r},{id:"cron",path:"/cron",labelKey:"nav.cron",icon:mm,order:70,visible:({features:r})=>r.schedulerModule},{id:"system",path:"/system",labelKey:"nav.system",icon:Oo,order:80}].forEach(r=>e.registerNavItem(r))}const kd=new I8;P8(kd);B8(kd);function Y_({className:e,markClassName:t,showWordmark:r=!1}){const i=w.useId(),s=`${i}-bg`,o=`${i}-stroke`;return p.jsxs("div",{className:He("inline-flex items-center gap-3",e),children:[p.jsxs("svg",{className:He("h-8 w-8 shrink-0",t),viewBox:"0 0 64 64",role:"img","aria-label":"AgentDock",fill:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:s,x1:"7",y1:"5",x2:"57",y2:"59",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{className:"[stop-color:#FFFFFF] dark:[stop-color:#3A3A3C]"}),p.jsx("stop",{offset:"0.52",className:"[stop-color:#F5F5F7] dark:[stop-color:#2C2C2E]"}),p.jsx("stop",{offset:"1",className:"[stop-color:#E5E5EA] dark:[stop-color:#1C1C1E]"})]}),p.jsxs("linearGradient",{id:o,x1:"18",y1:"16",x2:"47",y2:"48",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#5AC8FA"}),p.jsx("stop",{offset:"0.44",stopColor:"#0A84FF"}),p.jsx("stop",{offset:"1",stopColor:"#007AFF"})]})]}),p.jsx("rect",{x:"4",y:"4",width:"56",height:"56",rx:"16",fill:`url(#${s})`,className:"stroke-black/10 dark:stroke-white/10",strokeWidth:"1.5"}),p.jsx("path",{d:"M14.5 45L25.3 20.1C26.1 18.1 28.9 18.1 29.8 20.1L40.8 45",stroke:`url(#${o})`,strokeWidth:"7.5",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("path",{d:"M20.8 37.5H34.7",className:"stroke-white dark:stroke-white",strokeWidth:"5.25",strokeLinecap:"round"}),p.jsx("path",{d:"M33.8 20.2H37.4C45.1 20.2 50 25.6 50 32.5C50 39.4 45.1 44.8 37.4 44.8H33.8",stroke:`url(#${o})`,strokeWidth:"7",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.82"}),p.jsx("path",{d:"M34 25.5V39.5",className:"stroke-black/70 dark:stroke-black/80",strokeWidth:"3",strokeLinecap:"round",opacity:"0.18"})]}),r&&p.jsx("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"AgentDock"})]})}const d1=[{code:"en",label:"English"},{code:"zh",label:"中文"},{code:"zh-TW",label:"繁體中文"},{code:"ja",label:"日本語"},{code:"es",label:"Español"}],U8=[{label:"Core",ids:["dashboard","chat","workspace","projects","sessions"]},{label:"Knowledge",ids:["knowledge","cron"]},{label:"System",ids:["system"]}];function F8(){var T;const{t:e,i18n:t}=Pr(),{theme:r,setTheme:i}=Am(),s=hr(C=>C.logout),o=hr(C=>C.desktopManaged),c=id(),d=Hi(),[h,f]=w.useState(!1),[g,m]=w.useState(!1),x=C=>{t.changeLanguage(C),localStorage.setItem("cc_lang",C),m(!1)},v={light:z1,dark:M1,system:O1},E={light:"dark",dark:"system",system:"light"},S=v[r],_=kd.listNavItems().filter(C=>{var j;return((j=C.visible)==null?void 0:j.call(C,{desktopManaged:o,features:c}))??!0}),N=_.map(C=>{var A;const j=C.icon,D=((A=C.resolveLabelKey)==null?void 0:A.call(C,{desktopManaged:o,features:c,runtimeProvider:d}))||C.labelKey;return{...C,Icon:j,labelKey:D}});return p.jsxs(p.Fragment,{children:[p.jsxs("aside",{className:He("relative hidden h-[100dvh] flex-col overflow-hidden border-r transition-all duration-300 ease-out md:flex","border-white/55 bg-white/24 shadow-[inset_-1px_0_0_rgba(255,255,255,0.36)] backdrop-blur-[34px] supports-[backdrop-filter]:bg-white/18","dark:border-white/[0.10] dark:bg-[#1c1c1e]/34 dark:shadow-[inset_-1px_0_0_rgba(255,255,255,0.08)] dark:supports-[backdrop-filter]:bg-[#1c1c1e]/26",h?"w-16":"w-56"),children:[p.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(180deg,rgba(255,255,255,0.55),rgba(255,255,255,0.18)_48%,rgba(255,255,255,0.08))] dark:bg-[linear-gradient(180deg,rgba(255,255,255,0.08),rgba(255,255,255,0.025)_52%,rgba(255,255,255,0.015))]","aria-hidden":"true"}),p.jsx("div",{className:He("relative flex h-[5.25rem] items-center gap-3 px-4 pt-7 transition-colors"),children:p.jsx(Y_,{showWordmark:!h})}),p.jsx("nav",{className:"relative flex-1 py-3 space-y-4 px-2 overflow-y-auto",children:U8.map(C=>{const j=_.filter(D=>C.ids.includes(D.id));return j.length===0?null:p.jsxs("div",{className:"space-y-1",children:[!h&&p.jsx("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/80",children:C.label}),j.map(D=>{var K;const A=D.icon,P=((K=D.resolveLabelKey)==null?void 0:K.call(D,{desktopManaged:o,features:c,runtimeProvider:d}))||D.labelKey;return p.jsxs(Dp,{to:D.path,end:D.end,className:({isActive:X})=>He("flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",X?"bg-black/[0.07] text-foreground dark:bg-white/[0.10]":"text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]"),children:[p.jsx(A,{size:18,className:"shrink-0"}),!h&&p.jsx("span",{children:e(P)})]},D.id)})]},C.label)})}),p.jsxs("div",{className:He("relative border-t p-2 space-y-1","border-black/10 dark:border-white/[0.08]"),children:[p.jsxs("div",{className:"relative",children:[p.jsxs("button",{type:"button",onClick:()=>m(!g),className:He("flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm transition-colors duration-200","text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[p.jsx(WC,{size:18,className:"shrink-0"}),!h&&p.jsx("span",{children:((T=d1.find(C=>C.code===t.language))==null?void 0:T.label)||"English"})]}),g&&p.jsx("div",{className:He("absolute bottom-full left-0 mb-1 w-48 rounded-xl py-1 z-50 overflow-hidden","border border-black/10 bg-white/90 text-popover-foreground shadow-[0_18px_40px_rgba(0,0,0,0.12)] backdrop-blur-2xl","dark:border-white/[0.08] dark:bg-[#2c2c2e]/90"),children:d1.map(C=>p.jsx("button",{type:"button",onClick:()=>x(C.code),className:He("w-full text-left px-3 py-2 text-sm transition-colors duration-150",t.language===C.code?"text-primary font-medium bg-primary/10":"text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]"),children:C.label},C.code))})]}),p.jsxs("button",{type:"button",onClick:()=>i(E[r]),className:He("flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm transition-colors duration-200","text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[p.jsx(S,{size:18,className:"shrink-0"}),!h&&p.jsx("span",{children:e(`theme.${r}`)})]}),!o&&p.jsxs("button",{type:"button",onClick:s,className:He("flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm transition-colors duration-200","text-muted-foreground hover:bg-destructive/10 hover:text-destructive","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[p.jsx(r2,{size:18,className:"shrink-0"}),!h&&p.jsx("span",{children:e("login.logout")})]}),p.jsx("button",{type:"button",onClick:()=>f(!h),className:He("flex items-center justify-center w-full px-3 py-2 rounded-lg transition-colors duration-200","text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:h?p.jsx(T1,{size:18}):p.jsx(EC,{size:18})})]})]}),p.jsx("nav",{className:He("fixed inset-x-0 bottom-0 z-50 border-t px-2 pb-[max(env(safe-area-inset-bottom),0.5rem)] pt-2 md:hidden","border-black/10 bg-white/88 shadow-[0_-12px_32px_rgba(15,23,42,0.10)] backdrop-blur-2xl","dark:border-white/[0.08] dark:bg-[#111113]/88 dark:shadow-[0_-16px_42px_rgba(0,0,0,0.34)]"),"aria-label":"Primary navigation",children:p.jsx("div",{className:"flex items-stretch gap-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:N.map(({id:C,path:j,end:D,Icon:A,labelKey:P})=>p.jsxs(Dp,{to:j,end:D,className:({isActive:K})=>He("flex min-w-[4.5rem] flex-1 flex-col items-center justify-center gap-1 rounded-xl px-2 py-2 text-[11px] font-medium transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",K?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-black/[0.05] hover:text-foreground dark:hover:bg-white/[0.07]"),children:[p.jsx(A,{size:18,className:"shrink-0"}),p.jsx("span",{className:"max-w-[4.25rem] truncate",children:e(P)})]},C))})})]})}function $8(){const{pathname:e}=Cr(),{desktopChat:t}=id(),r=e.startsWith("/chat")&&t,i=r&&Hi()==="electron";return p.jsxs("div",{className:He("flex h-[100dvh] overflow-hidden","bg-background/60 backdrop-blur-2xl"),children:[p.jsx("div",{className:"fixed left-0 right-0 top-0 z-50 hidden h-8 [-webkit-app-region:drag] md:block","aria-hidden":"true"}),p.jsx(F8,{}),p.jsx("div",{className:"flex-1 flex flex-col overflow-hidden min-w-0 bg-background/45 backdrop-blur-2xl",children:p.jsx("main",{className:He("flex-1 min-h-0",r?"overflow-hidden":"overflow-y-auto",i?"p-0":"p-4 pb-24 sm:p-6 sm:pb-6"),children:p.jsx("div",{className:He(r&&"h-full min-h-0",!i&&"mx-auto w-full max-w-7xl"),children:p.jsx(WT,{})})})})]})}const H8=[{code:"en",label:"EN"},{code:"zh",label:"中"},{code:"zh-TW",label:"繁"},{code:"ja",label:"日"},{code:"es",label:"ES"}];function K8(){const{t:e,i18n:t}=Pr(),r=rd(),i=hr(j=>j.login),{theme:s,setTheme:o}=Am(),[c,d]=w.useState(""),[h,f]=w.useState(""),[g,m]=w.useState(""),[x,v]=w.useState(!1),E=eR(),S=tR(),_=async j=>{if(j.preventDefault(),!(!c.trim()||S)){v(!0),m("");try{h.trim()&&ot.setBaseUrl(h.trim()),ot.setToken(c.trim()),await S8(),i(c.trim(),h.trim()),E?window.location.hash="#/":r("/",{replace:!0})}catch{m(e("login.invalidToken")),ot.setToken(""),ot.setBaseUrl("")}finally{v(!1)}}},N={light:z1,dark:M1,system:O1},T={light:"dark",dark:"system",system:"light"},C=N[s];return p.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-[radial-gradient(circle_at_top,hsl(var(--secondary))_0,hsl(var(--background))_42%,hsl(var(--background))_78%)] p-4",children:[p.jsxs("div",{className:"fixed top-4 right-4 flex items-center gap-2",children:[p.jsx("div",{className:"flex overflow-hidden rounded-md border bg-card/80 backdrop-blur",children:H8.map(j=>p.jsx("button",{onClick:()=>{t.changeLanguage(j.code),localStorage.setItem("cc_lang",j.code)},className:He("px-2.5 py-1.5 text-xs font-medium transition-colors",t.language===j.code?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent/10 hover:text-foreground"),children:j.label},j.code))}),p.jsx(_e,{variant:"outline",size:"icon",onClick:()=>o(T[s]),"aria-label":e(`theme.${s}`),children:p.jsx(C,{size:16})})]}),p.jsx("div",{className:"w-full max-w-md animate-fade-in",children:p.jsxs(Kt,{className:"p-8 shadow-2xl shadow-primary/10",children:[p.jsx("div",{className:"flex justify-center mb-6",children:p.jsx(Y_,{markClassName:"h-14 w-14 drop-shadow-[0_14px_28px_rgba(0,122,255,0.22)]"})}),p.jsx("h1",{className:"text-2xl font-bold text-center text-foreground mb-1",children:e("login.title")}),p.jsx("p",{className:"text-sm text-center text-muted-foreground mb-3",children:e("login.subtitle")}),p.jsx("div",{className:"mb-8 rounded-lg border bg-muted px-4 py-3 text-xs text-muted-foreground",children:E?"AgentDock 桌面模式会自动连接到本地托管运行时。":"Browser mode requires a reachable API endpoint. Enter the server URL and access token."}),g&&p.jsxs("div",{className:"mb-4 flex items-center gap-2 rounded-lg border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive dark:text-red-200",children:[p.jsx(CC,{size:16}),g]}),p.jsxs("form",{onSubmit:_,className:"space-y-4",children:[p.jsx(xt,{label:e("login.token"),type:"password",value:c,onChange:j=>d(j.target.value),placeholder:"mgmt-secret-xxx",autoFocus:!0}),p.jsx(xt,{label:`${e("login.serverUrl")} (${e("common.optional")})`,type:"text",value:h,onChange:j=>f(j.target.value),placeholder:"http://localhost:9820"}),p.jsxs(_e,{type:"submit",disabled:x||!c.trim()||S,className:"w-full shadow-[0_0_20px_-6px_hsl(var(--primary)/0.55)]",children:[x?p.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):p.jsx(P1,{size:16}),e("login.connect")]})]})]})})]})}function q8({children:e}){return hr(r=>r.isAuthenticated)?p.jsx(p.Fragment,{children:e}):p.jsx(fi,{to:"/login",replace:!0})}function G8(){const e=hr(i=>i.isAuthenticated),t=hr(i=>i.desktopManaged),r=id();return p.jsxs(QT,{children:[p.jsx(Fi,{path:"/login",element:e?p.jsx(fi,{to:"/",replace:!0}):p.jsx(K8,{})}),p.jsxs(Fi,{element:p.jsx(q8,{children:p.jsx($8,{})}),children:[kd.listRoutes().map(i=>i.index?p.jsx(Fi,{index:!0,element:i.element({desktopManaged:t,features:r})},i.id):p.jsx(Fi,{path:i.path,element:i.element({desktopManaged:t,features:r})},i.id)),p.jsx(Fi,{path:"*",element:p.jsx(fi,{to:"/",replace:!0})})]}),p.jsx(Fi,{path:"*",element:p.jsx(fi,{to:e?"/":"/login",replace:!0})})]})}class V8 extends kt.Component{constructor(){super(...arguments);Ls(this,"state",{hasError:!1,errorMessage:""})}static getDerivedStateFromError(r){return{hasError:!0,errorMessage:r instanceof Error?r.message:String(r)}}componentDidCatch(r,i){console.error("App render failed",r,i)}render(){return this.state.hasError?p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-gray-950 p-6",children:p.jsxs("div",{className:"max-w-lg w-full rounded-2xl border border-red-200 dark:border-red-900/40 bg-red-50 dark:bg-red-950/20 px-6 py-5",children:[p.jsx("h1",{className:"text-lg font-semibold text-red-700 dark:text-red-300",children:"页面渲染失败"}),p.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400 break-words",children:this.state.errorMessage||"Unknown renderer error"}),p.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"mt-4 inline-flex items-center rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700",children:"Reload"})]})}):this.props.children}}var Ep={};const Ze=e=>typeof e=="string",ho=()=>{let e,t;const r=new Promise((i,s)=>{e=i,t=s});return r.resolve=e,r.reject=t,r},f1=e=>e==null?"":""+e,Y8=(e,t,r)=>{e.forEach(i=>{t[i]&&(r[i]=t[i])})},W8=/###/g,h1=e=>e&&e.indexOf("###")>-1?e.replace(W8,"."):e,p1=e=>!e||Ze(e),yo=(e,t,r)=>{const i=Ze(t)?t.split("."):t;let s=0;for(;s<i.length-1;){if(p1(e))return{};const o=h1(i[s]);!e[o]&&r&&(e[o]=new r),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return p1(e)?{}:{obj:e,k:h1(i[s])}},m1=(e,t,r)=>{const{obj:i,k:s}=yo(e,t,Object);if(i!==void 0||t.length===1){i[s]=r;return}let o=t[t.length-1],c=t.slice(0,t.length-1),d=yo(e,c,Object);for(;d.obj===void 0&&c.length;)o=`${c[c.length-1]}.${o}`,c=c.slice(0,c.length-1),d=yo(e,c,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${o}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${o}`]=r},X8=(e,t,r,i)=>{const{obj:s,k:o}=yo(e,t,Object);s[o]=s[o]||[],s[o].push(r)},Vu=(e,t)=>{const{obj:r,k:i}=yo(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},Q8=(e,t,r)=>{const i=Vu(e,r);return i!==void 0?i:Vu(t,r)},W_=(e,t,r)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in e?Ze(e[i])||e[i]instanceof String||Ze(t[i])||t[i]instanceof String?r&&(e[i]=t[i]):W_(e[i],t[i],r):e[i]=t[i]);return e},Ui=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Z8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const J8=e=>Ze(e)?e.replace(/[&<>"'\/]/g,t=>Z8[t]):e;class e9{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const t9=[" ",",","?","!",";"],n9=new e9(20),r9=(e,t,r)=>{t=t||"",r=r||"";const i=t9.filter(c=>t.indexOf(c)<0&&r.indexOf(c)<0);if(i.length===0)return!0;const s=n9.getRegExp(`(${i.map(c=>c==="?"?"\\?":c).join("|")})`);let o=!s.test(e);if(!o){const c=e.indexOf(r);c>0&&!s.test(e.substring(0,c))&&(o=!0)}return o},dm=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(r);let s=e;for(let o=0;o<i.length;){if(!s||typeof s!="object")return;let c,d="";for(let h=o;h<i.length;++h)if(h!==o&&(d+=r),d+=i[h],c=s[d],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&h<i.length-1)continue;o+=h-o+1;break}s=c}return s},Ro=e=>e==null?void 0:e.replace(/_/g,"-"),a9={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,i;(i=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||i.call(r,console,t)}};class Yu{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||a9,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,i,s){return s&&!this.debug?null:(Ze(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Yu(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Yu(this.logger,t)}}var Zr=new Yu;class Nd{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(r)||0;this.observers[i].set(r,s+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,o])=>{for(let c=0;c<o;c++)s.apply(s,[t,...r])})}}class g1 extends Nd{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,i,s={}){var f,g;const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.indexOf(".")>-1?d=t.split("."):(d=[t,r],i&&(Array.isArray(i)?d.push(...i):Ze(i)&&o?d.push(...i.split(o)):d.push(i)));const h=Vu(this.data,d);return!h&&!r&&!i&&t.indexOf(".")>-1&&(t=d[0],r=d[1],i=d.slice(2).join(".")),h||!c||!Ze(i)?h:dm((g=(f=this.data)==null?void 0:f[t])==null?void 0:g[r],i,o)}addResource(t,r,i,s,o={silent:!1}){const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let d=[t,r];i&&(d=d.concat(c?i.split(c):i)),t.indexOf(".")>-1&&(d=t.split("."),s=r,r=d[1]),this.addNamespaces(r),m1(this.data,d,s),o.silent||this.emit("added",t,r,i,s)}addResources(t,r,i,s={silent:!1}){for(const o in i)(Ze(i[o])||Array.isArray(i[o]))&&this.addResource(t,r,o,i[o],{silent:!0});s.silent||this.emit("added",t,r,i)}addResourceBundle(t,r,i,s,o,c={silent:!1,skipCopy:!1}){let d=[t,r];t.indexOf(".")>-1&&(d=t.split("."),s=i,i=r,r=d[1]),this.addNamespaces(r);let h=Vu(this.data,d)||{};c.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?W_(h,i,o):h={...h,...i},m1(this.data,d,h),c.silent||this.emit("added",t,r,i)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(s=>r[s]&&Object.keys(r[s]).length>0)}toJSON(){return this.data}}var X_={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,i,s){return e.forEach(o=>{var c;t=((c=this.processors[o])==null?void 0:c.process(t,r,i,s))??t}),t}};const Q_=Symbol("i18next/PATH_KEY");function i9(){const e=[],t=Object.create(null);let r;return t.get=(i,s)=>{var o;return(o=r==null?void 0:r.revoke)==null||o.call(r),s===Q_?e:(e.push(s),r=Proxy.revocable(i,t),r.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Qs(e,t){const{[Q_]:r}=e(i9()),i=(t==null?void 0:t.keySeparator)??".",s=(t==null?void 0:t.nsSeparator)??":";if(r.length>1&&s){const o=t==null?void 0:t.ns,c=Array.isArray(o)?o:null;if(c&&c.length>1&&c.slice(1).includes(r[0]))return`${r[0]}${s}${r.slice(1).join(i)}`}return r.join(i)}const b1={},Sp=e=>!Ze(e)&&typeof e!="boolean"&&typeof e!="number";class Wu extends Nd{constructor(t,r={}){super(),Y8(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const i={...r};if(t==null)return!1;const s=this.resolve(t,i);if((s==null?void 0:s.res)===void 0)return!1;const o=Sp(s.res);return!(i.returnObjects===!1&&o)}extractFromKey(t,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=r.ns||this.options.defaultNS||[];const c=i&&t.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!r9(t,i,s);if(c&&!d){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:Ze(o)?[o]:o};const f=t.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),t=f.join(s)}return{key:t,namespaces:Ze(o)?[o]:o}}translate(t,r,i){let s=typeof r=="object"?{...r}:r;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=Qs(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map(ce=>typeof ce=="function"?Qs(ce,{...this.options,...s}):String(ce));const o=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(t[t.length-1],s),f=h[h.length-1];let g=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const m=s.lng||this.language,x=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((m==null?void 0:m.toLowerCase())==="cimode")return x?o?{res:`${f}${g}${d}`,usedKey:d,exactUsedKey:d,usedLng:m,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:`${f}${g}${d}`:o?{res:d,usedKey:d,exactUsedKey:d,usedLng:m,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:d;const v=this.resolve(t,s);let E=v==null?void 0:v.res;const S=(v==null?void 0:v.usedKey)||d,_=(v==null?void 0:v.exactUsedKey)||d,N=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,j=s.count!==void 0&&!Ze(s.count),D=Wu.hasDefaultValue(s),A=j?this.pluralResolver.getSuffix(m,s.count,s):"",P=s.ordinal&&j?this.pluralResolver.getSuffix(m,s.count,{ordinal:!1}):"",K=j&&!s.ordinal&&s.count===0,X=K&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${A}`]||s[`defaultValue${P}`]||s.defaultValue;let O=E;C&&!E&&D&&(O=X);const U=Sp(O),J=Object.prototype.toString.apply(O);if(C&&O&&U&&N.indexOf(J)<0&&!(Ze(T)&&Array.isArray(O))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ce=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,O,{...s,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return o?(v.res=ce,v.usedParams=this.getUsedParamsDetails(s),v):ce}if(c){const ce=Array.isArray(O),q=ce?[]:{},$=ce?_:S;for(const I in O)if(Object.prototype.hasOwnProperty.call(O,I)){const W=`${$}${c}${I}`;D&&!E?q[I]=this.translate(W,{...s,defaultValue:Sp(X)?X[I]:void 0,joinArrays:!1,ns:h}):q[I]=this.translate(W,{...s,joinArrays:!1,ns:h}),q[I]===W&&(q[I]=O[I])}E=q}}else if(C&&Ze(T)&&Array.isArray(E))E=E.join(T),E&&(E=this.extendTranslation(E,t,s,i));else{let ce=!1,q=!1;!this.isValidLookup(E)&&D&&(ce=!0,E=X),this.isValidLookup(E)||(q=!0,E=d);const I=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&q?void 0:E,W=D&&X!==E&&this.options.updateMissing;if(q||ce||W){if(this.logger.log(W?"updateKey":"missingKey",m,f,d,W?X:E),c){const z=this.resolve(d,{...s,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Q=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let z=0;z<Y.length;z++)Q.push(Y[z]);else this.options.saveMissingTo==="all"?Q=this.languageUtils.toResolveHierarchy(s.lng||this.language):Q.push(s.lng||this.language);const L=(z,V,R)=>{var ge;const ee=D&&R!==E?R:I;this.options.missingKeyHandler?this.options.missingKeyHandler(z,f,V,ee,W,s):(ge=this.backendConnector)!=null&&ge.saveMissing&&this.backendConnector.saveMissing(z,f,V,ee,W,s),this.emit("missingKey",z,f,V,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Q.forEach(z=>{const V=this.pluralResolver.getSuffixes(z,s);K&&s[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(R=>{L([z],d+R,s[`defaultValue${R}`]||X)})}):L(Q,d,X))}E=this.extendTranslation(E,t,s,v,i),q&&E===d&&this.options.appendNamespaceToMissingKey&&(E=`${f}${g}${d}`),(q||ce)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}${g}${d}`:d,ce?E:void 0,s))}return o?(v.res=E,v.usedParams=this.getUsedParamsDetails(s),v):E}extendTranslation(t,r,i,s,o){var h,f;if((h=this.i18nFormat)!=null&&h.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const g=Ze(t)&&(((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(g){const v=t.match(this.interpolator.nestingRegexp);m=v&&v.length}let x=i.replace&&!Ze(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),t=this.interpolator.interpolate(t,x,i.lng||this.language||s.usedLng,i),g){const v=t.match(this.interpolator.nestingRegexp),E=v&&v.length;m<E&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...v)=>(o==null?void 0:o[0])===v[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${r[0]}`),null):this.translate(...v,r),i)),i.interpolation&&this.interpolator.reset()}const c=i.postProcess||this.options.postProcess,d=Ze(c)?[c]:c;return t!=null&&(d!=null&&d.length)&&i.applyPostProcessor!==!1&&(t=X_.handle(d,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,r={}){let i,s,o,c,d;return Ze(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(h=>typeof h=="function"?Qs(h,{...this.options,...r}):h)),t.forEach(h=>{if(this.isValidLookup(i))return;const f=this.extractFromKey(h,r),g=f.key;s=g;let m=f.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const x=r.count!==void 0&&!Ze(r.count),v=x&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(Ze(r.context)||typeof r.context=="number")&&r.context!=="",S=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);m.forEach(_=>{var N,T;this.isValidLookup(i)||(d=_,!b1[`${S[0]}-${_}`]&&((N=this.utils)!=null&&N.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(d))&&(b1[`${S[0]}-${_}`]=!0,this.logger.warn(`key "${s}" for languages "${S.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(C=>{var A;if(this.isValidLookup(i))return;c=C;const j=[g];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(j,g,C,_,r);else{let P;x&&(P=this.pluralResolver.getSuffix(C,r.count,r));const K=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(r.ordinal&&P.indexOf(X)===0&&j.push(g+P.replace(X,this.options.pluralSeparator)),j.push(g+P),v&&j.push(g+K)),E){const O=`${g}${this.options.contextSeparator||"_"}${r.context}`;j.push(O),x&&(r.ordinal&&P.indexOf(X)===0&&j.push(O+P.replace(X,this.options.pluralSeparator)),j.push(O+P),v&&j.push(O+K))}}let D;for(;D=j.pop();)this.isValidLookup(i)||(o=D,i=this.getResource(C,_,D,r))}))})}),{res:i,usedKey:s,exactUsedKey:o,usedLng:c,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,i,s={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,r,i,s):this.resourceStore.getResource(t,r,i,s)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!Ze(t.replace);let s=i?t.replace:t;if(i&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const o of r)delete s[o]}return s}static hasDefaultValue(t){const r="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r===i.substring(0,r.length)&&t[i]!==void 0)return!0;return!1}}class y1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ro(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Ro(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Ze(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(i=>{if(r)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(r=s)}),!r&&this.options.supportedLngs&&t.forEach(i=>{if(r)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return r=s;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(c=>{if(c===o)return c;if(!(c.indexOf("-")<0&&o.indexOf("-")<0)&&(c.indexOf("-")>0&&o.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===o||c.indexOf(o)===0&&o.length>1))return c})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ze(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let i=t[r];return i||(i=t[this.getScriptPartFromCode(r)]),i||(i=t[this.formatLanguageCode(r)]),i||(i=t[this.getLanguagePartFromCode(r)]),i||(i=t.default),i||[]}toResolveHierarchy(t,r){const i=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),s=[],o=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Ze(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):Ze(t)&&o(this.formatLanguageCode(t)),i.forEach(c=>{s.indexOf(c)<0&&o(this.formatLanguageCode(c))}),s}}const x1={zero:0,one:1,two:2,few:3,many:4,other:5},v1={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class s9{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const i=Ro(t==="dev"?"en":t),s=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:i,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let c;try{c=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),v1;if(!t.match(/-|_/))return v1;const h=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(h,r)}return this.pluralRulesCache[o]=c,c}needsPlural(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,i={}){return this.getSuffixes(t,i).map(s=>`${r}${s}`)}getSuffixes(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?i.resolvedOptions().pluralCategories.sort((s,o)=>x1[s]-x1[o]).map(s=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,r,i={}){const s=this.getRule(t,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,i))}}const w1=(e,t,r,i=".",s=!0)=>{let o=Q8(e,t,r);return!o&&s&&Ze(r)&&(o=dm(e,r,i),o===void 0&&(o=dm(t,r,i))),o},_p=e=>e.replace(/\$/g,"$$$$");class E1{constructor(t={}){var r;this.logger=Zr.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:s,prefix:o,prefixEscaped:c,suffix:d,suffixEscaped:h,formatSeparator:f,unescapeSuffix:g,unescapePrefix:m,nestingPrefix:x,nestingPrefixEscaped:v,nestingSuffix:E,nestingSuffixEscaped:S,nestingOptionsSeparator:_,maxReplaces:N,alwaysFormat:T}=t.interpolation;this.escape=r!==void 0?r:J8,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Ui(o):c||"{{",this.suffix=d?Ui(d):h||"}}",this.formatSeparator=f||",",this.unescapePrefix=g?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=x?Ui(x):v||Ui("$t("),this.nestingSuffix=E?Ui(E):S||Ui(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=N||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,i)=>(r==null?void 0:r.source)===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,i,s){var v;let o,c,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=E=>{if(E.indexOf(this.formatSeparator)<0){const T=w1(r,h,E,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,i,{...s,...r,interpolationkey:E}):T}const S=E.split(this.formatSeparator),_=S.shift().trim(),N=S.join(this.formatSeparator).trim();return this.format(w1(r,h,_,this.options.keySeparator,this.options.ignoreJSONStructure),N,i,{...s,...r,interpolationkey:_})};this.resetRegExp();const g=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,m=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:E=>_p(E)},{regex:this.regexp,safeValue:E=>this.escapeValue?_p(this.escape(E)):_p(E)}].forEach(E=>{for(d=0;o=E.regex.exec(t);){const S=o[1].trim();if(c=f(S),c===void 0)if(typeof g=="function"){const N=g(t,o,s);c=Ze(N)?N:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))c="";else if(m){c=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),c="";else!Ze(c)&&!this.useRawValueToEscape&&(c=f1(c));const _=E.safeValue(c);if(t=t.replace(o[0],_),m?(E.regex.lastIndex+=c.length,E.regex.lastIndex-=o[0].length):E.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,r,i={}){let s,o,c;const d=(h,f)=>{const g=this.nestingOptionsSeparator;if(h.indexOf(g)<0)return h;const m=h.split(new RegExp(`${Ui(g)}[ ]*{`));let x=`{${m[1]}`;h=m[0],x=this.interpolate(x,c);const v=x.match(/'/g),E=x.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!E||((E==null?void 0:E.length)??0)%2!==0)&&(x=x.replace(/'/g,'"'));try{c=JSON.parse(x),f&&(c={...f,...c})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,S),`${h}${g}${x}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,h};for(;s=this.nestingRegexp.exec(t);){let h=[];c={...i},c=c.replace&&!Ze(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const f=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(f!==-1&&(h=s[1].slice(f).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),s[1]=s[1].slice(0,f)),o=r(d.call(this,s[1].trim(),c),c),o&&s[0]===t&&!Ze(o))return o;Ze(o)||(o=f1(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),h.length&&(o=h.reduce((g,m)=>this.format(g,m,i.lng,{...i,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const l9=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);t==="currency"&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...h]=c.split(":"),f=h.join(":").trim().replace(/^'+|'+$/g,""),g=d.trim();r[g]||(r[g]=f),f==="false"&&(r[g]=!1),f==="true"&&(r[g]=!0),isNaN(f)||(r[g]=parseInt(f,10))}})}return{formatName:t,formatOptions:r}},S1=e=>{const t={};return(r,i,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const c=i+JSON.stringify(o);let d=t[c];return d||(d=e(Ro(i),s),t[c]=d),d(r)}},o9=e=>(t,r,i)=>e(Ro(r),i)(t);class c9{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?S1:o9;this.formats={number:i((s,o)=>{const c=new Intl.NumberFormat(s,{...o});return d=>c.format(d)}),currency:i((s,o)=>{const c=new Intl.NumberFormat(s,{...o,style:"currency"});return d=>c.format(d)}),datetime:i((s,o)=>{const c=new Intl.DateTimeFormat(s,{...o});return d=>c.format(d)}),relativetime:i((s,o)=>{const c=new Intl.RelativeTimeFormat(s,{...o});return d=>c.format(d,o.range||"day")}),list:i((s,o)=>{const c=new Intl.ListFormat(s,{...o});return d=>c.format(d)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=S1(r)}format(t,r,i,s={}){const o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(d=>d.indexOf(")")>-1)){const d=o.findIndex(h=>h.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,d)].join(this.formatSeparator)}return o.reduce((d,h)=>{var m;const{formatName:f,formatOptions:g}=l9(h);if(this.formats[f]){let x=d;try{const v=((m=s==null?void 0:s.formatParams)==null?void 0:m[s.interpolationkey])||{},E=v.locale||v.lng||s.locale||s.lng||i;x=this.formats[f](d,E,{...g,...s,...v})}catch(v){this.logger.warn(v)}return x}else this.logger.warn(`there was no format function for ${f}`);return d},t)}}const u9=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class d9 extends Nd{constructor(t,r,i,s={}){var o,c;super(),this.backend=t,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(c=(o=this.backend)==null?void 0:o.init)==null||c.call(o,i,s.backend,s)}queueLoad(t,r,i,s){const o={},c={},d={},h={};return t.forEach(f=>{let g=!0;r.forEach(m=>{const x=`${f}|${m}`;!i.reload&&this.store.hasResourceBundle(f,m)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?c[x]===void 0&&(c[x]=!0):(this.state[x]=1,g=!1,c[x]===void 0&&(c[x]=!0),o[x]===void 0&&(o[x]=!0),h[m]===void 0&&(h[m]=!0)))}),g||(d[f]=!0)}),(Object.keys(o).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(t,r,i){const s=t.split("|"),o=s[0],c=s[1];r&&this.emit("failedLoading",o,c,r),!r&&i&&this.store.addResourceBundle(o,c,i,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&i&&(this.state[t]=0);const d={};this.queue.forEach(h=>{X8(h.loaded,[o],c),u9(h,t),r&&h.errors.push(r),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(f=>{d[f]||(d[f]={});const g=h.loaded[f];g.length&&g.forEach(m=>{d[f][m]===void 0&&(d[f][m]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(t,r,i,s=0,o=this.retryTimeout,c){if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:i,tried:s,wait:o,callback:c});return}this.readingCalls++;const d=(f,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&g&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,i,s+1,o*2,c)},o);return}c(f,g)},h=this.backend[i].bind(this.backend);if(h.length===2){try{const f=h(t,r);f&&typeof f.then=="function"?f.then(g=>d(null,g)).catch(d):d(null,f)}catch(f){d(f)}return}return h(t,r,d)}prepareLoading(t,r,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Ze(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ze(r)&&(r=[r]);const o=this.queueLoad(t,r,i,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(c=>{this.loadOne(c)})}load(t,r,i){this.prepareLoading(t,r,{},i)}reload(t,r,i){this.prepareLoading(t,r,{reload:!0},i)}loadOne(t,r=""){const i=t.split("|"),s=i[0],o=i[1];this.read(s,o,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${r}loading namespace ${o} for language ${s} failed`,c),!c&&d&&this.logger.log(`${r}loaded namespace ${o} for language ${s}`,d),this.loaded(t,c,d)})}saveMissing(t,r,i,s,o,c={},d=()=>{}){var h,f,g,m,x;if((f=(h=this.services)==null?void 0:h.utils)!=null&&f.hasLoadedNamespace&&!((m=(g=this.services)==null?void 0:g.utils)!=null&&m.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((x=this.backend)!=null&&x.create){const v={...c,isUpdate:o},E=this.backend.create.bind(this.backend);if(E.length<6)try{let S;E.length===5?S=E(t,r,i,s,v):S=E(t,r,i,s),S&&typeof S.then=="function"?S.then(_=>d(null,_)).catch(d):d(null,S)}catch(S){d(S)}else E(t,r,i,s,d,v)}!t||!t[0]||this.store.addResource(t[0],r,i,s)}}}const kp=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ze(e[1])&&(t.defaultValue=e[1]),Ze(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(i=>{t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_1=e=>{var t,r;return Ze(e.ns)&&(e.ns=[e.ns]),Ze(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ze(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},vu=()=>{},f9=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},Z_="__i18next_supportNoticeShown",h9=()=>!!(typeof globalThis<"u"&&globalThis[Z_]||typeof process<"u"&&Ep&&Ep.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&Ep),p9=()=>{typeof globalThis<"u"&&(globalThis[Z_]=!0)},m9=e=>{var t,r,i,s,o,c,d,h,f,g,m,x,v;return!!(((i=(r=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:r.name)==null?void 0:i.indexOf("Locize"))>0||((d=(c=(o=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:o.constructor)==null?void 0:c.name)==null?void 0:d.indexOf("Locize"))>0||(f=(h=e==null?void 0:e.options)==null?void 0:h.backend)!=null&&f.backends&&e.options.backend.backends.some(E=>{var S,_,N;return((S=E==null?void 0:E.name)==null?void 0:S.indexOf("Locize"))>0||((N=(_=E==null?void 0:E.constructor)==null?void 0:_.name)==null?void 0:N.indexOf("Locize"))>0})||(m=(g=e==null?void 0:e.options)==null?void 0:g.backend)!=null&&m.projectId||(v=(x=e==null?void 0:e.options)==null?void 0:x.backend)!=null&&v.backendOptions&&e.options.backend.backendOptions.some(E=>E==null?void 0:E.projectId))};class xo extends Nd{constructor(t={},r){if(super(),this.options=_1(t),this.services={},this.logger=Zr,this.modules={external:[]},f9(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Ze(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=kp();this.options={...i,...this.options,..._1(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!m9(this)&&!h9()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),p9());const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Zr.init(s(this.modules.logger),this.options):Zr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=c9;const g=new y1(this.options);this.store=new g1(this.options.resources,this.options);const m=this.services;m.logger=Zr,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new s9(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(m.formatter=s(f),m.formatter.init&&m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new E1(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new d9(s(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",(v,...E)=>{this.emit(v,...E)}),this.modules.languageDetector&&(m.languageDetector=s(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=s(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new Wu(this.services,this.options),this.translator.on("*",(v,...E)=>{this.emit(v,...E)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=vu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=(...g)=>this.store[f](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...g)=>(this.store[f](...g),this)});const d=ho(),h=()=>{const f=(g,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(m),r(g,m)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(t,r=vu){var o,c;let i=r;const s=Ze(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const d=[],h=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(m=>{m!=="cimode"&&d.indexOf(m)<0&&d.push(m)})};s?h(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>h(g)),(c=(o=this.options.preload)==null?void 0:o.forEach)==null||c.call(o,f=>h(f)),this.services.backendConnector.load(d,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(f)})}else i(null)}reloadResources(t,r,i){const s=ho();return typeof t=="function"&&(i=t,t=void 0),typeof r=="function"&&(i=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),i||(i=vu),this.services.backendConnector.reload(t,r,o=>{s.resolve(),i(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&X_.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const i=this.languages[r];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const i=ho();this.emit("languageChanging",t);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},o=(d,h)=>{h?this.isLanguageChangingTo===t&&(s(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,i.resolve((...f)=>this.t(...f)),r&&r(d,(...f)=>this.t(...f))},c=d=>{var g,m;!t&&!d&&this.services.languageDetector&&(d=[]);const h=Ze(d)?d:d&&d[0],f=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Ze(d)?[d]:d);f&&(this.language||s(f),this.translator.language||this.translator.changeLanguage(f),(m=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||m.call(g,f)),this.loadResources(f,x=>{o(x,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),i}getFixedT(t,r,i){const s=(o,c,...d)=>{let h;typeof c!="object"?h=this.options.overloadTranslationOptionHandler([o,c].concat(d)):h={...c},h.lng=h.lng||s.lng,h.lngs=h.lngs||s.lngs,h.ns=h.ns||s.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||i||s.keyPrefix);const f={...this.options,...h};typeof h.keyPrefix=="function"&&(h.keyPrefix=Qs(h.keyPrefix,f));const g=this.options.keySeparator||".";let m;return h.keyPrefix&&Array.isArray(o)?m=o.map(x=>(typeof x=="function"&&(x=Qs(x,f)),`${h.keyPrefix}${g}${x}`)):(typeof o=="function"&&(o=Qs(o,f)),m=h.keyPrefix?`${h.keyPrefix}${g}${o}`:o),this.t(m,h)};return Ze(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=i,s}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const c=(d,h)=>{const f=this.services.backendConnector.state[`${d}|${h}`];return f===-1||f===0||f===2};if(r.precheck){const d=r.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(i,t)&&(!s||c(o,t)))}loadNamespaces(t,r){const i=ho();return this.options.ns?(Ze(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),r&&r(s)}),i):(r&&r(),Promise.resolve())}loadLanguages(t,r){const i=ho();Ze(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return o.length?(this.options.preload=s.concat(o),this.loadResources(c=>{i.resolve(),r&&r(c)}),i):(r&&r(),Promise.resolve())}dir(t){var s,o;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const c=new Intl.Locale(t);if(c&&c.getTextInfo){const d=c.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((o=this.services)==null?void 0:o.languageUtils)||new y1(kp());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){const i=new xo(t,r);return i.createInstance=xo.createInstance,i}cloneInstance(t={},r=vu){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new xo(s);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(d=>{o[d]=this[d]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i){const d=Object.keys(this.store.data).reduce((h,f)=>(h[f]={...this.store.data[f]},h[f]=Object.keys(h[f]).reduce((g,m)=>(g[m]={...h[f][m]},g),h[f]),h),{});o.store=new g1(d,s),o.services.resourceStore=o.store}if(t.interpolation){const h={...kp().interpolation,...this.options.interpolation,...t.interpolation},f={...s,interpolation:h};o.services.interpolator=new E1(f)}return o.translator=new Wu(o.services,s),o.translator.on("*",(d,...h)=>{o.emit(d,...h)}),o.init(s,r),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Bn=xo.createInstance();Bn.createInstance;Bn.dir;Bn.init;Bn.loadResources;Bn.reloadResources;Bn.use;Bn.changeLanguage;Bn.getFixedT;Bn.t;Bn.exists;Bn.setDefaultNamespace;Bn.hasLoadedNamespace;Bn.loadNamespaces;Bn.loadLanguages;const g9={dashboard:"Dashboard",chat:"Chat",chatDesktop:"Desktop Chat",chatWeb:"Chat",workspace:"Workspace",knowledge:"Knowledge",projects:"Projects",sessions:"Sessions",cron:"Cron",bridge:"Bridge",system:"System"},b9={title:"Dashboard",version:"Version",uptime:"Uptime",platforms:"Platforms",projects:"Projects",bridgeAdapters:"Bridge adapters",noData:"No data available"},y9={title:"Projects",name:"Name",agent:"Agent",platforms:"Platforms",sessions:"Sessions",heartbeat:"Heartbeat",settings:"Settings",quiet:"Quiet mode",language:"Language",adminFrom:"Admin from",disabledCommands:"Disabled commands",save:"Save",detail:"Details",noProjects:"No projects configured",tabs:{overview:"Overview",providers:"Providers",heartbeat:"Heartbeat",settings:"Settings"}},x9={title:"Sessions",id:"ID",sessionKey:"Session key",name:"Name",platform:"Platform",active:"Active",createdAt:"Created at",history:"History",send:"Send",messageInput:"Message",delete:"Delete",noSessions:"No sessions",noMessages:"No messages yet",notLiveHint:"This chat target is offline right now, so replies are temporarily unavailable. When new activity arrives, sending will become available again.",offline:"offline",justNow:"just now",allProjects:"All projects",chat:"Chat",enterSession:"Open session",newChat:"New chat",selectProject:"Select a project",projectRequired:"Choose a project before starting a chat.",noAvailableChatTarget:"There is no conversation ready to chat in this project yet. Open an available session from the sessions view first.",noReadyChats:"There are no chat-ready sessions right now. Use the Sessions page to review history.",emptyProject:"This project does not have any sessions yet.",emptySelection:"Pick a project and start a new chat to begin.",activeChat:"Active chat",sendHint:"Messages will be sent to the selected project.",waitingForReply:"Waiting for the assistant reply…",preparingChat:"Preparing the chat…",pollTimeout:"The assistant did not finish responding before the refresh timeout.",createFailed:"Failed to create a new chat session.",loadFailed:"Failed to load the selected session.",sendFailed:"Failed to send the message.",sessionUnavailable:"This chat target is offline right now, so replies are temporarily unavailable. Try again after new activity arrives.",deleteConfirmTitle:"Delete session",deleteConfirmBody:"This removes the saved conversation history for the selected session.",renameTitle:"Rename session",renamePlaceholder:"Session name",loadSession:"Open",historyTitle:"Conversation history",availableNow:"Ready to chat",waitingActivation:"Waiting to become available"},v9={title:"Providers",name:"Name",model:"Model",baseUrl:"Base URL",active:"Active",add:"Add provider",remove:"Remove",activate:"Activate",setModel:"Set model",models:"Models"},w9={title:"Scheduled jobs",expression:"Cron expression",prompt:"Prompt",exec:"Execute",description:"Description",enabled:"Enabled",silent:"Silent",lastRun:"Last run",lastError:"Last error",add:"Add job",delete:"Delete",noJobs:"No scheduled jobs",workDir:"Working directory",sessionKey:"Session key",project:"Project"},E9={title:"Heartbeat",status:"Status",interval:"Interval",paused:"Paused",running:"Running",pause:"Pause",resume:"Resume",trigger:"Run now",setInterval:"Set interval",runCount:"Run count",errorCount:"Error count",skippedBusy:"Skipped (busy)",lastRun:"Last run"},S9={title:"Bridge",platform:"Platform",capabilities:"Capabilities",connectedAt:"Connected at",noAdapters:"No bridge adapters"},_9={title:"System",config:"Configuration",logs:"Logs",restart:"Restart",reload:"Reload config",restartConfirm:"Restart the service? Active sessions may be interrupted.",reloadConfirm:"Reload configuration from disk?",level:"Log level",limit:"Line limit"},k9={title:"AgentDock",subtitle:"Connect to your AgentDock instance",token:"API token",serverUrl:"Server URL",connect:"Connect",invalidToken:"Invalid or expired token",logout:"Log out"},N9={loading:"Loading…",error:"Error",success:"Success",confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",back:"Back",refresh:"Refresh",search:"Search",noData:"No data",actions:"Actions",viewAll:"View all",optional:"optional",confirmDelete:"Are you sure you want to delete this?"},C9={light:"Light",dark:"Dark",system:"System"},T9={nav:g9,dashboard:b9,projects:y9,sessions:x9,providers:v9,cron:w9,heartbeat:E9,bridge:S9,system:_9,login:k9,common:N9,theme:C9},A9={dashboard:"概览",chat:"聊天",chatDesktop:"桌面聊天",chatWeb:"聊天",workspace:"工作区",knowledge:"知识库",projects:"项目",sessions:"会话",cron:"定时任务",bridge:"桥接",system:"系统"},R9={title:"概览",version:"版本",uptime:"运行时间",platforms:"平台",projects:"项目",bridgeAdapters:"桥接适配器",noData:"暂无数据"},O9={title:"项目",name:"名称",agent:"智能体",platforms:"平台",sessions:"会话",heartbeat:"心跳",settings:"设置",quiet:"静默模式",language:"语言",adminFrom:"管理来源",disabledCommands:"已禁用命令",save:"保存",detail:"详情",noProjects:"尚未配置项目",tabs:{overview:"概览",providers:"服务商",heartbeat:"心跳",settings:"设置"}},M9={title:"会话",id:"编号",sessionKey:"会话键",name:"名称",platform:"平台",active:"活跃",createdAt:"创建时间",history:"历史",send:"发送",messageInput:"消息",delete:"删除",noSessions:"暂无会话",noMessages:"暂无消息",notLiveHint:"当前聊天对象现在不在线,暂时不能继续回复。等有新消息进来后,这里会自动恢复可发送。",offline:"离线",justNow:"刚刚",allProjects:"全部项目",chat:"对话",enterSession:"进入会话",newChat:"新建聊天",selectProject:"选择项目",projectRequired:"开始聊天前请先选择一个项目。",noAvailableChatTarget:"当前项目还没有可直接聊天的会话,请先从会话列表打开一个可用会话。",noReadyChats:"当前没有可立即聊天的会话,请到“会话”页查看历史记录。",emptyProject:"这个项目下还没有任何会话。",emptySelection:"选择一个项目,然后开始新的聊天。",activeChat:"当前聊天",sendHint:"消息会发送到当前选中的项目。",waitingForReply:"正在等待助手回复…",preparingChat:"正在准备聊天…",pollTimeout:"刷新超时前未收到完整回复。",createFailed:"创建新聊天会话失败。",loadFailed:"加载所选会话失败。",sendFailed:"发送消息失败。",sessionUnavailable:"当前聊天对象现在不在线,暂时不能继续回复。等有新消息进来后再试。",deleteConfirmTitle:"删除会话",deleteConfirmBody:"这会移除该会话保存的历史对话。",renameTitle:"重命名会话",renamePlaceholder:"会话名称",loadSession:"打开",historyTitle:"历史会话",availableNow:"可发送消息",waitingActivation:"等待激活"},D9={title:"模型提供方",name:"名称",model:"模型",baseUrl:"基础 URL",active:"当前使用",add:"添加提供方",remove:"移除",activate:"启用",setModel:"设置模型",models:"可用模型"},j9={title:"定时任务",expression:"Cron 表达式",prompt:"提示词",exec:"执行",description:"描述",enabled:"已启用",silent:"静默",lastRun:"上次运行",lastError:"上次错误",add:"添加任务",delete:"删除",noJobs:"暂无定时任务",workDir:"工作目录",sessionKey:"会话键",project:"项目"},L9={title:"心跳",status:"状态",interval:"间隔",paused:"已暂停",running:"运行中",pause:"暂停",resume:"恢复",trigger:"立即执行",setInterval:"设置间隔",runCount:"执行次数",errorCount:"错误次数",skippedBusy:"跳过(忙碌)",lastRun:"上次运行"},I9={title:"桥接",platform:"平台",capabilities:"能力",connectedAt:"连接时间",noAdapters:"暂无桥接适配器"},z9={title:"系统",config:"配置",logs:"日志",restart:"重启",reload:"重载配置",restartConfirm:"确定要重启服务吗?进行中的会话可能会中断。",reloadConfirm:"从磁盘重新加载配置?",level:"日志级别",limit:"行数限制"},P9={title:"AgentDock",subtitle:"连接到您的 AgentDock 实例",token:"API 令牌",serverUrl:"服务器地址",connect:"连接",invalidToken:"令牌无效或已过期",logout:"退出登录"},B9={loading:"加载中…",error:"错误",success:"成功",confirm:"确认",cancel:"取消",save:"保存",delete:"删除",back:"返回",refresh:"刷新",search:"搜索",noData:"无数据",actions:"操作",viewAll:"查看全部",optional:"可选",confirmDelete:"确定要删除吗?"},U9={light:"浅色",dark:"深色",system:"跟随系统"},F9={nav:A9,dashboard:R9,projects:O9,sessions:M9,providers:D9,cron:j9,heartbeat:L9,bridge:I9,system:z9,login:P9,common:B9,theme:U9},$9={dashboard:"總覽",chat:"聊天",chatDesktop:"桌面聊天",chatWeb:"聊天",workspace:"工作區",knowledge:"知識庫",projects:"專案",sessions:"工作階段",cron:"排程工作",bridge:"橋接",system:"系統"},H9={title:"總覽",version:"版本",uptime:"運作時間",platforms:"平台",projects:"專案",bridgeAdapters:"橋接介接器",noData:"尚無資料"},K9={title:"專案",name:"名稱",agent:"智慧代理",platforms:"平台",sessions:"工作階段",heartbeat:"心跳",settings:"設定",quiet:"靜音模式",language:"語言",adminFrom:"管理來源",disabledCommands:"已停用指令",save:"儲存",detail:"詳細資料",noProjects:"尚未設定專案",tabs:{overview:"總覽",providers:"供應商",heartbeat:"心跳",settings:"設定"}},q9={title:"工作階段",id:"編號",sessionKey:"工作階段金鑰",name:"名稱",platform:"平台",active:"使用中",createdAt:"建立時間",history:"歷程",send:"傳送",messageInput:"訊息",delete:"刪除",noSessions:"尚無工作階段",noMessages:"暫無訊息",notLiveHint:"目前這個聊天對象不在線上,暫時無法繼續回覆。等有新訊息進來後,這裡會自動恢復可傳送。",offline:"離線",justNow:"剛剛",allProjects:"全部專案",chat:"對話",enterSession:"進入工作階段",newChat:"新增聊天",selectProject:"選擇專案",projectRequired:"開始聊天前請先選擇一個專案。",noAvailableChatTarget:"這個專案目前還沒有可直接聊天的對話,請先從工作階段頁面開啟一個可用對話。",noReadyChats:"目前沒有可立即聊天的對話,請到「工作階段」頁面查看歷史記錄。",emptyProject:"這個專案下還沒有任何工作階段。",emptySelection:"選擇一個專案,然後開始新的聊天。",activeChat:"目前聊天",sendHint:"訊息會傳送到目前選取的專案。",waitingForReply:"正在等待助手回覆…",preparingChat:"正在準備聊天…",pollTimeout:"在重新整理逾時前尚未收到完整回覆。",createFailed:"建立新聊天工作階段失敗。",loadFailed:"載入所選工作階段失敗。",sendFailed:"傳送訊息失敗。",sessionUnavailable:"目前這個聊天對象不在線上,暫時無法繼續回覆。等有新訊息進來後再試一次。",deleteConfirmTitle:"刪除工作階段",deleteConfirmBody:"這會移除該工作階段儲存的歷史對話。",renameTitle:"重新命名工作階段",renamePlaceholder:"工作階段名稱",loadSession:"開啟",historyTitle:"歷史工作階段",availableNow:"可傳送訊息",waitingActivation:"等待啟用"},G9={title:"模型供應商",name:"名稱",model:"模型",baseUrl:"基礎 URL",active:"使用中",add:"新增供應商",remove:"移除",activate:"啟用",setModel:"設定模型",models:"可用模型"},V9={title:"排程工作",expression:"Cron 運算式",prompt:"提示詞",exec:"執行",description:"說明",enabled:"已啟用",silent:"靜音",lastRun:"上次執行",lastError:"上次錯誤",add:"新增工作",delete:"刪除",noJobs:"尚無排程工作",workDir:"工作目錄",sessionKey:"工作階段金鑰",project:"專案"},Y9={title:"心跳",status:"狀態",interval:"間隔",paused:"已暫停",running:"執行中",pause:"暫停",resume:"繼續",trigger:"立即執行",setInterval:"設定間隔",runCount:"執行次數",errorCount:"錯誤次數",skippedBusy:"略過(忙碌)",lastRun:"上次執行"},W9={title:"橋接",platform:"平台",capabilities:"能力",connectedAt:"連線時間",noAdapters:"尚無橋接介接器"},X9={title:"系統",config:"設定",logs:"記錄",restart:"重新啟動",reload:"重新載入設定",restartConfirm:"確定要重新啟動服務嗎?進行中的工作階段可能會中斷。",reloadConfirm:"從磁碟重新載入設定?",level:"記錄層級",limit:"筆數上限"},Q9={title:"AgentDock",subtitle:"連線至您的 AgentDock 執行個體",token:"API 權杖",serverUrl:"伺服器位址",connect:"連線",invalidToken:"權杖無效或已過期",logout:"登出"},Z9={loading:"載入中…",error:"錯誤",success:"成功",confirm:"確認",cancel:"取消",save:"儲存",delete:"刪除",back:"返回",refresh:"重新整理",search:"搜尋",noData:"無資料",actions:"操作",viewAll:"檢視全部",optional:"選填",confirmDelete:"確定要刪除嗎?"},J9={light:"淺色",dark:"深色",system:"跟隨系統"},eF={nav:$9,dashboard:H9,projects:K9,sessions:q9,providers:G9,cron:V9,heartbeat:Y9,bridge:W9,system:X9,login:Q9,common:Z9,theme:J9},tF={dashboard:"ダッシュボード",chat:"チャット",chatDesktop:"デスクトップチャット",chatWeb:"チャット",workspace:"ワークスペース",knowledge:"ナレッジ",projects:"プロジェクト",sessions:"セッション",cron:"Cron",bridge:"ブリッジ",system:"システム"},nF={title:"ダッシュボード",version:"バージョン",uptime:"稼働時間",platforms:"プラットフォーム",projects:"プロジェクト",bridgeAdapters:"ブリッジアダプター",noData:"データがありません"},rF={title:"プロジェクト",name:"名前",agent:"エージェント",platforms:"プラットフォーム",sessions:"セッション",heartbeat:"ハートビート",settings:"設定",quiet:"サイレントモード",language:"言語",adminFrom:"管理元",disabledCommands:"無効化したコマンド",save:"保存",detail:"詳細",noProjects:"プロジェクトが設定されていません",tabs:{overview:"概要",providers:"プロバイダー",heartbeat:"ハートビート",settings:"設定"}},aF={title:"セッション",id:"ID",sessionKey:"セッションキー",name:"名前",platform:"プラットフォーム",active:"アクティブ",createdAt:"作成日時",history:"履歴",send:"送信",messageInput:"メッセージ",delete:"削除",noSessions:"セッションがありません",noMessages:"メッセージはまだありません",notLiveHint:"この相手は現在オフラインのため、今は返信できません。新しいアクティビティが届くと送信可能に戻ります。",offline:"オフライン",justNow:"たった今",allProjects:"すべてのプロジェクト",chat:"チャット",enterSession:"セッションを開く",newChat:"新しいチャット",selectProject:"プロジェクトを選択",projectRequired:"チャットを開始する前にプロジェクトを選択してください。",noAvailableChatTarget:"このプロジェクトにはまだすぐ使える会話がありません。先にセッション一覧から利用可能な会話を開いてください。",noReadyChats:"すぐに使える会話はありません。履歴はセッション一覧で確認してください。",emptyProject:"このプロジェクトにはまだセッションがありません。",emptySelection:"プロジェクトを選び、新しいチャットを開始してください。",activeChat:"現在のチャット",sendHint:"メッセージは選択中のプロジェクトに送信されます。",waitingForReply:"アシスタントの返信を待っています…",preparingChat:"チャットを準備しています…",pollTimeout:"更新のタイムアウト前に応答が完了しませんでした。",createFailed:"新しいチャットセッションの作成に失敗しました。",loadFailed:"選択したセッションの読み込みに失敗しました。",sendFailed:"メッセージの送信に失敗しました。",sessionUnavailable:"この相手は現在オフラインのため、今は返信できません。新しいアクティビティが届いてから再試行してください。",deleteConfirmTitle:"セッションを削除",deleteConfirmBody:"選択したセッションの保存済み会話履歴を削除します。",renameTitle:"セッション名を変更",renamePlaceholder:"セッション名",loadSession:"開く",historyTitle:"会話履歴",availableNow:"送信可能",waitingActivation:"利用可能になるのを待機中"},iF={title:"プロバイダー",name:"名前",model:"モデル",baseUrl:"ベース URL",active:"有効",add:"プロバイダーを追加",remove:"削除",activate:"有効化",setModel:"モデルを設定",models:"利用可能なモデル"},sF={title:"スケジュールジョブ",expression:"Cron 式",prompt:"プロンプト",exec:"実行",description:"説明",enabled:"有効",silent:"サイレント",lastRun:"最終実行",lastError:"最後のエラー",add:"ジョブを追加",delete:"削除",noJobs:"スケジュールジョブがありません",workDir:"作業ディレクトリ",sessionKey:"セッションキー",project:"プロジェクト"},lF={title:"ハートビート",status:"状態",interval:"間隔",paused:"一時停止",running:"実行中",pause:"一時停止",resume:"再開",trigger:"今すぐ実行",setInterval:"間隔を設定",runCount:"実行回数",errorCount:"エラー回数",skippedBusy:"スキップ(ビジー)",lastRun:"最終実行"},oF={title:"ブリッジ",platform:"プラットフォーム",capabilities:"機能",connectedAt:"接続日時",noAdapters:"ブリッジアダプターがありません"},cF={title:"システム",config:"設定",logs:"ログ",restart:"再起動",reload:"設定の再読み込み",restartConfirm:"サービスを再起動しますか?アクティブなセッションが中断される場合があります。",reloadConfirm:"ディスクから設定を再読み込みしますか?",level:"ログレベル",limit:"行数の上限"},uF={title:"AgentDock",subtitle:"AgentDock インスタンスに接続",token:"API トークン",serverUrl:"サーバー URL",connect:"接続",invalidToken:"トークンが無効または期限切れです",logout:"ログアウト"},dF={loading:"読み込み中…",error:"エラー",success:"成功",confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",back:"戻る",refresh:"更新",search:"検索",noData:"データなし",actions:"操作",viewAll:"すべて表示",optional:"任意",confirmDelete:"本当に削除しますか?"},fF={light:"ライト",dark:"ダーク",system:"システムに合わせる"},hF={nav:tF,dashboard:nF,projects:rF,sessions:aF,providers:iF,cron:sF,heartbeat:lF,bridge:oF,system:cF,login:uF,common:dF,theme:fF},pF={dashboard:"Panel",chat:"Chat",chatDesktop:"Chat de escritorio",chatWeb:"Chat",workspace:"Espacio de trabajo",knowledge:"Conocimiento",projects:"Proyectos",sessions:"Sesiones",cron:"Cron",bridge:"Puente",system:"Sistema"},mF={title:"Panel",version:"Versión",uptime:"Tiempo activo",platforms:"Plataformas",projects:"Proyectos",bridgeAdapters:"Adaptadores de puente",noData:"No hay datos disponibles"},gF={title:"Proyectos",name:"Nombre",agent:"Agente",platforms:"Plataformas",sessions:"Sesiones",heartbeat:"Latido",settings:"Ajustes",quiet:"Modo silencioso",language:"Idioma",adminFrom:"Administración desde",disabledCommands:"Comandos deshabilitados",save:"Guardar",detail:"Detalles",noProjects:"No hay proyectos configurados",tabs:{overview:"Resumen",providers:"Proveedores",heartbeat:"Latido",settings:"Ajustes"}},bF={title:"Sesiones",id:"ID",sessionKey:"Clave de sesión",name:"Nombre",platform:"Plataforma",active:"Activa",createdAt:"Creada el",history:"Historial",send:"Enviar",messageInput:"Mensaje",delete:"Eliminar",noSessions:"No hay sesiones",noMessages:"Sin mensajes aún",notLiveHint:"Este destino de chat está desconectado en este momento, por lo que las respuestas están temporalmente deshabilitadas. Cuando llegue nueva actividad, el envío volverá a estar disponible.",offline:"sin conexión",justNow:"ahora",allProjects:"Todos los proyectos",chat:"Chat",enterSession:"Abrir sesión",newChat:"Nuevo chat",selectProject:"Seleccionar proyecto",projectRequired:"Elija un proyecto antes de iniciar un chat.",noAvailableChatTarget:"Este proyecto todavía no tiene una conversación lista para chatear. Abra primero una sesión disponible desde la vista de sesiones.",noReadyChats:"No hay sesiones listas para chatear en este momento. Use la página de sesiones para revisar el historial.",emptyProject:"Este proyecto todavía no tiene sesiones.",emptySelection:"Seleccione un proyecto y empiece un chat nuevo.",activeChat:"Chat activo",sendHint:"Los mensajes se enviarán al proyecto seleccionado.",waitingForReply:"Esperando la respuesta del asistente…",preparingChat:"Preparando el chat…",pollTimeout:"El asistente no terminó de responder antes del tiempo límite.",createFailed:"No se pudo crear una nueva sesión de chat.",loadFailed:"No se pudo cargar la sesión seleccionada.",sendFailed:"No se pudo enviar el mensaje.",sessionUnavailable:"Este destino de chat está desconectado en este momento, por lo que las respuestas están temporalmente deshabilitadas. Inténtelo de nuevo cuando llegue nueva actividad.",deleteConfirmTitle:"Eliminar sesión",deleteConfirmBody:"Esto elimina el historial guardado de la conversación de la sesión seleccionada.",renameTitle:"Renombrar sesión",renamePlaceholder:"Nombre de la sesión",loadSession:"Abrir",historyTitle:"Historial de conversación",availableNow:"Disponible para chatear",waitingActivation:"Esperando disponibilidad"},yF={title:"Proveedores",name:"Nombre",model:"Modelo",baseUrl:"URL base",active:"Activo",add:"Añadir proveedor",remove:"Quitar",activate:"Activar",setModel:"Establecer modelo",models:"Modelos disponibles"},xF={title:"Tareas programadas",expression:"Expresión cron",prompt:"Indicación",exec:"Ejecutar",description:"Descripción",enabled:"Habilitada",silent:"Silenciosa",lastRun:"Última ejecución",lastError:"Último error",add:"Añadir tarea",delete:"Eliminar",noJobs:"No hay tareas programadas",workDir:"Directorio de trabajo",sessionKey:"Clave de sesión",project:"Proyecto"},vF={title:"Latido",status:"Estado",interval:"Intervalo",paused:"En pausa",running:"En ejecución",pause:"Pausar",resume:"Reanudar",trigger:"Ejecutar ahora",setInterval:"Establecer intervalo",runCount:"Ejecuciones",errorCount:"Errores",skippedBusy:"Omitida (ocupado)",lastRun:"Última ejecución"},wF={title:"Puente",platform:"Plataforma",capabilities:"Capacidades",connectedAt:"Conectada el",noAdapters:"No hay adaptadores de puente"},EF={title:"Sistema",config:"Configuración",logs:"Registros",restart:"Reiniciar",reload:"Recargar configuración",restartConfirm:"¿Reiniciar el servicio? Las sesiones activas pueden interrumpirse.",reloadConfirm:"¿Recargar la configuración desde el disco?",level:"Nivel de registro",limit:"Límite de líneas"},SF={title:"AgentDock",subtitle:"Conéctese a su instancia de AgentDock",token:"Token de API",serverUrl:"URL del servidor",connect:"Conectar",invalidToken:"Token no válido o caducado",logout:"Cerrar sesión"},_F={loading:"Cargando…",error:"Error",success:"Correcto",confirm:"Confirmar",cancel:"Cancelar",save:"Guardar",delete:"Eliminar",back:"Volver",refresh:"Actualizar",search:"Buscar",noData:"Sin datos",actions:"Acciones",viewAll:"Ver todo",optional:"opcional",confirmDelete:"¿Seguro que desea eliminar esto?"},kF={light:"Claro",dark:"Oscuro",system:"Sistema"},NF={nav:pF,dashboard:mF,projects:gF,sessions:bF,providers:yF,cron:xF,heartbeat:vF,bridge:wF,system:EF,login:SF,common:_F,theme:kF},CF=localStorage.getItem("cc_lang")||navigator.language.split("-")[0]||"en";Bn.use(YA).init({resources:{en:{translation:T9},zh:{translation:F9},"zh-TW":{translation:eF},ja:{translation:hF},es:{translation:NF}},lng:CF,fallbackLng:"en",interpolation:{escapeValue:!1}});hr.getState().init();Am.getState().init();const k1=20,TF=500;function AF(e){return new Promise(t=>window.setTimeout(t,e))}function RF(){return p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-gray-950 p-6",children:p.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/[0.08] bg-white dark:bg-gray-900 px-5 py-4 text-sm text-gray-600 dark:text-gray-300 shadow-sm",children:[p.jsx(Zu,{size:16,className:"animate-spin"}),"正在初始化 AgentDock 运行时…"]})})}function OF({message:e,logs:t,onRetry:r}){return p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-gray-950 p-6",children:p.jsxs("div",{className:"max-w-2xl w-full rounded-3xl border border-red-200 dark:border-red-900/40 bg-white dark:bg-gray-900 shadow-sm overflow-hidden",children:[p.jsx("div",{className:"px-6 py-5 border-b border-red-100 dark:border-red-900/30 bg-red-50/80 dark:bg-red-950/20",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-2xl bg-red-100 dark:bg-red-950/40 text-red-600 dark:text-red-300 flex items-center justify-center shrink-0",children:p.jsx(P2,{size:18})}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-semibold text-red-700 dark:text-red-300",children:"AgentDock 运行时初始化失败"}),p.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400 break-words",children:e})]})]})}),p.jsxs("div",{className:"px-6 py-5 space-y-4",children:[p.jsxs("div",{className:"rounded-2xl border border-gray-200 dark:border-white/[0.08] px-4 py-3 text-sm text-gray-600 dark:text-gray-300",children:[p.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:"What we can do next"}),p.jsx("p",{className:"mt-1",children:"请先重试本地运行时初始化。如果仍然失败,请检查下方运行时日志,并确认 Local AI Core 配置文件路径与运行环境是否正确。"})]}),t.length>0&&p.jsxs("div",{className:"rounded-2xl border border-gray-200 dark:border-white/[0.08] bg-gray-50 dark:bg-gray-950/40 px-4 py-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"最近的桌面日志"}),p.jsx("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs text-gray-600 dark:text-gray-300 font-mono",children:t.join(`
487
+ `)})]}),p.jsxs("div",{className:"flex gap-3",children:[p.jsxs(_e,{onClick:r,children:[p.jsx(Zu,{size:14})," 重试初始化"]}),p.jsx(_e,{variant:"secondary",onClick:()=>window.location.reload(),children:"重新加载应用"})]})]})]})})}function MF(){const[e,t]=w.useState({status:"loading"}),[r,i]=w.useState(!1),s=w.useCallback(async()=>{t({status:"loading"});const c=!!await Jj();if(i(c),c)try{let d=null;for(let h=0;h<k1;h+=1)try{await Wm(),d=null;break}catch(f){d=f,h<k1-1&&await AF(TF)}if(d)throw d;Uh(await Qx()),ot.setBaseUrl(Qr),ot.setToken(""),hr.getState().setManagedSession("",Qr,Hi()==="local_core"?"local_core":"electron")}catch(d){let h=[];try{h=await tL(80)}catch{h=[]}t({status:"error",message:d instanceof Error?d.message:String(d),logs:h});return}c||Uh(null),t({status:"ready"})},[]);return w.useEffect(()=>{s()},[s]),w.useEffect(()=>{if(r)return Xm(o=>{ot.setBaseUrl(Qr),ot.setToken(""),Qx().then(c=>Uh(c)).catch(()=>{}),hr.getState().setManagedSession("",Qr,Hi()==="local_core"?"local_core":"electron")})},[r]),e.status==="loading"?p.jsx(RF,{}):e.status==="error"?p.jsx(OF,{message:e.message,logs:e.logs,onRetry:()=>void s()}):p.jsx(EA,{children:p.jsx(G8,{})})}Q2.createRoot(document.getElementById("root")).render(p.jsx(V8,{children:p.jsx(MF,{})}));