@az-zephyr/slate 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.en.md +107 -0
- package/README.md +106 -2
- package/bin/slate.mjs +226 -0
- package/dist/agent/chunk-BVWXAL54.js +3654 -0
- package/dist/agent/cli.js +6 -0
- package/dist/agent/multi.js +59 -0
- package/dist/api/001_initial.sql +127 -0
- package/dist/api/002_project_assistant.sql +24 -0
- package/dist/api/003_card_decisions.sql +20 -0
- package/dist/api/004_card_default_agent.sql +3 -0
- package/dist/api/005_card_attachments.sql +24 -0
- package/dist/api/006_comment_attachments.sql +7 -0
- package/dist/api/007_participant_last_outcome.sql +6 -0
- package/dist/api/008_output_attachments.sql +7 -0
- package/dist/api/009_card_agent_runs.sql +23 -0
- package/dist/api/server.js +4567 -0
- package/dist/api/server.js.map +1 -0
- package/dist/web/assets/abnfDiagram-XWFEHMT6-DmNFXSdi.js +1 -0
- package/dist/web/assets/architectureDiagram-CSQXQB3N-BTCN41JR.js +36 -0
- package/dist/web/assets/blockDiagram-BEDRHYPZ-BUJZDqr0.js +140 -0
- package/dist/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
- package/dist/web/assets/c4Diagram-M2UUVUY5-CoTmMGy5.js +38 -0
- package/dist/web/assets/chunk-2Q5K7J3B-DN1oTl6j.js +1 -0
- package/dist/web/assets/chunk-3BJB4PZV-f0-m4Ag2.js +1 -0
- package/dist/web/assets/chunk-3GCGMST5-79GFiiwz.js +1 -0
- package/dist/web/assets/chunk-5VM5RSS4-D8XyNr_K.js +15 -0
- package/dist/web/assets/chunk-7U7NFRK5-CwjNfj8w.js +88 -0
- package/dist/web/assets/chunk-CNRTWJTD-CrX82YZ2.js +1 -0
- package/dist/web/assets/chunk-D5HYT7QG-DLlJaHjh.js +1 -0
- package/dist/web/assets/chunk-EBZ3SEQC-DYMBSe-a.js +2 -0
- package/dist/web/assets/chunk-JWPE2WC7-D7hN7LFG.js +1 -0
- package/dist/web/assets/chunk-KTR4FSNJ-DNqOwqFL.js +1 -0
- package/dist/web/assets/chunk-XXDRQBXY-ZgzK0pt4.js +1 -0
- package/dist/web/assets/classDiagram-v2-IZLYA2OM-CA7bnKxc.js +217 -0
- package/dist/web/assets/cose-bilkent-JH36ORCC-DOKkzmxA.js +1 -0
- package/dist/web/assets/cynefin-EF2NZ3EQ-C-bSVtsc.js +141 -0
- package/dist/web/assets/cynefinDiagram-NJNITYFG-C37MEEtf.js +62 -0
- package/dist/web/assets/cytoscape.esm-Bw5aGq32.js +332 -0
- package/dist/web/assets/d3-scale-4DPf7zan.js +1 -0
- package/dist/web/assets/dagre-KIHZ2IZ3-9ncwFAl9.js +4 -0
- package/dist/web/assets/diagram-7YQZDPLS-B5nOmdUq.js +41 -0
- package/dist/web/assets/diagram-QBROCOUO-C2R6lDiO.js +200 -0
- package/dist/web/assets/diagram-RJJCUUZO-C6CCweHA.js +30 -0
- package/dist/web/assets/diagram-WERXNKYE-BMvmqzmc.js +24 -0
- package/dist/web/assets/diagram-YHHI257C-mq9rFYCr.js +3 -0
- package/dist/web/assets/diagram-YR4HJLHV-GnLZxfuk.js +24 -0
- package/dist/web/assets/ebnfDiagram-N527522P-BD49AZHw.js +1 -0
- package/dist/web/assets/elk-O5DQBFGD-BPi3gK_q.js +27 -0
- package/dist/web/assets/erDiagram-GT5GOJPG-v00zB8rw.js +99 -0
- package/dist/web/assets/flowDiagram-JAYNFW54-DIf4aoDB.js +213 -0
- package/dist/web/assets/ganttDiagram-3PRQTZWP-DRl_shHP.js +292 -0
- package/dist/web/assets/gitGraphDiagram-VXDFKS5L-2RrHppJt.js +106 -0
- package/dist/web/assets/graph-Bn3Yngep.js +1 -0
- package/dist/web/assets/grid-E2QIVN74-BuI-3sqA.js +1 -0
- package/dist/web/assets/index-5BTf4y0R.css +1 -0
- package/dist/web/assets/index-CtfDl2Kw.js +358 -0
- package/dist/web/assets/infoDiagram-ATMJ4U3S-afgUHtXU.js +2 -0
- package/dist/web/assets/ishikawaDiagram-S3EKX5GW-BsIUfApm.js +70 -0
- package/dist/web/assets/journeyDiagram-POQNLL5X-BM1Liuxy.js +139 -0
- package/dist/web/assets/kanban-definition-BH5XI6FM-Bz439vDv.js +89 -0
- package/dist/web/assets/katex-Be3d8Y4U.js +257 -0
- package/dist/web/assets/mermaid.core-CDkqDmQh.js +314 -0
- package/dist/web/assets/mindmap-definition-WVAN44T4-DcgvDd37.js +98 -0
- package/dist/web/assets/pegDiagram-D4NLKWP3-Bs1FcfRL.js +1 -0
- package/dist/web/assets/pieDiagram-36ENHN4W-CX3-kIFy.js +39 -0
- package/dist/web/assets/quadrantDiagram-ZQUDMS73-CrSg-66H.js +7 -0
- package/dist/web/assets/railroadDiagram-JIZHGYPL-DBm7mKc_.js +1 -0
- package/dist/web/assets/render-VIF2ZAQL-CjnzRbOQ.js +2 -0
- package/dist/web/assets/requirementDiagram-AXW2TVFA--vkT5OaJ.js +84 -0
- package/dist/web/assets/sankeyDiagram-FBCJTAIF-CXyuNpgP.js +40 -0
- package/dist/web/assets/sequenceDiagram-3LA2ROMG-Cfn5c7T5.js +169 -0
- package/dist/web/assets/sizeCapture-2Q2CQKSF-CQJexuw3.js +1 -0
- package/dist/web/assets/stateDiagram-v2-XZFR63ZJ-W23Y_4Yd.js +291 -0
- package/dist/web/assets/swimlanes-YQL5WMAO-B8ymV9uv.js +1 -0
- package/dist/web/assets/swimlanesDiagram-BA3ZWDFA-ClHf-9J2.js +8 -0
- package/dist/web/assets/timeline-definition-7Z437IG3-BElgSf_v.js +120 -0
- package/dist/web/assets/usecaseDiagram-RDK6N6HP-BfopeYcl.js +370 -0
- package/dist/web/assets/vennDiagram-SHRQU5PJ-034PLwGh.js +34 -0
- package/dist/web/assets/wardleyDiagram-F3OXNVQS-Cmiyei3a.js +78 -0
- package/dist/web/assets/xychartDiagram-GDYJKCDI-DxF4glgl.js +7 -0
- package/dist/web/index.html +13 -0
- package/package.json +42 -4
- package/scripts/git-worktree.mjs +63 -0
- package/scripts/slate-cli.mjs +851 -0
- package/skills/slate-card/SKILL.md +109 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const o of u)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(u){if(u.ep)return;u.ep=!0;const o=l(u);fetch(u.href,o)}})();var i4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rb(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _d={exports:{}},ks={};/**
|
|
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 Dx;function A2(){if(Dx)return ks;Dx=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(s,u,o){var d=null;if(o!==void 0&&(d=""+o),u.key!==void 0&&(d=""+u.key),"key"in u){o={};for(var m in u)m!=="key"&&(o[m]=u[m])}else o=u;return u=o.ref,{$$typeof:n,type:s,key:d,ref:u!==void 0?u:null,props:o}}return ks.Fragment=i,ks.jsx=l,ks.jsxs=l,ks}var Mx;function z2(){return Mx||(Mx=1,_d.exports=A2()),_d.exports}var c=z2(),Td={exports:{}},Pe={};/**
|
|
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 Rx;function O2(){if(Rx)return Pe;Rx=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),b=Symbol.iterator;function k(A){return A===null||typeof A!="object"?null:(A=b&&A[b]||A["@@iterator"],typeof A=="function"?A:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,E={};function D(A,te,me){this.props=A,this.context=te,this.refs=E,this.updater=me||C}D.prototype.isReactComponent={},D.prototype.setState=function(A,te){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,te,"setState")},D.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function I(){}I.prototype=D.prototype;function G(A,te,me){this.props=A,this.context=te,this.refs=E,this.updater=me||C}var ie=G.prototype=new I;ie.constructor=G,T(ie,D.prototype),ie.isPureReactComponent=!0;var O=Array.isArray;function R(){}var V={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function H(A,te,me){var we=me.ref;return{$$typeof:n,type:A,key:te,ref:we!==void 0?we:null,props:me}}function U(A,te){return H(A.type,te,A.props)}function P(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ee(A){var te={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(me){return te[me]})}var ge=/\/+/g;function ce(A,te){return typeof A=="object"&&A!==null&&A.key!=null?ee(""+A.key):te.toString(36)}function F(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(R,R):(A.status="pending",A.then(function(te){A.status==="pending"&&(A.status="fulfilled",A.value=te)},function(te){A.status==="pending"&&(A.status="rejected",A.reason=te)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function ue(A,te,me,we,Q){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var Ee=!1;if(A===null)Ee=!0;else switch(ye){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(A.$$typeof){case n:case i:Ee=!0;break;case x:return Ee=A._init,ue(Ee(A._payload),te,me,we,Q)}}if(Ee)return Q=Q(A),Ee=we===""?"."+ce(A,0):we,O(Q)?(me="",Ee!=null&&(me=Ee.replace(ge,"$&/")+"/"),ue(Q,te,me,"",function(Re){return Re})):Q!=null&&(P(Q)&&(Q=U(Q,me+(Q.key==null||A&&A.key===Q.key?"":(""+Q.key).replace(ge,"$&/")+"/")+Ee)),te.push(Q)),1;Ee=0;var ve=we===""?".":we+":";if(O(A))for(var Z=0;Z<A.length;Z++)we=A[Z],ye=ve+ce(we,Z),Ee+=ue(we,te,me,ye,Q);else if(Z=k(A),typeof Z=="function")for(A=Z.call(A),Z=0;!(we=A.next()).done;)we=we.value,ye=ve+ce(we,Z++),Ee+=ue(we,te,me,ye,Q);else if(ye==="object"){if(typeof A.then=="function")return ue(F(A),te,me,we,Q);throw te=String(A),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function fe(A,te,me){if(A==null)return A;var we=[],Q=0;return ue(A,we,"","",function(ye){return te.call(me,ye,Q++)}),we}function ke(A){if(A._status===-1){var te=A._result,me=te();me.then(function(we){(A._status===0||A._status===-1)&&(A._status=1,A._result=we,me.status===void 0&&(me.status="fulfilled",me.value=we))},function(we){(A._status===0||A._status===-1)&&(A._status=2,A._result=we,me.status===void 0&&(me.status="rejected",me.reason=we))}),A._status===-1&&(A._status=0,A._result=me)}if(A._status===1)return A._result.default;throw A._result}var j=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function je(A){var te=V.T,me={};me.types=te!==null?te.types:null,V.T=me;try{var we=A(),Q=V.S;Q!==null&&Q(me,we),typeof we=="object"&&we!==null&&typeof we.then=="function"&&we.then(R,j)}catch(ye){j(ye)}finally{te!==null&&me.types!==null&&(te.types=me.types),V.T=te}}function Ne(A){var te=V.T;if(te!==null){var me=te.types;me===null?te.types=[A]:me.indexOf(A)===-1&&me.push(A)}else je(Ne.bind(null,A))}var _={map:fe,forEach:function(A,te,me){fe(A,function(){te.apply(this,arguments)},me)},count:function(A){var te=0;return fe(A,function(){te++}),te},toArray:function(A){return fe(A,function(te){return te})||[]},only:function(A){if(!P(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Pe.Activity=y,Pe.Children=_,Pe.Component=D,Pe.Fragment=l,Pe.Profiler=u,Pe.PureComponent=G,Pe.StrictMode=s,Pe.Suspense=p,Pe.ViewTransition=S,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return V.H.useMemoCache(A)}},Pe.addTransitionType=Ne,Pe.cache=function(A){return function(){return A.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(A,te,me){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var we=T({},A.props),Q=A.key;if(te!=null)for(ye in te.key!==void 0&&(Q=""+te.key),te)!ae.call(te,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&te.ref===void 0||(we[ye]=te[ye]);var ye=arguments.length-2;if(ye===1)we.children=me;else if(1<ye){for(var Ee=Array(ye),ve=0;ve<ye;ve++)Ee[ve]=arguments[ve+2];we.children=Ee}return H(A.type,Q,we)},Pe.createContext=function(A){return A={$$typeof:d,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:o,_context:A},A},Pe.createElement=function(A,te,me){var we,Q={},ye=null;if(te!=null)for(we in te.key!==void 0&&(ye=""+te.key),te)ae.call(te,we)&&we!=="key"&&we!=="__self"&&we!=="__source"&&(Q[we]=te[we]);var Ee=arguments.length-2;if(Ee===1)Q.children=me;else if(1<Ee){for(var ve=Array(Ee),Z=0;Z<Ee;Z++)ve[Z]=arguments[Z+2];Q.children=ve}if(A&&A.defaultProps)for(we in Ee=A.defaultProps,Ee)Q[we]===void 0&&(Q[we]=Ee[we]);return H(A,ye,Q)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(A){return{$$typeof:m,render:A}},Pe.isValidElement=P,Pe.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ke}},Pe.memo=function(A,te){return{$$typeof:g,type:A,compare:te===void 0?null:te}},Pe.startTransition=je,Pe.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Pe.use=function(A){return V.H.use(A)},Pe.useActionState=function(A,te,me){return V.H.useActionState(A,te,me)},Pe.useCallback=function(A,te){return V.H.useCallback(A,te)},Pe.useContext=function(A){return V.H.useContext(A)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(A,te){return V.H.useDeferredValue(A,te)},Pe.useEffect=function(A,te){return V.H.useEffect(A,te)},Pe.useEffectEvent=function(A){return V.H.useEffectEvent(A)},Pe.useId=function(){return V.H.useId()},Pe.useImperativeHandle=function(A,te,me){return V.H.useImperativeHandle(A,te,me)},Pe.useInsertionEffect=function(A,te){return V.H.useInsertionEffect(A,te)},Pe.useLayoutEffect=function(A,te){return V.H.useLayoutEffect(A,te)},Pe.useMemo=function(A,te){return V.H.useMemo(A,te)},Pe.useOptimistic=function(A,te){return V.H.useOptimistic(A,te)},Pe.useReducer=function(A,te,me){return V.H.useReducer(A,te,me)},Pe.useRef=function(A){return V.H.useRef(A)},Pe.useState=function(A){return V.H.useState(A)},Pe.useSyncExternalStore=function(A,te,me){return V.H.useSyncExternalStore(A,te,me)},Pe.useTransition=function(){return V.H.useTransition()},Pe.version="19.3.1",Pe}var Lx;function Oh(){return Lx||(Lx=1,Td.exports=O2()),Td.exports}var N=Oh();const D2=rb(N);var Ad={exports:{}},ws={},zd={exports:{}},Od={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Bx;function M2(){return Bx||(Bx=1,(function(n){function i(F,ue){var fe=F.length;F.push(ue);e:for(;0<fe;){var ke=fe-1>>>1,j=F[ke];if(0<u(j,ue))F[ke]=ue,F[fe]=j,fe=ke;else break e}}function l(F){return F.length===0?null:F[0]}function s(F){if(F.length===0)return null;var ue=F[0],fe=F.pop();if(fe!==ue){F[0]=fe;e:for(var ke=0,j=F.length,je=j>>>1;ke<je;){var Ne=2*(ke+1)-1,_=F[Ne],A=Ne+1,te=F[A];if(0>u(_,fe))A<j&&0>u(te,_)?(F[ke]=te,F[A]=fe,ke=A):(F[ke]=_,F[Ne]=fe,ke=Ne);else if(A<j&&0>u(te,fe))F[ke]=te,F[A]=fe,ke=A;else break e}}return ue}function u(F,ue){var fe=F.sortIndex-ue.sortIndex;return fe!==0?fe:F.id-ue.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],x=1,y=null,S=3,b=!1,k=!1,C=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function G(F){for(var ue=l(g);ue!==null;){if(ue.callback===null)s(g);else if(ue.startTime<=F)s(g),ue.sortIndex=ue.expirationTime,i(p,ue);else break;ue=l(g)}}function ie(F){if(C=!1,G(F),!k)if(l(p)!==null)k=!0,O||(O=!0,P());else{var ue=l(g);ue!==null&&ce(ie,ue.startTime-F)}}var O=!1,R=-1,V=5,ae=-1;function H(){return T?!0:!(n.unstable_now()-ae<V)}function U(){if(T=!1,O){var F=n.unstable_now();ae=F;var ue=!0;try{e:{k=!1,C&&(C=!1,D(R),R=-1),b=!0;var fe=S;try{t:{for(G(F),y=l(p);y!==null&&!(y.expirationTime>F&&H());){var ke=y.callback;if(typeof ke=="function"){y.callback=null,S=y.priorityLevel;var j=ke(y.expirationTime<=F);if(F=n.unstable_now(),typeof j=="function"){y.callback=j,G(F),ue=!0;break t}y===l(p)&&s(p),G(F)}else s(p);y=l(p)}if(y!==null)ue=!0;else{var je=l(g);je!==null&&ce(ie,je.startTime-F),ue=!1}}break e}finally{y=null,S=fe,b=!1}ue=void 0}}finally{ue?P():O=!1}}}var P;if(typeof I=="function")P=function(){I(U)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ge=ee.port2;ee.port1.onmessage=U,P=function(){ge.postMessage(null)}}else P=function(){E(U,0)};function ce(F,ue){R=E(function(){F(n.unstable_now())},ue)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(F){F.callback=null},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(F){switch(S){case 1:case 2:case 3:var ue=3;break;default:ue=S}var fe=S;S=ue;try{return F()}finally{S=fe}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(F,ue){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var fe=S;S=F;try{return ue()}finally{S=fe}},n.unstable_scheduleCallback=function(F,ue,fe){var ke=n.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?ke+fe:ke):fe=ke,F){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=fe+j,F={id:x++,callback:ue,priorityLevel:F,startTime:fe,expirationTime:j,sortIndex:-1},fe>ke?(F.sortIndex=fe,i(g,F),l(p)===null&&F===l(g)&&(C?(D(R),R=-1):C=!0,ce(ie,fe-ke))):(F.sortIndex=j,i(p,F),k||b||(k=!0,O||(O=!0,P()))),F},n.unstable_shouldYield=H,n.unstable_wrapCallback=function(F){var ue=S;return function(){var fe=S;S=ue;try{return F.apply(this,arguments)}finally{S=fe}}}})(Od)),Od}var Ix;function R2(){return Ix||(Ix=1,zd.exports=M2()),zd.exports}var Dd={exports:{}},vn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ux;function L2(){if(Ux)return vn;Ux=1;var n=Oh();function i(x){var y="https://react.dev/errors/"+x;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)y+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var s={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal"),o=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function m(x,y,S){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:b===d?d:""+b,children:x,containerInfo:y,implementation:S}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(x,y){if(x==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,vn.browser=function(x){return{$$typeof:o,_reason:x}},vn.createPortal=function(x,y){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(i(299));return m(x,y,null,S)},vn.flushSync=function(x){var y=p.T,S=s.p;try{if(p.T=null,s.p=2,x)return x()}finally{p.T=y,s.p=S,s.d.f()}},vn.preconnect=function(x,y){typeof x=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,s.d.C(x,y))},vn.prefetchDNS=function(x){typeof x=="string"&&s.d.D(x)},vn.preinit=function(x,y){if(typeof x=="string"&&y&&typeof y.as=="string"){var S=y.as,b=g(S,y.crossOrigin),k=typeof y.integrity=="string"?y.integrity:void 0,C=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;S==="style"?s.d.S(x,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:b,integrity:k,fetchPriority:C}):S==="script"&&s.d.X(x,{crossOrigin:b,integrity:k,fetchPriority:C,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},vn.preinitModule=function(x,y){if(typeof x=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var S=g(y.as,y.crossOrigin);s.d.M(x,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&s.d.M(x)},vn.preload=function(x,y){if(typeof x=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var S=y.as,b=g(S,y.crossOrigin);s.d.L(x,S,{crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},vn.preloadModule=function(x,y){if(typeof x=="string")if(y){var S=g(y.as,y.crossOrigin);s.d.m(x,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else s.d.m(x)},vn.requestFormReset=function(x){s.d.r(x)},vn.unstable_batchedUpdates=function(x,y){return x(y)},vn.useFormState=function(x,y,S){return p.H.useFormState(x,y,S)},vn.useFormStatus=function(){return p.H.useHostTransitionStatus()},vn.version="19.3.1",vn}var Hx;function sb(){if(Hx)return Dd.exports;Hx=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Dd.exports=L2(),Dd.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var qx;function B2(){if(qx)return ws;qx=1;var n=R2(),i=Oh(),l=sb();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,a=t;a&&!a.alternate;)t=a,(t.flags&4098)!==0&&(e=t.return),a=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(s(188))}function g(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,r=t;;){var f=a.return;if(f===null)break;var h=f.alternate;if(h===null){if(r=f.return,r!==null){a=r;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===a)return p(f),e;if(h===r)return p(f),t;h=h.sibling}throw Error(s(188))}if(a.return!==r.return)a=f,r=h;else{for(var v=!1,w=f.child;w;){if(w===a){v=!0,a=f,r=h;break}if(w===r){v=!0,r=f,a=h;break}w=w.sibling}if(!v){for(w=h.child;w;){if(w===a){v=!0,a=h,r=f;break}if(w===r){v=!0,r=h,a=f;break}w=w.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==r)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function y(e,t,a,r,f,h){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&a(e,r,f,h)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&y(e.child,t,a,r,f,h))return!0;e=e.sibling}return!1}function S(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function b(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function k(e){var t=[null,null],a=S(e);return a===null||C(t,e,a.child,{foundSelf:!1}),t}function C(e,t,a,r){for(;a!==null;){if(a===t)r.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(r.foundSelf)return e[1]=a,!0;e[0]=a}else if((a.tag!==22||a.memoizedState===null)&&C(e,t,a.child,r))return!0;a=a.sibling}return!1}function T(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(s(559))}}var E=null,D=null;function I(e,t,a){return e===a?!0:e===t?(E=e,!0):!1}function G(e,t,a){return e===a?(D=e,!1):e===t?(D!==null&&(E=e),!0):!1}function ie(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function O(e,t,a){for(var r=0,f=e;f;f=a(f))r++;f=0;for(var h=t;h;h=a(h))f++;for(;0<r-f;)e=a(e),r--;for(;0<f-r;)t=a(t),f--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=a(e),t=a(t)}return null}var R=Object.assign,V=Symbol.for("react.element"),ae=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),ge=Symbol.for("react.consumer"),ce=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),je=Symbol.for("react.activity"),Ne=Symbol.for("react.legacy_hidden"),_=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),te=Symbol.for("react.recoverable"),me=Symbol.iterator;function we(e){return e===null||typeof e!="object"?null:(e=me&&e[me]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case ee:return"Profiler";case P:return"StrictMode";case ue:return"Suspense";case fe:return"SuspenseList";case je:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case ce:return e.displayName||"Context";case ge:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var Ee=Array.isArray,ve=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re={pending:!1,data:null,method:null,action:null},Se=[],Ke=-1;function Ge(e){return{current:e}}function Le(e){0>Ke||(e.current=Se[Ke],Se[Ke]=null,Ke--)}function ne(e,t){Ke++,Se[Ke]=e.current,e.current=t}var Be=Ge(null),at=Ge(null),He=Ge(null),Ct=Ge(null);function qt(e,t){switch(ne(He,t),ne(at,e),ne(Be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vy(t),e=$y(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Le(Be),ne(Be,e)}function ln(){Le(Be),Le(at),Le(He)}function St(e){var t=e.memoizedState;t!==null&&(pr._currentValue=t.memoizedState,ne(Ct,e)),t=Be.current;var a=$y(t,e.type);t!==a&&(ne(at,e),ne(Be,a))}function En(e){at.current===e&&(Le(Be),Le(at)),Ct.current===e&&(Le(Ct),pr._currentValue=Re)}var J,de;function _e(e){if(J===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);J=t&&t[1]||"",de=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+J+e+de}var L=!1;function he(e,t){if(!e||L)return"";L=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(Ce){var q=Ce}Reflect.construct(e,[],se)}else{try{se.call()}catch(Ce){q=Ce}se=!1;try{var K=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),se=!0,new e}finally{se&&(K!==void 0?Object.defineProperty(e.prototype,"props",K):delete e.prototype.props)}}}else{try{throw Error()}catch(Ce){q=Ce}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Ce){if(Ce&&q&&typeof Ce.stack=="string")return[Ce.stack,q.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),v=h[0],w=h[1];if(v&&w){var z=v.split(`
|
|
44
|
+
`),Y=w.split(`
|
|
45
|
+
`);for(f=r=0;r<z.length&&!z[r].includes("DetermineComponentFrameRoot");)r++;for(;f<Y.length&&!Y[f].includes("DetermineComponentFrameRoot");)f++;if(r===z.length||f===Y.length)for(r=z.length-1,f=Y.length-1;1<=r&&0<=f&&z[r]!==Y[f];)f--;for(;1<=r&&0<=f;r--,f--)if(z[r]!==Y[f]){if(r!==1||f!==1)do if(r--,f--,0>f||z[r]!==Y[f]){var W=`
|
|
46
|
+
`+z[r].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=r&&0<=f);break}}}finally{L=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_e(a):""}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==t&&t!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return _e("Activity");case 30:return _e("ViewTransition");default:return""}}function Fe(e){try{var t="",a=null;do t+=Te(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var wt=Object.prototype.hasOwnProperty,jt=n.unstable_scheduleCallback,Et=n.unstable_cancelCallback,Ze=n.unstable_shouldYield,kn=n.unstable_requestPaint,ze=n.unstable_now,gt=n.unstable_getCurrentPriorityLevel,Xt=n.unstable_ImmediatePriority,Ft=n.unstable_UserBlockingPriority,$n=n.unstable_NormalPriority,_n=n.unstable_LowPriority,ei=n.unstable_IdlePriority,oa=n.log,le=n.unstable_setDisableYieldValue,Oe=null,Me=null;function ht(e){if(typeof oa=="function"&&le(e),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Oe,e)}catch{}}var _t=Math.clz32?Math.clz32:hn,wn=Math.log,dn=Math.LN2;function hn(e){return e>>>=0,e===0?32:31-(wn(e)/dn|0)|0}var ti=256,Ut=262144,rn=4194304;function yi(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xi(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var f=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~h,r!==0?f=yi(r):(v&=w,v!==0?f=yi(v):a||(a=w&~e,a!==0&&(f=yi(a))))):(w=r&~h,w!==0?f=yi(w):v!==0?f=yi(v):a||(a=r&~e,a!==0&&(f=yi(a)))),f===0?0:t!==0&&t!==f&&(t&h)===0&&(h=f&-f,a=t&-t,h>=a||h===32&&(a&4194048)!==0)?t:f}function ca(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qs(e,t){(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-_t(a),f=1<<r;t|=e[r],a&=~f}return t}function tc(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Xs(){var e=rn;return rn<<=1,(rn&62914560)===0&&(rn=4194304),e}function Tr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ja(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nc(e,t,a,r,f,h){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,z=e.expirationTimes,Y=e.hiddenUpdates;for(a=v&~a;0<a;){var W=31-_t(a),se=1<<W;w[W]=0,z[W]=-1;var q=Y[W];if(q!==null)for(Y[W]=null,W=0;W<q.length;W++){var K=q[W];K!==null&&(K.lane&=-536870913)}a&=~se}r!==0&&Ar(e,r,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~t))}function Ar(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-_t(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function zr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-_t(a),f=1<<r;f&t|e[r]&t&&(e[r]|=t),a&=~f}}function zl(e,t){var a=t&-t;return a=(a&42)!==0?1:Or(a),(a&(e.suspendedLanes|t))!==0?0:a}function Or(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Dr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fs(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:jx(e.type))}function Ks(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var vi=Math.random().toString(36).slice(2),nn="__reactFiber$"+vi,Nn="__reactProps$"+vi,fa="__reactContainer$"+vi,M="__reactEvents$"+vi,oe="__reactListeners$"+vi,Ve="__reactHandles$"+vi,yt="__reactResources$"+vi,Ot="__reactMarker$"+vi,ni="__reactLoad$"+vi;function Tn(e){delete e[nn],delete e[Nn],delete e[oe],delete e[Ve]}function Zi(e){var t;if(t=e[nn])return t;for(var a=e.parentNode;a;){if(t=a[fa]||a[nn]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=rx(e);e!==null;){if(a=e[nn])return a;e=rx(e)}return t}e=a,a=e.parentNode}return null}function _i(e){if(e=e[nn]||e[fa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ti(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function da(e){var t=e[yt];return t||(t=e[yt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function sn(e){e[Ot]=!0}function wm(e){e[ni]=void 0}var Nm=new Set,Cm={};function Wa(e,t){Ol(e,t),Ol(e+"Capture",t)}function Ol(e,t){for(Cm[e]=t,e=0;e<t.length;e++)Nm.add(t[e])}var X1=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]*$"),jm={},Em={};function F1(e){return wt.call(Em,e)?!0:wt.call(jm,e)?!1:X1.test(e)?Em[e]=!0:(jm[e]=!0,!1)}var vt=!1;function _m(){var e=vt;return vt=!1,e}function Ps(e,t,a){if(F1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,a)}}function Js(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,a)}}function Yi(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,r)}}function Zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function K1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,h.call(this,v)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ic(e){if(!e._valueTracker){var t=Tm(e)?"checked":"value";e._valueTracker=K1(e,t,""+e[t])}}function Am(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Tm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}var P1=/[\n"\\]/g;function ii(e){return e.replace(P1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ac(e,t,a,r,f,h,v,w){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zn(t)):e.value!==""+Zn(t)&&(e.value=""+Zn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?v==="number"&&e.value==t?lc(e,Zn(e.value)):lc(e,Zn(t)):a!=null?lc(e,Zn(a)):r!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Zn(w):e.removeAttribute("name")}function zm(e,t,a,r,f,h,v,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){ic(e);return}a=a!=null?""+Zn(a):"",t=t!=null?""+Zn(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),ic(e)}function lc(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Dl(e,t,a,r){if(e=e.options,t){t={};for(var f=0;f<a.length;f++)t["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=t.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&r&&(e[a].defaultSelected=!0)}else{for(a=""+Zn(a),t=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Om(e,t,a){if(t!=null&&(t=""+Zn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Zn(a):""}function Dm(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(s(92));if(Ee(r)){if(1<r.length)throw Error(s(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=Zn(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),ic(e)}function Ml(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var J1=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 Mm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||J1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Rm(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",vt=!0);for(var f in t)r=t[f],t.hasOwnProperty(f)&&a[f]!==r&&(Mm(e,f,r),vt=!0)}else for(var h in t)t.hasOwnProperty(h)&&Mm(e,h,t[h])}function rc(e){if(e.indexOf("-")===-1)return!1;switch(e){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 W1=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"],["maskType","mask-type"],["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"]]),e0=/^[\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 Ws(e){return e0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ai(){}var sc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rl=null,Ll=null;function Lm(e){var t=_i(e);if(t&&(e=t.stateNode)){var a=e[Nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(ac(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ii(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var f=r[Nn]||null;if(!f)throw Error(s(90));ac(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&Am(r)}break e;case"textarea":Om(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Dl(e,!!a.multiple,t,!1)}}}var oc=!1;function Bm(e,t,a){if(oc)return e(t,a);oc=!0;try{var r=e(t);return r}finally{if(oc=!1,(Rl!==null||Ll!==null)&&(Wu(),Rl&&(t=Rl,e=Ll,Ll=Rl=null,Lm(t),e)))for(t=0;t<e.length;t++)Lm(e[t])}}function Mr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[Nn]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cc=!1;if(Gi)try{var Rr={};Object.defineProperty(Rr,"passive",{get:function(){cc=!0}}),window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{cc=!1}var ha=null,fc=null,eu=null;function Im(){if(eu)return eu;var e,t=fc,a=t.length,r,f="value"in ha?ha.value:ha.textContent,h=f.length;for(e=0;e<a&&t[e]===f[e];e++);var v=a-e;for(r=1;r<=v&&t[a-r]===f[h-r];r++);return eu=f.slice(e,1<r?1-r:void 0)}function tu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nu(){return!0}function Um(){return!1}function An(e){function t(a,r,f,h,v){this._reactName=a,this._targetInst=f,this.type=r,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?nu:Um,this.isPropagationStopped=Um,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=nu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),t}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=An(ma),Lr=R({},ma,{view:0,detail:0}),t0=An(Lr),dc,hc,Br,au=R({},Lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Br&&(Br&&e.type==="mousemove"?(dc=e.screenX-Br.screenX,hc=e.screenY-Br.screenY):hc=dc=0,Br=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:hc}}),Hm=An(au),n0=R({},au,{dataTransfer:0}),i0=An(n0),a0=R({},Lr,{relatedTarget:0}),mc=An(a0),l0=R({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),r0=An(l0),s0=R({},ma,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u0=An(s0),o0=R({},ma,{data:0}),qm=An(o0),c0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f0={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"},d0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=d0[e])?!!t[e]:!1}function pc(){return h0}var m0=R({},Lr,{key:function(e){if(e.key){var t=c0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),p0=An(m0),g0=R({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vm=An(g0),y0=R({},ma,{submitter:0}),x0=An(y0),v0=R({},Lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),b0=An(v0),S0=R({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),k0=An(S0),w0=R({},au,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),N0=An(w0),C0=R({},ma,{newState:0,oldState:0,source:0}),j0=An(C0),E0=[9,13,27,32],gc=Gi&&"CompositionEvent"in window,Ir=null;Gi&&"documentMode"in document&&(Ir=document.documentMode);var _0=Gi&&"TextEvent"in window&&!Ir,$m=Gi&&(!gc||Ir&&8<Ir&&11>=Ir),Zm=" ",Ym=!1;function Gm(e,t){switch(e){case"keyup":return E0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bl=!1;function T0(e,t){switch(e){case"compositionend":return Qm(t);case"keypress":return t.which!==32?null:(Ym=!0,Zm);case"textInput":return e=t.data,e===Zm&&Ym?null:e;default:return null}}function A0(e,t){if(Bl)return e==="compositionend"||!gc&&Gm(e,t)?(e=Im(),eu=fc=ha=null,Bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $m&&t.locale!=="ko"?null:t.data;default:return null}}var z0={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 Xm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z0[e.type]:t==="textarea"}function Fm(e,t,a,r){Rl?Ll?Ll.push(r):Ll=[r]:Rl=r,t=lo(t,"onChange"),0<t.length&&(a=new iu("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Ur=null,Hr=null;function O0(e){Ly(e,0)}function lu(e){var t=Ti(e);if(Am(t))return e}function Km(e,t){if(e==="change")return t}var Pm=!1;if(Gi){var yc;if(Gi){var xc="oninput"in document;if(!xc){var Jm=document.createElement("div");Jm.setAttribute("oninput","return;"),xc=typeof Jm.oninput=="function"}yc=xc}else yc=!1;Pm=yc&&(!document.documentMode||9<document.documentMode)}function Wm(){Ur&&(Ur.detachEvent("onpropertychange",ep),Hr=Ur=null)}function ep(e){if(e.propertyName==="value"&&lu(Hr)){var t=[];Fm(t,Hr,e,uc(e)),Bm(O0,t)}}function D0(e,t,a){e==="focusin"?(Wm(),Ur=t,Hr=a,Ur.attachEvent("onpropertychange",ep)):e==="focusout"&&Wm()}function M0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lu(Hr)}function R0(e,t){if(e==="click")return lu(t)}function L0(e,t){if(e==="input"||e==="change")return lu(t)}function B0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yn=typeof Object.is=="function"?Object.is:B0;function qr(e,t){if(Yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var f=a[r];if(!wt.call(t,f)||!Yn(e[f],t[f]))return!1}return!0}function vc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function np(e,t){var a=tp(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=tp(a)}}function ip(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ip(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ap(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vc(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=vc(e.document)}return t}function bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var I0=Gi&&"documentMode"in document&&11>=document.documentMode,Il=null,Sc=null,Vr=null,kc=!1;function lp(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;kc||Il==null||Il!==vc(r)||(r=Il,"selectionStart"in r&&bc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&qr(Vr,r)||(Vr=r,r=lo(Sc,"onSelect"),0<r.length&&(t=new iu("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Il)))}function el(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ul={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionrun:el("Transition","TransitionRun"),transitionstart:el("Transition","TransitionStart"),transitioncancel:el("Transition","TransitionCancel"),transitionend:el("Transition","TransitionEnd")},wc={},rp={};Gi&&(rp=document.createElement("div").style,"AnimationEvent"in window||(delete Ul.animationend.animation,delete Ul.animationiteration.animation,delete Ul.animationstart.animation),"TransitionEvent"in window||delete Ul.transitionend.transition);function tl(e){if(wc[e])return wc[e];if(!Ul[e])return e;var t=Ul[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in rp)return wc[e]=t[a];return e}var sp=tl("animationend"),up=tl("animationiteration"),op=tl("animationstart"),U0=tl("transitionrun"),H0=tl("transitionstart"),q0=tl("transitioncancel"),cp=tl("transitionend"),fp=new Map,Nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Nc.push("scrollEnd");function bi(e,t){fp.set(e,t),Wa(t,[e])}var V0=0;function Qi(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Ni.identifierPrefix;var a=V0++;return e="_"+e+"t_"+a.toString(32)+"_",t.autoName=e}function dp(e){if(e==null||typeof e=="string")return e;var t=null,a=lr;if(a!==null)for(var r=0;r<a.length;r++){var f=e[a[r]];if(f!=null){if(f==="none")return"none";t=t==null?f:t+(" "+f)}}return t??e.default}function Xi(e,t){return e=dp(e),t=dp(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var ru=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ai=[],Hl=0,Cc=0;function su(){for(var e=Hl,t=Cc=Hl=0;t<e;){var a=ai[t];ai[t++]=null;var r=ai[t];ai[t++]=null;var f=ai[t];ai[t++]=null;var h=ai[t];if(ai[t++]=null,r!==null&&f!==null){var v=r.pending;v===null?f.next=f:(f.next=v.next,v.next=f),r.pending=f}h!==0&&hp(a,f,h)}}function uu(e,t,a,r){ai[Hl++]=e,ai[Hl++]=t,ai[Hl++]=a,ai[Hl++]=r,Cc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function jc(e,t,a,r){return uu(e,t,a,r),ou(e)}function nl(e,t){return uu(e,null,null,t),ou(e)}function hp(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var f=!1,h=e.return;h!==null;)h.childLanes|=a,r=h.alternate,r!==null&&(r.childLanes|=a),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&t!==null&&(f=31-_t(a),e=h.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=a|536870912),h):null}function ou(e){if(50<cs)throw cs=0,Ju=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ql={};function $0(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rn(e,t,a,r){return new $0(e,t,a,r)}function Ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var a=e.alternate;return a===null?(a=Rn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&1206910976,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function mp(e,t){e.flags&=1206910978;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function cu(e,t,a,r,f,h){var v=0;if(r=e,typeof r=="function")Ec(r)&&(v=1);else if(typeof r=="string")v=y2(e,a,Be.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case je:return e=Rn(31,a,t,f),e.elementType=je,e.lanes=h,e;case U:return il(a.children,f,h,t);case P:v=8,f|=24;break;case ee:return e=Rn(12,a,t,f|2),e.elementType=ee,e.lanes=h,e;case ue:return e=Rn(13,a,t,f),e.elementType=ue,e.lanes=h,e;case fe:return e=Rn(19,a,t,f),e.elementType=fe,e.lanes=h,e;case Ne:case A:return e=f|32,e=Rn(30,a,t,e),e.elementType=A,e.lanes=h,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ce:v=10;break e;case ge:v=9;break e;case F:v=11;break e;case ke:v=14;break e;case j:v=16,r=null;break e}v=29,a=Error(s(130,e===null?"null":typeof e,"")),r=null}return t=Rn(v,a,t,f),t.elementType=e,t.type=r,t.lanes=h,t}function il(e,t,a,r){return e=Rn(7,e,r,t),e.lanes=a,e}function _c(e,t,a){return e=Rn(6,e,null,t),e.lanes=a,e}function pp(e){var t=Rn(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,a){return t=Rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gp=new WeakMap;function li(e,t){if(typeof e=="object"&&e!==null){var a=gp.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Fe(t)},gp.set(e,t),t)}return{value:e,source:t,stack:Fe(t)}}var Vl=[],$l=0,fu=null,$r=0,ri=[],si=0,pa=null,zi=1,Oi="";function Ki(e,t){Vl[$l++]=$r,Vl[$l++]=fu,fu=e,$r=t}function yp(e,t,a){ri[si++]=zi,ri[si++]=Oi,ri[si++]=pa,pa=e;var r=zi;e=Oi;var f=32-_t(r)-1;r&=~(1<<f),a+=1;var h=32-_t(t)+f;if(30<h){var v=f-f%5;h=(r&(1<<v)-1).toString(32),r>>=v,f-=v,zi=1<<32-_t(t)+f|a<<f|r,Oi=h+e}else zi=1<<h|a<<f|r,Oi=e}function du(e){e.return!==null&&(Ki(e,1),yp(e,1,0))}function Ac(e){for(;e===fu;)fu=Vl[--$l],Vl[$l]=null,$r=Vl[--$l],Vl[$l]=null;for(;e===pa;)pa=ri[--si],ri[si]=null,Oi=ri[--si],ri[si]=null,zi=ri[--si],ri[si]=null}function xp(e,t){ri[si++]=zi,ri[si++]=Oi,ri[si++]=pa,zi=t.id,Oi=t.overflow,pa=e}var un=null,Bt=null,lt=!1,ga=null,ui=!1,zc=Error(s(519));function ya(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zr(li(t,e)),zc}function vp(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[nn]=e,t[Nn]=r,a){case"dialog":ot("cancel",t),ot("close",t);break;case"iframe":case"object":case"embed":ot("load",t);break;case"video":case"audio":for(a=0;a<ds.length;a++)ot(ds[a],t);break;case"source":ot("error",t);break;case"img":case"image":case"link":ot("error",t),ot("load",t);break;case"details":ot("toggle",t);break;case"input":ot("invalid",t),zm(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ot("invalid",t);break;case"textarea":ot("invalid",t),Dm(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||Hy(t.textContent,a)?(r.popover!=null&&(ot("beforetoggle",t),ot("toggle",t)),r.onScroll!=null&&ot("scroll",t),r.onScrollEnd!=null&&ot("scrollend",t),r.onClick!=null&&(t.onclick=Ai),t=!0):t=!1,t||ya(e,!0)}function hu(e){for(un=e.return;un;)switch(un.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:un=un.return}}function Zl(e){if(e!==un)return!1;if(!lt)return hu(e),lt=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ud(e.type,e.memoizedProps)),a=!a),a&&Bt&&ya(e),hu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Bt=lx(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Bt=lx(e)}else t===27?(t=Bt,Da(e.type)?(e=yd,yd=null,Bt=e):Bt=t):Bt=un?ci(e.stateNode.nextSibling):null;return!0}function al(){Bt=un=null,lt=!1}function Oc(){var e=ga;return e!==null&&(In===null?In=e:In.push.apply(In,e),ga=null),e}function Zr(e){ga===null?ga=[e]:ga.push(e)}var Dc=Ge(null),ll=null,Pi=null;function xa(e,t,a){ne(Dc,t._currentValue),t._currentValue=a}function Ji(e){e._currentValue=Dc.current,Le(Dc)}function mu(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Mc(e,t,a,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=f;for(var z=0;z<t.length;z++)if(w.context===t[z]){h.lanes|=a,w=h.alternate,w!==null&&(w.lanes|=a),mu(h.return,a,e),r||(v=null);break e}h=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(s(341));v.lanes|=a,h=v.alternate,h!==null&&(h.lanes|=a),mu(v,a,e),v=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=a,v=f.alternate,v!==null&&(v.lanes|=a),mu(f.return,a,e),v=f.child,v=v!==null?v.sibling:null):v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function rl(e,t,a,r){e=null;for(var f=t,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var w=f.type;Yn(f.pendingProps.value,v.value)||(e!==null?e.push(w):e=[w])}}else if(f===Ct.current){if(v=f.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(pr):e=[pr])}f=f.return}return e!==null&&Mc(t,e,a,r),t.flags|=262144,e!==null}function pu(e){for(e=e.firstContext;e!==null;){if(!Yn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function sl(e){ll=e,Pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mn(e){return bp(ll,e)}function gu(e,t){return ll===null&&sl(e),bp(e,t)}function bp(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pi===null){if(e===null)throw Error(s(308));Pi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pi=Pi.next=t;return a}var Z0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Y0=n.unstable_scheduleCallback,G0=n.unstable_NormalPriority,Kt={$$typeof:ce,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rc(){return{controller:new Z0,data:new Map,refCount:0}}function Yr(e){e.refCount--,e.refCount===0&&Y0(G0,function(){e.controller.abort()})}function Sp(e,t){if((e.pendingLanes&4194048)!==0){var a=e.transitionTypes;for(a===null&&(a=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];a.indexOf(r)===-1&&a.push(r)}}}var Gr=null;function Q0(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Qr=null,Lc=0,ul=0,Yl=null;function X0(e,t){if(Qr===null){var a=Qr=[];Lc=0,ul=Wf(),Yl={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Lc++,t.then(kp,kp),t}function kp(){if(--Lc===0&&(Gr=null,Qr!==null)){Yl!==null&&(Yl.status="fulfilled");var e=Qr;Qr=null,ul=0,Yl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function F0(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<a.length;f++)(0,a[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),r}var wp=ve.S;ve.S=function(e,t){if(py=ze(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&X0(e,t),Gr!==null)for(var a=or;a!==null;)Sp(a,Gr),a=a.next;if(a=e.types,a!==null){for(var r=or;r!==null;)Sp(r,a),r=r.next;if(ul!==0){r=Gr,r===null&&(r=Gr=[]);for(var f=0;f<a.length;f++){var h=a[f];r.indexOf(h)===-1&&r.push(h)}}}wp!==null&&wp(e,t)};var ol=Ge(null);function Bc(){var e=ol.current;return e!==null?e:Mt.pooledCache}function yu(e,t){t===null?ne(ol,ol.current):ne(ol,t.pool)}function Np(){var e=Bc();return e===null?null:{parent:Kt._currentValue,pool:e}}var Gl=Error(s(460)),Ic=Error(s(474)),xu=Error(s(542)),vu={then:function(){}};function Cp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jp(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ai,Ai),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_p(e),e===void 0&&!("reason"in t)?Error(s(600)):e;default:if(typeof t.status=="string")t.then(Ai,Ai);else{if(e=Mt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_p(e),e}throw fl=t,Gl}}function cl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(fl=a,Gl):a}}var fl=null;function Ep(){if(fl===null)throw Error(s(459));var e=fl;return fl=null,e}function _p(e){if(e===Gl||e===xu)throw Error(s(483))}var Ql=null,Xr=0;function bu(e){var t=Xr;return Xr+=1,Ql===null&&(Ql=[]),jp(Ql,e,t)}function va(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Su(e,t){throw t.$$typeof===V?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Tp(e){function t($,B){if(e){var X=$.deletions;X===null?($.deletions=[B],$.flags|=16):X.push(B)}}function a($,B){if(!e)return null;for(;B!==null;)t($,B),B=B.sibling;return null}function r($){for(var B=new Map;$!==null;)$.key===null?B.set($.index,$):B.set($.key,$),$=$.sibling;return B}function f($,B){return $=Fi($,B),$.index=0,$.sibling=null,$}function h($,B,X){return $.index=X,e?(X=$.alternate,X!==null?(X=X.index,X<B?($.flags|=2,B):X):($.flags|=134217730,B)):($.flags|=1048576,B)}function v($){return e&&$.alternate===null&&($.flags|=134217730),$}function w($,B,X,re){return B===null||B.tag!==6?(B=_c(X,$.mode,re),B.return=$,B):(B=f(B,X),B.return=$,B)}function z($,B,X,re){var De=X.type;return De===U?($=W($,B,X.props.children,re,X.key),va($,X),$):B!==null&&(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===j&&cl(De)===B.type)?(B=f(B,X.props),va(B,X),B.return=$,B):(B=cu(X.type,X.key,X.props,null,$.mode,re),va(B,X),B.return=$,B)}function Y($,B,X,re){return B===null||B.tag!==4||B.stateNode.containerInfo!==X.containerInfo||B.stateNode.implementation!==X.implementation?(B=Tc(X,$.mode,re),B.return=$,B):(B=f(B,X.children||[]),B.return=$,B)}function W($,B,X,re,De){return B===null||B.tag!==7?(B=il(X,$.mode,re,De),B.return=$,B):(B=f(B,X),B.return=$,B)}function se($,B,X){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=_c(""+B,$.mode,X),B.return=$,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case ae:return X=cu(B.type,B.key,B.props,null,$.mode,X),va(X,B),X.return=$,X;case H:return B=Tc(B,$.mode,X),B.return=$,B;case j:return B=cl(B),se($,B,X)}if(Ee(B)||we(B))return B=il(B,$.mode,X,null),B.return=$,B;if(typeof B.then=="function")return se($,bu(B),X);if(B.$$typeof===ce)return se($,gu($,B),X);Su($,B)}return null}function q($,B,X,re){var De=B!==null?B.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return De!==null?null:w($,B,""+X,re);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case ae:return X.key===De?z($,B,X,re):null;case H:return X.key===De?Y($,B,X,re):null;case j:return X=cl(X),q($,B,X,re)}if(Ee(X)||we(X))return De!==null?null:W($,B,X,re,null);if(typeof X.then=="function")return q($,B,bu(X),re);if(X.$$typeof===ce)return q($,B,gu($,X),re);Su($,X)}return null}function K($,B,X,re,De){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return $=$.get(X)||null,w(B,$,""+re,De);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case ae:return $=$.get(re.key===null?X:re.key)||null,z(B,$,re,De);case H:return $=$.get(re.key===null?X:re.key)||null,Y(B,$,re,De);case j:return re=cl(re),K($,B,X,re,De)}if(Ee(re)||we(re))return $=$.get(X)||null,W(B,$,re,De,null);if(typeof re.then=="function")return K($,B,X,bu(re),De);if(re.$$typeof===ce)return K($,B,X,gu(B,re),De);Su(B,re)}return null}function Ce($,B,X,re){for(var De=null,ft=null,$e=B,Qe=B=0,Wt=null;$e!==null&&Qe<X.length;Qe++){$e.index>Qe?(Wt=$e,$e=null):Wt=$e.sibling;var mt=q($,$e,X[Qe],re);if(mt===null){$e===null&&($e=Wt);break}e&&$e&&mt.alternate===null&&t($,$e),B=h(mt,B,Qe),ft===null?De=mt:ft.sibling=mt,ft=mt,$e=Wt}if(Qe===X.length)return a($,$e),lt&&Ki($,Qe),De;if($e===null){for(;Qe<X.length;Qe++)$e=se($,X[Qe],re),$e!==null&&(B=h($e,B,Qe),ft===null?De=$e:ft.sibling=$e,ft=$e);return lt&&Ki($,Qe),De}for($e=r($e);Qe<X.length;Qe++)Wt=K($e,$,Qe,X[Qe],re),Wt!==null&&(e&&(mt=Wt.alternate,mt!==null&&$e.delete(mt.key===null?Qe:mt.key)),B=h(Wt,B,Qe),ft===null?De=Wt:ft.sibling=Wt,ft=Wt);return e&&$e.forEach(function(Ia){return t($,Ia)}),lt&&Ki($,Qe),De}function Ie($,B,X,re){if(X==null)throw Error(s(151));for(var De=null,ft=null,$e=B,Qe=B=0,Wt=null,mt=X.next();$e!==null&&!mt.done;Qe++,mt=X.next()){$e.index>Qe?(Wt=$e,$e=null):Wt=$e.sibling;var Ia=q($,$e,mt.value,re);if(Ia===null){$e===null&&($e=Wt);break}e&&$e&&Ia.alternate===null&&t($,$e),B=h(Ia,B,Qe),ft===null?De=Ia:ft.sibling=Ia,ft=Ia,$e=Wt}if(mt.done)return a($,$e),lt&&Ki($,Qe),De;if($e===null){for(;!mt.done;Qe++,mt=X.next())mt=se($,mt.value,re),mt!==null&&(B=h(mt,B,Qe),ft===null?De=mt:ft.sibling=mt,ft=mt);return lt&&Ki($,Qe),De}for($e=r($e);!mt.done;Qe++,mt=X.next())mt=K($e,$,Qe,mt.value,re),mt!==null&&(e&&(Wt=mt.alternate,Wt!==null&&$e.delete(Wt.key===null?Qe:Wt.key)),B=h(mt,B,Qe),ft===null?De=mt:ft.sibling=mt,ft=mt);return e&&$e.forEach(function(T2){return t($,T2)}),lt&&Ki($,Qe),De}function nt($,B,X,re){if(typeof X=="object"&&X!==null&&X.type===U&&X.key===null&&X.props.ref===void 0&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case ae:e:{for(var De=X.key;B!==null;){if(B.key===De){if(De=X.type,De===U){if(B.tag===7){a($,B.sibling),re=f(B,X.props.children),va(re,X),re.return=$,$=re;break e}}else if(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===j&&cl(De)===B.type){a($,B.sibling),re=f(B,X.props),va(re,X),re.return=$,$=re;break e}a($,B);break}else t($,B);B=B.sibling}X.type===U?(re=il(X.props.children,$.mode,re,X.key),va(re,X),re.return=$,$=re):(re=cu(X.type,X.key,X.props,null,$.mode,re),va(re,X),re.return=$,$=re)}return v($);case H:e:{for(De=X.key;B!==null;){if(B.key===De)if(B.tag===4&&B.stateNode.containerInfo===X.containerInfo&&B.stateNode.implementation===X.implementation){a($,B.sibling),re=f(B,X.children||[]),re.return=$,$=re;break e}else{a($,B);break}else t($,B);B=B.sibling}re=Tc(X,$.mode,re),re.return=$,$=re}return v($);case j:return X=cl(X),nt($,B,X,re)}if(Ee(X))return Ce($,B,X,re);if(we(X)){if(De=we(X),typeof De!="function")throw Error(s(150));return X=De.call(X),Ie($,B,X,re)}if(typeof X.then=="function")return nt($,B,bu(X),re);if(X.$$typeof===ce)return nt($,B,gu($,X),re);Su($,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,B!==null&&B.tag===6?(a($,B.sibling),re=f(B,X),re.return=$,$=re):(a($,B),re=_c(X,$.mode,re),re.return=$,$=re),v($)):a($,B)}return function($,B,X,re){try{Xr=0;var De=nt($,B,X,re);return Ql=null,De}catch($e){if($e===Gl||$e===xu)throw $e;var ft=Rn(29,$e,null,$.mode);return ft.lanes=re,ft.return=$,ft}finally{}}}var dl=Tp(!0),Ap=Tp(!1),ba=!1;function Uc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ka(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(kt&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=ou(e),hp(e,null,a),t}return uu(e,r,t,a),ou(e)}function Fr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,zr(e,a)}}function qc(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,a=a.next}while(a!==null);h===null?f=h=t:h=h.next=t}else f=h=t;a={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Vc=!1;function Kr(){if(Vc){var e=Yl;if(e!==null)throw e}}function Pr(e,t,a,r){Vc=!1;var f=e.updateQueue;ba=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var z=w,Y=z.next;z.next=null,v===null?h=Y:v.next=Y,v=z;var W=e.alternate;W!==null&&(W=W.updateQueue,w=W.lastBaseUpdate,w!==v&&(w===null?W.firstBaseUpdate=Y:w.next=Y,W.lastBaseUpdate=z))}if(h!==null){var se=f.baseState;v=0,W=Y=z=null,w=h;do{var q=w.lane&-536870913,K=q!==w.lane;if(K?(ct&q)===q:(r&q)===q){q!==0&&q===ul&&(Vc=!0),W!==null&&(W=W.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Ce=e,Ie=w;q=t;var nt=a;switch(Ie.tag){case 1:if(Ce=Ie.payload,typeof Ce=="function"){se=Ce.call(nt,se,q);break e}se=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ie.payload,q=typeof Ce=="function"?Ce.call(nt,se,q):Ce,q==null)break e;se=R({},se,q);break e;case 2:ba=!0}}q=w.callback,q!==null&&(e.flags|=64,K&&(e.flags|=8192),K=f.callbacks,K===null?f.callbacks=[q]:K.push(q))}else K={lane:q,tag:w.tag,payload:w.payload,callback:w.callback,next:null},W===null?(Y=W=K,z=se):W=W.next=K,v|=q;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;K=w,w=K.next,K.next=null,f.lastBaseUpdate=K,f.shared.pending=null}}while(!0);W===null&&(z=se),f.baseState=z,f.firstBaseUpdate=Y,f.lastBaseUpdate=W,h===null&&(f.shared.lanes=0),Ta|=v,e.lanes=v,e.memoizedState=se}}function zp(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Op(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zp(a[e],t)}var wa=Ge(null),ku=Ge(0);function Dp(e,t){e=ia,ne(ku,e),ne(wa,t),ia=e|t.baseLanes}function $c(){ne(ku,ia),ne(wa,wa.current)}function Zc(){ia=ku.current,Le(wa),Le(ku)}var pn=Ge(null),Cn=null;function Na(e){var t=e.alternate;ne(gn,gn.current&1),ne(pn,e),Cn===null&&(t===null||wa.current!==null||t.memoizedState!==null)&&(Cn=e)}function Yc(e){ne(gn,gn.current),ne(pn,e),Cn===null&&(Cn=e)}function Mp(e){e.tag===22?(ne(gn,gn.current),ne(pn,e),Cn===null&&(Cn=e)):Ca()}function Ca(){ne(gn,gn.current),ne(pn,pn.current)}function Gn(e){Le(pn),Cn===e&&(Cn=null),Le(gn)}var gn=Ge(0);function Jr(e,t){ne(pn,pn.current),ne(gn,t)}function Gc(e){Le(gn),Le(pn),Cn===e&&(Cn=null)}function wu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||pd(a)||gd(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wi=0,tt=null,Dt=null,Pt=null,Nu=!1,Xl=!1,hl=!1,Cu=0,Wr=0,Fl=null,K0=0;function $t(){throw Error(s(321))}function Qc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Yn(e[a],t[a]))return!1;return!0}function Xc(e,t,a,r,f,h){return Wi=h,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ve.H=e===null||e.memoizedState===null?yg:xg,hl=!1,h=a(r,f),hl=!1,Xl&&(h=Lp(t,a,r,f)),Rp(e),h}function Rp(e){ve.H=Ou;var t=Dt!==null&&Dt.next!==null;if(Wi=0,Pt=Dt=tt=null,Nu=!1,Wr=0,Fl=null,t)throw Error(s(300));e===null||Jt||(e=e.dependencies,e!==null&&pu(e)&&(Jt=!0))}function Lp(e,t,a,r){tt=e;var f=0;do{if(Xl&&(Fl=null),Wr=0,Xl=!1,25<=f)throw Error(s(301));if(f+=1,Pt=Dt=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}ve.H=aS,h=t(a,r)}while(Xl);return h}function P0(){var e=ve.H,t=e.useState()[0];return t=typeof t.then=="function"?es(t):t,e=e.useState()[0],(Dt!==null?Dt.memoizedState:null)!==e&&(tt.flags|=1024),t}function Fc(){var e=Cu!==0;return Cu=0,e}function Kc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pc(e){if(Nu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nu=!1}Wi=0,Pt=Dt=tt=null,Xl=!1,Wr=Cu=0,Fl=null}function zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?tt.memoizedState=Pt=e:Pt=Pt.next=e,Pt}function Yt(){if(Dt===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=Dt.next;var t=Pt===null?tt.memoizedState:Pt.next;if(t!==null)Pt=t,Dt=e;else{if(e===null)throw tt.alternate===null?Error(s(467)):Error(s(310));Dt=e,e={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Pt===null?tt.memoizedState=Pt=e:Pt=Pt.next=e}return Pt}function ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function es(e){var t=Wr;return Wr+=1,Fl===null&&(Fl=[]),e=jp(Fl,e,t),t=tt,(Pt===null?t.memoizedState:Pt.next)===null&&(t=t.alternate,ve.H=t===null||t.memoizedState===null?yg:xg),e}function Eu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return es(e);if(e.$$typeof===te)return;if(e.$$typeof===ce)return mn(e)}throw Error(s(438,String(e)))}function Jc(e){var t=null,a=tt.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=tt.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ju(),tt.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=_;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function _u(e){var t=Yt();return Wc(t,Dt,e)}function Wc(e,t,a){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=a;var f=e.baseQueue,h=r.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}t.baseQueue=f=h,r.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{t=f.next;var w=v=null,z=null,Y=t,W=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(ct&se)===se:(Wi&se)===se){var q=Y.revertLane;if(q===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===ul&&(W=!0);else if((Wi&q)===q){Y=Y.next,q===ul&&(W=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(w=z=se,v=h):z=z.next=se,tt.lanes|=q,Ta|=q;se=Y.action,hl&&a(h,se),h=Y.hasEagerState?Y.eagerState:a(h,se)}else q={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(w=z=q,v=h):z=z.next=q,tt.lanes|=se,Ta|=se;Y=Y.next}while(Y!==null&&Y!==t);if(z===null?v=h:z.next=w,!Yn(h,e.memoizedState)&&(Jt=!0,W&&(a=Yl,a!==null)))throw a;e.memoizedState=h,e.baseState=v,e.baseQueue=z,r.lastRenderedState=h}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ef(e){var t=Yt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var r=a.dispatch,f=a.pending,h=t.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do h=e(h,v.action),v=v.next;while(v!==f);Yn(h,t.memoizedState)||(Jt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),a.lastRenderedState=h}return[h,r]}function Bp(e,t,a){var r=tt,f=Yt(),h=lt;if(h){if(a===void 0)throw Error(s(407));a=a()}else a=t();var v=!Yn((Dt||f).memoizedState,a);if(v&&(f.memoizedState=a,Jt=!0),f=f.queue,af(Hp.bind(null,r,f,e),[e]),e=f.getSnapshot!==t||v||Pt!==null&&(Pt.memoizedState.tag&1)!==0,Kl(e?9:8,{destroy:void 0},Up.bind(null,r,f,a,t),null),e){if(r.flags|=2048,Mt===null)throw Error(s(349));h||(Wi&127)!==0||Ip(r,t,a)}return a}function Ip(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=tt.updateQueue,t===null?(t=ju(),tt.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Up(e,t,a,r){t.value=a,t.getSnapshot=r,qp(t)&&Vp(e)}function Hp(e,t,a){return a(function(){qp(t)&&Vp(e)})}function qp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Yn(e,a)}catch{return!0}}function Vp(e){var t=nl(e,2);t!==null&&Un(t,e,2)}function tf(e){var t=zn();if(typeof e=="function"){var a=e;if(e=a(),hl){ht(!0);try{a()}finally{ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function $p(e,t,a,r){return e.baseState=a,Wc(e,Dt,typeof r=="function"?r:ea)}function J0(e,t,a,r,f){if(zu(e))throw Error(s(485));if(e=t.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};ve.T!==null?a(!0):h.isTransition=!1,r(h),a=t.pending,a===null?(h.next=t.pending=h,Zp(t,h)):(h.next=a.next,t.pending=a.next=h)}}function Zp(e,t){var a=t.action,r=t.payload,f=e.state;if(t.isTransition){var h=ve.T,v={};v.types=h!==null?h.types:null,ve.T=v;try{var w=a(f,r),z=ve.S;z!==null&&z(v,w),Yp(e,t,w)}catch(Y){nf(e,t,Y)}finally{h!==null&&v.types!==null&&(h.types=v.types),ve.T=h}}else try{h=a(f,r),Yp(e,t,h)}catch(Y){nf(e,t,Y)}}function Yp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Gp(e,t,r)},function(r){return nf(e,t,r)}):Gp(e,t,a)}function Gp(e,t,a){t.status="fulfilled",t.value=a,Qp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Zp(e,a)))}function nf(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Qp(t),t=t.next;while(t!==r)}e.action=null}function Qp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xp(e,t){return t}function Fp(e,t){if(lt){var a=Mt.formState;if(a!==null){e:{var r=tt;if(lt){if(Bt){t:{for(var f=Bt,h=ui;f.nodeType!==8;){if(!h){f=null;break t}if(f=ci(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){Bt=ci(f.nextSibling),r=f.data==="F!";break e}}ya(r)}r=!1}r&&(t=a[0])}}return a=zn(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:t},a.queue=r,a=mg.bind(null,tt,r),r.dispatch=a,r=tf(!1),h=of.bind(null,tt,!1,r.queue),r=zn(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,a=J0.bind(null,tt,f,h,a),f.dispatch=a,r.memoizedState=e,[t,a,!1]}function Kp(e){var t=Yt();return Pp(t,Dt,e)}function Pp(e,t,a){if(t=Wc(e,t,Xp)[0],e=_u(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=es(t)}catch(v){throw v===Gl?xu:v}else r=t;t=Yt();var f=t.queue,h=f.dispatch;return a!==t.memoizedState&&(tt.flags|=2048,Kl(9,{destroy:void 0},W0.bind(null,f,a),null)),[r,h,e]}function W0(e,t){e.action=t}function Jp(e){var t=Yt(),a=Dt;if(a!==null)return Pp(t,a,e);Yt(),t=t.memoizedState,a=Yt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function Kl(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=tt.updateQueue,t===null&&(t=ju(),tt.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Wp(){return Yt().memoizedState}function Tu(e,t,a,r){var f=zn();tt.flags|=e,f.memoizedState=Kl(1|t,{destroy:void 0},a,r===void 0?null:r)}function Au(e,t,a,r){var f=Yt();r=r===void 0?null:r;var h=f.memoizedState.inst;Dt!==null&&r!==null&&Qc(r,Dt.memoizedState.deps)?f.memoizedState=Kl(t,h,a,r):(tt.flags|=e,f.memoizedState=Kl(1|t,h,a,r))}function eg(e,t){Tu(8390656,8,e,t)}function af(e,t){Au(2048,8,e,t)}function eS(e){tt.flags|=4;var t=tt.updateQueue;if(t===null)t=ju(),tt.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function tg(e){var t=Yt().memoizedState;return eS({ref:t,nextImpl:e}),function(){if((kt&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function ng(e,t){return Au(4,2,e,t)}function ig(e,t){return Au(4,4,e,t)}function ag(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lg(e,t,a){a=a!=null?a.concat([e]):null,Au(4,4,ag.bind(null,t,e),a)}function lf(){}function rg(e,t){var a=Yt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&Qc(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function sg(e,t){var a=Yt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&Qc(t,r[1]))return r[0];if(r=e(),hl){ht(!0);try{e()}finally{ht(!1)}}return a.memoizedState=[r,t],r}function rf(e,t,a){return a===void 0||(Wi&1073741824)!==0&&(ct&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yy(),tt.lanes|=e,Ta|=e,a)}function ug(e,t,a,r){return Yn(a,t)?a:wa.current!==null?(e=rf(e,a,r),Yn(e,t)||(Jt=!0),e):(Wi&106)===0||(Wi&1073741824)!==0&&(ct&261930)===0?(Jt=!0,e.memoizedState=a):(e=yy(),tt.lanes|=e,Ta|=e,t)}function og(e,t,a,r,f){var h=Z.p;Z.p=h!==0&&8>h?h:8;var v=ve.T,w={};w.types=v!==null?v.types:null,ve.T=w,of(e,!1,t,a);try{var z=f(),Y=ve.S;if(Y!==null&&Y(w,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var W=F0(z,r);ts(e,t,W,Kn(e))}else ts(e,t,r,Kn(e))}catch(se){ts(e,t,{then:function(){},status:"rejected",reason:se},Kn())}finally{Z.p=h,v!==null&&w.types!==null&&(v.types=w.types),ve.T=v}}function tS(){}function sf(e,t,a,r){if(e.tag!==5)throw Error(s(476));var f=cg(e).queue;og(e,f,t,Re,a===null?tS:function(){return fg(e),a(r)})}function cg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Re,baseState:Re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:Re},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function fg(e){var t=cg(e);t.next===null&&(t=e.alternate.memoizedState),ts(e,t.next.queue,{},Kn())}function uf(){return mn(pr)}function dg(){return Yt().memoizedState}function hg(){return Yt().memoizedState}function nS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Kn();e=Sa(a);var r=ka(t,e,a);r!==null&&(Un(r,t,a),Fr(r,t,a)),t={cache:Rc()},e.payload=t;return}t=t.return}}function iS(e,t,a){var r=Kn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zu(e)?pg(t,a):(a=jc(e,t,a,r),a!==null&&(Un(a,e,r),gg(a,t,r)))}function mg(e,t,a){var r=Kn();ts(e,t,a,r)}function ts(e,t,a,r){var f={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zu(e))pg(t,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var v=t.lastRenderedState,w=h(v,a);if(f.hasEagerState=!0,f.eagerState=w,Yn(w,v))return uu(e,t,f,0),Mt===null&&su(),!1}catch{}finally{}if(a=jc(e,t,f,r),a!==null)return Un(a,e,r),gg(a,t,r),!0}return!1}function of(e,t,a,r){if(r={lane:2,revertLane:Wf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zu(e)){if(t)throw Error(s(479))}else t=jc(e,a,r,2),t!==null&&Un(t,e,2)}function zu(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function pg(e,t){Xl=Nu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function gg(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,zr(e,a)}}var Ou={readContext:mn,use:Eu,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t,useEffectEvent:$t},yg={readContext:mn,use:Eu,useCallback:function(e,t){return zn().memoizedState=[e,t===void 0?null:t],e},useContext:mn,useEffect:eg,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Tu(4194308,4,ag.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Tu(4194308,4,e,t)},useInsertionEffect:function(e,t){Tu(4,2,e,t)},useMemo:function(e,t){var a=zn();t=t===void 0?null:t;var r=e();if(hl){ht(!0);try{e()}finally{ht(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=zn();if(a!==void 0){var f=a(t);if(hl){ht(!0);try{a(t)}finally{ht(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=iS.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=zn();return e={current:e},t.memoizedState=e},useState:function(e){e=tf(e);var t=e.queue,a=mg.bind(null,tt,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:lf,useDeferredValue:function(e,t){var a=zn();return rf(a,e,t)},useTransition:function(){var e=tf(!1);return e=og.bind(null,tt,e.queue,!0,!1),zn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=tt,f=zn();if(lt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Mt===null)throw Error(s(349));(ct&127)!==0||Ip(r,t,a)}f.memoizedState=a;var h={value:a,getSnapshot:t};return f.queue=h,eg(Hp.bind(null,r,h,e),[e]),r.flags|=2048,Kl(9,{destroy:void 0},Up.bind(null,r,h,a,t),null),a},useId:function(){var e=zn(),t=Mt.identifierPrefix;if(lt){var a=Oi,r=zi;a=(r&~(1<<32-_t(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Cu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=K0++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uf,useFormState:Fp,useActionState:Fp,useOptimistic:function(e){var t=zn();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=of.bind(null,tt,!0,a),a.dispatch=t,[e,t]},useMemoCache:Jc,useCacheRefresh:function(){return zn().memoizedState=nS.bind(null,tt)},useEffectEvent:function(e){var t=zn(),a={impl:e};return t.memoizedState=a,function(){if((kt&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},xg={readContext:mn,use:Eu,useCallback:rg,useContext:mn,useEffect:af,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:ig,useMemo:sg,useReducer:_u,useRef:Wp,useState:function(){return _u(ea)},useDebugValue:lf,useDeferredValue:function(e,t){var a=Yt();return ug(a,Dt.memoizedState,e,t)},useTransition:function(){var e=_u(ea)[0],t=Yt().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:Bp,useId:dg,useHostTransitionStatus:uf,useFormState:Kp,useActionState:Kp,useOptimistic:function(e,t){var a=Yt();return $p(a,Dt,e,t)},useMemoCache:Jc,useCacheRefresh:hg,useEffectEvent:tg},aS={readContext:mn,use:Eu,useCallback:rg,useContext:mn,useEffect:af,useImperativeHandle:lg,useInsertionEffect:ng,useLayoutEffect:ig,useMemo:sg,useReducer:ef,useRef:Wp,useState:function(){return ef(ea)},useDebugValue:lf,useDeferredValue:function(e,t){var a=Yt();return Dt===null?rf(a,e,t):ug(a,Dt.memoizedState,e,t)},useTransition:function(){var e=ef(ea)[0],t=Yt().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:Bp,useId:dg,useHostTransitionStatus:uf,useFormState:Jp,useActionState:Jp,useOptimistic:function(e,t){var a=Yt();return Dt!==null?$p(a,Dt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Jc,useCacheRefresh:hg,useEffectEvent:tg};function cf(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:R({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ff={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=Kn(),f=Sa(r);f.payload=t,a!=null&&(f.callback=a),t=ka(e,f,r),t!==null&&(Un(t,e,r),Fr(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=Kn(),f=Sa(r);f.tag=1,f.payload=t,a!=null&&(f.callback=a),t=ka(e,f,r),t!==null&&(Un(t,e,r),Fr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Kn(),r=Sa(a);r.tag=2,t!=null&&(r.callback=t),t=ka(e,r,a),t!==null&&(Un(t,e,a),Fr(t,e,a))}};function vg(e,t,a,r,f,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,h,v):t.prototype&&t.prototype.isPureReactComponent?!qr(a,r)||!qr(f,h):!0}function bg(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&ff.enqueueReplaceState(t,t.state,null)}function ml(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=R({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function Sg(e){ru(e)}function kg(e){console.error(e)}function wg(e){ru(e)}function Du(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Ng(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function df(e,t,a){return a=Sa(a),a.tag=3,a.payload={element:null},a.callback=function(){Du(e,t)},a}function Cg(e){return e=Sa(e),e.tag=3,e}function jg(e,t,a,r){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var h=r.value;e.payload=function(){return f(h)},e.callback=function(){Ng(t,a,r)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Ng(t,a,r),typeof f!="function"&&(Aa===null?Aa=new Set([this]):Aa.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function lS(e,t,a,r,f){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&rl(t,a,f,!0),a=pn.current,a!==null){switch(a.tag){case 31:case 13:case 19:return Cn===null?eo():a.alternate===null&&Zt===0&&(Zt=3),a.flags&=-257,a.flags|=65536,a.lanes=f,r===vu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),Kf(e,r,f)),!1;case 22:return a.flags|=65536,r===vu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),Kf(e,r,f)),!1}throw Error(s(435,a.tag))}return Kf(e,r,f),eo(),!1}if(lt)return t=pn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==zc&&(e=Error(s(422),{cause:r}),Zr(li(e,a)))):(r!==zc&&(t=Error(s(423),{cause:r}),Zr(li(t,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=li(r,a),f=df(e.stateNode,r,f),qc(e,f),Zt!==4&&(Zt=2)),!1;var h=Error(s(520),{cause:r});if(h=li(h,a),os===null?os=[h]:os.push(h),Zt!==4&&(Zt=2),t===null)return!0;r=li(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=df(a.stateNode,r,e),qc(a,e),!1;case 1:if(t=a.type,h=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Aa===null||!Aa.has(h))))return a.flags|=65536,f&=-f,a.lanes|=f,f=Cg(f),jg(f,e,a,r),qc(a,f),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var hf=Error(s(461)),Jt=!1;function an(e,t,a,r){t.child=e===null?Ap(t,null,a,r):dl(t,e.child,a,r)}function Eg(e,t,a,r,f){a=a.render;var h=t.ref;if("ref"in r){var v={};for(var w in r)w!=="ref"&&(v[w]=r[w])}else v=r;return sl(t),r=Xc(e,t,a,v,h,f),w=Fc(),e!==null&&!Jt?(Kc(e,t,f),ta(e,t,f)):(lt&&w&&du(t),t.flags|=1,an(e,t,r,f),t.child)}function _g(e,t,a,r,f){if(e===null){var h=a.type;return typeof h=="function"&&!Ec(h)&&h.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=h,Tg(e,t,h,r,f)):(e=cu(a.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!Sf(e,f)){var v=h.memoizedProps;if(a=a.compare,a=a!==null?a:qr,a(v,r)&&e.ref===t.ref)return ta(e,t,f)}return t.flags|=1,e=Fi(h,r),e.ref=t.ref,e.return=t,t.child=e}function Tg(e,t,a,r,f){if(e!==null){var h=e.memoizedProps;if(qr(h,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=h,Sf(e,f))(e.flags&131072)!==0&&(Jt=!0);else return t.lanes=e.lanes,ta(e,t,f)}return mf(e,t,a,r,f)}function Ag(e,t,a,r){var f=r.children,h=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(h=h!==null?h.baseLanes|a:a,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~h}else r=0,t.child=null;return zg(e,t,h,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yu(t,h!==null?h.cachePool:null),h!==null?Dp(t,h):$c(),Mp(t);else return r=t.lanes=536870912,zg(e,t,h!==null?h.baseLanes|a:a,a,r)}else h!==null?(yu(t,h.cachePool),Dp(t,h),Ca(),t.memoizedState=null):(e!==null&&yu(t,null),$c(),Ca());return an(e,t,f,a),t.child}function ns(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zg(e,t,a,r,f){var h=Bc();return h=h===null?null:{parent:Kt._currentValue,pool:h},t.memoizedState={baseLanes:a,cachePool:h},e!==null&&yu(t,null),$c(),Mp(t),e!==null&&rl(e,t,r,!0),t.childLanes=f,null}function Mu(e,t){return t=Ru({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Og(e,t,a){return dl(t,e.child,null,a),e=Mu(t,t.pendingProps),e.flags|=2,Gn(t),t.memoizedState=null,e}function rS(e,t,a){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(lt){if(r.mode==="hidden")return e=Mu(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},ns(null,e);if(Yc(t),(e=Bt)?(e=ax(e,ui),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:zi,overflow:Oi}:null,retryLane:536870912,hydrationErrors:null},a=pp(e),a.return=t,t.child=a,un=t,Bt=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return Mu(t,r)}var h=e.memoizedState;if(h!==null){var v=h.dehydrated;if(Yc(t),f)if(t.flags&256)t.flags&=-257,t=Og(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Jt||rl(e,t,a,!1),f=(a&e.childLanes)!==0,Jt||f){if(wa.current===null){if(r=Mt,r!==null&&(v=zl(r,a),v!==0&&v!==h.retryLane))throw h.retryLane=v,nl(e,v),Un(r,e,v),hf;eo()}t=Og(e,t,a)}else e=h.treeContext,Bt=ci(v.nextSibling),un=t,lt=!0,ga=null,ui=!1,e!==null&&xp(t,e),t=Mu(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Pl(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mf(e,t,a,r,f){return sl(t),a=Xc(e,t,a,r,void 0,f),r=Fc(),e!==null&&!Jt?(Kc(e,t,f),ta(e,t,f)):(lt&&r&&du(t),t.flags|=1,an(e,t,a,f),t.child)}function Dg(e,t,a,r,f,h){return sl(t),t.updateQueue=null,a=Lp(t,r,a,f),Rp(e),r=Fc(),e!==null&&!Jt?(Kc(e,t,h),ta(e,t,h)):(lt&&r&&du(t),t.flags|=1,an(e,t,a,h),t.child)}function Mg(e,t,a,r,f){if(sl(t),t.stateNode===null){var h=ql,v=a.contextType;typeof v=="object"&&v!==null&&(h=mn(v)),h=new a(r,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ff,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=r,h.state=t.memoizedState,h.refs={},Uc(t),v=a.contextType,h.context=typeof v=="object"&&v!==null?mn(v):ql,h.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(cf(t,a,v,r),h.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&ff.enqueueReplaceState(h,h.state,null),Pr(t,r,h,f),Kr(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){h=t.stateNode;var w=t.memoizedProps,z=ml(a,w);h.props=z;var Y=h.context,W=a.contextType;v=ql,typeof W=="object"&&W!==null&&(v=mn(W));var se=a.getDerivedStateFromProps;W=typeof se=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,W||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||Y!==v)&&bg(t,h,r,v),ba=!1;var q=t.memoizedState;h.state=q,Pr(t,r,h,f),Kr(),Y=t.memoizedState,w||q!==Y||ba?(typeof se=="function"&&(cf(t,a,se,r),Y=t.memoizedState),(z=ba||vg(t,a,z,r,q,Y,v))?(W||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=Y),h.props=r,h.state=Y,h.context=v,r=z):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{h=t.stateNode,Hc(e,t),v=t.memoizedProps,W=ml(a,v),h.props=W,se=t.pendingProps,q=h.context,Y=a.contextType,z=ql,typeof Y=="object"&&Y!==null&&(z=mn(Y)),w=a.getDerivedStateFromProps,(Y=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==se||q!==z)&&bg(t,h,r,z),ba=!1,q=t.memoizedState,h.state=q,Pr(t,r,h,f),Kr();var K=t.memoizedState;v!==se||q!==K||ba||e!==null&&e.dependencies!==null&&pu(e.dependencies)?(typeof w=="function"&&(cf(t,a,w,r),K=t.memoizedState),(W=ba||vg(t,a,W,r,q,K,z)||e!==null&&e.dependencies!==null&&pu(e.dependencies))?(Y||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,K,z),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,K,z)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=K),h.props=r,h.state=K,h.context=z,r=W):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),r=!1)}return h=r,Pl(e,t),r=(t.flags&128)!==0,h||r?(h=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&r?(t.child=dl(t,e.child,null,f),t.child=dl(t,null,a,f)):an(e,t,a,f),t.memoizedState=h.state,e=t.child):e=ta(e,t,f),e}function Rg(e,t,a,r){return al(),t.flags|=256,an(e,t,a,r),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gf(e){return{baseLanes:e,cachePool:Np()}}function yf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Fn),e}function Lg(e,t,a){var r=t.pendingProps,f=!1,h=(t.flags&128)!==0,v;if((v=h)||(v=e!==null&&e.memoizedState===null?!1:(gn.current&2)!==0),v&&(f=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(lt){if(f?Na(t):Ca(),(e=Bt)?(e=ax(e,ui),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:zi,overflow:Oi}:null,retryLane:536870912,hydrationErrors:null},a=pp(e),a.return=t,t.child=a,un=t,Bt=null)):e=null,e===null)throw ya(t);return gd(e)?t.lanes=32:t.lanes=536870912,null}return h=r.children,r=r.fallback,f?(Ca(),f=t.mode,h=Ru({mode:"hidden",children:h},f),r=il(r,f,a,null),h.return=t,r.return=t,h.sibling=r,t.child=h,r=t.child,r.memoizedState=gf(a),r.childLanes=yf(e,v,a),t.memoizedState=pf,ns(null,r)):(Na(t),xf(t,h))}var w=e.memoizedState;if(w!==null){var z=w.dehydrated;if(z!==null)return sS(e,t,h,v,r,z,w,a)}return f?(Ca(),f=r.fallback,h=t.mode,w=e.child,z=w.sibling,r=Fi(w,{mode:"hidden",children:r.children}),r.subtreeFlags=w.subtreeFlags&1206910976,z!==null?f=Fi(z,f):(f=il(f,h,a,null),f.flags|=2),f.return=t,r.return=t,r.sibling=f,t.child=r,ns(null,r),r=t.child,f=e.child.memoizedState,f===null?f=gf(a):(h=f.cachePool,h!==null?(w=Kt._currentValue,h=h.parent!==w?{parent:w,pool:w}:h):h=Np(),f={baseLanes:f.baseLanes|a,cachePool:h}),r.memoizedState=f,r.childLanes=yf(e,v,a),t.memoizedState=pf,ns(e.child,r)):(Na(t),a=e.child,e=a.sibling,a=Fi(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function xf(e,t){return t=Ru({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ru(e,t){return e=Rn(22,e,null,t),e.lanes=0,e}function Lu(e,t,a){return dl(t,e.child,null,a),e=xf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sS(e,t,a,r,f,h,v,w){if(a)return t.flags&256?(Na(t),t.flags&=-257,Lu(e,t,w)):t.memoizedState!==null?(Ca(),t.child=e.child,t.flags|=128,null):(Ca(),h=f.fallback,v=t.mode,f=Ru({mode:"visible",children:f.children},v),h=il(h,v,w,null),h.flags|=2,f.return=t,h.return=t,f.sibling=h,t.child=f,dl(t,e.child,null,w),f=t.child,f.memoizedState=gf(w),f.childLanes=yf(e,r,w),t.memoizedState=pf,ns(null,f));if(Na(t),gd(h)){if(r=h.nextSibling&&h.nextSibling.dataset,r)var z=r.dgst;return r=z,r!==""&&(f=Error(s(419)),f.stack="",f.digest=r,Zr({value:f,source:null,stack:null})),Lu(e,t,w)}if(Jt||rl(e,t,w,!1),r=(w&e.childLanes)!==0,Jt||r){if(wa.current!==null)return Lu(e,t,w);if(r=Mt,r!==null&&(f=zl(r,w),f!==0&&f!==v.retryLane))throw v.retryLane=f,nl(e,f),Un(r,e,f),hf;return pd(h)||eo(),Lu(e,t,w)}return pd(h)?(t.flags|=192,t.child=e.child,null):(e=v.treeContext,Bt=ci(h.nextSibling),un=t,lt=!0,ga=null,ui=!1,e!==null&&xp(t,e),t=xf(t,f.children),t.flags|=134221824,t)}function Bg(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),mu(e.return,t,a)}function Ig(e){for(var t=null;e!==null;){var a=e.alternate;a!==null&&wu(a)===null&&(t=e),e=e.sibling}return t}function Bu(e,t,a,r,f,h){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:f,treeForkCount:h}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=r,v.tail=a,v.tailMode=f,v.treeForkCount=h)}function vf(e){var t=e.child;for(e.child=null;t!==null;){var a=t.sibling;t.sibling=e.child,e.child=t,t=a}}function bf(e,t,a){var r=t.pendingProps,f=r.revealOrder,h=r.tail;r=r.children;var v=gn.current;if(t.flags&128)return Jr(t,v),null;var w=(v&2)!==0;if(w?(v=v&1|2,t.flags|=128):v&=1,Jr(t,v),f==="backwards"&&e!==null?(vf(e),an(e,t,r,a),vf(e)):an(e,t,r,a),r=lt?$r:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bg(e,a,t);else if(e.tag===19)Bg(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"backwards":a=Ig(t.child),a===null?(f=t.child,t.child=null):(f=a.sibling,a.sibling=null,vf(t)),Bu(t,!0,f,null,h,r);break;case"unstable_legacy-backwards":for(a=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&wu(e)===null){t.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}Bu(t,!0,a,null,h,r);break;case"together":Bu(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:a=Ig(t.child),a===null?(f=t.child,t.child=null):(f=a.sibling,a.sibling=null),Bu(t,!1,f,a,h,r)}return t.child}function Ug(e,t,a){var r=t.pendingProps;return xa(t,t.type,r.value),an(e,t,r.children,a),t.child}function ta(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ta|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(rl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=Fi(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fi(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Sf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pu(e)))}function uS(e,t,a){switch(t.tag){case 3:qt(t,t.stateNode.containerInfo),xa(t,Kt,e.memoizedState.cache),al();break;case 27:case 5:St(t);break;case 4:qt(t,t.stateNode.containerInfo);break;case 10:xa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yc(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Na(t),t.flags|=128,null;r=rl(e,t,a,!1);var f=t.child.childLanes;return r||(a&f)!==0?Lg(e,t,a):(Na(t),e=ta(e,t,a),e!==null?e.sibling:null)}Na(t);break;case 19:if(t.flags&128)return bf(e,t,a);if(f=(e.flags&128)!==0,r=(a&t.childLanes)!==0,r||(rl(e,t,a,!1),r=(a&t.childLanes)!==0),f){if(r)return bf(e,t,a);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Jr(t,gn.current),r)break;return null;case 22:return t.lanes=0,Ag(e,t,a,t.pendingProps);case 24:xa(t,Kt,e.memoizedState.cache)}return ta(e,t,a)}function Hg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Jt=!0;else{if(!Sf(e,a)&&(t.flags&128)===0)return Jt=!1,uS(e,t,a);Jt=(e.flags&131072)!==0}else Jt=!1,lt&&(t.flags&1048576)!==0&&yp(t,$r,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=cl(t.elementType),t.type=e,typeof e=="function")Ec(e)?(r=ml(e,r),t.tag=1,t=Mg(null,t,e,r,a)):(t.tag=0,t=mf(null,t,e,r,a));else{if(e!=null){var f=e.$$typeof;if(f===F){t.tag=11,t=Eg(null,t,e,r,a);break e}else if(f===ke){t.tag=14,t=_g(null,t,e,r,a);break e}else if(f===ce){t.tag=10,t.type=e,t=Ug(null,t,a);break e}}throw t=ye(e)||e,Error(s(306,t,""))}}return t;case 0:return mf(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,f=ml(r,t.pendingProps),Mg(e,t,r,f,a);case 3:e:{if(qt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var h=t.memoizedState;f=h.element,Hc(e,t),Pr(t,r,null,a);var v=t.memoizedState;if(r=v.cache,xa(t,Kt,r),r!==h.cache&&Mc(t,[Kt],a,!0),Kr(),r=v.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=Rg(e,t,r,a);break e}else if(r!==f){f=li(Error(s(424)),t),Zr(f),t=Rg(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Bt=ci(e.firstChild),un=t,lt=!0,ga=null,ui=!0,a=Ap(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling}else{if(al(),r===f){t=ta(e,t,a);break e}an(e,t,r,a)}t=t.child}return t;case 26:return Pl(e,t),e===null?(a=fx(t.type,null,t.pendingProps,null))?t.memoizedState=a:lt||(t.stateNode=Zy(t.type,t.pendingProps,He.current,t)):t.memoizedState=fx(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return St(t),e===null&<&&(r=t.stateNode=sx(t.type,t.pendingProps,He.current),un=t,ui=!0,f=Bt,Da(t.type)?(yd=f,Bt=ci(r.firstChild)):Bt=f),an(e,t,t.pendingProps.children,a),Pl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&<&&((f=r=Bt)&&(r=n2(r,t.type,t.pendingProps,ui),r!==null?(t.stateNode=r,un=t,Bt=ci(r.firstChild),ui=!1,f=!0):f=!1),f||ya(t)),St(t),f=t.type,h=t.pendingProps,v=e!==null?e.memoizedProps:null,r=h.children,ud(f,h)?r=null:v!==null&&ud(f,v)&&(t.flags|=32),t.memoizedState!==null&&(f=Xc(e,t,P0,null,null,a),pr._currentValue=f),Pl(e,t),an(e,t,r,a),t.child;case 6:return e===null&<&&((e=a=Bt)&&(a=i2(a,t.pendingProps,ui),a!==null?(t.stateNode=a,un=t,Bt=null,e=!0):e=!1),e||ya(t)),null;case 13:return Lg(e,t,a);case 4:return qt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dl(t,null,r,a):an(e,t,r,a),t.child;case 11:return Eg(e,t,t.type,t.pendingProps,a);case 7:return r=t.pendingProps,Pl(e,t),an(e,t,r,a),t.child;case 8:return an(e,t,t.pendingProps.children,a),t.child;case 12:return an(e,t,t.pendingProps.children,a),t.child;case 10:return Ug(e,t,a);case 9:return f=t.type._context,r=t.pendingProps.children,sl(t),f=mn(f),r=r(f),t.flags|=1,an(e,t,r,a),t.child;case 14:return _g(e,t,t.type,t.pendingProps,a);case 15:return Tg(e,t,t.type,t.pendingProps,a);case 19:return bf(e,t,a);case 31:return rS(e,t,a);case 22:return Ag(e,t,a,t.pendingProps);case 24:return sl(t),r=mn(Kt),e===null?(f=Bc(),f===null&&(f=Mt,h=Rc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=a),f=h),t.memoizedState={parent:r,cache:f},Uc(t),xa(t,Kt,f)):((e.lanes&a)!==0&&(Hc(e,t),Pr(t,null,null,a),Kr()),f=e.memoizedState,h=t.memoizedState,f.parent!==r?(f={parent:r,cache:r},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),xa(t,Kt,r)):(r=h.cache,xa(t,Kt,r),r!==f.cache&&Mc(t,[Kt],a,!0))),an(e,t,t.pendingProps.children,a),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:lt&&du(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Pl(e,t),an(e,t,r.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function na(e){e.flags|=4}function kf(e,t,a,r,f){var h;if((h=(e.mode&32)!==0)&&(h=a===null?px(t,r):px(t,r)&&(r.src!==a.src||r.srcSet!==a.srcSet)),h){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Sy())e.flags|=8192;else throw fl=vu,Ic}else e.flags&=-16777217}function qg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gx(t))if(Sy())e.flags|=8192;else throw fl=vu,Ic}function Iu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xs():536870912,e.lanes|=t,nr|=t)}function is(e,t){if(!lt)switch(e.tailMode){case"visible":break;case"collapsed":for(var a=e.tail,r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null}}function It(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var f=e.child;f!==null;)a|=f.lanes|f.childLanes,r|=f.subtreeFlags&1206910976,r|=f.flags&1206910976,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function oS(e,t,a){var r=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(t),null;case 1:return It(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(Kt),ln(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Zl(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Oc())),It(t),null;case 26:var f=t.type,h=t.memoizedState;return e===null?(na(t),h!==null?(It(t),qg(t,h)):(It(t),kf(t,f,null,r,a))):h?h!==e.memoizedState?(na(t),It(t),qg(t,h)):(It(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&na(t),It(t),kf(t,f,e,r,a)),null;case 27:if(En(t),a=He.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&na(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return It(t),t.subtreeFlags&=-33554433,null}e=Be.current,Zl(t)?vp(t):(e=sx(f,r,a),t.stateNode=e,na(t))}return It(t),t.subtreeFlags&=-33554433,null;case 5:if(En(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&na(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return It(t),t.subtreeFlags&=-33554433,null}if(h=Be.current,Zl(t))vp(t);else{var v=ms(He.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?v.createElement("select",{is:r.is}):v.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?v.createElement(f,{is:r.is}):v.createElement(f)}}h[nn]=t,h[Nn]=r;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=h;e:switch(xn(h,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&na(t)}}return It(t),t.subtreeFlags&=-33554433,kf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&na(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(e=He.current,Zl(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,f=un,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[nn]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Hy(e.nodeValue,a)),e||ya(t,!0)}else e=ms(e).createTextNode(r),e[nn]=t,t.stateNode=e}return It(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=Zl(t),a!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[nn]=t}else al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;It(t),e=!1}else a=Oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Gn(t),t):(Gn(t),null);if((t.flags&128)!==0)throw Error(s(558))}return It(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Zl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[nn]=t}else al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;It(t),f=!1}else f=Oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Gn(t),t):(Gn(t),null)}return Gn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==f&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Iu(t,t.updateQueue),It(t),null);case 4:return ln(),e===null&&id(t.stateNode.containerInfo),t.flags|=67108864,It(t),null;case 10:return Ji(t.type),It(t),null;case 19:if(Gc(t),r=t.memoizedState,r===null)return It(t),null;if(f=(t.flags&128)!==0,h=r.rendering,h===null)if(f)is(r,!1);else{if(Zt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=wu(e),h!==null){for(t.flags|=128,is(r,!1),e=h.updateQueue,t.updateQueue=e,Iu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)mp(a,e),a=a.sibling;return Jr(t,gn.current&1|2),lt&&Ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>Ku&&(t.flags|=128,f=!0,is(r,!1),t.lanes=4194304)}else{if(!f)if(e=wu(h),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,Iu(t,e),is(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!h.alternate&&!lt)return It(t),null}else 2*ze()-r.renderingStartTime>Ku&&a!==536870912&&(t.flags|=128,f=!0,is(r,!1),t.lanes=4194304);r.isBackwards?(h.sibling=t.child,t.child=h):(e=r.last,e!==null?e.sibling=h:t.child=h,r.last=h)}if(r.tail!==null){e=r.tail;e:{for(a=e;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,h=gn.current,h=f?h&1|2:h&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!a||lt?Jr(t,h):(a=h,ne(pn,t),ne(gn,a),Cn===null&&(Cn=t)),lt&&Ki(t,r.treeForkCount),e}return It(t),null;case 22:case 23:return Gn(t),Zc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),a=t.updateQueue,a!==null&&Iu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&Le(ol),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ji(Kt),It(t),null;case 25:return null;case 30:return t.flags|=33554432,It(t),null}throw Error(s(156,t.tag))}function cS(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(Kt),ln(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return En(t),null;case 31:if(t.memoizedState!==null){if(Gn(t),t.alternate===null)throw Error(s(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Gc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ln(),null;case 10:return Ji(t.type),null;case 22:case 23:return Gn(t),Zc(),e!==null&&Le(ol),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(Kt),null;case 25:return null;default:return null}}function Vg(e,t){switch(Ac(t),t.tag){case 3:Ji(Kt),ln();break;case 26:case 27:case 5:En(t);break;case 4:ln();break;case 31:t.memoizedState!==null&&Gn(t);break;case 13:Gn(t);break;case 19:Gc(t);break;case 10:Ji(t.type);break;case 22:case 23:Gn(t),Zc(),e!==null&&Le(ol);break;case 24:Ji(Kt)}}function as(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var f=r.next;a=f;do{if((a.tag&e)===e){r=void 0;var h=a.create,v=a.inst;r=h(),v.destroy=r}a=a.next}while(a!==f)}}catch(w){At(t,t.return,w)}}function ja(e,t,a){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var h=f.next;r=h;do{if((r.tag&e)===e){var v=r.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=t;var z=a,Y=w;try{Y()}catch(W){At(f,z,W)}}}r=r.next}while(r!==h)}}catch(W){At(t,t.return,W)}}function $g(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Op(t,a)}catch(r){At(e,e.return,r)}}}function Zg(e,t,a){a.props=ml(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){At(e,t,r)}}function Di(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var f=e.stateNode,h=Qi(e.memoizedProps,f);(f.ref===null||f.ref.name!==h)&&(f.ref=Py(h)),r=f.ref;break;case 7:if(e.stateNode===null){var v=new Pn(e);y(e.child,!1,e2,v,void 0,void 0),e.stateNode=v}r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(w){At(e,t,w)}}function yn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(f){At(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){At(e,t,f)}else a.current=null}function Uu(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var a=0;a<t.length;a++)ix(e.stateNode,t[a])}function Yg(e){for(var t=e.return;t!==null&&(Nf(t)&&ix(e.stateNode,t.stateNode),!wf(t));)t=t.return}function ls(e){for(var t=e.return;t!==null&&(Nf(t)&&t2(e.stateNode,t.stateNode),!wf(t));)t=t.return}function wf(e){return e.tag===5||e.tag===3||e.tag===27}function Nf(e){return e&&e.tag===7&&e.stateNode!==null}function Cf(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(f){At(e,e.return,f)}}function jf(e,t,a){try{var r=e.stateNode;LS(r,e.type,a,t),r[Nn]=t}catch(f){At(e,e.return,f)}}function Gg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Da(e.type)||e.tag===4}function Ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Da(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _f(e,t,a,r){var f=e.tag;if(f===5||f===6)f=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(f,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(f),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ai)),Uu(e,r),vt=!0;else if(f!==4&&(f===27&&(Uu(e,r),r=null,Da(e.type)&&(a=e.stateNode,t=null)),e=e.child,e!==null))for(_f(e,t,a,r),e=e.sibling;e!==null;)_f(e,t,a,r),e=e.sibling}function Hu(e,t,a,r){var f=e.tag;if(f===5||f===6)f=e.stateNode,t?a.insertBefore(f,t):a.appendChild(f),Uu(e,r),vt=!0;else if(f!==4&&(f===27&&(Uu(e,r),r=null,Da(e.type)&&(a=e.stateNode)),e=e.child,e!==null))for(Hu(e,t,a,r),e=e.sibling;e!==null;)Hu(e,t,a,r),e=e.sibling}function Qg(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);xn(t,r,a),t[nn]=e,t[Nn]=a}catch(h){At(e,e.return,h)}}var qu=!1,Qn=null;function Xg(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(qu=!0)}var Mi=null;function Fg(){var e=Mi;return Mi=null,e}var Ln=0;function Jl(e,t,a,r,f){return Ln=0,Kg(e.child,t,a,r,f)}function Kg(e,t,a,r,f){for(var h=!1;e!==null;){if(e.tag===5){var v=e.stateNode;if(r!==null){var w=fd(v);r.push(w),w.view&&(h=!0)}else h||fd(v).view&&(h=!0);qu=!0,Fy(v,Ln===0?t:t+"_"+Ln,a),Ln++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&f||Kg(e.child,t,a,r,f)&&(h=!0));e=e.sibling}return h}function Ri(e,t){for(;e!==null;)e.tag===5?Ky(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ri(e.child,t)),e=e.sibling}function Vu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Vu(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(s(544));var a=t.name;t=Xi(t.default,t.share),t!=="none"&&(Jl(e,a,t,null,!1)||Ri(e.child,!1))}e=e.sibling}}function Tf(e,t){if(e.tag===30){var a=e.stateNode,r=e.memoizedProps,f=Qi(r,a),h=Xi(r.default,a.paired?r.share:r.enter);h!=="none"?Jl(e,f,h,null,!1)?(Vu(e),a.paired||t||rr(e,r.onEnter)):Ri(e.child,!1):Vu(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Tf(e,t),e=e.sibling;else Vu(e)}function Af(e){if(Qn!==null&&Qn.size!==0){var t=Qn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var a=e.memoizedProps,r=a.name;if(r!=null&&r!=="auto"){var f=t.get(r);if(f!==void 0){var h=Xi(a.default,a.share);if(h!=="none"&&(Jl(e,r,h,null,!1)?(h=e.stateNode,f.paired=h,h.paired=f,rr(e,a.onShare)):Ri(e.child,!1)),t.delete(r),t.size===0)break}}}Af(e)}e=e.sibling}}}function zf(e){if(e.tag===30){var t=e.memoizedProps,a=Qi(t,e.stateNode),r=Qn!==null?Qn.get(a):void 0,f=Xi(t.default,r!==void 0?t.share:t.exit);f!=="none"&&(Jl(e,a,f,null,!1)?r!==void 0?(f=e.stateNode,r.paired=f,f.paired=r,Qn.delete(a),rr(e,t.onShare)):rr(e,t.onExit):Ri(e.child,!1)),Qn!==null&&Af(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)zf(e),e=e.sibling;else Qn!==null&&Af(e)}function Pg(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,a=Qi(t,e.stateNode);t=Xi(t.default,t.update),e.flags&=-5,t!=="none"&&Jl(e,a,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Pg(e);e=e.sibling}}function Of(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ri(e.child,!1))}Of(e)}e=e.sibling}}function $u(e){if(e.tag===30)e.stateNode.paired=null,Ri(e.child,!1),Of(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)$u(e),e=e.sibling;else Of(e)}function Jg(e){for(e=e.child;e!==null;)e.tag===30?Ri(e.child,!1):(e.subtreeFlags&33554432)!==0&&Jg(e),e=e.sibling}function Df(e,t,a,r,f,h,v){for(var w=!1;t!==null;){if(t.tag===5){var z=t.stateNode;if(h!==null&&Ln<h.length){var Y=h[Ln],W=fd(z);(Y.view||W.view)&&(w=!0);var se;if(se=(e.flags&4)===0)if(W.clip)se=!0;else{se=Y.rect;var q=W.rect;se=se.y!==q.y||se.x!==q.x||se.height!==q.height||se.width!==q.width}se&&(e.flags|=4),W.abs?W=!Y.abs:(Y=Y.rect,W=W.rect,W=Y.height!==W.height||Y.width!==W.width),W&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Fy(z,Ln===0?a:a+"_"+Ln,f),w&&(e.flags&4)!==0||(Mi===null&&(Mi=[]),Mi.push(z,Ln===0?r:r+"_"+Ln,t.memoizedProps)),Ln++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&v?e.flags|=t.flags&32:Df(e,t.child,a,r,f,h,v)&&(w=!0));t=t.sibling}return w}function Wg(e,t){for(e=e.child;e!==null;){if(e.tag===30){var a=e.memoizedProps,r=e.stateNode,f=Qi(a,r),h=Xi(a.default,a.update),v;v=e.memoizedState,e.memoizedState=null,r=e;var w=e.child;Ln=0,f=Df(r,w,f,f,h,v,!1),(e.flags&4)!==0&&f&&rr(e,a.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Wg(e);e=e.sibling}}var on=!1,Nt=!1,Li=!1,Mf=!1,ey=typeof WeakSet=="function"?WeakSet:Set,cn=null,Bi=!1,rs=!1,Zu=!1,Rf=!1;function fS(e,t,a){if(e=e.containerInfo,rd=gr,e=ap(e),bc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var f=r.getSelection&&r.getSelection();if(f&&f.rangeCount!==0){r=f.anchorNode;var h=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{r.nodeType,v.nodeType}catch{r=null;break e}var w=0,z=-1,Y=-1,W=0,se=0,q=e,K=null;t:for(;;){for(var Ce;q!==r||h!==0&&q.nodeType!==3||(z=w+h),q!==v||f!==0&&q.nodeType!==3||(Y=w+f),q.nodeType===3&&(w+=q.nodeValue.length),(Ce=q.firstChild)!==null;)K=q,q=Ce;for(;;){if(q===e)break t;if(K===r&&++W===h&&(z=w),K===v&&++se===f&&(Y=w),(Ce=q.nextSibling)!==null)break;q=K,K=q.parentNode}q=Ce}r=z===-1||Y===-1?null:{start:z,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(sd={focusedElem:e,selectionRange:r},gr=!1,a=(a&335544064)===a,cn=t,t=a?9270:1024;cn!==null;){if(e=cn,a&&(r=e.deletions,r!==null))for(h=0;h<r.length;h++)a&&zf(r[h]);if(e.alternate===null&&(e.flags&2)!==0)a&&Xg(e),Yu(a);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&a&&zf(r),Yu(a);continue}else if(r!==null&&r.memoizedState!==null){a&&Xg(e),Yu(a);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cn=r):(a&&Pg(e),Yu(a))}}Qn=null}function Yu(e){for(;cn!==null;){var t=cn,a=e,r=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&r!==null){a=void 0,f=r.memoizedProps,r=r.memoizedState;var h=t.stateNode;try{var v=ml(t.type,f);a=h.getSnapshotBeforeUpdate(v,r),h.__reactInternalSnapshotBeforeUpdate=a}catch(w){At(t,t.return,w)}}break;case 3:if((f&1024)!==0){if(r=t.stateNode.containerInfo,a=r.nodeType,a===9)md(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":md(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&r!==null&&(a=Qi(r.memoizedProps,r.stateNode),f=t.memoizedProps,f=Xi(f.default,f.update),f!=="none"&&Jl(r,a,f,r.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(s(163))}if(r=t.sibling,r!==null){r.return=t.return,cn=r;break}cn=t.return}}function ty(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Ii(e,a),r&4&&as(5,a);break;case 1:if(Ii(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){At(a,a.return,v)}else{var f=ml(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){At(a,a.return,v)}}r&64&&$g(a),r&512&&Di(a,a.return);break;case 3:if(Ii(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Op(e,t)}catch(v){At(a,a.return,v)}}break;case 27:t===null&&r&4&&Qg(a);case 26:case 5:Ii(e,a),t===null&&r&4&&Cf(a),r&512&&Di(a,a.return);break;case 12:Ii(e,a);break;case 31:Ii(e,a),r&4&&ly(e,a);break;case 13:Ii(e,a),r&4&&ry(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wS.bind(null,a),a2(e,a))));break;case 22:if(r=a.memoizedState!==null||on,!r){var h=t!==null&&t.memoizedState!==null||Nt;t=on,f=Nt,on=r,(Nt=h)&&!f?(r=2,(a.subtreeFlags&8772)!==0&&(r|=1),wi(e,a,r)):Ii(e,a),on=t,Nt=f}break;case 30:Ii(e,a),r&512&&Di(a,a.return);break;case 7:r&512&&Di(a,a.return);default:Ii(e,a)}}function Lf(e,t){for(e=e.child;e!==null;)ny(e,t),e=e.sibling}function ny(e,t){switch(e.tag){case 5:case 26:try{var a=e.stateNode;if(t){var r=a.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var f=e.stateNode,h=e.memoizedProps.style,v=h!=null&&h.hasOwnProperty("display")?h.display:null;f.style.display=v==null||typeof v=="boolean"?"":(""+v).trim()}}catch(z){At(e,e.return,z)}Bf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,vt=!0}catch(z){At(e,e.return,z)}break;case 18:try{var w=e.stateNode;t?Xy(w,!0):Xy(e.stateNode,!1)}catch(z){At(e,e.return,z)}break;case 22:case 23:e.memoizedState===null&&Lf(e,t);break;default:Lf(e,t)}}function Bf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var a=e,r=t;switch(a.tag){case 4:ny(a,r);break e;case 22:a.memoizedState===null&&Bf(a,r);break e;default:Bf(a,r)}}e=e.sibling}}function iy(e){var t=e.alternate;t!==null&&(e.alternate=null,iy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tn(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ht=null,Bn=!1;function Si(e,t,a){for(a=a.child;a!==null;)ay(e,t,a),a=a.sibling}function ay(e,t,a){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Oe,a)}catch{}switch(a.tag){case 26:Nt||yn(a,t),Si(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!Nt&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Nt||yn(a,t),ls(a);var r=Ht,f=Bn;Da(a.type)&&(Ht=a.stateNode,Bn=!1),Si(e,t,a),ux(a.stateNode,a.type,a.memoizedProps),Ht=r,Bn=f;break;case 5:Nt||yn(a,t),ls(a);case 6:if(a.tag===6&&ls(a),r=Ht,f=Bn,Ht=null,Si(e,t,a),Ht=r,Bn=f,Ht!==null)if(Bn)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(a.stateNode),vt=!0}catch(h){At(a,t,h)}else try{Ht.removeChild(a.stateNode),vt=!0}catch(h){At(a,t,h)}break;case 18:Ht!==null&&(Bn?(e=Ht,Qy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),yr(e)):Qy(Ht,a.stateNode));break;case 4:r=Ht,f=Bn,Ht=a.stateNode.containerInfo,Bn=!0,Si(e,t,a),Ht=r,Bn=f;break;case 0:case 11:case 14:case 15:ja(2,a,t),Nt||ja(4,a,t),Si(e,t,a);break;case 1:Nt||(yn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Zg(a,t,r)),Si(e,t,a);break;case 21:Si(e,t,a);break;case 22:Nt=(r=Nt)||a.memoizedState!==null,Si(e,t,a),Nt=r;break;case 30:yn(a,t),Si(e,t,a);break;case 7:Nt||yn(a,t),Si(e,t,a);break;default:Si(e,t,a)}}function ly(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yr(e)}catch(a){At(t,t.return,a)}}}function ry(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yr(e)}catch(a){At(t,t.return,a)}}function dS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ey),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ey),t;default:throw Error(s(435,e.tag))}}function Gu(e,t){var a=dS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var f=NS.bind(null,e,r);r.then(f,f)}})}function On(e,t,a){var r=t.deletions;if(r!==null)for(var f=0;f<r.length;f++){var h=r[f],v=e,w=t,z=w;e:for(;z!==null;){switch(z.tag){case 27:if(Da(z.type)){Ht=z.stateNode,Bn=!1;break e}break;case 5:Ht=z.stateNode,Bn=!1;break e;case 3:case 4:Ht=z.stateNode.containerInfo,Bn=!0;break e}z=z.return}if(Ht===null)throw Error(s(160));ay(v,w,h),Ht=null,Bn=!1,v=h.alternate,v!==null&&(v.return=null),h.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sy(t,e,a),t=t.sibling}var ki=null;function sy(e,t,a){var r=e.alternate,f=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(f&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var h=0;h<r.length;h++){var v=r[h];v.ref.impl=v.nextImpl}On(t,e,a),Dn(e),f&4&&(ja(3,e,e.return),as(3,e),ja(5,e,e.return));break;case 1:On(t,e,a),Dn(e),f&512&&(Nt||r===null||yn(r,r.return)),f&64&&on&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?t:a.concat(t))));break;case 26:if(h=ki,On(t,e,a),Dn(e),f&512&&(Nt||r===null||yn(r,r.return)),f&4)if(f=r!==null?r.memoizedState:null,a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null)if(on)e.stateNode=Zy(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,a=e.memoizedProps,f=h.ownerDocument||h;t:switch(t){case"title":r=f.getElementsByTagName("title")[0],(!r||r[Ot]||r[nn]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=f.createElement(t),f.head.insertBefore(r,f.querySelector("head > title"))),xn(r,t,a),r[nn]=e,sn(r),t=r;break e;case"link":if(h=mx("link","href",f).get(t+(a.href||""))){for(v=0;v<h.length;v++)if(r=h[v],r.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&r.getAttribute("rel")===(a.rel==null?null:a.rel)&&r.getAttribute("title")===(a.title==null?null:a.title)&&r.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(v,1);break t}}r=f.createElement(t),xn(r,t,a),f.head.appendChild(r);break;case"meta":if(h=mx("meta","content",f).get(t+(a.content||""))){for(v=0;v<h.length;v++)if(r=h[v],r.getAttribute("content")===(a.content==null?null:""+a.content)&&r.getAttribute("name")===(a.name==null?null:a.name)&&r.getAttribute("property")===(a.property==null?null:a.property)&&r.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&r.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(v,1);break t}}r=f.createElement(t),xn(r,t,a),f.head.appendChild(r);break;default:throw Error(s(468,t))}r[nn]=e,sn(r),t=r}e.stateNode=t}else on||Sd(h,e.type,e.stateNode);else e.stateNode=hx(h,a,e.memoizedProps);else f!==a?(f===null?(t=r.stateNode,t===null||Nt||t.parentNode.removeChild(t)):f.count--,a===null?on||Sd(h,e.type,e.stateNode):hx(h,a,e.memoizedProps)):a===null&&e.stateNode!==null&&jf(e,e.memoizedProps,r.memoizedProps);break;case 27:On(t,e,a),Dn(e),f&512&&(Nt||r===null||yn(r,r.return)),r!==null&&f&4&&jf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(h=Li,Li=!1,On(t,e,a),Li=h,Dn(e),f&512&&(Nt||r===null||yn(r,r.return)),e.flags&32){t=e.stateNode;try{Ml(t,""),vt=!0}catch(W){At(e,e.return,W)}}f&4&&e.stateNode!=null&&(t=e.memoizedProps,jf(e,t,r!==null?r.memoizedProps:t)),f&1024&&(Mf=!0);break;case 6:if(On(t,e,a),Dn(e),f&4){if(e.stateNode===null)throw Error(s(162));t=e.memoizedProps,a=e.stateNode;try{a.nodeValue=t,vt=!0}catch(W){At(e,e.return,W)}}break;case 3:if(vt=!1,so=null,h=ki,ki=ps(t.containerInfo),On(t,e,a),ki=h,Dn(e),f&4&&r!==null&&r.memoizedState.isDehydrated)try{yr(t.containerInfo)}catch(W){At(e,e.return,W)}Mf&&(Mf=!1,uy(e)),vt=!1;break;case 4:f=Li,Li=on,r=_m(),h=ki,ki=ps(e.stateNode.containerInfo),On(t,e,a),Dn(e),ki=h,vt&&rs&&(Zu=!0),vt=r,Li=f;break;case 12:On(t,e,a),Dn(e);break;case 31:On(t,e,a),Dn(e),f&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 13:On(t,e,a),Dn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Fu=ze()),f&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 22:h=e.memoizedState!==null,v=r!==null&&r.memoizedState!==null;var w=on,z=Nt,Y=Li;on=w||h,Li=Y||h,Nt=z||v,On(t,e,a),Nt=z,Li=Y,on=w,Dn(e),f&8192&&(t=e.stateNode,t._visibility=h?t._visibility&-2:t._visibility|1,!h||r===null||v||on||Nt||(t=v||Nt,a=on,r=Nt,on=h||on,Nt=t,Ea(e,2),on=a,Nt=r),!h&&Li||Lf(e,h)),f&4&&(t=e.updateQueue,t!==null&&(a=t.retryQueue,a!==null&&(t.retryQueue=null,Gu(e,a))));break;case 19:On(t,e,a),Dn(e),f&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Gu(e,t)));break;case 30:f&512&&(Nt||r===null||yn(r,r.return)),f=_m(),h=rs,v=(a&335544064)===a,w=e.memoizedProps,rs=v&&Xi(w.default,w.update)!=="none",On(t,e,a),Dn(e),v&&r!==null&&vt&&(e.flags|=4),rs=h,vt=f;break;case 21:break;case 7:f&512&&(Nt||r===null||yn(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:On(t,e,a),Dn(e)}}function Dn(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Gg(r)){a=r;break}r=r.return}r=null;for(var f=e.return;f!==null;){if(Nf(f)){var h=f.stateNode;r===null?r=[h]:r.push(h)}if(wf(f))break;f=f.return}var v=r;if(a==null)throw Error(s(160));switch(a.tag){case 27:var w=a.stateNode,z=Ef(e);Hu(e,z,w,v);break;case 5:var Y=a.stateNode;a.flags&32&&(Ml(Y,""),a.flags&=-33);var W=Ef(e);Hu(e,W,Y,v);break;case 3:case 4:var se=a.stateNode.containerInfo,q=Ef(e);_f(e,q,se,v);break;default:throw Error(s(161))}}catch(K){At(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function uy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;uy(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gr=!0,t.reset(),gr=!1),e=e.sibling}}function Wl(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)oy(t,e),t=t.sibling;else Wg(t)}function oy(e,t){var a=e.alternate;if(a===null)Tf(e,!1);else switch(e.tag){case 3:if(Rf=Bi=!1,Fg(),Wl(t,e),!Bi&&!Zu){if(e=Mi,e!==null)for(var r=0;r<e.length;r+=3){a=e[r];var f=e[r+1];Ky(a,e[r+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Rf=!0}Mi=null;break;case 5:Wl(t,e);break;case 4:r=Bi,Bi=!1,Wl(t,e),Bi&&(Zu=!0),Bi=r;break;case 22:e.memoizedState===null&&(a.memoizedState!==null?Tf(e,!1):Wl(t,e));break;case 30:r=Bi,f=Fg(),Bi=!1,Wl(t,e),Bi&&(e.flags|=4);var h=e.memoizedProps,v=e.stateNode;t=Qi(h,v),v=Qi(a.memoizedProps,v);var w=Xi(h.default,h.update);w==="none"?t=!1:(h=a.memoizedState,a.memoizedState=null,a=e.child,Ln=0,t=Df(e,a,t,v,w,h,!0),Ln!==(h===null?0:h.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(rr(e,e.memoizedProps.onUpdate),Mi=f):f!==null&&(f.push.apply(f,Mi),Mi=f),Bi=(e.flags&32)!==0?!0:r;break;default:Wl(t,e)}}function Ii(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ty(e,t.alternate,t),t=t.sibling}function Ea(e,t){for(e=e.child;e!==null;){var a=e,r=t;switch(a.tag){case 0:case 11:case 14:case 15:ja(4,a,a.return),Ea(a,r);break;case 1:yn(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&Zg(a,a.return,f),Ea(a,r);break;case 27:(r&2)!==0&&ux(a.stateNode,a.type,a.memoizedProps);case 5:yn(a,a.return),a.tag!==5&&a.tag!==27||ls(a),Ea(a,r);break;case 6:ls(a);break;case 26:yn(a,a.return),f=a.stateNode,a.memoizedState!==null||f===null||Nt||f.parentNode.removeChild(f),Ea(a,r);break;case 22:a.memoizedState===null&&Ea(a,r);break;case 30:yn(a,a.return),Ea(a,r);break;case 7:yn(a,a.return);default:Ea(a,r)}e=e.sibling}}function wi(e,t,a){for(a=(t.subtreeFlags&8772)!==0?a:a&-2,t=t.child;t!==null;){var r=t.alternate,f=e,h=t,v=h.flags,w=(a&1)!==0;switch(h.tag){case 0:case 11:case 15:wi(f,h,a),as(4,h);break;case 1:if(wi(f,h,a),r=h,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(W){At(r,r.return,W)}if(r=h,f=r.updateQueue,f!==null){var z=r.stateNode;try{var Y=f.shared.hiddenCallbacks;if(Y!==null)for(f.shared.hiddenCallbacks=null,f=0;f<Y.length;f++)zp(Y[f],z)}catch(W){At(r,r.return,W)}}w&&v&64&&$g(h),Di(h,h.return);break;case 27:(a&2)!==0&&Qg(h);case 5:h.tag!==5&&h.tag!==27||Yg(h),wi(f,h,a),w&&r===null&&v&4&&Cf(h),Di(h,h.return);break;case 6:Yg(h);break;case 26:z=h.stateNode,h.memoizedState!==null||z===null||on||Sd(ps(z.ownerDocument),h.type,z),wi(f,h,a),w&&r===null&&v&4&&Cf(h),Di(h,h.return);break;case 12:wi(f,h,a);break;case 31:wi(f,h,a),w&&v&4&&ly(f,h);break;case 13:wi(f,h,a),w&&v&4&&ry(f,h);break;case 22:h.memoizedState===null&&wi(f,h,a),Di(h,h.return);break;case 30:wi(f,h,a),Di(h,h.return);break;case 7:Di(h,h.return);default:wi(f,h,a)}t=t.sibling}}function If(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Yr(a))}function Uf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yr(e))}function oi(e,t,a,r){var f=(a&335544064)===a;if(t.subtreeFlags&(f?10262:10256))for(t=t.child;t!==null;)cy(e,t,a,r),t=t.sibling;else f&&Jg(t)}function cy(e,t,a,r){var f=(a&335544064)===a;f&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$u(t);var h=t.flags;switch(t.tag){case 0:case 11:case 15:oi(e,t,a,r),h&2048&&as(9,t);break;case 1:oi(e,t,a,r);break;case 3:oi(e,t,a,r),f&&Rf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),h&2048&&(h=null,t.alternate!==null&&(h=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==h&&(t.refCount++,h!=null&&Yr(h)));break;case 12:if(h&2048){oi(e,t,a,r),h=t.stateNode;try{var v=t.memoizedProps,w=v.id,z=v.onPostCommit;typeof z=="function"&&z(w,t.alternate===null?"mount":"update",h.passiveEffectDuration,-0)}catch(Y){At(t,t.return,Y)}}else oi(e,t,a,r);break;case 31:oi(e,t,a,r);break;case 13:oi(e,t,a,r);break;case 23:break;case 22:v=t.stateNode,w=t.alternate,t.memoizedState!==null?(f&&w!==null&&w.memoizedState===null&&$u(w),v._visibility&2?oi(e,t,a,r):ss(e,t)):(f&&w!==null&&w.memoizedState!==null&&$u(t),v._visibility&2?oi(e,t,a,r):(v._visibility|=2,er(e,t,a,r,(t.subtreeFlags&10256)!==0||!1))),h&2048&&If(w,t);break;case 24:oi(e,t,a,r),h&2048&&Uf(t.alternate,t);break;case 30:f&&(h=t.alternate,h!==null&&(Ri(h.child,!0),Ri(t.child,!0))),oi(e,t,a,r);break;default:oi(e,t,a,r)}}function er(e,t,a,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,v=t,w=a,z=r,Y=v.flags;switch(v.tag){case 0:case 11:case 15:er(h,v,w,z,f),as(8,v);break;case 23:break;case 22:var W=v.stateNode;v.memoizedState!==null?W._visibility&2?er(h,v,w,z,f):ss(h,v):(W._visibility|=2,er(h,v,w,z,f)),f&&Y&2048&&If(v.alternate,v);break;case 24:er(h,v,w,z,f),f&&Y&2048&&Uf(v.alternate,v);break;default:er(h,v,w,z,f)}t=t.sibling}}function ss(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,f=r.flags;switch(r.tag){case 22:ss(a,r),f&2048&&If(r.alternate,r);break;case 24:ss(a,r),f&2048&&Uf(r.alternate,r);break;default:ss(a,r)}t=t.sibling}}var pl=8192;function gl(e,t,a){if(e.subtreeFlags&pl)for(e=e.child;e!==null;)fy(e,t,a),e=e.sibling}function fy(e,t,a){switch(e.tag){case 26:gl(e,t,a),e.flags&pl&&(e.memoizedState!==null?x2(a,ki,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&xx(a,e)));break;case 5:gl(e,t,a),e.flags&pl&&(e=e.stateNode,(t&335544128)===t&&xx(a,e));break;case 3:case 4:var r=ki;ki=ps(e.stateNode.containerInfo),gl(e,t,a),ki=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=pl,pl=16777216,gl(e,t,a),pl=r):gl(e,t,a));break;case 30:if((e.flags&pl)!==0&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var f=e.stateNode;f.paired=null,Qn===null&&(Qn=new Map),Qn.set(r,f)}gl(e,t,a);break;default:gl(e,t,a)}}function dy(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];cn=r,my(r,e)}dy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)hy(e),e=e.sibling}function hy(e){switch(e.tag){case 0:case 11:case 15:us(e),e.flags&2048&&ja(9,e,e.return);break;case 3:us(e);break;case 12:us(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):us(e);break;default:us(e)}}function Qu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];cn=r,my(r,e)}dy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ja(8,t,t.return),Qu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function my(e,t){for(;cn!==null;){var a=cn;switch(a.tag){case 0:case 11:case 15:ja(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Yr(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,cn=r;else e:for(a=e;cn!==null;){r=cn;var f=r.sibling,h=r.return;if(iy(r),r===a){cn=null;break e}if(f!==null){f.return=h,cn=f;break e}cn=h}}}var hS={getCacheForType:function(e){var t=mn(Kt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return mn(Kt).controller.signal}},mS=typeof WeakMap=="function"?WeakMap:Map,kt=0,Mt=null,ut=null,ct=0,Tt=0,Xn=null,_a=!1,tr=!1,Hf=!1,ia=0,Zt=0,Ta=0,yl=0,Xu=0,Fn=0,nr=0,os=null,In=null,qf=!1,Fu=0,py=0,Ku=1/0,Pu=null,Aa=null,Vt=0,Ni=null,xl=null,Ui=0,Vf=0,$f=null,gy=null,ir=null,ar=null,lr=null,cs=0,Ju=null;function Kn(){return(kt&2)!==0&&ct!==0?ct&-ct:ve.T!==null?Wf():Fs()}function yy(){if(Fn===0)if((ct&536870912)===0||lt){var e=Ut;Ut<<=1,(Ut&3932160)===0&&(Ut=262144),Fn=e}else Fn=536870912;return e=pn.current,e!==null&&(e.flags|=32),Fn}function rr(e,t){if(t!=null){var a=e.stateNode,r=a.ref;r===null&&(r=a.ref=Py(Qi(e.memoizedProps,a))),ar===null&&(ar=[]),ar.push(t.bind(null,r))}}function Un(e,t,a){(e===Mt&&(Tt===2||Tt===9)||e.cancelPendingCommit!==null)&&(sr(e,0),za(e,ct,Fn,!1)),Ja(e,a),((kt&2)===0||e!==Mt)&&(e===Mt&&((kt&2)===0&&(yl|=a),Zt===4&&za(e,ct,Fn,!1)),Hi(e))}function xy(e,t,a){if((kt&6)!==0)throw Error(s(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ca(e,t),f=r?yS(e,t):Yf(e,t,!0),h=r;do{if(f===0){tr&&!r&&za(e,t,0,!1);break}else{if(a=e.current.alternate,h&&!pS(a)){f=Yf(e,t,!1),h=!1;continue}if(f===2){if(h=t,e.errorRecoveryDisabledLanes&h)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var w=e;f=os;var z=w.current.memoizedState.isDehydrated;if(z&&(sr(w,v).flags|=256),v=Yf(w,v,!1),v!==2&&v!==6){if(Hf&&!z){w.errorRecoveryDisabledLanes|=h,yl|=h,f=4;break e}h=In,In=f,h!==null&&(In===null?In=h:In.push.apply(In,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){sr(e,0),za(e,t,0,!0);break}e:{switch(r=e,h=f,h){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:za(r,t,Fn,!_a);break e;case 2:In=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(f=Fu+300-ze(),10<f)){if(za(r,t,Fn,!_a),xi(r,0,!0)!==0)break e;Ui=t,r.timeoutHandle=cd(vy.bind(null,r,a,In,Pu,qf,t,Fn,yl,nr,_a,h,"Throttled",-0,0),f);break e}vy(r,a,In,Pu,qf,t,Fn,yl,nr,_a,h,null,-0,0)}}break}while(!0);Hi(e)}function vy(e,t,a,r,f,h,v,w,z,Y,W,se,q,K){e.timeoutHandle=-1;var Ce=t.subtreeFlags,Ie=(h&335544064)===h;if(se=null,(Ie||Ce&8192||(Ce&16785408)===16785408)&&(se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ai},Qn=null,fy(t,h,se),Ie&&(Ce=se,Ie=e.containerInfo,Ie=(Ie.nodeType===9?Ie:Ie.ownerDocument).__reactViewTransition,Ie!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=xs.bind(Ce),Ie.finished.then(Ce,Ce))),Ce=(h&62914560)===h?Fu-ze():(h&4194048)===h?py-ze():0,Ce=v2(se,Ce),Ce!==null)){Ui=h,e.cancelPendingCommit=Ce(Ey.bind(null,e,t,h,a,r,f,v,w,z,Y,W,se,null,q,K)),za(e,h,v,!Y);return}Ey(e,t,h,a,r,f,v,w,z,Y,W,se)}function pS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var f=a[r],h=f.getSnapshot;f=f.value;try{if(!Yn(h(),f))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function za(e,t,a,r){t=Qs(e,t),t&=~Xu,t&=~yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var h=31-_t(f),v=1<<h;r[h]=-1,f&=~v}a!==0&&Ar(e,a,t)}function Wu(){return(kt&6)===0?(fs(0),!1):!0}function Zf(){if(ut!==null){if(Tt===0)var e=ut.return;else e=ut,Pi=ll=null,Pc(e),Ql=null,Xr=0,e=ut;for(;e!==null;)Vg(e.alternate,e),e=e.return;ut=null}}function sr(e,t){var a=e.timeoutHandle;return a!==-1&&(e.timeoutHandle=-1,US(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ui=0,Zf(),Mt=e,ut=a=Fi(e.current,null),ct=t,Tt=0,Xn=null,_a=!1,tr=ca(e,t),Hf=!1,nr=Fn=Xu=yl=Ta=Zt=0,In=os=null,qf=!1,ia=Qs(e,t),su(),a}function by(e,t){tt=null,ve.H=Ou,t===Gl||t===xu?(t=Ep(),Tt=3):t===Ic?(t=Ep(),Tt=4):Tt=t===hf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xn=t,ut===null&&(Zt=1,Du(e,li(t,e.current)))}function Sy(){var e=pn.current;return e===null?!0:(ct&4194048)===ct?Cn===null:(ct&62914560)===ct||(ct&536870912)!==0?e===Cn:!1}function ky(){var e=ve.H;return ve.H=Ou,e===null?Ou:e}function wy(){var e=ve.A;return ve.A=hS,e}function eo(){Zt=4,_a||(ct&4194048)!==ct&&pn.current!==null||(tr=!0),(Ta&134217727)===0&&(yl&134217727)===0||Mt===null||za(Mt,ct,Fn,!1)}function Yf(e,t,a){var r=kt;kt|=2;var f=ky(),h=wy();(Mt!==e||ct!==t)&&(Pu=null,sr(e,t)),t=!1;var v=Zt;e:do try{if(Tt!==0&&ut!==null){var w=ut,z=Xn;switch(Tt){case 8:Zf(),v=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(t=!0);var Y=Tt;if(Tt=0,Xn=null,ur(e,w,z,Y),a&&tr){v=0;break e}break;default:Y=Tt,Tt=0,Xn=null,ur(e,w,z,Y)}}gS(),v=Zt;break}catch(W){by(e,W)}while(!0);return t&&e.shellSuspendCounter++,Pi=ll=null,kt=r,ve.H=f,ve.A=h,ut===null&&(Mt=null,ct=0,su()),v}function gS(){for(;ut!==null;)Ny(ut)}function yS(e,t){var a=kt;kt|=2;var r=ky(),f=wy();Mt!==e||ct!==t?(Pu=null,Ku=ze()+500,sr(e,t)):tr=ca(e,t);e:do try{if(Tt!==0&&ut!==null){t=ut;var h=Xn;t:switch(Tt){case 1:Tt=0,Xn=null,ur(e,t,h,1);break;case 2:case 9:if(Cp(h)){Tt=0,Xn=null,Cy(t);break}t=function(){Tt!==2&&Tt!==9||Mt!==e||(Tt=7),Hi(e)},h.then(t,t);break e;case 3:Tt=7;break e;case 4:Tt=5;break e;case 7:Cp(h)?(Tt=0,Xn=null,Cy(t)):(Tt=0,Xn=null,ur(e,t,h,7));break;case 5:var v=null;switch(ut.tag){case 26:v=ut.memoizedState;case 5:case 27:var w=ut;if(v?gx(v):w.stateNode.complete){Tt=0,Xn=null;var z=w.sibling;if(z!==null)ut=z;else{var Y=w.return;Y!==null?(ut=Y,to(Y)):ut=null}break t}}Tt=0,Xn=null,ur(e,t,h,5);break;case 6:Tt=0,Xn=null,ur(e,t,h,6);break;case 8:Zf(),Zt=6;break e;default:throw Error(s(462))}}xS();break}catch(W){by(e,W)}while(!0);return Pi=ll=null,ve.H=r,ve.A=f,kt=a,ut!==null?0:(Mt=null,ct=0,su(),Zt)}function xS(){for(;ut!==null&&!Ze();)Ny(ut)}function Ny(e){var t=Hg(e.alternate,e,ia);e.memoizedProps=e.pendingProps,t===null?to(e):ut=t}function Cy(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Dg(a,t,t.pendingProps,t.type,void 0,ct);break;case 11:t=Dg(a,t,t.pendingProps,t.type.render,t.ref,ct);break;case 5:Pc(t);var r=t;r===un&&(lt?(hu(r),r.tag===5&&r.stateNode!=null&&(Bt=r.stateNode)):(hu(r),lt=!0));default:Vg(a,t),t=ut=mp(t,ia),t=Hg(a,t,ia)}e.memoizedProps=e.pendingProps,t===null?to(e):ut=t}function ur(e,t,a,r){Pi=ll=null,Pc(t),Ql=null,Xr=0;var f=t.return;try{if(lS(e,f,t,a,ct)){Zt=1,Du(e,li(a,e.current)),ut=null;return}}catch(h){if(f!==null)throw ut=f,h;Zt=1,Du(e,li(a,e.current)),ut=null;return}t.flags&32768?(lt||r===1?e=!0:tr||(ct&536870912)!==0?e=!1:(_a=e=!0,(r===2||r===9||r===3||r===6)&&(r=pn.current,r!==null&&r.tag===13&&(r.flags|=16384))),jy(t,e)):to(t)}function to(e){var t=e;do{if((t.flags&32768)!==0){jy(t,_a);return}e=t.return;var a=oS(t.alternate,t,ia);if(a!==null){ut=a;return}if(t=t.sibling,t!==null){ut=t;return}ut=t=e}while(t!==null);Zt===0&&(Zt=5)}function jy(e,t){do{var a=cS(e.alternate,e);if(a!==null){a.flags&=32767,ut=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ut=e;return}ut=e=a}while(e!==null);Zt=6,ut=null}function Ey(e,t,a,r,f,h,v,w,z,Y,W,se){e.cancelPendingCommit=null;do no();while(Vt!==0);if((kt&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));e===Mt&&(ut=Mt=null,ct=0),xl=t,Ni=e,Ui=a,$f=f,gy=r,vS(e,t,a,v,w,z,se)}}function vS(e,t,a,r,f,h,v){var w=t.lanes|t.childLanes;if(Vf=w,w|=Cc,nc(e,a,w,r,f,h),ar=null,(a&335544064)===a?(lr=Q0(e),r=10262):(lr=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,CS($n,function(){return Ff(),null})):(e.callbackNode=null,e.callbackPriority=0),qu=!1,r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=ve.T,ve.T=null,f=Z.p,Z.p=2,h=kt,kt|=4;try{fS(e,t,a)}finally{kt=h,Z.p=f,ve.T=r}}Vt=1,qu?ir=YS(v,e.containerInfo,lr,Gf,Qf,SS,Xf,Ff,bS):(Gf(),Qf(),Xf())}function bS(e){if(Vt!==0){var t=Ni.onRecoverableError;t(e,{componentStack:null})}}function SS(){Vt===3&&(Vt=0,oy(xl,Ni),Vt=4)}function Gf(){if(Vt===1){Vt=0;var e=Ni,t=xl,a=Ui,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=ve.T,ve.T=null;var f=Z.p;Z.p=2;var h=kt;kt|=4;try{rs=Zu=!1,sy(t,e,a),a=sd;var v=ap(e.containerInfo),w=a.focusedElem,z=a.selectionRange;if(v!==w&&w&&w.ownerDocument&&ip(w.ownerDocument.documentElement,w)){if(z!==null&&bc(w)){var Y=z.start,W=z.end;if(W===void 0&&(W=Y),"selectionStart"in w)w.selectionStart=Y,w.selectionEnd=Math.min(W,w.value.length);else{var se=w.ownerDocument||document,q=se&&se.defaultView||window;if(q.getSelection){var K=q.getSelection(),Ce=w.textContent.length,Ie=Math.min(z.start,Ce),nt=z.end===void 0?Ie:Math.min(z.end,Ce);!K.extend&&Ie>nt&&(v=nt,nt=Ie,Ie=v);var $=np(w,Ie),B=np(w,nt);if($&&B&&(K.rangeCount!==1||K.anchorNode!==$.node||K.anchorOffset!==$.offset||K.focusNode!==B.node||K.focusOffset!==B.offset)){var X=se.createRange();X.setStart($.node,$.offset),K.removeAllRanges(),Ie>nt?(K.addRange(X),K.extend(B.node,B.offset)):(X.setEnd(B.node,B.offset),K.addRange(X))}}}}for(se=[],K=w;K=K.parentNode;)K.nodeType===1&&se.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<se.length;w++){var re=se[w];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}gr=!!rd,sd=rd=null}finally{kt=h,Z.p=f,ve.T=r}}e.current=t,Vt=2}}function Qf(){if(Vt===2){Vt=0;var e=Ni,t=xl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=ve.T,ve.T=null;var r=Z.p;Z.p=2;var f=kt;kt|=4;try{ty(e,t.alternate,t)}finally{kt=f,Z.p=r,ve.T=a}}Vt=3}}function Xf(){if(Vt===4||Vt===3){Vt=0;var e=ir;ir=null,kn();var t=Ni,a=xl,r=Ui,f=gy,h=(r&335544064)===r?10262:10256;if((a.subtreeFlags&h)!==0||(a.flags&h)!==0?Vt=5:(Vt=0,xl=Ni=null,_y(t,t.pendingLanes)),h=t.pendingLanes,h===0&&(Aa=null),Dr(r),a=a.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Oe,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=ve.T,h=Z.p,Z.p=2,ve.T=null;try{for(var v=t.onRecoverableError,w=0;w<f.length;w++){var z=f[w];v(z.value,{componentStack:z.stack})}}finally{ve.T=a,Z.p=h}}if(f=ar,v=lr,lr=null,f!==null&&(ar=null,v===null&&(v=[]),e!==null))for(z=0;z<f.length;z++)a=(0,f[z])(v),a!==void 0&&e.finished.finally(a);(Ui&3)!==0&&no(),Hi(t),h=t.pendingLanes,(r&261930)!==0&&(h&42)!==0?t===Ju?cs++:(cs=0,Ju=t):(cs=0,Ju=null),fs(0)}}function _y(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yr(t)))}function no(){return ir!==null&&(ir.skipTransition(),ir=null),Gf(),Qf(),Xf(),Ff()}function Ff(){if(Vt!==5)return!1;var e=Ni,t=Vf;Vf=0;var a=Dr(Ui),r=ve.T,f=Z.p;try{Z.p=32>a?32:a,ve.T=null,a=$f,$f=null;var h=Ni,v=Ui;if(Vt=0,xl=Ni=null,Ui=0,(kt&6)!==0)throw Error(s(331));var w=kt;if(kt|=4,hy(h.current),cy(h,h.current,v,a),kt=w,fs(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Oe,h)}catch{}return!0}finally{Z.p=f,ve.T=r,_y(e,t)}}function Ty(e,t,a){t=li(a,t),t=df(e.stateNode,t,2),e=ka(e,t,2),e!==null&&(Ja(e,2),Hi(e))}function At(e,t,a){if(e.tag===3)Ty(e,e,a);else for(;t!==null;){if(t.tag===3){Ty(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Aa===null||!Aa.has(r))){e=li(a,e),a=Cg(2),r=ka(t,a,2),r!==null&&(jg(a,r,t,e),Ja(r,2),Hi(r));break}}t=t.return}}function Kf(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new mS;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(a)||(Hf=!0,f.add(a),e=kS.bind(null,e,t,a),t.then(e,e))}function kS(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Mt===e&&(ct&a)===a&&((Zt===4||Zt===3&&(ct&62914560)===ct&&300>ze()-Fu)&&(kt&2)===0?sr(e,0):Xu|=a,nr===ct&&(nr=0)),Hi(e)}function Ay(e,t){t===0&&(t=Xs()),e=nl(e,t),e!==null&&(Ja(e,t),Hi(e))}function wS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ay(e,a)}function NS(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),Ay(e,a)}function CS(e,t){return jt(e,t)}var or=null,cr=null,Pf=!1,io=!1,Jf=!1,Oa=0;function Hi(e){e!==cr&&e.next===null&&(cr===null?or=cr=e:cr=cr.next=e),io=!0,Pf||(Pf=!0,ES())}function fs(e,t){if(!Jf&&io){Jf=!0;do for(var a=!1,r=or;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var h=0;else{var v=r.suspendedLanes,w=r.pingedLanes;h=(1<<31-_t(42|e)+1)-1,h&=f&~(v&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,My(r,h))}else h=ct,h=xi(r,r===Mt?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||ca(r,h)||(a=!0,My(r,h));r=r.next}while(a);Jf=!1}}function jS(){zy()}function zy(){io=Pf=!1;var e=0;Oa!==0&&IS()&&(e=Oa);for(var t=ze(),a=null,r=or;r!==null;){var f=r.next,h=Oy(r,t);h===0?(r.next=null,a===null?or=f:a.next=f,f===null&&(cr=a)):(a=r,(e!==0||(h&3)!==0)&&(io=!0)),r=f}Vt!==0&&Vt!==5||fs(e),Oa!==0&&(Oa=0)}function Oy(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var v=31-_t(h),w=1<<v,z=f[v];z===-1?((w&a)===0||(w&r)!==0)&&(f[v]=tc(w,t)):z<=t&&(e.expiredLanes|=w),h&=~w}if(t=Mt,a=ct,a=xi(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(Tt===2||Tt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Et(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ca(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Et(r),Dr(a)){case 2:case 8:a=Ft;break;case 32:a=$n;break;case 268435456:a=ei;break;default:a=$n}return r=Dy.bind(null,e),a=jt(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Et(r),e.callbackPriority=2,e.callbackNode=null,2}function Dy(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(no()&&e.callbackNode!==a)return null;var r=ct;return r=xi(e,e===Mt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xy(e,r,t),Oy(e,ze()),e.callbackNode!=null&&e.callbackNode===a?Dy.bind(null,e):null)}function My(e,t){if(no())return null;xy(e,t,!0)}function ES(){HS(function(){(kt&6)!==0?jt(Xt,jS):zy()})}function Wf(){if(Oa===0){var e=ul;e===0&&(e=ti,ti<<=1,(ti&261888)===0&&(ti=256)),Oa=e}return Oa}function Ry(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ws(e)}function _S(e,t,a,r,f){if(t==="submit"&&a&&a.stateNode===f){var h=Ry((f[Nn]||null).action),v=r.submitter;v&&(t=(t=v[Nn]||null)?Ry(t.formAction):v.getAttribute("formAction"),t!==null&&(h=t,v=null));var w=new iu("action","action",null,r,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Oa!==0){var z=new FormData(f,v);sf(a,{pending:!0,data:z,method:f.method,action:h},null,z)}}else typeof h=="function"&&(w.preventDefault(),z=new FormData(f,v),sf(a,{pending:!0,data:z,method:f.method,action:h},h,z))},currentTarget:f}]})}}for(var ed=0;ed<Nc.length;ed++){var td=Nc[ed],TS=td.toLowerCase(),AS=td[0].toUpperCase()+td.slice(1);bi(TS,"on"+AS)}bi(sp,"onAnimationEnd"),bi(up,"onAnimationIteration"),bi(op,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(U0,"onTransitionRun"),bi(H0,"onTransitionStart"),bi(q0,"onTransitionCancel"),bi(cp,"onTransitionEnd"),Ol("onMouseEnter",["mouseout","mouseover"]),Ol("onMouseLeave",["mouseout","mouseover"]),Ol("onPointerEnter",["pointerout","pointerover"]),Ol("onPointerLeave",["pointerout","pointerover"]),Wa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ds="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(" "),zS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ds));function Ly(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],f=r.event;r=r.listeners;e:{var h=void 0;if(t)for(var v=r.length-1;0<=v;v--){var w=r[v],z=w.instance,Y=w.currentTarget;if(w=w.listener,z!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=Y;try{h(f)}catch(W){ru(W)}f.currentTarget=null,h=z}else for(v=0;v<r.length;v++){if(w=r[v],z=w.instance,Y=w.currentTarget,w=w.listener,z!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=Y;try{h(f)}catch(W){ru(W)}f.currentTarget=null,h=z}}}}function ot(e,t){var a=t[M];a===void 0&&(a=t[M]=new Set);var r=e+"__bubble";a.has(r)||(By(t,e,2,!1),a.add(r))}function nd(e,t,a){var r=0;t&&(r|=4),By(a,e,r,t)}var ao="_reactListening"+Math.random().toString(36).slice(2);function id(e){if(!e[ao]){e[ao]=!0,Nm.forEach(function(a){a!=="selectionchange"&&(zS.has(a)||nd(a,!1,e),nd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ao]||(t[ao]=!0,nd("selectionchange",!1,t))}}function By(e,t,a,r){switch(jx(t)){case 2:var f=w2;break;case 8:f=N2;break;default:f=wd}a=f.bind(null,t,a,e),f=void 0,!cc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,a,{capture:!0,passive:f}):e.addEventListener(t,a,!0):f!==void 0?e.addEventListener(t,a,{passive:f}):e.addEventListener(t,a,!1)}function ad(e,t,a,r,f){var h=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var v=r.tag;if(v===3||v===4){var w=r.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=r.return;v!==null;){var z=v.tag;if((z===3||z===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=Zi(w),v===null)return;if(z=v.tag,z===5||z===6||z===26||z===27){r=h=v;continue e}w=w.parentNode}}r=r.return}Bm(function(){var Y=h,W=uc(a),se=[];e:{var q=fp.get(e);if(q!==void 0){var K=iu,Ce=e;switch(e){case"keypress":if(tu(a)===0)break e;case"keydown":case"keyup":K=p0;break;case"focusin":Ce="focus",K=mc;break;case"focusout":Ce="blur",K=mc;break;case"beforeblur":case"afterblur":K=mc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Hm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=i0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=b0;break;case sp:case up:case op:K=r0;break;case cp:K=k0;break;case"scroll":case"scrollend":K=t0;break;case"wheel":K=N0;break;case"copy":case"cut":case"paste":K=u0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Vm;break;case"submit":K=x0;break;case"toggle":case"beforetoggle":K=j0}var Ie=(t&4)!==0,nt=!Ie&&(e==="scroll"||e==="scrollend"),$=Ie?q!==null?q+"Capture":null:q;Ie=[];for(var B=Y,X;B!==null;){var re=B;if(X=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||X===null||$===null||(re=Mr(B,$),re!=null&&Ie.push(hs(B,re,X))),nt)break;B=B.return}0<Ie.length&&(q=new K(q,Ce,null,a,W),se.push({event:q,listeners:Ie}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",K&&a!==sc&&(Ce=a.relatedTarget||a.fromElement)&&(Zi(Ce)||Ce[fa]))break e;(q||K)&&(Ce=W.window===W?W:(K=W.ownerDocument)?K.defaultView||K.parentWindow:window,q?(K=a.relatedTarget||a.toElement,q=Y,K=K?Zi(K):null,K!==null&&(nt=o(K),Ie=K.tag,K!==nt||Ie!==5&&Ie!==27&&Ie!==6)&&(K=null)):(q=null,K=Y),q!==K&&(Ie=Hm,re="onMouseLeave",$="onMouseEnter",B="mouse",(e==="pointerout"||e==="pointerover")&&(Ie=Vm,re="onPointerLeave",$="onPointerEnter",B="pointer"),nt=q==null?Ce:Ti(q),X=K==null?Ce:Ti(K),Ce=new Ie(re,B+"leave",q,a,W),Ce.target=nt,Ce.relatedTarget=X,re=null,Zi(W)===Y&&(Ie=new Ie($,B+"enter",K,a,W),Ie.target=X,Ie.relatedTarget=nt,re=Ie),nt=re,Ie=q&&K?O(q,K,OS):null,q!==null&&Iy(se,Ce,q,Ie,!1),K!==null&&nt!==null&&Iy(se,nt,K,Ie,!0)))}e:{if(q=Y?Ti(Y):window,K=q.nodeName&&q.nodeName.toLowerCase(),K==="select"||K==="input"&&q.type==="file")var De=Km;else if(Xm(q))if(Pm)De=L0;else{De=M0;var ft=D0}else K=q.nodeName,!K||K.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?Y&&rc(Y.elementType)&&(De=Km):De=R0;if(De&&(De=De(e,Y))){Fm(se,De,a,W);break e}ft&&ft(e,q,Y)}switch(ft=Y?Ti(Y):window,e){case"focusin":(Xm(ft)||ft.contentEditable==="true")&&(Il=ft,Sc=Y,Vr=null);break;case"focusout":Vr=Sc=Il=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,lp(se,a,W);break;case"selectionchange":if(I0)break;case"keydown":case"keyup":lp(se,a,W)}var $e;if(gc)e:{switch(e){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Bl?Gm(e,a)&&(Qe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Qe="onCompositionStart");Qe&&($m&&a.locale!=="ko"&&(Bl||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Bl&&($e=Im()):(ha=W,fc="value"in ha?ha.value:ha.textContent,Bl=!0)),ft=lo(Y,Qe),0<ft.length&&(Qe=new qm(Qe,e,null,a,W),se.push({event:Qe,listeners:ft}),$e?Qe.data=$e:($e=Qm(a),$e!==null&&(Qe.data=$e)))),($e=_0?T0(e,a):A0(e,a))&&(Qe=lo(Y,"onBeforeInput"),0<Qe.length&&(ft=new qm("onBeforeInput","beforeinput",null,a,W),se.push({event:ft,listeners:Qe}),ft.data=$e)),_S(se,e,Y,a,W)}Ly(se,t)})}function hs(e,t,a){return{instance:e,listener:t,currentTarget:a}}function lo(e,t){for(var a=t+"Capture",r=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Mr(e,a),f!=null&&r.unshift(hs(e,f,h)),f=Mr(e,t),f!=null&&r.push(hs(e,f,h))),e.tag===3)return r;e=e.return}return[]}function OS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Iy(e,t,a,r,f){for(var h=t._reactName,v=[];a!==null&&a!==r;){var w=a,z=w.alternate,Y=w.stateNode;if(w=w.tag,z!==null&&z===r)break;w!==5&&w!==26&&w!==27||Y===null||(z=Y,f?(Y=Mr(a,h),Y!=null&&v.unshift(hs(a,Y,z))):f||(Y=Mr(a,h),Y!=null&&v.push(hs(a,Y,z)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var DS=/\r\n?/g,MS=/\u0000|\uFFFD/g;function Uy(e){return(typeof e=="string"?e:""+e).replace(DS,`
|
|
49
|
+
`).replace(MS,"")}function Hy(e,t){return t=Uy(t),Uy(e)===t}function zt(e,t,a,r,f,h){switch(a){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||Ml(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&Ml(e,""+r);else return;break;case"className":Js(e,"class",r);break;case"tabIndex":Js(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Js(e,a,r);break;case"style":Rm(e,r,h);return;case"data":if(t!=="object"){Js(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Ws(r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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 h=="function"&&(a==="formAction"?(t!=="input"&&zt(e,t,"name",f.name,f,null),zt(e,t,"formEncType",f.formEncType,f,null),zt(e,t,"formMethod",f.formMethod,f,null),zt(e,t,"formTarget",f.formTarget,f,null)):(zt(e,t,"encType",f.encType,f,null),zt(e,t,"method",f.method,f,null),zt(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Ws(r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=Ai);return;case"onScroll":r!=null&&ot("scroll",e);return;case"onScrollEnd":r!=null&&ot("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(f.children!=null)throw Error(s(60));(h!=null?h.__html:void 0)!==a&&(e.innerHTML=a)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=Ws(r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":ot("beforetoggle",e),ot("toggle",e),Ps(e,"popover",r);break;case"xlinkActuate":Yi(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Yi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Yi(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Yi(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Yi(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Yi(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Yi(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Yi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Yi(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ps(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=W1.get(a)||a,Ps(e,a,r);else return}vt=!0}function ld(e,t,a,r,f,h){switch(a){case"style":Rm(e,r,h);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(f.children!=null)throw Error(s(60));(h!=null?h.__html:void 0)!==a&&(e.innerHTML=a)}}break;case"children":if(typeof r=="string")Ml(e,r);else if(typeof r=="number"||typeof r=="bigint")Ml(e,""+r);else return;break;case"onScroll":r!=null&&ot("scroll",e);return;case"onScrollEnd":r!=null&&ot("scrollend",e);return;case"onClick":r!=null&&(e.onclick=Ai);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Cm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),h=a.slice(2,f?a.length-7:void 0),t=e[Nn]||null,t=t!=null?t[a]:null,typeof t=="function"&&e.removeEventListener(h,t,f),typeof r=="function")){typeof t!="function"&&t!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(h,r,f);break e}vt=!0,a in e?e[a]=r:r===!0?e.setAttribute(a,""):Ps(e,a,r)}return}vt=!0}function xn(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",e),ot("load",e);var r=!1,f=!1,h;for(h in a)if(a.hasOwnProperty(h)){var v=a[h];if(v!=null)switch(h){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:zt(e,t,h,v,a,null)}}f&&zt(e,t,"srcSet",a.srcSet,a,null),r&&zt(e,t,"src",a.src,a,null);return;case"input":ot("invalid",e);var w=h=v=f=null,z=null,Y=null;for(r in a)if(a.hasOwnProperty(r)){var W=a[r];if(W!=null)switch(r){case"name":f=W;break;case"type":v=W;break;case"checked":z=W;break;case"defaultChecked":Y=W;break;case"value":h=W;break;case"defaultValue":w=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(s(137,t));break;default:zt(e,t,r,W,a,null)}}zm(e,h,w,z,Y,v,f,!1);return;case"select":ot("invalid",e),r=v=h=null;for(f in a)if(a.hasOwnProperty(f)&&(w=a[f],w!=null))switch(f){case"value":h=w;break;case"defaultValue":v=w;break;case"multiple":r=w;default:zt(e,t,f,w,a,null)}t=h,a=v,e.multiple=!!r,t!=null?Dl(e,!!r,t,!1):a!=null&&Dl(e,!!r,a,!0);return;case"textarea":ot("invalid",e),h=f=r=null;for(v in a)if(a.hasOwnProperty(v)&&(w=a[v],w!=null))switch(v){case"value":r=w;break;case"defaultValue":f=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:zt(e,t,v,w,a,null)}Dm(e,r,f,h);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(r=a[z],r!=null))switch(z){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:zt(e,t,z,r,a,null)}return;case"dialog":ot("beforetoggle",e),ot("toggle",e),ot("cancel",e),ot("close",e);break;case"iframe":case"object":ot("load",e);break;case"video":case"audio":for(r=0;r<ds.length;r++)ot(ds[r],e);break;case"image":ot("error",e),ot("load",e);break;case"details":ot("toggle",e);break;case"embed":case"source":case"link":ot("error",e),ot("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in a)if(a.hasOwnProperty(Y)&&(r=a[Y],r!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:zt(e,t,Y,r,a,null)}return;default:if(rc(t)){for(W in a)a.hasOwnProperty(W)&&(r=a[W],r!==void 0&&ld(e,t,W,r,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null&&zt(e,t,w,r,a,null))}var RS={};function LS(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,v=null,w=null,z=null,Y=null,W=null;for(K in a){var se=a[K];if(a.hasOwnProperty(K)&&se!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":z=se;default:r.hasOwnProperty(K)||zt(e,t,K,null,r,se)}}for(var q in r){var K=r[q];if(se=a[q],r.hasOwnProperty(q)&&(K!=null||se!=null))switch(q){case"type":K!==se&&(vt=!0),h=K;break;case"name":K!==se&&(vt=!0),f=K;break;case"checked":K!==se&&(vt=!0),Y=K;break;case"defaultChecked":K!==se&&(vt=!0),W=K;break;case"value":K!==se&&(vt=!0),v=K;break;case"defaultValue":K!==se&&(vt=!0),w=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,t));break;default:K!==se&&zt(e,t,q,K,r,se)}}ac(e,v,w,z,Y,W,h,f);return;case"select":K=v=w=q=null;for(h in a)if(z=a[h],a.hasOwnProperty(h)&&z!=null)switch(h){case"value":break;case"multiple":K=z;default:r.hasOwnProperty(h)||zt(e,t,h,null,r,z)}for(f in r)if(h=r[f],z=a[f],r.hasOwnProperty(f)&&(h!=null||z!=null))switch(f){case"value":h!==z&&(vt=!0),q=h;break;case"defaultValue":h!==z&&(vt=!0),w=h;break;case"multiple":h!==z&&(vt=!0),v=h;default:h!==z&&zt(e,t,f,h,r,z)}t=w,a=v,r=K,q!=null?Dl(e,!!a,q,!1):!!r!=!!a&&(t!=null?Dl(e,!!a,t,!0):Dl(e,!!a,a?[]:"",!1));return;case"textarea":K=q=null;for(w in a)if(f=a[w],a.hasOwnProperty(w)&&f!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:zt(e,t,w,null,r,f)}for(v in r)if(f=r[v],h=a[v],r.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":f!==h&&(vt=!0),q=f;break;case"defaultValue":f!==h&&(vt=!0),K=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==h&&zt(e,t,v,f,r,h)}Om(e,q,K);return;case"option":for(var Ce in a)if(q=a[Ce],a.hasOwnProperty(Ce)&&q!=null&&!r.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:zt(e,t,Ce,null,r,q)}for(z in r)if(q=r[z],K=a[z],r.hasOwnProperty(z)&&q!==K&&(q!=null||K!=null))switch(z){case"selected":q!==K&&(vt=!0),e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:zt(e,t,z,q,r,K)}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 Ie in a)q=a[Ie],a.hasOwnProperty(Ie)&&q!=null&&!r.hasOwnProperty(Ie)&&zt(e,t,Ie,null,r,q);for(Y in r)if(q=r[Y],K=a[Y],r.hasOwnProperty(Y)&&q!==K&&(q!=null||K!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:zt(e,t,Y,q,r,K)}return;default:if(rc(t)){for(var nt in a)q=a[nt],a.hasOwnProperty(nt)&&q!==void 0&&!r.hasOwnProperty(nt)&&ld(e,t,nt,void 0,r,q);for(W in r)q=r[W],K=a[W],!r.hasOwnProperty(W)||q===K||q===void 0&&K===void 0||ld(e,t,W,q,r,K);return}}for(var $ in a)q=a[$],a.hasOwnProperty($)&&q!=null&&!r.hasOwnProperty($)&&zt(e,t,$,null,r,q);for(se in r)q=r[se],K=a[se],!r.hasOwnProperty(se)||q===K||q==null&&K==null||zt(e,t,se,q,r,K)}function qy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var f=a[r],h=f.transferSize,v=f.initiatorType,w=f.duration;if(h&&w&&qy(v)){for(v=0,w=f.responseEnd,r+=1;r<a.length;r++){var z=a[r],Y=z.startTime;if(Y>w)break;var W=z.transferSize,se=z.initiatorType;W&&qy(se)&&(z=z.responseEnd,v+=W*(z<w?1:(w-Y)/(z-Y)))}if(--r,t+=8*(h+v)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var rd=null,sd=null;function ms(e){return e.nodeType===9?e:e.ownerDocument}function Vy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $y(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Zy(e,t,a,r){return a=ms(a).createElement(e),a[nn]=r,a[Nn]=t,xn(a,e,t),sn(a),a}function ud(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var od=null;function IS(){var e=window.event;return e&&e.type==="popstate"?e===od?!1:(od=e,!0):(od=null,!1)}var cd=typeof setTimeout=="function"?setTimeout:void 0,US=typeof clearTimeout=="function"?clearTimeout:void 0,Yy=typeof Promise=="function"?Promise:void 0,Gy=typeof requestAnimationFrame=="function"?requestAnimationFrame:cd,HS=typeof queueMicrotask=="function"?queueMicrotask:typeof Yy<"u"?function(e){return Yy.resolve(null).then(e).catch(qS)}:cd;function qS(e){setTimeout(function(){throw e})}function Da(e){return e==="head"}function Qy(e,t){var a=t,r=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(f),yr(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")xd(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,xd(a);for(var h=a.firstChild;h;){var v=h.nextSibling,w=h.nodeName;h[Ot]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||a.removeChild(h),h=v}}else a==="body"&&xd(e.ownerDocument.body);a=f}while(a);yr(t)}function Xy(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function Fy(e,t,a){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,a!=null&&(e.style.viewTransitionClass=a),a=getComputedStyle(e),a.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var f=r=0;f<t.length;f++){var h=t[f];0<h.width&&0<h.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+a.paddingTop,e.marginBottom="-"+a.paddingBottom)}}function Ky(e,t){e=e.style,t=t.style;var a=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(a=t.display,e.display=a==null||typeof a=="boolean"?"":a,a=t.margin,a!=null?e.margin=a:(a=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=a==null||typeof a=="boolean"?"":a,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function VS(e,t,a){return a=a.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=a.innerHeight&&e.left<=a.innerWidth}}function fd(e){var t=e.getBoundingClientRect(),a=getComputedStyle(e);return VS(t,a,e)}function $S(e){return e.documentElement.clientHeight}function ZS(e){this.addEventListener("load",e),this.addEventListener("error",e)}function YS(e,t,a,r,f,h,v,w,z){var Y=t.nodeType===9?t:t.ownerDocument;try{var W=Y.startViewTransition({update:function(){var q=Y.defaultView,K=q.navigation&&q.navigation.transition,Ce=Y.fonts.status;r();var Ie=[];if(Ce==="loaded"&&($S(Y),Y.fonts.status==="loading"&&Ie.push(Y.fonts.ready)),Ce=Ie.length,e!==null)for(var nt=e.suspenseyImages,$=0,B=0;B<nt.length;B++){var X=nt[B];if(!X.complete){var re=X.getBoundingClientRect();if(0<re.bottom&&0<re.right&&re.top<q.innerHeight&&re.left<q.innerWidth){if($+=yx(X),$>uo){Ie.length=Ce;break}X=new Promise(ZS.bind(X)),Ie.push(X)}}}if(0<Ie.length)return q=Promise.race([Promise.all(Ie),new Promise(function(De){return setTimeout(De,500)})]).then(f,f),(K?Promise.allSettled([K.finished,q]):q).then(h,h);if(f(),K)return K.finished.then(h,h);h()},types:a});Y.__reactViewTransition=W;var se=[];return W.ready.then(function(){for(var q=Y.documentElement.getAnimations({subtree:!0}),K=0;K<q.length;K++){var Ce=q[K],Ie=Ce.effect,nt=Ie.pseudoElement;if(nt!=null&&nt.startsWith("::view-transition")){se.push(Ce),Ce=Ie.getKeyframes();for(var $=nt=void 0,B=!0,X=0;X<Ce.length;X++){var re=Ce[X],De=re.width;if(nt===void 0)nt=De;else if(nt!==De){B=!1;break}if(De=re.height,$===void 0)$=De;else if($!==De){B=!1;break}delete re.width,delete re.height,re.transform==="none"&&delete re.transform}B&&nt!==void 0&&$!==void 0&&(Ie.setKeyframes(Ce),B=getComputedStyle(Ie.target,Ie.pseudoElement),B.width!==nt||B.height!==$)&&(B=Ce[0],B.width=nt,B.height=$,B=Ce[Ce.length-1],B.width=nt,B.height=$,Ie.setKeyframes(Ce))}}v()},function(q){Y.__reactViewTransition===W&&(Y.__reactViewTransition=null);try{if(typeof q=="object"&&q!==null)switch(q.name){case"InvalidStateError":(q.message==="View transition was skipped because document visibility state is hidden."||q.message==="Skipping view transition because document visibility state has become hidden."||q.message==="Skipping view transition because viewport size changed."||q.message==="Transition was aborted because of invalid state")&&(q=null)}q!==null&&z(q)}finally{r(),f(),v()}}),W.finished.finally(function(){for(var q=0;q<se.length;q++)se[q].cancel();Y.__reactViewTransition===W&&(Y.__reactViewTransition=null),w()}),W}catch{return r(),f(),v(),null}}function vl(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}vl.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:R({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},vl.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,a=e.getAnimations({subtree:!0}),r=[],f=0;f<a.length;f++){var h=a[f].effect;h!==null&&h.target===e&&h.pseudoElement===t&&r.push(a[f])}return r},vl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Py(e){return{name:e,group:new vl("group",e),imagePair:new vl("image-pair",e),old:new vl("old",e),new:new vl("new",e)}}function Pn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Pn.prototype.addEventListener=function(e,t,a){var r=null,f=null;if(!(a!=null&&typeof a!="boolean"&&(r=a.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var h=this._eventListeners;if(Wy(h,e,t,a)===-1){var v=this,w=t;a!=null&&typeof a!="boolean"&&a.once===!0&&(w=function(z){v.removeEventListener(e,t,a),typeof t=="function"?t.call(this,z):t.handleEvent(z)}),r!==null&&(f=v.removeEventListener.bind(v,e,t,a),r.addEventListener("abort",f,{once:!0}),f=r.removeEventListener.bind(r,"abort",f)),r=fr(a),h.push({type:e,listener:t,optionsOrUseCapture:a,attachedListener:w,cleanup:f}),y(this._fragmentFiber.child,!1,GS,e,w,r)}this._eventListeners=h}};function GS(e,t,a,r){return T(e).addEventListener(t,a,r),!1}Pn.prototype.removeEventListener=function(e,t,a){var r=this._eventListeners;if(r!==null&&(t=Wy(r,e,t,a),t!==-1)){var f=r[t];a=f.attachedListener;var h=f.cleanup;f=fr(f.optionsOrUseCapture),y(this._fragmentFiber.child,!1,QS,e,a,f),r.splice(t,1),h!==null&&h()}};function QS(e,t,a,r){return T(e).removeEventListener(t,a,r),!1}function fr(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Jy(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Wy(e,t,a,r){if(e.length===0)return-1;r=Jy(r);for(var f=0;f<e.length;f++){var h=e[f];if(h.type===t&&h.listener===a&&Jy(h.optionsOrUseCapture)===r)return f}return-1}Pn.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=T(t);var a=this._eventListeners;if(a!==null&&0<a.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(a)for(var f=0;f<a.length;f++){var h=a[f];r.addEventListener(h.type,h.attachedListener,fr(h.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),a)for(f=0;f<a.length;f++)h=a[f],r.removeEventListener(h.type,h.attachedListener,fr(h.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Pn.prototype.focus=function(e){y(this._fragmentFiber.child,!0,ex,e,void 0,void 0)};function ex(e,t){return e.tag===6?!1:(e=T(e),l2(e,t))}Pn.prototype.focusLast=function(e){var t=[];y(this._fragmentFiber.child,!0,dd,t,void 0,void 0);for(var a=t.length-1;0<=a&&!ex(t[a],e);a--);};function dd(e,t){return t.push(e),!1}Pn.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=T(e),e=ms(e).activeElement,e!==null&&y(this._fragmentFiber.child,!1,XS,e,void 0,void 0))};function XS(e,t){return e.tag===6?!1:(e=T(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Pn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),y(this._fragmentFiber.child,!1,FS,e,void 0,void 0)};function FS(e,t){return e.tag===6||(e=T(e),t.observe(e)),!1}Pn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),y(this._fragmentFiber.child,!1,KS,e,void 0,void 0);for(var a=t=0;a<Ci.length;a++){var r=Ci[a];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Ci[t++]=r}Ci.length=t}};function KS(e,t){return e.tag===6||(e=T(e),t.unobserve(e)),!1}var Ci=[],hd=!1;function PS(e,t,a){Ci.push({fragmentInstance:e,observer:t,instance:a}),hd||(hd=!0,r2(function(){hd=!1;var r=Ci;Ci=[];for(var f=0;f<r.length;f++){var h=r[f];h.observer.unobserve(h.instance)}}))}Pn.prototype.getClientRects=function(){var e=[];return y(this._fragmentFiber.child,!1,JS,e,void 0,void 0),e};function JS(e,t){if(e.tag===6){e=e.stateNode;var a=e.ownerDocument.createRange();a.selectNodeContents(e),t.push.apply(t,a.getClientRects())}else e=T(e),t.push.apply(t,e.getClientRects());return!1}Pn.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:T(t).getRootNode(e)},Pn.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];y(this._fragmentFiber.child,!1,dd,a,void 0,void 0);var r=T(t);if(a.length===0){if(a=r,b(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(a=t)}t=this._fragmentFiber;var f=r=a.compareDocumentPosition(e);return a===e?f=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=k(t)[1],a===null?f=Node.DOCUMENT_POSITION_PRECEDING:(e=T(a).compareDocumentPosition(e),f=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=T(a[0]),f=T(a[a.length-1]);var h=b(this._fragmentFiber)?t.parentElement:r;if(h==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=h.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,h=h.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var v=t.compareDocumentPosition(e),w=f.compareDocumentPosition(e),z=v&Node.DOCUMENT_POSITION_CONTAINED_BY||w&Node.DOCUMENT_POSITION_CONTAINED_BY;return w=r&&h&&v&Node.DOCUMENT_POSITION_FOLLOWING&&w&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||h&&f===e||z||w?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!h&&f===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:v,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||WS(t,this._fragmentFiber,a[0],a[a.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function WS(e,t,a,r,f){var h=Zi(f);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!h)e:{for(;h!==null;){if(h.tag===7&&(h===t||h.alternate===t)){a=!0;break e}h=h.return}a=!1}return a}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(h===null)return h=f.ownerDocument,f===h||f===h.documentElement||f===h.body;e:{for(h=t,t=S(t);h!==null;){if(!(h.tag!==5&&h.tag!==3&&h.tag!==27||h!==t&&h.alternate!==t)){h=!0;break e}h=h.return}h=!1}return h}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!h)&&!(t=h===a)&&(t=O(a,h,ie),t===null?t=!1:(y(t,!0,I,h,a),h=E,E=null,t=h!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!h)&&!(t=h===r)&&(t=O(r,h,ie),t===null?t=!1:(y(t,!0,G,h,r),h=E,D=E=null,t=h!==null)),t):!1}function tx(e,t){var a=e.ownerDocument.createRange();a.selectNodeContents(e),e=a.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Pn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(s(566));var t=[];y(this._fragmentFiber.child,!1,dd,t,void 0,void 0);var a=e!==!1;if(t.length===0){var r=k(this._fragmentFiber);if(r=a?r[1]||r[0]||S(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=T(r),tx(e,a);return}if(r=T(r),r.nodeType!==9){if(r.nodeType===11){a="host"in r?r.host:null,a!==null&&a.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=a?t.length-1:0;r!==(a?-1:t.length);){var f=t[r];f.tag===6?(f=T(f),tx(f,a)):T(f).scrollIntoView(e),r+=a?-1:1}};function e2(e,t){return e=T(e),nx(e,t),!1}function nx(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function ix(e,t){var a=t._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var f=a[r];e.addEventListener(f.type,f.attachedListener,fr(f.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(h){for(var v=0,w=0;w<Ci.length;w++){var z=Ci[w];(z.fragmentInstance!==t||z.observer!==h||z.instance!==e)&&(Ci[v++]=z)}Ci.length=v,h.observe(e)}),nx(e,t))}function t2(e,t){var a=t._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var f=a[r];e.removeEventListener(f.type,f.attachedListener,fr(f.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(h){typeof h.rootMargin=="string"?PS(t,h,e):h.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function md(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":md(a),Tn(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function n2(e,t,a,r){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ot])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=ci(e.nextSibling),e===null)break}return null}function i2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ci(e.nextSibling),e===null))return null;return e}function ax(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ci(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function gd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function ci(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yd=null;function lx(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ci(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function rx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function l2(e,t){function a(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",a,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",a,!0)}return r}function r2(e){Gy(function(){Gy(function(t){return e(t)})})}function sx(e,t,a){switch(t=ms(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function ux(e,t,a){for(var r in a){var f=a[r];a.hasOwnProperty(r)&&f!=null&&zt(e,t,r,null,RS,f)}a.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Ai&&(e.onclick=null),Tn(e)}function xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tn(e)}var fi=new Map,ox=new Set;function ps(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var aa=Z.d;Z.d={f:s2,r:u2,D:o2,C:c2,L:f2,m:d2,X:m2,S:h2,M:p2};function s2(){var e=aa.f(),t=Wu();return e||t}function u2(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?fg(t):aa.r(e)}var dr=typeof document>"u"?null:document;function cx(e,t,a){var r=dr;if(r&&typeof t=="string"&&t){var f=ii(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),ox.has(f)||(ox.add(f),e={rel:e,crossOrigin:a,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),xn(t,"link",e),sn(t),r.head.appendChild(t)))}}function o2(e){aa.D(e),cx("dns-prefetch",e,null)}function c2(e,t){aa.C(e,t),cx("preconnect",e,t)}function f2(e,t,a){aa.L(e,t,a);var r=dr;if(r&&e&&t){var f='link[rel="preload"][as="'+ii(t)+'"]';t==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+ii(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+ii(a.imageSizes)+'"]')):f+='[href="'+ii(e)+'"]';var h=f;switch(t){case"style":h=hr(e);break;case"script":h=mr(e)}if(!(fi.has(h)||(e=R({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),fi.set(h,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(gs(h))||t==="script"&&r.querySelector(ys(h))))){var v=r.createElement("link");xn(v,"link",e),t==="style"&&(v[ni]=!0,v.onload=v.onerror=function(){wm(v)}),sn(v),r.head.appendChild(v)}}}function d2(e,t){aa.m(e,t);var a=dr;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+ii(r)+'"][href="'+ii(e)+'"]',h=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=mr(e)}if(!fi.has(h)&&(e=R({rel:"modulepreload",href:e},t),fi.set(h,e),a.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ys(h)))return}r=a.createElement("link"),xn(r,"link",e),sn(r),a.head.appendChild(r)}}}function h2(e,t,a){aa.S(e,t,a);var r=dr;if(r&&e){var f=da(r).hoistableStyles,h=hr(e);t=t||"default";var v=f.get(h);if(!v){var w={loading:0,preload:null};if(v=r.querySelector(gs(h)))w.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},a),(a=fi.get(h))&&vd(e,a);var z=v=r.createElement("link");sn(z),xn(z,"link",e),z._p=new Promise(function(Y,W){z.onload=Y,z.onerror=W}),z.addEventListener("load",function(){w.loading|=1}),z.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ro(v,t,r)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(h,v)}}}function m2(e,t){aa.X(e,t);var a=dr;if(a&&e){var r=da(a).hoistableScripts,f=mr(e),h=r.get(f);h||(h=a.querySelector(ys(f)),h||(e=R({src:e,async:!0},t),(t=fi.get(f))&&bd(e,t),h=a.createElement("script"),sn(h),xn(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function p2(e,t){aa.M(e,t);var a=dr;if(a&&e){var r=da(a).hoistableScripts,f=mr(e),h=r.get(f);h||(h=a.querySelector(ys(f)),h||(e=R({src:e,async:!0,type:"module"},t),(t=fi.get(f))&&bd(e,t),h=a.createElement("script"),sn(h),xn(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function fx(e,t,a,r){var f=(f=He.current)?ps(f):null;if(!f)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=hr(a.href),t=da(f).hoistableStyles,r=t.get(a),r||(r={type:"style",instance:null,count:0,state:null},t.set(a,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=hr(a.href);var h=da(f).hoistableStyles,v=h.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=f.querySelector(gs(e)))?h._p||(v.instance=h,v.state.loading=5):(h=fi.get(e),h||(h={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},fi.set(e,h)),g2(f,e,h,v.state))),t&&r===null)throw Error(s(528,""));return v}if(t&&r!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=mr(a),t=da(f).hoistableScripts,r=t.get(a),r||(r={type:"script",instance:null,count:0,state:null},t.set(a,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function hr(e){return'href="'+ii(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function dx(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function g2(e,t,a,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ni]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[ni]=!0,t.onload=t.onerror=wm.bind(null,t),xn(t,"link",a),sn(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function mr(e){return'[src="'+ii(e)+'"]'}function ys(e){return"script[async]"+e}function hx(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+ii(a.href)+'"]');if(r)return t.instance=r,sn(r),r;var f=R({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),sn(r),xn(r,"style",f),ro(r,a.precedence,e),t.instance=r;case"stylesheet":f=hr(a.href);var h=e.querySelector(gs(f));if(h)return t.state.loading|=4,t.instance=h,sn(h),h;r=dx(a),(f=fi.get(f))&&vd(r,f),h=(e.ownerDocument||e).createElement("link"),sn(h);var v=h;return v._p=new Promise(function(w,z){v.onload=w,v.onerror=z}),xn(h,"link",r),t.state.loading|=4,ro(h,a.precedence,e),t.instance=h;case"script":return h=mr(a.src),(f=e.querySelector(ys(h)))?(t.instance=f,sn(f),f):(r=a,(f=fi.get(h))&&(r=R({},a),bd(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),sn(f),xn(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,ro(r,a.precedence,e));return t.instance}function ro(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,h=f,v=0;v<r.length;v++){var w=r[v];if(w.dataset.precedence===t)h=w;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var so=null;function mx(e,t,a){if(so===null){var r=new Map,f=so=new Map;f.set(a,r)}else f=so,r=f.get(a),r||(r=new Map,f.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var h=a[f];if(!(h[Ot]||h[nn]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(t)||"";v=e+v;var w=r.get(v);w?w.push(h):r.set(v,[h])}}return r}function Sd(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function y2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function px(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function gx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yx(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function xx(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=yx(t),e.suspenseyImages.push(t)),e=b2.bind(e),t.decode().then(e,e))}function x2(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=hr(r.href),h=t.querySelector(gs(f));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=h,sn(h);return}h=t.ownerDocument||t,r=dx(r),(f=fi.get(f))&&vd(r,f),h=h.createElement("link"),sn(h);var v=h;v._p=new Promise(function(w,z){v.onload=w,v.onerror=z}),xn(h,"link",r),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=xs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var uo=0;function v2(e,t){return e.stylesheets&&e.count===0&&co(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&co(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&uo===0&&(uo=62500*BS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&co(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>uo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function vx(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)co(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function xs(){this.count--,vx(this)}function b2(){this.imgCount--,vx(this)}var oo=null;function co(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,t.forEach(S2,e),oo=null,xs.call(e))}function S2(e,t){if(!(t.state.loading&4)){var a=oo.get(e);if(a)var r=a.get(null);else{a=new Map,oo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),r=v)}r&&a.set(null,r)}f=t.instance,v=f.getAttribute("data-precedence"),h=a.get(v)||r,h===r&&a.set(null,f),a.set(v,f),this.count++,r=xs.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var pr={$$typeof:ce,Provider:null,Consumer:null,_currentValue:Re,_currentValue2:Re,_threadCount:0};function k2(e,t,a,r,f,h,v,w,z){this.tag=1,this.containerInfo=e,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=Tr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tr(0),this.hiddenUpdates=Tr(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.transitionTypes=null,this.incompleteTransitions=new Map}function bx(e,t,a,r,f,h,v,w,z,Y,W,se){return e=new k2(e,t,a,v,z,Y,W,se,w),t=1,h===!0&&(t|=24),h=Rn(3,null,null,t),e.current=h,h.stateNode=e,t=Rc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:r,isDehydrated:a,cache:t},Uc(h),e}function Sx(e){return e?(e=ql,e):ql}function kx(e,t,a,r,f,h){f=Sx(f),r.context===null?r.context=f:r.pendingContext=f,r=Sa(t),r.payload={element:a},h=h===void 0?null:h,h!==null&&(r.callback=h),a=ka(e,r,t),a!==null&&(Un(a,e,t),Fr(a,e,t))}function wx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function kd(e,t){wx(e,t),(e=e.alternate)&&wx(e,t)}function Nx(e){if(e.tag===13||e.tag===31){var t=nl(e,67108864);t!==null&&Un(t,e,67108864),kd(e,67108864)}}function Cx(e){if(e.tag===13||e.tag===31){var t=Kn();t=Or(t);var a=nl(e,t);a!==null&&Un(a,e,t),kd(e,t)}}var gr=!0;function w2(e,t,a,r){var f=ve.T;ve.T=null;var h=Z.p;try{Z.p=2,wd(e,t,a,r)}finally{Z.p=h,ve.T=f}}function N2(e,t,a,r){var f=ve.T;ve.T=null;var h=Z.p;try{Z.p=8,wd(e,t,a,r)}finally{Z.p=h,ve.T=f}}function wd(e,t,a,r){if(gr){var f=Nd(r);if(f===null)ad(e,t,r,fo,a),Ex(e,r);else if(j2(f,e,t,a,r))r.stopPropagation();else if(Ex(e,r),t&4&&-1<C2.indexOf(e)){for(;f!==null;){var h=_i(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=yi(h.pendingLanes);if(v!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var z=1<<31-_t(v);w.entanglements[1]|=z,v&=~z}Hi(h),(kt&6)===0&&(Ku=ze()+500,fs(0))}}break;case 31:case 13:w=nl(h,2),w!==null&&Un(w,h,2),Wu(),kd(h,2)}if(h=Nd(r),h===null&&ad(e,t,r,fo,a),h===f)break;f=h}f!==null&&r.stopPropagation()}else ad(e,t,r,null,a)}}function Nd(e){return e=uc(e),Cd(e)}var fo=null;function Cd(e){if(fo=null,e=Zi(e),e!==null){var t=o(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fo=e,null}function jx(e){switch(e){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case Xt:return 2;case Ft:return 8;case $n:case _n:return 32;case ei:return 268435456;default:return 32}default:return 32}}var jd=!1,Ma=null,Ra=null,La=null,vs=new Map,bs=new Map,Ba=[],C2="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 Ex(e,t){switch(e){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":Ra=null;break;case"mouseover":case"mouseout":La=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Ss(e,t,a,r,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:h,targetContainers:[f]},t!==null&&(t=_i(t),t!==null&&Nx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function j2(e,t,a,r,f){switch(t){case"focusin":return Ma=Ss(Ma,e,t,a,r,f),!0;case"dragenter":return Ra=Ss(Ra,e,t,a,r,f),!0;case"mouseover":return La=Ss(La,e,t,a,r,f),!0;case"pointerover":var h=f.pointerId;return vs.set(h,Ss(vs.get(h)||null,e,t,a,r,f)),!0;case"gotpointercapture":return h=f.pointerId,bs.set(h,Ss(bs.get(h)||null,e,t,a,r,f)),!0}return!1}function _x(e){var t=Zi(e.target);if(t!==null){var a=o(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Ks(e.priority,function(){Cx(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Ks(e.priority,function(){Cx(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nd(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);sc=r,a.target.dispatchEvent(r),sc=null}else return t=_i(a),t!==null&&Nx(t),e.blockedOn=a,!1;t.shift()}return!0}function Tx(e,t,a){ho(e)&&a.delete(t)}function E2(){jd=!1,Ma!==null&&ho(Ma)&&(Ma=null),Ra!==null&&ho(Ra)&&(Ra=null),La!==null&&ho(La)&&(La=null),vs.forEach(Tx),bs.forEach(Tx)}function mo(e,t){e.blockedOn===t&&(e.blockedOn=null,jd||(jd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,E2)))}var po=null;function Ax(e){po!==e&&(po=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){po===e&&(po=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Cd(r||a)===null)continue;break}var h=_i(a);h!==null&&(e.splice(t,3),t-=3,sf(h,{pending:!0,data:f,method:a.method,action:r},r,f))}}))}function yr(e){function t(z){return mo(z,e)}Ma!==null&&mo(Ma,e),Ra!==null&&mo(Ra,e),La!==null&&mo(La,e),vs.forEach(t),bs.forEach(t);for(var a=0;a<Ba.length;a++){var r=Ba[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ba.length&&(a=Ba[0],a.blockedOn===null);)_x(a),a.blockedOn===null&&Ba.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var f=a[r],h=a[r+1],v=f[Nn]||null;if(typeof h=="function")v||Ax(a);else if(v){var w=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[Nn]||null)w=v.formAction;else if(Cd(f)!==null)continue}else w=v.action;typeof w=="function"?a[r+1]=w:(a.splice(r,3),r-=3),Ax(a)}}}function zx(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Ed(e){this._internalRoot=e}go.prototype.render=Ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,r=Kn();kx(a,r,e,t,null,null)},go.prototype.unmount=Ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kx(e.current,2,null,e,null,null),Wu(),t[fa]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ba.length&&t!==0&&t<Ba[a].priority;a++);Ba.splice(a,0,e),a===0&&_x(e)}};var Ox=i.version;if(Ox!=="19.3.1")throw Error(s(527,Ox,"19.3.1"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var _2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ve,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{Oe=yo.inject(_2),Me=yo}catch{}}return ws.createRoot=function(e,t){if(!u(e))throw Error(s(299));var a=!1,r="",f=Sg,h=kg,v=wg;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=bx(e,1,!1,null,null,a,r,null,f,h,v,zx),e[fa]=t.current,id(e),new Ed(t)},ws.hydrateRoot=function(e,t,a){if(!u(e))throw Error(s(299));var r=!1,f="",h=Sg,v=kg,w=wg,z=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(h=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=bx(e,1,!0,t,a??null,r,f,z,h,v,w,zx),t.context=Sx(null),a=t.current,r=Kn(),r=Or(r),f=Sa(r),f.callback=null,ka(a,f,r),a=r,t.current.lanes=a,Ja(t,a),Hi(t),e[fa]=t.current,id(e),new go(t)},ws.version="19.3.1",ws}var Vx;function I2(){if(Vx)return Ad.exports;Vx=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Ad.exports=B2(),Ad.exports}var U2=I2();/**
|
|
50
|
+
* @license lucide-react v0.468.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const H2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ub=(...n)=>n.filter((i,l,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===l).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.468.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var q2={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"};/**
|
|
60
|
+
* @license lucide-react v0.468.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const V2=N.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:u="",children:o,iconNode:d,...m},p)=>N.createElement("svg",{ref:p,...q2,width:i,height:i,stroke:n,strokeWidth:s?Number(l)*24/Number(i):l,className:ub("lucide",u),...m},[...d.map(([g,x])=>N.createElement(g,x)),...Array.isArray(o)?o:[o]]));/**
|
|
65
|
+
* @license lucide-react v0.468.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Xe=(n,i)=>{const l=N.forwardRef(({className:s,...u},o)=>N.createElement(V2,{ref:o,iconNode:i,className:ub(`lucide-${H2(n)}`,s),...u}));return l.displayName=`${n}`,l};/**
|
|
70
|
+
* @license lucide-react v0.468.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const $2=Xe("Activity",[["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"}]]);/**
|
|
75
|
+
* @license lucide-react v0.468.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const ob=Xe("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
80
|
+
* @license lucide-react v0.468.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const Z2=Xe("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
85
|
+
* @license lucide-react v0.468.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Y2=Xe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
90
|
+
* @license lucide-react v0.468.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const G2=Xe("AtSign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);/**
|
|
95
|
+
* @license lucide-react v0.468.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const pi=Xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
100
|
+
* @license lucide-react v0.468.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Ds=Xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
105
|
+
* @license lucide-react v0.468.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const cb=Xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
110
|
+
* @license lucide-react v0.468.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Ms=Xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
115
|
+
* @license lucide-react v0.468.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Q2=Xe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
120
|
+
* @license lucide-react v0.468.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const fb=Xe("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
125
|
+
* @license lucide-react v0.468.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const db=Xe("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
130
|
+
* @license lucide-react v0.468.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const Za=Xe("Copy",[["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"}]]);/**
|
|
135
|
+
* @license lucide-react v0.468.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const $x=Xe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
140
|
+
* @license lucide-react v0.468.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Dh=Xe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
145
|
+
* @license lucide-react v0.468.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const X2=Xe("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/**
|
|
150
|
+
* @license lucide-react v0.468.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const F2=Xe("FileDiff",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/**
|
|
155
|
+
* @license lucide-react v0.468.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const kr=Xe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
160
|
+
* @license lucide-react v0.468.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Va=Xe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
165
|
+
* @license lucide-react v0.468.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const hb=Xe("Folder",[["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"}]]);/**
|
|
170
|
+
* @license lucide-react v0.468.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Rs=Xe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
175
|
+
* @license lucide-react v0.468.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Mh=Xe("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
180
|
+
* @license lucide-react v0.468.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const K2=Xe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
185
|
+
* @license lucide-react v0.468.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const Rh=Xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
190
|
+
* @license lucide-react v0.468.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const P2=Xe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
195
|
+
* @license lucide-react v0.468.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const Lh=Xe("MessageSquare",[["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"}]]);/**
|
|
200
|
+
* @license lucide-react v0.468.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const wl=Xe("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
205
|
+
* @license lucide-react v0.468.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const J2=Xe("Pause",[["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"}]]);/**
|
|
210
|
+
* @license lucide-react v0.468.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const mb=Xe("Pencil",[["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"}]]);/**
|
|
215
|
+
* @license lucide-react v0.468.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const Bh=Xe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
220
|
+
* @license lucide-react v0.468.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Nl=Xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
225
|
+
* @license lucide-react v0.468.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Zx=Xe("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
230
|
+
* @license lucide-react v0.468.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const pb=Xe("RotateCcw",[["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"}]]);/**
|
|
235
|
+
* @license lucide-react v0.468.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const Yx=Xe("RotateCw",[["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"}]]);/**
|
|
240
|
+
* @license lucide-react v0.468.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const W2=Xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
245
|
+
* @license lucide-react v0.468.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const ek=Xe("Send",[["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"}]]);/**
|
|
250
|
+
* @license lucide-react v0.468.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const tk=Xe("Settings",[["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"}]]);/**
|
|
255
|
+
* @license lucide-react v0.468.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const nk=Xe("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
260
|
+
* @license lucide-react v0.468.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const gb=Xe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
265
|
+
* @license lucide-react v0.468.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Ih=Xe("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
270
|
+
* @license lucide-react v0.468.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Uo=Xe("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
|
|
275
|
+
* @license lucide-react v0.468.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const yb=Xe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
280
|
+
* @license lucide-react v0.468.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const nh=Xe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
285
|
+
* @license lucide-react v0.468.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const ik=Xe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
290
|
+
* @license lucide-react v0.468.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const ak=Xe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
295
|
+
* @license lucide-react v0.468.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const wr=Xe("Trash2",[["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"}]]);/**
|
|
300
|
+
* @license lucide-react v0.468.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const xb=Xe("TriangleAlert",[["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"}]]);/**
|
|
305
|
+
* @license lucide-react v0.468.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const lk=Xe("Wrench",[["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"}]]);/**
|
|
310
|
+
* @license lucide-react v0.468.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Gt=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
315
|
+
* @license lucide-react v0.468.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Uh=Xe("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var xt;(function(n){n.assertEqual=u=>{};function i(u){}n.assertIs=i;function l(u){throw new Error}n.assertNever=l,n.arrayToEnum=u=>{const o={};for(const d of u)o[d]=d;return o},n.getValidEnumValues=u=>{const o=n.objectKeys(u).filter(m=>typeof u[u[m]]!="number"),d={};for(const m of o)d[m]=u[m];return n.objectValues(d)},n.objectValues=u=>n.objectKeys(u).map(function(o){return u[o]}),n.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const o=[];for(const d in u)Object.prototype.hasOwnProperty.call(u,d)&&o.push(d);return o},n.find=(u,o)=>{for(const d of u)if(o(d))return d},n.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&Number.isFinite(u)&&Math.floor(u)===u;function s(u,o=" | "){return u.map(d=>typeof d=="string"?`'${d}'`:d).join(o)}n.joinValues=s,n.jsonStringifyReplacer=(u,o)=>typeof o=="bigint"?o.toString():o})(xt||(xt={}));var Gx;(function(n){n.mergeShapes=(i,l)=>({...i,...l})})(Gx||(Gx={}));const Ue=xt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ha=n=>{switch(typeof n){case"undefined":return Ue.undefined;case"string":return Ue.string;case"number":return Number.isNaN(n)?Ue.nan:Ue.number;case"boolean":return Ue.boolean;case"function":return Ue.function;case"bigint":return Ue.bigint;case"symbol":return Ue.symbol;case"object":return Array.isArray(n)?Ue.array:n===null?Ue.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?Ue.promise:typeof Map<"u"&&n instanceof Map?Ue.map:typeof Set<"u"&&n instanceof Set?Ue.set:typeof Date<"u"&&n instanceof Date?Ue.date:Ue.object;default:return Ue.unknown}},pe=xt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sa extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const l=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,l):this.__proto__=l,this.name="ZodError",this.issues=i}format(i){const l=i||function(o){return o.message},s={_errors:[]},u=o=>{for(const d of o.issues)if(d.code==="invalid_union")d.unionErrors.map(u);else if(d.code==="invalid_return_type")u(d.returnTypeError);else if(d.code==="invalid_arguments")u(d.argumentsError);else if(d.path.length===0)s._errors.push(l(d));else{let m=s,p=0;for(;p<d.path.length;){const g=d.path[p];p===d.path.length-1?(m[g]=m[g]||{_errors:[]},m[g]._errors.push(l(d))):m[g]=m[g]||{_errors:[]},m=m[g],p++}}};return u(this),s}static assert(i){if(!(i instanceof sa))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=l=>l.message){const l={},s=[];for(const u of this.issues)if(u.path.length>0){const o=u.path[0];l[o]=l[o]||[],l[o].push(i(u))}else s.push(i(u));return{formErrors:s,fieldErrors:l}}get formErrors(){return this.flatten()}}sa.create=n=>new sa(n);const ih=(n,i)=>{let l;switch(n.code){case pe.invalid_type:n.received===Ue.undefined?l="Required":l=`Expected ${n.expected}, received ${n.received}`;break;case pe.invalid_literal:l=`Invalid literal value, expected ${JSON.stringify(n.expected,xt.jsonStringifyReplacer)}`;break;case pe.unrecognized_keys:l=`Unrecognized key(s) in object: ${xt.joinValues(n.keys,", ")}`;break;case pe.invalid_union:l="Invalid input";break;case pe.invalid_union_discriminator:l=`Invalid discriminator value. Expected ${xt.joinValues(n.options)}`;break;case pe.invalid_enum_value:l=`Invalid enum value. Expected ${xt.joinValues(n.options)}, received '${n.received}'`;break;case pe.invalid_arguments:l="Invalid function arguments";break;case pe.invalid_return_type:l="Invalid function return type";break;case pe.invalid_date:l="Invalid date";break;case pe.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(l=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(l=`${l} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?l=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?l=`Invalid input: must end with "${n.validation.endsWith}"`:xt.assertNever(n.validation):n.validation!=="regex"?l=`Invalid ${n.validation}`:l="Invalid";break;case pe.too_small:n.type==="array"?l=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?l=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?l=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?l=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?l=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:l="Invalid input";break;case pe.too_big:n.type==="array"?l=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?l=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?l=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?l=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?l=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:l="Invalid input";break;case pe.custom:l="Invalid input";break;case pe.invalid_intersection_types:l="Intersection results could not be merged";break;case pe.not_multiple_of:l=`Number must be a multiple of ${n.multipleOf}`;break;case pe.not_finite:l="Number must be finite";break;default:l=i.defaultError,xt.assertNever(n)}return{message:l}};let rk=ih;function sk(){return rk}const uk=n=>{const{data:i,path:l,errorMaps:s,issueData:u}=n,o=[...l,...u.path||[]],d={...u,path:o};if(u.message!==void 0)return{...u,path:o,message:u.message};let m="";const p=s.filter(g=>!!g).slice().reverse();for(const g of p)m=g(d,{data:i,defaultError:m}).message;return{...u,path:o,message:m}};function Ae(n,i){const l=sk(),s=uk({issueData:i,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,l,l===ih?void 0:ih].filter(u=>!!u)});n.common.issues.push(s)}class Wn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,l){const s=[];for(const u of l){if(u.status==="aborted")return Je;u.status==="dirty"&&i.dirty(),s.push(u.value)}return{status:i.value,value:s}}static async mergeObjectAsync(i,l){const s=[];for(const u of l){const o=await u.key,d=await u.value;s.push({key:o,value:d})}return Wn.mergeObjectSync(i,s)}static mergeObjectSync(i,l){const s={};for(const u of l){const{key:o,value:d}=u;if(o.status==="aborted"||d.status==="aborted")return Je;o.status==="dirty"&&i.dirty(),d.status==="dirty"&&i.dirty(),o.value!=="__proto__"&&(typeof d.value<"u"||u.alwaysSet)&&(s[o.value]=d.value)}return{status:i.value,value:s}}}const Je=Object.freeze({status:"aborted"}),Es=n=>({status:"dirty",value:n}),gi=n=>({status:"valid",value:n}),Qx=n=>n.status==="aborted",Xx=n=>n.status==="dirty",Nr=n=>n.status==="valid",Co=n=>typeof Promise<"u"&&n instanceof Promise;var qe;(function(n){n.errToObj=i=>typeof i=="string"?{message:i}:i||{},n.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(qe||(qe={}));class Ya{constructor(i,l,s,u){this._cachedPath=[],this.parent=i,this.data=l,this._path=s,this._key=u}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Fx=(n,i)=>{if(Nr(i))return{success:!0,data:i.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const l=new sa(n.common.issues);return this._error=l,this._error}}};function st(n){if(!n)return{};const{errorMap:i,invalid_type_error:l,required_error:s,description:u}=n;if(i&&(l||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:u}:{errorMap:(d,m)=>{const{message:p}=n;return d.code==="invalid_enum_value"?{message:p??m.defaultError}:typeof m.data>"u"?{message:p??s??m.defaultError}:d.code!=="invalid_type"?{message:m.defaultError}:{message:p??l??m.defaultError}},description:u}}class pt{get description(){return this._def.description}_getType(i){return Ha(i.data)}_getOrReturnCtx(i,l){return l||{common:i.parent.common,data:i.data,parsedType:Ha(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new Wn,ctx:{common:i.parent.common,data:i.data,parsedType:Ha(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const l=this._parse(i);if(Co(l))throw new Error("Synchronous parse encountered promise.");return l}_parseAsync(i){const l=this._parse(i);return Promise.resolve(l)}parse(i,l){const s=this.safeParse(i,l);if(s.success)return s.data;throw s.error}safeParse(i,l){const s={common:{issues:[],async:(l==null?void 0:l.async)??!1,contextualErrorMap:l==null?void 0:l.errorMap},path:(l==null?void 0:l.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Ha(i)},u=this._parseSync({data:i,path:s.path,parent:s});return Fx(s,u)}"~validate"(i){var s,u;const l={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Ha(i)};if(!this["~standard"].async)try{const o=this._parseSync({data:i,path:[],parent:l});return Nr(o)?{value:o.value}:{issues:l.common.issues}}catch(o){(u=(s=o==null?void 0:o.message)==null?void 0:s.toLowerCase())!=null&&u.includes("encountered")&&(this["~standard"].async=!0),l.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:l}).then(o=>Nr(o)?{value:o.value}:{issues:l.common.issues})}async parseAsync(i,l){const s=await this.safeParseAsync(i,l);if(s.success)return s.data;throw s.error}async safeParseAsync(i,l){const s={common:{issues:[],contextualErrorMap:l==null?void 0:l.errorMap,async:!0},path:(l==null?void 0:l.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Ha(i)},u=this._parse({data:i,path:s.path,parent:s}),o=await(Co(u)?u:Promise.resolve(u));return Fx(s,o)}refine(i,l){const s=u=>typeof l=="string"||typeof l>"u"?{message:l}:typeof l=="function"?l(u):l;return this._refinement((u,o)=>{const d=i(u),m=()=>o.addIssue({code:pe.custom,...s(u)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(m(),!1)):d?!0:(m(),!1)})}refinement(i,l){return this._refinement((s,u)=>i(s)?!0:(u.addIssue(typeof l=="function"?l(s,u):l),!1))}_refinement(i){return new El({schema:this,typeName:et.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:l=>this["~validate"](l)}}optional(){return ra.create(this,this._def)}nullable(){return _l.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vi.create(this)}promise(){return Ao.create(this,this._def)}or(i){return Eo.create([this,i],this._def)}and(i){return _o.create(this,i,this._def)}transform(i){return new El({...st(this._def),schema:this,typeName:et.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const l=typeof i=="function"?i:()=>i;return new zo({...st(this._def),innerType:this,defaultValue:l,typeName:et.ZodDefault})}brand(){return new kb({typeName:et.ZodBranded,type:this,...st(this._def)})}catch(i){const l=typeof i=="function"?i:()=>i;return new Oo({...st(this._def),innerType:this,catchValue:l,typeName:et.ZodCatch})}describe(i){const l=this.constructor;return new l({...this._def,description:i})}pipe(i){return qh.create(this,i)}readonly(){return Do.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ok=/^c[^\s-]{8,}$/i,ck=/^[0-9a-z]+$/,fk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,dk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,hk=/^[a-z0-9_-]{21}$/i,mk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Md;const xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,bk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Sk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vb="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nk=new RegExp(`^${vb}$`);function bb(n){let i="[0-5]\\d";n.precision?i=`${i}\\.\\d{${n.precision}}`:n.precision==null&&(i=`${i}(\\.\\d+)?`);const l=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${i})${l}`}function Ck(n){return new RegExp(`^${bb(n)}$`)}function jk(n){let i=`${vb}T${bb(n)}`;const l=[];return l.push(n.local?"Z?":"Z"),n.offset&&l.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${l.join("|")})`,new RegExp(`^${i}$`)}function Ek(n,i){return!!((i==="v4"||!i)&&xk.test(n)||(i==="v6"||!i)&&bk.test(n))}function _k(n,i){if(!mk.test(n))return!1;try{const[l]=n.split(".");if(!l)return!1;const s=l.replace(/-/g,"+").replace(/_/g,"/").padEnd(l.length+(4-l.length%4)%4,"="),u=JSON.parse(atob(s));return!(typeof u!="object"||u===null||"typ"in u&&(u==null?void 0:u.typ)!=="JWT"||!u.alg||i&&u.alg!==i)}catch{return!1}}function Tk(n,i){return!!((i==="v4"||!i)&&vk.test(n)||(i==="v6"||!i)&&Sk.test(n))}class qa extends pt{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==Ue.string){const o=this._getOrReturnCtx(i);return Ae(o,{code:pe.invalid_type,expected:Ue.string,received:o.parsedType}),Je}const s=new Wn;let u;for(const o of this._def.checks)if(o.kind==="min")i.data.length<o.value&&(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if(o.kind==="max")i.data.length>o.value&&(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if(o.kind==="length"){const d=i.data.length>o.value,m=i.data.length<o.value;(d||m)&&(u=this._getOrReturnCtx(i,u),d?Ae(u,{code:pe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):m&&Ae(u,{code:pe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),s.dirty())}else if(o.kind==="email")gk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"email",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="emoji")Md||(Md=new RegExp(yk,"u")),Md.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"emoji",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="uuid")dk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"uuid",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="nanoid")hk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"nanoid",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="cuid")ok.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"cuid",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="cuid2")ck.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"cuid2",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="ulid")fk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"ulid",code:pe.invalid_string,message:o.message}),s.dirty());else if(o.kind==="url")try{new URL(i.data)}catch{u=this._getOrReturnCtx(i,u),Ae(u,{validation:"url",code:pe.invalid_string,message:o.message}),s.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"regex",code:pe.invalid_string,message:o.message}),s.dirty())):o.kind==="trim"?i.data=i.data.trim():o.kind==="includes"?i.data.includes(o.value,o.position)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),s.dirty()):o.kind==="toLowerCase"?i.data=i.data.toLowerCase():o.kind==="toUpperCase"?i.data=i.data.toUpperCase():o.kind==="startsWith"?i.data.startsWith(o.value)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:{startsWith:o.value},message:o.message}),s.dirty()):o.kind==="endsWith"?i.data.endsWith(o.value)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:{endsWith:o.value},message:o.message}),s.dirty()):o.kind==="datetime"?jk(o).test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:"datetime",message:o.message}),s.dirty()):o.kind==="date"?Nk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:"date",message:o.message}),s.dirty()):o.kind==="time"?Ck(o).test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.invalid_string,validation:"time",message:o.message}),s.dirty()):o.kind==="duration"?pk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"duration",code:pe.invalid_string,message:o.message}),s.dirty()):o.kind==="ip"?Ek(i.data,o.version)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"ip",code:pe.invalid_string,message:o.message}),s.dirty()):o.kind==="jwt"?_k(i.data,o.alg)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"jwt",code:pe.invalid_string,message:o.message}),s.dirty()):o.kind==="cidr"?Tk(i.data,o.version)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"cidr",code:pe.invalid_string,message:o.message}),s.dirty()):o.kind==="base64"?kk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"base64",code:pe.invalid_string,message:o.message}),s.dirty()):o.kind==="base64url"?wk.test(i.data)||(u=this._getOrReturnCtx(i,u),Ae(u,{validation:"base64url",code:pe.invalid_string,message:o.message}),s.dirty()):xt.assertNever(o);return{status:s.value,value:i.data}}_regex(i,l,s){return this.refinement(u=>i.test(u),{validation:l,code:pe.invalid_string,...qe.errToObj(s)})}_addCheck(i){return new qa({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...qe.errToObj(i)})}url(i){return this._addCheck({kind:"url",...qe.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...qe.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...qe.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...qe.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...qe.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...qe.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...qe.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...qe.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...qe.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...qe.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...qe.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...qe.errToObj(i)})}datetime(i){return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(i==null?void 0:i.offset)??!1,local:(i==null?void 0:i.local)??!1,...qe.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...qe.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...qe.errToObj(i)})}regex(i,l){return this._addCheck({kind:"regex",regex:i,...qe.errToObj(l)})}includes(i,l){return this._addCheck({kind:"includes",value:i,position:l==null?void 0:l.position,...qe.errToObj(l==null?void 0:l.message)})}startsWith(i,l){return this._addCheck({kind:"startsWith",value:i,...qe.errToObj(l)})}endsWith(i,l){return this._addCheck({kind:"endsWith",value:i,...qe.errToObj(l)})}min(i,l){return this._addCheck({kind:"min",value:i,...qe.errToObj(l)})}max(i,l){return this._addCheck({kind:"max",value:i,...qe.errToObj(l)})}length(i,l){return this._addCheck({kind:"length",value:i,...qe.errToObj(l)})}nonempty(i){return this.min(1,qe.errToObj(i))}trim(){return new qa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const l of this._def.checks)l.kind==="min"&&(i===null||l.value>i)&&(i=l.value);return i}get maxLength(){let i=null;for(const l of this._def.checks)l.kind==="max"&&(i===null||l.value<i)&&(i=l.value);return i}}qa.create=n=>new qa({checks:[],typeName:et.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...st(n)});function Ak(n,i){const l=(n.toString().split(".")[1]||"").length,s=(i.toString().split(".")[1]||"").length,u=l>s?l:s,o=Number.parseInt(n.toFixed(u).replace(".","")),d=Number.parseInt(i.toFixed(u).replace(".",""));return o%d/10**u}class Cr extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==Ue.number){const o=this._getOrReturnCtx(i);return Ae(o,{code:pe.invalid_type,expected:Ue.number,received:o.parsedType}),Je}let s;const u=new Wn;for(const o of this._def.checks)o.kind==="int"?xt.isInteger(i.data)||(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.invalid_type,expected:"integer",received:"float",message:o.message}),u.dirty()):o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),u.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),u.dirty()):o.kind==="multipleOf"?Ak(i.data,o.value)!==0&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.not_multiple_of,multipleOf:o.value,message:o.message}),u.dirty()):o.kind==="finite"?Number.isFinite(i.data)||(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.not_finite,message:o.message}),u.dirty()):xt.assertNever(o);return{status:u.value,value:i.data}}gte(i,l){return this.setLimit("min",i,!0,qe.toString(l))}gt(i,l){return this.setLimit("min",i,!1,qe.toString(l))}lte(i,l){return this.setLimit("max",i,!0,qe.toString(l))}lt(i,l){return this.setLimit("max",i,!1,qe.toString(l))}setLimit(i,l,s,u){return new Cr({...this._def,checks:[...this._def.checks,{kind:i,value:l,inclusive:s,message:qe.toString(u)}]})}_addCheck(i){return new Cr({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:qe.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:qe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:qe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:qe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:qe.toString(i)})}multipleOf(i,l){return this._addCheck({kind:"multipleOf",value:i,message:qe.toString(l)})}finite(i){return this._addCheck({kind:"finite",message:qe.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:qe.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:qe.toString(i)})}get minValue(){let i=null;for(const l of this._def.checks)l.kind==="min"&&(i===null||l.value>i)&&(i=l.value);return i}get maxValue(){let i=null;for(const l of this._def.checks)l.kind==="max"&&(i===null||l.value<i)&&(i=l.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&xt.isInteger(i.value))}get isFinite(){let i=null,l=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(l===null||s.value>l)&&(l=s.value):s.kind==="max"&&(i===null||s.value<i)&&(i=s.value)}return Number.isFinite(l)&&Number.isFinite(i)}}Cr.create=n=>new Cr({checks:[],typeName:et.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...st(n)});class Ls extends pt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==Ue.bigint)return this._getInvalidInput(i);let s;const u=new Wn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),u.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),u.dirty()):o.kind==="multipleOf"?i.data%o.value!==BigInt(0)&&(s=this._getOrReturnCtx(i,s),Ae(s,{code:pe.not_multiple_of,multipleOf:o.value,message:o.message}),u.dirty()):xt.assertNever(o);return{status:u.value,value:i.data}}_getInvalidInput(i){const l=this._getOrReturnCtx(i);return Ae(l,{code:pe.invalid_type,expected:Ue.bigint,received:l.parsedType}),Je}gte(i,l){return this.setLimit("min",i,!0,qe.toString(l))}gt(i,l){return this.setLimit("min",i,!1,qe.toString(l))}lte(i,l){return this.setLimit("max",i,!0,qe.toString(l))}lt(i,l){return this.setLimit("max",i,!1,qe.toString(l))}setLimit(i,l,s,u){return new Ls({...this._def,checks:[...this._def.checks,{kind:i,value:l,inclusive:s,message:qe.toString(u)}]})}_addCheck(i){return new Ls({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:qe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:qe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:qe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:qe.toString(i)})}multipleOf(i,l){return this._addCheck({kind:"multipleOf",value:i,message:qe.toString(l)})}get minValue(){let i=null;for(const l of this._def.checks)l.kind==="min"&&(i===null||l.value>i)&&(i=l.value);return i}get maxValue(){let i=null;for(const l of this._def.checks)l.kind==="max"&&(i===null||l.value<i)&&(i=l.value);return i}}Ls.create=n=>new Ls({checks:[],typeName:et.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...st(n)});class ah extends pt{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==Ue.boolean){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.boolean,received:s.parsedType}),Je}return gi(i.data)}}ah.create=n=>new ah({typeName:et.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...st(n)});class jo extends pt{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==Ue.date){const o=this._getOrReturnCtx(i);return Ae(o,{code:pe.invalid_type,expected:Ue.date,received:o.parsedType}),Je}if(Number.isNaN(i.data.getTime())){const o=this._getOrReturnCtx(i);return Ae(o,{code:pe.invalid_date}),Je}const s=new Wn;let u;for(const o of this._def.checks)o.kind==="min"?i.data.getTime()<o.value&&(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),s.dirty()):o.kind==="max"?i.data.getTime()>o.value&&(u=this._getOrReturnCtx(i,u),Ae(u,{code:pe.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),s.dirty()):xt.assertNever(o);return{status:s.value,value:new Date(i.data.getTime())}}_addCheck(i){return new jo({...this._def,checks:[...this._def.checks,i]})}min(i,l){return this._addCheck({kind:"min",value:i.getTime(),message:qe.toString(l)})}max(i,l){return this._addCheck({kind:"max",value:i.getTime(),message:qe.toString(l)})}get minDate(){let i=null;for(const l of this._def.checks)l.kind==="min"&&(i===null||l.value>i)&&(i=l.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const l of this._def.checks)l.kind==="max"&&(i===null||l.value<i)&&(i=l.value);return i!=null?new Date(i):null}}jo.create=n=>new jo({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:et.ZodDate,...st(n)});class Kx extends pt{_parse(i){if(this._getType(i)!==Ue.symbol){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.symbol,received:s.parsedType}),Je}return gi(i.data)}}Kx.create=n=>new Kx({typeName:et.ZodSymbol,...st(n)});class lh extends pt{_parse(i){if(this._getType(i)!==Ue.undefined){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.undefined,received:s.parsedType}),Je}return gi(i.data)}}lh.create=n=>new lh({typeName:et.ZodUndefined,...st(n)});class rh extends pt{_parse(i){if(this._getType(i)!==Ue.null){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.null,received:s.parsedType}),Je}return gi(i.data)}}rh.create=n=>new rh({typeName:et.ZodNull,...st(n)});class Px extends pt{constructor(){super(...arguments),this._any=!0}_parse(i){return gi(i.data)}}Px.create=n=>new Px({typeName:et.ZodAny,...st(n)});class Jx extends pt{constructor(){super(...arguments),this._unknown=!0}_parse(i){return gi(i.data)}}Jx.create=n=>new Jx({typeName:et.ZodUnknown,...st(n)});class Ga extends pt{_parse(i){const l=this._getOrReturnCtx(i);return Ae(l,{code:pe.invalid_type,expected:Ue.never,received:l.parsedType}),Je}}Ga.create=n=>new Ga({typeName:et.ZodNever,...st(n)});class Wx extends pt{_parse(i){if(this._getType(i)!==Ue.undefined){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.void,received:s.parsedType}),Je}return gi(i.data)}}Wx.create=n=>new Wx({typeName:et.ZodVoid,...st(n)});class Vi extends pt{_parse(i){const{ctx:l,status:s}=this._processInputParams(i),u=this._def;if(l.parsedType!==Ue.array)return Ae(l,{code:pe.invalid_type,expected:Ue.array,received:l.parsedType}),Je;if(u.exactLength!==null){const d=l.data.length>u.exactLength.value,m=l.data.length<u.exactLength.value;(d||m)&&(Ae(l,{code:d?pe.too_big:pe.too_small,minimum:m?u.exactLength.value:void 0,maximum:d?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),s.dirty())}if(u.minLength!==null&&l.data.length<u.minLength.value&&(Ae(l,{code:pe.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),s.dirty()),u.maxLength!==null&&l.data.length>u.maxLength.value&&(Ae(l,{code:pe.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),s.dirty()),l.common.async)return Promise.all([...l.data].map((d,m)=>u.type._parseAsync(new Ya(l,d,l.path,m)))).then(d=>Wn.mergeArray(s,d));const o=[...l.data].map((d,m)=>u.type._parseSync(new Ya(l,d,l.path,m)));return Wn.mergeArray(s,o)}get element(){return this._def.type}min(i,l){return new Vi({...this._def,minLength:{value:i,message:qe.toString(l)}})}max(i,l){return new Vi({...this._def,maxLength:{value:i,message:qe.toString(l)}})}length(i,l){return new Vi({...this._def,exactLength:{value:i,message:qe.toString(l)}})}nonempty(i){return this.min(1,i)}}Vi.create=(n,i)=>new Vi({type:n,minLength:null,maxLength:null,exactLength:null,typeName:et.ZodArray,...st(i)});function xr(n){if(n instanceof tn){const i={};for(const l in n.shape){const s=n.shape[l];i[l]=ra.create(xr(s))}return new tn({...n._def,shape:()=>i})}else return n instanceof Vi?new Vi({...n._def,type:xr(n.element)}):n instanceof ra?ra.create(xr(n.unwrap())):n instanceof _l?_l.create(xr(n.unwrap())):n instanceof Cl?Cl.create(n.items.map(i=>xr(i))):n}class tn extends pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),l=xt.objectKeys(i);return this._cached={shape:i,keys:l},this._cached}_parse(i){if(this._getType(i)!==Ue.object){const g=this._getOrReturnCtx(i);return Ae(g,{code:pe.invalid_type,expected:Ue.object,received:g.parsedType}),Je}const{status:s,ctx:u}=this._processInputParams(i),{shape:o,keys:d}=this._getCached(),m=[];if(!(this._def.catchall instanceof Ga&&this._def.unknownKeys==="strip"))for(const g in u.data)d.includes(g)||m.push(g);const p=[];for(const g of d){const x=o[g],y=u.data[g];p.push({key:{status:"valid",value:g},value:x._parse(new Ya(u,y,u.path,g)),alwaysSet:g in u.data})}if(this._def.catchall instanceof Ga){const g=this._def.unknownKeys;if(g==="passthrough")for(const x of m)p.push({key:{status:"valid",value:x},value:{status:"valid",value:u.data[x]}});else if(g==="strict")m.length>0&&(Ae(u,{code:pe.unrecognized_keys,keys:m}),s.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const x of m){const y=u.data[x];p.push({key:{status:"valid",value:x},value:g._parse(new Ya(u,y,u.path,x)),alwaysSet:x in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const g=[];for(const x of p){const y=await x.key,S=await x.value;g.push({key:y,value:S,alwaysSet:x.alwaysSet})}return g}).then(g=>Wn.mergeObjectSync(s,g)):Wn.mergeObjectSync(s,p)}get shape(){return this._def.shape()}strict(i){return qe.errToObj,new tn({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(l,s)=>{var o,d;const u=((d=(o=this._def).errorMap)==null?void 0:d.call(o,l,s).message)??s.defaultError;return l.code==="unrecognized_keys"?{message:qe.errToObj(i).message??u}:{message:u}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(i){return new tn({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new tn({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:et.ZodObject})}setKey(i,l){return this.augment({[i]:l})}catchall(i){return new tn({...this._def,catchall:i})}pick(i){const l={};for(const s of xt.objectKeys(i))i[s]&&this.shape[s]&&(l[s]=this.shape[s]);return new tn({...this._def,shape:()=>l})}omit(i){const l={};for(const s of xt.objectKeys(this.shape))i[s]||(l[s]=this.shape[s]);return new tn({...this._def,shape:()=>l})}deepPartial(){return xr(this)}partial(i){const l={};for(const s of xt.objectKeys(this.shape)){const u=this.shape[s];i&&!i[s]?l[s]=u:l[s]=u.optional()}return new tn({...this._def,shape:()=>l})}required(i){const l={};for(const s of xt.objectKeys(this.shape))if(i&&!i[s])l[s]=this.shape[s];else{let o=this.shape[s];for(;o instanceof ra;)o=o._def.innerType;l[s]=o}return new tn({...this._def,shape:()=>l})}keyof(){return Sb(xt.objectKeys(this.shape))}}tn.create=(n,i)=>new tn({shape:()=>n,unknownKeys:"strip",catchall:Ga.create(),typeName:et.ZodObject,...st(i)});tn.strictCreate=(n,i)=>new tn({shape:()=>n,unknownKeys:"strict",catchall:Ga.create(),typeName:et.ZodObject,...st(i)});tn.lazycreate=(n,i)=>new tn({shape:n,unknownKeys:"strip",catchall:Ga.create(),typeName:et.ZodObject,...st(i)});class Eo extends pt{_parse(i){const{ctx:l}=this._processInputParams(i),s=this._def.options;function u(o){for(const m of o)if(m.result.status==="valid")return m.result;for(const m of o)if(m.result.status==="dirty")return l.common.issues.push(...m.ctx.common.issues),m.result;const d=o.map(m=>new sa(m.ctx.common.issues));return Ae(l,{code:pe.invalid_union,unionErrors:d}),Je}if(l.common.async)return Promise.all(s.map(async o=>{const d={...l,common:{...l.common,issues:[]},parent:null};return{result:await o._parseAsync({data:l.data,path:l.path,parent:d}),ctx:d}})).then(u);{let o;const d=[];for(const p of s){const g={...l,common:{...l.common,issues:[]},parent:null},x=p._parseSync({data:l.data,path:l.path,parent:g});if(x.status==="valid")return x;x.status==="dirty"&&!o&&(o={result:x,ctx:g}),g.common.issues.length&&d.push(g.common.issues)}if(o)return l.common.issues.push(...o.ctx.common.issues),o.result;const m=d.map(p=>new sa(p));return Ae(l,{code:pe.invalid_union,unionErrors:m}),Je}}get options(){return this._def.options}}Eo.create=(n,i)=>new Eo({options:n,typeName:et.ZodUnion,...st(i)});const la=n=>n instanceof uh?la(n.schema):n instanceof El?la(n.innerType()):n instanceof To?[n.value]:n instanceof jl?n.options:n instanceof oh?xt.objectValues(n.enum):n instanceof zo?la(n._def.innerType):n instanceof lh?[void 0]:n instanceof rh?[null]:n instanceof ra?[void 0,...la(n.unwrap())]:n instanceof _l?[null,...la(n.unwrap())]:n instanceof kb||n instanceof Do?la(n.unwrap()):n instanceof Oo?la(n._def.innerType):[];class Hh extends pt{_parse(i){const{ctx:l}=this._processInputParams(i);if(l.parsedType!==Ue.object)return Ae(l,{code:pe.invalid_type,expected:Ue.object,received:l.parsedType}),Je;const s=this.discriminator,u=l.data[s],o=this.optionsMap.get(u);return o?l.common.async?o._parseAsync({data:l.data,path:l.path,parent:l}):o._parseSync({data:l.data,path:l.path,parent:l}):(Ae(l,{code:pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,l,s){const u=new Map;for(const o of l){const d=la(o.shape[i]);if(!d.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const m of d){if(u.has(m))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(m)}`);u.set(m,o)}}return new Hh({typeName:et.ZodDiscriminatedUnion,discriminator:i,options:l,optionsMap:u,...st(s)})}}function sh(n,i){const l=Ha(n),s=Ha(i);if(n===i)return{valid:!0,data:n};if(l===Ue.object&&s===Ue.object){const u=xt.objectKeys(i),o=xt.objectKeys(n).filter(m=>u.indexOf(m)!==-1),d={...n,...i};for(const m of o){const p=sh(n[m],i[m]);if(!p.valid)return{valid:!1};d[m]=p.data}return{valid:!0,data:d}}else if(l===Ue.array&&s===Ue.array){if(n.length!==i.length)return{valid:!1};const u=[];for(let o=0;o<n.length;o++){const d=n[o],m=i[o],p=sh(d,m);if(!p.valid)return{valid:!1};u.push(p.data)}return{valid:!0,data:u}}else return l===Ue.date&&s===Ue.date&&+n==+i?{valid:!0,data:n}:{valid:!1}}class _o extends pt{_parse(i){const{status:l,ctx:s}=this._processInputParams(i),u=(o,d)=>{if(Qx(o)||Qx(d))return Je;const m=sh(o.value,d.value);return m.valid?((Xx(o)||Xx(d))&&l.dirty(),{status:l.value,value:m.data}):(Ae(s,{code:pe.invalid_intersection_types}),Je)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([o,d])=>u(o,d)):u(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}_o.create=(n,i,l)=>new _o({left:n,right:i,typeName:et.ZodIntersection,...st(l)});class Cl extends pt{_parse(i){const{status:l,ctx:s}=this._processInputParams(i);if(s.parsedType!==Ue.array)return Ae(s,{code:pe.invalid_type,expected:Ue.array,received:s.parsedType}),Je;if(s.data.length<this._def.items.length)return Ae(s,{code:pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Je;!this._def.rest&&s.data.length>this._def.items.length&&(Ae(s,{code:pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),l.dirty());const o=[...s.data].map((d,m)=>{const p=this._def.items[m]||this._def.rest;return p?p._parse(new Ya(s,d,s.path,m)):null}).filter(d=>!!d);return s.common.async?Promise.all(o).then(d=>Wn.mergeArray(l,d)):Wn.mergeArray(l,o)}get items(){return this._def.items}rest(i){return new Cl({...this._def,rest:i})}}Cl.create=(n,i)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cl({items:n,typeName:et.ZodTuple,rest:null,...st(i)})};class ev extends pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:l,ctx:s}=this._processInputParams(i);if(s.parsedType!==Ue.map)return Ae(s,{code:pe.invalid_type,expected:Ue.map,received:s.parsedType}),Je;const u=this._def.keyType,o=this._def.valueType,d=[...s.data.entries()].map(([m,p],g)=>({key:u._parse(new Ya(s,m,s.path,[g,"key"])),value:o._parse(new Ya(s,p,s.path,[g,"value"]))}));if(s.common.async){const m=new Map;return Promise.resolve().then(async()=>{for(const p of d){const g=await p.key,x=await p.value;if(g.status==="aborted"||x.status==="aborted")return Je;(g.status==="dirty"||x.status==="dirty")&&l.dirty(),m.set(g.value,x.value)}return{status:l.value,value:m}})}else{const m=new Map;for(const p of d){const g=p.key,x=p.value;if(g.status==="aborted"||x.status==="aborted")return Je;(g.status==="dirty"||x.status==="dirty")&&l.dirty(),m.set(g.value,x.value)}return{status:l.value,value:m}}}}ev.create=(n,i,l)=>new ev({valueType:i,keyType:n,typeName:et.ZodMap,...st(l)});class Bs extends pt{_parse(i){const{status:l,ctx:s}=this._processInputParams(i);if(s.parsedType!==Ue.set)return Ae(s,{code:pe.invalid_type,expected:Ue.set,received:s.parsedType}),Je;const u=this._def;u.minSize!==null&&s.data.size<u.minSize.value&&(Ae(s,{code:pe.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),l.dirty()),u.maxSize!==null&&s.data.size>u.maxSize.value&&(Ae(s,{code:pe.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),l.dirty());const o=this._def.valueType;function d(p){const g=new Set;for(const x of p){if(x.status==="aborted")return Je;x.status==="dirty"&&l.dirty(),g.add(x.value)}return{status:l.value,value:g}}const m=[...s.data.values()].map((p,g)=>o._parse(new Ya(s,p,s.path,g)));return s.common.async?Promise.all(m).then(p=>d(p)):d(m)}min(i,l){return new Bs({...this._def,minSize:{value:i,message:qe.toString(l)}})}max(i,l){return new Bs({...this._def,maxSize:{value:i,message:qe.toString(l)}})}size(i,l){return this.min(i,l).max(i,l)}nonempty(i){return this.min(1,i)}}Bs.create=(n,i)=>new Bs({valueType:n,minSize:null,maxSize:null,typeName:et.ZodSet,...st(i)});class uh extends pt{get schema(){return this._def.getter()}_parse(i){const{ctx:l}=this._processInputParams(i);return this._def.getter()._parse({data:l.data,path:l.path,parent:l})}}uh.create=(n,i)=>new uh({getter:n,typeName:et.ZodLazy,...st(i)});class To extends pt{_parse(i){if(i.data!==this._def.value){const l=this._getOrReturnCtx(i);return Ae(l,{received:l.data,code:pe.invalid_literal,expected:this._def.value}),Je}return{status:"valid",value:i.data}}get value(){return this._def.value}}To.create=(n,i)=>new To({value:n,typeName:et.ZodLiteral,...st(i)});function Sb(n,i){return new jl({values:n,typeName:et.ZodEnum,...st(i)})}class jl extends pt{_parse(i){if(typeof i.data!="string"){const l=this._getOrReturnCtx(i),s=this._def.values;return Ae(l,{expected:xt.joinValues(s),received:l.parsedType,code:pe.invalid_type}),Je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(i.data)){const l=this._getOrReturnCtx(i),s=this._def.values;return Ae(l,{received:l.data,code:pe.invalid_enum_value,options:s}),Je}return gi(i.data)}get options(){return this._def.values}get enum(){const i={};for(const l of this._def.values)i[l]=l;return i}get Values(){const i={};for(const l of this._def.values)i[l]=l;return i}get Enum(){const i={};for(const l of this._def.values)i[l]=l;return i}extract(i,l=this._def){return jl.create(i,{...this._def,...l})}exclude(i,l=this._def){return jl.create(this.options.filter(s=>!i.includes(s)),{...this._def,...l})}}jl.create=Sb;class oh extends pt{_parse(i){const l=xt.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(i);if(s.parsedType!==Ue.string&&s.parsedType!==Ue.number){const u=xt.objectValues(l);return Ae(s,{expected:xt.joinValues(u),received:s.parsedType,code:pe.invalid_type}),Je}if(this._cache||(this._cache=new Set(xt.getValidEnumValues(this._def.values))),!this._cache.has(i.data)){const u=xt.objectValues(l);return Ae(s,{received:s.data,code:pe.invalid_enum_value,options:u}),Je}return gi(i.data)}get enum(){return this._def.values}}oh.create=(n,i)=>new oh({values:n,typeName:et.ZodNativeEnum,...st(i)});class Ao extends pt{unwrap(){return this._def.type}_parse(i){const{ctx:l}=this._processInputParams(i);if(l.parsedType!==Ue.promise&&l.common.async===!1)return Ae(l,{code:pe.invalid_type,expected:Ue.promise,received:l.parsedType}),Je;const s=l.parsedType===Ue.promise?l.data:Promise.resolve(l.data);return gi(s.then(u=>this._def.type.parseAsync(u,{path:l.path,errorMap:l.common.contextualErrorMap})))}}Ao.create=(n,i)=>new Ao({type:n,typeName:et.ZodPromise,...st(i)});class El extends pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===et.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:l,ctx:s}=this._processInputParams(i),u=this._def.effect||null,o={addIssue:d=>{Ae(s,d),d.fatal?l.abort():l.dirty()},get path(){return s.path}};if(o.addIssue=o.addIssue.bind(o),u.type==="preprocess"){const d=u.transform(s.data,o);if(s.common.async)return Promise.resolve(d).then(async m=>{if(l.value==="aborted")return Je;const p=await this._def.schema._parseAsync({data:m,path:s.path,parent:s});return p.status==="aborted"?Je:p.status==="dirty"||l.value==="dirty"?Es(p.value):p});{if(l.value==="aborted")return Je;const m=this._def.schema._parseSync({data:d,path:s.path,parent:s});return m.status==="aborted"?Je:m.status==="dirty"||l.value==="dirty"?Es(m.value):m}}if(u.type==="refinement"){const d=m=>{const p=u.refinement(m,o);if(s.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(s.common.async===!1){const m=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return m.status==="aborted"?Je:(m.status==="dirty"&&l.dirty(),d(m.value),{status:l.value,value:m.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(m=>m.status==="aborted"?Je:(m.status==="dirty"&&l.dirty(),d(m.value).then(()=>({status:l.value,value:m.value}))))}if(u.type==="transform")if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Nr(d))return Je;const m=u.transform(d.value,o);if(m instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:l.value,value:m}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>Nr(d)?Promise.resolve(u.transform(d.value,o)).then(m=>({status:l.value,value:m})):Je);xt.assertNever(u)}}El.create=(n,i,l)=>new El({schema:n,typeName:et.ZodEffects,effect:i,...st(l)});El.createWithPreprocess=(n,i,l)=>new El({schema:i,effect:{type:"preprocess",transform:n},typeName:et.ZodEffects,...st(l)});class ra extends pt{_parse(i){return this._getType(i)===Ue.undefined?gi(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}ra.create=(n,i)=>new ra({innerType:n,typeName:et.ZodOptional,...st(i)});class _l extends pt{_parse(i){return this._getType(i)===Ue.null?gi(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}_l.create=(n,i)=>new _l({innerType:n,typeName:et.ZodNullable,...st(i)});class zo extends pt{_parse(i){const{ctx:l}=this._processInputParams(i);let s=l.data;return l.parsedType===Ue.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:l.path,parent:l})}removeDefault(){return this._def.innerType}}zo.create=(n,i)=>new zo({innerType:n,typeName:et.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...st(i)});class Oo extends pt{_parse(i){const{ctx:l}=this._processInputParams(i),s={...l,common:{...l.common,issues:[]}},u=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Co(u)?u.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sa(s.common.issues)},input:s.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new sa(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Oo.create=(n,i)=>new Oo({innerType:n,typeName:et.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...st(i)});class tv extends pt{_parse(i){if(this._getType(i)!==Ue.nan){const s=this._getOrReturnCtx(i);return Ae(s,{code:pe.invalid_type,expected:Ue.nan,received:s.parsedType}),Je}return{status:"valid",value:i.data}}}tv.create=n=>new tv({typeName:et.ZodNaN,...st(n)});class kb extends pt{_parse(i){const{ctx:l}=this._processInputParams(i),s=l.data;return this._def.type._parse({data:s,path:l.path,parent:l})}unwrap(){return this._def.type}}class qh extends pt{_parse(i){const{status:l,ctx:s}=this._processInputParams(i);if(s.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?Je:o.status==="dirty"?(l.dirty(),Es(o.value)):this._def.out._parseAsync({data:o.value,path:s.path,parent:s})})();{const u=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?Je:u.status==="dirty"?(l.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:s.path,parent:s})}}static create(i,l){return new qh({in:i,out:l,typeName:et.ZodPipeline})}}class Do extends pt{_parse(i){const l=this._def.innerType._parse(i),s=u=>(Nr(u)&&(u.value=Object.freeze(u.value)),u);return Co(l)?l.then(u=>s(u)):s(l)}unwrap(){return this._def.innerType}}Do.create=(n,i)=>new Do({innerType:n,typeName:et.ZodReadonly,...st(i)});var et;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(et||(et={}));const xe=qa.create,ch=Cr.create,mi=ah.create;Ga.create;const Qt=Vi.create,dt=tn.create;Eo.create;const wb=Hh.create;_o.create;Cl.create;const br=To.create,fn=jl.create;Ao.create;ra.create;_l.create;const Ho=fn(["todo","doing","review","done"]),Is={todo:"待办",doing:"进行中",review:"待验收",done:"已完成"},zk=fn(["todo","doing","review"]),qo=fn(["high","medium","low"]),Vh={high:"高优先",medium:"中优先",low:"低优先"},Nb=fn(["codex","claude-code","antigravity"]),jn={codex:"Codex","claude-code":"Claude Code",antigravity:"Antigravity"},Cb=fn(["device_flow","local_session","api_key","none"]),Ok=fn(["unknown","logged_in","logged_out","expired","error"]);fn(["pending","starting","waiting_user","succeeded","failed","cancelled","expired"]);const jb=fn(["auto","worktree","isolated_dir","shared"]),Mn=xe().trim().min(1).max(200),Dk=xe().trim().max(200).default(""),Vo=xe().trim().min(1).max(40),$o=xe().trim().max(1e3),$h=xe().trim().max(5e4),Mk=dt({id:xe().trim().min(1).max(64),text:xe().trim().min(1).max(500),done:mi().default(!1),updatedBy:xe().trim().max(200).optional()}).strict(),Eb=Qt(Mk).max(100).refine(n=>new Set(n.map(i=>i.id)).size===n.length,"清单项 ID 不能重复"),_b=n=>xe().trim().url().max(n).refine(i=>/^https?:\/\//i.test(i),"仅支持 http/https 链接"),Rk=20*1024*1024,$a=20,_s=10,Lk=["image/png","image/jpeg","image/webp","image/gif"];fn(["image","file"]);dt({projectId:xe().uuid(),attachmentIds:Qt(xe().uuid()).min(1).max($a)}).strict();const Bk=2e5;dt({label:Mn.optional(),path:$o.optional(),branch:xe().trim().max(200).optional(),summary:xe().trim().max(2e3).optional(),url:_b(2e3).optional(),content:xe().max(Bk).optional(),filename:xe().trim().min(1).max(255).optional(),mimeType:xe().trim().min(1).max(128).optional(),attachmentId:xe().uuid().optional()}).strict().superRefine((n,i)=>{var s,u;!!(n.label||n.filename||n.attachmentId||(s=n.path)!=null&&s.trim()||(u=n.branch)!=null&&u.trim()||n.url)||i.addIssue({code:pe.custom,path:["filename"],message:"请至少提供 filename、label、attachmentId、path、branch 或 url 之一"}),n.content!==void 0&&n.attachmentId!==void 0&&i.addIssue({code:pe.custom,path:["content"],message:"content 与 attachmentId 不能同时传入"}),n.content!==void 0&&n.content.trim().length===0&&i.addIssue({code:pe.custom,path:["content"],message:"content 不能为空"}),n.content===void 0&&(n.filename!==void 0||n.mimeType!==void 0)&&i.addIssue({code:pe.custom,path:[n.filename!==void 0?"filename":"mimeType"],message:"filename / mimeType 仅在传入 content 时可用"})});dt({name:Mn,description:xe().trim().max(2e3).default(""),rootPath:$o.default(""),defaultAgentId:xe().uuid().nullable().optional(),parallelMode:jb.default("auto")}).strict();dt({name:Mn.optional(),description:xe().trim().max(2e3).optional(),rootPath:$o.optional(),defaultAgentId:xe().uuid().nullable().optional(),parallelMode:jb.optional()}).strict();dt({name:Mn,driver:Nb,authMode:Cb.optional(),projectId:xe().uuid().nullable().optional()}).strict();dt({name:Mn.optional(),enabled:mi().optional(),projectId:xe().uuid().nullable().optional()}).strict();dt({adapterInstanceId:xe().trim().min(1).max(80),hostLabel:xe().trim().min(1).max(200),sseConnected:mi(),lastEventCursor:xe().regex(/^\d+$/),driver:Nb.optional(),authMode:Cb.optional(),loginState:Ok,loginMessage:xe().trim().max(500).optional()}).strict();dt({status:fn(["starting","waiting_user","succeeded","failed","cancelled","expired"]),verificationUri:_b(500).optional(),userCode:xe().trim().min(1).max(40).optional(),expiresAt:xe().trim().datetime({offset:!0}).max(40).optional(),message:xe().trim().max(500).optional()}).strict();dt({projectId:xe().uuid(),parentId:xe().uuid().nullable().optional(),defaultAgentId:xe().uuid().nullable().optional(),title:Mn,body:$h.default(""),status:Ho.default("todo"),priority:qo.default("medium"),tags:Qt(Vo).max(20).default([]),checklist:Eb.default([]),mentions:Qt(xe().uuid()).max(10).default([]),attachmentIds:Qt(xe().uuid()).max($a).default([]),skipDefaultAgent:mi().default(!1)}).strict();const Ik=dt({op:br("add"),id:xe().trim().min(1).max(64).optional(),text:xe().trim().min(1).max(500),done:mi().default(!1)}).strict(),Uk=dt({op:br("update"),id:xe().trim().min(1).max(64),text:xe().trim().min(1).max(500).optional(),done:mi().optional()}).strict(),Hk=dt({op:br("remove"),id:xe().trim().min(1).max(64)}).strict(),qk=wb("op",[Ik,Uk,Hk]).superRefine((n,i)=>{n.op==="update"&&n.text===void 0&&n.done===void 0&&i.addIssue({code:pe.custom,message:"update 操作至少需要提供 text 或 done 之一"})});dt({title:Mn.optional(),body:$h.optional(),priority:qo.optional(),tags:Qt(Vo).max(20).optional(),checklist:Eb.optional(),checklistOps:Qt(qk).min(1).max(50).optional(),expectedVersion:ch().int().min(1).optional(),parentId:xe().uuid().nullable().optional(),defaultAgentId:xe().uuid().nullable().optional(),position:ch().int().min(0).optional(),summary:Dk.optional()}).strict().refine(n=>!(n.checklist!==void 0&&n.checklistOps!==void 0),{message:"checklist 与 checklistOps 不能同时传入,请二选一(并发场景推荐 checklistOps)",path:["checklistOps"]});dt({status:Ho,position:ch().int().min(0).optional(),note:xe().trim().max(2e3).optional()}).strict();dt({text:xe().trim().max(2e4).default(""),mentions:Qt(xe().uuid()).max(10).default([]),attachmentIds:Qt(xe().uuid()).max(_s).default([]),replyTo:xe().uuid().optional(),relatesTo:xe().uuid().optional()}).strict().refine(n=>n.text.length>0||n.attachmentIds.length>0,"请输入评论内容或添加附件");const Vk=fn(["completed","no_write","failed","stopped"]);fn(["running","completed","no_write","failed","stopped"]);const $k=fn(["slate","command","tool","message","status"]),Rd=80,Zk=20,Yk=dt({kind:$k,title:xe().trim().min(1).max(200),detail:xe().trim().max(400).optional(),at:xe().trim().datetime({offset:!0}).max(40).optional()}).strict();dt({runId:xe().uuid(),eventId:xe().uuid().optional(),steps:Qt(Yk).min(1).max(Zk)}).strict();dt({runId:xe().uuid().optional(),eventId:xe().uuid().optional(),activityText:xe().trim().max(300).default(""),workDir:$o.optional(),branch:xe().trim().max(200).optional()}).strict();dt({runId:xe().uuid().optional(),eventId:xe().uuid().optional(),outcome:Vk.optional(),summary:xe().trim().max(300).optional()}).strict();const Gk=dt({id:xe().trim().min(1).max(64),label:xe().trim().min(1).max(120),description:xe().trim().max(400).optional(),recommended:mi().default(!1)}).strict();dt({question:xe().trim().min(1).max(2e3),context:xe().trim().max(2e3).optional(),options:Qt(Gk).min(2).max(6).refine(n=>new Set(n.map(i=>i.id)).size===n.length,"决策选项 ID 不能重复").optional()}).strict();dt({optionId:xe().trim().min(1).max(64).optional(),note:xe().trim().max(4e3).optional(),wakeAgent:mi().default(!0)}).strict().refine(n=>{var i;return!!(n.optionId||(i=n.note)!=null&&i.trim())},"请选择一个选项或填写回复内容");const Qk=fn(["card_draft","assistant_chat"]),Xk=fn(["focus","risk","cleanup","summary"]);fn(["queued","running","succeeded","failed","cancelled"]);const Fk=dt({includeExistingCards:mi().default(!0),readWorkspace:mi().default(!0),allowMultipleCards:mi().default(!1)}).strict(),Tb=dt({title:Mn,body:$h.default(""),status:zk.default("todo"),priority:qo.default("medium"),tags:Qt(Vo).max(20).default([]),checklist:Qt(xe().trim().min(1).max(500)).max(50).default([]),suggestedAgentIds:Qt(xe().uuid()).max(10).default([]),parentId:xe().uuid().nullable().optional(),duplicateOfCardId:xe().uuid().nullable().optional(),duplicateReason:xe().trim().max(500).optional()}).strict(),Kk=dt({cardId:xe().uuid(),title:Mn,status:Ho,note:xe().trim().max(200).optional()}).strict(),Ab=wb("type",[dt({id:xe().trim().min(1).max(64),type:br("create_card"),summary:Mn,draft:Tb,mentions:Qt(xe().uuid()).max(10).default([]),skipDefaultAgent:mi().default(!1)}).strict(),dt({id:xe().trim().min(1).max(64),type:br("update_card"),cardId:xe().uuid(),cardTitle:Mn,summary:Mn,patch:dt({title:Mn.optional(),priority:qo.optional(),tags:Qt(Vo).max(20).optional(),status:Ho.optional()}).strict()}).strict(),dt({id:xe().trim().min(1).max(64),type:br("archive_card"),cardId:xe().uuid(),cardTitle:Mn,summary:Mn}).strict()]),Pk=dt({reply:xe().trim().max(5e4).default(""),clarifyQuestion:xe().trim().max(1e3).optional(),splitSuggestion:xe().trim().max(500).optional(),cardRefs:Qt(Kk).max(30).refine(n=>new Set(n.map(i=>i.cardId)).size===n.length,"引用卡片 ID 不能重复").default([]),drafts:Qt(Tb).max(20).default([]),proposals:Qt(Ab).max(30).refine(n=>new Set(n.map(i=>i.id)).size===n.length,"提案 ID 不能重复").default([])}).strict();dt({projectId:xe().uuid(),agentId:xe().uuid(),kind:Qk,prompt:xe().trim().min(1).max(2e4),threadId:xe().uuid().optional(),preset:Xk.optional(),options:Fk.optional(),attachmentIds:Qt(xe().uuid()).max($a).default([])}).strict();dt({status:fn(["running","succeeded","failed","cancelled"]),activityText:xe().trim().max(300).optional(),sessionId:xe().trim().max(200).optional(),result:Pk.optional(),errorMessage:xe().trim().max(2e3).optional()}).strict();dt({text:xe().max(5e4),stage:fn(["streaming","structuring"]).default("streaming"),activityText:xe().trim().max(300).optional()}).strict();dt({actions:Qt(Ab).min(1).max(30)}).strict();class Zh extends Error{constructor(i,l,s={}){super(l),this.status=i,this.data=s}}async function it(n,i={}){const l=await fetch(`/v1${n}`,{...i,headers:{...i.body?{"content-type":"application/json"}:{},...i.headers??{}}}),s=await l.json().catch(()=>({}));if(!l.ok)throw new Zh(l.status,String(s.message??`请求失败 (${l.status})`),s);return s}async function Yh(n){const i=new URLSearchParams({projectId:n.projectId,filename:n.filename??n.file.name??"attachment"});n.cardId&&i.set("cardId",n.cardId),n.imagesOnly===!0&&i.set("imagesOnly","1"),n.file.type&&i.set("mimeType",n.file.type);const l=await fetch(`/v1/attachments?${i.toString()}`,{method:"POST",headers:{"content-type":"application/octet-stream"},body:n.file}),s=await l.json().catch(()=>({}));if(!l.ok)throw new Zh(l.status,String(s.message??`添加附件失败 (${l.status})`),s);return s}async function Jk(n,i){return(await it("/attachments/clone",{method:"POST",body:JSON.stringify({projectId:n,attachmentIds:i})})).attachments}function zb(n){return it(`/attachments/${n}/preview`)}function jr(n){return it(`/attachments/${n}/reveal`,{method:"POST",body:JSON.stringify({})})}function Wk(n,i){return it(`/cards/${n}/outputs/${i}/reveal`,{method:"POST",body:JSON.stringify({})})}function Gh(n){return it(`/attachments/${n}`,{method:"DELETE"})}function ew(n,i=15,l){return it(`/cards/${n}/runs?limit=${i}`,{signal:l})}function tw(n,i){const l=i!=null&&i.projectId?`?projectId=${encodeURIComponent(i.projectId)}`:"",s=new EventSource(`/v1/events/stream${l}`);let u;const o=()=>{window.clearTimeout(u),u=window.setTimeout(n,120)};if(s.addEventListener("wake",o),s.addEventListener("board_updated",o),i!=null&&i.onAssistantDelta){const d=i.onAssistantDelta;s.addEventListener("assistant_delta",m=>{try{d(JSON.parse(m.data))}catch{}})}if(i!=null&&i.onCardRunStep){const d=i.onCardRunStep;s.addEventListener("card_run_step",m=>{try{d(JSON.parse(m.data))}catch{}})}return()=>{window.clearTimeout(u),s.close()}}function Qa({variant:n,size:i=14}){return n==="antigravity"?c.jsxs("svg",{width:i,height:i,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("path",{d:"M8 2.2L13.4 11.8H10.2L8 7.6L5.8 11.8H2.6L8 2.2Z",fill:"var(--accent)"}),c.jsx("path",{d:"M5.4 13.4L8 10.6L10.6 13.4H5.4Z",fill:"var(--mint)"})]}):n==="claude-code"?c.jsx("svg",{width:i,height:i,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:c.jsxs("g",{transform:"translate(2.5 0) skewX(-10)",children:[c.jsx("rect",{x:"1.5",y:"2.5",width:"4.2",height:"11",rx:"1.4",fill:"var(--citrus-cta)"}),c.jsx("rect",{x:"7",y:"2.5",width:"4.2",height:"5",rx:"1.4",fill:"var(--ink)"}),c.jsx("rect",{x:"7",y:"8.8",width:"4.2",height:"4.7",rx:"1.4",fill:"var(--lemon-bright)"})]})}):n==="codex"?c.jsxs("svg",{width:i,height:i,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("path",{d:"M6.4 3.4L2.6 8L6.4 12.6",stroke:"var(--ink)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M9.6 3.4L13.4 8L9.6 12.6",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]}):n==="agents"?c.jsx("svg",{width:i,height:i,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:c.jsxs("g",{transform:"translate(2.4 0) skewX(-12)",children:[c.jsx("rect",{x:"1",y:"2.5",width:"3.6",height:"11",rx:"1.2",fill:"var(--citrus-cta)"}),c.jsx("rect",{x:"6",y:"4.5",width:"3.6",height:"9",rx:"1.2",fill:"var(--accent)"}),c.jsx("rect",{x:"11",y:"6.5",width:"3.2",height:"7",rx:"1.1",fill:"var(--mint)"})]})}):c.jsxs("svg",{width:i,height:i,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("circle",{cx:"8",cy:"5",r:"2.7",fill:"var(--ink)"}),c.jsx("path",{d:"M3 13.4C3 10.6 5.2 9 8 9C10.8 9 13 10.6 13 13.4C13 13.73 12.73 14 12.4 14H3.6C3.27 14 3 13.73 3 13.4Z",fill:"var(--citrus-cta)"})]})}function Zo({variant:n,size:i="md"}){const l=i==="sm"?12:14;return c.jsx("span",{className:`mark-tile ${i}`,"aria-hidden":"true",children:c.jsx(Qa,{variant:n,size:l})})}function Xa(n,i){return i?n.trim().toLowerCase()!==jn[i].toLowerCase():!1}var qs=sb();function Qh({open:n,title:i,description:l,confirmLabel:s,cancelLabel:u="取消",tone:o="danger",pending:d=!1,onConfirm:m,onCancel:p}){return N.useEffect(()=>{if(!n)return;function g(x){x.key!=="Escape"||x.defaultPrevented||x.isComposing||(x.preventDefault(),x.stopPropagation(),d||p())}return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[n,d,p]),n?qs.createPortal(c.jsx("div",{className:"modal-overlay confirm-overlay",onClick:()=>!d&&p(),children:c.jsxs("div",{className:"modal-card confirm-card",role:"alertdialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title","aria-describedby":"confirm-dialog-desc",onClick:g=>g.stopPropagation(),children:[c.jsxs("div",{className:"confirm-head",children:[c.jsx("span",{className:`confirm-icon ${o}`,"aria-hidden":"true",children:c.jsx(xb,{size:18})}),c.jsxs("div",{className:"confirm-copy",children:[c.jsx("h2",{id:"confirm-dialog-title",children:i}),c.jsx("p",{id:"confirm-dialog-desc",children:l})]}),c.jsx("button",{type:"button",className:"icon-btn","aria-label":"关闭确认窗口",disabled:d,onClick:p,children:c.jsx(Gt,{size:16})})]}),c.jsxs("div",{className:"modal-actions",children:[c.jsx("button",{type:"button",className:"btn ghost",disabled:d,onClick:p,children:u}),c.jsx("button",{type:"button",className:`btn ${o==="danger"?"danger-solid":"primary"}`,disabled:d,onClick:m,children:d?"处理中…":s})]})]})}),document.body):null}function qn({value:n,options:i,onChange:l,className:s="",placeholder:u="请选择",disabled:o=!1,"aria-label":d}){const[m,p]=N.useState(!1),[g,x]=N.useState(0),[y,S]=N.useState(null),b=N.useRef(null),k=N.useRef(null),C=i.find(D=>D.value===n)??null,T=i.some(D=>!!D.description);N.useLayoutEffect(()=>{if(!m||!b.current)return;const D=()=>{var ae;const I=(ae=b.current)==null?void 0:ae.getBoundingClientRect();if(!I)return;const G=T?60:36,ie=Math.min(i.length*G+12,T?320:260),O=T?Math.max(I.width,290):Math.max(I.width,136),V=window.innerHeight-I.bottom-10<ie&&I.top>ie+10;S({top:V?I.top-6:I.bottom+6,left:Math.max(8,Math.min(I.left,window.innerWidth-Math.max(O,160)-8)),width:O,placeAbove:V})};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,!0),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,!0)}},[m,i.length,T]),N.useEffect(()=>{if(!m)return;const D=G=>{var O,R;const ie=G.target;(O=b.current)!=null&&O.contains(ie)||(R=k.current)!=null&&R.contains(ie)||p(!1)},I=G=>{var ie,O;if(!(G.defaultPrevented||G.isComposing)){if(G.key==="Escape")G.preventDefault(),p(!1),(ie=b.current)==null||ie.focus();else if(G.key==="ArrowDown")G.preventDefault(),x(R=>(R+1)%Math.max(i.length,1));else if(G.key==="ArrowUp")G.preventDefault(),x(R=>(R-1+Math.max(i.length,1))%Math.max(i.length,1));else if(G.key==="Enter"){G.preventDefault();const R=i[g];R&&(l(R.value),p(!1),(O=b.current)==null||O.focus())}}};return document.addEventListener("mousedown",D),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",D),document.removeEventListener("keydown",I)}},[m,i,g,l]);function E(){if(!o)if(m)p(!1);else{const D=Math.max(0,i.findIndex(I=>I.value===n));x(D),p(!0)}}return c.jsxs(c.Fragment,{children:[c.jsxs("button",{ref:b,type:"button",role:"combobox","aria-expanded":m,"aria-haspopup":"listbox","aria-label":d,disabled:o,className:`ui-select-trigger ${m?"open":""} ${s}`.trim(),onClick:E,onKeyDown:D=>{!m&&!D.nativeEvent.isComposing&&(D.key==="ArrowDown"||D.key==="ArrowUp")&&(D.preventDefault(),E())},children:[c.jsxs("span",{className:"ui-select-value",children:[(C==null?void 0:C.dotColor)&&c.jsx("span",{className:"ui-select-dot",style:{backgroundColor:C.dotColor}}),c.jsx("span",{className:"ui-select-text",children:C?C.label:u})]}),c.jsx(Ds,{size:14,className:"ui-select-chevron"})]}),m&&y&&qs.createPortal(c.jsx("div",{ref:k,role:"listbox","aria-label":d,className:`ui-select-menu ${y.placeAbove?"above":"below"} ${T?"rich":""}`.trim(),style:{top:y.top,left:y.left,minWidth:y.width,maxWidth:T?Math.min(340,window.innerWidth-16):void 0,transform:y.placeAbove?"translateY(-100%)":void 0},onMouseDown:D=>D.stopPropagation(),children:i.map((D,I)=>{const G=D.value===n,ie=I===g;return c.jsxs("button",{type:"button",role:"option","aria-selected":G,className:`ui-select-option ${G?"selected":""} ${ie?"active":""}`,onMouseEnter:()=>x(I),onClick:()=>{l(D.value),p(!1)},children:[c.jsxs("span",{className:"ui-select-option-left",children:[D.dotColor&&c.jsx("span",{className:"ui-select-dot",style:{backgroundColor:D.dotColor}}),c.jsxs("span",{className:"ui-select-option-copy",children:[c.jsx("span",{className:"ui-select-option-label",children:D.label}),D.description&&c.jsx("span",{className:"ui-select-option-desc",children:D.description})]})]}),G&&c.jsx(pi,{size:14,className:"ui-select-check"})]},D.value)})}),document.body)]})}const nw={logged_in:"已登录",logged_out:"未登录",expired:"登录已失效",error:"认证异常",unknown:"待检测"};function iw({open:n,onClose:i,agents:l,currentProject:s,onRefresh:u,onOpenCard:o}){const[d,m]=N.useState(!1),[p,g]=N.useState("codex"),[x,y]=N.useState(""),[S,b]=N.useState(""),[k,C]=N.useState(!1),[T,E]=N.useState(null),[D,I]=N.useState(null);if(N.useEffect(()=>{if(!n)return;const U=P=>{if(!(P.key!=="Escape"||P.defaultPrevented||P.isComposing)&&!D){if(P.preventDefault(),d){m(!1),b("");return}i()}};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[n,d,D,i]),!n)return null;async function G(U){U.preventDefault(),C(!0),b("");try{const P=x.trim()||jn[p];await it("/agents",{method:"POST",body:JSON.stringify({name:P,driver:p,projectId:null})}),E({name:P,driver:p}),y(""),m(!1),await u()}catch(P){b(P instanceof Error?P.message:"注册失败")}finally{C(!1)}}async function ie(U){C(!0),b("");try{await it(`/agents/${U.id}`,{method:"PATCH",body:JSON.stringify({enabled:!U.enabled})}),await u()}catch(P){b(P instanceof Error?P.message:"更新失败")}finally{C(!1)}}async function O(U){if(!(!s||s.defaultAgentId===U.id)){C(!0),b("");try{await it(`/projects/${s.id}`,{method:"PATCH",body:JSON.stringify({defaultAgentId:U.id})}),await u()}catch(P){b(P instanceof Error?P.message:"设置默认 Agent 失败")}finally{C(!1)}}}function R(U){I(U)}async function V(){if(D){C(!0),b("");try{await it(`/agents/${D.id}`,{method:"DELETE"}),I(null),await u()}catch(U){b(U instanceof Error?U.message:"移除失败"),I(null)}finally{C(!1)}}}async function ae(U){C(!0),b("");try{await it(`/agents/${U.id}/login`,{method:"POST",body:JSON.stringify({})}),await u()}catch(P){b(P instanceof Error?P.message:"发起登录失败")}finally{C(!1)}}async function H(U){if(U.loginRequest){C(!0),b("");try{await it(`/agents/${U.id}/login/${U.loginRequest.id}/cancel`,{method:"POST",body:JSON.stringify({})}),await u()}catch(P){b(P instanceof Error?P.message:"取消失败")}finally{C(!1)}}}return c.jsx("div",{className:"drawer-overlay",onClick:()=>{D||i()},children:c.jsxs("aside",{className:"drawer-panel narrow",role:"dialog","aria-modal":"true","aria-label":"本机 CLI Agent 管理",onClick:U=>U.stopPropagation(),children:[c.jsxs("header",{className:"drawer-header",children:[c.jsxs("div",{className:"drawer-header-title",children:[c.jsx(Qa,{variant:"agents",size:17}),c.jsx("h2",{children:"本机 Agent"}),c.jsx("span",{className:"pill-count",children:l.length})]}),c.jsxs("div",{className:"drawer-header-actions",children:[c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip","data-tooltip":"手动注册新的本机 CLI",onClick:()=>{m(U=>!U),b("")},children:[c.jsx(Nl,{size:14})," 注册"]}),c.jsx("button",{type:"button",className:"icon-btn has-tooltip tooltip-right","data-tooltip":"关闭 (Esc)",onClick:i,"aria-label":"关闭",children:c.jsx(Gt,{size:16})})]})]}),c.jsxs("div",{className:"drawer-body compact-drawer-body",children:[S&&c.jsx("div",{className:"banner danger",children:S}),T&&c.jsxs("div",{className:"banner info",children:["已注册「",T.name,"」,终端运行:",c.jsxs("code",{children:["pnpm start:agent --driver ",T.driver,' --name "',T.name,'"']})]}),d&&c.jsxs("form",{className:"inline-form",onSubmit:U=>void G(U),children:[c.jsxs("div",{className:"form-row",children:[c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"驱动"}),c.jsx(qn,{"aria-label":"驱动",value:p,onChange:g,options:[{value:"codex",label:"Codex"},{value:"claude-code",label:"Claude Code"},{value:"antigravity",label:"Antigravity"}]})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"名称"}),c.jsx("input",{value:x,onChange:U=>y(U.target.value),placeholder:jn[p]})]})]}),c.jsxs("div",{className:"form-actions",children:[c.jsx("button",{type:"button",className:"btn ghost xs",onClick:()=>{m(!1),b("")},children:"取消"}),c.jsx("button",{type:"submit",className:"btn primary xs",disabled:k,children:"确认"})]})]}),l.length===0?c.jsxs("div",{className:"empty-state",children:[c.jsx("p",{children:"还没有已接入的本机 Agent。"}),c.jsxs("p",{className:"muted xs",children:["运行 ",c.jsx("code",{children:"pnpm start:local"})," 会自动探测并接入。"]})]}):c.jsx("div",{className:"agent-cards",children:l.map(U=>{const P=(s==null?void 0:s.defaultAgentId)===U.id,ee=U.loginRequest,ge=ee&&["pending","starting","waiting_user"].includes(ee.status),ce=U.online&&["expired","logged_out","error"].includes(U.loginState),F=U.authMode==="device_flow"?"设备授权":U.authMode==="api_key"?"API Key":"本机登录态",ue=U.enabled?U.online?ce?"danger":U.activeCards.length?"accent":"success":"warning":"muted";return c.jsxs("div",{className:`agent-card balanced ${ce?"is-auth-error":U.online?"is-online":"is-offline"}`,children:[c.jsxs("div",{className:"agent-card-top nowrap",children:[c.jsxs("div",{className:"agent-card-id",children:[c.jsx("span",{className:`dot ${ue}`}),c.jsx(Zo,{variant:U.driver,size:"sm"}),c.jsx("strong",{className:"agent-name",children:U.name}),P&&c.jsxs("span",{className:"default-badge",children:[c.jsx(nh,{size:10,fill:"currentColor"})," 默认 Agent"]})]}),c.jsxs("div",{className:"agent-card-actions",children:[s&&c.jsx("button",{type:"button",className:`icon-btn agent-action-btn has-tooltip ${P?"star-active":""}`,"data-tooltip":P?"当前工作空间默认 Agent":"设为工作空间默认 Agent","aria-label":P?"当前默认 Agent":"设为默认 Agent",disabled:k||P,onClick:()=>void O(U),children:c.jsx(nh,{size:16,fill:P?"currentColor":"none"})}),c.jsx("button",{type:"button",className:"icon-btn agent-action-btn has-tooltip","data-tooltip":U.enabled?"暂停接单":"恢复接单","aria-label":U.enabled?"暂停接单":"恢复接单",disabled:k,onClick:()=>void ie(U),children:U.enabled?c.jsx(J2,{size:16}):c.jsx(Bh,{size:16})}),c.jsx("button",{type:"button",className:"icon-btn agent-action-btn danger has-tooltip tooltip-right","data-tooltip":"移除 Agent","aria-label":"移除 Agent",disabled:k,onClick:()=>void R(U),children:c.jsx(wr,{size:16})})]})]}),c.jsxs("div",{className:"agent-status-line",children:[c.jsx("span",{className:`status-chip ${U.online?"ok":"warn"}`,children:U.online?"在线":"离线"}),c.jsx("span",{className:`status-chip ${ce?"err":U.loginState==="logged_in"?"ok":"neutral"}`,children:nw[U.loginState]}),U.enabled?U.activeCards.length>0?c.jsxs("span",{className:"status-chip busy",children:["执行中 (",U.activeCards.length,")"]}):c.jsx("span",{className:"status-chip neutral",children:"空闲可接单"}):c.jsx("span",{className:"status-chip neutral",children:"已暂停接单"})]}),c.jsxs("div",{className:"agent-sub-meta",title:[jn[U.driver],F,U.hostLabel].filter(Boolean).join(" · "),children:[Xa(U.name,U.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[U.driver]}),c.jsx("span",{children:Xa(U.name,U.driver)?`· ${F}`:F}),U.hostLabel&&c.jsxs("span",{className:"agent-host",children:["· ",U.hostLabel]})]}),ce&&U.loginMessage&&c.jsx("p",{className:"agent-err-msg",children:U.loginMessage}),U.activeCards.length>0&&c.jsx("div",{className:"agent-active-list",children:U.activeCards.map(fe=>c.jsxs("button",{type:"button",className:"active-card-chip",onClick:()=>{o(fe.cardId),i()},children:[c.jsx("span",{className:"pulse-dot"}),c.jsx("span",{children:fe.title}),fe.activityText&&c.jsxs("small",{children:["· ",fe.activityText]})]},fe.cardId))}),ge&&ee&&c.jsxs("div",{className:"device-login-box",children:[c.jsx("p",{children:ee.status==="waiting_user"?"请打开链接并输入验证码:":"正在准备登录…"}),ee.verificationUri&&c.jsx("a",{href:ee.verificationUri,target:"_blank",rel:"noreferrer",children:ee.verificationUri}),ee.userCode&&c.jsx("div",{className:"device-code",children:ee.userCode}),c.jsx("button",{type:"button",className:"btn ghost xs",disabled:k,onClick:()=>void H(U),children:"取消登录"})]}),U.authMode==="device_flow"&&U.online&&!ge&&U.loginState!=="logged_in"&&c.jsx("div",{className:"agent-login-footer",children:c.jsxs("button",{type:"button",className:"btn xs primary",disabled:k,onClick:()=>void ae(U),children:[c.jsx(K2,{size:12})," 发起设备登录"]})})]},U.id)})}),c.jsxs("p",{className:"drawer-foot-hint",children:["启动时自动识别已装 CLI;新装后可运行 ",c.jsx("code",{children:"pnpm start:agents"})," 刷新。"]})]}),c.jsx(Qh,{open:!!D,title:"移除 Agent",description:D?`移除「${D.name}」后将不再响应 @ 提及,需重新接入。`:"",confirmLabel:"移除 Agent",tone:"danger",pending:k,onConfirm:()=>void V(),onCancel:()=>I(null)})]})})}const aw=220,fh="slate.selectedProjectId",Ob="slate.createCardMode",dh="project";function lw(n){return n.hasActiveDraftRun?"ai":n.storedMode==="manual"?"manual":n.hasOnlineAgent?"ai":"manual"}const rw=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Xh(n){const i=(n==null?void 0:n.trim())??"";return rw.test(i)?i:""}function sw(n){const i=new URLSearchParams(n);return Xh(i.get(dh))}function uw(n,i){return sw(n)||Xh(i)}function ow(n,i,l,s){const u=new URLSearchParams(i),o=Xh(s);o?u.set(dh,o):u.delete(dh);const d=u.toString();return`${n}${d?`?${d}`:""}${l}`}function cw(n,i,l){return`${n}${i}${l?`#card=${l}`:""}`}function fw(n){var s;const i=new URLSearchParams;n.projectId&&i.set("projectId",n.projectId);const l=(s=n.search)==null?void 0:s.trim();return l&&i.set("search",l),n.agentId&&i.set("agentId",n.agentId),n.includeArchived&&i.set("includeArchived","true"),i.toString()}const dw=new Set(Lk),hw=/\.(png|jpe?g|webp|gif)$/i,mw=/\.(md|markdown|txt|log|json|csv|ya?ml|xml|html?|svg|tsx?|jsx?|mjs|cjs|css|sql|sh|py|go|rs|toml)$/i;function pw(n){var l,s;const i=((s=(l=n.type)==null?void 0:l.split(";")[0])==null?void 0:s.trim().toLowerCase())??"";return i&&i!=="application/octet-stream"?dw.has(i):hw.test((n.name??"").trim())}function Fh(n){return n.kind==="image"?!1:n.mimeType.startsWith("text/")||n.mimeType==="application/json"||n.mimeType==="application/xml"||n.mimeType==="application/yaml"||n.mimeType==="image/svg+xml"?!0:mw.test(n.filename)}function hi(n){return!Number.isFinite(n)||n<0?"0 B":n<1024?`${Math.round(n)} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const gw={"image/png":".png","image/jpeg":".jpg","image/webp":".webp","image/gif":".gif","application/pdf":".pdf","text/plain":".txt"};function Kh(n,i=new Date){var p;const l=(n.name??"").trim();if(!(!l||/^image\.(png|jpe?g|webp|gif)$/i.test(l)||l.toLowerCase()==="blob"))return l;const u=g=>String(g).padStart(2,"0"),o=`${u(i.getHours())}${u(i.getMinutes())}${u(i.getSeconds())}`,m=(l.includes(".")?l.slice(l.lastIndexOf(".")).toLowerCase():"")||gw[((p=n.type)==null?void 0:p.toLowerCase())??""]||".png";return`screenshot-${o}${m}`}function Ph(n,i,l=$a,s=Rk,u={}){const o=u.imagesOnly??!1,d=[],m=[];let p=Math.max(0,l-i);for(const g of n){if(g.size===0){m.push(`「${g.name||"文件"}」内容为空,已跳过`);continue}if(o&&!pw(g)){m.push(`「${g.name||"文件"}」不是图片(仅支持 PNG / JPG / WebP / GIF)`);continue}if(g.size>s){m.push(`「${g.name||"文件"}」超过 ${Math.round(s/(1024*1024))}MB 限制`);continue}if(p<=0){m.push(o?`最多支持 ${l} 张图片`:`最多支持 ${l} 个附件`);break}d.push(g),p-=1}return{valid:d,...m.length>0?{error:m.join(";")}:{}}}function Jh(n){if(!n)return[];const i=[];if(n.items&&n.items.length>0){for(const l of Array.from(n.items))if(l.kind==="file"){const s=l.getAsFile();s&&i.push(s)}}return i.length===0&&n.files&&n.files.length>0&&i.push(...Array.from(n.files)),i}function yw(n,i){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const xw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bw={};function nv(n,i){return(bw.jsx?vw:xw).test(n)}const Sw=/[ \t\n\f\r]/g;function kw(n){return typeof n=="object"?n.type==="text"?iv(n.value):!1:iv(n)}function iv(n){return n.replace(Sw,"")===""}class Vs{constructor(i,l,s){this.normal=l,this.property=i,s&&(this.space=s)}}Vs.prototype.normal={};Vs.prototype.property={};Vs.prototype.space=void 0;function Db(n,i){const l={},s={};for(const u of n)Object.assign(l,u.property),Object.assign(s,u.normal);return new Vs(l,s,i)}function hh(n){return n.toLowerCase()}class Vn{constructor(i,l){this.attribute=l,this.property=i}}Vn.prototype.attribute="";Vn.prototype.booleanish=!1;Vn.prototype.boolean=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.defined=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.number=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.property="";Vn.prototype.spaceSeparated=!1;Vn.prototype.space=void 0;let ww=0;const We=Al(),en=Al(),mh=Al(),be=Al(),Rt=Al(),kl=Al(),Jn=Al();function Al(){return 2**++ww}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:en,commaOrSpaceSeparated:Jn,commaSeparated:kl,number:be,overloadedBoolean:mh,spaceSeparated:Rt},Symbol.toStringTag,{value:"Module"})),Ld=Object.keys(ph);class Wh extends Vn{constructor(i,l,s,u){let o=-1;if(super(i,l),av(this,"space",u),typeof s=="number")for(;++o<Ld.length;){const d=Ld[o];av(this,Ld[o],(s&ph[d])===ph[d])}}}Wh.prototype.defined=!0;function av(n,i,l){l&&(n[i]=l)}function Er(n){const i={},l={};for(const[s,u]of Object.entries(n.properties)){const o=new Wh(s,n.transform(n.attributes||{},s),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),i[s]=o,l[hh(s)]=s,l[hh(o.attribute)]=s}return new Vs(i,l,n.space)}const Mb=Er({properties:{ariaActiveDescendant:null,ariaAtomic:en,ariaAutoComplete:null,ariaBusy:en,ariaChecked:en,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Rt,ariaCurrent:null,ariaDescribedBy:Rt,ariaDetails:null,ariaDisabled:en,ariaDropEffect:Rt,ariaErrorMessage:null,ariaExpanded:en,ariaFlowTo:Rt,ariaGrabbed:en,ariaHasPopup:null,ariaHidden:en,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Rt,ariaLevel:be,ariaLive:null,ariaModal:en,ariaMultiLine:en,ariaMultiSelectable:en,ariaOrientation:null,ariaOwns:Rt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:en,ariaReadOnly:en,ariaRelevant:null,ariaRequired:en,ariaRoleDescription:Rt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:en,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(n,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function Rb(n,i){return i in n?n[i]:i}function Lb(n,i){return Rb(n,i.toLowerCase())}const Nw=Er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kl,acceptCharset:Rt,accessKey:Rt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:Rt,autoFocus:We,autoPlay:We,blocking:Rt,capture:null,charSet:null,checked:We,cite:null,className:Rt,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:en,controls:We,controlsList:Rt,coords:be|kl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:mh,draggable:en,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:Rt,height:be,hidden:mh,high:be,href:null,hrefLang:null,htmlFor:Rt,httpEquiv:Rt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:Rt,itemRef:Rt,itemScope:We,itemType:Rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:be,pattern:null,ping:Rt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:Rt,required:We,reversed:We,rows:be,rowSpan:be,sandbox:Rt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:en,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:en,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Rt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:en,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:kl,part:Rt,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:Lb}),Cw=Er({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",maskType:"mask-type",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:Jn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:Rt,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:kl,g2:kl,glyphName:kl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jn,rev:Jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jn,requiredFeatures:Jn,requiredFonts:Jn,requiredFormats:Jn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rb}),Bb=Er({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,i){return"xlink:"+i.slice(5).toLowerCase()}}),Ib=Er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lb}),Ub=Er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,i){return"xml:"+i.slice(3).toLowerCase()}}),jw={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"},Ew=/[A-Z]/g,lv=/-[a-z]/g,_w=/^data[-\w.:]+$/i;function Tw(n,i){const l=hh(i);let s=i,u=Vn;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&_w.test(i)){if(i.charAt(4)==="-"){const o=i.slice(5).replace(lv,zw);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=i.slice(4);if(!lv.test(o)){let d=o.replace(Ew,Aw);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}u=Wh}return new u(s,i)}function Aw(n){return"-"+n.toLowerCase()}function zw(n){return n.charAt(1).toUpperCase()}const Ow=Db([Mb,Nw,Bb,Ib,Ub],"html"),em=Db([Mb,Cw,Bb,Ib,Ub],"svg");function Dw(n){return n.join(" ").trim()}var rv=/\/\*(?:[^*]|\*(?!\/))*\*\//g,Mw=/\n/g,Rw=/^\s*/,Lw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Bw=/^:\s*/,Iw=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Uw=/^[;\s]*/,Hw=`
|
|
320
|
+
`,sv="/",uv="*",Ns="",qw="comment",Vw="declaration";function $w(n,i){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];i=i||{};var l=1,s=1;function u(k){var C=k.match(Mw);C&&(l+=C.length);var T=k.lastIndexOf(Hw);s=~T?k.length-T:s+k.length}function o(){var k={line:l,column:s};return function(C){return C.position=new d(k),g(),C}}function d(k){this.start=k,this.end={line:l,column:s},this.source=i.source}d.prototype.content=n;function m(k){var C=new Error(i.source+":"+l+":"+s+": "+k);if(C.reason=k,C.filename=i.source,C.line=l,C.column=s,C.source=n,!i.silent)throw C}function p(k){var C=k.exec(n);if(C){var T=C[0];return u(T),n=n.slice(T.length),C}}function g(){p(Rw)}function x(k){for(var C;C=y();)k.push(C);return k}function y(){var k=o();if(!(sv!=n.charAt(0)||uv!=n.charAt(1))){for(var C=2;Ns!=n.charAt(C)&&(uv!=n.charAt(C)||sv!=n.charAt(C+1));)++C;if(C+=2,Ns===n.charAt(C-1))return m("End of comment missing");var T=n.slice(2,C-2);return s+=2,u(T),n=n.slice(C),s+=2,k({type:qw,comment:T})}}function S(){var k=o(),C=p(Lw);if(C){if(y(),!p(Bw))return m("property missing ':'");var T=p(Iw),E=k({type:Vw,property:C[0].replace(rv,Ns).trim(),value:T?T[0].replace(rv,Ns).trim():Ns});return p(Uw),E}}function b(){var k=[];x(k);for(var C;C=S();)k.push(C),x(k);return k}return g(),b()}function Zw(n,i){let l=null;if(!n||typeof n!="string")return l;const s=$w(n),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:d,value:m}=o;u?i(d,m,o):m&&(l=l??{},l[d]=m)}),l}const Hb=qb("end"),tm=qb("start");function qb(n){return i;function i(l){const s=l&&l.position&&l.position[n]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Yw(n){const i=tm(n),l=Hb(n);if(i&&l)return{start:i,end:l}}function Ts(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?ov(n.position):"start"in n||"end"in n?ov(n):"line"in n||"column"in n?gh(n):""}function gh(n){return cv(n&&n.line)+":"+cv(n&&n.column)}function ov(n){return gh(n&&n.start)+"-"+gh(n&&n.end)}function cv(n){return n&&typeof n=="number"?n:1}class Yo extends Error{constructor(i,l,s){super(),typeof l=="string"&&(s=l,l=void 0);let u="",o={},d=!1;if(l&&("line"in l&&"column"in l?o={place:l}:"start"in l&&"end"in l?o={place:l}:"type"in l?o={ancestors:[l],place:l.position}:o={...l}),typeof i=="string"?u=i:!o.cause&&i&&(d=!0,u=i.message,o.cause=i),!o.ruleId&&!o.source&&typeof s=="string"){const p=s.indexOf(":");p===-1?o.ruleId=s:(o.source=s.slice(0,p),o.ruleId=s.slice(p+1))}if(!o.place&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const m=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=m?m.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=m?m.line:void 0,this.name=Ts(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=d&&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}}Object.defineProperties(Yo.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const nm={}.hasOwnProperty,Gw=new Map,Qw=/[A-Z]/g,Xw=/-([a-z])/g,Fw=new Set(["table","tbody","thead","tfoot","tr"]),Kw=new Set(["td","th"]),Vb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pw(n,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=i.filePath||void 0;let s;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=lN(l,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=aN(l,i.jsx,i.jsxs)}const u={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:s,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?em:Ow,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},o=$b(u,n,void 0);return o&&typeof o!="string"?o:u.create(n,u.Fragment,{children:o||void 0},void 0)}function $b(n,i,l){if(i.type==="element")return Jw(n,i,l);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Ww(n,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return tN(n,i,l);if(i.type==="mdxjsEsm")return eN(n,i);if(i.type==="root")return nN(n,i,l);if(i.type==="text")return iN(n,i)}function Jw(n,i,l){const s=n.schema;let u=s;i.tagName.toLowerCase()==="svg"&&s.space==="html"&&(u=em,n.schema=u),n.ancestors.push(i);const o=Yb(n,i.tagName,!1),d=rN(n,i);let m=am(n,i);return Fw.has(i.tagName)&&(m=m.filter(function(p){return typeof p=="string"?!kw(p):!0})),Zb(n,d,o,i),im(d,m),n.ancestors.pop(),n.schema=s,n.create(i,o,d,l)}function Ww(n,i){if(i.data&&i.data.estree&&n.evaluater){const s=i.data.estree.body[0];return s.type,n.evaluater.evaluateExpression(s.expression)}Us(n,i.position)}function eN(n,i){if(i.data&&i.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(i.data.estree);Us(n,i.position)}function tN(n,i,l){const s=n.schema;let u=s;i.name==="svg"&&s.space==="html"&&(u=em,n.schema=u),n.ancestors.push(i);const o=i.name===null?n.Fragment:Yb(n,i.name,!0),d=sN(n,i),m=am(n,i);return Zb(n,d,o,i),im(d,m),n.ancestors.pop(),n.schema=s,n.create(i,o,d,l)}function nN(n,i,l){const s={};return im(s,am(n,i)),n.create(i,n.Fragment,s,l)}function iN(n,i){return i.value}function Zb(n,i,l,s){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(i.node=s)}function im(n,i){if(i.length>0){const l=i.length>1?i:i[0];l&&(n.children=l)}}function aN(n,i,l){return s;function s(u,o,d,m){const g=Array.isArray(d.children)?l:i;return m?g(o,d,m):g(o,d)}}function lN(n,i){return l;function l(s,u,o,d){const m=Array.isArray(o.children),p=tm(s);return i(u,o,d,m,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function rN(n,i){const l={};let s,u;for(u in i.properties)if(u!=="children"&&nm.call(i.properties,u)){const o=uN(n,u,i.properties[u]);if(o){const[d,m]=o;n.tableCellAlignToStyle&&d==="align"&&typeof m=="string"&&Kw.has(i.tagName)?s=m:l[d]=m}}if(s){const o=l.style||(l.style={});o[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return l}function sN(n,i){const l={};for(const s of i.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&n.evaluater){const o=s.data.estree.body[0];o.type;const d=o.expression;d.type;const m=d.properties[0];m.type,Object.assign(l,n.evaluater.evaluateExpression(m.argument))}else Us(n,i.position);else{const{name:u}=s;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&n.evaluater){const m=s.value.data.estree.body[0];m.type,o=n.evaluater.evaluateExpression(m.expression)}else Us(n,i.position);else o=s.value===null?!0:s.value;l[u]=o}return l}function am(n,i){const l=[];let s=-1;const u=n.passKeys?new Map:Gw;for(;++s<i.children.length;){const o=i.children[s];let d;if(n.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const g=u.get(p)||0;d=p+"-"+g,u.set(p,g+1)}}const m=$b(n,o,d);m!==void 0&&l.push(m)}return l}function uN(n,i,l){if(l==null||typeof l=="number"&&Number.isNaN(l))return;const s=Tw(n.schema,i);return Array.isArray(l)&&(l=s.commaSeparated?yw(l):Dw(l)),s.property==="style"?["style",typeof l=="object"?n.stylePropertyNameCase==="dom"?l:cN(l):oN(n,String(l))]:[n.elementAttributeNameCase==="react"&&s.space?jw[s.property]||s.property:s.attribute,l]}function oN(n,i){const l={};try{Zw(i,function(s,u){if(s&&u){let o=s;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),n.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(Xw,hN))),l[o]=u}})}catch(s){if(n.ignoreInvalidStyle)return{};const u=s,o=new Yo("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=n.filePath||void 0,o.url=Vb+"#cannot-parse-style-attribute",o}return l}function Yb(n,i,l){let s;if(!l)s={type:"Literal",value:i};else if(i.includes(".")){const u=i.split(".");let o=-1,d;for(;++o<u.length;){const m=nv(u[o])?{type:"Identifier",name:u[o]}:{type:"Literal",value:u[o]};d=d?{type:"MemberExpression",object:d,property:m,computed:!!(o&&m.type==="Literal"),optional:!1}:m}s=d}else s=nv(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(s.type==="Literal"){const u=s.value;return nm.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(s);Us(n)}function Us(n,i){const l=new Yo("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=Vb+"#cannot-handle-mdx-estrees-without-createevaluater",l}function cN(n){const i={};let l;for(l in n)nm.call(n,l)&&(i[fN(l)]=n[l]);return i}function fN(n){if(n.slice(0,2)==="--")return n;let i=n.replace(Qw,dN);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function dN(n){return"-"+n.toLowerCase()}function hN(n,i){return i.toUpperCase()}const Bd={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"]},mN={};function Go(n,i){const l=mN,s=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,u=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return Gb(n,s,u)}function Gb(n,i,l){if(pN(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(i&&"alt"in n&&n.alt)return n.alt;if("children"in n)return fv(n.children,i,l)}return Array.isArray(n)?fv(n,i,l):""}function fv(n,i,l){const s=[];let u=-1;for(;++u<n.length;)s[u]=Gb(n[u],i,l);return s.join("")}function pN(n){return!!(n&&typeof n=="object")}const dv=document.createElement("i");function lm(n){const i="&"+n+";";dv.innerHTML=i;const l=dv.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===i?!1:l}function ji(n,i,l,s){const u=n.length;let o=0,d;if(i<0?i=-i>u?0:u+i:i=i>u?u:i,l=l>0?l:0,s.length<1e4)d=Array.from(s),d.unshift(i,l),n.splice(...d);else for(l&&n.splice(i,l);o<s.length;)d=s.slice(o,o+1e4),d.unshift(i,0),n.splice(...d),o+=1e4,i+=1e4}function di(n,i){return n.length>0?(ji(n,n.length,0,i),n):i}const hv={}.hasOwnProperty;function Qb(n){const i={};let l=-1;for(;++l<n.length;)gN(i,n[l]);return i}function gN(n,i){let l;for(l in i){const u=(hv.call(n,l)?n[l]:void 0)||(n[l]={}),o=i[l];let d;if(o)for(d in o){hv.call(u,d)||(u[d]=[]);const m=o[d];yN(u[d],Array.isArray(m)?m:m?[m]:[])}}}function yN(n,i){let l=-1;const s=[];for(;++l<i.length;)(i[l].add==="after"?n:s).push(i[l]);ji(n,0,0,s)}function Xb(n,i){const l=Number.parseInt(n,i);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Ei(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bn=Pa(/[A-Za-z]/),Sn=Pa(/[\dA-Za-z]/),xN=Pa(/[#-'*+\--9=?A-Z^-~]/);function Mo(n){return n!==null&&(n<32||n===127)}const yh=Pa(/\d/),vN=Pa(/[\dA-Fa-f]/),Fb=Pa(/[!-/:-@[-`{-~]/);function Ye(n){return n!==null&&n<-2}function Lt(n){return n!==null&&(n<0||n===32)}function rt(n){return n===-2||n===-1||n===32}const $s=Pa(new RegExp("\\p{P}|\\p{S}","u")),Tl=Pa(/\s/);function Pa(n){return i;function i(l){return l!==null&&l>-1&&n.test(String.fromCharCode(l))}}function _r(n){const i=[];let l=-1,s=0,u=0;for(;++l<n.length;){const o=n.charCodeAt(l);let d="";if(o===37&&Sn(n.charCodeAt(l+1))&&Sn(n.charCodeAt(l+2)))u=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(d=String.fromCharCode(o));else if(o>55295&&o<57344){const m=n.charCodeAt(l+1);o<56320&&m>56319&&m<57344?(d=String.fromCharCode(o,m),u=1):d="�"}else d=String.fromCharCode(o);d&&(i.push(n.slice(s,l),encodeURIComponent(d)),s=l+u+1,d=""),u&&(l+=u,u=0)}return i.join("")+n.slice(s)}function bt(n,i,l,s){const u=s?s-1:1/0;let o=0;return d;function d(p){return rt(p)?(n.enter(l),m(p)):i(p)}function m(p){return rt(p)&&o++<u?(n.consume(p),m):(n.exit(l),i(p))}}function Kb(n,i,l,s,u,o){let d=0;return m;function m(x){return rt(x)?(n.enter(s),p(x)):g(x)}function p(x){return rt(x)&&d<o?(n.consume(x),d++,p):(n.exit(s),g(x))}function g(x){return d>=u?i(x):l(x)}}const bN={tokenize:SN};function SN(n){const i=n.attempt(this.parser.constructs.contentInitial,s,u);let l;return i;function s(m){if(m===null){n.consume(m);return}return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),bt(n,i,"linePrefix")}function u(m){return n.enter("paragraph"),o(m)}function o(m){const p=n.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=p),l=p,d(m)}function d(m){if(m===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(m);return}return Ye(m)?(n.consume(m),n.exit("chunkText"),o):(n.consume(m),d)}}let Ro=class{constructor(){this.index=new Map,this.map=[]}add(i,l,s){mv(this,i,l,s,!1)}addBefore(i,l,s){mv(this,i,l,s,!0)}consume(i){if(this.map.sort(function(o,d){return o[0]-d[0]}),this.map.length===0)return;let l=this.map.length;const s=[];for(;l>0;)l-=1,s.push(i.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),i.length=this.map[l][0];s.push(i.slice()),i.length=0;let u=s.pop();for(;u;){for(const o of u)i.push(o);u=s.pop()}this.map.length=0,this.index.clear()}};function mv(n,i,l,s,u){if(l===0&&s.length===0)return;const o=n.index.get(i);if(o){o[1]+=l,u?(s.push(...o[2]),o[2]=s):o[2].push(...s);return}const d=[i,l,s];n.map.push(d),n.index.set(i,d)}const kN={tokenize:wN},pv={tokenize:NN};function wN(n){const i=this,l=[];let s=0,u,o,d;return m;function m(I){if(s<l.length){const G=l[s];return i.containerState=G[1],n.attempt(G[0].continuation,p,g)(I)}return g(I)}function p(I){if(s++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,u&&D();const G=i.events.length;let ie=G,O;for(;ie--;)if(i.events[ie][0]==="exit"&&i.events[ie][1].type==="chunkFlow"){O=i.events[ie][1].end;break}E(s);let R=G;for(;R<i.events.length;)i.events[R][1].end={...O},R++;const V=new Ro;return V.add(ie+1,0,i.events.slice(G)),V.add(G,R-G,[]),V.consume(i.events),g(I)}return m(I)}function g(I){if(s===l.length){if(!u)return S(I);if(u.currentConstruct&&u.currentConstruct.concrete)return k(I);i.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return i.containerState={},n.check(pv,x,y)(I)}function x(I){return u&&D(),E(s),S(I)}function y(I){return i.parser.lazy[i.now().line]=s!==l.length,d=i.now().offset,k(I)}function S(I){return i.containerState={},n.attempt(pv,b,k)(I)}function b(I){return s++,l.push([i.currentConstruct,i.containerState]),S(I)}function k(I){if(I===null){u&&D(),E(0),n.consume(I);return}return u=u||i.parser.flow(i.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:o}),C(I)}function C(I){if(I===null){T(n.exit("chunkFlow"),!0),E(0),n.consume(I);return}return Ye(I)?(n.consume(I),T(n.exit("chunkFlow")),s=0,i.interrupt=void 0,m):(n.consume(I),C)}function T(I,G){const ie=i.sliceStream(I);if(G&&ie.push(null),I.previous=o,o&&(o.next=I),o=I,u.defineSkip(I.start),u.write(ie),i.parser.lazy[I.start.line]){let O=u.events.length;for(;O--;)if(u.events[O][1].start.offset<d&&(!u.events[O][1].end||u.events[O][1].end.offset>d))return;const R=i.events.length;let V=R,ae,H;for(;V--;)if(i.events[V][0]==="exit"&&i.events[V][1].type==="chunkFlow"){if(ae){H=i.events[V][1].end;break}ae=!0}for(E(s),O=R;O<i.events.length;)i.events[O][1].end={...H},O++;const U=new Ro;U.add(V+1,0,i.events.slice(R)),U.add(R,O-R,[]),U.consume(i.events)}}function E(I){let G=l.length;for(;G-- >I;){const ie=l[G];i.containerState=ie[1],ie[0].exit.call(i,n)}l.length=I}function D(){u.write([null]),o=void 0,u=void 0,i.containerState._closeFlow=void 0}}function NN(n,i,l){return bt(n,n.attempt(this.parser.constructs.document,i,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fa(n){if(n===null||Lt(n)||Tl(n))return 1;if($s(n))return 2}function Qo(n,i,l){const s=[];let u=-1;for(;++u<n.length;){const o=n[u].resolveAll;o&&!s.includes(o)&&(i=o(i,l),s.push(o))}return i}const xh={name:"attention",resolveAll:CN,tokenize:jN};function CN(n,i){let l=-1,s;for(;++l<n.length;)if(n[l][0]==="enter"&&n[l][1].type==="attentionSequence"&&n[l][1]._close){let u=l;for(;u--;)if(n[u][0]==="exit"&&n[u][1].type==="attentionSequence"&&n[u][1]._open&&i.sliceSerialize(n[u][1]).charCodeAt(0)===i.sliceSerialize(n[l][1]).charCodeAt(0)){if((n[u][1]._close||n[l][1]._open)&&(n[l][1].end.offset-n[l][1].start.offset)%3&&!((n[u][1].end.offset-n[u][1].start.offset+n[l][1].end.offset-n[l][1].start.offset)%3))continue;const o=n[u][1].end.offset-n[u][1].start.offset>1&&n[l][1].end.offset-n[l][1].start.offset>1?2:1,d={...n[u][1].end},m={...n[l][1].start};gv(d,-o),gv(m,o);const p={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...n[u][1].end}},g={type:o>1?"strongSequence":"emphasisSequence",start:{...n[l][1].start},end:m},x={type:o>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[l][1].start}},y={type:o>1?"strong":"emphasis",start:{...p.start},end:{...g.end}};n[u][1].end={...p.start},n[l][1].start={...g.end},s=[],n[u][1].end.offset-n[u][1].start.offset&&(s=di(s,[["enter",n[u][1],i],["exit",n[u][1],i]])),s=di(s,[["enter",y,i],["enter",p,i],["exit",p,i],["enter",x,i]]),s=di(s,Qo(i.parser.constructs.insideSpan.null,n.slice(u+1,l),i)),s=di(s,[["exit",x,i],["enter",g,i],["exit",g,i],["exit",y,i]]);let S=0;n[l][1].end.offset-n[l][1].start.offset&&(S=2,s=di(s,[["enter",n[l][1],i],["exit",n[l][1],i]])),ji(n,u-1,l-u+3,s),l=u+s.length-S-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function jN(n,i){const l=this.parser.constructs.attentionMarkers.null,s=this.previous,u=Fa(s);let o;return d;function d(p){return o=p,n.enter("attentionSequence"),m(p)}function m(p){if(p===o)return n.consume(p),m;const g=n.exit("attentionSequence"),x=Fa(p),y=!x||x===2&&u||l.includes(p)&&p!==42&&p!==95,S=!u||u===2&&x||l.includes(s)&&s!==42&&s!==95;return g._open=!!(o===42?y:y&&(u||!S)),g._close=!!(o===42?S:S&&(x||!y)),i(p)}}function gv(n,i){n.column+=i,n.offset+=i,n._bufferIndex+=i}const EN={name:"autolink",tokenize:_N};function _N(n,i,l){let s=0;return u;function u(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),o}function o(b){return bn(b)?(n.consume(b),d):b===64?l(b):g(b)}function d(b){return b===43||b===45||b===46||Sn(b)?(s=1,m(b)):g(b)}function m(b){return b===58?(n.consume(b),s=0,p):(b===43||b===45||b===46||Sn(b))&&s++<32?(n.consume(b),m):(s=0,g(b))}function p(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):b===null||b===32||b===60||Mo(b)?l(b):(n.consume(b),p)}function g(b){return b===64?(n.consume(b),x):xN(b)?(n.consume(b),g):l(b)}function x(b){return Sn(b)?y(b):l(b)}function y(b){return b===46?(n.consume(b),s=0,x):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):S(b)}function S(b){if((b===45||Sn(b))&&s++<63){const k=b===45?S:y;return n.consume(b),k}return l(b)}}const Zs={partial:!0,tokenize:TN};function TN(n,i,l){return s;function s(o){return rt(o)?bt(n,u,"linePrefix")(o):u(o)}function u(o){return o===null||Ye(o)?i(o):l(o)}}const Pb={continuation:{tokenize:zN},exit:ON,name:"blockQuote",tokenize:AN};function AN(n,i,l){const s=this;return u;function u(d){if(d===62){const m=s.containerState;return m.open||(n.enter("blockQuote",{_container:!0}),m.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(d),n.exit("blockQuoteMarker"),o}return l(d)}function o(d){return rt(d)?(n.enter("blockQuotePrefixWhitespace"),n.consume(d),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),i):(n.exit("blockQuotePrefix"),i(d))}}function zN(n,i,l){const s=this;return u;function u(d){return rt(d)?bt(n,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):o(d)}function o(d){return n.attempt(Pb,i,l)(d)}}function ON(n){n.exit("blockQuote")}const Jb={name:"characterEscape",tokenize:DN};function DN(n,i,l){return s;function s(o){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(o),n.exit("escapeMarker"),u}function u(o){return Fb(o)?(n.enter("characterEscapeValue"),n.consume(o),n.exit("characterEscapeValue"),n.exit("characterEscape"),i):l(o)}}const Wb={name:"characterReference",tokenize:MN};function MN(n,i,l){const s=this;let u=0,o,d;return m;function m(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),p}function p(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),g):(n.enter("characterReferenceValue"),o=31,d=Sn,x(y))}function g(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),o=6,d=vN,x):(n.enter("characterReferenceValue"),o=7,d=yh,x(y))}function x(y){if(y===59&&u){const S=n.exit("characterReferenceValue");return d===Sn&&!lm(s.sliceSerialize(S))?l(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),i)}return d(y)&&u++<o?(n.consume(y),x):l(y)}}const vh={partial:!0,tokenize:RN};function RN(n,i,l){const s=this;return u;function u(d){return d===null?l(d):(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),o)}function o(d){return s.parser.lazy[s.now().line]?l(d):i(d)}}const yv={concrete:!0,name:"codeFenced",tokenize:LN};function LN(n,i,l){const s=this,u={partial:!0,tokenize:ie};let o=0,d=0,m;return p;function p(O){return g(O)}function g(O){const R=s.events[s.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,m=O,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),x(O)}function x(O){return O===m?(d++,n.consume(O),x):d<3?l(O):(n.exit("codeFencedFenceSequence"),rt(O)?bt(n,y,"whitespace")(O):y(O))}function y(O){return O===null||Ye(O)?(n.exit("codeFencedFence"),s.interrupt?i(O):n.check(vh,C,G)(O)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||Ye(O)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(O)):rt(O)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),bt(n,b,"whitespace")(O)):O===96&&O===m?l(O):(n.consume(O),S)}function b(O){return O===null||Ye(O)?y(O):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||Ye(O)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(O)):O===96&&O===m?l(O):(n.consume(O),k)}function C(O){return n.attempt(u,G,T)(O)}function T(O){return n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),E}function E(O){return o>0&&rt(O)?bt(n,D,"linePrefix",o+1)(O):D(O)}function D(O){return O===null||Ye(O)?n.check(vh,C,G)(O):(n.enter("codeFlowValue"),I(O))}function I(O){return O===null||Ye(O)?(n.exit("codeFlowValue"),D(O)):(n.consume(O),I)}function G(O){return n.exit("codeFenced"),i(O)}function ie(O,R,V){let ae=0;return H;function H(ce){return O.enter("lineEnding"),O.consume(ce),O.exit("lineEnding"),U}function U(ce){return O.enter("codeFencedFence"),rt(ce)?bt(O,P,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):P(ce)}function P(ce){return ce===m?(O.enter("codeFencedFenceSequence"),ee(ce)):V(ce)}function ee(ce){return ce===m?(ae++,O.consume(ce),ee):ae>=d?(O.exit("codeFencedFenceSequence"),rt(ce)?bt(O,ge,"whitespace")(ce):ge(ce)):V(ce)}function ge(ce){return ce===null||Ye(ce)?(O.exit("codeFencedFence"),R(ce)):V(ce)}}}const Id={name:"codeIndented",tokenize:IN},BN={partial:!0,tokenize:UN};function IN(n,i,l){return s;function s(m){return n.enter("codeIndented"),Kb(n,u,l,"linePrefix",4,4)(m)}function u(m){return m===null?d(m):Ye(m)?n.attempt(BN,u,d)(m):(n.enter("codeFlowValue"),o(m))}function o(m){return m===null||Ye(m)?(n.exit("codeFlowValue"),u(m)):(n.consume(m),o)}function d(m){return n.exit("codeIndented"),i(m)}}function UN(n,i,l){const s=this;return u;function u(d){return s.parser.lazy[s.now().line]?l(d):Ye(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),u):Kb(n,i,o,"linePrefix",4,4)(d)}function o(d){return Ye(d)?u(d):l(d)}}const HN={name:"codeText",previous:VN,resolve:qN,tokenize:$N};function qN(n){let i=n.length-4,l=3,s,u;if((n[l][1].type==="lineEnding"||n[l][1].type==="space")&&(n[i][1].type==="lineEnding"||n[i][1].type==="space")){for(s=l;++s<i;)if(n[s][1].type==="codeTextData"){n[l][1].type="codeTextPadding",n[i][1].type="codeTextPadding",l+=2,i-=2;break}}for(s=l-1,i++;++s<=i;)u===void 0?s!==i&&n[s][1].type!=="lineEnding"&&(u=s):(s===i||n[s][1].type==="lineEnding")&&(n[u][1].type="codeTextData",s!==u+2&&(n[u][1].end=n[s-1][1].end,n.splice(u+2,s-u-2),i-=s-u-2,s=u+2),u=void 0);return n}function VN(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $N(n,i,l){let s=0,u,o;return d;function d(y){return n.enter("codeText"),n.enter("codeTextSequence"),m(y)}function m(y){return y===96?(n.consume(y),s++,m):(n.exit("codeTextSequence"),p(y))}function p(y){return y===null?l(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),p):y===96?(o=n.enter("codeTextSequence"),u=0,x(y)):Ye(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),p):(n.enter("codeTextData"),g(y))}function g(y){return y===null||y===32||y===96||Ye(y)?(n.exit("codeTextData"),p(y)):(n.consume(y),g)}function x(y){return y===96?(n.consume(y),u++,x):u===s?(n.exit("codeTextSequence"),n.exit("codeText"),i(y)):(o.type="codeTextData",g(y))}}class ZN{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,l){const s=l??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(i,s):i>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(i,l,s){const u=l||0;this.setCursor(Math.trunc(i));const o=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return s&&Cs(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Cs(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Cs(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const l=this.left.splice(i,Number.POSITIVE_INFINITY);Cs(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Cs(this.left,l.reverse())}}}function Cs(n,i){let l=0;if(i.length<1e4)n.push(...i);else for(;l<i.length;)n.push(...i.slice(l,l+1e4)),l+=1e4}function e1(n){const i={};let l=-1,s,u,o,d,m,p,g;const x=new ZN(n);for(;++l<x.length;){for(;l in i;)l=i[l];if(s=x.get(l),l&&s[1].type==="chunkFlow"&&x.get(l-1)[1].type==="listItemPrefix"&&(p=s[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(i,YN(x,l)),l=i[l],g=!0);else if(s[1]._container){for(o=l,u=void 0;o--;)if(d=x.get(o),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(u&&(x.get(u)[1].type="lineEndingBlank"),d[1].type="lineEnding",u=o);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;u&&(s[1].end={...x.get(u)[1].start},m=x.slice(u,l),m.unshift(s),x.splice(u,l-u+1,m))}}return ji(n,0,Number.POSITIVE_INFINITY,x.slice(0)),!g}function YN(n,i){const l=n.get(i)[1],s=n.get(i)[2];let u=i-1;const o=[];let d=l._tokenizer;d||(d=s.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const m=d.events,p=[],g={};let x,y,S=-1,b=l,k=0,C=0;const T=[C];for(;b;){for(;n.get(++u)[1]!==b;);o.push(u),b._tokenizer||(x=s.sliceStream(b),b.next||x.push(null),y&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(x),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=l;++S<m.length;)m[S][0]==="exit"&&m[S-1][0]==="enter"&&m[S][1].type===m[S-1][1].type&&m[S][1].start.line!==m[S][1].end.line&&(C=S+1,T.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),S=T.length;S--;){const E=m.slice(T[S],T[S+1]),D=o.pop();p.push([D,D+E.length-1]),n.splice(D,2,E)}for(p.reverse(),S=-1;++S<p.length;)g[k+p[S][0]]=k+p[S][1],k+=p[S][1]-p[S][0]-1;return g}const GN={resolve:XN,tokenize:FN},QN={partial:!0,tokenize:KN};function XN(n){return e1(n),n}function FN(n,i){let l;return s;function s(m){return n.enter("content"),l=n.enter("chunkContent",{contentType:"content"}),u(m)}function u(m){return m===null?o(m):Ye(m)?n.check(QN,d,o)(m):(n.consume(m),u)}function o(m){return n.exit("chunkContent"),n.exit("content"),i(m)}function d(m){return n.consume(m),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,u}}function KN(n,i,l){const s=this;return u;function u(d){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),bt(n,o,"linePrefix")}function o(d){if(d===null||Ye(d))return l(d);const m=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?i(d):n.interrupt(s.parser.constructs.flow,l,i)(d)}}function t1(n,i,l,s,u,o,d,m,p){const g=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(E){return E===60?(n.enter(s),n.enter(u),n.enter(o),n.consume(E),n.exit(o),S):E===null||E===32||E===41||Mo(E)?l(E):(n.enter(s),n.enter(d),n.enter(m),n.enter("chunkString",{contentType:"string"}),C(E))}function S(E){return E===62?(n.enter(o),n.consume(E),n.exit(o),n.exit(u),n.exit(s),i):(n.enter(m),n.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(n.exit("chunkString"),n.exit(m),S(E)):E===null||E===60||Ye(E)?l(E):(n.consume(E),E===92?k:b)}function k(E){return E===60||E===62||E===92?(n.consume(E),b):b(E)}function C(E){return!x&&(E===null||E===41||Lt(E))?(n.exit("chunkString"),n.exit(m),n.exit(d),n.exit(s),i(E)):x<g&&E===40?(n.consume(E),x++,C):E===41?(n.consume(E),x--,C):E===null||E===32||E===40||Mo(E)?l(E):(n.consume(E),E===92?T:C)}function T(E){return E===40||E===41||E===92?(n.consume(E),C):C(E)}}function n1(n,i,l,s,u,o){const d=this;let m=0,p;return g;function g(b){return n.enter(s),n.enter(u),n.consume(b),n.exit(u),n.enter(o),x}function x(b){return m>999||b===null||b===91||b===93&&!p||b===94&&!m&&"_hiddenFootnoteSupport"in d.parser.constructs?l(b):b===93?(n.exit(o),n.enter(u),n.consume(b),n.exit(u),n.exit(s),i):Ye(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),x):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Ye(b)||m++>999?(n.exit("chunkString"),x(b)):(n.consume(b),p||(p=!rt(b)),b===92?S:y)}function S(b){return b===91||b===92||b===93?(n.consume(b),m++,y):y(b)}}function i1(n,i,l,s,u,o){let d;return m;function m(S){return S===34||S===39||S===40?(n.enter(s),n.enter(u),n.consume(S),n.exit(u),d=S===40?41:S,p):l(S)}function p(S){return S===d?(n.enter(u),n.consume(S),n.exit(u),n.exit(s),i):(n.enter(o),g(S))}function g(S){return S===d?(n.exit(o),p(d)):S===null?l(S):Ye(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),bt(n,g,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===d||S===null||Ye(S)?(n.exit("chunkString"),g(S)):(n.consume(S),S===92?y:x)}function y(S){return S===d||S===92?(n.consume(S),x):x(S)}}function As(n,i){let l;return s;function s(u){return Ye(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),l=!0,s):rt(u)?bt(n,s,l?"linePrefix":"lineSuffix")(u):i(u)}}const PN={name:"definition",tokenize:WN},JN={partial:!0,tokenize:eC};function WN(n,i,l){const s=this;let u;return o;function o(b){return n.enter("definition"),d(b)}function d(b){return n1.call(s,n,m,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function m(b){return u=Ei(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),p):l(b)}function p(b){return Lt(b)?As(n,g)(b):g(b)}function g(b){return t1(n,x,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function x(b){return n.attempt(JN,y,y)(b)}function y(b){return rt(b)?bt(n,S,"whitespace")(b):S(b)}function S(b){return b===null||Ye(b)?(n.exit("definition"),s.parser.defined.push(u),i(b)):l(b)}}function eC(n,i,l){return s;function s(m){return Lt(m)?As(n,u)(m):l(m)}function u(m){return i1(n,o,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(m)}function o(m){return rt(m)?bt(n,d,"whitespace")(m):d(m)}function d(m){return m===null||Ye(m)?i(m):l(m)}}const tC={name:"hardBreakEscape",tokenize:nC};function nC(n,i,l){return s;function s(o){return n.enter("hardBreakEscape"),n.consume(o),u}function u(o){return Ye(o)?(n.exit("hardBreakEscape"),i(o)):l(o)}}const iC={name:"headingAtx",resolve:aC,tokenize:lC};function aC(n,i){let l=n.length-2,s=3;if(n[s][1].type==="whitespace"&&(s+=2),l-2>s&&n[l][1].type==="whitespace"&&(l-=2),n[l][1].type==="atxHeadingSequence"&&(s===l-1||l-4>s&&n[l-2][1].type==="whitespace")&&(l-=s+1===l?2:4),l>s){const u={type:"atxHeadingText",start:n[s][1].start,end:n[l][1].end},o={type:"chunkText",start:n[s][1].start,end:n[l][1].end,contentType:"text"};ji(n,s,l-s+1,[["enter",u,i],["enter",o,i],["exit",o,i],["exit",u,i]])}return n}function lC(n,i,l){let s=0;return u;function u(x){return n.enter("atxHeading"),o(x)}function o(x){return n.enter("atxHeadingSequence"),d(x)}function d(x){return x===35&&s++<6?(n.consume(x),d):x===null||Lt(x)?(n.exit("atxHeadingSequence"),m(x)):l(x)}function m(x){return x===35?(n.enter("atxHeadingSequence"),p(x)):x===null||Ye(x)?(n.exit("atxHeading"),i(x)):rt(x)?bt(n,m,"whitespace")(x):(n.enter("atxHeadingText"),g(x))}function p(x){return x===35?(n.consume(x),p):(n.exit("atxHeadingSequence"),m(x))}function g(x){return x===null||x===35||Lt(x)?(n.exit("atxHeadingText"),m(x)):(n.consume(x),g)}}const a1=["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"],bh=["pre","script","style","textarea"],rC={concrete:!0,name:"htmlFlow",resolveTo:uC,tokenize:oC},sC={partial:!0,tokenize:cC};function uC(n){let i=n.length;for(;i--&&!(n[i][0]==="enter"&&n[i][1].type==="htmlFlow"););return i>1&&n[i-2][1].type==="linePrefix"&&(n[i][1].start=n[i-2][1].start,n[i+1][1].start=n[i-2][1].start,n.splice(i-2,2)),n}function oC(n,i,l){const s=this;let u,o,d,m,p;return g;function g(_){return x(_)}function x(_){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(_),y}function y(_){return _===33?(n.consume(_),S):_===47?(n.consume(_),o=!0,C):_===63?(n.consume(_),u=3,s.interrupt?i:j):bn(_)?(n.consume(_),d=String.fromCharCode(_),T):l(_)}function S(_){return _===45?(n.consume(_),u=2,b):_===91?(n.consume(_),u=5,m=0,k):bn(_)?(n.consume(_),u=4,s.interrupt?i:j):l(_)}function b(_){return _===45?(n.consume(_),s.interrupt?i:j):l(_)}function k(_){const A="CDATA[";return _===A.charCodeAt(m++)?(n.consume(_),m===A.length?s.interrupt?i:P:k):l(_)}function C(_){return bn(_)?(n.consume(_),d=String.fromCharCode(_),T):l(_)}function T(_){if(_===null||_===47||_===62||Lt(_)){const A=_===47,te=d.toLowerCase();return!A&&!o&&bh.includes(te)?(u=1,s.interrupt?i(_):P(_)):a1.includes(d.toLowerCase())?(u=6,A?(n.consume(_),E):s.interrupt?i(_):P(_)):(u=7,s.interrupt&&!s.parser.lazy[s.now().line]?l(_):o?D(_):I(_))}return _===45||Sn(_)?(n.consume(_),d+=String.fromCharCode(_),T):l(_)}function E(_){return _===62?(n.consume(_),s.interrupt?i:P):l(_)}function D(_){return rt(_)?(n.consume(_),D):H(_)}function I(_){return _===47?(n.consume(_),H):_===58||_===95||bn(_)?(n.consume(_),G):rt(_)?(n.consume(_),I):H(_)}function G(_){return _===45||_===46||_===58||_===95||Sn(_)?(n.consume(_),G):ie(_)}function ie(_){return _===61?(n.consume(_),O):rt(_)?(n.consume(_),ie):I(_)}function O(_){return _===null||_===60||_===61||_===62||_===96?l(_):_===34||_===39?(n.consume(_),p=_,R):rt(_)?(n.consume(_),O):V(_)}function R(_){return _===p?(n.consume(_),p=null,ae):_===null||Ye(_)?l(_):(n.consume(_),R)}function V(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Lt(_)?ie(_):(n.consume(_),V)}function ae(_){return _===47||_===62||rt(_)?I(_):l(_)}function H(_){return _===62?(n.consume(_),U):l(_)}function U(_){return _===null||Ye(_)?P(_):rt(_)?(n.consume(_),U):l(_)}function P(_){return _===45&&u===2?(n.consume(_),F):_===60&&u===1?(n.consume(_),ue):_===62&&u===4?(n.consume(_),je):_===63&&u===3?(n.consume(_),j):_===93&&u===5?(n.consume(_),ke):Ye(_)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(sC,Ne,ee)(_)):_===null||Ye(_)?(n.exit("htmlFlowData"),ee(_)):(n.consume(_),P)}function ee(_){return n.check(vh,ge,Ne)(_)}function ge(_){return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),ce}function ce(_){return _===null||Ye(_)?ee(_):(n.enter("htmlFlowData"),P(_))}function F(_){return _===45?(n.consume(_),j):P(_)}function ue(_){return _===47?(n.consume(_),d="",fe):P(_)}function fe(_){if(_===62){const A=d.toLowerCase();return bh.includes(A)?(n.consume(_),je):P(_)}return bn(_)&&d.length<8?(n.consume(_),d+=String.fromCharCode(_),fe):P(_)}function ke(_){return _===93?(n.consume(_),j):P(_)}function j(_){return _===62?(n.consume(_),je):_===45&&u===2?(n.consume(_),j):P(_)}function je(_){return _===null||Ye(_)?(n.exit("htmlFlowData"),Ne(_)):(n.consume(_),je)}function Ne(_){return n.exit("htmlFlow"),i(_)}}function cC(n,i,l){return s;function s(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Zs,i,l)}}const fC={name:"htmlText",tokenize:dC};function dC(n,i,l){const s=this;let u,o,d;return m;function m(j){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(j),p}function p(j){return j===33?(n.consume(j),g):j===47?(n.consume(j),ie):j===63?(n.consume(j),I):bn(j)?(n.consume(j),V):l(j)}function g(j){return j===45?(n.consume(j),x):j===91?(n.consume(j),o=0,k):bn(j)?(n.consume(j),D):l(j)}function x(j){return j===45?(n.consume(j),b):l(j)}function y(j){return j===null?l(j):j===45?(n.consume(j),S):Ye(j)?(d=y,ue(j)):(n.consume(j),y)}function S(j){return j===45?(n.consume(j),b):y(j)}function b(j){return j===62?F(j):j===45?S(j):y(j)}function k(j){const je="CDATA[";return j===je.charCodeAt(o++)?(n.consume(j),o===je.length?C:k):l(j)}function C(j){return j===null?l(j):j===93?(n.consume(j),T):Ye(j)?(d=C,ue(j)):(n.consume(j),C)}function T(j){return j===93?(n.consume(j),E):C(j)}function E(j){return j===62?F(j):j===93?(n.consume(j),E):C(j)}function D(j){return j===null||j===62?F(j):Ye(j)?(d=D,ue(j)):(n.consume(j),D)}function I(j){return j===null?l(j):j===63?(n.consume(j),G):Ye(j)?(d=I,ue(j)):(n.consume(j),I)}function G(j){return j===62?F(j):I(j)}function ie(j){return bn(j)?(n.consume(j),O):l(j)}function O(j){return j===45||Sn(j)?(n.consume(j),O):R(j)}function R(j){return Ye(j)?(d=R,ue(j)):rt(j)?(n.consume(j),R):F(j)}function V(j){return j===45||Sn(j)?(n.consume(j),V):j===47||j===62||Lt(j)?ae(j):l(j)}function ae(j){return j===47?(n.consume(j),F):j===58||j===95||bn(j)?(n.consume(j),H):Ye(j)?(d=ae,ue(j)):rt(j)?(n.consume(j),ae):F(j)}function H(j){return j===45||j===46||j===58||j===95||Sn(j)?(n.consume(j),H):U(j)}function U(j){return j===61?(n.consume(j),P):Ye(j)?(d=U,ue(j)):rt(j)?(n.consume(j),U):ae(j)}function P(j){return j===null||j===60||j===61||j===62||j===96?l(j):j===34||j===39?(n.consume(j),u=j,ee):Ye(j)?(d=P,ue(j)):rt(j)?(n.consume(j),P):(n.consume(j),ge)}function ee(j){return j===u?(n.consume(j),u=void 0,ce):j===null?l(j):Ye(j)?(d=ee,ue(j)):(n.consume(j),ee)}function ge(j){return j===null||j===34||j===39||j===60||j===61||j===96?l(j):j===47||j===62||Lt(j)?ae(j):(n.consume(j),ge)}function ce(j){return j===47||j===62||Lt(j)?ae(j):l(j)}function F(j){return j===62?(n.consume(j),n.exit("htmlTextData"),n.exit("htmlText"),i):l(j)}function ue(j){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),fe}function fe(j){return rt(j)?bt(n,ke,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ke(j)}function ke(j){return n.enter("htmlTextData"),d(j)}}const rm={name:"labelEnd",resolveAll:gC,resolveTo:yC,tokenize:xC},hC={tokenize:vC},mC={tokenize:bC},pC={tokenize:SC};function gC(n){let i=-1;const l=[];for(;++i<n.length;){const s=n[i][1];if(l.push(n[i]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const u=s.type==="labelImage"?4:2;s.type="data",i+=u}}return n.length!==l.length&&ji(n,0,n.length,l),n}function yC(n,i){let l=n.length,s=0,u,o,d;for(;l--;){const x=n[l][1];if(u){if(x.type==="link"||x.type==="labelLink"&&x._inactive)break;n[l][0]==="enter"&&x.type==="labelLink"&&(x._inactive=!0)}else if(o){if(n[l][0]==="enter"&&(x.type==="labelImage"||x.type==="labelLink")&&!x._balanced&&(u=l,x.type!=="labelLink")){s=2;break}}else x.type==="labelEnd"&&(o=l)}const m={type:n[u][1].type==="labelLink"?"link":"image",start:{...n[u][1].start},end:{...n[n.length-1][1].end}},p={type:"label",start:{...n[u][1].start},end:{...n[o][1].end}},g={type:"labelText",start:{...n[u+s+2][1].end},end:{...n[o-2][1].start}};return d=[["enter",m,i],["enter",p,i]],d=di(d,n.slice(u+1,u+s+3)),d=di(d,[["enter",g,i]]),d=di(d,Qo(i.parser.constructs.insideSpan.null,n.slice(u+s+4,o-3),i)),d=di(d,[["exit",g,i],n[o-2],n[o-1],["exit",p,i]]),d=di(d,n.slice(o+1)),d=di(d,[["exit",m,i]]),ji(n,u,n.length,d),n}function xC(n,i,l){const s=this,u=s._labelStarts;let o,d;if(u){for(;u.length>0&&u[u.length-1]._balanced;)u.pop();o=u[u.length-1]}return m;function m(S){return o?o._inactive?y(S):(d=s.parser.defined.includes(Ei(s.sliceSerialize({start:o.end,end:s.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(S),n.exit("labelMarker"),n.exit("labelEnd"),p):l(S)}function p(S){return S===40?n.attempt(hC,x,d?x:y)(S):S===91?n.attempt(mC,x,d?g:y)(S):d?x(S):y(S)}function g(S){return n.attempt(pC,x,y)(S)}function x(S){return u.pop(),i(S)}function y(S){return o._balanced=!0,l(S)}}function vC(n,i,l){return s;function s(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),u}function u(y){return Lt(y)?As(n,o)(y):o(y)}function o(y){return y===41?x(y):t1(n,d,m,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function d(y){return Lt(y)?As(n,p)(y):x(y)}function m(y){return l(y)}function p(y){return y===34||y===39||y===40?i1(n,g,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function g(y){return Lt(y)?As(n,x)(y):x(y)}function x(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),i):l(y)}}function bC(n,i,l){const s=this;return u;function u(m){return n1.call(s,n,o,d,"reference","referenceMarker","referenceString")(m)}function o(m){return s.parser.defined.includes(Ei(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?i(m):l(m)}function d(m){return l(m)}}function SC(n,i,l){return s;function s(o){return n.enter("reference"),n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),u}function u(o){return o===93?(n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),n.exit("reference"),i):l(o)}}const kC={name:"labelStartImage",resolveAll:rm.resolveAll,tokenize:wC};function wC(n,i,l){const s=this;let u;return o;function o(p){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(p),n.exit("labelImageMarker"),d}function d(p){return p===91?(n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),u=n.exit("labelImage"),m):l(p)}function m(p){return p===94&&"_hiddenFootnoteSupport"in s.parser.constructs?l(p):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(u),i(p))}}const NC={name:"labelStartLink",resolveAll:rm.resolveAll,tokenize:CC};function CC(n,i,l){const s=this;let u;return o;function o(m){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),u=n.exit("labelLink"),d}function d(m){return m===94&&"_hiddenFootnoteSupport"in s.parser.constructs?l(m):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(u),i(m))}}const Ud={name:"lineEnding",tokenize:jC};function jC(n,i){return l;function l(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),bt(n,i,"linePrefix")}}const No={name:"thematicBreak",tokenize:EC};function EC(n,i,l){let s=0,u;return o;function o(g){return n.enter("thematicBreak"),d(g)}function d(g){return u=g,m(g)}function m(g){return g===u?(n.enter("thematicBreakSequence"),p(g)):s>=3&&(g===null||Ye(g))?(n.exit("thematicBreak"),i(g)):l(g)}function p(g){return g===u?(n.consume(g),s++,p):(n.exit("thematicBreakSequence"),rt(g)?bt(n,m,"whitespace")(g):m(g))}}const Hn={continuation:{tokenize:zC},exit:DC,name:"list",tokenize:AC},_C={partial:!0,tokenize:MC},TC={partial:!0,tokenize:OC};function AC(n,i,l){const s=this,u=s.events[s.events.length-1];let o=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,d=0;return m;function m(b){const k=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:yh(b)){if(s.containerState.type||(s.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(No,l,g)(b):g(b);if(!s.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(b)}return l(b)}function p(b){return yh(b)&&++d<10?(n.consume(b),p):(!s.interrupt||d<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),g(b)):l(b)}function g(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,n.check(Zs,s.interrupt?l:x,n.attempt(_C,S,y))}function x(b){return s.containerState.initialBlankLine=!0,o++,S(b)}function y(b){return rt(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),S):l(b)}function S(b){return s.containerState.size=o+s.sliceSerialize(n.exit("listItemPrefix"),!0).length,i(b)}}function zC(n,i,l){const s=this;return s.containerState._closeFlow=void 0,n.check(Zs,u,o);function u(m){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,bt(n,i,"listItemIndent",s.containerState.size+1)(m)}function o(m){return s.containerState.furtherBlankLines||!rt(m)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,d(m)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,n.attempt(TC,i,d)(m))}function d(m){return s.containerState._closeFlow=!0,s.interrupt=void 0,bt(n,n.attempt(Hn,i,l),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m)}}function OC(n,i,l){const s=this;return bt(n,u,"listItemIndent",s.containerState.size+1);function u(o){const d=s.events[s.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===s.containerState.size?i(o):l(o)}}function DC(n){n.exit(this.containerState.type)}function MC(n,i,l){const s=this;return bt(n,u,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(o){const d=s.events[s.events.length-1];return!rt(o)&&d&&d[1].type==="listItemPrefixWhitespace"?i(o):l(o)}}const xv={name:"setextUnderline",resolveTo:RC,tokenize:LC};function RC(n,i){const l=new Ro;let s=n.length,u,o,d;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){u=s;break}n[s][1].type==="paragraph"&&(o=s)}else n[s][1].type==="content"&&l.add(s,1,[]),!d&&n[s][1].type==="definition"&&(d=s);const m={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[o][1].type="setextHeadingText",d?(l.add(o,0,[["enter",m,i]]),l.add(d+1,0,[["exit",n[u][1],i]]),n[u][1].end={...n[d][1].end}):n[u][1]=m,l.add(n.length,0,[["exit",m,i]]),l.consume(n),n}function LC(n,i,l){const s=this;let u;return o;function o(g){let x=s.events.length,y;for(;x--;)if(s.events[x][1].type!=="lineEnding"&&s.events[x][1].type!=="linePrefix"&&s.events[x][1].type!=="content"){y=s.events[x][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||y)?(n.enter("setextHeadingLine"),u=g,d(g)):l(g)}function d(g){return n.enter("setextHeadingLineSequence"),m(g)}function m(g){return g===u?(n.consume(g),m):(n.exit("setextHeadingLineSequence"),rt(g)?bt(n,p,"lineSuffix")(g):p(g))}function p(g){return g===null||Ye(g)?(n.exit("setextHeadingLine"),i(g)):l(g)}}const BC={tokenize:IC};function IC(n){const i=this,l=n.attempt(Zs,s,n.attempt(this.parser.constructs.flowInitial,u,bt(n,n.attempt(this.parser.constructs.flow,u,n.attempt(GN,u)),"linePrefix")));return l;function s(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),i.currentConstruct=void 0,l}function u(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i.currentConstruct=void 0,l}}const UC={resolveAll:r1()},HC=l1("string"),qC=l1("text");function l1(n){return{resolveAll:r1(n==="text"?VC:void 0),tokenize:i};function i(l){const s=this,u=this.parser.constructs[n],o=l.attempt(u,d,m);return d;function d(x){return g(x)?o(x):m(x)}function m(x){if(x===null){l.consume(x);return}return l.enter("data"),l.consume(x),p}function p(x){return g(x)?(l.exit("data"),o(x)):(l.consume(x),p)}function g(x){if(x===null)return!0;const y=u[x];let S=-1;if(y)for(;++S<y.length;){const b=y[S];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function r1(n){return i;function i(l,s){let u=-1,o;for(;++u<=l.length;)o===void 0?l[u]&&l[u][1].type==="data"&&(o=u,u++):(!l[u]||l[u][1].type!=="data")&&(u!==o+2&&(l[o][1].end=l[u-1][1].end,l.splice(o+2,u-o-2),u=o+2),o=void 0);return n?n(l,s):l}}function VC(n,i){const l=new Ro;let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const u=n[s-1][1],o=i.sliceStream(u);let d=o.length,m=-1,p=0,g;for(;d--;){const x=o[d];if(typeof x=="string"){for(m=x.length;x.charCodeAt(m-1)===32;)p++,m--;if(m)break;m=-1}else if(x===-2)g=!0,p++;else if(x!==-1){d++;break}}if(i._contentTypeTextTrailing&&s===n.length&&(p=0),p){const x={type:s===n.length||g||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:d?m:u.start._bufferIndex+m,_index:u.start._index+d,line:u.end.line,column:u.end.column-p,offset:u.end.offset-p},end:{...u.end}};u.end={...x.start},u.start.offset===u.end.offset?Object.assign(u,x):l.add(s,0,[["enter",x,i],["exit",x,i]])}s++}return l.consume(n),n}const $C={42:Hn,43:Hn,45:Hn,48:Hn,49:Hn,50:Hn,51:Hn,52:Hn,53:Hn,54:Hn,55:Hn,56:Hn,57:Hn,62:Pb},ZC={91:PN},YC={[-2]:Id,[-1]:Id,32:Id},GC={35:iC,42:No,45:[xv,No],60:rC,61:xv,95:No,96:yv,126:yv},QC={38:Wb,92:Jb},XC={[-5]:Ud,[-4]:Ud,[-3]:Ud,33:kC,38:Wb,42:xh,60:[EN,fC],91:NC,92:[tC,Jb],93:rm,95:xh,96:HN},FC={null:[xh,UC]},KC={null:[42,95]},PC={null:[]},JC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:KC,contentInitial:ZC,disable:PC,document:$C,flow:GC,flowInitial:YC,insideSpan:FC,string:QC,text:XC},Symbol.toStringTag,{value:"Module"}));function WC(n,i,l){let s={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const u={},o=[];let d=[],m=[];const p={attempt:R(ie),check:R(O),consume:D,enter:I,exit:G,interrupt:R(O,{interrupt:!0})},g={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:n,previous:null,sliceSerialize:S,sliceStream:b,write:y};let x=i.tokenize.call(g,p);return i.resolveAll&&o.push(i),g;function y(U){return d=di(d,U),T(),d[d.length-1]!==null?[]:(V(i,0),g.events=Qo(o,g.events,g),g.events)}function S(U,P){return tj(b(U),P)}function b(U){return ej(d,U)}function k(){const{_bufferIndex:U,_index:P,line:ee,column:ge,offset:ce}=s;return{_bufferIndex:U,_index:P,line:ee,column:ge,offset:ce}}function C(U){u[U.line]=U.column,H()}function T(){for(;s._index<d.length;){const U=d[s._index];if(typeof U=="string"){const P=s._index;for(s._bufferIndex<0&&(s._bufferIndex=0);s._index===P&&s._bufferIndex<U.length;)E(U.charCodeAt(s._bufferIndex))}else E(U)}}function E(U){x=x(U)}function D(U){Ye(U)?(s.line++,s.column=1,s.offset+=U===-3?2:1,H()):U!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===d[s._index].length&&(s._bufferIndex=-1,s._index++)),g.previous=U}function I(U,P){const ee=P||{};return ee.type=U,ee.start=k(),g.events.push(["enter",ee,g]),m.push(ee),ee}function G(U){const P=m.pop();return P.end=k(),g.events.push(["exit",P,g]),P}function ie(U,P){V(U,P.from)}function O(U,P){P.restore()}function R(U,P){return ee;function ee(ge,ce,F){let ue,fe,ke,j;return Array.isArray(ge)?Ne(ge):"tokenize"in ge?Ne([ge]):je(ge);function je(me){return we;function we(Q){const ye=Q!==null&&me[Q],Ee=Q!==null&&me.null,ve=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return Ne(ve)(Q)}}function Ne(me){return ue=me,fe=0,me.length===0?F:_(me[fe])}function _(me){return we;function we(Q){return j=ae(),ke=me,me.partial||(g.currentConstruct=me),me.name&&g.parser.constructs.disable.null.includes(me.name)?te():me.tokenize.call(P?Object.assign(Object.create(g),P):g,p,A,te)(Q)}}function A(me){return U(ke,j),ce}function te(me){return j.restore(),++fe<ue.length?_(ue[fe]):F}}}function V(U,P){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&ji(g.events,P,g.events.length-P,U.resolve(g.events.slice(P),g)),U.resolveTo&&(g.events=U.resolveTo(g.events,g))}function ae(){const U=k(),P=g.previous,ee=g.currentConstruct,ge=g.events.length,ce=Array.from(m);return{from:ge,restore:F};function F(){s=U,g.previous=P,g.currentConstruct=ee,g.events.length=ge,m=ce,H()}}function H(){s.line in u&&s.column<2&&(s.column=u[s.line],s.offset+=u[s.line]-1)}}function ej(n,i){const l=i.start._index,s=i.start._bufferIndex,u=i.end._index,o=i.end._bufferIndex;let d;if(l===u)d=[n[l].slice(s,o)];else{if(d=n.slice(l,u),s>-1){const m=d[0];typeof m=="string"?d[0]=m.slice(s):d.shift()}o>0&&d.push(n[u].slice(0,o))}return d}function tj(n,i){let l=-1;const s=[];let u;for(;++l<n.length;){const o=n[l];let d;if(typeof o=="string")d=o;else switch(o){case-5:{d="\r";break}case-4:{d=`
|
|
321
|
+
`;break}case-3:{d=`\r
|
|
322
|
+
`;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&u)continue;d=" ";break}default:d=String.fromCharCode(o)}u=o===-2,s.push(d)}return s.join("")}function nj(n){const s={constructs:Qb([JC,...(n||{}).extensions||[]]),content:u(bN),defined:[],document:u(kN),flow:u(BC),lazy:{},string:u(HC),text:u(qC)};return s;function u(o){return d;function d(m){return WC(s,o,m)}}}function ij(n){for(;!e1(n););return n}const vv=/[\0\t\n\r]/g;function aj(){let n=1,i="",l=!0,s;return u;function u(o,d,m){o=i+(typeof o=="string"?o.toString():new TextDecoder(d||void 0).decode(o));const p=[];let g=0;for(i="",l&&(o.charCodeAt(0)===65279&&g++,l=void 0);g<o.length;){vv.lastIndex=g;const x=vv.exec(o),y=x&&x.index!==void 0?x.index:o.length,S=o.charCodeAt(y);if(!x){i=o.slice(g);break}if(S===10&&g===y&&s)p.push(-3),s=void 0;else switch(s&&(p.push(-5),s=void 0),g<y&&(p.push(o.slice(g,y)),n+=y-g),S){case 0:{p.push(65533),n++;break}case 9:{const b=Math.ceil(n/4)*4;for(p.push(-2);n++<b;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:s=!0,n=1}g=y+1}return m&&(s&&p.push(-5),i&&p.push(i),p.push(null)),p}}const lj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rj(n){return n.replace(lj,sj)}function sj(n,i,l){if(i)return i;if(l.charCodeAt(0)===35){const u=l.charCodeAt(1),o=u===120||u===88;return Xb(l.slice(o?2:1),o?16:10)}return lm(l)||n}const s1={}.hasOwnProperty;function uj(n,i,l){return i&&typeof i=="object"&&(l=i,i=void 0),oj(l)(ij(nj(l).document().write(aj()(n,i,!0))))}function oj(n){const i={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:d(at),autolinkProtocol:H,autolinkEmail:H,atxHeading:d(Ge),blockQuote:d(ve),characterEscape:H,characterReference:H,codeFenced:d(Z),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:d(Z,m),codeText:d(Re,m),codeTextData:H,data:H,codeFlowValue:H,definition:d(Se),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:d(Ke),hardBreakEscape:d(Le),hardBreakTrailing:d(Le),htmlFlow:d(ne,m),htmlFlowData:H,htmlText:d(ne,m),htmlTextData:H,image:d(Be),label:m,link:d(at),listItem:d(Ct),listItemValue:b,listOrdered:d(He,S),listUnordered:d(He),paragraph:d(qt),reference:A,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:d(Ge),strong:d(ln),thematicBreak:d(En)},exit:{atxHeading:g(),atxHeadingSequence:O,autolink:g(),autolinkEmail:Ee,autolinkProtocol:ye,blockQuote:g(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:we,characterReference:Q,codeFenced:g(E),codeFencedFence:T,codeFencedFenceInfo:k,codeFencedFenceMeta:C,codeFlowValue:U,codeIndented:g(D),codeText:g(F),codeTextData:U,data:U,definition:g(),definitionDestinationString:ie,definitionLabelString:I,definitionTitleString:G,emphasis:g(),hardBreakEscape:g(ee),hardBreakTrailing:g(ee),htmlFlow:g(ge),htmlFlowData:U,htmlText:g(ce),htmlTextData:U,image:g(fe),label:j,labelText:ke,lineEnding:P,link:g(ue),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:te,resourceDestinationString:je,resourceTitleString:Ne,resource:_,setextHeading:g(ae),setextHeadingLineSequence:V,setextHeadingText:R,strong:g(),thematicBreak:g()}};u1(i,(n||{}).mdastExtensions||[]);const l={};return s;function s(J){let de={type:"root",children:[],position:void 0};const _e={stack:[de],tokenStack:[],config:i,enter:p,exit:x,buffer:m,resume:y,data:l},L=[],he=[];let Te=-1;for(;++Te<J.length;)if(he.push(J[Te]),J[Te][1].type==="listOrdered"||J[Te][1].type==="listUnordered")if(J[Te][0]==="enter")L.push(he.length-1);else{const Fe=L.pop();o(he,Fe)}for(J=he,Te=-1;++Te<J.length;){const Fe=i[J[Te][0]];J[Te][0]==="enter"&&i.beforeEnter.length>0&&u(i.beforeEnter,{..._e,sliceSerialize:J[Te][2].sliceSerialize},J[Te][1]),s1.call(Fe,J[Te][1].type)&&Fe[J[Te][1].type].call({..._e,sliceSerialize:J[Te][2].sliceSerialize},J[Te][1]),J[Te][0]==="exit"&&i.afterExit.length>0&&u(i.afterExit,{..._e,sliceSerialize:J[Te][2].sliceSerialize},J[Te][1])}if(_e.tokenStack.length>0){const Fe=_e.tokenStack[_e.tokenStack.length-1];(Fe[1]||bv).call(_e,void 0,Fe[0])}for(de.position={start:Ua(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Ua(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Te=-1;++Te<i.transforms.length;)de=i.transforms[Te](de)||de;return de}function u(J,de,_e){let L=-1;for(;++L<J.length;)J[L].call(de,_e)}function o(J,de){const _e=J.length-1;let L=de-1,he=-1,Te=!1,Fe,wt,jt,Et;const Ze=[];for(;++L<=_e;){const gt=J[L];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?he++:he--,Et=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(Fe&&!Et&&!he&&!jt&&(jt=L),Et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Et=void 0}if(!he&>[0]==="enter"&>[1].type==="listItemPrefix"||he===-1&>[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(Fe){let Xt=L;for(wt=void 0;Xt--;){const Ft=J[Xt];if(Ft[1].type==="lineEnding"||Ft[1].type==="lineEndingBlank"){if(Ft[0]==="exit")continue;wt&&(J[wt][1].type="lineEndingBlank",Te=!0),Ft[1].type="lineEnding",wt=Xt}else if(!(Ft[1].type==="linePrefix"||Ft[1].type==="blockQuotePrefix"||Ft[1].type==="blockQuotePrefixWhitespace"||Ft[1].type==="blockQuoteMarker"||Ft[1].type==="listItemIndent"))break}jt&&(!wt||jt<wt)&&(Fe._spread=!0),Fe.end=Object.assign({},wt?J[wt][1].start:gt[1].end),Ze.push({at:wt||L,event:["exit",Fe,gt[2]]})}if(gt[1].type==="listItemPrefix"){const Xt={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};Fe=Xt,Ze.push({at:L,event:["enter",Xt,gt[2]]}),jt=void 0,Et=!0}}}const kn=J.splice(de);let ze=0;for(L=-1;++L<kn.length;){for(;ze<Ze.length&&Ze[ze].at===de+L;)J.push(Ze[ze++].event);J.push(kn[L])}J[de][1]._spread=Te}function d(J,de){return _e;function _e(L){p.call(this,J(L),L),de&&de.call(this,L)}}function m(){this.stack.push({type:"fragment",children:[]})}function p(J,de,_e){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([de,_e||void 0]),J.position={start:Ua(de.start),end:void 0}}function g(J){return de;function de(_e){J&&J.call(this,_e),x.call(this,_e)}}function x(J,de){const _e=this.stack.pop(),L=this.tokenStack.pop();if(!L)throw new Error("Cannot close `"+J.type+"` ("+Ts({start:J.start,end:J.end})+"): it’s not open");L[0].type!==J.type&&(de?de.call(this,J,L[0]):(L[1]||bv).call(this,J,L[0])),_e.position.end=Ua(J.end)}function y(){return Go(this.stack.pop())}function S(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function k(){const J=this.resume(),de=this.stack[this.stack.length-1];de.lang=J}function C(){const J=this.resume(),de=this.stack[this.stack.length-1];de.meta=J}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const J=this.resume(),de=this.stack[this.stack.length-1];de.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function D(){const J=this.resume(),de=this.stack[this.stack.length-1];de.value=J.replace(/(\r?\n|\r)$/g,"")}function I(J){const de=this.resume(),_e=this.stack[this.stack.length-1];_e.label=de,_e.identifier=Ei(this.sliceSerialize(J)).toLowerCase()}function G(){const J=this.resume(),de=this.stack[this.stack.length-1];de.title=J}function ie(){const J=this.resume(),de=this.stack[this.stack.length-1];de.url=J}function O(J){const de=this.stack[this.stack.length-1];if(!de.depth){const _e=this.sliceSerialize(J).length;de.depth=_e}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function V(J){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function H(J){const _e=this.stack[this.stack.length-1].children;let L=_e[_e.length-1];(!L||L.type!=="text")&&(L=St(),L.position={start:Ua(J.start),end:void 0},_e.push(L)),this.stack.push(L)}function U(J){const de=this.stack.pop();de.value+=this.sliceSerialize(J),de.position.end=Ua(J.end)}function P(J){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=de.children[de.children.length-1];_e.position.end=Ua(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(de.type)&&(H.call(this,J),U.call(this,J))}function ee(){this.data.atHardBreak=!0}function ge(){const J=this.resume(),de=this.stack[this.stack.length-1];de.value=J}function ce(){const J=this.resume(),de=this.stack[this.stack.length-1];de.value=J}function F(){const J=this.resume(),de=this.stack[this.stack.length-1];de.value=J}function ue(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=de,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function fe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=de,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ke(J){const de=this.sliceSerialize(J),_e=this.stack[this.stack.length-2];_e.label=rj(de),_e.identifier=Ei(de).toLowerCase()}function j(){const J=this.stack[this.stack.length-1],de=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const L=J.children;_e.children=L}else _e.alt=de}function je(){const J=this.resume(),de=this.stack[this.stack.length-1];de.url=J}function Ne(){const J=this.resume(),de=this.stack[this.stack.length-1];de.title=J}function _(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function te(J){const de=this.resume(),_e=this.stack[this.stack.length-1];_e.label=de,_e.identifier=Ei(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function me(J){this.data.characterReferenceType=J.type}function we(J){const de=this.sliceSerialize(J),_e=this.data.characterReferenceType;let L;_e?(L=Xb(de,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):L=lm(de);const he=this.stack[this.stack.length-1];he.value+=L}function Q(J){const de=this.stack.pop();de.position.end=Ua(J.end)}function ye(J){U.call(this,J);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(J)}function Ee(J){U.call(this,J);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(J)}function ve(){return{type:"blockquote",children:[],position:void 0}}function Z(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Re(){return{type:"inlineCode",value:"",position:void 0}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Ke(){return{type:"emphasis",children:[],position:void 0}}function Ge(){return{type:"heading",depth:0,children:[],position:void 0}}function Le(){return{type:"break",position:void 0}}function ne(){return{type:"html",value:"",position:void 0}}function Be(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function at(){return{type:"link",title:null,url:"",children:[],position:void 0}}function He(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[],position:void 0}}function Ct(J){return{type:"listItem",spread:J._spread,checked:null,children:[],position:void 0}}function qt(){return{type:"paragraph",children:[],position:void 0}}function ln(){return{type:"strong",children:[],position:void 0}}function St(){return{type:"text",value:"",position:void 0}}function En(){return{type:"thematicBreak",position:void 0}}}function Ua(n){return{line:n.line,column:n.column,offset:n.offset}}function u1(n,i){let l=-1;for(;++l<i.length;){const s=i[l];Array.isArray(s)?u1(n,s):cj(n,s)}}function cj(n,i){let l;for(l in i)if(s1.call(i,l))switch(l){case"canContainEols":{const s=i[l];s&&n[l].push(...s);break}case"transforms":{const s=i[l];s&&n[l].push(...s);break}case"afterExit":case"beforeEnter":{const s=i[l];s&&n[l].push(s);break}case"enter":case"exit":{const s=i[l];s&&Object.assign(n[l],s);break}}}function bv(n,i){throw n?new Error("Cannot close `"+n.type+"` ("+Ts({start:n.start,end:n.end})+"): a different token (`"+i.type+"`, "+Ts({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Ts({start:i.start,end:i.end})+") is still open")}function fj(n){const i=this;i.parser=l;function l(s){return uj(s,{...i.data("settings"),...n,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function dj(n,i){const l={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(i),!0)};return n.patch(i,l),n.applyData(i,l)}function hj(n,i){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(i,l),[n.applyData(i,l),{type:"text",value:`
|
|
323
|
+
`}]}function mj(n,i){const l=i.value?i.value+`
|
|
324
|
+
`:"",s={},u=i.lang?i.lang.split(/\s+/):[];u.length>0&&(s.className=["language-"+u[0]]);let o={type:"element",tagName:"code",properties:s,children:[{type:"text",value:l}]};return i.meta&&(o.data={meta:i.meta}),n.patch(i,o),o=n.applyData(i,o),o={type:"element",tagName:"pre",properties:{},children:[o]},n.patch(i,o),o}function pj(n,i){const l={type:"element",tagName:"del",properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}function gj(n,i){const l={type:"element",tagName:"em",properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}function yj(n,i){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=String(i.identifier).toUpperCase(),u=_r(s.toLowerCase()),o=n.footnoteOrder.indexOf(s);let d,m=n.footnoteCounts.get(s);m===void 0?(m=0,n.footnoteOrder.push(s),d=n.footnoteOrder.length):d=o+1,m+=1,n.footnoteCounts.set(s,m);const p={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+u,id:l+"fnref-"+u+(m>1?"-"+m:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};n.patch(i,p);const g={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(i,g),n.applyData(i,g)}function xj(n,i){const l={type:"element",tagName:"h"+i.depth,properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}function vj(n,i){if(n.options.allowDangerousHtml){const l={type:"raw",value:i.value};return n.patch(i,l),n.applyData(i,l)}}function o1(n,i){const l=i.referenceType;let s="]";if(l==="collapsed"?s+="[]":l==="full"&&(s+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+s}];const u=n.all(i),o=u[0];o&&o.type==="text"?o.value="["+o.value:u.unshift({type:"text",value:"["});const d=u[u.length-1];return d&&d.type==="text"?d.value+=s:u.push({type:"text",value:s}),u}function bj(n,i){const l=String(i.identifier).toUpperCase(),s=n.definitionById.get(l);if(!s)return o1(n,i);const u={src:_r(s.url||"")};i.alt!==null&&i.alt!==void 0&&(u.alt=i.alt),s.title!==null&&s.title!==void 0&&(u.title=s.title);const o={type:"element",tagName:"img",properties:u,children:[]};return n.patch(i,o),n.applyData(i,o)}function Sj(n,i){const l={src:_r(i.url)};i.alt!==null&&i.alt!==void 0&&(l.alt=i.alt),i.title!==null&&i.title!==void 0&&(l.title=i.title);const s={type:"element",tagName:"img",properties:l,children:[]};return n.patch(i,s),n.applyData(i,s)}function kj(n,i){const l={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};n.patch(i,l);const s={type:"element",tagName:"code",properties:{},children:[l]};return n.patch(i,s),n.applyData(i,s)}function wj(n,i){const l=String(i.identifier).toUpperCase(),s=n.definitionById.get(l);if(!s)return o1(n,i);const u={href:_r(s.url||"")};s.title!==null&&s.title!==void 0&&(u.title=s.title);const o={type:"element",tagName:"a",properties:u,children:n.all(i)};return n.patch(i,o),n.applyData(i,o)}function Nj(n,i){const l={href:_r(i.url)};i.title!==null&&i.title!==void 0&&(l.title=i.title);const s={type:"element",tagName:"a",properties:l,children:n.all(i)};return n.patch(i,s),n.applyData(i,s)}function Cj(n,i,l){const s=n.all(i),u=l?jj(l):c1(i),o={},d=[];if(typeof i.checked=="boolean"){const x=s[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},s.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let m=-1;for(;++m<s.length;){const x=s[m];(u||m!==0||x.type!=="element"||x.tagName!=="p")&&d.push({type:"text",value:`
|
|
325
|
+
`}),x.type==="element"&&x.tagName==="p"&&!u?d.push(...x.children):d.push(x)}const p=s[s.length-1];p&&(u||p.type!=="element"||p.tagName!=="p")&&d.push({type:"text",value:`
|
|
326
|
+
`});const g={type:"element",tagName:"li",properties:o,children:d};return n.patch(i,g),n.applyData(i,g)}function jj(n){let i=!1;if(n.type==="list"){i=n.spread||!1;const{children:l}=n;let s=-1;for(;!i&&++s<l.length;)i=c1(l[s])}return i}function c1(n){const{spread:i}=n;return i??n.children.length>1}function Ej(n,i){const l={},s=n.all(i);let u=-1;for(typeof i.start=="number"&&i.start!==1&&(l.start=i.start);++u<s.length;){const d=s[u];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const o={type:"element",tagName:i.ordered?"ol":"ul",properties:l,children:n.wrap(s,!0)};return n.patch(i,o),n.applyData(i,o)}function _j(n,i){const l={type:"element",tagName:"p",properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}function Tj(n,i){const l={type:"root",children:n.wrap(n.all(i))};return n.patch(i,l),n.applyData(i,l)}function Aj(n,i){const l={type:"element",tagName:"strong",properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}function zj(n,i){const l=n.all(i),s=l.shift(),u=[];if(s){const d={type:"element",tagName:"thead",properties:{},children:n.wrap([s],!0)};n.patch(i.children[0],d),u.push(d)}if(l.length>0){const d={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},m=tm(i.children[1]),p=Hb(i.children[i.children.length-1]);m&&p&&(d.position={start:m,end:p}),u.push(d)}const o={type:"element",tagName:"table",properties:{},children:n.wrap(u,!0)};return n.patch(i,o),n.applyData(i,o)}function Oj(n,i,l){const s=l?l.children:void 0,o=(s?s.indexOf(i):1)===0?"th":"td",d=l&&l.type==="table"?l.align:void 0,m=d?d.length:i.children.length;let p=-1;const g=[];for(;++p<m;){const y=i.children[p],S={},b=d?d[p]:void 0;b&&(S.align=b);let k={type:"element",tagName:o,properties:S,children:[]};y&&(k.children=n.all(y),n.patch(y,k),k=n.applyData(y,k)),g.push(k)}const x={type:"element",tagName:"tr",properties:{},children:n.wrap(g,!0)};return n.patch(i,x),n.applyData(i,x)}function Dj(n,i){const l={type:"element",tagName:"td",properties:{},children:n.all(i)};return n.patch(i,l),n.applyData(i,l)}const Sv=9,kv=32;function Mj(n){const i=String(n),l=/\r?\n|\r/g;let s=l.exec(i),u=0;const o=[];for(;s;)o.push(wv(i.slice(u,s.index),u>0,!0),s[0]),u=s.index+s[0].length,s=l.exec(i);return o.push(wv(i.slice(u),u>0,!1)),o.join("")}function wv(n,i,l){let s=0,u=n.length;if(i){let o=n.codePointAt(s);for(;o===Sv||o===kv;)s++,o=n.codePointAt(s)}if(l){let o=n.codePointAt(u-1);for(;o===Sv||o===kv;)u--,o=n.codePointAt(u-1)}return u>s?n.slice(s,u):""}function Rj(n,i){const l={type:"text",value:Mj(String(i.value))};return n.patch(i,l),n.applyData(i,l)}function Lj(n,i){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(i,l),n.applyData(i,l)}const Bj={blockquote:dj,break:hj,code:mj,delete:pj,emphasis:gj,footnoteReference:yj,heading:xj,html:vj,imageReference:bj,image:Sj,inlineCode:kj,linkReference:wj,link:Nj,listItem:Cj,list:Ej,paragraph:_j,root:Tj,strong:Aj,table:zj,tableCell:Dj,tableRow:Oj,text:Rj,thematicBreak:Lj,toml:xo,yaml:xo,definition:xo,footnoteDefinition:xo};function xo(){}const f1=-1,Xo=0,zs=1,Lo=2,sm=3,um=4,om=5,cm=6,d1=7,h1=8,{defineProperty:Ij}=Object,m1=typeof self=="object"?self:globalThis,Nv=(n,i)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new m1[n](i)},Uj=(n,i)=>{const l=(u,o)=>(n.set(o,u),u),s=u=>{if(n.has(u))return n.get(u);const[o,d]=i[u];switch(o){case Xo:case f1:return l(d,u);case zs:{const m=l([],u);for(const p of d)m.push(s(p));return m}case Lo:{const m=l({},u);for(const[p,g]of d){const x=s(p),y=s(g);x==="__proto__"?Ij(m,x,{value:y,configurable:!0,enumerable:!0,writable:!0}):m[x]=y}return m}case sm:return l(new Date(d),u);case um:{const{source:m,flags:p}=d;return l(new RegExp(m,p),u)}case om:{const m=l(new Map,u);for(const[p,g]of d)m.set(s(p),s(g));return m}case cm:{const m=l(new Set,u);for(const p of d)m.add(s(p));return m}case d1:{const{name:m,message:p}=d;return l(typeof m1[m]=="function"?Nv(m,p):new Error(p),u)}case h1:return l(BigInt(d),u);case"BigInt":return l(Object(BigInt(d)),u);case"ArrayBuffer":return l(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:m}=new Uint8Array(d);return l(new DataView(m),d)}case"-0":return-0}return l(Nv(o,d),u)};return s},Cv=n=>Uj(new Map,n)(0),Sl="",{toString:Hj}={},{keys:qj,is:Vj}=Object,js=n=>{const i=typeof n;if(i!=="object"||!n)return[Xo,i];const l=Hj.call(n).slice(8,-1);switch(l){case"Array":return[zs,Sl];case"Object":return[Lo,Sl];case"Date":return[sm,Sl];case"RegExp":return[um,Sl];case"Map":return[om,Sl];case"Set":return[cm,Sl];case"DataView":return[zs,l]}return l.includes("Array")?[zs,l]:n instanceof Error?[d1,n.name||"Error"]:[Lo,l]},vo=([n,i])=>n===Xo&&(i==="function"||i==="symbol"),$j=(n,i,l,s)=>{const u=(d,m)=>{const p=s.push(d)-1;return l.set(m,p),p},o=d=>{if(l.has(d))return l.get(d);let[m,p]=js(d);switch(m){case Xo:{let x=d;switch(p){case"bigint":m=h1,x=d.toString();break;case"number":if(!d&&Vj(d,-0))return s.push(["-0"])-1;break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return u([f1],d)}return u([m,x],d)}case zs:{if(p){let S=d;return p==="DataView"?S=new Uint8Array(d.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(d)),u([p,[...S]],d)}const x=[],y=u([m,x],d);for(const S of d)x.push(o(S));return y}case Lo:{if(p)switch(p){case"BigInt":return u([p,d.toString()],d);case"Boolean":case"Number":case"String":return u([p,d.valueOf()],d)}if(i&&"toJSON"in d)return o(d.toJSON());const x=[],y=u([m,x],d);for(const S of qj(d))(n||!vo(js(d[S])))&&x.push([o(S),o(d[S])]);return y}case sm:return u([m,isNaN(d.getTime())?Sl:d.toISOString()],d);case um:{const{source:x,flags:y}=d;return u([m,{source:x,flags:y}],d)}case om:{const x=[],y=u([m,x],d);for(const[S,b]of d)(n||!(vo(js(S))||vo(js(b))))&&x.push([o(S),o(b)]);return y}case cm:{const x=[],y=u([m,x],d);for(const S of d)(n||!vo(js(S)))&&x.push(o(S));return y}}const{message:g}=d;return u([m,{name:p,message:g}],d)};return o},jv=(n,{json:i,lossy:l}={})=>{const s=[];return $j(!(i||l),!!i,new Map,s)(n),s},Bo=typeof structuredClone=="function"?(n,i)=>i&&("json"in i||"lossy"in i)?Cv(jv(n,i)):structuredClone(n):(n,i)=>Cv(jv(n,i));function Zj(n,i){const l=[{type:"text",value:"↩"}];return i>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),l}function Yj(n,i){return"Back to reference "+(n+1)+(i>1?"-"+i:"")}function Gj(n){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||Zj,s=n.options.footnoteBackLabel||Yj,u=n.options.footnoteLabel||"Footnotes",o=n.options.footnoteLabelTagName||"h2",d=n.options.footnoteLabelProperties||{className:["sr-only"]},m=[],p=[];let g=-1;for(;++g<n.footnoteOrder.length;){const x=n.footnoteById.get(n.footnoteOrder[g]);x&&(m[g]=n.all(x))}for(g=-1;++g<n.footnoteOrder.length;){const x=n.footnoteById.get(n.footnoteOrder[g]);if(!x)continue;const y=m[g],S=String(x.identifier).toUpperCase(),b=_r(S.toLowerCase());let k=0;const C=[],T=n.footnoteCounts.get(S);for(;T!==void 0&&++k<=T;){C.length>0&&C.push({type:"text",value:" "});let I=typeof l=="string"?l:l(g,k);typeof I=="string"&&(I={type:"text",value:I}),C.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+b+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(g,k),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const E=y[y.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const I=E.children[E.children.length-1];I&&I.type==="text"?I.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...C)}else y.push(...C);const D={type:"element",tagName:"li",properties:{id:i+"fn-"+b},children:n.wrap(y,!0)};n.patch(x,D),p.push(D)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Bo(d),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
|
|
327
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(p,!0)},{type:"text",value:`
|
|
328
|
+
`}]}}const Fo=(function(n){if(n==null)return Kj;if(typeof n=="function")return Ko(n);if(typeof n=="object")return Array.isArray(n)?Qj(n):Xj(n);if(typeof n=="string")return Fj(n);throw new Error("Expected function, string, or object as test")});function Qj(n){const i=[];let l=-1;for(;++l<n.length;)i[l]=Fo(n[l]);return Ko(s);function s(...u){let o=-1;for(;++o<i.length;)if(i[o].apply(this,u))return!0;return!1}}function Xj(n){const i=n;return Ko(l);function l(s){const u=s;let o;for(o in n)if(u[o]!==i[o])return!1;return!0}}function Fj(n){return Ko(i);function i(l){return l&&l.type===n}}function Ko(n){return i;function i(l,s,u){return!!(Pj(l)&&n.call(this,l,typeof s=="number"?s:void 0,u||void 0))}}function Kj(){return!0}function Pj(n){return n!==null&&typeof n=="object"&&"type"in n}const p1=[],Jj=!0,Os=!1,Sh="skip";function kh(n,i,l,s){if(!n||typeof n!="object")throw new Error("Unexpected value `"+n+"` for `tree`, expected node");let u=!0,o,d,m,p;if(typeof l=="function"||l&&typeof l=="object"?(o=i,d=l,s&&(u=!1)):(d=i,l&&(u=!1)),typeof d=="function")m=d;else if(d&&typeof d=="object"){if(!(d.enter===null||d.enter===void 0))if(typeof d.enter=="function")m=d.enter;else throw new Error("Unexpected value `"+d.enter+"` for `visitors.enter`, expected optional visitor");if(typeof d.exit=="function")p=d.exit;else throw new Error("Unexpected value `"+d.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+d+"` for `enter` or `visitors`, expected visitor or object with visitors");const g=Fo(o),x=u?1:-1;y(n,void 0,[])();function y(S,b,k){const C=S&&typeof S=="object"?S:{};if(typeof C.type=="string"){const E=typeof C.tagName=="string"?C.tagName:typeof C.name=="string"?C.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(S.type+(E?"<"+E+">":""))+")"})}return T;function T(){const E=!o||g(S,b,k[k.length-1]||void 0);let D=p1;if(m&&E&&(D=Ev(m(S,k,b)),D[0]===Os))return D;if("children"in S&&S.children){const I=S;if(I.children&&D[0]!==Sh){let G=(u?-1:I.children.length)+x;const ie=[...k,I];for(;G>-1&&G<I.children.length;){const O=I.children[G],R=y(O,G,ie)();if(R[0]===Os)return R;G=typeof R[1]=="number"?R[1]:G+x}}}if(p&&E){const I=Ev(p(S,k,b));if(I[0]===Sh)throw new Error("Unexpected value `"+I[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(I[0]===Os||typeof I[1]=="number")return I}return D}}}function Ev(n){return Array.isArray(n)?n:typeof n=="number"?[Jj,n]:n==null?p1:[n]}function Po(n,i,l,s){let u,o,d;o=i,d=l,typeof o=="function"?kh(n,u,wh(o),d):kh(n,u,Wj(o),d)}function Wj(n){return!n||typeof n!="object"?n:{enter:typeof n.enter=="function"?wh(n.enter):n.enter,exit:typeof n.exit=="function"?wh(n.exit):n.exit}}function wh(n){return i;function i(l,s,u){return n(l,u,s[s.length-1])}}const Nh={}.hasOwnProperty,eE={};function tE(n,i){const l=i||eE,s=new Map,u=new Map,o=new Map,d={...Bj,...l.handlers},m={all:g,applyData:iE,definitionById:s,footnoteById:u,footnoteCounts:o,footnoteOrder:[],handlers:d,one:p,options:l,patch:nE,wrap:lE};return Po(n,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=String(x.identifier).toUpperCase();x.type==="definition"?s.has(y)||s.set(y,x):u.has(y)||u.set(y,x)}}),m;function p(x,y){const{type:S}=x,b=m.handlers[S];if(Nh.call(m.handlers,S)&&b)return b(m,x,y);if(m.options.passThrough&&m.options.passThrough.includes(S)){if("children"in x){const{children:C,...T}=x;return{...Bo(T),children:m.all(x)}}return Bo(x)}return(m.options.unknownHandler||aE)(m,x,y)}function g(x){const y=[];if("children"in x){const S=x.children;let b=-1;for(;++b<S.length;){const k=m.one(S[b],x);if(k){if(b&&S[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=_v(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=_v(C.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function nE(n,i){n.position&&(i.position=Yw(n))}function iE(n,i){let l=i;if(n&&n.data){const{hChildren:s,hName:u,hProperties:o}=n.data;if(typeof u=="string")if(l.type==="element")l.tagName=u;else{const d="children"in l?l.children:[l];l={type:"element",tagName:u,properties:{},children:d}}l.type==="element"&&o&&Object.assign(l.properties,Bo(o)),"children"in l&&l.children&&s!==null&&s!==void 0&&(l.children=s)}return l}function aE(n,i){const l=i.data||{},s="value"in i&&!(Nh.call(l,"hProperties")||Nh.call(l,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:n.all(i)};return n.patch(i,s),n.applyData(i,s)}function lE(n,i){const l=[];let s=-1;for(i&&l.push({type:"text",value:`
|
|
329
|
+
`});++s<n.length;)s&&l.push({type:"text",value:`
|
|
330
|
+
`}),l.push(n[s]);return i&&n.length>0&&l.push({type:"text",value:`
|
|
331
|
+
`}),l}function _v(n){let i=0,l=n.charCodeAt(i);for(;l===9||l===32;)i++,l=n.charCodeAt(i);return n.slice(i)}function Tv(n,i){const l=tE(n,i),s=l.one(n,void 0),u=Gj(l),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return u&&o.children.push({type:"text",value:`
|
|
332
|
+
`},u),o}function rE(n,i){return n&&"run"in n?async function(l,s){const u=Tv(l,{file:s,...i});await n.run(u,s)}:function(l,s){return Tv(l,{file:s,...n||i})}}function Av(n){if(n)throw n}var Hd,zv;function sE(){if(zv)return Hd;zv=1;var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(g){return typeof Array.isArray=="function"?Array.isArray(g):i.call(g)==="[object Array]"},o=function(g){if(!g||i.call(g)!=="[object Object]")return!1;var x=n.call(g,"constructor"),y=g.constructor&&g.constructor.prototype&&n.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!x&&!y)return!1;var S;for(S in g);return typeof S>"u"||n.call(g,S)},d=function(g,x){l&&x.name==="__proto__"?l(g,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):g[x.name]=x.newValue},m=function(g,x){if(x==="__proto__")if(n.call(g,x)){if(s)return s(g,x).value}else return;return g[x]};return Hd=function p(){var g,x,y,S,b,k,C=arguments[0],T=1,E=arguments.length,D=!1;for(typeof C=="boolean"&&(D=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<E;++T)if(g=arguments[T],g!=null)for(x in g)y=m(C,x),S=m(g,x),C!==S&&(D&&S&&(o(S)||(b=u(S)))?(b?(b=!1,k=y&&u(y)?y:[]):k=y&&o(y)?y:{},d(C,{name:x,newValue:p(D,k,S)})):typeof S<"u"&&d(C,{name:x,newValue:S}));return C},Hd}var uE=sE();const qd=rb(uE);function Ch(n){if(typeof n!="object"||n===null)return!1;const i=Object.getPrototypeOf(n);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function oE(){const n=[],i={run:l,use:s};return i;function l(...u){let o=-1;const d=u.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);m(null,...u);function m(p,...g){const x=n[++o];let y=-1;if(p){d(p);return}for(;++y<u.length;)(g[y]===null||g[y]===void 0)&&(g[y]=u[y]);u=g,x?cE(x,m)(...g):d(null,...g)}}function s(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),i}}function cE(n,i){let l;return s;function s(...d){const m=n.length>d.length;let p;m&&d.push(u);try{p=n.apply(this,d)}catch(g){const x=g;if(m&&l)throw x;return u(x)}m||(p&&p.then&&typeof p.then=="function"?p.then(o,u):p instanceof Error?u(p):o(p))}function u(d,...m){l||(l=!0,i(d,...m))}function o(d){u(null,d)}}const qi={basename:fE,dirname:dE,extname:hE,join:mE,sep:"/"};function fE(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Ys(n);let l=0,s=-1,u=n.length,o;if(i===void 0||i.length===0||i.length>n.length){for(;u--;)if(n.codePointAt(u)===47){if(o){l=u+1;break}}else s<0&&(o=!0,s=u+1);return s<0?"":n.slice(l,s)}if(i===n)return"";let d=-1,m=i.length-1;for(;u--;)if(n.codePointAt(u)===47){if(o){l=u+1;break}}else d<0&&(o=!0,d=u+1),m>-1&&(n.codePointAt(u)===i.codePointAt(m--)?m<0&&(s=u):(m=-1,s=d));return l===s?s=d:s<0&&(s=n.length),n.slice(l,s)}function dE(n){if(Ys(n),n.length===0)return".";let i=-1,l=n.length,s;for(;--l;)if(n.codePointAt(l)===47){if(s){i=l;break}}else s||(s=!0);return i<0?n.codePointAt(0)===47?"/":".":i===1&&n.codePointAt(0)===47?"//":n.slice(0,i)}function hE(n){Ys(n);let i=n.length,l=-1,s=0,u=-1,o=0,d;for(;i--;){const m=n.codePointAt(i);if(m===47){if(d){s=i+1;break}continue}l<0&&(d=!0,l=i+1),m===46?u<0?u=i:o!==1&&(o=1):u>-1&&(o=-1)}return u<0||l<0||o===0||o===1&&u===l-1&&u===s+1?"":n.slice(u,l)}function mE(...n){let i=-1,l;for(;++i<n.length;)Ys(n[i]),n[i]&&(l=l===void 0?n[i]:l+"/"+n[i]);return l===void 0?".":pE(l)}function pE(n){Ys(n);const i=n.codePointAt(0)===47;let l=gE(n,!i);return l.length===0&&!i&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),i?"/"+l:l}function gE(n,i){let l="",s=0,u=-1,o=0,d=-1,m,p;for(;++d<=n.length;){if(d<n.length)m=n.codePointAt(d);else{if(m===47)break;m=47}if(m===47){if(!(u===d-1||o===1))if(u!==d-1&&o===2){if(l.length<2||s!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(p=l.lastIndexOf("/"),p!==l.length-1){p<0?(l="",s=0):(l=l.slice(0,p),s=l.length-1-l.lastIndexOf("/")),u=d,o=0;continue}}else if(l.length>0){l="",s=0,u=d,o=0;continue}}i&&(l=l.length>0?l+"/..":"..",s=2)}else l.length>0?l+="/"+n.slice(u+1,d):l=n.slice(u+1,d),s=d-u-1;u=d,o=0}else m===46&&o>-1?o++:o=-1}return l}function Ys(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const yE={cwd:xE};function xE(){return"/"}function jh(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function vE(n){if(typeof n=="string")n=new URL(n);else if(!jh(n)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(n.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return bE(n)}function bE(n){if(n.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const i=n.pathname;let l=-1;for(;++l<i.length;)if(i.codePointAt(l)===37&&i.codePointAt(l+1)===50){const s=i.codePointAt(l+2);if(s===70||s===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(i)}const Vd=["history","path","basename","stem","extname","dirname"];class g1{constructor(i){let l;i?jh(i)?l={path:i}:typeof i=="string"||SE(i)?l={value:i}:l=i:l={},this.cwd="cwd"in l?"":yE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Vd.length;){const o=Vd[s];o in l&&l[o]!==void 0&&l[o]!==null&&(this[o]=o==="history"?[...l[o]]:l[o])}let u;for(u in l)Vd.includes(u)||(this[u]=l[u])}get basename(){return typeof this.path=="string"?qi.basename(this.path):void 0}set basename(i){Zd(i,"basename"),$d(i,"basename"),this.path=qi.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?qi.dirname(this.path):void 0}set dirname(i){Ov(this.basename,"dirname"),this.path=qi.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?qi.extname(this.path):void 0}set extname(i){if($d(i,"extname"),Ov(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qi.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){jh(i)&&(i=vE(i)),Zd(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?qi.basename(this.path,this.extname):void 0}set stem(i){Zd(i,"stem"),$d(i,"stem"),this.path=qi.join(this.dirname||"",i+(this.extname||""))}fail(i,l,s){const u=this.message(i,l,s);throw u.fatal=!0,u}info(i,l,s){const u=this.message(i,l,s);return u.fatal=void 0,u}message(i,l,s){const u=new Yo(i,l,s);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function $d(n,i){if(n&&n.includes(qi.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+qi.sep+"`")}function Zd(n,i){if(!n)throw new Error("`"+i+"` cannot be empty")}function Ov(n,i){if(!n)throw new Error("Setting `"+i+"` requires `path` to be set too")}function SE(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const kE=(function(n){const s=this.constructor.prototype,u=s[n],o=function(){return u.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),wE={}.hasOwnProperty;class fm extends kE{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=oE()}copy(){const i=new fm;let l=-1;for(;++l<this.attachers.length;){const s=this.attachers[l];i.use(...s)}return i.data(qd(!0,{},this.namespace)),i}data(i,l){return typeof i=="string"?arguments.length===2?(Qd("data",this.frozen),this.namespace[i]=l,this):wE.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Qd("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const u=l.call(i,...s);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const l=bo(i),s=this.parser||this.Parser;return Yd("parse",s),s(String(l),l)}process(i,l){const s=this;return this.freeze(),Yd("process",this.parser||this.Parser),Gd("process",this.compiler||this.Compiler),l?u(void 0,l):new Promise(u);function u(o,d){const m=bo(i),p=s.parse(m);s.run(p,m,function(x,y,S){if(x||!y||!S)return g(x);const b=y,k=s.stringify(b,S);jE(k)?S.value=k:S.result=k,g(x,S)});function g(x,y){x||!y?d(x):o?o(y):l(void 0,y)}}}processSync(i){let l=!1,s;return this.freeze(),Yd("processSync",this.parser||this.Parser),Gd("processSync",this.compiler||this.Compiler),this.process(i,u),Mv("processSync","process",l),s;function u(o,d){l=!0,Av(o),s=d}}run(i,l,s){Dv(i),this.freeze();const u=this.transformers;return!s&&typeof l=="function"&&(s=l,l=void 0),s?o(void 0,s):new Promise(o);function o(d,m){const p=bo(l);u.run(i,p,g);function g(x,y,S){const b=y||i;x?m(x):d?d(b):s(void 0,b,S)}}}runSync(i,l){let s=!1,u;return this.run(i,l,o),Mv("runSync","run",s),u;function o(d,m){Av(d),u=m,s=!0}}stringify(i,l){this.freeze();const s=bo(l),u=this.compiler||this.Compiler;return Gd("stringify",u),Dv(i),u(i,s)}use(i,...l){const s=this.attachers,u=this.namespace;if(Qd("use",this.frozen),i!=null)if(typeof i=="function")p(i,l);else if(typeof i=="object")Array.isArray(i)?m(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function o(g){if(typeof g=="function")p(g,[]);else if(typeof g=="object")if(Array.isArray(g)){const[x,...y]=g;p(x,y)}else d(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function d(g){if(!("plugins"in g)&&!("settings"in g))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");m(g.plugins),g.settings&&(u.settings=qd(!0,u.settings,g.settings))}function m(g){let x=-1;if(g!=null)if(Array.isArray(g))for(;++x<g.length;){const y=g[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function p(g,x){let y=-1,S=-1;for(;++y<s.length;)if(s[y][0]===g){S=y;break}if(S===-1)s.push([g,...x]);else if(x.length>0){let[b,...k]=x;const C=s[S][1];Ch(C)&&Ch(b)&&(b=qd(!0,C,b)),s[S]=[g,b,...k]}}}}const NE=new fm().freeze();function Yd(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Gd(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Qd(n,i){if(i)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Dv(n){if(!Ch(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Mv(n,i,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+i+"` instead")}function bo(n){return CE(n)?n:new g1(n)}function CE(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function jE(n){return typeof n=="string"||EE(n)}function EE(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const _E="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Rv=[],Lv={allowDangerousHtml:!0},TE=/^(https?|ircs?|mailto|xmpp)$/i,AE=[{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 zE(n){const i=OE(n),l=DE(n);return ME(i.runSync(i.parse(l),l),n)}function OE(n){const i=n.rehypePlugins||Rv,l=n.remarkPlugins||Rv,s=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Lv}:Lv;return NE().use(fj).use(l).use(rE,s).use(i)}function DE(n){const i=n.children||"",l=new g1;return typeof i=="string"&&(l.value=i),l}function ME(n,i){const l=i.allowedElements,s=i.allowElement,u=i.components,o=i.disallowedElements,d=i.skipHtml,m=i.unwrapDisallowed,p=i.urlTransform||RE;for(const x of AE)Object.hasOwn(i,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+_E+x.id,void 0);return Po(n,g),Pw(n,{Fragment:c.Fragment,components:u,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function g(x,y,S){if(x.type==="raw"&&S&&typeof y=="number")return d?S.children.splice(y,1):S.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let b;for(b in Bd)if(Object.hasOwn(Bd,b)&&Object.hasOwn(x.properties,b)){const k=x.properties[b],C=Bd[b];(C===null||C.includes(x.tagName))&&(x.properties[b]=p(String(k||""),b,x))}}if(x.type==="element"){let b=l?!l.includes(x.tagName):o?o.includes(x.tagName):!1;if(!b&&s&&typeof y=="number"&&(b=!s(x,y,S)),b&&S&&typeof y=="number")return m&&x.children?S.children.splice(y,1,...x.children):S.children.splice(y,1),y}}}function RE(n){const i=n.indexOf(":"),l=n.indexOf("?"),s=n.indexOf("#"),u=n.indexOf("/");return i===-1||u!==-1&&i>u||l!==-1&&i>l||s!==-1&&i>s||TE.test(n.slice(0,i))?n:""}function Bv(n,i){const l=String(n);if(typeof i!="string")throw new TypeError("Expected character");let s=0,u=l.indexOf(i);for(;u!==-1;)s++,u=l.indexOf(i,u+i.length);return s}function LE(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function BE(n,i,l){const u=Fo((l||{}).ignore||[]),o=IE(i);let d=-1;for(;++d<o.length;)kh(n,m);function m(g,x,y){if(g.type==="text"&&typeof y=="number")return p(g,x,y);if(u(g,y,x[x.length-1]))return Sh}function p(g,x,y){const S=x[x.length-1],b=o[d][0],k=o[d][1];let C=0,T=!1,E=[];b.lastIndex=0;let D=b.exec(g.value);for(;D;){const G=D.index,ie={index:D.index,input:D.input,stack:[...x,g]};let O=k(...D,ie);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O!==!1){if(C!==G&&I({type:"text",value:g.value.slice(C,G)}),Array.isArray(O))for(const R of O)I(R);else O&&I(O);C=G+D[0].length,T=!0}if(O===!1||D[0].length===0){const R=g.value.codePointAt(G)||0;b.lastIndex=G+(/[uv]/.test(b.flags)&&R>65535?2:1)}if(!b.global)break;D=b.exec(g.value)}return T?(C<g.value.length&&I({type:"text",value:g.value.slice(C)}),S.children.splice(y,1,...E)):E=[g],y+E.length;function I(G){const ie=E[E.length-1];ie&&ie.type==="text"&&G.type==="text"?ie.value+=G.value:E.push(G)}}}function IE(n){if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const i=[],l=!n[0]||Array.isArray(n[0])?n:[n];let s=-1;for(;++s<l.length;){const u=l[s];i.push([UE(u[0]),HE(u[1])])}return i}function UE(n){return typeof n=="string"?new RegExp(LE(n),"g"):n}function HE(n){return typeof n=="function"?n:function(){return n}}const Xd="phrasing",Fd=["autolink","link","image","label"];function qE(){return{transforms:[XE],enter:{literalAutolink:$E,literalAutolinkEmail:Kd,literalAutolinkHttp:Kd,literalAutolinkWww:Kd},exit:{literalAutolink:QE,literalAutolinkEmail:GE,literalAutolinkHttp:ZE,literalAutolinkWww:YE}}}function VE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xd,notInConstruct:Fd},{character:".",before:"[Ww]{3}",inConstruct:Xd,notInConstruct:Fd},{character:":",before:"[PSps]",after:"\\/",inConstruct:Xd,notInConstruct:Fd}]}}function $E(n){this.enter({type:"link",title:null,url:"",children:[],position:void 0},n)}function Kd(n){this.config.enter.autolinkProtocol.call(this,n)}function ZE(n){this.config.exit.autolinkProtocol.call(this,n)}function YE(n){this.config.exit.data.call(this,n);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(n)}function GE(n){this.config.exit.autolinkEmail.call(this,n)}function QE(n){this.exit(n)}function XE(n){BE(n,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),FE],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),JE],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),PE],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),KE]],{ignore:["link","linkReference"]})}function FE(n,i,l,s,u){if(!t_(u))return!1;let o="";if(/^w/i.test(i)&&(l=i+l,i="",o="http://"),$s(l.charCodeAt(0))||!WE(l))return!1;const d=e_(l+s),m={type:"link",title:null,url:o+i+d[0],children:[{type:"text",value:i+d[0],position:void 0}],position:void 0};return d[1]?[m,{type:"text",value:d[1],position:void 0}]:m}function KE(n,i,l){return/[\d\-_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+l,children:[{type:"text",value:i+"@"+l,position:void 0}],position:void 0}}function PE(n,i,l){if(/[\d\-_]$/.test(l))return!1;const s="mailto:"+i+"@"+l;return{type:"link",title:null,url:s,children:[{type:"text",value:s,position:void 0}],position:void 0}}function JE(n,i,l,s,u){if(/[\d\-_]$/.test(l)||s&&(!/[A-Za-z]$/.test(s)||u.input.charAt(u.index+n.length)==="@"))return!1;const o="xmpp:"+i+"@"+l+(s||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function WE(n){const i=n.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[\dA-Za-z]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[\dA-Za-z]/.test(i[i.length-2])))}function e_(n){let i=n.length;for(;i>0;){const d=n.charCodeAt(i-1);if(d===33||d===34||d===38||d===39||d===41||d===44||d===46||d===58||d===59||d===60||d===62||d===63||d===93||d===125)i--;else break}if(i===n.length)return[n,void 0];let l=n.slice(i);n=n.slice(0,i);let s=l.indexOf(")");const u=Bv(n,"(");let o=Bv(n,")");for(;s!==-1&&u>o;)n+=l.slice(0,s+1),l=l.slice(s+1),s=l.indexOf(")"),o++;return[n,l]}function t_(n){const i=n.input.charCodeAt(n.index-1);return n.index===0||Tl(i)||$s(i)}y1.peek=c_;function n_(){this.buffer()}function i_(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function a_(){this.buffer()}function l_(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function r_(n){const i=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Ei(this.sliceSerialize(n)).toLowerCase(),l.label=i}function s_(n){this.exit(n)}function u_(n){const i=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Ei(this.sliceSerialize(n)).toLowerCase(),l.label=i}function o_(n){this.exit(n)}function c_(){return"["}function y1(n,i,l,s){const u=l.createTracker(s);let o=u.move("[^");const d=l.enter("footnoteReference"),m=l.enter("reference");return o+=u.move(l.safe(l.associationId(n),{after:"]",before:o})),m(),d(),o+=u.move("]"),o}function f_(){return{enter:{gfmFootnoteCallString:n_,gfmFootnoteCall:i_,gfmFootnoteDefinitionLabelString:a_,gfmFootnoteDefinition:l_},exit:{gfmFootnoteCallString:r_,gfmFootnoteCall:s_,gfmFootnoteDefinitionLabelString:u_,gfmFootnoteDefinition:o_}}}function d_(n){let i=!1;return n&&n.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:l,footnoteReference:y1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(s,u,o,d){const m=o.createTracker(d);let p=m.move("[^");const g=o.enter("footnoteDefinition"),x=o.enter("label");return p+=m.move(o.safe(o.associationId(s),{before:p,after:"]"})),x(),p+=m.move("]:"),s.children&&s.children.length>0&&(m.shift(4),p+=m.move((i?`
|
|
333
|
+
`:" ")+o.indentLines(o.containerFlow(s,m.current()),i?x1:h_))),g(),p}}function h_(n,i,l){return i===0?n:x1(n,i,l)}function x1(n,i,l){return(l?"":" ")+n}const m_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dm.attention=v_;dm.peek=b_;function p_(){return{canContainEols:["delete"],enter:{strikethrough:y_},exit:{strikethrough:x_}}}function g_(){return{handlers:{delete:dm},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:m_}]}}function y_(n){this.enter({type:"delete",children:[],position:void 0},n)}function x_(n){this.exit(n)}function dm(n,i,l,s){const u=l.createTracker(s),o=l.stack.includes("strikethrough")?"~":"~~",d=l.enter("strikethrough");let m=u.move(o);return m+=l.containerPhrasing(n,{...u.current(),before:m,after:"~"}),m+=u.move(o),d(),m}function v_(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function b_(){return"~"}function S_(n){return n.length}function k_(n,i){const l=i||{},s=(l.align||[]).concat(),u=l.stringLength||S_,o=[],d=[],m=[],p=[];let g=0,x=-1;for(;++x<n.length;){const C=[],T=[];let E=-1;for(n[x].length>g&&(g=n[x].length);++E<n[x].length;){const D=w_(n[x][E]);if(l.alignDelimiters!==!1){const I=u(D);T[E]=I,(p[E]===void 0||I>p[E])&&(p[E]=I)}C.push(D)}d[x]=C,m[x]=T}let y=-1;if(typeof s=="object"&&"length"in s)for(;++y<g;)o[y]=Iv(s[y]);else{const C=Iv(s);for(;++y<g;)o[y]=C}y=-1;const S=[],b=[];for(;++y<g;){const C=o[y];let T="",E="";C===99?(T=":",E=":"):C===108?T=":":C===114&&(E=":");let D=l.alignDelimiters===!1?1:Math.max(1,p[y]-T.length-E.length);const I=T+"-".repeat(D)+E;l.alignDelimiters!==!1&&(D=T.length+D+E.length,D>p[y]&&(p[y]=D),b[y]=D),S[y]=I}d.splice(1,0,S),m.splice(1,0,b),x=-1;const k=[];for(;++x<d.length;){const C=d[x],T=m[x],E=l.fillRows===!1?Math.max(1,d[x===1?0:x].length):g;y=-1;const D=[];for(;++y<E;){const I=C[y]||"";let G="",ie="";if(l.alignDelimiters!==!1){const O=p[y]-(T[y]||0),R=o[y];if(R===114)G=" ".repeat(O);else if(R===99){const V=O/2;O%2?(G=" ".repeat(V+.5),ie=" ".repeat(V-.5)):(G=" ".repeat(V),ie=G)}else ie=" ".repeat(O)}l.delimiterStart!==!1&&!y&&D.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&I==="")&&(l.delimiterStart!==!1||y)&&D.push(" "),l.alignDelimiters!==!1&&D.push(G),D.push(I),l.alignDelimiters!==!1&&D.push(ie),l.padding!==!1&&D.push(" "),(l.delimiterEnd!==!1||y!==E-1)&&D.push("|")}k.push(l.delimiterEnd===!1?D.join("").replace(/ +$/,""):D.join(""))}return k.join(`
|
|
334
|
+
`)}function w_(n){return n==null?"":String(n)}function Iv(n){const i=typeof n=="string"?n.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}const N_=Fo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function C_(n,i,l,s){const u=l.enter("blockquote"),o=l.createTracker(s);o.move("> "),o.shift(2);const d=l.indentLines(l.containerFlow(n,o.current()),j_);return u(),d}function j_(n,i,l){return">"+(l?"":" ")+n}function E_(n,i){return Uv(n,i.inConstruct,!0)&&!Uv(n,i.notInConstruct,!1)}function Uv(n,i,l){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return l;let s=-1;for(;++s<i.length;)if(n.includes(i[s]))return!0;return!1}function Hv(n,i,l,s){let u=-1;for(;++u<l.unsafe.length;){const o=l.unsafe[u];if(o.character===`
|
|
335
|
+
`&&!o.before&&!o.after&&E_(l.stack,o))return/[\t ]/.test(s.before)?"":" "}return`\\
|
|
336
|
+
`}function __(n,i){const l=String(n);let s=l.indexOf(i),u=s,o=0,d=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===u?++o>d&&(d=o):o=1,u=s+i.length,s=l.indexOf(i,u);return d}function T_(n,i){return!!(i.options.fences===!1&&n.value&&!n.lang&&/[^\n\r ]/.test(n.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(n.value))}function A_(n){const i=n.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function z_(n,i,l,s){const u=A_(l),o=n.value||"";if(T_(n,l)){const y=l.enter("codeIndented"),S=l.indentLines(o,O_);return y(),S}const d=l.createTracker(s),m=u.repeat(Math.max(__(o,u)+1,3)),p=l.enter("codeFenced"),g=u==="`"?"GraveAccent":"Tilde";let x=d.move(m);if(n.lang){const y=l.enter(`codeFencedLang${g}`);x+=d.move(l.safe(n.lang,{before:x,after:" ",encode:["`"],...d.current()})),y()}if(n.lang&&n.meta){const y=l.enter(`codeFencedMeta${g}`);x+=d.move(" "),x+=d.move(l.safe(n.meta,{before:x,after:`
|
|
337
|
+
`,encode:["`"],...d.current()})),y()}return x+=d.move(`
|
|
338
|
+
`),o&&(x+=d.move(o+`
|
|
339
|
+
`)),x+=d.move(m),p(),x}function O_(n,i,l){return(l?"":" ")+n}function hm(n){const i=n.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function D_(n,i,l,s){const u=hm(l),o=u==='"'?"Quote":"Apostrophe",d=l.enter("definition");let m=l.enter("label");const p=l.createTracker(s);let g=p.move("[");return g+=p.move(l.safe(l.associationId(n),{before:g,after:"]",...p.current()})),g+=p.move("]: "),m(),!n.url||/^<|[\0- \u007F]/.test(n.url)?(m=l.enter("destinationLiteral"),g+=p.move("<"),g+=p.move(l.safe(n.url,{before:g,after:">",...p.current()})),g+=p.move(">")):(m=l.enter("destinationRaw"),g+=p.move(l.safe(n.url,{before:g,after:n.title?" ":`
|
|
340
|
+
`,...p.current()}))),m(),n.title&&(m=l.enter(`title${o}`),g+=p.move(" "+u),g+=p.move(l.safe(n.title,{before:g,after:u,...p.current()})),g+=p.move(u),m()),d(),g}function M_(n){const i=n.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function Io(n){const i=n.codePointAt(0);return i===void 0?"":String.fromCodePoint(i)}function Sr(n){const i=n.codePointAt(n.length-2);return i!==void 0&&i>65535?n.slice(-2):n.slice(-1)}function v1(n){return"&#x"+n.toString(16).toUpperCase()+";"}function qv(n,i,l){const s=Fa(n),u=Fa(i);return s===void 0?u===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function R_(n){if(n.charCodeAt(0)!==60)return;const i=n.charCodeAt(1);if(i===33){const m=n.charCodeAt(2);return m===45?2:m===91?5:bn(m)?4:void 0}if(i===63)return 3;const l=i===47,s=l?2:1;let u=s,o=n.charCodeAt(u);if(!bn(o))return;for(;o===45||Sn(o);)o=n.charCodeAt(++u);const d=n.slice(s,u).toLowerCase();return!l&&o!==47&&bh.includes(d)?1:a1.includes(d)?6:7}const b1=new Map([["*",!1],["_",!0]]);function L_(n,i,l){const s=new Set;for(const o of n){const d=l.get(o);if(d&&o.attention&&i.some(m=>m.attention===o.attention))for(const m of d.tokens)s.add(m.attention)}const u=[];for(const o of n)o.attention&&s.delete(o.attention)&&u.push(o.attention);return u.reverse(),u}function S1(n,i,l){const s=[],u=new Map,o=new Map;let d=0;for(;d<n.length;){if(!n[d].attention){d++;continue}const m=n[d].value.charAt(0),p=b1.get(m);let g=d+1;for(;g<n.length&&n[g].attention&&n[g].value.charAt(0)===m;)g++;const x=d?n[d-1].value:i,y=Fa(x.charCodeAt(x.length-1)),S=Fa((g<n.length?n[g].value:l).charCodeAt(0)),b=!S||S===2&&!!y,k=!y||y===2&&!!S,C={tokens:n.slice(d,g),markers:[],start:0,end:0,open:p?b&&(!!y||!k):b,close:p?k&&(!!S||!b):k,split:p!==void 0};for(const T of C.tokens){u.set(T,[...C.tokens]),o.set(T,C);let E=T.value.length;for(;E--;)C.markers.push(T)}C.end=C.markers.length,s.push(C),d=g}for(I_(s,u),d=-1;++d<n.length;){const m=u.get(n[d]);if(m)return{attention:L_(n,m,o),index:d}}}function So(n,i){const l=n[i?0:n.length-1];if(!l||l.attention)return;const s=i?Io(l.value):Sr(l.value),u=v1(s.codePointAt(0));if(i)l.value=u+l.value.slice(s.length);else{let o=l.value.slice(0,l.value.length-s.length),d=0;for(;o.charCodeAt(o.length-1-d)===92;)d++;d%2&&(o+="\\"),l.value=o+u}}function B_(n,i,l,s,u){for(const o of l.attention){const d=i.get(o)||o.sequences[0];for(const m of o.sequences){if(m===d)continue;const p=new Map(i);p.set(o,m);const g=Jo(n,p,s,u),x=S1(g,s,u);if(!x||x.index>l.index)return{chosen:p,mistake:x,tokens:g}}}}function I_(n,i){const l=new Map;for(const s of n){const u=s.tokens[0].value.charAt(0);let o=l.get(u);o||(o=[],l.set(u,o));let d=s.close?o.length:0;for(;d--&&s.start<s.end;){const m=o[d],p=m.end-m.start,g=s.end-s.start;if(s.split?(m.close||s.open)&&g%3&&!((p+g)%3):p!==m.markers.length||p!==g)continue;const x=s.split?p>1&&g>1?2:1:g,y=m.markers.slice(m.end-x,m.end),S=s.markers.slice(s.start,s.start+x),b=y[0],k=S[0];if(b===y[x-1]&&b.value.length===x&&k===S[x-1]&&k.value.length===x&&b.attention===k.attention)i.delete(b),i.delete(k);else{const C=[...new Set([...y,...S])];for(const T of C){const E=i.get(T);E&&E.push(...C)}}m.end-=x,s.start+=x,m.start===m.end&&o.splice(d,1),d=o.length}s.open&&s.start<s.end&&o.push(s)}}function U_(n,i,l){if(i.length===0)throw new Error("Cannot serialize `"+n+"` as attention without markers, expected one or more markers");if(l.length===0)throw new Error("Cannot serialize `"+n+"` as attention without sizes, expected one or more sizes");for(const u of l)if(!Number.isSafeInteger(u)||u<1)throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as size, expected positive integer");const s=[];for(const u of i){if(u.length!==1)throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as marker, expected a single ascii character");if(!Fb(u.charCodeAt(0)))throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as marker, expected ascii punctuation");for(const o of l)s.push(u.repeat(o))}return s}function H_(n,i,l){const s=i.indexStack,u=n.children||[],o=[];let d=-1,m=l.before;s.push(-1);let p=i.createTracker(l);for(;++d<u.length;){const g=u[d];let x;if(s[s.length-1]=d,d+1<u.length){let b=i.handle.handlers[u[d+1].type];b&&b.peek&&(b=b.peek),x=b?Io(b(u[d+1],n,i,{before:"",after:"",...p.current()})):""}else x=l.after;const y=o[o.length-1];typeof y=="string"&&(m==="\r"||m===`
|
|
341
|
+
`)&&g.type==="html"&&R_(g.value)!==7&&(o[o.length-1]=y.replace(/(\r?\n|\r)$/," "),m=" ",p=i.createTracker(l),p.move(Wo(o,l.before,l.after)));const S=i.handle.handlers[g.type];if(S&&S.attention){const b=mm(g,S.attention,i,p);if(!b)continue;o.push(b),m=Sr(b.sequences[0])}else{const b=i.handle(g,n,i,{...p.current(),after:x,before:m});if(!b)continue;p.move(b),o.push(b),m=Sr(b)}}return s.pop(),o}function mm(n,i,l,s){const{construct:u,markers:o,sizes:d}=i(n,l),m=U_(n.type,o,d),p=m[0],g=l.enter(u),x=l.createTracker(s.current());x.move(p);const y=H_(n,l,{...x.current(),before:p,after:p});if(g(),y.length!==0)return s.move(p),s.move(Wo(y,p,p)),s.move(p),{children:y,sequences:m}}function Vv(n,i,l,s){let u=Jo(n,i,l,s),o=S1(u,l,s);for(;o;){const d=B_(n,i,o,l,s);if(!d)return;i=d.chosen,u=d.tokens,o=d.mistake}return u}function k1(n,i,l,s){let u=l,o=-1;for(;++o<n.length;){const d=n[o];if(typeof d=="string"){u="";continue}const m=o===n.length-1?s:"",p=d.sequences.find(function(g){const x=g.charAt(0);return x!==u.charAt(0)&&x!==m.charAt(0)||n.length===1&&b1.has(x)&&g.length>l.length})||d.sequences[0];p!==d.sequences[0]&&i.set(d,p),k1(d.children,i,p,p),u=p}}function Jo(n,i,l,s){const u=[];let o,d=Sr(l),m=-1;for(;++m<n.length;){const p=n[m];if(typeof p=="string"){const I={value:p,attention:void 0};o&&o===Io(p)&&So([I],!0),o=void 0,u.push(I),I.value&&(d=Sr(I.value));continue}const g=i.get(p)||p.sequences[0],x=g.charAt(0),y=n[m+1],S=d,b=Io(y===void 0?s:typeof y=="string"?y:i.get(y)||y.sequences[0]),k=Jo(p.children,i,g,g),C=k[0].value,T=qv(S.charCodeAt(S.length-1),C.charCodeAt(0),x);T.inside&&So(k,!0);const E=Sr(k[k.length-1].value),D=qv(b.charCodeAt(0),E.charCodeAt(E.length-1),x);D.inside&&So(k,!1),T.outside&&S!==`
|
|
342
|
+
`&&S!=="\r"&&So(u,!1),D.outside&&(o=b),u.push({value:g,attention:p},...k,{value:g,attention:p}),d=g.charAt(g.length-1)}return u}function Wo(n,i,l){const s=new Map;k1(n,s,i,l);const u=(s.size>0?Vv(n,s,i,l):void 0)||Vv(n,new Map,i,l)||Jo(n,new Map,i,l);let o="";for(const d of u)o+=d.value;return o}pm.attention=w1;pm.peek=q_;function pm(n,i,l,s){const u=l.enter("phrasing"),o=mm(n,w1,l,l.createTracker(s)),d=o?Wo([o],s.before,s.after):"";return u(),d}function w1(n,i){return{construct:"emphasis",markers:M_(i)==="*"?["*","_"]:["_","*"],sizes:[1]}}function q_(n,i,l){return l.options.emphasis||"*"}function V_(n,i){let l=!1;return Po(n,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return l=!0,Os}),!!((!n.depth||n.depth<3)&&Go(n)&&(i.options.setext||l))}function $_(n,i,l,s){const u=Math.max(Math.min(6,n.depth||1),1),o=l.createTracker(s);if(V_(n,l)){const y=l.enter("headingSetext"),S=l.enter("phrasing"),b=l.containerPhrasing(n,{...o.current(),before:`
|
|
343
|
+
`,after:`
|
|
344
|
+
`});return S(),y(),b+`
|
|
345
|
+
`+(u===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
346
|
+
`))+1))}const d="#".repeat(u),m=l.enter("headingAtx"),p=l.enter("phrasing");o.move(d+" ");let g=l.containerPhrasing(n,{before:"# ",after:`
|
|
347
|
+
`,...o.current()});const x=g.charCodeAt(0);return(x===9||x===32)&&(g=v1(x)+g.slice(1)),g=g?d+" "+g:d,l.options.closeAtx&&(g+=" "+d),p(),m(),g}N1.peek=Z_;function N1(n){return n.value||""}function Z_(){return"<"}C1.peek=Y_;function C1(n,i,l,s){const u=hm(l),o=u==='"'?"Quote":"Apostrophe",d=l.enter("image");let m=l.enter("label");const p=l.createTracker(s);let g=p.move("![");return g+=p.move(l.safe(n.alt,{before:g,after:"]",...p.current()})),g+=p.move("]("),m(),!n.url&&n.title||/^<|[\0- \u007F]/.test(n.url)?(m=l.enter("destinationLiteral"),g+=p.move("<"),g+=p.move(l.safe(n.url,{before:g,after:">",...p.current()})),g+=p.move(">")):(m=l.enter("destinationRaw"),g+=p.move(l.safe(n.url,{before:g,after:n.title?" ":")",...p.current()}))),m(),n.title&&(m=l.enter(`title${o}`),g+=p.move(" "+u),g+=p.move(l.safe(n.title,{before:g,after:u,...p.current()})),g+=p.move(u),m()),g+=p.move(")"),d(),g}function Y_(){return"!"}j1.peek=G_;function j1(n,i,l,s){const u=n.referenceType,o=l.enter("imageReference");let d=l.enter("label");const m=l.createTracker(s);let p=m.move("![");const g=l.safe(n.alt,{before:p,after:"]",...m.current()});p+=m.move(g+"]["),d();const x=l.stack;l.stack=x.filter(function(S){return S!=="phrasing"}),d=l.enter("reference");const y=l.safe(l.associationId(n),{before:p,after:"]",...m.current()});return d(),l.stack=x,o(),u==="full"||!g||g!==y?p+=m.move(y+"]"):u==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function G_(){return"!"}E1.peek=Q_;function E1(n,i,l){let s=n.value||"",u="`",o=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(s);)u+="`";for(/[^\n\r ]/.test(s)&&(/^[\n\r ]/.test(s)&&/[\n\r ]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<l.unsafe.length;){const d=l.unsafe[o],m=l.compilePattern(d);if(!d.atBreak)continue;let p;for(;p=m.exec(s);){let g=p.index;s.charCodeAt(g)===10&&s.charCodeAt(g-1)===13&&g--,s=s.slice(0,g)+" "+s.slice(p.index+1)}}return u+s+u}function Q_(){return"`"}function _1(n,i){const l=Go(n);return!!(!i.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][+\-.a-z]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}T1.peek=X_;function T1(n,i,l,s){const u=hm(l),o=u==='"'?"Quote":"Apostrophe",d=l.createTracker(s);if(_1(n,l)){const k=l.stack;l.stack=k.filter(function(E){return E!=="phrasing"});const C=l.enter("autolink");let T=d.move("<");return T+=d.move(l.containerPhrasing(n,{before:T,after:">",...d.current()})),T+=d.move(">"),C(),l.stack=k,T}const m=l.enter("link");let p=l.enter("label"),g=d.move("[");const x=l.containerPhrasing(n,{before:g,after:"](",...d.current()});g+=d.move(x),p(),g+=d.move("](");const y=/^<|[\0- \u007F]/.test(n.url),S=s.before.charAt(s.before.length-1);let b=n.title||void 0;if(!b&&!y&&(S===`
|
|
348
|
+
`||S==="\r")){let k=0;for(;k<x.length&&x.charCodeAt(k)!==93;)k+=x.charCodeAt(k)===92?2:1;x.charCodeAt(k+1)===58&&(b="")}return!n.url&&typeof b=="string"||y?(p=l.enter("destinationLiteral"),g+=d.move("<"),g+=d.move(l.safe(n.url,{before:g,after:">",...d.current()})),g+=d.move(">")):(p=l.enter("destinationRaw"),g+=d.move(l.safe(n.url,{before:g,after:typeof b=="string"?" ":")",...d.current()}))),p(),typeof b=="string"&&(p=l.enter(`title${o}`),g+=d.move(" "+u),g+=d.move(l.safe(b,{before:g,after:u,...d.current()})),g+=d.move(u),p()),g+=d.move(")"),m(),g}function X_(n,i,l){return _1(n,l)?"<":"["}A1.peek=F_;function A1(n,i,l,s){const u=n.referenceType,o=l.enter("linkReference");let d=l.enter("label");const m=l.createTracker(s);let p=m.move("[");const g=l.containerPhrasing(n,{before:p,after:"]",...m.current()});p+=m.move(g+"]["),d();const x=l.stack;l.stack=x.filter(function(S){return S!=="phrasing"}),d=l.enter("reference");const y=l.safe(l.associationId(n),{before:p,after:"]",...m.current()});return d(),l.stack=x,o(),u==="full"||!g||g!==y?p+=m.move(y+"]"):u==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function F_(){return"["}function gm(n){const i=n.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function K_(n){const i=gm(n),l=n.options.bulletOther;if(!l)return i==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+l+"`) to be different");return l}function P_(n){const i=n.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function z1(n){const i=n.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function J_(n,i,l,s){const u=l.enter("list"),o=l.bulletCurrent;let d=n.ordered?P_(l):gm(l);const m=n.ordered?d==="."?")":".":K_(l);let p=i&&l.bulletLastUsed?d===l.bulletLastUsed:!1;if(!n.ordered){const x=n.children?n.children[0]:void 0;if((d==="*"||d==="-")&&x&&(!x.children||!x.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(p=!0),z1(l)===d&&x){let y=-1;for(;++y<n.children.length;){const S=n.children[y];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(d=m),l.bulletCurrent=d;const g=l.containerFlow(n,s);return l.bulletLastUsed=d,l.bulletCurrent=o,u(),g}function W_(n){const i=n.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function eT(n,i,l,s){const u=W_(l);let o=l.bulletCurrent||gm(l);i&&i.type==="list"&&i.ordered&&(o=(typeof i.start=="number"&&i.start>-1?i.start:1)+(l.options.incrementListMarker===!1?0:i.children.indexOf(n))+o);let d=o.length+1;(u==="tab"||u==="mixed"&&(i&&i.type==="list"&&i.spread||n.spread))&&(d=Math.ceil(d/4)*4);const m=l.createTracker(s);m.move(o+" ".repeat(d-o.length)),m.shift(d);const p=l.enter("listItem"),g=l.indentLines(l.containerFlow(n,m.current()),x);return p(),g;function x(y,S,b){return S?(b?"":" ".repeat(d))+y:(b?o:o+" ".repeat(d-o.length))+y}}function tT(n,i,l,s){const u=l.enter("paragraph"),o=l.enter("phrasing"),d=l.containerPhrasing(n,s);return o(),u(),d}function nT(n,i,l,s){if(!n.children.some(function(m){return N_(m)}))return l.containerFlow(n,s);const o=l.enter("phrasing"),d=l.containerPhrasing(n,s);return o(),d}function iT(n){const i=n.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}ym.attention=O1;ym.peek=aT;function ym(n,i,l,s){const u=l.enter("phrasing"),o=mm(n,O1,l,l.createTracker(s)),d=o?Wo([o],s.before,s.after):"";return u(),d}function O1(n,i){return{construct:"strong",markers:iT(i)==="*"?["*","_"]:["_","*"],sizes:[2]}}function aT(n,i,l){return l.options.strong||"*"}function lT(n,i,l,s){const u=i?i.children:[],o=l.indexStack[l.indexStack.length-1];return l.safe(n.value,{...s,afterNode:u[o+1],beforeNode:u[o-1]})}function rT(n){const i=n.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function sT(n,i,l){const s=(z1(l)+(l.options.ruleSpaces?" ":"")).repeat(rT(l));return l.options.ruleSpaces?s.slice(0,-1):s}const Eh={blockquote:C_,break:Hv,code:z_,definition:D_,emphasis:pm,hardBreak:Hv,heading:$_,html:N1,image:C1,imageReference:j1,inlineCode:E1,link:T1,linkReference:A1,list:J_,listItem:eT,paragraph:tT,root:nT,strong:ym,text:lT,thematicBreak:sT};function uT(){return{enter:{table:oT,tableData:$v,tableHeader:$v,tableRow:fT},exit:{codeText:dT,table:cT,tableData:Pd,tableHeader:Pd,tableRow:Pd}}}function oT(n){const i=n._align;this.enter({type:"table",align:i.map(function(l){return l==="none"?null:l}),children:[],position:void 0},n),this.data.inTable=!0}function cT(n){this.exit(n),this.data.inTable=void 0}function fT(n){this.enter({type:"tableRow",children:[],position:void 0},n)}function Pd(n){this.exit(n)}function $v(n){this.enter({type:"tableCell",children:[],position:void 0},n)}function dT(n){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,hT));const l=this.stack[this.stack.length-1];l.type,l.value=i,this.exit(n)}function hT(n,i){return i==="|"?i:n}function mT(n){const i=n||{},{tableCellPadding:l,tablePipeAlign:s,stringLength:u}=i,o=l?" ":"|";return{handlers:{inlineCode:S,table:d,tableCell:p,tableRow:m},join:[pT],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
349
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function d(b,k,C,T){const E=x(b,C,T),D=E[0];if(D){let I=b.align?b.align.length:0,G=-1;if(!I)for(;++G<E.length;)E[G].length>I&&(I=E[G].length);for(;D.length<I;)D.push("")}return g(E,b.align)}function m(b,k,C,T){const E=y(b,C,T),D=g([E]);return D.slice(0,D.indexOf(`
|
|
350
|
+
`))}function p(b,k,C,T){const E=C.enter("tableCell"),D=C.enter("phrasing"),I=C.containerPhrasing(b,{...T,before:o,after:o});return D(),E(),I}function g(b,k){return k_(b,{align:k,alignDelimiters:s,fillRows:!1,padding:l,stringLength:u})}function x(b,k,C){const{children:T}=b;let E=-1;const D=[],I=k.enter("table");for(;++E<T.length;)D[E]=y(T[E],k,C);return I(),D}function y(b,k,C){const{children:T}=b;let E=-1;const D=[],I=k.enter("tableRow");for(;++E<T.length;)D[E]=p(T[E],b,k,C);return I(),D}function S(b,k,C){const T=Eh.inlineCode(b,k,C);if(!C.stack.includes("tableCell"))return T;const E=[];let D=0,I=T.indexOf("|");for(;I!==-1;){let G=I;for(;G>D&&T.charCodeAt(G-1)===92;)G--;E.push(T.slice(D,I)),(I-G)%2===0&&E.push("\\"),D=I,I=T.indexOf("|",I+1)}return E.push(T.slice(D)),E.join("")}}function pT(n,i,l,s){if(n.type==="table"&&l.type==="listItem"&&l.spread===!1&&(i.type==="definition"||i.type==="heading"&&gT(i,s)||i.type==="paragraph"||i.type==="table"))return 1}function gT(n,i){let l=!1;return Po(n,function(s){if(s.type==="break"||"value"in s&&/\r?\n|\r/.test(s.value))return l=!0,Os}),!!((!n.depth||n.depth<3)&&Go(n)&&(i.options.setext||l))}function yT(){return{exit:{taskListCheckValueChecked:Zv,taskListCheckValueUnchecked:Zv,paragraph:vT}}}function xT(){return{handlers:{paragraph:bT},join:[ST]}}function Zv(n){const i=this.stack[this.stack.length-2];i.type,i.checked=n.type==="taskListCheckValueChecked"}function vT(n){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const s=l.children[0];if(s&&s.type==="text"){const u=i.children;let o=-1,d;for(;++o<u.length;){const m=u[o];if(m.type==="paragraph"){d=m;break}}d===l&&(s.value=s.value.slice(1),s.value.length===0?l.children.shift():l.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,l.position.start={...s.position.start}))}}this.exit(n)}function bT(n,i,l,s){if(!i||i.type!=="listItem"||D1(i)!==n)return Eh.paragraph(n,i,l,s);const u="["+(i.checked?"x":" ")+"] ",o=l.createTracker(s);o.move(u);const d=Eh.paragraph(n.children.length>0?n:{type:"paragraph",children:[{type:"text",value:" "}]},i,l,{...s,...o.current()});return u+d}function ST(n,i,l){if(!(n.type==="definition"&&l.type==="listItem"))return;const s=D1(l);if(s&&l.children.indexOf(n)<l.children.indexOf(s))return 0}function D1(n){if(typeof n.checked=="boolean")for(const i of n.children){if(i.type==="paragraph")return i;if(i.type!=="definition")return}}function kT(){return[qE(),f_(),p_(),uT(),yT()]}function wT(n){return{extensions:[VE(),d_(n),g_(),mT(n),xT()]}}const NT={tokenize:AT,partial:!0},M1={tokenize:zT,partial:!0},R1={tokenize:OT,partial:!0},L1={tokenize:DT,partial:!0},CT={tokenize:MT,partial:!0},B1={name:"wwwAutolink",tokenize:_T,previous:U1},I1={name:"protocolAutolink",tokenize:TT,previous:H1},ua={name:"emailAutolink",tokenize:ET,previous:q1},$i={};function jT(){return{text:$i}}let bl=48;for(;bl<123;)$i[bl]=ua,bl++,bl===58?bl=65:bl===91&&(bl=97);$i[43]=ua;$i[45]=ua;$i[46]=ua;$i[95]=ua;$i[72]=[ua,I1];$i[104]=[ua,I1];$i[87]=[ua,B1];$i[119]=[ua,B1];function ET(n,i,l){const s=this;let u,o;return d;function d(y){return!_h(y)||!q1.call(s,s.previous)||xm(s.events)?l(y):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),m(y))}function m(y){return _h(y)?(n.consume(y),m):y===64?(n.consume(y),p):l(y)}function p(y){return y===46?n.check(CT,x,g)(y):y===45||y===95||Sn(y)?(o=!0,n.consume(y),p):x(y)}function g(y){return n.consume(y),u=!0,p}function x(y){return o&&u&&bn(s.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),i(y)):l(y)}}function _T(n,i,l){const s=this;return u;function u(d){return d!==87&&d!==119||!U1.call(s,s.previous)||xm(s.events)?l(d):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(NT,n.attempt(M1,n.attempt(R1,o),l),l)(d))}function o(d){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),i(d)}}function TT(n,i,l){const s=this;let u="",o=!1;return d;function d(y){return(y===72||y===104)&&H1.call(s,s.previous)&&!xm(s.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),u+=String.fromCodePoint(y),n.consume(y),m):l(y)}function m(y){if(bn(y)&&u.length<5)return u+=String.fromCodePoint(y),n.consume(y),m;if(y===58){const S=u.toLowerCase();if(S==="http"||S==="https")return n.consume(y),p}return l(y)}function p(y){return y===47?(n.consume(y),o?g:(o=!0,p)):l(y)}function g(y){return y===null||Mo(y)||Lt(y)||Tl(y)||$s(y)?l(y):n.attempt(M1,n.attempt(R1,x),l)(y)}function x(y){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),i(y)}}function AT(n,i,l){let s=0;return u;function u(d){return(d===87||d===119)&&s<3?(s++,n.consume(d),u):d===46&&s===3?(n.consume(d),o):l(d)}function o(d){return d===null?l(d):i(d)}}function zT(n,i,l){let s,u,o;return d;function d(g){return g===46||g===95?n.check(L1,p,m)(g):g===null||Lt(g)||Tl(g)||g!==45&&$s(g)?p(g):(o=!0,n.consume(g),d)}function m(g){return g===95?s=!0:(u=s,s=void 0),n.consume(g),d}function p(g){return u||s||!o?l(g):i(g)}}function OT(n,i){let l=0,s=0;return u;function u(d){return d===40?(l++,n.consume(d),u):d===41&&s<l?o(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?n.check(L1,i,o)(d):d===null||Lt(d)||Tl(d)?i(d):(n.consume(d),u)}function o(d){return d===41&&s++,n.consume(d),u}}function DT(n,i,l){return s;function s(m){return m===33||m===34||m===39||m===41||m===42||m===44||m===46||m===58||m===59||m===63||m===95||m===126?(n.consume(m),s):m===38?(n.consume(m),o):m===93?(n.consume(m),u):m===60||m===null||Lt(m)||Tl(m)?i(m):l(m)}function u(m){return m===null||m===40||m===91||Lt(m)||Tl(m)?i(m):s(m)}function o(m){return bn(m)?d(m):l(m)}function d(m){return m===59?(n.consume(m),s):bn(m)?(n.consume(m),d):l(m)}}function MT(n,i,l){return s;function s(o){return n.consume(o),u}function u(o){return Sn(o)?l(o):i(o)}}function U1(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||Lt(n)}function H1(n){return!bn(n)}function q1(n){return!(n===47||_h(n))}function _h(n){return n===43||n===45||n===46||n===95||Sn(n)}function xm(n){let i=n.length,l=!1;for(;i--;){const s=n[i][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){l=!0;break}if(s._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const RT={tokenize:$T,partial:!0};function LT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:HT,continuation:{tokenize:qT},exit:VT}},text:{91:{name:"gfmFootnoteCall",tokenize:UT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BT,resolveTo:IT}}}}function BT(n,i,l){const s=this;let u=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let d;for(;u--;){const p=s.events[u][1];if(p.type==="labelImage"){d=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return m;function m(p){if(!d||!d._balanced)return l(p);const g=Ei(s.sliceSerialize({start:d.end,end:s.now()}));return g.codePointAt(0)!==94||!o.includes(g.slice(1))?l(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),i(p))}}function IT(n,i){let l=n.length;for(;l--;)if(n[l][1].type==="labelImage"&&n[l][0]==="enter"){n[l][1];break}n[l+1][1].type="data",n[l+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},n[l+3][1].start),end:Object.assign({},n[n.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},n[l+3][1].end),end:Object.assign({},n[l+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},n[n.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},m=[n[l+1],n[l+2],["enter",s,i],n[l+3],n[l+4],["enter",u,i],["exit",u,i],["enter",o,i],["enter",d,i],["exit",d,i],["exit",o,i],n[n.length-2],n[n.length-1],["exit",s,i]];return n.splice(l,n.length-l+1,...m),n}function UT(n,i,l){const s=this,u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,d;return m;function m(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?l(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",g)}function g(y){if(o>999||y===93&&!d||y===null||y===91||Lt(y))return l(y);if(y===93){n.exit("chunkString");const S=n.exit("gfmFootnoteCallString");return u.includes(Ei(s.sliceSerialize(S)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),i):l(y)}return Lt(y)||(d=!0),o++,n.consume(y),y===92?x:g}function x(y){return y===91||y===92||y===93?(n.consume(y),o++,g):g(y)}}function HT(n,i,l){const s=this,u=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,d=0,m;return p;function p(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",x):l(k)}function x(k){if(d>999||k===93&&!m||k===null||k===91||Lt(k))return l(k);if(k===93){n.exit("chunkString");const C=n.exit("gfmFootnoteDefinitionLabelString");return o=Ei(s.sliceSerialize(C)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),S}return Lt(k)||(m=!0),d++,n.consume(k),k===92?y:x}function y(k){return k===91||k===92||k===93?(n.consume(k),d++,x):x(k)}function S(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),u.includes(o)||u.push(o),bt(n,b,"gfmFootnoteDefinitionWhitespace")):l(k)}function b(k){return i(k)}}function qT(n,i,l){return n.check(Zs,i,n.attempt(RT,i,l))}function VT(n){n.exit("gfmFootnoteDefinition")}function $T(n,i,l){const s=this;return bt(n,u,"gfmFootnoteDefinitionIndent",5);function u(o){const d=s.events[s.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?i(o):l(o)}}function ZT(n){let l=(n||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:u};return l==null&&(l=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function u(d,m){let p=-1;for(;++p<d.length;)if(d[p][0]==="enter"&&d[p][1].type==="strikethroughSequenceTemporary"&&d[p][1]._close){let g=p;for(;g--;)if(d[g][0]==="exit"&&d[g][1].type==="strikethroughSequenceTemporary"&&d[g][1]._open&&d[p][1].end.offset-d[p][1].start.offset===d[g][1].end.offset-d[g][1].start.offset){d[p][1].type="strikethroughSequence",d[g][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},d[g][1].start),end:Object.assign({},d[p][1].end)},y={type:"strikethroughText",start:Object.assign({},d[g][1].end),end:Object.assign({},d[p][1].start)},S=[["enter",x,m],["enter",d[g][1],m],["exit",d[g][1],m],["enter",y,m]],b=m.parser.constructs.insideSpan.null;b&&ji(S,S.length,0,Qo(b,d.slice(g+1,p),m)),ji(S,S.length,0,[["exit",y,m],["enter",d[p][1],m],["exit",d[p][1],m],["exit",x,m]]),ji(d,g-1,p-g+3,S),p=g+S.length-2;break}}for(p=-1;++p<d.length;)d[p][1].type==="strikethroughSequenceTemporary"&&(d[p][1].type="data");return d}function o(d,m,p){const g=this.previous,x=this.events;let y=0;return S;function S(k){return g===126&&x[x.length-1][1].type!=="characterEscape"?p(k):(d.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const C=Fa(g);if(k===126)return y>1?p(k):(d.consume(k),y++,b);if(y<2&&!l)return p(k);const T=d.exit("strikethroughSequenceTemporary"),E=Fa(k);return T._open=!E||E===2&&!!C,T._close=!C||C===2&&!!E,m(k)}}}class YT{constructor(){this.map=[],this.index=new Map}add(i,l,s){GT(this,i,l,s)}consume(i){if(this.map.sort(function(o,d){return o[0]-d[0]}),this.map.length===0)return;let l=this.map.length;const s=[];for(;l>0;)l-=1,s.push(i.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),i.length=this.map[l][0];s.push(i.slice()),i.length=0;let u=s.pop();for(;u;){for(const o of u)i.push(o);u=s.pop()}this.map.length=0,this.index.clear()}}function GT(n,i,l,s){if(l===0&&s.length===0)return;const u=n.index.get(i);if(u){u[1]+=l,u[2].push(...s);return}const o=[i,l,s];n.map.push(o),n.index.set(i,o)}function QT(n,i){let l=!1;const s=[];for(;i<n.length;){const u=n[i];if(l){if(u[0]==="enter")u[1].type==="tableContent"&&s.push(n[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(n[i-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(l=!0);i+=1}return s}function XT(){return{flow:{null:{name:"table",tokenize:FT,resolveAll:KT}}}}function FT(n,i,l){const s=this;let u=0,o=0,d;return m;function m(H){let U=s.events.length-1;for(;U>-1;){const{type:ge}=s.events[U][1];if(ge==="lineEnding"||ge==="linePrefix")U--;else break}const P=U>-1?s.events[U][1].type:null,ee=P==="tableHead"||P==="tableRow"?O:p;return ee===O&&s.parser.lazy[s.now().line]?l(H):ee(H)}function p(H){return n.enter("tableHead"),n.enter("tableRow"),g(H)}function g(H){return H===124||(d=!0,o+=1),x(H)}function x(H){return H===null?l(H):Ye(H)?o>1?(o=0,s.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),b):l(H):rt(H)?bt(n,x,"whitespace")(H):(o+=1,d&&(d=!1,u+=1),H===124?(n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),d=!0,x):(n.enter("data"),y(H)))}function y(H){return H===null||H===124||Lt(H)?(n.exit("data"),x(H)):(n.consume(H),H===92?S:y)}function S(H){return H===92||H===124?(n.consume(H),y):y(H)}function b(H){return s.interrupt=!1,s.parser.lazy[s.now().line]?l(H):(n.enter("tableDelimiterRow"),d=!1,rt(H)?bt(n,k,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):k(H))}function k(H){return H===45||H===58?T(H):H===124?(d=!0,n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),C):ie(H)}function C(H){return rt(H)?bt(n,T,"whitespace")(H):T(H)}function T(H){return H===58?(o+=1,d=!0,n.enter("tableDelimiterMarker"),n.consume(H),n.exit("tableDelimiterMarker"),E):H===45?(o+=1,E(H)):H===null||Ye(H)?G(H):ie(H)}function E(H){return H===45?(n.enter("tableDelimiterFiller"),D(H)):ie(H)}function D(H){return H===45?(n.consume(H),D):H===58?(d=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(H),n.exit("tableDelimiterMarker"),I):(n.exit("tableDelimiterFiller"),I(H))}function I(H){return rt(H)?bt(n,G,"whitespace")(H):G(H)}function G(H){return H===124?k(H):H===null||Ye(H)?!d||u!==o?ie(H):(n.exit("tableDelimiterRow"),n.exit("tableHead"),i(H)):ie(H)}function ie(H){return l(H)}function O(H){return n.enter("tableRow"),R(H)}function R(H){return H===124?(n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),R):H===null||Ye(H)?(n.exit("tableRow"),i(H)):rt(H)?bt(n,R,"whitespace")(H):(n.enter("data"),V(H))}function V(H){return H===null||H===124||Lt(H)?(n.exit("data"),R(H)):(n.consume(H),H===92?ae:V)}function ae(H){return H===92||H===124?(n.consume(H),V):V(H)}}function KT(n,i){let l=-1,s=!0,u=0,o=[0,0,0,0],d=[0,0,0,0],m=!1,p=0,g,x,y;const S=new YT;for(;++l<n.length;){const b=n[l],k=b[1];b[0]==="enter"?k.type==="tableHead"?(m=!1,p!==0&&(Yv(S,i,p,g,x),x=void 0,p=0),g={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(l,0,[["enter",g,i]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=!0,y=void 0,o=[0,0,0,0],d=[0,l+1,0,0],m&&(m=!1,x={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(l,0,[["enter",x,i]])),u=k.type==="tableDelimiterRow"?2:x?3:1):u&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(s=!1,d[2]===0&&(o[1]!==0&&(d[0]=d[1],y=ko(S,i,o,u,void 0,y),o=[0,0,0,0]),d[2]=l)):k.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(d[0]=d[1],y=ko(S,i,o,u,void 0,y)),o=d,d=[o[1],l,0,0])):k.type==="tableHead"?(m=!0,p=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=l,o[1]!==0?(d[0]=d[1],y=ko(S,i,o,u,l,y)):d[1]!==0&&(y=ko(S,i,d,u,l,y)),u=0):u&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(d[3]=l)}for(p!==0&&Yv(S,i,p,g,x),S.consume(i.events),l=-1;++l<i.events.length;){const b=i.events[l];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=QT(i.events,l))}return n}function ko(n,i,l,s,u,o){const d=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",m="tableContent";l[0]!==0&&(o.end=Object.assign({},vr(i.events,l[0])),n.add(l[0],0,[["exit",o,i]]));const p=vr(i.events,l[1]);if(o={type:d,start:Object.assign({},p),end:Object.assign({},p)},n.add(l[1],0,[["enter",o,i]]),l[2]!==0){const g=vr(i.events,l[2]),x=vr(i.events,l[3]),y={type:m,start:Object.assign({},g),end:Object.assign({},x)};if(n.add(l[2],0,[["enter",y,i]]),s!==2){const S=i.events[l[2]],b=i.events[l[3]];if(S[1].end=Object.assign({},b[1].end),S[1].type="chunkText",S[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,C=l[3]-l[2]-1;n.add(k,C,[])}}n.add(l[3]+1,0,[["exit",y,i]])}return u!==void 0&&(o.end=Object.assign({},vr(i.events,u)),n.add(u,0,[["exit",o,i]]),o=void 0),o}function Yv(n,i,l,s,u){const o=[],d=vr(i.events,l);u&&(u.end=Object.assign({},d),o.push(["exit",u,i])),s.end=Object.assign({},d),o.push(["exit",s,i]),n.add(l+1,0,o)}function vr(n,i){const l=n[i],s=l[0]==="enter"?"start":"end";return l[1][s]}const PT={name:"tasklistCheck",tokenize:WT};function JT(){return{text:{91:PT}}}function WT(n,i,l){const s=this;return u;function u(p){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?l(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),o)}function o(p){return Lt(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),d):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),d):l(p)}function d(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),m):l(p)}function m(p){return Ye(p)?i(p):rt(p)?n.check({tokenize:eA},i,l)(p):l(p)}}function eA(n,i,l){return bt(n,s,"whitespace");function s(u){return u===null?l(u):i(u)}}function tA(n){return Qb([jT(),LT(),ZT(n),XT(),JT()])}const nA={};function iA(n){const i=this,l=n||nA,s=i.data(),u=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),d=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);u.push(tA(l)),o.push(kT()),d.push(wT(l))}const aA="modulepreload",lA=function(n){return"/"+n},Gv={},rA=function(i,l,s){let u=Promise.resolve();if(l&&l.length>0){let d=function(g){return Promise.all(g.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),p=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));u=d(l.map(g=>{if(g=lA(g),g in Gv)return;Gv[g]=!0;const x=g.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const S=document.createElement("link");if(S.rel=x?"stylesheet":aA,x||(S.as="script"),S.crossOrigin="",S.href=g,p&&S.setAttribute("nonce",p),document.head.appendChild(S),x)return new Promise((b,k)=>{S.addEventListener("load",b),S.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function o(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return u.then(d=>{for(const m of d||[])m.status==="rejected"&&o(m.reason);return i().catch(o)})};let wo=null,Qv=0;function sA(){return wo||(wo=rA(()=>import("./mermaid.core-CDkqDmQh.js").then(n=>n.bl),[]).then(n=>{const i=n.default;return i.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,theme:"base",flowchart:{htmlLabels:!1,useMaxWidth:!0,curve:"basis"},themeVariables:{fontFamily:'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif',fontSize:"13px",primaryColor:"#eff6ff",primaryTextColor:"#172554",primaryBorderColor:"#93c5fd",lineColor:"#697596",secondaryColor:"#fff1eb",secondaryTextColor:"#172554",secondaryBorderColor:"#ffd8c7",tertiaryColor:"#fcf8ef",tertiaryTextColor:"#172554",tertiaryBorderColor:"#dfd3bc",clusterBkg:"#fcf8ef",clusterBorder:"#dfd3bc",edgeLabelBackground:"#ffffff",background:"#ffffff"}}),i}).catch(n=>{throw wo=null,n})),wo}function Xv(n,i){if(!n)return;const l=new DOMParser().parseFromString(i,"image/svg+xml"),s=l.documentElement;if((s==null?void 0:s.tagName.toLowerCase())!=="svg"||l.querySelector("parsererror")){n.replaceChildren();return}n.replaceChildren(document.importNode(s,!0))}function uA({code:n}){const[i,l]=N.useState(""),[s,u]=N.useState(""),[o,d]=N.useState(!0),[m,p]=N.useState(!1),[g,x]=N.useState(!1),y=N.useRef(null),S=N.useRef(null);return N.useEffect(()=>{let b=!1;return d(!0),u(""),l(""),(async()=>{try{const k=await sA();if(b)return;Qv+=1;const{svg:C}=await k.render(`slate-mermaid-${Qv}`,n);if(b)return;l(C)}catch(k){if(b)return;u(k instanceof Error?k.message:"流程图渲染失败")}finally{b||d(!1)}})(),()=>{b=!0}},[n]),N.useEffect(()=>{!m&&i&&Xv(y.current,i)},[i,m]),N.useEffect(()=>{g&&i&&Xv(S.current,i)},[g,i]),N.useEffect(()=>{if(!g)return;function b(k){k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),x(!1))}return window.addEventListener("keydown",b,!0),()=>window.removeEventListener("keydown",b,!0)},[g]),c.jsxs("div",{className:"mermaid-card",onClick:b=>b.stopPropagation(),children:[c.jsxs("div",{className:"mermaid-bar",children:[c.jsx("span",{className:"mermaid-label",children:"Mermaid"}),c.jsxs("div",{className:"mermaid-actions",children:[i&&!m&&c.jsxs("button",{type:"button",className:"btn ghost xs",onClick:()=>x(!0),"aria-label":"放大查看图表",children:[c.jsx(P2,{size:12})," 放大"]}),i&&c.jsx("button",{type:"button",className:"btn ghost xs",onClick:()=>p(b=>!b),"aria-label":m?"查看图表":"查看源码",children:m?c.jsxs(c.Fragment,{children:[c.jsx(Dh,{size:12})," 图表"]}):c.jsxs(c.Fragment,{children:[c.jsx(db,{size:12})," 源码"]})})]})]}),o?c.jsx("div",{className:"mermaid-loading",role:"status",children:"正在渲染图表…"}):s?c.jsxs("div",{className:"mermaid-fallback",children:[c.jsx("p",{className:"mermaid-fallback-hint",children:"图表语法暂无法解析,已显示源码"}),c.jsx("pre",{children:c.jsx("code",{children:n})})]}):m?c.jsx("pre",{className:"mermaid-source",children:c.jsx("code",{children:n})}):c.jsx("div",{ref:y,className:"mermaid-stage"}),g&&i&&qs.createPortal(c.jsx("div",{className:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":"Mermaid 图表放大预览",onClick:b=>{b.stopPropagation(),x(!1)},children:c.jsxs("div",{className:"lightbox-shell mermaid-lightbox-shell",onClick:b=>b.stopPropagation(),children:[c.jsxs("div",{className:"lightbox-bar",children:[c.jsx("div",{className:"lightbox-meta",children:c.jsx("strong",{children:"Mermaid 图表"})}),c.jsx("div",{className:"lightbox-actions",children:c.jsx("button",{type:"button",className:"lightbox-btn icon","aria-label":"关闭图表预览",onClick:()=>x(!1),children:c.jsx(Gt,{size:16})})})]}),c.jsx("div",{className:"mermaid-lightbox-stage",children:c.jsx("div",{ref:S,className:"mermaid-stage zoomed"})})]})}),document.body)]})}function oA(){return n=>{const i=l=>{if(!l.children)return;const s=[];for(const u of l.children)if(u.type==="text"&&typeof u.value=="string"&&u.value.includes(`
|
|
351
|
+
`)){const o=u.value.split(/\r?\n/);o.forEach((d,m)=>{d&&s.push({type:"text",value:d}),m<o.length-1&&s.push({type:"break"})})}else i(u),s.push(u);l.children=s};i(n)}}const cA=[iA,oA];function fA(n){return n?/^https?:\/\//i.test(n)||/^mailto:/i.test(n):!1}function dA(n){if(!n||n.length===0)return null;const i=n.filter(Boolean).sort((l,s)=>s.length-l.length).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return i.length===0?null:new RegExp(`(@(?:${i.join("|")}))`,"g")}function Th(n,i,l){if(typeof n=="string"){const s=n.split(i);if(s.length<=1)return n;let u=0;return s.map(o=>{const d=`${u}-${o.length}`;return u+=o.length,o.startsWith("@")&&l.has(o.slice(1))?c.jsx("span",{className:"inline-mention",children:o},d):o})}return Array.isArray(n)?N.Children.map(n,s=>Th(s,i,l)):N.isValidElement(n)?n.type==="code"||n.type==="pre"||n.type==="a"||n.props.children===void 0?n:N.cloneElement(n,void 0,Th(n.props.children,i,l)):n}function hA(n){const i=N.Children.toArray(n);if(i.length!==1)return null;const l=i[0];if(!N.isValidElement(l)||l.type!=="code")return null;const s=typeof l.props.className=="string"?l.props.className:"";if(!/\blanguage-mermaid\b/i.test(s))return null;const o=(Array.isArray(l.props.children)?l.props.children.map(d=>typeof d=="string"?d:"").join(""):typeof l.props.children=="string"?l.props.children:"").replace(/\n$/,"");return o.trim()?o:null}function Hs({content:n,compact:i=!1,mentionNames:l,className:s}){const u=N.useMemo(()=>{const o=dA(l),d=new Set(l??[]),m=p=>o?Th(p,o,d):p;return{a:({href:p,children:g})=>fA(p)?c.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:g}):c.jsx("span",{children:g}),pre:({children:p})=>{const g=hA(p);return g?c.jsx(uA,{code:g}):c.jsx("pre",{children:p})},table:({children:p})=>c.jsx("div",{className:"md-table-wrap",children:c.jsx("table",{children:p})}),p:({children:p})=>c.jsx("p",{children:m(p)}),li:({children:p})=>c.jsx("li",{children:m(p)})}},[l]);return c.jsx("div",{className:`md-body${i?" compact":""}${s?` ${s}`:""}`,children:c.jsx(zE,{remarkPlugins:cA,components:u,children:n})})}function mA(n){return n.mimeType==="text/markdown"?!0:/\.(md|markdown)$/i.test(n.filename??n.path)}function vm({preview:n,localPath:i,onReveal:l,onClose:s}){const u=mA(n),[o,d]=N.useState(!1),[m,p]=N.useState(!1),[g,x]=N.useState(!1),[y,S]=N.useState(!1),[b,k]=N.useState(""),C=N.useRef(void 0),T=N.useRef(void 0);N.useEffect(()=>()=>{window.clearTimeout(C.current),window.clearTimeout(T.current)},[]);const E=i??n.localPath;async function D(){try{await navigator.clipboard.writeText(n.content),p(!0),window.clearTimeout(C.current),C.current=window.setTimeout(()=>p(!1),1800)}catch{}}async function I(){if(E)try{await navigator.clipboard.writeText(E),x(!0),window.clearTimeout(T.current),T.current=window.setTimeout(()=>x(!1),1800)}catch{}}async function G(){if(!(!l||y)){S(!0),k("");try{await l()}catch(H){k(H instanceof Error?H.message:"无法在访达中显示该文件")}finally{S(!1)}}}const O=(n.filename??n.path)||n.label,R=!!(n.label&&n.label!==O),V=R||n.truncated||!!E,ae=u&&!o;return qs.createPortal(c.jsx("div",{className:"output-preview-overlay",onClick:s,children:c.jsxs("div",{className:"output-preview-modal",role:"dialog","aria-modal":"true","aria-label":`预览 ${O}`,onClick:H=>H.stopPropagation(),children:[c.jsxs("header",{className:"output-preview-head",children:[c.jsxs("div",{className:"output-preview-title",children:[c.jsx("span",{className:"output-preview-icon","aria-hidden":"true",children:c.jsx(kr,{size:16})}),c.jsxs("div",{className:"output-preview-heading",children:[c.jsx("h3",{title:O,children:O}),V&&c.jsxs("div",{className:"output-preview-sub",children:[R&&c.jsx("span",{className:"output-preview-path",title:n.label,children:n.label}),E&&c.jsx("button",{type:"button",className:"output-preview-path-btn",title:`点击复制本机路径:${E}`,onClick:()=>void I(),children:g?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:11})," 已复制路径"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:11})," 复制路径"]})}),n.truncated&&c.jsx("span",{className:"output-preview-badge",children:"内容过长已截断"})]})]})]}),c.jsxs("div",{className:"output-preview-actions",children:[u&&c.jsxs("div",{className:"output-preview-switch",role:"group","aria-label":"视图模式",children:[c.jsxs("button",{type:"button",className:`output-preview-switch-btn${o?"":" active"}`,"aria-pressed":!o,onClick:()=>d(!1),children:[c.jsx(Dh,{size:12})," 渲染"]}),c.jsxs("button",{type:"button",className:`output-preview-switch-btn${o?" active":""}`,"aria-pressed":o,onClick:()=>d(!0),children:[c.jsx(db,{size:12})," 原文"]})]}),c.jsx("button",{type:"button",className:"btn ghost xs",onClick:()=>void D(),children:m?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:12})," 已复制"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:12})," 复制"]})}),l&&c.jsxs("button",{type:"button",className:"btn ghost xs",disabled:y,onClick:()=>void G(),title:E?`在访达中显示:${E}`:"在访达中显示",children:[c.jsx(Va,{size:12})," ",y?"打开中…":"在访达中显示"]}),c.jsx("button",{type:"button",className:"icon-btn sm has-tooltip tooltip-right","data-tooltip":"关闭预览 (Esc)","aria-label":"关闭预览",onClick:s,children:c.jsx(Gt,{size:16})})]})]}),b&&c.jsx("div",{className:"banner danger output-preview-error",role:"alert",children:b}),c.jsx("div",{className:`output-preview-body${ae?" is-markdown":" is-code"}`,children:ae?c.jsx(Hs,{content:n.content}):c.jsx("pre",{className:"output-preview-code",children:n.content})})]})}),document.body)}let Fv=0;const pA=N.forwardRef(function({projectId:i,cardId:l,attachments:s,pending:u,onChanged:o},d){const[m,p]=N.useState([]),[g,x]=N.useState(!1),[y,S]=N.useState(""),[b,k]=N.useState(null),[C,T]=N.useState(""),[E,D]=N.useState(null),[I,G]=N.useState(!1),[ie,O]=N.useState(null),[R,V]=N.useState(null),[ae,H]=N.useState(null),[U,P]=N.useState(null),ee=N.useRef(null),ge=N.useRef(void 0),ce=N.useRef(s.length+m.length);ce.current=s.length+m.length,N.useEffect(()=>()=>window.clearTimeout(ge.current),[]);const F=N.useMemo(()=>s.filter(Q=>Q.kind==="image"),[s]),ue=N.useMemo(()=>s.filter(Q=>Q.kind==="file"),[s]),fe=N.useMemo(()=>b?F.findIndex(Q=>Q.id===b):-1,[F,b]),ke=fe>=0?F[fe]:null;N.useEffect(()=>{b&&!F.some(Q=>Q.id===b)&&(k(null),T(""))},[F,b]),N.useEffect(()=>{if(!ke||F.length<=1)return;const Q=ye=>{if(ye.key==="ArrowLeft"){ye.preventDefault();const Ee=(fe-1+F.length)%F.length;k(F[Ee].id),T("")}else if(ye.key==="ArrowRight"){ye.preventDefault();const Ee=(fe+1)%F.length;k(F[Ee].id),T("")}};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[ke,F,fe]);const j=N.useCallback(async Q=>{if(Q.length===0)return;const{valid:ye,error:Ee}=Ph(Q,ce.current,$a);if(S(Ee??""),ye.length===0)return;const ve=ye.map(Se=>(Fv+=1,{tempId:`drawer-up-${Fv}`,file:Se,filename:Kh(Se)}));p(Se=>[...Se,...ve.map(Ke=>({tempId:Ke.tempId,filename:Ke.filename}))]),ce.current+=ve.length;let Z=!1;const Re=[];for(const Se of ve)try{await Yh({projectId:i,cardId:l,file:Se.file,filename:Se.filename}),Z=!0}catch(Ke){Re.push(`${Se.filename}:${Ke instanceof Error?Ke.message:"添加失败"}`)}finally{p(Ke=>Ke.filter(Ge=>Ge.tempId!==Se.tempId))}Re.length>0&&S(Se=>[Se,...Re].filter(Boolean).join(";")),Z&&await o()},[i,l,o]);N.useImperativeHandle(d,()=>({uploadFiles:j,dismissLightbox:()=>E?(D(null),!0):U?(P(null),!0):b?(k(null),T(""),!0):!1}),[j,b,E,U]);async function je(Q){try{await navigator.clipboard.writeText(Q.localPath),O(Q.id),window.clearTimeout(ge.current),ge.current=window.setTimeout(()=>O(null),1800)}catch{}}async function Ne(Q,ye=!1){if(R!==Q.id){V(Q.id),ye?T(""):S("");try{await jr(Q.id)}catch(Ee){const ve=Ee instanceof Error?Ee.message:"无法在访达中显示该文件";ye?T(ve):S(ve)}finally{V(Ee=>Ee===Q.id?null:Ee)}}}async function _(Q){if(ae!==Q.id){H(Q.id),S("");try{const ye=await zb(Q.id);P({attachmentId:Q.id,doc:{label:ye.filename,path:ye.filename,filename:ye.filename,mimeType:ye.mimeType,localPath:ye.localPath,content:ye.content,truncated:ye.truncated}})}catch(ye){S(ye instanceof Error?ye.message:"无法预览文件内容")}finally{H(ye=>ye===Q.id?null:ye)}}}async function A(){if(!(!E||I)){G(!0),S("");try{await Gh(E.id),D(null),await o()}catch(Q){S(Q instanceof Error?Q.message:"删除失败"),D(null)}finally{G(!1)}}}function te(Q){if(Q.preventDefault(),Q.stopPropagation(),x(!1),u)return;const ye=Array.from(Q.dataTransfer.files??[]);ye.length>0&&j(ye)}const me=s.length+m.length,we=me>=$a;return c.jsxs("section",{className:`clean-section attachments-section ${g?"drag-over":""}`,onDragOver:Q=>{u||(Q.preventDefault(),g||x(!0))},onDragLeave:Q=>{Q.currentTarget.contains(Q.relatedTarget)||x(!1)},onDrop:te,children:[me>0&&c.jsxs("div",{className:"section-row",children:[c.jsxs("h3",{children:["附件 (",s.length,")"]}),c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip tooltip-right","data-tooltip":we?`单张卡片最多 ${$a} 个附件`:"添加截图或文件(支持拖拽或 ⌘V 粘贴)",disabled:u||we,onClick:()=>{var Q;return(Q=ee.current)==null?void 0:Q.click()},children:[c.jsx(wl,{size:12})," 添加附件"]})]}),c.jsx("input",{ref:ee,type:"file",multiple:!0,hidden:!0,onChange:Q=>{const ye=Array.from(Q.target.files??[]);Q.target.value="",ye.length>0&&j(ye)}}),y&&c.jsx("div",{className:"inline-add-error",role:"alert",children:y}),me===0?c.jsxs("button",{type:"button",className:"attachment-drawer-empty",disabled:u,onClick:()=>{var Q;return(Q=ee.current)==null?void 0:Q.click()},children:[c.jsx(wl,{size:13,"aria-hidden":"true"}),c.jsx("span",{children:"添加附件(支持拖拽或 ⌘V 粘贴图片/文件)"})]}):c.jsxs("div",{className:"attachments-content",children:[F.length>0&&c.jsx("div",{className:"attachment-image-grid",children:F.map(Q=>c.jsxs("div",{className:"attachment-image-card",children:[c.jsxs("button",{type:"button",className:"attachment-image-trigger",onClick:()=>{T(""),k(Q.id)},"aria-label":`预览图片 ${Q.filename}`,children:[c.jsx("img",{src:Q.url,alt:Q.filename,loading:"lazy"}),c.jsx("span",{className:"attachment-image-zoom","aria-hidden":"true",children:c.jsx(Uh,{size:14})})]}),c.jsxs("div",{className:"attachment-image-foot",children:[c.jsx("span",{className:"attachment-image-name",title:Q.filename,children:Q.filename}),c.jsx("small",{className:"muted xs",children:hi(Q.sizeBytes)})]}),c.jsx("button",{type:"button",className:"icon-btn xs danger attachment-image-del has-tooltip tooltip-right","data-tooltip":"删除附件","aria-label":`删除附件 ${Q.filename}`,disabled:u||I,onClick:()=>D(Q),children:c.jsx(wr,{size:12})})]},Q.id))}),ue.length>0&&c.jsx("div",{className:"attachment-file-list",children:ue.map(Q=>{const ye=Fh(Q),Ee=ie===Q.id;return c.jsxs("div",{className:"attachment-file-row",children:[c.jsxs("div",{className:"attachment-file-info",children:[c.jsx(kr,{size:15,className:"muted","aria-hidden":"true"}),ye?c.jsx("button",{type:"button",className:"attachment-file-name-btn",title:`预览 ${Q.filename}`,disabled:ae===Q.id,onClick:()=>void _(Q),children:Q.filename}):c.jsx("span",{className:"attachment-file-name",title:Q.filename,children:Q.filename}),c.jsx("small",{className:"muted xs",children:hi(Q.sizeBytes)})]}),c.jsxs("div",{className:"attachment-file-actions",children:[ye&&c.jsxs("button",{type:"button",className:"btn ghost xs",disabled:ae===Q.id,onClick:()=>void _(Q),children:[c.jsx(Dh,{size:12})," ",ae===Q.id?"加载中…":"预览"]}),c.jsxs("button",{type:"button",className:"btn ghost xs",disabled:R===Q.id,onClick:()=>void Ne(Q),title:`在访达中显示:${Q.localPath}`,children:[c.jsx(Va,{size:12})," ",R===Q.id?"打开中…":"访达显示"]}),c.jsx("button",{type:"button",className:"icon-btn xs has-tooltip tooltip-right","data-tooltip":Ee?"已复制路径":"复制本机路径","aria-label":`复制路径 ${Q.filename}`,onClick:()=>void je(Q),children:Ee?c.jsx(pi,{size:12}):c.jsx(Za,{size:12})}),c.jsx("button",{type:"button",className:"icon-btn xs danger has-tooltip tooltip-right","data-tooltip":"删除文件","aria-label":`删除文件 ${Q.filename}`,disabled:u||I,onClick:()=>D(Q),children:c.jsx(wr,{size:12})})]})]},Q.id)})}),m.length>0&&c.jsx("div",{className:"attachment-uploading-list","aria-busy":"true",children:m.map(Q=>c.jsxs("div",{className:"attachment-uploading-row",children:[c.jsx(Rh,{size:13,className:"spin"}),c.jsxs("span",{children:["正在添加「",Q.filename,"」…"]})]},Q.tempId))})]}),ke&&c.jsx("div",{className:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":`预览图片 ${ke.filename}`,onClick:()=>{k(null),T("")},children:c.jsxs("div",{className:"lightbox-shell",onClick:Q=>Q.stopPropagation(),children:[c.jsxs("div",{className:"lightbox-bar",children:[c.jsxs("div",{className:"lightbox-meta",children:[c.jsx("strong",{children:ke.filename}),c.jsxs("span",{className:"lightbox-size",children:[hi(ke.sizeBytes),F.length>1?` · ${fe+1} / ${F.length}`:""]})]}),c.jsxs("div",{className:"lightbox-actions",children:[c.jsxs("button",{type:"button",className:"lightbox-btn",disabled:R===ke.id,onClick:()=>void Ne(ke,!0),children:[c.jsx(Va,{size:14})," ",R===ke.id?"打开中…":"在访达中显示"]}),c.jsx("button",{type:"button",className:"lightbox-btn",onClick:()=>void je(ke),children:ie===ke.id?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:14})," 已复制路径"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:14})," 复制路径"]})}),c.jsx("button",{type:"button",className:"lightbox-btn icon","aria-label":"关闭大图预览",onClick:()=>{k(null),T("")},children:c.jsx(Gt,{size:16})})]})]}),C&&c.jsx("div",{className:"lightbox-error",role:"alert",children:C}),c.jsxs("div",{className:"lightbox-stage",children:[F.length>1&&c.jsx("button",{type:"button",className:"lightbox-nav prev","aria-label":"上一张",onClick:()=>{const Q=(fe-1+F.length)%F.length;k(F[Q].id),T("")},children:c.jsx(cb,{size:20})}),c.jsx("img",{src:ke.url,alt:ke.filename,className:"lightbox-img"}),F.length>1&&c.jsx("button",{type:"button",className:"lightbox-nav next","aria-label":"下一张",onClick:()=>{const Q=(fe+1)%F.length;k(F[Q].id),T("")},children:c.jsx(Ms,{size:20})})]})]})}),U&&c.jsx(vm,{preview:U.doc,localPath:U.doc.localPath,onReveal:async()=>{await jr(U.attachmentId)},onClose:()=>P(null)},U.attachmentId),c.jsx(Qh,{open:!!E,title:"删除附件",description:E?`确定删除「${E.filename}」吗?删除后将无法恢复。`:"",confirmLabel:"删除附件",tone:"danger",pending:I,onConfirm:()=>void A(),onCancel:()=>D(null)})]})});function Gs(n){const i=new Date(n),l=new Date,s=i.getFullYear()===l.getFullYear()&&i.getMonth()===l.getMonth()&&i.getDate()===l.getDate(),u=i.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1});return s?u:`${i.getMonth()+1}/${i.getDate()} ${u}`}function Ka(n,i){return n!=null&&n.enabled?!n.projectId||n.projectId===i:!1}function gA(n,i){return i?n.filter(l=>Ka(l,i)):n.filter(l=>l.enabled)}function Jd(n,i){return{expectedVersion:n,checklistOps:[i]}}function yA(n){return n instanceof Error&&"status"in n&&n.status===409}function Wd(n,i){return yA(n)?{message:"清单已被其他协作者更新,已为你刷新最新内容,请核对后再操作",isConflict:!0}:{message:n instanceof Error&&n.message?n.message:i,isConflict:!1}}function xA(n,i){if(i===null)return[];const l=i.toLowerCase();return n.filter(s=>s.enabled&&(s.name.toLowerCase().includes(l)||s.driver.toLowerCase().includes(l)))}function bm(n,i,l){return Ka(n,l)?n:Ka(i,l)?i:null}function vA(n){const{mentions:i,replyTo:l,effectiveDefaultAgent:s,hasEnabledAgent:u,projectId:o,agentById:d}=n;if(i.length>0){const m=[],p=[];for(const g of i){const x=d.get(g);Ka(x,o)?x&&!p.includes(x.name)&&p.push(x.name):m.push(x?x.name:g.slice(0,6))}return m.length>0?{text:`${m.join("、")} 已暂停或不可用,请先移除再发表`,blockedByDisabledMention:!0}:{text:`将唤醒 ${p.join("、")}`,blockedByDisabledMention:!1}}return(l==null?void 0:l.actorKind)==="agent"?{text:Ka(d.get(l.actorId),o)?`将回复 ${l.actorName}`:`仅记录评论(${l.actorName} 已暂停)`,blockedByDisabledMention:!1}:s?{text:`默认唤醒 ${s.name}`,blockedByDisabledMention:!1}:{text:u?"输入 @ 可指定 Agent":"暂无启用中的 Agent,评论将仅作记录",blockedByDisabledMention:!1}}function bA({type:n}){return n==="card_created"?c.jsx(gb,{size:12}):n==="status_changed"?c.jsx(Z2,{size:12}):n==="card_updated"?c.jsx(mb,{size:12}):n==="output_added"?c.jsx(wl,{size:12}):n==="revision_reverted"?c.jsx(pb,{size:12}):c.jsx(fb,{size:12})}function eh(n,i){const l=n[i];if(i==="body")return typeof l=="string"&&l.trim()?l:"(空)";if(i==="title")return String(l??"");if(i==="priority")return Vh[l]??String(l??"");if(i==="tags")return Array.isArray(l)&&l.length?l.map(s=>`#${s}`).join(" "):"(无标签)";if(i==="checklist"){const s=Array.isArray(l)?l:[];return s.length?s.map(u=>`${u.done?"[x]":"[ ]"} ${u.text}`).join(`
|
|
352
|
+
`):"(空清单)"}return JSON.stringify(l??"")}function SA({open:n,auditEvents:i,revisions:l,onClose:s}){const[u,o]=N.useState({}),[d,m]=N.useState(null),p=N.useRef(void 0);N.useEffect(()=>()=>window.clearTimeout(p.current),[]);const g=N.useMemo(()=>{const y=new Map;for(const S of l)y.set(S.id,S);return y},[l]);if(!n)return null;async function x(y,S){const b=S.map(k=>eh(y.beforeSnapshot,k)).join(`
|
|
353
|
+
|
|
354
|
+
`);try{await navigator.clipboard.writeText(b),m(y.id),window.clearTimeout(p.current),p.current=window.setTimeout(()=>m(k=>k===y.id?null:k),1800)}catch{}}return c.jsx("div",{className:"audit-modal-overlay",onClick:s,children:c.jsxs("div",{className:"audit-modal",role:"dialog","aria-modal":"true","aria-label":"只读审计记录",onClick:y=>y.stopPropagation(),children:[c.jsxs("header",{className:"audit-modal-head",children:[c.jsxs("div",{className:"drawer-header-title",children:[c.jsx(Mh,{size:16}),c.jsx("h3",{children:"审计记录"}),c.jsx("span",{className:"pill-count",children:i.length}),c.jsx("span",{className:"muted xs",children:"只读追溯 · 最新在前"})]}),c.jsx("button",{type:"button",className:"icon-btn has-tooltip tooltip-right","data-tooltip":"关闭 (Esc)","aria-label":"关闭审计记录",onClick:s,children:c.jsx(Gt,{size:16})})]}),c.jsx("div",{className:"audit-modal-body",children:i.length===0?c.jsx("p",{className:"empty-state",children:"暂无审计记录。"}):c.jsx("div",{className:"audit-timeline",children:i.map(y=>{var G;const S=typeof y.data.revisionId=="string"?y.data.revisionId:null,b=S?g.get(S):void 0,k=Array.isArray(y.data.changedFields)?y.data.changedFields:[],C=!!(S&&u[S]),T=y.data.fromStatus,E=y.data.toStatus,D=typeof y.data.note=="string"?y.data.note:"",I=(G=y.data.output)==null?void 0:G.label;return c.jsxs("div",{className:"audit-item",children:[c.jsxs("div",{className:"audit-row",children:[c.jsx("span",{className:`audit-node ${y.type}`,children:c.jsx(bA,{type:y.type})}),c.jsxs("div",{className:"audit-main",children:[c.jsx("strong",{className:"audit-actor",children:y.actorName}),y.type==="card_created"&&c.jsx("span",{className:"audit-desc",children:"创建了卡片"}),y.type==="status_changed"&&c.jsxs("span",{className:"audit-desc status-flow",children:[T&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:`mini-status ${T}`,children:Is[T]}),c.jsx(Y2,{size:11,className:"muted"})]}),c.jsx("span",{className:`mini-status ${E??"todo"}`,children:E?Is[E]:String(y.data.toStatus)}),D&&c.jsxs("span",{className:"audit-note",children:["· ",D]})]}),y.type==="card_updated"&&c.jsx("span",{className:"audit-desc",children:String(y.data.summary??"更新了卡片")}),y.type==="output_added"&&c.jsxs("span",{className:"audit-desc",children:["挂载了产出 ",c.jsxs("strong",{children:["「",I??"","」"]})]}),y.type==="revision_reverted"&&c.jsx("span",{className:"audit-desc",children:String(y.data.summary??"恢复了历史版本")}),y.type==="agent_stop_requested"&&c.jsxs("span",{className:"audit-desc",children:["请求停止 ",String(y.data.agentName??"Agent")]}),b&&k.length>0&&c.jsxs("button",{type:"button",className:"audit-diff-toggle",onClick:()=>o(ie=>({...ie,[b.id]:!ie[b.id]})),children:[c.jsx(F2,{size:11}),C?"收起差异":"查看差异"]})]}),c.jsx("time",{className:"audit-time",children:Gs(y.createdAt)})]}),b&&C&&c.jsxs("div",{className:"audit-diff-box",children:[c.jsxs("div",{className:"audit-diff-head",children:[c.jsxs("span",{children:["只读审计快照 · v",b.version]}),c.jsx("button",{type:"button",className:"btn ghost xs has-tooltip tooltip-right","data-tooltip":"复制修改前的内容以便手动编辑复用",onClick:()=>void x(b,k),children:d===b.id?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:11})," 已复制旧版"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:11})," 复制旧版"]})})]}),c.jsxs("div",{className:"audit-diff-grid",children:[c.jsxs("div",{className:"diff-col before",children:[c.jsx("span",{className:"diff-label",children:"修改前"}),c.jsx("pre",{children:k.map(ie=>eh(b.beforeSnapshot,ie)).join(`
|
|
355
|
+
`)})]}),c.jsxs("div",{className:"diff-col after",children:[c.jsx("span",{className:"diff-label",children:"修改后"}),c.jsx("pre",{children:k.map(ie=>eh(b.afterSnapshot,ie)).join(`
|
|
356
|
+
`)})]})]})]})]},y.id)})})})]})})}const kA=20;function wA(n,i){const l=new Set(n.map(d=>d.agentId)),s=new Map,u=[];for(const d of i){if(!l.has(d.agentId)){u.push(d);continue}const m=s.get(d.agentId);m?m.push(d):s.set(d.agentId,[d])}return{byParticipant:n.map(d=>{const m=s.get(d.agentId)??[],p=m.find(x=>x.status==="running")??null,g=p??m[0]??null;return{participant:d,runs:m,runningRun:p,primaryRun:g}}),orphanRuns:u}}function NA(n){return n.processing?{tone:"running",rowClass:"is-running",dotClass:"pulse-dot",activityLabel:n.activityText||"正在执行…",activityTooltip:void 0}:n.lastOutcome==="failed"?{tone:"failed",rowClass:"is-failed",dotClass:"dot danger",activityLabel:n.lastOutcomeSummary?`上轮执行失败:${n.lastOutcomeSummary}`:"上轮执行失败",activityTooltip:n.lastOutcomeSummary||void 0}:n.lastOutcome==="no_write"?{tone:"no_write",rowClass:"is-no-write",dotClass:"dot warning",activityLabel:"上轮未写入卡片",activityTooltip:n.lastOutcomeSummary||"执行已结束但未写入更新,可重新 @ 重试"}:n.state==="paused"||n.lastOutcome==="stopped"?{tone:"stopped",rowClass:"",dotClass:n.state==="paused"?"dot warning":"dot muted",activityLabel:n.lastOutcomeSummary||n.activityText||"已停止",activityTooltip:n.lastOutcomeSummary||void 0}:{tone:"idle",rowClass:"",dotClass:"dot muted",activityLabel:"空闲",activityTooltip:void 0}}function Kv(n){const{runs:i,processing:l}=n;if(i.length>1)return`${i.length} 轮`;if(i.length===1){const s=i[0];return s.stepCount>0?`${s.stepCount} 步`:s.status==="running"?"执行中":"1 轮"}return l?"准备中":null}function V1(n){return n==="running"?"is-running":n==="completed"?"is-completed":n==="failed"?"is-failed":"is-warning"}function CA(n,i){var u,o;const l=n.findIndex(d=>d.id===i.runId);if(l>=0){const d=n[l],m=new Set(d.steps.map(b=>b.seq)),p=i.steps.filter(b=>!m.has(b.seq)),g=p.length>0?[...d.steps,...p]:d.steps,x=g.length>Rd?g.slice(-Rd):g,y={...d,status:i.status,workDir:i.workDir??d.workDir,branch:i.branch??d.branch,summary:i.summary!==void 0?i.summary:d.summary,steps:x,stepCount:Math.max(d.stepCount,i.stepCount),truncated:i.truncated||Math.max(d.stepCount,i.stepCount)>x.length,finishedAt:i.finishedAt??d.finishedAt,updatedAt:i.finishedAt??((u=p.at(-1))==null?void 0:u.at)??new Date().toISOString()},S=[...n];return S[l]=y,S}return[{id:i.runId,projectId:i.projectId,cardId:i.cardId,agentId:i.agentId,agentName:i.agentName,driver:i.driver,triggerEventId:null,status:i.status,workDir:i.workDir,branch:i.branch,summary:i.summary,steps:i.steps.slice(-Rd),stepCount:i.stepCount,truncated:i.truncated,startedAt:i.startedAt,finishedAt:i.finishedAt,updatedAt:i.finishedAt??((o=i.steps.at(-1))==null?void 0:o.at)??i.startedAt},...n].slice(0,kA)}function $1(n,i){if(!i)return null;const l=Date.parse(n),s=Date.parse(i);if(!Number.isFinite(l)||!Number.isFinite(s)||s<l)return null;const u=Math.round((s-l)/1e3);if(u<1)return"<1s";if(u<60)return`${u}s`;const o=Math.floor(u/60),d=u%60;if(o<60)return d>0?`${o}m ${d}s`:`${o}m`;const m=Math.floor(o/60),p=o%60;return p>0?`${m}h ${p}m`:`${m}h`}function jA(n){const i=new Date(n);return Number.isNaN(i.getTime())?"":i.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}const Z1={running:"执行中",completed:"已完成",no_write:"未写入",failed:"执行失败",stopped:"已停止"};function EA(n){switch(n){case"slate":return c.jsx(gb,{size:12,"aria-hidden":"true"});case"command":return c.jsx(ak,{size:12,"aria-hidden":"true"});case"tool":return c.jsx(lk,{size:12,"aria-hidden":"true"});case"message":return c.jsx(Lh,{size:12,"aria-hidden":"true"});default:return c.jsx($2,{size:12,"aria-hidden":"true"})}}function Y1({run:n}){const i=N.useRef(null),l=N.useRef(!1),s=n.stepCount,u=n.steps.length;return N.useEffect(()=>{if(n.status!=="running"||s===0&&u===0)return;const o=i.current;if(!o)return;if(!l.current){l.current=!0,o.scrollTop=o.scrollHeight;return}o.scrollHeight-o.scrollTop-o.clientHeight<64&&(o.scrollTop=o.scrollHeight)},[n.status,s,u]),n.steps.length===0?c.jsx("div",{className:"run-step-empty",children:n.status==="running"?"正在初始化执行环境…":"本轮未记录细分步骤"}):c.jsx("ol",{ref:i,className:"run-step-list",children:n.steps.map(o=>c.jsxs("li",{className:`run-step-item kind-${o.kind}`,children:[c.jsx("span",{className:`run-step-icon kind-${o.kind}`,children:EA(o.kind)}),c.jsxs("div",{className:"run-step-main",children:[c.jsxs("div",{className:"run-step-row",children:[c.jsx("span",{className:"run-step-title",children:o.title}),c.jsx("span",{className:"run-step-time",children:jA(o.at)})]}),o.detail&&c.jsx("div",{className:`run-step-detail${o.kind==="command"||o.kind==="slate"||o.kind==="tool"?" is-mono":""}`,title:o.detail,children:o.detail})]})]},o.seq))})}function Pv({run:n,isOpen:i,showAgentIdentity:l,parentBranch:s,onToggle:u}){const o=$1(n.startedAt,n.finishedAt),d=V1(n.status),m=!!(n.branch&&(l||n.branch!==s));return c.jsxs("div",{className:`run-card-item ${d}`,children:[c.jsxs("button",{type:"button",className:"run-card-head","aria-expanded":i,onClick:()=>u(n.id),children:[c.jsxs("span",{className:"run-card-head-left",children:[i?c.jsx(Ds,{size:13,"aria-hidden":"true"}):c.jsx(Ms,{size:13,"aria-hidden":"true"}),l&&c.jsxs(c.Fragment,{children:[c.jsx(Zo,{variant:n.driver,size:"sm"}),c.jsx("strong",{className:"run-card-agent",children:n.agentName})]}),c.jsxs("span",{className:`run-status-pill ${d}`,children:[n.status==="running"&&c.jsx("span",{className:"pulse-dot"}),Z1[n.status]]}),!i&&n.summary&&c.jsx("span",{className:"run-head-summary",title:n.summary,children:n.summary})]}),c.jsxs("span",{className:"run-card-head-right",children:[c.jsxs("span",{className:"run-meta-item",children:[n.stepCount," 步"]}),o&&c.jsx("span",{className:"run-meta-item",children:o}),c.jsx("span",{className:"run-meta-item",children:Gs(n.startedAt)})]})]}),i&&c.jsxs("div",{className:"run-card-content",children:[(m||n.summary||n.truncated)&&c.jsxs("div",{className:"run-card-meta-bar",children:[m&&n.branch&&c.jsxs("span",{className:"branch-chip",title:n.workDir??n.branch,children:[c.jsx(Rs,{size:11,"aria-hidden":"true"})," ",n.branch]}),n.summary&&c.jsx("span",{className:`run-summary-note ${d}`,title:n.summary,children:n.summary}),n.truncated&&c.jsxs("span",{className:"run-truncated-note",children:["已保留最近 ",n.steps.length," 步(本轮共 ",n.stepCount," 步)"]})]}),c.jsx(Y1,{run:n})]})]})}function _A({cardId:n,participants:i,pending:l,subscribeRunSteps:s,onStopAgent:u}){const[o,d]=N.useState([]),[m,p]=N.useState(!0),[g,x]=N.useState(""),[y,S]=N.useState(!1),[b,k]=N.useState({}),[C,T]=N.useState(!1),[E,D]=N.useState({}),I=N.useRef({}),G=N.useRef(null),ie=N.useCallback(async(ee=!1)=>{var ce;(ce=G.current)==null||ce.abort();const ge=new AbortController;G.current=ge,ee&&S(!0),p(!0),x("");try{const F=await ew(n,15,ge.signal);ge.signal.aborted||d(F.runs)}catch(F){ge.signal.aborted||x(F instanceof Error?F.message:"加载执行记录失败")}finally{ge.signal.aborted||p(!1)}},[n]);N.useEffect(()=>(ie(!1),()=>{var ee;return(ee=G.current)==null?void 0:ee.abort()}),[ie]),N.useEffect(()=>s(ee=>{ee.cardId===n&&d(ge=>CA(ge,ee))}),[n,s]);const{byParticipant:O,orphanRuns:R}=N.useMemo(()=>wA(i,o),[i,o]),V=N.useMemo(()=>R.find(ee=>ee.status==="running")??R[0]??null,[R]);if(N.useEffect(()=>{const ee=[];for(const ge of O){const ce=ge.participant.agentId;!b[ce]||ge.runs.length<=1||!ge.primaryRun||I.current[ce]!==ge.primaryRun.id&&(I.current[ce]=ge.primaryRun.id,ee.push(ge.primaryRun.id))}C&&V&&I.current.__orphan!==V.id&&(I.current.__orphan=V.id,ee.push(V.id)),ee.length>0&&D(ge=>{let ce=!1;const F={...ge};for(const ue of ee)F[ue]||(F[ue]=!0,ce=!0);return ce?F:ge})},[O,b,C,V]),i.length===0&&o.length===0&&!g&&!y)return null;const ae=ee=>{k(ge=>({...ge,[ee]:!ge[ee]}))},H=ee=>{D(ge=>({...ge,[ee]:!ge[ee]}))},U=O.some(ee=>b[ee.participant.agentId]&&ee.runs.length===0&&!!Kv({runs:ee.runs,processing:ee.participant.processing})),P=o.length===0&&!U&&(!!g||y&&m);return c.jsxs("section",{className:"clean-section collaborators-section","aria-label":"协作者与执行过程",children:[i.length>0&&c.jsx("div",{className:"section-row",children:c.jsxs("h3",{children:["协作者 (",i.length,")"]})}),(O.length>0||R.length>0)&&c.jsxs("div",{className:"participant-list",children:[O.map(({participant:ee,runs:ge,runningRun:ce,primaryRun:F})=>{const ue=NA(ee),fe=ee.branch??(F==null?void 0:F.branch)??null,ke=ee.workDir??(F==null?void 0:F.workDir)??null,j=Kv({runs:ge,processing:ee.processing}),je=!!b[ee.agentId],Ne=ge.length===1?ge[0]:null;return c.jsxs("div",{className:`participant-item ${ue.rowClass}`,children:[c.jsxs("div",{className:"participant-row",children:[c.jsxs("div",{className:"participant-left",children:[c.jsx("span",{className:ue.dotClass}),c.jsx(Zo,{variant:ee.driver,size:"sm"}),c.jsx("strong",{className:"participant-name",children:ee.agentName}),Xa(ee.agentName,ee.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[ee.driver]}),c.jsx("span",{className:`participant-activity${ue.tone==="failed"?" is-failed":ue.tone==="no_write"?" is-no-write":""}${ue.activityTooltip?" has-tooltip":""}`,...ue.activityTooltip?{"data-tooltip":ue.activityTooltip}:{},children:ue.activityLabel})]}),c.jsxs("div",{className:"participant-right",children:[fe&&c.jsxs("span",{className:"branch-chip has-tooltip","data-tooltip":ke??fe,children:[c.jsx(Rs,{size:11,"aria-hidden":"true"})," ",fe]}),ee.processing&&c.jsxs("button",{type:"button",className:"btn ghost xs danger has-tooltip tooltip-right","data-tooltip":"中止该 Agent 本轮执行",disabled:l,onClick:()=>void u(ee.agentId),children:[c.jsx(fb,{size:12})," 停止"]}),j&&c.jsxs("button",{type:"button",className:`participant-steps-toggle${ce?" is-running":""}${je?" is-open":""}`,"aria-expanded":je,"aria-label":`${ee.agentName} 执行过程(${j})`,onClick:()=>ae(ee.agentId),children:[c.jsx("span",{children:j}),je?c.jsx(Ds,{size:13,"aria-hidden":"true"}):c.jsx(Ms,{size:13,"aria-hidden":"true"})]})]})]}),je&&j&&c.jsx("div",{className:"participant-runs-panel",children:m&&ge.length===0?c.jsx("div",{className:"run-history-state",children:"正在加载执行记录…"}):g&&ge.length===0?c.jsxs("div",{className:"run-history-state is-error",role:"alert",children:[c.jsx("span",{children:g}),c.jsxs("button",{type:"button",className:"btn ghost xs",onClick:()=>void ie(!0),children:[c.jsx(Yx,{size:12,"aria-hidden":"true"})," 重试"]})]}):ge.length===0?c.jsx("div",{className:"run-history-state",children:ee.processing?"等待 Agent 上报执行步骤…":"暂无执行步骤记录"}):Ne?(()=>{const _=V1(Ne.status),A=$1(Ne.startedAt,Ne.finishedAt),te=!!(Ne.branch&&Ne.branch!==ee.branch);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"run-single-meta",children:[c.jsxs("span",{className:`run-status-pill ${_}`,children:[Ne.status==="running"&&c.jsx("span",{className:"pulse-dot"}),Z1[Ne.status]]}),te&&Ne.branch&&c.jsxs("span",{className:"branch-chip",title:Ne.workDir??Ne.branch,children:[c.jsx(Rs,{size:11,"aria-hidden":"true"})," ",Ne.branch]}),Ne.summary&&c.jsx("span",{className:`run-summary-note ${_}`,title:Ne.summary,children:Ne.summary}),Ne.truncated&&c.jsxs("span",{className:"run-truncated-note",children:["已保留最近 ",Ne.steps.length," 步(共 ",Ne.stepCount," 步)"]}),c.jsxs("span",{className:"run-single-meta-right",children:[c.jsxs("span",{children:[Ne.stepCount," 步"]}),A&&c.jsx("span",{children:A}),c.jsx("span",{children:Gs(Ne.startedAt)})]})]}),c.jsx(Y1,{run:Ne})]})})():c.jsx("div",{className:"run-card-list",children:ge.map(_=>c.jsx(Pv,{run:_,isOpen:!!E[_.id],showAgentIdentity:!1,parentBranch:ee.branch,onToggle:H},_.id))})})]},ee.agentId)}),R.length>0&&c.jsxs("div",{className:"participant-item is-orphan",children:[c.jsxs("div",{className:"participant-row",children:[c.jsxs("div",{className:"participant-left",children:[c.jsx(Mh,{size:13,className:"muted","aria-hidden":"true"}),c.jsx("strong",{className:"participant-name",children:"其他历史记录"}),c.jsx("span",{className:"participant-activity",children:"未在当前协作者列表中的执行轮次"})]}),c.jsx("div",{className:"participant-right",children:c.jsxs("button",{type:"button",className:`participant-steps-toggle${C?" is-open":""}`,"aria-expanded":C,"aria-label":`其他历史记录(${R.length} 轮)`,onClick:()=>T(ee=>!ee),children:[c.jsxs("span",{children:[R.length," 轮"]}),C?c.jsx(Ds,{size:13,"aria-hidden":"true"}):c.jsx(Ms,{size:13,"aria-hidden":"true"})]})})]}),C&&c.jsx("div",{className:"participant-runs-panel",children:c.jsx("div",{className:"run-card-list",children:R.map(ee=>c.jsx(Pv,{run:ee,isOpen:!!E[ee.id],showAgentIdentity:!0,parentBranch:null,onToggle:H},ee.id))})})]})]}),P&&(g?c.jsxs("div",{className:"run-history-state is-error",role:"alert",children:[c.jsx("span",{children:g}),c.jsxs("button",{type:"button",className:"btn ghost xs",onClick:()=>void ie(!0),children:[c.jsx(Yx,{size:12,"aria-hidden":"true"})," 重试"]})]}):c.jsx("div",{className:"run-history-state",children:"正在加载执行记录…"}))]})}const TA={pending:"等待响应",processing:"正在处理",responded:"已响应",no_write:"已结束 · 未写入卡片",failed:"执行失败",stopped:"已停止"};function AA(n){return n==="processing"?"pulse-dot":n==="responded"?"dot tiny success":n==="failed"?"dot tiny danger":n==="stopped"?"dot tiny muted":"dot tiny warning"}function zA(n,i){if(i)return i;if(n==="no_write")return"执行已结束但未写入更新,可重新 @ 重试";if(n==="failed")return"本轮执行未正常完成";if(n==="stopped")return"本轮执行已停止"}let Jv=0;function OA({ref:n,projectId:i,comments:l,agents:s,projectAgents:u,effectiveDefaultAgent:o,pending:d,onSubmitComment:m}){const[p,g]=N.useState(""),[x,y]=N.useState([]),[S,b]=N.useState(null),[k,C]=N.useState(null),[T,E]=N.useState(0),[D,I]=N.useState([]),[G,ie]=N.useState([]),[O,R]=N.useState(()=>new Set),[V,ae]=N.useState(""),[H,U]=N.useState(!1),[P,ee]=N.useState(null),[ge,ce]=N.useState(""),[F,ue]=N.useState(null),[fe,ke]=N.useState(null),[j,je]=N.useState(null),[Ne,_]=N.useState(null),A=N.useRef(null),te=N.useRef(null),me=N.useRef(null),we=N.useRef(void 0),Q=N.useRef(void 0),ye=N.useRef(D.length+G.length);ye.current=D.length+G.length,N.useEffect(()=>()=>{window.clearTimeout(we.current),window.clearTimeout(Q.current)},[]),N.useEffect(()=>{if(!P||P.images.length<=1)return;const L=he=>{he.key==="ArrowLeft"?(he.preventDefault(),ee(Te=>Te?{...Te,index:(Te.index-1+Te.images.length)%Te.images.length}:null),ce("")):he.key==="ArrowRight"&&(he.preventDefault(),ee(Te=>Te?{...Te,index:(Te.index+1)%Te.images.length}:null),ce(""))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[P]);const Ee=N.useMemo(()=>{const L=new Map;for(const he of s)L.set(he.id,he);return L},[s]),ve=N.useMemo(()=>u.filter(L=>L.enabled),[u]),Z=N.useMemo(()=>xA(u,k),[u,k]),Re=T<Z.length?T:0;function Se(){var L;(L=te.current)==null||L.scrollIntoView({behavior:"smooth",block:"center"}),window.clearTimeout(we.current),we.current=window.setTimeout(()=>{var he;return(he=A.current)==null?void 0:he.focus()},200)}function Ke(L,he=!1){var Te;L.enabled&&(y(Fe=>Fe.includes(L.id)?Fe:[...Fe,L.id]),k!==null?g(Fe=>Fe.replace(/@[^\s@]*$/,`@${L.name} `)):p.includes(`@${L.name}`)||g(Fe=>`${Fe?`${Fe} `:""}@${L.name} `),C(null),E(0),he?Se():(Te=A.current)==null||Te.focus())}N.useImperativeHandle(n,()=>({jumpToComposer:Se,insertMention:Ke,dismissMentionPopover:()=>k===null?!1:(C(null),!0),dismissLightbox:()=>Ne?(_(null),!0):P?(ee(null),ce(""),!0):!1}));async function Ge(L){try{await navigator.clipboard.writeText(L.localPath),ue(L.id),window.clearTimeout(Q.current),Q.current=window.setTimeout(()=>ue(null),1800)}catch{}}async function Le(L,he=!1){if(fe!==L.id){ke(L.id),he?ce(""):ae("");try{await jr(L.id)}catch(Te){const Fe=Te instanceof Error?Te.message:"无法在访达中显示该文件";he?ce(Fe):ae(Fe)}finally{ke(Te=>Te===L.id?null:Te)}}}async function ne(L){if(j!==L.id){je(L.id),ae("");try{const he=await zb(L.id);_({attachmentId:L.id,doc:{label:he.filename,path:he.filename,filename:he.filename,mimeType:he.mimeType,localPath:he.localPath,content:he.content,truncated:he.truncated}})}catch(he){ae(he instanceof Error?he.message:"无法预览文件内容")}finally{je(he=>he===L.id?null:he)}}}const Be=N.useCallback(async L=>{if(d||L.length===0)return;const{valid:he,error:Te}=Ph(L,ye.current,_s);if(ae(Te??""),he.length===0)return;const Fe=he.map(jt=>(Jv+=1,{tempId:`cmt-up-${Jv}`,file:jt,filename:Kh(jt)}));ie(jt=>[...jt,...Fe.map(Et=>({tempId:Et.tempId,filename:Et.filename}))]),ye.current+=Fe.length;const wt=[];for(const jt of Fe)try{const Et=await Yh({projectId:i,file:jt.file,filename:jt.filename});I(Ze=>[...Ze,Et])}catch(Et){wt.push(`${jt.filename}:${Et instanceof Error?Et.message:"添加失败"}`)}finally{ie(Et=>Et.filter(Ze=>Ze.tempId!==jt.tempId))}wt.length>0&&ae(jt=>[jt,...wt].filter(Boolean).join(";"))},[d,i]);async function at(L){if(!(d||O.has(L.id))){R(he=>new Set(he).add(L.id)),ae("");try{await Gh(L.id),I(he=>he.filter(Te=>Te.id!==L.id))}catch(he){ae(he instanceof Error?he.message:"移除附件失败")}finally{R(he=>{const Te=new Set(he);return Te.delete(L.id),Te})}}}function He(L){if(d)return;const he=Jh(L.clipboardData);he.length!==0&&(L.preventDefault(),L.stopPropagation(),Be(he))}function Ct(L){if(L.preventDefault(),L.stopPropagation(),U(!1),d)return;const he=Array.from(L.dataTransfer.files??[]);he.length>0&&Be(he)}function qt(L){g(L);const he=/(?:^|\s)@([^\s@]*)$/.exec(L);he?(C(he[1]),E(0)):C(null)}function ln(L){if(!L.nativeEvent.isComposing){if(k!==null&&Z.length>0){if(L.key==="ArrowDown"){L.preventDefault(),E(he=>(he+1)%Z.length);return}if(L.key==="ArrowUp"){L.preventDefault(),E(he=>(he-1+Z.length)%Z.length);return}if(L.key==="Enter"||L.key==="Tab"){L.preventDefault();const he=Z[Re]??Z[0];he&&Ke(he);return}if(L.key==="Escape"){L.preventDefault(),L.stopPropagation(),C(null);return}}else if(k!==null&&L.key==="Escape"){L.preventDefault(),L.stopPropagation(),C(null);return}L.key==="Enter"&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),J())}}const St=vA({mentions:x,replyTo:S,effectiveDefaultAgent:o,hasEnabledAgent:ve.length>0,projectId:i,agentById:Ee}),En=!d&&G.length===0&&!St.blockedByDisabledMention&&(!!p.trim()||D.length>0);async function J(L){if(L==null||L.preventDefault(),!En)return;const he=p.trim(),Te=D.map(wt=>wt.id);await m({text:he,mentions:x,...Te.length>0?{attachmentIds:Te}:{},...S?{replyTo:S.id}:{}})&&(g(""),y([]),b(null),C(null),I([]),ae(""))}const de=D.length+G.length,_e=P?P.images[P.index]??null:null;return c.jsxs("section",{className:"issue-comments-area","aria-label":"评论区",children:[c.jsx("div",{className:"issue-comments-head",children:c.jsxs("div",{className:"issue-comments-title",children:[c.jsx("h3",{children:"评论"}),c.jsx("span",{className:"pill-count",children:l.length})]})}),l.length>0&&c.jsx("div",{className:"pure-comments-list",children:l.map(L=>{var kn;const he=Array.isArray(L.data.mentionNames)?L.data.mentionNames:[],Te=L.actorKind==="agent"?(kn=Ee.get(L.actorId))==null?void 0:kn.driver:void 0,Fe=String(L.data.text??""),wt=he.filter(ze=>!Fe.includes(`@${ze}`)),jt=L.attachments??[],Et=jt.filter(ze=>ze.kind==="image"),Ze=jt.filter(ze=>ze.kind==="file");return c.jsxs("article",{className:`issue-comment-card ${L.actorKind}`,children:[c.jsxs("header",{className:"issue-comment-head",children:[c.jsxs("div",{className:"issue-comment-author",children:[c.jsx(Zo,{variant:L.actorKind==="agent"?Te??"agents":"human"}),c.jsx("strong",{children:L.actorName}),Xa(L.actorName,Te)&&c.jsx("span",{className:"driver-badge xs",children:jn[Te]}),c.jsx("time",{className:"comment-time",children:Gs(L.createdAt)})]}),c.jsxs("div",{className:"issue-comment-head-right",children:[L.responses&&L.responses.length>0&&c.jsx("div",{className:"response-pills",children:L.responses.map(ze=>{const gt=zA(ze.status,ze.summary);return c.jsxs("span",{className:`resp-status ${ze.status}${gt?" has-tooltip tooltip-right":""}`,...gt?{"data-tooltip":gt}:{},children:[c.jsx("span",{className:AA(ze.status)}),c.jsxs("span",{children:[ze.agentName," · ",TA[ze.status]]})]},ze.agentId)})}),L.actorKind==="agent"&&c.jsxs("button",{type:"button",className:"reply-btn has-tooltip tooltip-right","data-tooltip":Ka(Ee.get(L.actorId),i)?`定向回复 ${L.actorName}`:`回复 ${L.actorName}(已暂停,仅记录评论)`,onClick:()=>{b(L),Se()},children:[c.jsx(Zx,{size:12})," 回复"]})]})]}),c.jsxs("div",{className:"issue-comment-body",children:[wt.length>0&&c.jsx("div",{className:"mention-chips",children:wt.map(ze=>c.jsxs("span",{className:"mention-chip",children:["@",ze]},ze))}),Fe&&c.jsx(Hs,{content:Fe,compact:!0,mentionNames:he,className:"comment-md"}),Et.length>0&&c.jsx("div",{className:"comment-image-grid",children:Et.map((ze,gt)=>c.jsxs("button",{type:"button",className:"comment-image-btn",onClick:()=>{ce(""),ee({images:Et,index:gt})},"aria-label":`预览图片 ${ze.filename}`,title:`${ze.filename} (${hi(ze.sizeBytes)})`,children:[c.jsx("img",{src:ze.url,alt:ze.filename,loading:"lazy"}),c.jsx("span",{className:"attachment-image-zoom","aria-hidden":"true",children:c.jsx(Uh,{size:14})})]},ze.id))}),Ze.length>0&&c.jsx("div",{className:"comment-file-list",children:Ze.map(ze=>{const gt=Fh(ze),Xt=F===ze.id;return c.jsxs("div",{className:"comment-file-chip",children:[c.jsxs("button",{type:"button",className:"comment-file-main",disabled:j===ze.id||fe===ze.id,title:gt?`预览 ${ze.filename}`:`在访达中显示 ${ze.filename}`,onClick:()=>{gt?ne(ze):Le(ze)},children:[c.jsx(kr,{size:13,"aria-hidden":"true"}),c.jsx("span",{className:"comment-file-name",children:j===ze.id?"加载中…":ze.filename}),c.jsx("small",{className:"muted xs",children:hi(ze.sizeBytes)})]}),c.jsxs("div",{className:"comment-file-tools",children:[c.jsx("button",{type:"button",className:"comment-file-tool",disabled:fe===ze.id,title:`在访达中显示:${ze.localPath}`,"aria-label":`在访达中显示 ${ze.filename}`,onClick:()=>void Le(ze),children:c.jsx(Va,{size:12})}),c.jsx("button",{type:"button",className:"comment-file-tool",title:Xt?"已复制路径":`复制路径:${ze.localPath}`,"aria-label":`复制路径 ${ze.filename}`,onClick:()=>void Ge(ze),children:Xt?c.jsx(pi,{size:12}):c.jsx(Za,{size:12})})]})]},ze.id)})})]})]},L.id)})}),c.jsxs("form",{ref:te,className:`issue-composer ${H?"drag-over":""}`,onSubmit:L=>void J(L),onPaste:He,onDragOver:L=>{d||(L.preventDefault(),H||U(!0))},onDragLeave:L=>{L.currentTarget.contains(L.relatedTarget)||U(!1)},onDrop:Ct,children:[(S||x.length>0)&&c.jsxs("div",{className:"issue-composer-context",children:[S&&c.jsxs("div",{className:"reply-pill",children:[c.jsx(Zx,{size:11,"aria-hidden":"true"}),c.jsxs("span",{children:["回复 ",S.actorName]}),c.jsx("button",{type:"button",className:"icon-btn xs",onClick:()=>b(null),"aria-label":"取消回复",children:c.jsx(Gt,{size:11})})]}),x.map(L=>{const he=Ee.get(L),Te=!Ka(he,i);return c.jsxs("span",{className:`mention-chip removable ${Te?"is-disabled":""}`,children:["@",(he==null?void 0:he.name)??L.slice(0,6),Te?"(已暂停)":"",c.jsx("button",{type:"button","aria-label":`取消提及 ${(he==null?void 0:he.name)??"Agent"}`,onClick:()=>y(Fe=>Fe.filter(wt=>wt!==L)),children:c.jsx(Gt,{size:11,"aria-hidden":"true"})})]},L)})]}),c.jsxs("div",{className:"composer-input-wrap",children:[k!==null&&Z.length>0&&c.jsx("div",{className:"mention-popover",role:"listbox","aria-label":"选择要 @ 的 Agent",children:Z.map((L,he)=>c.jsxs("button",{type:"button",className:`mention-option ${he===Re?"active":""}`,onMouseDown:Te=>{Te.preventDefault(),Ke(L)},children:[c.jsx("span",{className:`dot tiny ${L.online?"success":"warning"}`}),c.jsx(Qa,{variant:L.driver,size:13}),c.jsx("strong",{children:L.name}),Xa(L.name,L.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[L.driver]}),c.jsx("span",{className:"muted xs",children:L.online?L.activeCards.length?"忙碌中":"空闲":"离线"})]},L.id))}),c.jsx("textarea",{ref:A,rows:3,value:p,onChange:L=>qt(L.target.value),onKeyDown:ln,placeholder:"写下评论(⌘↵ 发送)",disabled:d})]}),c.jsx("input",{ref:me,type:"file",multiple:!0,hidden:!0,onChange:L=>{const he=Array.from(L.target.files??[]);L.target.value="",he.length>0&&Be(he)}}),de>0&&c.jsxs("div",{className:"attachment-chips composer-attachments",children:[D.map(L=>{const he=O.has(L.id);return c.jsxs("div",{className:"attachment-chip",title:`${L.filename} (${hi(L.sizeBytes)})`,children:[L.kind==="image"?c.jsx("img",{src:L.url,alt:L.filename,className:"attachment-chip-thumb"}):c.jsx("span",{className:"attachment-chip-icon","aria-hidden":"true",children:c.jsx(kr,{size:15})}),c.jsxs("div",{className:"attachment-chip-meta",children:[c.jsx("span",{className:"attachment-chip-name",children:L.filename}),c.jsx("small",{className:"muted xs",children:hi(L.sizeBytes)})]}),c.jsx("button",{type:"button",className:"icon-btn xs attachment-chip-remove","aria-label":`移除附件 ${L.filename}`,disabled:d||he,onClick:()=>void at(L),children:c.jsx(Gt,{size:12})})]},L.id)}),G.map(L=>c.jsxs("div",{className:"attachment-chip uploading","aria-busy":"true",children:[c.jsx("span",{className:"attachment-chip-icon","aria-hidden":"true",children:c.jsx(Rh,{size:14,className:"spin"})}),c.jsxs("div",{className:"attachment-chip-meta",children:[c.jsx("span",{className:"attachment-chip-name",children:L.filename}),c.jsx("small",{className:"muted xs",children:"添加中…"})]})]},L.tempId))]}),V&&c.jsx("div",{className:"inline-add-error",role:"alert",children:V}),c.jsxs("div",{className:"composer-footer",children:[c.jsxs("div",{className:"composer-hint",children:[c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip","data-tooltip":ve.length>0?"插入 @Agent 唤起执行":"暂无可唤起的启用中 Agent",disabled:d||ve.length===0,onClick:()=>{var L;C(""),(L=A.current)==null||L.focus()},children:[c.jsx(G2,{size:12})," 提及 Agent"]}),c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip","data-tooltip":de>=_s?`单条评论最多 ${_s} 个附件`:"添加截图或文件(支持 ⌘V 粘贴或拖拽)",disabled:d||de>=_s,onClick:()=>{var L;return(L=me.current)==null?void 0:L.click()},children:[c.jsx(wl,{size:12})," ",de>0?`附件 (${de})`:"附件"]}),St.text&&c.jsx("span",{className:`composer-route-hint${St.blockedByDisabledMention?" is-warning":""}`,title:St.text,role:St.blockedByDisabledMention?"alert":void 0,children:St.text})]}),c.jsx("button",{type:"submit",className:"btn primary small composer-submit",disabled:!En,children:G.length>0?"添加中…":"发表评论"})]})]}),_e&&P&&c.jsx("div",{className:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":`预览图片 ${_e.filename}`,onClick:()=>{ee(null),ce("")},children:c.jsxs("div",{className:"lightbox-shell",onClick:L=>L.stopPropagation(),children:[c.jsxs("div",{className:"lightbox-bar",children:[c.jsxs("div",{className:"lightbox-meta",children:[c.jsx("strong",{children:_e.filename}),c.jsxs("span",{className:"lightbox-size",children:[hi(_e.sizeBytes),P.images.length>1?` · ${P.index+1} / ${P.images.length}`:""]})]}),c.jsxs("div",{className:"lightbox-actions",children:[c.jsxs("button",{type:"button",className:"lightbox-btn",disabled:fe===_e.id,onClick:()=>void Le(_e,!0),children:[c.jsx(Va,{size:14})," ",fe===_e.id?"打开中…":"在访达中显示"]}),c.jsx("button",{type:"button",className:"lightbox-btn",onClick:()=>void Ge(_e),children:F===_e.id?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:14})," 已复制路径"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:14})," 复制路径"]})}),c.jsx("button",{type:"button",className:"lightbox-btn icon","aria-label":"关闭大图预览",onClick:()=>{ee(null),ce("")},children:c.jsx(Gt,{size:16})})]})]}),ge&&c.jsx("div",{className:"lightbox-error",role:"alert",children:ge}),c.jsxs("div",{className:"lightbox-stage",children:[P.images.length>1&&c.jsx("button",{type:"button",className:"lightbox-nav prev","aria-label":"上一张",onClick:()=>{ee(L=>L?{...L,index:(L.index-1+L.images.length)%L.images.length}:null),ce("")},children:c.jsx(cb,{size:20})}),c.jsx("img",{src:_e.url,alt:_e.filename,className:"lightbox-img"}),P.images.length>1&&c.jsx("button",{type:"button",className:"lightbox-nav next","aria-label":"下一张",onClick:()=>{ee(L=>L?{...L,index:(L.index+1)%L.images.length}:null),ce("")},children:c.jsx(Ms,{size:20})})]})]})}),Ne&&c.jsx(vm,{preview:Ne.doc,localPath:Ne.doc.localPath,onReveal:async()=>{await jr(Ne.attachmentId)},onClose:()=>_(null)},Ne.attachmentId)]})}function DA({projectId:n,agents:i,decisions:l,pending:s,onResolve:u,onDismiss:o}){const[d,m]=N.useState({}),[p,g]=N.useState({}),x=N.useMemo(()=>l.filter(b=>b.status==="pending"),[l]),y=N.useMemo(()=>new Map(i.map(b=>[b.id,b])),[i]);if(x.length===0)return null;async function S(b,k,C){if(!k&&!C)return;await u(b.id,{...k?{optionId:k}:{},...C?{note:C}:{}})&&g(E=>({...E,[b.id]:""}))}return c.jsx("section",{className:"decisions-stack","aria-label":"待你确认的决策",children:x.map(b=>{const k=b.options.find(G=>G.recommended)??b.options[0],C=d[b.id]??(k==null?void 0:k.id)??"",T=p[b.id]??"",E=T.trim(),D=!!(C||E),I=Ka(y.get(b.agentId),n);return c.jsxs("div",{className:"decision-card",children:[c.jsxs("div",{className:"decision-card-head",children:[c.jsxs("div",{className:"decision-card-meta",children:[c.jsx("span",{className:"decision-pill",children:"待确认"}),c.jsx(Qa,{variant:b.driver,size:13}),c.jsx("strong",{children:b.agentName}),Xa(b.agentName,b.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[b.driver]}),c.jsx("time",{className:"muted xs",children:Gs(b.createdAt)})]}),c.jsx("button",{type:"button",className:"btn ghost xs",disabled:s,onClick:()=>void o(b.id),children:"忽略"})]}),c.jsx("p",{className:"decision-question",children:b.question}),b.context&&c.jsx("p",{className:"decision-context",children:b.context}),b.options.length>0&&c.jsx("div",{className:"decision-options",role:"radiogroup","aria-label":b.question,children:b.options.map(G=>{const ie=C===G.id;return c.jsxs("button",{type:"button",role:"radio","aria-checked":ie,className:`decision-option-btn ${ie?"selected":""}`,onClick:()=>m(O=>({...O,[b.id]:G.id})),children:[c.jsx("span",{className:"decision-radio","aria-hidden":"true"}),c.jsxs("span",{className:"decision-option-body",children:[c.jsxs("span",{className:"decision-option-title",children:[c.jsx("span",{children:G.label}),G.recommended&&c.jsx("span",{className:"decision-rec-tag",children:"推荐"})]}),G.description&&c.jsx("span",{className:"decision-option-desc",children:G.description})]})]},G.id)})}),c.jsxs("div",{className:"decision-foot",children:[c.jsx("input",{value:T,onChange:G=>g(ie=>({...ie,[b.id]:G.target.value})),onKeyDown:G=>{(G.metaKey||G.ctrlKey)&&G.key==="Enter"&&D&&!s&&(G.preventDefault(),S(b,C,E))},placeholder:b.options.length>0?"补充说明(可选)…":"输入你的决定或回复…"}),c.jsx("button",{type:"button",className:"btn primary small",disabled:s||!D,onClick:()=>void S(b,C,E),children:I?`确认并唤醒 @${b.agentName}`:`确认决策(@${b.agentName} 已暂停)`})]})]},b.id)})})}const MA={todo:"#2563eb",doing:"#ff6b35",review:"#eab308",done:"#06d6a0"},RA={high:"#ff5a1f",medium:"#2563eb",low:"#06d6a0"};function LA({cardId:n,project:i,agents:l,refreshTick:s,subscribeRunSteps:u,onClose:o,onChanged:d,onSelectCard:m}){const[p,g]=N.useState(null),[x,y]=N.useState(!1),[S,b]=N.useState(""),[k,C]=N.useState(!1),[T,E]=N.useState(!1),[D,I]=N.useState(""),[G,ie]=N.useState(""),[O,R]=N.useState(!1),[V,ae]=N.useState(!1),[H,U]=N.useState(""),[P,ee]=N.useState(""),[ge,ce]=N.useState(!1),[F,ue]=N.useState(""),[fe,ke]=N.useState(""),[j,je]=N.useState(!1),[Ne,_]=N.useState(""),[A,te]=N.useState(null),[me,we]=N.useState(!1),[Q,ye]=N.useState(""),[Ee,ve]=N.useState(""),[Z,Re]=N.useState(!1),[Se,Ke]=N.useState(!1),[Ge,Le]=N.useState(null),[ne,Be]=N.useState(null),[at,He]=N.useState(null),[Ct,qt]=N.useState(null),[ln,St]=N.useState(""),[En,J]=N.useState(!1),[de,_e]=N.useState(!1),[L,he]=N.useState(!1),Te=N.useRef(null),Fe=N.useRef(null),wt=N.useRef(null),jt=N.useRef(null),Et=N.useRef(void 0),Ze=N.useRef(!0),kn=N.useRef(0),ze=N.useRef(0),gt=N.useRef(s),Xt=N.useRef(!1),Ft=N.useRef(!1),$n=N.useRef(!1),_n=N.useCallback(async(M,oe=!1)=>{const Ve=++kn.current;oe&&(y(!0),b(""));try{const yt=await it(`/cards/${M}`);if(!Ze.current||Ve!==kn.current)return;g(yt),b("")}catch(yt){if(!Ze.current||Ve!==kn.current)return;b(yt instanceof Error?yt.message:"加载卡片失败")}finally{Ze.current&&Ve===kn.current&&y(!1)}},[]);async function ei(M,oe,Ve){if(!p)return!1;const yt=p.id;C(!0),Ve!=null&&Ve.onError||b("");try{return await M(yt),Ze.current&&await _n(yt),await d(),Ze.current}catch(Ot){if(Ze.current){const ni=Ot instanceof Error?Ot.message:oe;Ve!=null&&Ve.onError?Ve.onError(ni):b(ni)}return!1}finally{Ze.current&&C(!1)}}N.useEffect(()=>(Ze.current=!0,n&&_n(n,!0),()=>{Ze.current=!1,kn.current+=1,ze.current+=1,window.clearTimeout(Et.current)}),[n,_n]),N.useEffect(()=>{gt.current!==s&&(!n||V||T||(gt.current=s,_n(n)))},[s,n,V,T,_n]),N.useEffect(()=>{if(!n)return;const M=oe=>{var Ve,yt,Ot;if(!(oe.key!=="Escape"||oe.defaultPrevented||oe.isComposing)){if(oe.preventDefault(),Ct){qt(null),St("");return}if(!((Ve=Te.current)!=null&&Ve.dismissLightbox()||(yt=Fe.current)!=null&&yt.dismissLightbox())){if(de){_e(!1);return}if(Ge){Le(null);return}if(!((Ot=Fe.current)!=null&&Ot.dismissMentionPopover())){if(T){O||(Xt.current=!0,ie(""),E(!1));return}if(V){ge||(ee(""),ae(!1));return}if(Z){Se||(ye(""),ve(""),Re(!1));return}o()}}}};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n,Ct,de,Ge,T,O,V,ge,Z,Se,o]);const oa=N.useMemo(()=>l.filter(M=>!p||!M.projectId||M.projectId===p.projectId),[l,p]),le=N.useMemo(()=>oa.filter(M=>M.enabled),[oa]),Oe=N.useMemo(()=>i!=null&&i.defaultAgentId?l.find(M=>M.id===i.defaultAgentId)??null:null,[i==null?void 0:i.defaultAgentId,l]),Me=N.useMemo(()=>p!=null&&p.defaultAgentId?l.find(M=>M.id===p.defaultAgentId)??null:null,[p==null?void 0:p.defaultAgentId,l]),ht=N.useMemo(()=>!Me||Me.enabled||le.some(M=>M.id===Me.id)?le:[...le,Me],[le,Me]),_t=p?bm(Me,Oe,p.projectId):null,{comments:wn,auditEvents:dn}=N.useMemo(()=>{const M=[],oe=[];for(const Ve of(p==null?void 0:p.events)??[])Ve.type==="comment"?M.push(Ve):oe.push(Ve);return oe.reverse(),{comments:M,auditEvents:oe}},[p]);if(!n)return null;async function hn(M,oe){if(!p)return!1;const Ve=p.id;C(!0),oe!=null&&oe.onError||b("");try{const yt=await it(`/cards/${Ve}`,{method:"PATCH",body:JSON.stringify(M)});return Ze.current&&(kn.current+=1,g(yt)),await d(),Ze.current}catch(yt){if(oe!=null&&oe.refreshOnConflict&&yt instanceof Zh&&yt.status===409&&(Ze.current&&await _n(Ve),await d().catch(()=>{})),Ze.current){const Ot=yt instanceof Error?yt.message:"更新卡片失败";oe!=null&&oe.onError?oe.onError(Ot,yt):b(Ot)}return!1}finally{Ze.current&&C(!1)}}function ti(M){return ei(oe=>it(`/cards/${oe}/status`,{method:"POST",body:JSON.stringify({status:M})}).then(()=>{}),"切换状态失败")}function Ut(M,oe){return ei(Ve=>it(`/cards/${Ve}/decisions/${M}/resolve`,{method:"POST",body:JSON.stringify({...oe,wakeAgent:!0})}).then(()=>{}),"提交确认失败")}async function rn(M){await ei(oe=>it(`/cards/${oe}/decisions/${M}/dismiss`,{method:"POST",body:JSON.stringify({})}).then(()=>{}),"忽略失败")}function yi(M){return ei(oe=>it(`/cards/${oe}/comments`,{method:"POST",body:JSON.stringify(M)}).then(()=>{}),"发表评论失败")}async function xi(){if(!p||k||Ft.current)return;const M=D.trim();if(!M||M===p.title){ie(""),E(!1);return}Ft.current=!0,R(!0),ie("");try{await hn({title:M},{onError:Ve=>ie(Ve||"更新标题失败")})&&Ze.current&&(ie(""),E(!1))}finally{Ft.current=!1,Ze.current&&R(!1)}}async function ca(){if(!(!p||k||$n.current)){if(H===p.body){ee(""),ae(!1);return}$n.current=!0,ce(!0),ee("");try{await hn({body:H},{onError:oe=>ee(oe||"保存正文失败")})&&Ze.current&&(ee(""),ae(!1))}finally{$n.current=!1,Ze.current&&ce(!1)}}}async function Qs(M){if(M.preventDefault(),!p||k)return;const oe=F.trim();if(oe){if(p.tags.includes(oe)){ke(`标签「${oe}」已存在`);return}ke(""),je(!0);try{await hn({tags:[...p.tags,oe]},{onError:yt=>ke(yt||"添加标签失败")})&&Ze.current&&(ue(""),requestAnimationFrame(()=>{var yt;return(yt=wt.current)==null?void 0:yt.focus()}))}finally{Ze.current&&je(!1)}}}async function tc(M){!p||k||(ke(""),await hn({tags:p.tags.filter(oe=>oe!==M)},{onError:oe=>ke(oe||"移除标签失败")}))}async function Xs(M){if(M.preventDefault(),!p||k)return;const oe=Ne.trim();if(!oe)return;te(null),we(!0);const Ve=`chk-${crypto.randomUUID().slice(0,12)}`;try{await hn(Jd(p.version,{op:"add",id:Ve,text:oe,done:!1}),{refreshOnConflict:!0,onError:(Ot,ni)=>te(Wd(ni,Ot||"添加清单项失败"))})&&Ze.current&&(_(""),requestAnimationFrame(()=>{var Ot;return(Ot=jt.current)==null?void 0:Ot.focus()}))}finally{Ze.current&&we(!1)}}async function Tr(M){if(!p||k)return;const oe=p.checklist.find(Ve=>Ve.id===M);oe&&(te(null),await hn(Jd(p.version,{op:"update",id:M,done:!oe.done}),{refreshOnConflict:!0,onError:(Ve,yt)=>te(Wd(yt,Ve||"更新清单项状态失败"))}))}async function Ja(M){!p||k||(te(null),await hn(Jd(p.version,{op:"remove",id:M}),{refreshOnConflict:!0,onError:(oe,Ve)=>te(Wd(Ve,oe||"删除清单项失败"))}))}async function nc(M){if(M.preventDefault(),!p||k)return;const oe=Q.trim();if(!oe)return;const Ve=p.projectId;ve(""),Ke(!0);try{await ei(async Ot=>{await it("/cards",{method:"POST",body:JSON.stringify({projectId:Ve,parentId:Ot,title:oe})})},"创建子任务失败",{onError:Ot=>ve(Ot||"创建子任务失败")})&&Ze.current&&(ye(""),ve(""),Re(!1))}finally{Ze.current&&Ke(!1)}}async function Ar(M){if(!p||!M.path&&!M.attachmentId)return;const oe=++ze.current;Be(M.id),b("");try{const Ve=await it(`/cards/${p.id}/outputs/${M.id}/preview`);if(!Ze.current||oe!==ze.current)return;Le(Ve)}catch(Ve){if(!Ze.current||oe!==ze.current)return;b(Ve instanceof Error?Ve.message:"无法预览文件")}finally{Ze.current&&oe===ze.current&&Be(null)}}async function zr(M){if(p){if(M.attachment){await jr(M.attachment.id);return}M.path&&await Wk(p.id,M.id)}}async function zl(M){if(!(!p||at===M.id)){He(M.id),b("");try{await zr(M)}catch(oe){Ze.current&&b(oe instanceof Error?oe.message:"无法在访达中显示该文件")}finally{Ze.current&&He(oe=>oe===M.id?null:oe)}}}async function Or(M){if(at!==M.id){He(M.id),St("");try{await jr(M.id)}catch(oe){Ze.current&&St(oe instanceof Error?oe.message:"无法在访达中显示该文件")}finally{Ze.current&&He(oe=>oe===M.id?null:oe)}}}async function Dr(M){try{await navigator.clipboard.writeText(M.localPath),J(!0),window.clearTimeout(Et.current),Et.current=window.setTimeout(()=>J(!1),1800)}catch{}}async function Fs(M){await ei(oe=>it(`/cards/${oe}/agents/${M}/stop`,{method:"POST",body:JSON.stringify({})}).then(()=>{}),"停止失败")}async function Ks(){if(!p)return;const M=p.id,oe=!p.archivedAt;C(!0),b("");try{await it(`/cards/${M}/archive`,{method:"POST",body:JSON.stringify({archived:oe})}),await d(),Ze.current&&o()}catch(Ve){Ze.current&&b(Ve instanceof Error?Ve.message:"归档操作失败")}finally{Ze.current&&C(!1)}}function vi(){p&&he(!0)}async function nn(){if(!p)return;const M=p.id;C(!0),b("");try{await it(`/cards/${M}`,{method:"DELETE"}),Ze.current&&he(!1),await d(),Ze.current&&o()}catch(oe){Ze.current&&(b(oe instanceof Error?oe.message:"删除卡片失败"),he(!1))}finally{Ze.current&&C(!1)}}const Nn=p&&p.checklistTotal>0?Math.round(p.checklistDone/p.checklistTotal*100):0;function fa(M){var Ve;if(!p||k)return;const oe=Jh(M.clipboardData);oe.length!==0&&(M.preventDefault(),(Ve=Te.current)==null||Ve.uploadFiles(oe))}return c.jsx("div",{className:"drawer-overlay",onClick:o,children:c.jsxs("aside",{className:"drawer-panel issue-drawer",role:"dialog","aria-modal":"true","aria-label":"任务卡片详情",onClick:M=>M.stopPropagation(),onPaste:fa,children:[c.jsxs("header",{className:"drawer-header",children:[c.jsx("div",{className:"drawer-header-meta",children:p&&c.jsxs(c.Fragment,{children:[c.jsx(qn,{"aria-label":"卡片状态",className:`status-select ${p.status}`,value:p.status,disabled:k,onChange:M=>void ti(M),options:["todo","doing","review","done"].map(M=>({value:M,label:Is[M],dotColor:MA[M]}))}),c.jsx(qn,{"aria-label":"优先级",className:"meta-select priority-select",value:p.priority,disabled:k,onChange:M=>void hn({priority:M}),options:["high","medium","low"].map(M=>({value:M,label:Vh[M],dotColor:RA[M]}))}),(ht.length>0||!!p.defaultAgentId)&&c.jsx(qn,{"aria-label":"卡片默认 Agent",className:"meta-select agent-select",value:p.defaultAgentId??(Oe==null?void 0:Oe.id)??"",placeholder:"默认:未设置",disabled:k,onChange:M=>void hn({defaultAgentId:M||null}),options:ht.map(M=>({value:M.id,label:M.enabled?`默认:${M.name}`:`默认:${M.name}(已暂停)`,dotColor:M.enabled?M.online?"#06d6a0":"#eab308":"#a8b0c4"}))})]})}),c.jsxs("div",{className:"drawer-header-actions",children:[p&&c.jsxs(c.Fragment,{children:[p.status==="todo"&&c.jsxs("button",{type:"button",className:"btn primary xs has-tooltip","data-tooltip":_t?`移入进行中并唤醒 ${_t.name}`:"移入进行中开始执行",disabled:k,onClick:()=>void ti("doing"),children:[c.jsx(Bh,{size:12,fill:"currentColor"})," 执行"]}),c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip","data-tooltip":"跳转到下方评论区",onClick:()=>{var M;return(M=Fe.current)==null?void 0:M.jumpToComposer()},children:[c.jsx(Lh,{size:14})," ",wn.length>0?wn.length:"评论"]}),c.jsx("button",{type:"button",className:`icon-btn has-tooltip ${de?"active":""}`,"data-tooltip":`审计记录 (${dn.length})`,"aria-label":"审计记录",onClick:()=>_e(!0),children:c.jsx(Mh,{size:15})}),c.jsx("button",{type:"button",className:"icon-btn has-tooltip","data-tooltip":p.archivedAt?"取消归档":"归档卡片","aria-label":p.archivedAt?"取消归档":"归档卡片",disabled:k,onClick:()=>void Ks(),children:c.jsx(ob,{size:15})}),c.jsx("button",{type:"button",className:"icon-btn danger has-tooltip","data-tooltip":"删除卡片","aria-label":"删除卡片",disabled:k,onClick:()=>void vi(),children:c.jsx(wr,{size:15})})]}),c.jsx("button",{type:"button",className:"icon-btn has-tooltip tooltip-right","data-tooltip":"关闭 (Esc)","aria-label":"关闭",onClick:o,children:c.jsx(Gt,{size:16})})]})]}),c.jsxs("div",{className:"issue-scroll",children:[S&&c.jsx("div",{className:"banner danger",children:S}),p?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"issue-doc",children:[c.jsxs("div",{className:"card-title-block",children:[p.parentId&&c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>m(p.parentId),children:"← 返回父卡片"}),T?c.jsxs(c.Fragment,{children:[c.jsx("input",{className:"title-input",value:D,maxLength:200,readOnly:O,autoFocus:!0,"aria-label":"卡片标题","aria-busy":O,"aria-invalid":!!G,"aria-describedby":G?"title-inline-error":void 0,onChange:M=>{I(M.target.value),G&&ie("")},onBlur:()=>{if(Xt.current){Xt.current=!1;return}G||xi()},onKeyDown:M=>{M.nativeEvent.isComposing||(M.key==="Enter"?(M.preventDefault(),xi()):M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),O||(Xt.current=!0,ie(""),E(!1))))}}),G&&c.jsx("div",{id:"title-inline-error",className:"inline-add-error",role:"alert",children:G})]}):c.jsx("h2",{className:"editable-title",onClick:()=>{Xt.current=!1,I(p.title),ie(""),E(!0)},children:p.title})]}),c.jsx("div",{className:"meta-strip",children:c.jsxs("div",{className:"tags-section",children:[c.jsxs("div",{className:"tags-bar",children:[c.jsx(ik,{size:13,className:"tags-icon","aria-hidden":"true"}),p.tags.map(M=>c.jsxs("span",{className:"tag-chip",children:[c.jsx("span",{children:M}),c.jsx("button",{type:"button",className:"has-tooltip","data-tooltip":"移除标签",disabled:k,onClick:()=>void tc(M),"aria-label":`移除标签 ${M}`,children:c.jsx(Gt,{size:11,"aria-hidden":"true"})})]},M)),c.jsxs("form",{className:`tag-add-form ${fe?"has-error":""}`,onSubmit:M=>void Qs(M),children:[c.jsx("input",{ref:wt,value:F,disabled:k,onChange:M=>{ue(M.target.value),fe&&ke("")},onKeyDown:M=>{if(M.key==="Enter"&&M.nativeEvent.isComposing){M.preventDefault();return}M.nativeEvent.isComposing||M.key==="Escape"&&(F||fe)&&(M.preventDefault(),M.stopPropagation(),j||(ue(""),ke("")))},placeholder:j?"添加中…":"+ 标签",maxLength:40,"aria-label":"添加标签","aria-invalid":!!fe,"aria-describedby":fe?"tag-inline-error":void 0}),F.trim()&&c.jsx("button",{type:"submit",className:"tag-add-submit",disabled:k,"aria-label":"确认添加标签",children:j?"添加中…":"添加"})]}),p.tags.length>=20&&c.jsxs("span",{className:"tags-limit-badge has-tooltip","data-tooltip":"标签已达 20 个上限",children:[p.tags.length,"/20"]})]}),fe&&c.jsx("div",{id:"tag-inline-error",className:"inline-add-error",role:"alert",children:fe})]})}),c.jsx(DA,{projectId:p.projectId,agents:l,decisions:p.decisions,pending:k,onResolve:Ut,onDismiss:rn},`decisions-${p.id}`),c.jsx(_A,{cardId:p.id,participants:p.participants,pending:k,subscribeRunSteps:u,onStopAgent:Fs},`collaborators-${p.id}`),c.jsxs("section",{className:"clean-section",children:[c.jsxs("div",{className:"section-row",children:[c.jsx("h3",{children:"任务文档"}),!V&&c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip tooltip-right","data-tooltip":"编辑 Markdown 正文",onClick:()=>{U(p.body),ee(""),ae(!0)},children:[c.jsx(mb,{size:12})," 编辑"]})]}),V?c.jsxs("div",{className:"body-editor",children:[c.jsx("textarea",{rows:8,value:H,readOnly:ge,autoFocus:!0,"aria-label":"任务正文","aria-busy":ge,"aria-invalid":!!P,"aria-describedby":P?"body-inline-error":void 0,onChange:M=>{U(M.target.value),P&&ee("")},onKeyDown:M=>{M.nativeEvent.isComposing||(M.key==="Escape"?(M.preventDefault(),M.stopPropagation(),ge||(ee(""),ae(!1))):M.key==="Enter"&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),!k&&!ge&&ca()))},placeholder:"写下需求、方案或验收标准(支持 Markdown,⌘↵ 保存)"}),P&&c.jsx("div",{id:"body-inline-error",className:"inline-add-error",role:"alert",children:P}),c.jsxs("div",{className:"form-actions",children:[c.jsx("button",{type:"button",className:"btn ghost small",disabled:ge,onClick:()=>{ee(""),ae(!1)},children:"取消"}),c.jsxs("button",{type:"button",className:"btn primary small has-tooltip tooltip-right","data-tooltip":"保存正文 (⌘+Enter)",disabled:k||ge,onClick:()=>void ca(),children:[c.jsx(pi,{size:14})," ",ge?"保存中…":"保存正文"]})]})]}):c.jsx("div",{className:"doc-body",onClick:()=>{var M;(M=window.getSelection())!=null&&M.toString()||(U(p.body),ee(""),ae(!0))},children:p.body?c.jsx(Hs,{content:p.body}):c.jsx("p",{className:"muted",children:"点击补充任务文档,或在下方 @Agent 协助整理…"})})]}),c.jsx(pA,{ref:Te,projectId:p.projectId,cardId:p.id,attachments:p.attachments,pending:k,onChanged:async()=>{Ze.current&&await _n(p.id),await d()}},`attachments-${p.id}`),c.jsxs("section",{className:"clean-section",children:[c.jsxs("div",{className:"section-row",children:[c.jsx("h3",{children:"任务清单"}),p.checklistTotal>0&&c.jsxs("div",{className:"check-progress",children:[c.jsxs("span",{className:"muted xs",children:[p.checklistDone,"/",p.checklistTotal]}),c.jsx("div",{className:"progress-track",children:c.jsx("div",{className:"progress-fill",style:{width:`${Nn}%`}})})]})]}),(A==null?void 0:A.isConflict)&&c.jsxs("div",{className:"checklist-conflict-notice",role:"status","aria-live":"polite",children:[c.jsx("span",{children:A.message}),c.jsx("button",{type:"button",className:"icon-btn xs","aria-label":"关闭冲突提示",onClick:()=>te(null),children:c.jsx(Gt,{size:12})})]}),p.checklist.length>0&&c.jsx("div",{className:"checklist-items",children:p.checklist.map(M=>c.jsxs("div",{className:`check-row ${M.done?"done":""}`,children:[c.jsxs("button",{type:"button",className:"check-toggle",disabled:k,onClick:()=>void Tr(M.id),children:[M.done?c.jsx(Ih,{size:15,className:"check-done-icon"}):c.jsx(yb,{size:15,className:"muted"}),c.jsx("span",{children:M.text})]}),c.jsxs("div",{className:"check-row-meta",children:[M.updatedBy&&c.jsx("small",{className:"muted xs",children:M.updatedBy}),c.jsx("button",{type:"button",className:"icon-btn xs danger check-del has-tooltip tooltip-right","data-tooltip":"删除此项","aria-label":"删除此项",disabled:k,onClick:()=>void Ja(M.id),children:c.jsx(wr,{size:12})})]})]},M.id))}),c.jsxs("form",{className:`inline-add ${A&&!A.isConflict?"has-error":""}`,onSubmit:M=>void Xs(M),children:[c.jsxs("div",{className:"inline-add-row",children:[c.jsx("input",{ref:jt,value:Ne,disabled:k,maxLength:500,onChange:M=>{_(M.target.value),A&&te(null)},onKeyDown:M=>{M.key==="Enter"&&M.nativeEvent.isComposing&&M.preventDefault()},placeholder:"+ 添加任务清单项,回车保存…","aria-label":"添加任务清单项","aria-invalid":!!(A&&!A.isConflict),"aria-describedby":A&&!A.isConflict?"checklist-inline-error":void 0}),c.jsx("button",{type:"submit",className:"btn ghost xs inline-add-submit",disabled:k||!Ne.trim(),children:me?"添加中…":"添加"})]}),A&&!A.isConflict&&c.jsx("div",{id:"checklist-inline-error",className:"inline-add-error",role:"alert",children:A.message})]})]}),p.children.length===0&&!Z?c.jsx("div",{className:"compact-action-strip",children:c.jsxs("button",{type:"button",className:"compact-inline-trigger",disabled:k,onClick:()=>{ve(""),Re(!0)},children:[c.jsx(Nl,{size:13,"aria-hidden":"true"}),c.jsx("span",{children:"拆分子任务"})]})}):c.jsxs("section",{className:"clean-section compact-block",children:[c.jsxs("div",{className:"section-row",children:[c.jsxs("h3",{children:["子任务 (",p.children.length,")"]}),!Z&&c.jsxs("button",{type:"button",className:"btn ghost xs has-tooltip tooltip-right","data-tooltip":"拆分一张关联子卡片",disabled:k,onClick:()=>{ve(""),Re(!0)},children:[c.jsx(Nl,{size:12})," 拆分"]})]}),p.children.length>0&&c.jsx("div",{className:"subcards-list",children:p.children.map(M=>c.jsxs("button",{type:"button",className:"subcard-row",onClick:()=>m(M.id),children:[c.jsx("span",{className:`status-dot ${M.status}`}),c.jsx("span",{className:"subcard-title",children:M.title}),c.jsx("span",{className:"muted xs",children:Is[M.status]})]},M.id))}),Z&&c.jsx("form",{className:`inline-add ${Ee?"has-error":""}`,onSubmit:M=>void nc(M),onBlur:M=>{!Se&&!Q.trim()&&!Ee&&!M.currentTarget.contains(M.relatedTarget)&&Re(!1)},children:c.jsxs("div",{className:"inline-add-row",children:[c.jsx("input",{autoFocus:!0,value:Q,disabled:k,maxLength:200,onChange:M=>{ye(M.target.value),Ee&&ve("")},onKeyDown:M=>{if(M.key==="Enter"&&M.nativeEvent.isComposing){M.preventDefault();return}M.nativeEvent.isComposing||M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),Se||(ye(""),ve(""),Re(!1)))},placeholder:"输入子卡片标题,回车创建…","aria-label":"子卡片标题","aria-invalid":!!Ee,"aria-describedby":Ee?"child-card-inline-error":void 0}),c.jsx("button",{type:"submit",className:"btn ghost xs inline-add-submit",disabled:k||!Q.trim(),children:Se?"创建中…":"创建"}),c.jsx("button",{type:"button",className:"btn ghost xs inline-add-submit",disabled:Se,onClick:()=>{ye(""),ve(""),Re(!1)},children:"取消"})]})}),Ee&&c.jsx("div",{id:"child-card-inline-error",className:"inline-add-error",role:"alert",children:Ee})]}),p.outputs.length>0&&c.jsxs("section",{className:"clean-section compact-block",children:[c.jsx("div",{className:"section-row",children:c.jsxs("h3",{children:["产出 (",p.outputs.length,")"]})}),c.jsx("div",{className:"outputs-list",children:p.outputs.map(M=>{const oe=M.attachment,Ve=(oe==null?void 0:oe.kind)==="image",yt=!!(oe&&Fh(oe)),Ot=!!(yt||!oe&&M.path),ni=!!(oe||M.path),Tn=(oe==null?void 0:oe.filename)??M.path??M.label,Zi=!!(M.branch&&M.branch!==Tn),_i=ne===M.id,Ti=at===M.id,da=!!(Ot||Ve||M.url||oe||ni);return c.jsxs("div",{className:"output-card",children:[Ve&&oe?c.jsxs("button",{type:"button",className:"output-image-thumb",onClick:()=>{St(""),J(!1),qt(oe)},title:`点击放大查看 ${oe.filename}`,children:[c.jsx("img",{src:oe.url,alt:oe.filename,loading:"lazy"}),c.jsx("span",{className:"output-image-zoom","aria-hidden":"true",children:c.jsx(Uh,{size:13})})]}):c.jsx("span",{className:"output-icon-box","aria-hidden":"true",children:!oe&&!M.path&&M.url?c.jsx($x,{size:15}):!oe&&!M.path&&M.branch?c.jsx(Rs,{size:15}):c.jsx(kr,{size:16})}),c.jsxs("div",{className:"output-main",children:[c.jsxs("div",{className:"output-title-row",children:[Ot?c.jsx("button",{type:"button",className:"output-title-btn",disabled:_i,onClick:()=>void Ar(M),title:Tn,children:Tn}):Ve&&oe?c.jsx("button",{type:"button",className:"output-title-btn",onClick:()=>{St(""),J(!1),qt(oe)},title:Tn,children:Tn}):oe?c.jsx("button",{type:"button",className:"output-title-btn",disabled:Ti,onClick:()=>void zl(M),title:`在访达中显示 ${oe.filename}`,children:Tn}):M.url?c.jsx("a",{href:M.url,target:"_blank",rel:"noreferrer",className:"output-title-btn",title:M.url,children:Tn}):c.jsx("strong",{className:"output-title",title:Tn,children:Tn}),c.jsxs("div",{className:"output-inline-meta",children:[oe&&c.jsx("span",{className:"output-size",children:hi(oe.sizeBytes)}),c.jsxs("span",{className:"output-actor-pill",children:[c.jsx(Qa,{variant:M.driver??"human",size:11}),M.actorName]}),Zi&&c.jsxs("span",{className:"branch-chip",children:[c.jsx(Rs,{size:11})," ",M.branch]})]})]}),M.summary&&c.jsx("p",{className:"output-summary",title:M.summary,children:M.summary})]}),da&&c.jsxs("div",{className:"output-actions",children:[Ot&&c.jsx("button",{type:"button",className:"output-preview-btn",disabled:_i,onClick:()=>void Ar(M),children:_i?"加载中…":"预览"}),Ve&&oe&&c.jsx("button",{type:"button",className:"output-preview-btn",onClick:()=>{St(""),J(!1),qt(oe)},children:"查看"}),oe&&!yt&&!Ve&&c.jsxs("button",{type:"button",className:"output-preview-btn",disabled:Ti,onClick:()=>void zl(M),title:`在访达中显示:${oe.localPath}`,children:[c.jsx(Va,{size:12})," ",Ti?"打开中…":"访达显示"]}),M.url&&c.jsxs("a",{href:M.url,target:"_blank",rel:"noreferrer",className:"output-preview-btn",children:[c.jsx($x,{size:12})," 打开"]}),ni&&(Ot||Ve)&&c.jsx("button",{type:"button",className:"output-icon-action has-tooltip tooltip-right","data-tooltip":"在访达中显示",disabled:Ti,onClick:()=>void zl(M),"aria-label":`在访达中显示 ${Tn}`,children:c.jsx(Va,{size:14})})]})]},M.id)})})]}),Ge&&(()=>{const M=p.outputs.find(Ve=>Ve.id===Ge.outputId),oe=M==null?void 0:M.attachment;return c.jsx(vm,{preview:Ge,localPath:Ge.localPath??(oe==null?void 0:oe.localPath),onReveal:M?()=>zr(M):void 0,onClose:()=>Le(null)},Ge.outputId)})(),Ct&&qs.createPortal(c.jsx("div",{className:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":`查看图片 ${Ct.filename}`,onClick:()=>{qt(null),St("")},children:c.jsxs("div",{className:"lightbox-shell",onClick:M=>M.stopPropagation(),children:[c.jsxs("div",{className:"lightbox-bar",children:[c.jsxs("div",{className:"lightbox-meta",children:[c.jsx("strong",{children:Ct.filename}),c.jsx("span",{className:"lightbox-size",children:hi(Ct.sizeBytes)})]}),c.jsxs("div",{className:"lightbox-actions",children:[c.jsxs("button",{type:"button",className:"lightbox-btn",disabled:at===Ct.id,onClick:()=>void Or(Ct),children:[c.jsx(Va,{size:13})," ",at===Ct.id?"打开中…":"在访达中显示"]}),c.jsx("button",{type:"button",className:"lightbox-btn",onClick:()=>void Dr(Ct),children:En?c.jsxs(c.Fragment,{children:[c.jsx(pi,{size:13})," 已复制路径"]}):c.jsxs(c.Fragment,{children:[c.jsx(Za,{size:13})," 复制路径"]})}),c.jsx("button",{type:"button",className:"lightbox-btn icon","aria-label":"关闭大图预览",onClick:()=>{qt(null),St("")},children:c.jsx(Gt,{size:15})})]})]}),ln&&c.jsx("div",{className:"lightbox-error",role:"alert",children:ln}),c.jsx("div",{className:"lightbox-stage",children:c.jsx("img",{src:Ct.url,alt:Ct.filename,className:"lightbox-img"})})]})}),document.body)]}),c.jsx(OA,{ref:Fe,projectId:p.projectId,comments:wn,agents:l,projectAgents:oa,effectiveDefaultAgent:_t,pending:k,onSubmitComment:yi},`comments-${p.id}`)]}):S&&!x?c.jsxs("div",{className:"empty-state",children:[c.jsx("p",{children:"未能加载卡片详情。"}),n&&c.jsx("button",{type:"button",className:"btn ghost xs",onClick:()=>void _n(n,!0),children:"重试"})]}):c.jsxs("div",{className:"drawer-skeleton",role:"status","aria-busy":"true","aria-label":"正在加载卡片详情",children:[c.jsx("span",{className:"skeleton-line h-lg w-60"}),c.jsxs("div",{className:"drawer-skeleton-pills",children:[c.jsx("span",{className:"skeleton-pill"}),c.jsx("span",{className:"skeleton-pill"})]}),c.jsxs("div",{className:"drawer-skeleton-card",children:[c.jsx("span",{className:"skeleton-line w-100"}),c.jsx("span",{className:"skeleton-line w-90"}),c.jsx("span",{className:"skeleton-line w-75"})]}),c.jsxs("div",{className:"drawer-skeleton-card",children:[c.jsx("span",{className:"skeleton-line w-45"}),c.jsx("span",{className:"skeleton-line w-90"})]})]})]}),p&&c.jsx(SA,{open:de,auditEvents:dn,revisions:p.revisions,onClose:()=>_e(!1)},`audit-${p.id}`),c.jsx(Qh,{open:L&&!!p,title:"永久删除卡片",description:p?`删除后「${p.title}」及其评论、清单均无法恢复。`:"",confirmLabel:"永久删除卡片",tone:"danger",pending:k,onConfirm:()=>void nn(),onCancel:()=>he(!1)})]})})}let Wv=0;const ec=N.forwardRef(function({projectId:i,attachments:l,onChange:s,disabled:u=!1,maxCount:o=$a},d){const[m,p]=N.useState([]),[g,x]=N.useState(!1),[y,S]=N.useState(""),[b,k]=N.useState(()=>new Set),C=N.useRef(null),T=N.useRef(l.length+m.length);T.current=l.length+m.length;const E=N.useCallback(async O=>{if(!i||u||O.length===0)return;const{valid:R,error:V}=Ph(O,T.current,o);if(S(V??""),R.length===0)return;const ae=R.map(U=>(Wv+=1,{tempId:`up-${Wv}`,file:U,filename:Kh(U)}));p(U=>[...U,...ae.map(P=>({tempId:P.tempId,filename:P.filename}))]),T.current+=ae.length;const H=[];for(const U of ae)try{const P=await Yh({projectId:i,file:U.file,filename:U.filename});s(ee=>[...ee,P])}catch(P){H.push(`${U.filename}:${P instanceof Error?P.message:"添加失败"}`)}finally{p(P=>P.filter(ee=>ee.tempId!==U.tempId))}H.length>0&&S(U=>[U,...H].filter(Boolean).join(";"))},[i,u,o,s]);N.useImperativeHandle(d,()=>({uploadFiles:E}),[E]);async function D(O){if(!(u||b.has(O.id))){k(R=>new Set(R).add(O.id)),S("");try{await Gh(O.id),s(R=>R.filter(V=>V.id!==O.id))}catch(R){S(R instanceof Error?R.message:"移除附件失败")}finally{k(R=>{const V=new Set(R);return V.delete(O.id),V})}}}function I(O){if(O.preventDefault(),O.stopPropagation(),x(!1),u||!i)return;const R=Array.from(O.dataTransfer.files??[]);R.length>0&&E(R)}const G=l.length+m.length,ie=G>=o;return c.jsxs("div",{className:"field attachment-picker-field",children:[c.jsxs("div",{className:"attachment-picker-head",children:[c.jsxs("span",{children:["附件",G>0?` (${G}/${o})`:"(可选)"]}),c.jsxs("button",{type:"button",className:"btn ghost xs",disabled:u||!i||ie,onClick:()=>{var O;return(O=C.current)==null?void 0:O.click()},children:[c.jsx(wl,{size:12})," 添加附件"]})]}),c.jsx("input",{ref:C,type:"file",multiple:!0,hidden:!0,onChange:O=>{const R=Array.from(O.target.files??[]);O.target.value="",R.length>0&&E(R)}}),c.jsx("div",{className:`attachment-dropzone ${g?"drag-over":""} ${G>0?"has-items":""}`,onDragOver:O=>{u||!i||(O.preventDefault(),g||x(!0))},onDragLeave:O=>{O.currentTarget.contains(O.relatedTarget)||x(!1)},onDrop:I,children:G===0?c.jsxs("button",{type:"button",className:"attachment-dropzone-empty",disabled:u||!i,onClick:()=>{var O;return(O=C.current)==null?void 0:O.click()},children:[c.jsx(wl,{size:13}),c.jsx("span",{children:"点击、拖拽或 ⌘V 粘贴截图 / 文件(单文件 ≤ 20MB)"})]}):c.jsxs("div",{className:"attachment-chips",children:[l.map(O=>{const R=b.has(O.id);return c.jsxs("div",{className:"attachment-chip",title:`${O.filename} (${hi(O.sizeBytes)})`,children:[O.kind==="image"?c.jsx("img",{src:O.url,alt:O.filename,className:"attachment-chip-thumb"}):c.jsx("span",{className:"attachment-chip-icon","aria-hidden":"true",children:c.jsx(kr,{size:15})}),c.jsxs("div",{className:"attachment-chip-meta",children:[c.jsx("span",{className:"attachment-chip-name",children:O.filename}),c.jsx("small",{className:"muted xs",children:hi(O.sizeBytes)})]}),c.jsx("button",{type:"button",className:"icon-btn xs attachment-chip-remove","aria-label":`移除附件 ${O.filename}`,disabled:u||R,onClick:()=>void D(O),children:c.jsx(Gt,{size:12})})]},O.id)}),m.map(O=>c.jsxs("div",{className:"attachment-chip uploading","aria-busy":"true",children:[c.jsx("span",{className:"attachment-chip-icon","aria-hidden":"true",children:c.jsx(Rh,{size:14,className:"spin"})}),c.jsxs("div",{className:"attachment-chip-meta",children:[c.jsx("span",{className:"attachment-chip-name",children:O.filename}),c.jsx("small",{className:"muted xs",children:"添加中…"})]})]},O.tempId))]})}),y&&c.jsx("div",{className:"inline-add-error",role:"alert",children:y})]})});function BA({project:n,prompt:i,onPromptChange:l,includeExistingCards:s,onIncludeExistingCardsChange:u,readWorkspace:o,onReadWorkspaceChange:d,onlineAgents:m,selectedAgentId:p,onSelectedAgentIdChange:g,attachments:x,onAttachmentsChange:y,attachmentPickerRef:S,submitting:b,onStartDraft:k,onClose:C,onOpenAgents:T}){return c.jsxs("div",{className:"ai-stage",children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"任务描述"}),c.jsx("textarea",{autoFocus:!0,rows:4,value:i,onChange:E=>l(E.target.value),onKeyDown:E=>{(E.metaKey||E.ctrlKey)&&E.key==="Enter"&&!b&&(E.preventDefault(),k())},placeholder:"描述目标,或直接 ⌘V 粘贴截图 / 报错日志…"})]}),c.jsx(ec,{ref:S,projectId:(n==null?void 0:n.id)??null,attachments:x,onChange:y,disabled:b}),c.jsxs("div",{className:"ai-options-bar",children:[c.jsxs("div",{className:"ai-checks",children:[c.jsxs("label",{className:"ai-check",children:[c.jsx("input",{type:"checkbox",checked:s,onChange:E=>u(E.target.checked)}),c.jsx("span",{children:"参考现有卡片防重复"})]}),(n==null?void 0:n.rootPath)&&c.jsxs("label",{className:"ai-check",children:[c.jsx("input",{type:"checkbox",checked:o,onChange:E=>d(E.target.checked)}),c.jsx("span",{children:"只读参考目录文件"})]})]}),m.length>0?c.jsx("div",{className:"ai-agent-inline",children:c.jsx(qn,{"aria-label":"选择整理 Agent",value:p,onChange:g,className:"meta-select",options:m.map(E=>({value:E.id,label:`${E.name} (${jn[E.driver]})`,dotColor:"#06d6a0"}))})}):c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>{C(),T()},children:"无在线 Agent · 查看接入状态"})]}),c.jsx("p",{className:"ai-hint",children:"先生成可编辑草稿,确认后再写入看板(⌘↵)"}),c.jsxs("div",{className:"modal-actions",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:C,children:"取消"}),c.jsxs("button",{type:"button",className:"btn primary",disabled:b||!i.trim()||m.length===0,onClick:k,children:[c.jsx(Uo,{size:14})," 生成草稿"]})]})]})}const G1=[{id:"todo",label:"待办",dotColor:"#2563eb"},{id:"doing",label:"进行中",dotColor:"#ff6b35"},{id:"review",label:"待验收",dotColor:"#eab308"},{id:"done",label:"已完成",dotColor:"#06d6a0"}],Q1=[{value:"high",label:"高优先",dotColor:"#ff5a1f"},{value:"medium",label:"中优先",dotColor:"#2563eb"},{value:"low",label:"低优先",dotColor:"#06d6a0"}];let eb=0;function Ah(n){return eb+=1,`${n}-${eb}`}function Sm(n){const i=jn[n.driver];return i.toLowerCase()===n.name.trim().toLowerCase()?n.name:`${n.name} (${i})`}function km(n){return Array.from(new Set(n.split(/[,,\s]+/).map(i=>i.trim()).filter(Boolean)))}function IA(n,i,l){const u=n.suggestedAgentIds.find(o=>l.has(o))??null??i;return{id:Ah("draft"),checked:!0,title:n.title,body:n.body,status:"todo",priority:n.priority,tagsText:n.tags.join(" "),checklist:n.checklist.map(o=>({id:Ah("check"),text:o})),defaultAgentId:u,parentId:n.parentId??null,duplicateOfCardId:n.duplicateOfCardId??null,duplicateReason:n.duplicateReason}}async function UA(n,i){return(await Jk(n,i.map(s=>s.id))).map(s=>s.id)}function HA({initialStatus:n,project:i,agents:l,defaultCardAgentId:s,attachments:u,onAttachmentsChange:o,attachmentPickerRef:d,submitting:m,onSubmittingChange:p,onError:g,onClose:x,onCreated:y}){const[S,b]=N.useState(""),[k,C]=N.useState(""),[T,E]=N.useState("medium"),[D,I]=N.useState(n),[G,ie]=N.useState(""),[O,R]=N.useState(null);async function V(ae){if(ae.preventDefault(),!(!i||!S.trim())){p(!0),g("");try{const H=(O&&l.some(P=>P.id===O)?O:null)??s,U=await it("/cards",{method:"POST",body:JSON.stringify({projectId:i.id,defaultAgentId:H,title:S.trim(),body:k.trim(),priority:T,status:D,tags:km(G),attachmentIds:u.map(P=>P.id)})});b(""),C(""),ie(""),o([]),await y([{id:U.id,defaultAgentId:H}])}catch(H){g(H instanceof Error?H.message:"创建卡片失败")}finally{p(!1)}}}return c.jsxs("form",{className:"ai-stage",onSubmit:ae=>void V(ae),children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"任务标题 *"}),c.jsx("input",{autoFocus:!0,required:!0,value:S,onChange:ae=>b(ae.target.value),placeholder:"一句明确的目标或想法即可,详细方案可交给 Agent 补充"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"任务文档(可选)"}),c.jsx("textarea",{rows:4,value:k,onChange:ae=>C(ae.target.value),placeholder:"补充背景或验收要点,支持 ⌘V 粘贴截图…"})]}),c.jsx(ec,{ref:d,projectId:(i==null?void 0:i.id)??null,attachments:u,onChange:o,disabled:m}),c.jsxs("div",{className:"form-row",children:[c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"初始列"}),c.jsx(qn,{"aria-label":"初始列",value:D,onChange:I,options:G1.map(ae=>({value:ae.id,label:ae.label,dotColor:ae.dotColor}))})]}),c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"优先级"}),c.jsx(qn,{"aria-label":"优先级",value:T,onChange:E,options:Q1})]})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"标签"}),c.jsx("input",{value:G,onChange:ae=>ie(ae.target.value),placeholder:"例如:前端 架构"})]}),l.length>0&&c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"卡片默认 Agent"}),c.jsx("div",{className:"mention-picker",children:l.map(ae=>{const U=(O&&l.some(P=>P.id===O)?O:s)===ae.id;return c.jsxs("button",{type:"button",className:`picker-chip ${U?"active":""}`,onClick:()=>R(ae.id),children:[c.jsx("span",{className:`dot tiny ${ae.online?"success":"warning"}`}),Sm(ae)]},ae.id)})}),c.jsx("small",{className:"field-hint",children:"点「执行」或移入「进行中」时自动唤醒"})]}),c.jsxs("div",{className:"modal-actions",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:x,children:"取消"}),c.jsx("button",{type:"submit",className:"btn primary",disabled:m,children:"创建卡片"})]})]})}function qA({drafts:n,projectId:i,cardsById:l,agents:s,defaultCardAgentId:u,attachments:o,onAttachmentsChange:d,attachmentPickerRef:m,submitting:p,onUpdateDraft:g,onResetToInput:x,onMinimize:y,onCommit:S}){const b=n.filter(k=>k.checked&&k.title.trim()).length;return c.jsxs("div",{className:"ai-stage",children:[c.jsxs("p",{className:"ai-hint",children:["已拆分为 ",n.length," 张草稿,可编辑或取消勾选"]}),c.jsx("div",{className:"draft-list",children:n.map((k,C)=>{const T=k.duplicateOfCardId?l.get(k.duplicateOfCardId):void 0;return c.jsxs("div",{className:`draft-card ${k.checked?"":"unchecked"}`,children:[c.jsxs("div",{className:"draft-card-top",children:[c.jsx("input",{type:"checkbox",checked:k.checked,onChange:E=>g(C,{checked:E.target.checked})}),c.jsx("input",{className:"draft-title-input",value:k.title,onChange:E=>g(C,{title:E.target.value})}),k.priority==="high"&&c.jsx("span",{className:"prio-pill high",children:"高优"})]}),k.body&&c.jsx("p",{className:"draft-body",children:k.body}),k.checklist.length>0&&c.jsx("div",{className:"draft-checklist-preview",children:k.checklist.map(E=>c.jsxs("span",{children:["☐ ",E.text]},E.id))}),T&&c.jsxs("div",{className:"draft-dup compact",children:[c.jsx("span",{children:k.parentId===T.id?`已转为《${T.title}》子卡`:`与《${T.title}》较相似`}),c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>g(C,{parentId:k.parentId===T.id?null:T.id}),children:k.parentId===T.id?"改为独立卡":"转为子卡"})]}),c.jsxs("div",{className:"draft-meta-row",children:[c.jsx("div",{className:"draft-tags",children:km(k.tagsText).map(E=>c.jsx("span",{className:"tag-chip",children:E},E))}),s.length>0&&c.jsx(qn,{"aria-label":"卡片默认 Agent",value:(k.defaultAgentId&&s.some(E=>E.id===k.defaultAgentId)?k.defaultAgentId:u)??"",onChange:E=>g(C,{defaultAgentId:E||null}),className:"meta-select",placeholder:"选择默认 Agent",options:s.map(E=>({value:E.id,label:Sm(E),dotColor:E.online?"#06d6a0":"#eab308"}))})]})]},k.id)})}),c.jsx(ec,{ref:m,projectId:i,attachments:o,onChange:d,disabled:p}),c.jsxs("div",{className:"modal-actions split",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:x,children:"← 返回修改"}),c.jsxs("div",{className:"modal-actions-right",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:y,children:"收起到状态栏"}),c.jsxs("button",{type:"button",className:"btn primary",disabled:p||b===0,onClick:S,children:["确认创建 (",b," 张)"]})]})]})]})}function VA({draft:n,clarifyQuestion:i,splitSuggestion:l,projectId:s,cardsById:u,agents:o,defaultCardAgentId:d,attachments:m,onAttachmentsChange:p,attachmentPickerRef:g,submitting:x,onUpdateDraft:y,onClarify:S,onSplitToMultiple:b,onOpenDuplicateCard:k,onResetToInput:C,onMinimize:T,onCommit:E}){const[D,I]=N.useState(""),[G,ie]=N.useState(""),O=n.duplicateOfCardId?u.get(n.duplicateOfCardId):void 0;function R(){const V=G.trim();V&&(y({checklist:[...n.checklist,{id:Ah("check"),text:V}]}),ie(""))}return c.jsxs("div",{className:"ai-stage draft-scroll-stage",children:[i&&c.jsxs("div",{className:"draft-notice",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"补充确认(可选):"}),i]}),c.jsxs("div",{className:"draft-clarify-row",children:[c.jsx("input",{value:D,onChange:V=>I(V.target.value),placeholder:"补充一句重新整理,或直接改下方草稿…"}),c.jsx("button",{type:"button",className:"btn xs",disabled:!D.trim()||x,onClick:()=>S(D.trim()),children:"重新整理"})]})]}),l&&c.jsxs("div",{className:"draft-split-hint",children:[c.jsx("span",{children:l}),c.jsx("button",{type:"button",className:"text-link xs",disabled:x,onClick:b,children:"拆成多张卡"})]}),O&&c.jsxs("div",{className:"draft-dup",children:[c.jsxs("div",{className:"draft-dup-text",children:[c.jsx(xb,{size:14}),c.jsx("span",{children:n.parentId===O.id?`已设为《${O.title}》的子卡`:`与已有卡片《${O.title}》较相似${n.duplicateReason?`:${n.duplicateReason}`:""}`})]}),c.jsxs("div",{className:"draft-dup-actions",children:[c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>k(O.id),children:"查看已有卡"}),c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>y({parentId:n.parentId===O.id?null:O.id}),children:n.parentId===O.id?"改为独立卡":"转为子卡"})]})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"任务标题 *"}),c.jsx("input",{value:n.title,onChange:V=>y({title:V.target.value}),placeholder:"任务标题"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"任务文档(Markdown)"}),c.jsx("textarea",{rows:4,value:n.body,onChange:V=>y({body:V.target.value})})]}),c.jsx(ec,{ref:g,projectId:s,attachments:m,onChange:p,disabled:x}),c.jsxs("div",{className:"field",children:[c.jsxs("span",{children:["任务清单 (",n.checklist.length,")"]}),c.jsxs("div",{className:"draft-checklist",children:[n.checklist.map(V=>c.jsxs("div",{className:"draft-check-row",children:[c.jsx(Ih,{size:14,className:"muted"}),c.jsx("input",{value:V.text,onChange:ae=>{y({checklist:n.checklist.map(H=>H.id===V.id?{...H,text:ae.target.value}:H)})}}),c.jsx("button",{type:"button",className:"icon-btn xs","aria-label":"删除清单项",onClick:()=>y({checklist:n.checklist.filter(ae=>ae.id!==V.id)}),children:c.jsx(wr,{size:12})})]},V.id)),c.jsxs("div",{className:"draft-check-add",children:[c.jsx("input",{value:G,onChange:V=>ie(V.target.value),onKeyDown:V=>{V.key==="Enter"&&!V.nativeEvent.isComposing&&G.trim()&&(V.preventDefault(),R())},placeholder:"+ 添加任务清单项,回车追加…"}),G.trim()&&c.jsxs("button",{type:"button",className:"btn ghost xs",onClick:R,children:[c.jsx(Nl,{size:12})," 添加"]})]})]})]}),c.jsxs("div",{className:"form-row",children:[c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"初始列"}),c.jsx(qn,{"aria-label":"初始列",value:n.status,onChange:V=>y({status:V}),options:G1.map(V=>({value:V.id,label:V.label,dotColor:V.dotColor}))})]}),c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"优先级"}),c.jsx(qn,{"aria-label":"优先级",value:n.priority,onChange:V=>y({priority:V}),options:Q1})]})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"标签(空格或逗号分隔)"}),c.jsx("input",{value:n.tagsText,onChange:V=>y({tagsText:V.target.value}),placeholder:"例如:前端 鉴权"})]}),o.length>0&&c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"卡片默认 Agent"}),c.jsx("div",{className:"mention-picker",children:o.map(V=>{const H=(n.defaultAgentId&&o.some(U=>U.id===n.defaultAgentId)?n.defaultAgentId:d)===V.id;return c.jsxs("button",{type:"button",className:`picker-chip ${H?"active":""}`,onClick:()=>y({defaultAgentId:V.id}),children:[c.jsx("span",{className:`dot tiny ${V.online?"success":"warning"}`}),Sm(V)]},V.id)})}),c.jsx("small",{className:"field-hint",children:"点「执行」或移入「进行中」时自动唤醒"})]}),c.jsxs("div",{className:"modal-actions split",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:C,children:"← 返回修改"}),c.jsxs("div",{className:"modal-actions-right",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:T,children:"收起到状态栏"}),c.jsx("button",{type:"button",className:"btn primary",disabled:x||!n.title.trim(),onClick:E,children:"确认创建卡片"})]})]})]})}function $A(){try{return window.localStorage.getItem(Ob)}catch{return null}}function ZA(n){try{window.localStorage.setItem(Ob,n)}catch{}}function YA({open:n,initialStatus:i,project:l,cards:s,agents:u,draftRun:o,streamState:d,onDraftRunChange:m,onClose:p,onMinimize:g,onOpenCard:x,onOpenAgents:y,onCreated:S}){var Ge,Le;const b=N.useMemo(()=>gA(u,l==null?void 0:l.id),[u,l==null?void 0:l.id]),k=N.useMemo(()=>new Set(b.map(ne=>ne.id)),[b]),C=N.useMemo(()=>b.filter(ne=>ne.online),[b]),T=N.useMemo(()=>{var ne;return l!=null&&l.defaultAgentId&&C.some(Be=>Be.id===l.defaultAgentId)?l.defaultAgentId:((ne=C[0])==null?void 0:ne.id)??""},[l==null?void 0:l.defaultAgentId,C]),E=N.useMemo(()=>{var ne;return l!=null&&l.defaultAgentId&&b.some(Be=>Be.id===l.defaultAgentId)?l.defaultAgentId:((ne=C[0]??b[0])==null?void 0:ne.id)??null},[l==null?void 0:l.defaultAgentId,b,C]),[D,I]=N.useState("ai"),[G,ie]=N.useState(""),[O,R]=N.useState(""),[V,ae]=N.useState(!0),[H,U]=N.useState(!0),[P,ee]=N.useState([]),[ge,ce]=N.useState(null),[F,ue]=N.useState([]),[fe,ke]=N.useState(!1),[j,je]=N.useState(""),Ne=N.useRef(null),_=N.useRef(!1),A=N.useMemo(()=>new Map(s.map(ne=>[ne.id,ne])),[s]),te=(o==null?void 0:o.status)==="queued"||(o==null?void 0:o.status)==="running",me=D==="ai"&&(o==null?void 0:o.status)==="succeeded"&&P.length>0;if(N.useEffect(()=>{const ne=n&&!_.current;if(_.current=n,!ne)return;je(""),o||ue([]);const Be=!!(o&&(o.status==="queued"||o.status==="running"||o.status==="succeeded"));I(lw({storedMode:$A(),hasActiveDraftRun:Be,hasOnlineAgent:C.length>0}))},[n,C.length,o]),N.useEffect(()=>{(!O||!C.some(ne=>ne.id===O))&&O!==T&&R(T)},[O,C,T]),N.useEffect(()=>{(o==null?void 0:o.status)==="succeeded"&&o.result&&ge!==o.id&&(ee(o.result.drafts.map(ne=>IA(ne,E,k))),ce(o.id))},[o,ge,E,k]),N.useEffect(()=>{if(!n)return;const ne=Be=>{Be.key!=="Escape"||Be.defaultPrevented||Be.isComposing||(Be.preventDefault(),te||me?g():p())};return window.addEventListener("keydown",ne),()=>window.removeEventListener("keydown",ne)},[n,te,me,g,p]),!n)return null;async function we(ne,Be=!1){if(!l)return;const at=O||T;if(!at){je("暂无在线 Agent,可先启动 CLI 或切换为手动表单");return}if(!ne.trim()){je("请先描述你想创建的任务目标");return}je(""),ke(!0);try{const He=await it("/assistant/runs",{method:"POST",body:JSON.stringify({projectId:l.id,agentId:at,kind:"card_draft",prompt:ne.trim(),attachmentIds:F.map(Ct=>Ct.id),options:{includeExistingCards:V,readWorkspace:!!l.rootPath&&H,allowMultipleCards:Be}})});ce(null),ee([]),m(He)}catch(He){je(He instanceof Error?He.message:"发起 AI 整理失败")}finally{ke(!1)}}async function Q(){if(o)try{await it(`/assistant/runs/${o.id}/cancel`,{method:"POST",body:JSON.stringify({})}),m(null),ee([]),ce(null)}catch(ne){je(ne instanceof Error?ne.message:"取消失败")}}function ye(){m(null),ee([]),ce(null),je("")}function Ee(ne){I(ne),ZA(ne)}function ve(ne,Be){ee(at=>at.map((He,Ct)=>Ct===ne?{...He,...Be}:He))}async function Z(){if(!l)return;const ne=P.filter(Be=>Be.checked&&Be.title.trim());if(ne.length!==0){ke(!0),je("");try{const Be=[];for(let at=0;at<ne.length;at+=1){const He=ne[at],Ct=F.length===0?[]:at===0?F.map(St=>St.id):await UA(l.id,F),qt=(He.defaultAgentId&&k.has(He.defaultAgentId)?He.defaultAgentId:null)??E,ln=await it("/cards",{method:"POST",body:JSON.stringify({projectId:l.id,parentId:He.parentId,defaultAgentId:qt,title:He.title.trim(),body:He.body.trim(),status:He.status,priority:He.priority,tags:km(He.tagsText),checklist:He.checklist.map(St=>St.text.trim()).filter(Boolean).map((St,En)=>({id:`ai-${Date.now()}-${En}`,text:St,done:!1})),attachmentIds:Ct})});Be.push({id:ln.id,defaultAgentId:qt})}m(null),ee([]),ce(null),ie(""),ue([]),await S(Be)}catch(Be){je(Be instanceof Error?Be.message:"创建卡片失败")}finally{ke(!1)}}}function Re(ne){var at;if(te||fe||!l)return;const Be=Jh(ne.clipboardData);Be.length!==0&&(ne.preventDefault(),(at=Ne.current)==null||at.uploadFiles(Be))}const Se=me&&P.length===1?P[0]:null,Ke=te||me?g:p;return c.jsx("div",{className:"modal-overlay",onClick:Ke,children:c.jsxs("div",{className:`modal-card ${me?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":"新建任务卡片",onClick:ne=>ne.stopPropagation(),onPaste:Re,children:[c.jsxs("div",{className:"modal-head",children:[c.jsxs("div",{className:"mode-switch",role:"tablist","aria-label":"建卡方式",children:[c.jsxs("button",{type:"button",role:"tab","aria-selected":D==="ai",className:`mode-tab ${D==="ai"?"active":""}`,onClick:()=>Ee("ai"),children:[c.jsx(Uo,{size:13})," AI 建卡"]}),c.jsx("button",{type:"button",role:"tab","aria-selected":D==="manual",className:`mode-tab ${D==="manual"?"active":""}`,onClick:()=>Ee("manual"),children:"手动表单"})]}),c.jsx("button",{type:"button",className:"icon-btn","aria-label":"关闭",onClick:Ke,children:c.jsx(Gt,{size:16})})]}),j&&c.jsx("div",{className:"banner danger",children:j}),D==="ai"&&(o==null?void 0:o.status)==="failed"&&c.jsx("div",{className:"banner danger",children:c.jsx("span",{children:o.errorMessage||"生成失败,请检查 Agent 状态后重试"})}),D==="ai"&&te&&c.jsxs("div",{className:"ai-running-box",children:[c.jsxs("div",{className:"ai-running-line",children:[c.jsx("span",{className:"pulse-dot"}),c.jsx("strong",{children:(d==null?void 0:d.stage)==="structuring"?`${o.agentName} 正在组装卡片草稿与清单…`:`${o.agentName} 正在整理任务草稿…`})]}),d!=null&&d.text?c.jsxs("p",{className:"ai-stream-preview",children:[d.text,d.stage==="streaming"&&c.jsx("span",{className:"stream-cursor","aria-hidden":"true"})]}):c.jsx("p",{className:"ai-hint",children:(d==null?void 0:d.activityText)||o.activityText||"正在整理任务草稿…"}),c.jsxs("div",{className:"modal-actions",children:[c.jsx("button",{type:"button",className:"btn ghost",onClick:()=>void Q(),children:"取消任务"}),c.jsx("button",{type:"button",className:"btn",onClick:g,children:"收起到状态栏"})]})]}),D==="ai"&&!te&&!me&&c.jsx(BA,{project:l,prompt:G,onPromptChange:ie,includeExistingCards:V,onIncludeExistingCardsChange:ae,readWorkspace:H,onReadWorkspaceChange:U,onlineAgents:C,selectedAgentId:O||T,onSelectedAgentIdChange:R,attachments:F,onAttachmentsChange:ue,attachmentPickerRef:Ne,submitting:fe,onStartDraft:()=>void we(G,!1),onClose:p,onOpenAgents:y}),D==="ai"&&Se&&c.jsx(VA,{draft:Se,clarifyQuestion:(Ge=o==null?void 0:o.result)==null?void 0:Ge.clarifyQuestion,splitSuggestion:(Le=o==null?void 0:o.result)==null?void 0:Le.splitSuggestion,projectId:(l==null?void 0:l.id)??null,cardsById:A,agents:b,defaultCardAgentId:E,attachments:F,onAttachmentsChange:ue,attachmentPickerRef:Ne,submitting:fe,onUpdateDraft:ne=>ve(0,ne),onClarify:ne=>void we(`${G}
|
|
357
|
+
|
|
358
|
+
补充说明:${ne}`,!1),onSplitToMultiple:()=>void we(G,!0),onOpenDuplicateCard:ne=>{g(),x(ne)},onResetToInput:ye,onMinimize:g,onCommit:()=>void Z()},o==null?void 0:o.id),D==="ai"&&me&&P.length>1&&c.jsx(qA,{drafts:P,projectId:(l==null?void 0:l.id)??null,cardsById:A,agents:b,defaultCardAgentId:E,attachments:F,onAttachmentsChange:ue,attachmentPickerRef:Ne,submitting:fe,onUpdateDraft:ve,onResetToInput:ye,onMinimize:g,onCommit:()=>void Z()}),D==="manual"&&c.jsx(HA,{initialStatus:i,project:l,agents:b,defaultCardAgentId:E,attachments:F,onAttachmentsChange:ue,attachmentPickerRef:Ne,submitting:fe,onSubmittingChange:ke,onError:je,onClose:p,onCreated:S},i)]})})}function GA({agents:n,filterAgentId:i,includeArchived:l,onChangeAgentId:s,onToggleArchived:u,onReset:o}){const[d,m]=N.useState(!1),p=N.useRef(null),g=N.useRef(null),x=N.useMemo(()=>i?n.find(b=>b.id===i)??null:null,[n,i]),y=(i?1:0)+(l?1:0),S=N.useMemo(()=>{const b=[];return i&&b.push(`@${(x==null?void 0:x.name)??"协作者"}`),l&&b.push("含归档"),b.join(" · ")},[i,x,l]);return N.useEffect(()=>{if(!d)return;const b=C=>{var E,D;const T=C.target;(E=p.current)!=null&&E.contains(T)||(D=g.current)!=null&&D.contains(T)||T instanceof Element&&T.closest(".ui-select-menu")||m(!1)},k=C=>{var T;C.key!=="Escape"||C.defaultPrevented||C.isComposing||document.querySelector('.ui-select-menu, [aria-modal="true"]')||(C.preventDefault(),m(!1),(T=p.current)==null||T.focus())};return document.addEventListener("mousedown",b),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",b),document.removeEventListener("keydown",k)}},[d]),c.jsxs("div",{className:"filter-popover-wrap",children:[c.jsxs("button",{ref:p,type:"button",className:`filter-trigger ${d?"open":""} ${y>0?"has-active has-tooltip":""}`,"data-tooltip":y>0?`已启用筛选:${S}`:void 0,"aria-haspopup":"dialog","aria-expanded":d,"aria-label":y>0?`筛选(已启用 ${y} 项:${S})`:"筛选",onClick:()=>m(b=>!b),children:[c.jsx(nk,{size:13}),c.jsx("span",{children:"筛选"}),y>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"filter-active-summary",children:S}),c.jsx("span",{className:"filter-active-count",children:y})]})]}),d&&c.jsxs("div",{ref:g,role:"dialog","aria-label":"筛选条件",className:"filter-popover-panel",children:[c.jsxs("div",{className:"filter-popover-head",children:[c.jsx("span",{children:"筛选条件"}),y>0&&c.jsx("button",{type:"button",className:"text-link xs",onClick:o,children:"重置筛选"})]}),c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"协作者"}),c.jsx(qn,{"aria-label":"按协作者筛选",value:i,onChange:s,options:[{value:"",label:"全部协作者"},...n.map(b=>({value:b.id,label:`${b.name} (${jn[b.driver]})`}))]})]}),c.jsxs("button",{type:"button",role:"switch","aria-checked":l,className:`filter-switch-row ${l?"checked":""}`,onClick:u,children:[c.jsxs("span",{className:"filter-switch-label",children:[c.jsx(ob,{size:14}),c.jsx("span",{children:"显示归档任务"})]}),c.jsx("span",{className:"ui-switch","aria-hidden":"true",children:c.jsx("span",{className:"ui-switch-thumb"})})]})]})]})}const zh=[{id:"todo",label:"待办",dotColor:"#2563eb"},{id:"doing",label:"进行中",dotColor:"#ff6b35"},{id:"review",label:"待验收",dotColor:"#eab308"},{id:"done",label:"已完成",dotColor:"#06d6a0"}];function QA(n){n.key==="Enter"&&n.nativeEvent.isComposing&&n.preventDefault()}const XA=N.memo(function({card:i,selected:l,dragging:s,cardDefaultAgent:u,workspaceDefaultAgentId:o,effectiveAgent:d,onDragStart:m,onDragEnd:p,onOpen:g,onStart:x}){const y=i.participants.some(T=>T.processing),S=i.pendingDecisionCount>0,b=!!(u&&u.id!==o&&!i.participants.some(T=>T.agentId===u.id)),k=i.status==="todo",C=i.priority==="low"||i.checklistTotal>0||i.attachmentCount>0||i.outputCount>0||i.commentCount>0||i.participants.length>0||!!i.archivedAt||b||k;return c.jsxs("div",{role:"button",tabIndex:0,draggable:!0,onDragStart:T=>m(T,i.id,i.status),onDragEnd:p,className:`kanban-card ${y?"is-running":""} ${S?"needs-decision":""} ${l?"selected":""} ${s?"dragging":""}`,onClick:()=>g(i.id),onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),g(i.id))},children:[c.jsxs("div",{className:"card-content",children:[c.jsxs("div",{className:"card-head-row",children:[c.jsx("h3",{className:"card-title",children:i.title}),(S||i.priority==="high")&&c.jsxs("div",{className:"card-head-badges",children:[S&&c.jsxs("span",{className:"decision-pill",children:["待确认",i.pendingDecisionCount>1?` · ${i.pendingDecisionCount}`:""]}),i.priority==="high"&&c.jsx("span",{className:"prio-pill high",children:"高优"})]})]}),i.bodyPreview&&c.jsx("p",{className:"card-preview",children:i.bodyPreview})]}),i.tags.length>0&&c.jsx("div",{className:"card-tags",children:i.tags.map(T=>c.jsx("span",{className:"tag-chip",children:T},T))}),C&&c.jsxs("div",{className:"card-foot",children:[c.jsxs("div",{className:"card-foot-meta",children:[i.priority==="low"&&c.jsx("span",{className:"prio-pill low",children:Vh.low}),i.archivedAt&&c.jsx("span",{className:"tag-chip muted",children:"已归档"}),b&&u&&c.jsxs("span",{className:"card-default-agent-pill",title:u.enabled?`卡片默认 Agent:${u.name}`:`卡片默认 Agent:${u.name}(已暂停)`,children:[c.jsx("span",{className:`dot tiny ${u.enabled?u.online?"success":"warning":"muted"}`}),u.name]}),i.checklistTotal>0&&c.jsxs("span",{className:i.checklistDone===i.checklistTotal?"card-metric-done":void 0,title:`任务清单:${i.checklistDone}/${i.checklistTotal}`,children:[c.jsx(Ih,{size:12})," ",i.checklistDone,"/",i.checklistTotal]}),i.attachmentCount>0&&c.jsxs("span",{title:`${i.attachmentCount} 个附件`,children:[c.jsx(wl,{size:12})," ",i.attachmentCount]}),i.outputCount>0&&c.jsxs("span",{title:`${i.outputCount} 个产出`,children:[c.jsx(X2,{size:12})," ",i.outputCount]}),i.commentCount>0&&c.jsxs("span",{title:`${i.commentCount} 条评论`,children:[c.jsx(Lh,{size:12})," ",i.commentCount]})]}),(i.participants.length>0||k)&&c.jsxs("div",{className:"card-foot-right",children:[i.participants.map(T=>c.jsxs("span",{className:`participant-pill ${T.processing?"running":""}`,title:T.activityText||T.agentName,children:[T.processing?c.jsx("span",{className:"pulse-dot"}):c.jsx(Qa,{variant:T.driver,size:12}),T.agentName]},T.agentId)),k&&c.jsxs("button",{type:"button",className:"card-start-btn",title:d?`移入进行中并唤醒 ${d.name}`:"移入进行中开始执行","aria-label":`开始执行「${i.title}」`,onClick:T=>{T.stopPropagation(),x(i.id)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&T.stopPropagation()},children:[c.jsx(Bh,{size:11,fill:"currentColor"})," 执行"]})]})]})]})}),FA=N.memo(function({cardsByColumn:i,initialLoading:l,hasActiveFilter:s,selectedCardId:u,currentProject:o,agents:d,defaultAgent:m,onOpenCard:p,onMoveCard:g,onQuickCardCreated:x}){const[y,S]=N.useState(null),[b,k]=N.useState(null),[C,T]=N.useState(null),[E,D]=N.useState(null),[I,G]=N.useState(""),[ie,O]=N.useState(!1),[R,V]=N.useState(""),ae=N.useRef(null),H=N.useMemo(()=>new Map(d.map(j=>[j.id,j])),[d]),U=N.useCallback(j=>{g(j,"doing")},[g]),P=(o==null?void 0:o.id)??"",ee=N.useRef(P),ge=N.useRef(ie);ge.current=ie,N.useEffect(()=>{ee.current!==P&&(ee.current=P,ge.current||(D(null),V("")))},[P]);const ce=N.useCallback((j,je,Ne)=>{S(je),k(Ne),j.dataTransfer.effectAllowed="move",j.dataTransfer.setData("text/plain",je)},[]),F=N.useCallback(()=>{S(null),k(null),T(null)},[]);function ue(j,je){j.preventDefault();const Ne=j.dataTransfer.getData("text/plain")||y,_=b;S(null),k(null),T(null),!(!Ne||_===je)&&g(Ne,je)}const fe=N.useCallback((j=!1)=>{D(null),V(""),j&&window.requestAnimationFrame(()=>{var je;(je=ae.current)==null||je.focus()})},[]);async function ke(j,je){if(j.preventDefault(),ie||!o)return;const Ne=I.trim();if(!Ne){V("请输入任务标题");return}const _=o.id;O(!0),V("");try{await it("/cards",{method:"POST",body:JSON.stringify({projectId:_,defaultAgentId:o.defaultAgentId,title:Ne,status:je})}),G(""),V(""),D(null),await x({title:Ne})}catch(A){V(A instanceof Error?A.message:"快速建卡失败")}finally{O(!1)}}return c.jsx("div",{className:"kanban-board","aria-busy":l,children:zh.map(j=>{const je=i[j.id],Ne=C===j.id;return c.jsxs("section",{className:`kanban-col col-${j.id} ${Ne?"drag-over":""}`,onDragOver:_=>{if(_.preventDefault(),b===j.id){C!==null&&T(null);return}C!==j.id&&T(j.id)},onDragLeave:_=>{_.currentTarget.contains(_.relatedTarget)||T(A=>A===j.id?null:A)},onDrop:_=>ue(_,j.id),children:[c.jsx("div",{className:"col-head",children:c.jsxs("div",{className:"col-title",children:[c.jsx("span",{className:`status-dot ${j.id}`}),c.jsx("h2",{children:j.label}),c.jsx("span",{className:"col-count",children:l?"…":je.length})]})}),c.jsxs("div",{className:"col-cards",children:[l?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"kanban-card-skeleton","aria-hidden":"true",children:[c.jsx("span",{className:"skeleton-line w-75"}),c.jsx("span",{className:"skeleton-line w-100"}),c.jsx("span",{className:"skeleton-line w-45"})]}),c.jsxs("div",{className:"kanban-card-skeleton","aria-hidden":"true",children:[c.jsx("span",{className:"skeleton-line w-60"}),c.jsx("span",{className:"skeleton-line w-90"})]})]}):je.length===0&&E!==j.id?c.jsx("p",{className:"col-empty-hint",children:s?"无匹配任务":`暂无${j.label}任务`}):null,!l&&je.map(_=>{const A=_.defaultAgentId?H.get(_.defaultAgentId)??null:null,te=o?bm(A,m,o.id):null;return c.jsx(XA,{card:_,selected:u===_.id,dragging:y===_.id,cardDefaultAgent:A,workspaceDefaultAgentId:(m==null?void 0:m.id)??null,effectiveAgent:te,onDragStart:ce,onDragEnd:F,onOpen:p,onStart:U},_.id)}),j.id==="todo"&&(E===j.id?c.jsxs("form",{className:`quick-add-card ${R?"has-error":""}`,onSubmit:_=>void ke(_,j.id),onKeyDown:_=>{_.key==="Escape"&&!_.defaultPrevented&&!_.nativeEvent.isComposing&&(_.preventDefault(),ie||fe(!0))},children:[c.jsx("input",{autoFocus:!0,value:I,disabled:ie,onChange:_=>{G(_.target.value),R&&V("")},placeholder:"输入一句话标题,回车建卡…","aria-label":"快速添加任务标题","aria-invalid":!!R,onKeyDown:QA}),R&&c.jsx("div",{className:"quick-add-error",role:"alert",children:R}),c.jsxs("div",{className:"quick-add-actions",children:[c.jsx("button",{type:"submit",className:"btn primary xs",disabled:ie||!I.trim(),children:ie?"创建中…":"创建任务"}),c.jsx("button",{type:"button",className:"btn ghost xs",disabled:ie,onClick:()=>fe(!0),children:"取消"})]})]}):c.jsxs("button",{ref:ae,type:"button",className:"col-quick-add-btn",disabled:l||!o,onClick:()=>{D(j.id),G(""),V("")},children:[c.jsx(Nl,{size:14})," 快速添加"]}))]})]},j.id)})})}),tb=[{id:"focus",label:"今日聚焦",desc:"挑出最该先处理的 3 张卡",prompt:"结合当前所有未完成卡片,挑出今天最该先处理的 3 张卡片(优先待验收和阻塞项),说明理由。"},{id:"risk",label:"风险与阻塞",desc:"扫描停滞任务与异常项",prompt:"扫描当前看板中的风险、卡住较久的进行中任务或异常项,如有需要调整优先级或拆分补救请给出提案。"},{id:"cleanup",label:"去重与清理",desc:"找出重复卡与待归档旧卡",prompt:"检查看板上有没有重复卡片、已完成很久待归档的卡片或空壳待办,把建议归档/整理的项列成待确认清单。"},{id:"summary",label:"进展汇总",desc:"按列梳理当前阶段进展",prompt:"按已完成、待验收、进行中、待办汇总当前工作空间阶段进展与下一步重点。"}];function KA({open:n,project:i,agents:l,refreshTick:s,streamByRunId:u,onClose:o,onOpenCard:d,onOpenAgents:m,onBoardChanged:p,onToast:g}){var ve;const x=N.useMemo(()=>l.filter(Z=>Z.enabled&&Z.online),[l]),y=N.useMemo(()=>{var Z;return i!=null&&i.defaultAgentId&&x.some(Re=>Re.id===i.defaultAgentId)?i.defaultAgentId:((Z=x[0])==null?void 0:Z.id)??""},[i==null?void 0:i.defaultAgentId,x]),[S,b]=N.useState(""),[k,C]=N.useState(null),[T,E]=N.useState([]),[D,I]=N.useState(""),[G,ie]=N.useState(!1),[O,R]=N.useState(null),[V,ae]=N.useState(null),[H,U]=N.useState({}),[P,ee]=N.useState(""),ge=N.useRef(null),ce=N.useRef(null),F=N.useRef(0),ue=N.useRef(null),fe=(i==null?void 0:i.id)??null,ke=N.useRef(!0),j=N.useMemo(()=>S&&x.some(Z=>Z.id===S)?S:y,[S,x,y]);N.useEffect(()=>{S!==j&&b(j)},[S,j]),N.useEffect(()=>{var Z;n||((Z=ue.current)==null||Z.abort(),ue.current=null,F.current+=1,ee(""))},[n]),N.useEffect(()=>(ke.current=!0,()=>{var Z;ke.current=!1,(Z=ue.current)==null||Z.abort()}),[]),N.useEffect(()=>{if(!n)return;const Z=Re=>{if(Re.key!=="Escape"||Re.defaultPrevented||Re.isComposing||document.querySelector('[aria-modal="true"]'))return;const Se=document.activeElement,Ke=ge.current;Se instanceof HTMLElement&&Ke&&!Ke.contains(Se)&&(Se.tagName==="INPUT"||Se.tagName==="TEXTAREA"||Se.tagName==="SELECT"||Se.isContentEditable)||(Re.preventDefault(),o())};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[n,o]);const je=N.useCallback(async()=>{var Ke;if(!fe||!n)return;const Z=++F.current;(Ke=ue.current)==null||Ke.abort();const Re=new AbortController;ue.current=Re;const{signal:Se}=Re;try{const Ge=new URLSearchParams({projectId:fe,kind:"assistant_chat",limit:"30"});k&&Ge.set("threadId",k);const Le=await it(`/assistant/runs?${Ge.toString()}`,{signal:Se});if(Se.aborted||Z!==F.current)return;if(k)E(Le.runs);else if(Le.runs.length>0){const ne=Le.runs[0].threadId;C(ne);const Be=Le.runs.filter(at=>at.threadId===ne).reverse();E(Be)}else E([])}catch{if(Se.aborted||Z!==F.current)return}finally{ue.current===Re&&(ue.current=null)}},[fe,n,k]),Ne=N.useRef(null);N.useEffect(()=>{const Z=Ne.current;Z&&Z.loadRuns===je&&Z.refreshTick===s||(Ne.current={loadRuns:je,refreshTick:s},je())},[je,s]),N.useEffect(()=>{U(Z=>{var Ke;let Re=!1;const Se={...Z};for(const Ge of T){if(!((Ke=Ge.result)!=null&&Ke.proposals.length)||Se[Ge.id])continue;const Le={};for(const ne of Ge.result.proposals)Le[ne.id]=!Ge.appliedActionIds.includes(ne.id);Se[Ge.id]=Le,Re=!0}return Re?Se:Z})},[T]);const _=T.find(Z=>Z.status==="queued"||Z.status==="running"),A=_?((ve=u[_.id])==null?void 0:ve.text)??"":"",te=`${T.length}:${(_==null?void 0:_.id)??""}:${A.length}`,me=N.useRef(null);if(N.useEffect(()=>{if(!n){me.current=null;return}!ce.current||me.current===te||(me.current=te,ce.current.scrollTop=ce.current.scrollHeight)},[n,te]),!n)return null;async function we(Z,Re){var Le;if(!i||G||_)return;const Se=j;if(!Se){ee("暂无在线 Agent,请先确认 Agent 已启动");return}const Ke=Z.trim();if(!Ke)return;const Ge=i.id;ee(""),ie(!0);try{const ne=await it("/assistant/runs",{method:"POST",body:JSON.stringify({projectId:Ge,agentId:Se,kind:"assistant_chat",prompt:Ke,...k?{threadId:k}:{},...Re?{preset:Re}:{},options:{includeExistingCards:!0,readWorkspace:!!i.rootPath,allowMultipleCards:!0}})});if(!ke.current)return;(Le=ue.current)==null||Le.abort(),ue.current=null,F.current+=1,k||C(ne.threadId),I(""),E(Be=>Be.some(at=>at.id===ne.id)?Be:[...Be,ne])}catch(ne){if(!ke.current)return;ee(ne instanceof Error?ne.message:"发送失败")}finally{ke.current&&ie(!1)}}async function Q(Z){if(O!==Z){R(Z),ee("");try{await it(`/assistant/runs/${Z}/cancel`,{method:"POST",body:JSON.stringify({})}),await je()}catch(Re){ee(Re instanceof Error?Re.message:"取消失败")}finally{R(Re=>Re===Z?null:Re)}}}async function ye(Z){var Ge;const Re=((Ge=Z.result)==null?void 0:Ge.proposals)??[],Se=H[Z.id]??{},Ke=Re.filter(Le=>Se[Le.id]&&!Z.appliedActionIds.includes(Le.id));if(Ke.length!==0){ae(Z.id),ee("");try{const Le=await it(`/assistant/runs/${Z.id}/apply`,{method:"POST",body:JSON.stringify({actions:Ke})});await Promise.all([je(),p()]);const ne=[];Le.createdCardIds.length&&ne.push(`新建 ${Le.createdCardIds.length} 张`),Le.updatedCardIds.length&&ne.push(`更新 ${Le.updatedCardIds.length} 张`),Le.archivedCardIds.length&&ne.push(`归档 ${Le.archivedCardIds.length} 张`),g(`已执行提案:${ne.join("、")||`${Le.appliedIds.length} 项`}`)}catch(Le){ee(Le instanceof Error?Le.message:"执行提案失败")}finally{ae(null)}}}function Ee(){var Z;(Z=ue.current)==null||Z.abort(),ue.current=null,F.current+=1,C(crypto.randomUUID()),E([]),U({}),ee(""),R(null)}return c.jsxs("aside",{ref:ge,className:"assistant-panel","aria-label":"空间助手",children:[c.jsxs("div",{className:"assistant-head",children:[c.jsxs("div",{className:"assistant-head-left",children:[c.jsx(Uo,{size:15,className:"assistant-sparkle"}),c.jsx("span",{children:"空间助手"})]}),c.jsxs("div",{className:"assistant-head-right",children:[x.length>0?c.jsx(qn,{"aria-label":"选择空间助手 Agent",value:j,onChange:b,className:"meta-select",options:x.map(Z=>({value:Z.id,label:`${Z.name}`,dotColor:"#06d6a0"}))}):c.jsx("button",{type:"button",className:"text-link xs",onClick:m,children:"无在线 Agent"}),c.jsx("button",{type:"button",className:"icon-btn",title:"开启新会话","aria-label":"开启新会话",onClick:Ee,children:c.jsx(pb,{size:14})}),c.jsx("button",{type:"button",className:"icon-btn",title:"收起助手 (⌘K / Esc)","aria-label":"收起助手",onClick:o,children:c.jsx(Gt,{size:15})})]})]}),T.length>0&&c.jsx("div",{className:"assistant-chips",children:tb.map(Z=>c.jsx("button",{type:"button",className:"quick-chip",disabled:G||!!_||x.length===0,onClick:()=>void we(Z.prompt,Z.id),children:Z.label},Z.id))}),P&&c.jsx("div",{className:"banner danger mx-sm",children:P}),c.jsx("div",{className:"assistant-stream",ref:ce,children:T.length===0?c.jsxs("div",{className:"assistant-empty",children:[c.jsx("p",{className:"assistant-empty-title",children:"跨卡分析与批量整理"}),c.jsx("p",{className:"assistant-empty-desc",children:"分析直接回答,改卡或建卡会先让你确认。"}),c.jsx("div",{className:"assistant-preset-grid",children:tb.map(Z=>c.jsxs("button",{type:"button",className:"assistant-preset-card",disabled:G||!!_||x.length===0,onClick:()=>void we(Z.prompt,Z.id),children:[c.jsx("strong",{children:Z.label}),c.jsx("span",{children:Z.desc})]},Z.id))})]}):T.map(Z=>{var Le;const Re=((Le=Z.result)==null?void 0:Le.proposals)??[],Se=H[Z.id]??{},Ke=Re.filter(ne=>Se[ne.id]&&!Z.appliedActionIds.includes(ne.id)).length,Ge=Re.length>0&&Re.every(ne=>Z.appliedActionIds.includes(ne.id));return c.jsxs("div",{className:"assistant-turn",children:[c.jsx("div",{className:"msg-user",children:Z.prompt}),(Z.status==="queued"||Z.status==="running")&&(()=>{const ne=u[Z.id],Be=(ne==null?void 0:ne.activityText)||((ne==null?void 0:ne.stage)==="structuring"?"正在整理卡片引用与待确认提案…":ne!=null&&ne.text?`${Z.agentName} 正在输出…`:Z.activityText||`${Z.agentName} 正在分析…`);return c.jsxs(c.Fragment,{children:[(ne==null?void 0:ne.text)&&c.jsxs("div",{className:"msg-ai streaming",children:[c.jsxs("div",{className:"msg-ai-meta",children:[c.jsx(Qa,{variant:Z.driver,size:13}),c.jsx("span",{children:Z.agentName}),Xa(Z.agentName,Z.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[Z.driver]})]}),c.jsxs("div",{className:"msg-ai-reply",children:[c.jsx(Hs,{content:ne.text,compact:!0}),ne.stage==="streaming"&&c.jsx("span",{className:"stream-cursor","aria-hidden":"true"})]})]}),c.jsxs("div",{className:"msg-running",children:[c.jsx("span",{className:"pulse-dot"}),c.jsx("span",{className:"msg-running-text",children:Be}),c.jsxs("button",{type:"button",className:"btn ghost xs",disabled:O===Z.id,onClick:()=>void Q(Z.id),children:[c.jsx(yb,{size:11})," ",O===Z.id?"停止中…":"停止"]})]})]})})(),Z.status==="cancelled"&&c.jsx("div",{className:"muted xs",children:"已取消本轮分析"}),Z.status==="failed"&&c.jsx("div",{className:"banner danger",children:Z.errorMessage||"本轮分析执行失败"}),Z.status==="succeeded"&&Z.result&&c.jsxs("div",{className:"msg-ai",children:[c.jsxs("div",{className:"msg-ai-meta",children:[c.jsx(Qa,{variant:Z.driver,size:13}),c.jsx("span",{children:Z.agentName}),Xa(Z.agentName,Z.driver)&&c.jsx("span",{className:"driver-badge xs",children:jn[Z.driver]})]}),Z.result.reply&&c.jsx("div",{className:"msg-ai-reply",children:c.jsx(Hs,{content:Z.result.reply,compact:!0})}),Z.result.cardRefs.length>0&&c.jsx("div",{className:"card-ref-list",children:Z.result.cardRefs.map(ne=>c.jsxs("button",{type:"button",className:"card-ref-pill",onClick:()=>d(ne.cardId),children:[c.jsxs("span",{className:"card-ref-left",children:[c.jsx("span",{className:`status-dot tiny ${ne.status}`}),c.jsx("span",{className:"card-ref-title",children:ne.title})]}),c.jsx("small",{children:ne.note||Is[ne.status]})]},ne.cardId))}),Re.length>0&&c.jsxs("div",{className:"proposal-box",children:[c.jsxs("div",{className:"proposal-head",children:[c.jsx("span",{children:"待确认行动清单"}),c.jsxs("span",{children:[Re.length," 项"]})]}),c.jsx("div",{className:"proposal-items",children:Re.map(ne=>{const Be=Z.appliedActionIds.includes(ne.id);return c.jsxs("label",{className:`proposal-row ${Be?"applied":""}`,children:[c.jsx("input",{type:"checkbox",disabled:Be,checked:Be?!0:!!Se[ne.id],onChange:at=>U(He=>({...He,[Z.id]:{...He[Z.id]??{},[ne.id]:at.target.checked}}))}),c.jsx("span",{children:ne.summary}),Be&&c.jsx(Q2,{size:13,className:"proposal-applied-icon"})]},ne.id)})}),c.jsx("div",{className:"proposal-foot",children:Ge?c.jsx("span",{className:"proposal-done-inline",children:"✓ 已全部执行"}):c.jsx("button",{type:"button",className:"btn ink xs",disabled:Ke===0||V===Z.id,onClick:()=>void ye(Z),children:V===Z.id?"执行中…":`执行已选 (${Ke})`})})]})]})]},Z.id)})}),c.jsx("div",{className:"assistant-composer",children:c.jsxs("div",{className:"composer-box",children:[c.jsx("textarea",{rows:2,value:D,onChange:Z=>I(Z.target.value),onKeyDown:Z=>{(Z.metaKey||Z.ctrlKey)&&Z.key==="Enter"&&!Z.nativeEvent.isComposing&&!G&&!_&&(Z.preventDefault(),we(D))},placeholder:"问进展,或粘贴需求让我整理成任务…"}),c.jsxs("div",{className:"composer-foot",children:[c.jsx("span",{children:"⌘↵ 发送 · 改卡前会先确认"}),c.jsxs("button",{type:"button",className:"btn ink xs",disabled:G||!!_||!D.trim()||x.length===0,onClick:()=>void we(D),children:[c.jsx(ek,{size:12})," 发送"]})]})]})})]})}function PA({projects:n,currentProject:i,onSelectProject:l,onCreateProject:s,onEditProject:u}){const[o,d]=N.useState(!1),m=N.useRef(null),p=N.useRef(null);return N.useEffect(()=>{if(!o)return;const g=y=>{var b,k;const S=y.target;(b=m.current)!=null&&b.contains(S)||(k=p.current)!=null&&k.contains(S)||d(!1)},x=y=>{var S;y.key!=="Escape"||y.defaultPrevented||y.isComposing||document.querySelector('[aria-modal="true"]')||(y.preventDefault(),d(!1),(S=m.current)==null||S.focus())};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[o]),c.jsxs("div",{className:"project-menu-wrap",children:[c.jsxs("button",{ref:m,type:"button",className:`project-trigger ${o?"open":""}`,"aria-haspopup":"menu","aria-expanded":o,"aria-label":"切换或管理工作空间",onClick:()=>d(g=>!g),children:[c.jsx("span",{className:"project-trigger-name",children:(i==null?void 0:i.name)??"看板"}),c.jsx(Ds,{size:14,className:"ui-select-chevron"})]}),o&&c.jsxs("div",{ref:p,role:"menu","aria-label":"工作空间菜单",className:"dropdown-panel project-menu-panel",children:[c.jsx("div",{className:"dropdown-section-label",children:"切换工作空间"}),c.jsx("div",{className:"dropdown-list",children:n.map(g=>{const x=(i==null?void 0:i.id)===g.id;return c.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":x,className:`dropdown-item ${x?"selected":""}`,onClick:()=>{l(g.id),d(!1)},children:[c.jsxs("span",{className:"dropdown-item-left",children:[c.jsx(hb,{size:14,className:"dropdown-item-icon"}),c.jsx("span",{className:"dropdown-item-text",children:g.name})]}),x&&c.jsx(pi,{size:14,className:"ui-select-check"})]},g.id)})}),c.jsx("div",{className:"dropdown-divider",role:"separator"}),c.jsx("button",{type:"button",role:"menuitem",className:"dropdown-item action",onClick:()=>{d(!1),s()},children:c.jsxs("span",{className:"dropdown-item-left",children:[c.jsx(Nl,{size:14,className:"dropdown-item-icon"}),c.jsx("span",{children:"新建工作空间"})]})}),i&&c.jsx("button",{type:"button",role:"menuitem",className:"dropdown-item action",onClick:()=>{d(!1),u()},children:c.jsxs("span",{className:"dropdown-item-left",children:[c.jsx(tk,{size:14,className:"dropdown-item-icon"}),c.jsx("span",{children:"工作空间设置"})]})})]})]})}const nb=[{value:"auto",label:"按需隔离(默认推荐)",description:"先给轻量独立工作目录,Agent 需要改 Git 代码时自动按需申请独立分支",hint:"先给轻量独立目录,改代码时按需申请独立分支"},{value:"isolated_dir",label:"独立子目录",description:"按任务分配独立子目录,不新建分支",hint:"按任务分目录运行,不建分支"},{value:"shared",label:"直接改原目录",description:"直接在当前目录修改文件,多 Agent 并行时可能冲突",hint:"直接改原目录(多 Agent 并行可能冲突)"}];function ib(n,i,l){return n==="edit"&&i?l.filter(s=>!s.projectId||s.projectId===i.id):l.filter(s=>!s.projectId)}function th(n){n.key==="Enter"&&n.nativeEvent.isComposing&&n.preventDefault()}function JA({mode:n,project:i,agents:l,onClose:s,onSaved:u}){var O;const[o,d]=N.useState(()=>n==="edit"&&i?i.name:""),[m,p]=N.useState(()=>n==="edit"&&i?i.description:""),[g,x]=N.useState(()=>n==="edit"&&i?i.rootPath:""),[y,S]=N.useState(()=>{var V;const R=ib(n,i,l);return n==="edit"&&i?i.defaultAgentId&&R.some(ae=>ae.id===i.defaultAgentId)?i.defaultAgentId:"":((V=R.find(ae=>ae.online)??R[0])==null?void 0:V.id)??""}),[b,k]=N.useState(()=>n==="edit"&&i?i.parallelMode==="worktree"?"auto":i.parallelMode:"auto"),[C,T]=N.useState(!1),[E,D]=N.useState(""),I=N.useMemo(()=>ib(n,i,l),[l,n,i]),G=N.useCallback(()=>{C||s()},[C,s]);N.useEffect(()=>{const R=V=>{V.key!=="Escape"||V.defaultPrevented||V.isComposing||document.querySelector(".ui-select-menu")||(V.preventDefault(),!C&&s())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[C,s]);async function ie(R){if(R.preventDefault(),!C){if(!o.trim()){D("请输入工作空间名称");return}T(!0),D("");try{const V={name:o.trim(),description:m.trim(),rootPath:g.trim(),defaultAgentId:y||null,parallelMode:b};if(n==="edit"&&i)await it(`/projects/${i.id}`,{method:"PATCH",body:JSON.stringify(V)}),u();else{const ae=await it("/projects",{method:"POST",body:JSON.stringify(V)});u(ae.id)}}catch(V){D(V instanceof Error?V.message:"保存工作空间失败")}finally{T(!1)}}}return c.jsx("div",{className:"modal-overlay",onClick:G,children:c.jsxs("form",{className:"modal-card",role:"dialog","aria-modal":"true","aria-label":n==="edit"?"工作空间设置":"新建工作空间",onClick:R=>R.stopPropagation(),onSubmit:R=>void ie(R),children:[c.jsxs("div",{className:"modal-head",children:[c.jsx("h2",{children:n==="edit"?"工作空间设置":"新建工作空间"}),c.jsx("button",{type:"button",className:"icon-btn","aria-label":"关闭窗口",disabled:C,onClick:G,children:c.jsx(Gt,{size:16})})]}),E&&c.jsx("div",{className:"banner danger",role:"alert",children:E}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"工作空间名称 *"}),c.jsx("input",{autoFocus:!0,required:!0,disabled:C,value:o,onChange:R=>{d(R.target.value),E&&D("")},onKeyDown:th,placeholder:"例如:产品研发 / 知识整理"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"工作空间说明"}),c.jsx("input",{disabled:C,value:m,onChange:R=>p(R.target.value),onKeyDown:th,placeholder:"一句话描述协作范围"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"本机目录(留空则使用临时目录)"}),c.jsx("input",{disabled:C,value:g,onChange:R=>{x(R.target.value),E&&D("")},onKeyDown:th,placeholder:"~/Documents/my-workspace"})]}),c.jsxs("div",{className:"form-row",children:[c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"默认 Agent"}),c.jsx(qn,{"aria-label":"默认 Agent",value:y,onChange:R=>{S(R),E&&D("")},placeholder:I.length>0?"不设默认(手动 @ 指定)":"暂无可用 Agent",disabled:C||I.length===0&&!y,options:[{value:"",label:"不设默认(手动 @ 指定)"},...I.map(R=>{const V=jn[R.driver],ae=V.toLowerCase()===R.name.trim().toLowerCase()?R.name:`${R.name} (${V})`;return{value:R.id,label:ae}})]}),c.jsx("small",{className:"field-hint",children:"点执行或移入进行中时默认接手"})]}),c.jsxs("div",{className:"field",children:[c.jsx("span",{children:"目录隔离"}),c.jsx(qn,{"aria-label":"目录隔离",value:b,onChange:k,disabled:C,options:nb}),c.jsx("small",{className:"field-hint",children:g.trim()?((O=nb.find(R=>R.value===b))==null?void 0:O.hint)??"":"未填目录时将在临时目录隔离运行"})]})]}),c.jsxs("div",{className:"modal-actions",children:[c.jsx("button",{type:"button",className:"btn ghost",disabled:C,onClick:G,children:"取消"}),c.jsx("button",{type:"submit",className:"btn primary",disabled:C||!o.trim(),children:C?n==="edit"?"保存中…":"创建中…":n==="edit"?"保存更改":"创建工作空间"})]})]})})}const WA=N.memo(function({mode:i,project:l,agents:s,onClose:u,onSaved:o}){if(!i||i==="edit"&&!l)return null;const d=i==="edit"?`edit:${l.id}`:"create";return c.jsx(JA,{mode:i,project:i==="edit"?l:null,agents:s,onClose:u,onSaved:o},d)});function e4({project:n,agents:i,defaultAgent:l,onUpdateRootPath:s,onUpdateDefaultAgent:u,onOpenAgents:o}){const[d,m]=N.useState(null),[p,g]=N.useState(n.rootPath),[x,y]=N.useState(!1),[S,b]=N.useState(""),k=N.useRef(null),C=N.useRef(null),T=N.useRef(null),E=N.useMemo(()=>i.filter(R=>!R.projectId||R.projectId===n.id),[i,n.id]),D=N.useCallback(R=>{var V,ae;m(null),b(""),R==="rootPath"?(V=C.current)==null||V.focus():R==="defaultAgent"&&((ae=T.current)==null||ae.focus())},[]);N.useEffect(()=>{if(!d)return;const R=ae=>{var H;x||(H=k.current)!=null&&H.contains(ae.target)||D()},V=ae=>{ae.key!=="Escape"||ae.defaultPrevented||ae.isComposing||(ae.preventDefault(),!x&&D(d))};return document.addEventListener("mousedown",R),document.addEventListener("keydown",V),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",V)}},[d,x,D]);function I(){if(!x){if(d==="rootPath"){D();return}g(n.rootPath),b(""),m("rootPath")}}function G(){x||(b(""),m(R=>R==="defaultAgent"?null:"defaultAgent"))}async function ie(R){if(R.preventDefault(),x)return;const V=p.trim();if(V===n.rootPath.trim()){D("rootPath");return}y(!0),b("");try{await s(V),D("rootPath")}catch(ae){b(ae instanceof Error?ae.message:"更新工作目录失败")}finally{y(!1)}}async function O(R){if(!x){if(n.defaultAgentId===R){D("defaultAgent");return}y(!0),b("");try{await u(R),D("defaultAgent")}catch(V){b(V instanceof Error?V.message:"切换默认 Agent 失败")}finally{y(!1)}}}return c.jsxs("div",{ref:k,className:"status-project-controls",children:[c.jsxs("div",{className:"status-popover-wrap",children:[c.jsxs("button",{ref:C,type:"button",className:`status-bar-item ${d==="rootPath"?"active":"has-tooltip tooltip-top tooltip-left"} ${n.rootPath?"":"muted"}`,"data-tooltip":d==="rootPath"?void 0:n.rootPath?`本机目录:${n.rootPath}(点击修改)`:"点击绑定本机目录","aria-haspopup":"dialog","aria-expanded":d==="rootPath",onClick:I,children:[c.jsx(hb,{size:12}),c.jsx("span",{className:"status-bar-text",children:n.rootPath?n.rootPath.split("/").slice(-2).join("/"):"临时目录 · 点击绑定目录"})]}),d==="rootPath"&&c.jsxs("form",{role:"dialog","aria-label":"修改本机目录",className:"status-popover-panel root-path",onSubmit:R=>void ie(R),children:[c.jsx("div",{className:"status-popover-head",children:c.jsx("span",{children:"本机目录"})}),c.jsxs("label",{className:"field",children:[c.jsx("input",{autoFocus:!0,value:p,onChange:R=>{g(R.target.value),S&&b("")},onKeyDown:R=>{R.key==="Enter"&&R.nativeEvent.isComposing&&R.preventDefault()},placeholder:"~/Documents/my-workspace",disabled:x}),c.jsx("small",{className:"field-hint",children:"填写本机目录路径;留空则使用临时目录"})]}),S&&c.jsx("div",{className:"status-popover-error",role:"alert",children:S}),c.jsxs("div",{className:"status-popover-actions",children:[c.jsx("button",{type:"button",className:"btn ghost xs",disabled:x,onClick:()=>D("rootPath"),children:"取消"}),c.jsx("button",{type:"submit",className:"btn primary xs",disabled:x,children:x?"保存中…":"保存路径"})]})]})]}),c.jsx("span",{className:"status-bar-sep","aria-hidden":"true"}),c.jsxs("div",{className:"status-popover-wrap",children:[c.jsxs("button",{ref:T,type:"button",className:`status-bar-item ${d==="defaultAgent"?"active":"has-tooltip tooltip-top"} ${l?"":"muted"}`,"data-tooltip":d==="defaultAgent"?void 0:"点击切换默认 Agent","aria-haspopup":"dialog","aria-expanded":d==="defaultAgent",onClick:G,children:[c.jsx(nh,{size:12,fill:l?"currentColor":"none",className:l?"status-star-icon":""}),c.jsx("span",{className:"status-bar-text",children:l?`默认 Agent:${l.name}`:"默认 Agent:未设置"})]}),d==="defaultAgent"&&c.jsxs("div",{role:"dialog","aria-label":"切换默认 Agent",className:"status-popover-panel default-agent",children:[c.jsxs("div",{className:"status-popover-head stack",children:[c.jsxs("div",{className:"status-popover-head-row",children:[c.jsx("span",{children:"默认 Agent"}),n.defaultAgentId&&c.jsx("button",{type:"button",className:"text-link xs",disabled:x,onClick:()=>void O(null),children:"取消默认"})]}),c.jsx("small",{className:"status-popover-sub",children:"点执行或移入进行中时默认接手"})]}),S&&c.jsx("div",{className:"status-popover-error",role:"alert",children:S}),E.length>0?c.jsx("div",{className:"status-popover-list",role:"listbox","aria-label":"选择默认 Agent",children:E.map(R=>{const V=n.defaultAgentId===R.id,ae=jn[R.driver],H=ae.toLowerCase()!==R.name.trim().toLowerCase();return c.jsxs("button",{type:"button",role:"option","aria-selected":V,disabled:x,className:`status-popover-option ${V?"selected":""}`,onClick:()=>void O(R.id),children:[c.jsxs("span",{className:"status-popover-option-main",children:[c.jsx("span",{className:`dot tiny ${R.online?"success":"warning"}`}),c.jsx("span",{className:"status-popover-option-name",children:R.name}),H&&c.jsx("span",{className:"status-popover-option-meta",children:ae})]}),V&&c.jsx(pi,{size:14,className:"ui-select-check"})]},R.id)})}):c.jsxs("div",{className:"status-popover-empty",children:[c.jsx("span",{children:"暂无可用的 Agent"}),c.jsx("button",{type:"button",className:"text-link xs",disabled:x,onClick:()=>{D(),o()},children:"去接入"})]})]})]})]})}function t4(){try{return window.localStorage.getItem(fh)}catch{return null}}function ab(n){try{n?window.localStorage.setItem(fh,n):window.localStorage.removeItem(fh)}catch{}}function lb(n){const i=ow(location.pathname,location.search,location.hash,n),l=`${location.pathname}${location.search}${location.hash}`;i!==l&&history.replaceState(null,"",i)}function n4(){var oa;const[n,i]=N.useState([]),[l,s]=N.useState(()=>uw(location.search,t4())),u=N.useRef(l),[o,d]=N.useState([]),[m,p]=N.useState([]),[g,x]=N.useState(()=>/^#card=[0-9a-f-]{36}$/.test(location.hash)?location.hash.slice(6):null),[y,S]=N.useState(!1),[b,k]=N.useState(!1),[C,T]=N.useState(""),[E,D]=N.useState(""),[I,G]=N.useState(""),[ie,O]=N.useState(!1),[R,V]=N.useState(!0),[ae,H]=N.useState(!1),[U,P]=N.useState(""),[ee,ge]=N.useState(0),[ce,F]=N.useState(null),ue=N.useRef(void 0),fe=N.useRef(!1),ke=N.useRef(0),j=N.useRef(null),je=N.useRef(0),Ne=N.useRef(null),_=N.useRef(!1),[A,te]=N.useState(!1),[me,we]=N.useState("todo"),[Q,ye]=N.useState(null),[Ee,ve]=N.useState({}),[Z,Re]=N.useState(null),Se=N.useMemo(()=>n.find(le=>le.id===l)??n[0]??null,[n,l]),Ke=N.useCallback(()=>{Re(null)},[]),Ge=N.useCallback(()=>{T(""),D(""),G("")},[]);N.useEffect(()=>{const le=C.trim();if(!le){D("");return}const Oe=window.setTimeout(()=>{D(le)},aw);return()=>window.clearTimeout(Oe)},[C]);const Le=N.useRef({search:E,filterAgentId:I,includeArchived:ie});Le.current={search:E,filterAgentId:I,includeArchived:ie};const ne=N.useCallback(le=>{u.current=le,s(le),ab(le),lb(le)},[]),Be=N.useCallback(async(le,Oe)=>{var wn;const Me=++je.current;(wn=Ne.current)==null||wn.abort();const ht=new AbortController;Ne.current=ht;const _t=()=>ht.abort();Oe==null||Oe.addEventListener("abort",_t,{once:!0});try{const dn=fw({projectId:le,search:Le.current.search,agentId:Le.current.filterAgentId,includeArchived:Le.current.includeArchived}),hn=await it(`/cards?${dn}`,{signal:ht.signal});return ht.signal.aborted||Me!==je.current?!1:(d(hn),!0)}catch(dn){if(ht.signal.aborted||Me!==je.current)return!1;throw dn}finally{Oe==null||Oe.removeEventListener("abort",_t),Ne.current===ht&&(Ne.current=null)}},[]),at=N.useCallback(async le=>{if(!_.current)return;const Oe=le??u.current;try{await Be(Oe)&&P("")}catch(Me){P(Me instanceof Error?Me.message:"加载看板数据失败")}},[Be]),He=N.useCallback(async()=>{var ht,_t,wn;const le=++ke.current;(ht=j.current)==null||ht.abort();const Oe=new AbortController;j.current=Oe;const{signal:Me}=Oe;try{const[dn,hn]=await Promise.all([it("/projects",{signal:Me}),it("/agents",{signal:Me})]);if(Me.aborted||le!==ke.current)return;const ti=!_.current;_.current=!0,i(dn),p(hn.agents);const Ut=u.current,rn=((_t=dn.find(xi=>xi.id===Ut))==null?void 0:_t.id)??((wn=dn[0])==null?void 0:wn.id)??"";rn!==Ut&&(u.current=rn,s(rn)),(ti||rn!==Ut)&&ab(rn),lb(rn);const yi=await Be(rn,Me);if(Me.aborted||le!==ke.current)return;yi&&P(""),ge(xi=>xi+1)}catch(dn){if(Me.aborted||le!==ke.current)return;P(dn instanceof Error?dn.message:"加载看板数据失败")}finally{!Me.aborted&&le===ke.current&&V(!1),j.current===Oe&&(j.current=null)}},[Be]),Ct=N.useCallback(async()=>{if(!fe.current){fe.current=!0,H(!0);try{await He()}finally{fe.current=!1,H(!1)}}},[He]);N.useEffect(()=>(He(),()=>{var le,Oe;(le=j.current)==null||le.abort(),(Oe=Ne.current)==null||Oe.abort()}),[He]);const qt=`${E}\0${I}\0${ie?"1":"0"}`,ln=N.useRef(qt);N.useEffect(()=>{ln.current!==qt&&(ln.current=qt,at())},[qt,at]);const St=N.useRef(new Set),En=N.useCallback(le=>(St.current.add(le),()=>{St.current.delete(le)}),[]);N.useEffect(()=>tw(()=>{He()},{onAssistantDelta:Oe=>{ve(Me=>{const ht=Me[Oe.runId];if(ht&&ht.text===Oe.text&&ht.stage===Oe.stage&&ht.activityText===Oe.activityText)return Me;const _t=Object.entries(Me).filter(([wn])=>wn!==Oe.runId).slice(-5);return Object.fromEntries([..._t,[Oe.runId,Oe]])})},onCardRunStep:Oe=>{for(const Me of St.current)Me(Oe)}}),[He]);const J=N.useCallback(le=>{F(le),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>F(null),6e3)},[]);N.useEffect(()=>()=>window.clearTimeout(ue.current),[]),N.useEffect(()=>{const le=Oe=>{(Oe.metaKey||Oe.ctrlKey)&&Oe.key.toLowerCase()==="k"&&(Oe.preventDefault(),k(Me=>!Me))};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[]);const de=Q&&(Q.status==="queued"||Q.status==="running")?Q.id:null,_e=N.useRef(ee);N.useEffect(()=>{if(!de)return;const le=new AbortController,Oe=async()=>{try{const ht=await it(`/assistant/runs/${de}`,{signal:le.signal});le.signal.aborted||ye(ht)}catch{}};Oe();const Me=window.setInterval(()=>{Oe()},3e3);return()=>{le.abort(),window.clearInterval(Me)}},[de]),N.useEffect(()=>{if(_e.current===ee||(_e.current=ee,!de))return;const le=new AbortController;return it(`/assistant/runs/${de}`,{signal:le.signal}).then(Oe=>{le.signal.aborted||ye(Oe)}).catch(()=>{}),()=>le.abort()},[de,ee]),N.useEffect(()=>{Q&&Se&&Q.projectId!==Se.id&&ye(null)},[Q,Se]);const L=N.useCallback(le=>{x(le),history.replaceState(null,"",cw(location.pathname,location.search,le))},[]),he=N.useCallback(le=>{le!==u.current&&(ne(le),at(le))},[ne,at]);function Te(le="todo"){we(le),te(!0)}async function Fe(le){te(!1),await He();const Oe=E||C.trim();if(!!(Oe||I)&&(!!Oe||le.some(_t=>I&&_t.defaultAgentId!==I))){J({message:`已创建 ${le.length} 张卡片(可能被当前筛选隐藏)`,actionLabel:"清空筛选查看",onAction:Ge});return}le.length===1?L(le[0].id):le.length>1&&J({message:`已创建 ${le.length} 张任务卡片`})}const wt=N.useCallback(async({title:le})=>{await He();const Oe=E.toLowerCase();(!!Oe&&!le.toLowerCase().includes(Oe)||!!I)&&J({message:"已创建卡片(可能被当前筛选隐藏)",actionLabel:"清空筛选查看",onAction:Ge})},[He,E,I,J,Ge]),jt=N.useCallback(le=>{Re(null),le&&ne(le),He()},[ne,He]);async function Et(le){Se&&(await it(`/projects/${Se.id}`,{method:"PATCH",body:JSON.stringify({rootPath:le})}),await He(),J({message:le?`本机目录已更新:${le.split("/").slice(-2).join("/")}`:"已切换为临时目录"}))}async function Ze(le){if(!Se)return;if(await it(`/projects/${Se.id}`,{method:"PATCH",body:JSON.stringify({defaultAgentId:le})}),await He(),le===null){J({message:"已取消默认 Agent"});return}const Oe=m.find(Me=>Me.id===le);Oe&&J({message:`默认 Agent 已切换为 ${Oe.name}`})}const kn=N.useCallback(async(le,Oe)=>{const Me=o.find(Ut=>Ut.id===le);if(Me&&Me.status===Oe)return;const ht=(Me==null?void 0:Me.status)==="todo"&&Oe==="doing",_t=!!Me&&Me.status!=="todo"&&Oe==="todo"&&Me.participants.some(Ut=>Ut.processing||Ut.state==="running"),wn=(Me==null?void 0:Me.projectId)??(Se==null?void 0:Se.id)??"",dn=Me!=null&&Me.defaultAgentId?m.find(Ut=>Ut.id===Me.defaultAgentId)??null:null,hn=Se!=null&&Se.defaultAgentId?m.find(Ut=>Ut.id===Se.defaultAgentId)??null:null,ti=wn?bm(dn,hn,wn):null;d(Ut=>Ut.map(rn=>rn.id===le?{...rn,status:Oe}:rn));try{await it(`/cards/${le}/status`,{method:"POST",body:JSON.stringify({status:Oe})}),await He(),ht?J({message:ti?`已开始执行,正在唤醒 ${ti.name}`:"已移入进行中"}):_t&&J({message:"已移回待办,并自动停止正在执行的 Agent"})}catch(Ut){P(Ut instanceof Error?Ut.message:"移动卡片失败"),await He()}},[o,Se,m,He,J]),ze=N.useMemo(()=>{const le={todo:[],doing:[],review:[],done:[]};for(const Oe of o)le[Oe.status].push(Oe);for(const Oe of zh)le[Oe.id].sort((Me,ht)=>+(ht.pendingDecisionCount>0)-+(Me.pendingDecisionCount>0));return le},[o]),gt=N.useMemo(()=>o.filter(le=>le.pendingDecisionCount>0),[o]),Xt=N.useMemo(()=>gt.reduce((le,Oe)=>le+Oe.pendingDecisionCount,0),[gt]),Ft=m.filter(le=>le.online),$n=m.filter(le=>le.online&&["expired","logged_out","error"].includes(le.loginState)),_n=m.filter(le=>le.activeCards.length>0),ei=Se!=null&&Se.defaultAgentId?m.find(le=>le.id===Se.defaultAgentId)??null:null;return c.jsxs("div",{className:"app-shell",children:[c.jsxs("div",{className:"main-area",children:[c.jsxs("header",{className:"topbar",children:[c.jsxs("div",{className:"topbar-left",children:[c.jsxs("span",{className:"brand-mark",children:[c.jsxs("svg",{className:"brand-slabs",width:"11",height:"22",viewBox:"0 0 11 22",fill:"none","aria-hidden":"true",children:[c.jsx("rect",{x:"0",y:"4",width:"6.5",height:"14",rx:"2",transform:"skewX(-14)",fill:"var(--citrus-cta)"}),c.jsx("rect",{x:"7.5",y:"7",width:"4",height:"11",rx:"1.5",transform:"skewX(-14)",fill:"var(--accent)"})]}),c.jsx("span",{className:"brand-word",children:"slate"})]}),c.jsx("span",{className:"topbar-slash","aria-hidden":"true",children:"/"}),c.jsx(PA,{projects:n,currentProject:Se,onSelectProject:he,onCreateProject:()=>Re("create"),onEditProject:()=>Re("edit")})]}),c.jsxs("div",{className:"topbar-right",children:[c.jsxs("div",{className:"topbar-filters",children:[c.jsxs("div",{className:"search-box compact",children:[c.jsx(W2,{size:13}),c.jsx("input",{value:C,onChange:le=>T(le.target.value),onKeyDown:le=>{le.key!=="Escape"||le.nativeEvent.isComposing||(C||E?(le.preventDefault(),le.stopPropagation(),T(""),D("")):le.currentTarget.blur())},placeholder:"搜索任务…","aria-label":"搜索标题、正文或标签"}),C&&c.jsx("button",{type:"button",className:"search-clear","aria-label":"清空搜索",onClick:()=>{T(""),D("")},children:c.jsx(Gt,{size:12})})]}),c.jsx(GA,{agents:m,filterAgentId:I,includeArchived:ie,onChangeAgentId:G,onToggleArchived:()=>O(le=>!le),onReset:()=>{G(""),O(!1)}})]}),c.jsx("span",{className:"topbar-divider","aria-hidden":"true"}),c.jsxs("div",{className:"topbar-actions",children:[c.jsxs("button",{type:"button",className:`agent-pill has-tooltip ${$n.length?"danger":_n.length?"accent":Ft.length?"success":"neutral"}`,"data-tooltip":"管理本机 Agent",onClick:()=>S(!0),children:[c.jsx("span",{className:_n.length?"pulse-dot":`dot tiny ${$n.length?"danger":Ft.length?"success":"warning"}`}),$n.length>0?`${$n.length} 个 Agent 登录失效`:_n.length>0?`${_n.length} 个 Agent 执行中`:`${Ft.length} 个 Agent 在线`]}),c.jsxs("button",{type:"button",className:`assistant-trigger has-tooltip ${b?"active":""}`,"data-tooltip":"空间助手 (⌘K)","aria-pressed":b,onClick:()=>k(le=>!le),children:[c.jsx(Uo,{size:14}),c.jsx("span",{className:"assistant-trigger-label",children:"助手"})]}),c.jsxs("button",{type:"button",className:"btn primary small",onClick:()=>Te("todo"),children:[c.jsx(Nl,{size:15})," 新建任务"]})]})]})]}),U&&c.jsxs("div",{className:"banner danger mx banner-with-action",role:"alert",children:[c.jsx("span",{children:U}),c.jsxs("div",{className:"banner-actions",children:[c.jsx("button",{type:"button",className:"btn ghost xs",disabled:ae,"aria-busy":ae,onClick:()=>void Ct(),children:ae?"重试中…":"重试"}),c.jsx("button",{type:"button",className:"icon-btn xs","aria-label":"关闭错误提示",onClick:()=>P(""),children:c.jsx(Gt,{size:13})})]})]}),!R&&!U&&o.length===0&&(E||I)&&c.jsxs("div",{className:"board-filter-empty mx",role:"status",children:[c.jsx("span",{children:"没有匹配的任务"}),c.jsx("button",{type:"button",className:"btn ghost xs",onClick:Ge,children:"清空筛选"})]}),c.jsxs("div",{className:"workspace-split",children:[c.jsx(FA,{cardsByColumn:ze,initialLoading:R,hasActiveFilter:!!(E||I),selectedCardId:g,currentProject:Se,agents:m,defaultAgent:ei,onOpenCard:L,onMoveCard:kn,onQuickCardCreated:wt}),c.jsx(KA,{open:b,project:Se,agents:m,refreshTick:ee,streamByRunId:Ee,onClose:()=>k(!1),onOpenCard:le=>L(le),onOpenAgents:()=>S(!0),onBoardChanged:He,onToast:le=>J({message:le})},(Se==null?void 0:Se.id)??"none")]})]}),c.jsxs("footer",{className:"status-bar",role:"contentinfo","aria-label":"工作空间与看板状态栏",children:[c.jsx("div",{className:"status-bar-left",children:Se&&c.jsx(e4,{project:Se,agents:m,defaultAgent:ei,onUpdateRootPath:Et,onUpdateDefaultAgent:Ze,onOpenAgents:()=>S(!0)},Se.id)}),(!A&&Q&&(Q.status==="queued"||Q.status==="running"||Q.status==="succeeded")||gt.length>0)&&c.jsxs("div",{className:"status-bar-center",children:[gt.length>0&&c.jsxs("button",{type:"button",className:"status-decision-pill",onClick:()=>L(gt[0].id),children:[c.jsx("span",{className:"dot tiny warning"}),c.jsxs("span",{children:[Xt," 项待确认 · 点击处理"]})]}),!A&&Q&&(Q.status==="queued"||Q.status==="running"||Q.status==="succeeded")&&c.jsxs("button",{type:"button",className:"status-ai-pill",onClick:()=>te(!0),children:[c.jsx("span",{className:Q.status==="succeeded"?"dot tiny accent":"pulse-dot"}),c.jsx("span",{children:Q.status==="succeeded"?`AI 建卡草稿已就绪(${((oa=Q.result)==null?void 0:oa.drafts.length)??1} 张)· 点击核对`:`${Q.agentName} 正在整理建卡草稿…`})]})]}),c.jsxs("div",{className:"status-bar-right",children:[c.jsx("div",{className:"status-counts",children:zh.map(le=>c.jsxs("span",{className:"status-stat-item",children:[c.jsx("span",{className:`status-dot tiny ${le.id}`}),c.jsxs("span",{children:[le.label," ",ze[le.id].length]})]},le.id))}),c.jsx("span",{className:"status-bar-sep","aria-hidden":"true"}),c.jsx("span",{className:"status-stat-total",children:E||I?`筛选 ${o.length} 项`:ie?`共 ${o.length} 项(含归档)`:`共 ${o.length} 项任务`})]})]}),g&&c.jsx(LA,{cardId:g,project:Se,agents:m,refreshTick:ee,subscribeRunSteps:En,onClose:()=>L(null),onChanged:He,onSelectCard:le=>L(le)},g),y&&c.jsx(iw,{open:!0,onClose:()=>S(!1),agents:m,currentProject:Se,onRefresh:He,onOpenCard:le=>L(le)}),ce&&c.jsxs("div",{className:"floating-toast",role:"status","aria-live":"polite",children:[c.jsx("span",{children:ce.message}),ce.actionLabel&&ce.onAction&&c.jsx("button",{type:"button",className:"text-link xs",onClick:()=>{var le;(le=ce.onAction)==null||le.call(ce),F(null)},children:ce.actionLabel}),c.jsx("button",{type:"button",className:"icon-btn xs","aria-label":"关闭提示",onClick:()=>F(null),children:c.jsx(Gt,{size:13})})]}),c.jsx(YA,{open:A,initialStatus:me,project:Se,cards:o,agents:m,draftRun:Q,streamState:Q?Ee[Q.id]:void 0,onDraftRunChange:ye,onClose:()=>{te(!1),((Q==null?void 0:Q.status)==="failed"||(Q==null?void 0:Q.status)==="cancelled")&&ye(null)},onMinimize:()=>te(!1),onOpenCard:le=>L(le),onOpenAgents:()=>S(!0),onCreated:Fe}),c.jsx(WA,{mode:Z,project:Se,agents:m,onClose:Ke,onSaved:jt})]})}U2.createRoot(document.getElementById("root")).render(c.jsx(D2.StrictMode,{children:c.jsx(n4,{})}));export{rA as _,i4 as c,rb as g};
|